git.fiddlerwoaroof.com
Ed L authored on 19/10/2014 18:24:13
Showing 108 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+bootstrap:
2
+#	lessc --compress less/bootstrap.less > css/style.css
3
+	lessc --line-numbers=comments less/bootstrap.less > css/style.css
0 4
new file mode 100644
1 5
Binary files /dev/null and b/img/ajax-loader.gif differ
2 6
new file mode 100644
3 7
Binary files /dev/null and b/img/apple-touch-icon-114x114.png differ
4 8
new file mode 100644
5 9
Binary files /dev/null and b/img/apple-touch-icon-120x120.png differ
6 10
new file mode 100644
7 11
Binary files /dev/null and b/img/apple-touch-icon-144x144.png differ
8 12
new file mode 100644
9 13
Binary files /dev/null and b/img/apple-touch-icon-152x152.png differ
10 14
new file mode 100644
11 15
Binary files /dev/null and b/img/apple-touch-icon-180x180.png differ
12 16
new file mode 100644
13 17
Binary files /dev/null and b/img/apple-touch-icon-57x57.png differ
14 18
new file mode 100644
15 19
Binary files /dev/null and b/img/apple-touch-icon-60x60.png differ
16 20
new file mode 100644
17 21
Binary files /dev/null and b/img/apple-touch-icon-72x72.png differ
18 22
new file mode 100644
19 23
Binary files /dev/null and b/img/apple-touch-icon-76x76.png differ
20 24
new file mode 100644
21 25
Binary files /dev/null and b/img/apple-touch-icon-precomposed.png differ
22 26
new file mode 100644
23 27
Binary files /dev/null and b/img/apple-touch-icon.png differ
24 28
new file mode 100644
... ...
@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<browserconfig>
3
+  <msapplication>
4
+    <tile>
5
+      <square70x70logo src="/themes/ed/img/mstile-70x70.png"/>
6
+      <square150x150logo src="/themes/ed/img/mstile-150x150.png"/>
7
+      <square310x310logo src="/themes/ed/img/mstile-310x310.png"/>
8
+      <wide310x150logo src="/themes/ed/img/mstile-310x150.png"/>
9
+      <TileColor>#6fc8d4</TileColor>
10
+    </tile>
11
+  </msapplication>
12
+</browserconfig>
0 13
new file mode 100644
1 14
Binary files /dev/null and b/img/favicon-160x160.png differ
2 15
new file mode 100644
3 16
Binary files /dev/null and b/img/favicon-16x16.png differ
4 17
new file mode 100644
5 18
Binary files /dev/null and b/img/favicon-192x192.png differ
6 19
new file mode 100644
7 20
Binary files /dev/null and b/img/favicon-32x32.png differ
8 21
new file mode 100644
9 22
Binary files /dev/null and b/img/favicon-48x48.png differ
10 23
new file mode 100644
11 24
Binary files /dev/null and b/img/favicon-96x96.png differ
12 25
new file mode 100644
13 26
Binary files /dev/null and b/img/favicon.ico differ
14 27
new file mode 100644
15 28
Binary files /dev/null and b/img/favicon.png differ
16 29
new file mode 100644
17 30
Binary files /dev/null and b/img/favicons.zip differ
18 31
new file mode 100644
19 32
Binary files /dev/null and b/img/feed.png differ
20 33
new file mode 100644
21 34
Binary files /dev/null and b/img/gitlist_logo.png differ
22 35
new file mode 100644
23 36
Binary files /dev/null and b/img/glyphicons-halflings-white.png differ
24 37
new file mode 100644
25 38
Binary files /dev/null and b/img/glyphicons-halflings.png differ
26 39
new file mode 100644
27 40
Binary files /dev/null and b/img/mstile-144x144.png differ
28 41
new file mode 100644
29 42
Binary files /dev/null and b/img/mstile-150x150.png differ
30 43
new file mode 100644
31 44
Binary files /dev/null and b/img/mstile-310x150.png differ
32 45
new file mode 100644
33 46
Binary files /dev/null and b/img/mstile-310x310.png differ
34 47
new file mode 100644
35 48
Binary files /dev/null and b/img/mstile-70x70.png differ
36 49
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.remove(),e.trigger("closed")}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){a(b.target).button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=a.extend({},a.fn.modal.defaults,c),this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=typeof c=="object"&&c;e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){a.stopPropagation(),a.preventDefault();switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:this.hide();break;default:this.lookup()}},keypress:function(a){a.stopPropagation();if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}},blur:function(a){var b=this;a.stopPropagation(),a.preventDefault(),setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery);
0 2
\ No newline at end of file
1 3
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+var CodeMirror=function(){function e(r,i){function sn(e){return e>=0&&e<Ct.size}function un(e){return E(Ct,e)}function an(e,t){Wt=!0;var n=t-e.height;for(var r=e;r;r=r.parent)r.height+=n}function fn(e){var t={line:0,ch:0};Ln(t,{line:Ct.size-1,ch:un(Ct.size-1).text.length},lt(e),t,t),Ft=!0}function ln(e){var t=[];return Ct.iter(0,Ct.size,function(e){t.push(e.text)}),t.join(e||"\n")}function cn(e){K.scrollTop&&(bt.scrollTop+=K.scrollTop,K.scrollTop=0);if(Dt!=bt.scrollTop||Pt!=K.scrollLeft)Dt=bt.scrollTop,Pt=K.scrollLeft,tr([]),s.fixedGutter&&(st.style.left=K.scrollLeft+"px"),s.onScroll&&s.onScroll(on)}function hn(e){function d(e){if(i=="single")ur(n,e);else if(i=="double"){var t=yr(e);rt(e,h)?ur(t.from,p):ur(h,t.to)}else i=="triple"&&(rt(e,h)?ur(p,hr({line:e.line,ch:0})):ur(h,hr({line:e.line+1,ch:0})))}function v(e){var t=ei(e,!0);if(t&&!nt(t,u)){Lt||Tn(),u=t,d(t),Ft=!1;var n=er();if(t.line>=n.to||t.line<n.from)a=setTimeout(pi(function(){v(e)}),150)}}function m(e){clearTimeout(a);var t=ei(e);t&&d(t),L(e),Jn(),Ft=!0,g(),l()}or(D(e,"shiftKey"));for(var t=M(e);t!=C;t=t.parentNode)if(t.parentNode==G&&t!=Y)return;for(var t=M(e);t!=C;t=t.parentNode)if(t.parentNode==ot)return s.onGutterClick&&s.onGutterClick(on,at(ot.childNodes,t)+$t,e),L(e);var n=ei(e);switch(_(e)){case 3:j&&ti(e);return;case 2:n&&lr(n.line,n.ch,!0),setTimeout(Jn,20),L(e);return}if(!n){M(e)==K&&L(e);return}Lt||Tn();var r=+(new Date),i="single";if(_t&&_t.time>r-400&&nt(_t.pos,n))i="triple",L(e),setTimeout(Jn,20),br(n.line);else if(Mt&&Mt.time>r-400&&nt(Mt.pos,n)){i="double",_t={time:r,pos:n},L(e);var o=yr(n);ur(o.from,o.to)}else Mt={time:r,pos:n};var u=n,a;if(s.dragDrop&&J&&!s.readOnly&&!nt(At.from,At.to)&&!rt(n,At.from)&&!rt(At.to,n)&&i=="single"){U&&(K.draggable=!0);function f(t){U&&(K.draggable=!1),Ht=!1,l(),c(),Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)<10&&(L(t),lr(n.line,n.ch,!0),Jn())}var l=P(document,"mouseup",pi(f),!0),c=P(K,"drop",pi(f),!0);Ht=!0,K.dragDrop&&K.dragDrop();return}L(e),i=="single"&&lr(n.line,n.ch,!0);var h=At.from,p=At.to,g=P(document,"mousemove",pi(function(e){clearTimeout(a),L(e),!F&&!_(e)?m(e):v(e)}),!0),l=P(document,"mouseup",pi(m),!0)}function pn(e){for(var t=M(e);t!=C;t=t.parentNode)if(t.parentNode==ot)return L(e);L(e)}function dn(e){if(s.onDragEvent&&s.onDragEvent(on,k(e)))return;e.preventDefault();var t=ei(e,!0),n=e.dataTransfer.files;if(!t||s.readOnly)return;if(n&&n.length&&window.FileReader&&window.File){function r(e,n){var r=new FileReader;r.onload=function(){o[n]=r.result,++u==i&&(t=hr(t),pi(function(){var e=jn(o.join(""),t,t);ur(t,e)})())},r.readAsText(e)}var i=n.length,o=Array(i),u=0;for(var a=0;a<i;++a)r(n[a],a)}else{if(Ht&&!rt(t,At.from)&&!rt(At.to,t))return;try{var o=e.dataTransfer.getData("Text");o&&di(function(){var e=At.from,n=At.to;ur(t,t),Ht&&jn("",e,n),Fn(o),Jn()})}catch(e){}}}function vn(e){var t=Rn();e.dataTransfer.setData("Text",t);if(j||z||W){var n=document.createElement("img");n.scr="data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs=",e.dataTransfer.setDragImage(n,0,0)}}function mn(e,t){if(typeof e=="string"){e=u[e];if(!e)return!1}var n=Ot;try{s.readOnly&&(jt=!0),t&&(Ot=null),e(on)}catch(r){if(r!=B)throw r;return!1}finally{Ot=n,jt=!1}return!0}function gn(e){function u(){o=!0}var t=f(s.keyMap),n=t.auto;clearTimeout(wn),n&&!c(e)&&(wn=setTimeout(function(){f(s.keyMap)==t&&(s.keyMap=n.call?n.call(null,on):n)},50));var r=ht[D(e,"keyCode")],i=!1;if(r==null||e.altGraphKey)return!1;D(e,"altKey")&&(r="Alt-"+r),D(e,"ctrlKey")&&(r="Ctrl-"+r),D(e,"metaKey")&&(r="Cmd-"+r);var o=!1;return D(e,"shiftKey")?i=l("Shift-"+r,s.extraKeys,s.keyMap,function(e){return mn(e,!0)},u)||l(r,s.extraKeys,s.keyMap,function(e){if(typeof e=="string"&&/^go[A-Z]/.test(e))return mn(e)},u):i=l(r,s.extraKeys,s.keyMap,mn,u),o&&(i=!1),i&&(L(e),ni(),F&&(e.oldKeyCode=e.keyCode,e.keyCode=0)),i}function yn(e,t){var n=l("'"+t+"'",s.extraKeys,s.keyMap,function(e){return mn(e,!0)});return n&&(L(e),ni()),n}function En(e){Lt||Tn(),F&&e.keyCode==27&&(e.returnValue=!1),Un&&Vn()&&(Un=!1);if(s.onKeyEvent&&s.onKeyEvent(on,k(e)))return;var t=D(e,"keyCode");or(t==16||D(e,"shiftKey"));var r=gn(e);W&&(bn=r?t:null,!r&&t==88&&D(e,n?"metaKey":"ctrlKey")&&Fn(""))}function Sn(e){Un&&Vn();if(s.onKeyEvent&&s.onKeyEvent(on,k(e)))return;var t=D(e,"keyCode"),n=D(e,"charCode");if(W&&t==bn){bn=null,L(e);return}if((W&&(!e.which||e.which<10)||V)&&gn(e))return;var r=String.fromCharCode(n==null?t:n);s.electricChars&&Nt.electricChars&&s.smartIndent&&!s.readOnly&&Nt.electricChars.indexOf(r)>-1&&setTimeout(pi(function(){Er(At.to.line,"smart")}),75);if(yn(e,r))return;Wn()}function xn(e){if(s.onKeyEvent&&s.onKeyEvent(on,k(e)))return;D(e,"keyCode")==16&&(Ot=null)}function Tn(){if(s.readOnly=="nocursor")return;Lt||(s.onFocus&&s.onFocus(on),Lt=!0,K.className.search(/\bCodeMirror-focused\b/)==-1&&(K.className+=" CodeMirror-focused"),zt||$n(!0)),zn(),ni()}function Nn(){Lt&&(s.onBlur&&s.onBlur(on),Lt=!1,Qt&&pi(function(){Qt&&(Qt(),Qt=null)})(),K.className=K.className.replace(" CodeMirror-focused","")),clearInterval(Tt),setTimeout(function(){Lt||(Ot=null)},150)}function Cn(e){return e>0&&e<1?1:e>-1&&e<0?-1:Math.round(e)}function kn(e){var t=0,n=0;if(e.type=="DOMMouseScroll"){var r=-e.detail*8;e.axis==e.HORIZONTAL_AXIS?t=r:e.axis==e.VERTICAL_AXIS&&(n=r)}else e.wheelDeltaX!==undefined&&e.wheelDeltaY!==undefined?(t=e.wheelDeltaX/3,n=e.wheelDeltaY/3):e.wheelDelta!==undefined&&(n=e.wheelDelta/3);var i=!1;t=Cn(t),n=Cn(n);if(t>0&&K.scrollLeft>0||t<0&&K.scrollLeft+K.clientWidth<K.scrollWidth)K.scrollLeft-=t,i=!0;if(n>0&&bt.scrollTop>0||n<0&&bt.scrollTop+bt.clientHeight<bt.scrollHeight)bt.scrollTop-=n,i=!0;i&&O(e)}function Ln(e,t,n,r,i){if(jt)return;if(tn){var o=[];Ct.iter(e.line,t.line+1,function(e){o.push(e.text)}),tn.addChange(e.line,n.length,o);while(tn.done.length>s.undoDepth)tn.done.shift()}_n(e,t,n,r,i)}function An(e,t){if(!e.length)return;var n=e.pop(),r=[];for(var i=n.length-1;i>=0;i-=1){var s=n[i],o=[],u=s.start+s.added;Ct.iter(s.start,u,function(e){o.push(e.text)}),r.push({start:s.start,added:s.old.length,old:o});var a={line:s.start+s.old.length-1,ch:ut(o[o.length-1],s.old[s.old.length-1])};_n({line:s.start,ch:0},{line:u-1,ch:un(u-1).text.length},s.old,a,a)}Ft=!0,t.push(r)}function On(){An(tn.done,tn.undone)}function Mn(){An(tn.undone,tn.done)}function _n(e,t,n,r,i){function T(e){return e<=Math.min(t.line,t.line+y)?e:e+y}if(jt)return;var o=!1,u=Gt.length;s.lineWrapping||Ct.iter(e.line,t.line+1,function(e){if(!e.hidden&&e.text.length==u)return o=!0,!0});if(e.line!=t.line||n.length>1)Wt=!0;var a=t.line-e.line,f=un(e.line),l=un(t.line);if(e.ch==0&&t.ch==0&&n[n.length-1]==""){var c=[],h=null;e.line?(h=un(e.line-1),h.fixMarkEnds(l)):l.fixMarkStarts();for(var p=0,d=n.length-1;p<d;++p)c.push(g.inheritMarks(n[p],h));a&&Ct.remove(e.line,a,Xt),c.length&&Ct.insert(e.line,c)}else if(f==l)if(n.length==1)f.replace(e.ch,t.ch,n[0]);else{l=f.split(t.ch,n[n.length-1]),f.replace(e.ch,null,n[0]),f.fixMarkEnds(l);var c=[];for(var p=1,d=n.length-1;p<d;++p)c.push(g.inheritMarks(n[p],f));c.push(l),Ct.insert(e.line+1,c)}else if(n.length==1)f.replace(e.ch,null,n[0]),l.replace(null,t.ch,""),f.append(l),Ct.remove(e.line+1,a,Xt);else{var c=[];f.replace(e.ch,null,n[0]),l.replace(null,t.ch,n[n.length-1]),f.fixMarkEnds(l);for(var p=1,d=n.length-1;p<d;++p)c.push(g.inheritMarks(n[p],f));a>1&&Ct.remove(e.line+1,a-1,Xt),Ct.insert(e.line+1,c)}if(s.lineWrapping){var v=Math.max(5,K.clientWidth/Gr()-3);Ct.iter(e.line,e.line+n.length,function(e){if(e.hidden)return;var t=Math.ceil(e.text.length/v)||1;t!=e.height&&an(e,t)})}else Ct.iter(e.line,e.line+n.length,function(e){var t=e.text;!e.hidden&&t.length>u&&(Gt=t,u=t.length,Zt=!0,o=!1)}),o&&(Yt=!0);var m=[],y=n.length-a-1;for(var p=0,b=kt.length;p<b;++p){var w=kt[p];w<e.line?m.push(w):w>t.line&&m.push(w+y)}var E=e.line+Math.min(n.length,500);ui(e.line,E),m.push(E),kt=m,fi(100),qt.push({from:e.line,to:t.line+1,diff:y});var S={from:e,to:t,text:n};if(Rt){for(var x=Rt;x.next;x=x.next);x.next=S}else Rt=S;ar(hr(r),hr(i),T(At.from.line),T(At.to.line))}function Dn(){var e=Ct.height*Jr()+2*Yr();return e-1>K.offsetHeight?e:!1}function Pn(e){var t=Dn();bt.style.display=t?"block":"none",t&&(wt.style.height=t+"px",bt.style.height=K.offsetHeight+"px",e!=null&&(bt.scrollTop=e)),Y.style.top=Vt*Jr()-bt.scrollTop+"px"}function Hn(){var e=document.createElement("div"),t=document.createElement("div");e.className="CodeMirror-scrollbar",e.style.cssText="position: absolute; left: -9999px; height: 100px;",t.className="CodeMirror-scrollbar-inner",t.style.height="200px",e.appendChild(t),document.body.appendChild(e);var n=e.offsetWidth<=1;return document.body.removeChild(e),n}function Bn(){var e=0;Gt="",Zt=!0,Ct.iter(0,Ct.size,function(t){var n=t.text;!t.hidden&&n.length>e&&(e=n.length,Gt=n)}),Yt=!1}function jn(e,t,n){function r(r){if(rt(r,t))return r;if(!rt(n,r))return i;var s=r.line+e.length-(n.line-t.line)-1,o=r.ch;return r.line==n.line&&(o+=e[e.length-1].length-(n.ch-(n.line==t.line?t.ch:0))),{line:s,ch:o}}t=hr(t),n?n=hr(n):n=t,e=lt(e);var i;return In(e,t,n,function(e){return i=e,{from:r(At.from),to:r(At.to)}}),i}function Fn(e,t){In(lt(e),At.from,At.to,function(e){return t=="end"?{from:e,to:e}:t=="start"?{from:At.from,to:At.from}:{from:At.from,to:e}})}function In(e,t,n,r){var i=e.length==1?e[0].length+t.ch:e[e.length-1].length,s=r({line:t.line+e.length-1,ch:i});Ln(t,n,e,s.from,s.to)}function qn(e,t,n){var r=e.line,i=t.line;if(r==i)return un(r).text.slice(e.ch,t.ch);var s=[un(r).text.slice(e.ch)];return Ct.iter(r+1,i,function(e){s.push(e.text)}),s.push(un(i).text.slice(0,t.ch)),s.join(n||"\n")}function Rn(e){return qn(At.from,At.to,e)}function zn(){if(Un)return;St.set(s.pollInterval,function(){li(),Vn(),Lt&&zn(),ci()})}function Wn(){function t(){li();var n=Vn();!n&&!e?(e=!0,St.set(60,t)):(Un=!1,zn()),ci()}var e=!1;Un=!0,St.set(20,t)}function Vn(){if(zt||!Lt||ct(X)||s.readOnly)return!1;var e=X.value;if(e==Xn)return!1;Ot=null;var t=0,n=Math.min(Xn.length,e.length);while(t<n&&Xn[t]==e[t])++t;return t<Xn.length?At.from={line:At.from.line,ch:At.from.ch-(Xn.length-t)}:Bt&&nt(At.from,At.to)&&(At.to={line:At.to.line,ch:Math.min(un(At.to.line).text.length,At.to.ch+(e.length-t))}),Fn(e.slice(t),"end"),e.length>1e3?X.value=Xn="":Xn=e,!0}function $n(e){nt(At.from,At.to)?e&&(Xn=X.value=""):(Xn="",X.value=Rn(),tt(X))}function Jn(){s.readOnly!="nocursor"&&X.focus()}function Kn(){var e=vt.getBoundingClientRect();if(F&&e.top==e.bottom)return;var t=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(e.top<0||e.bottom>t)&&Qn()}function Qn(){var e=Gn();return Yn(e.x,e.y,e.x,e.yBot)}function Gn(){var e=Ur(At.inverted?At.from:At.to),t=s.lineWrapping?Math.min(e.x,pt.offsetWidth):e.x;return{x:t,y:e.y,yBot:e.yBot}}function Yn(e,t,n,r){var i=Zn(e,t,n,r),o=!1;i.scrollLeft!=null&&(K.scrollLeft=i.scrollLeft,o=!0),i.scrollTop!=null&&(bt.scrollTop=i.scrollTop,o=!0),o&&s.onScroll&&s.onScroll(on)}function Zn(e,t,n,r){var i=Zr(),o=Yr();t+=o,r+=o,e+=i,n+=i;var u=K.clientHeight,a=bt.scrollTop,f={},l=K.scrollHeight,c=t<o+10,h=r+o>l-10;t<a?f.scrollTop=c?0:Math.max(0,t):r>a+u&&(f.scrollTop=(h?l:r)-u);var p=K.clientWidth,d=K.scrollLeft,v=s.fixedGutter?st.clientWidth:0,m=e<v+i+10;return e<d+v||m?(m&&(e=0),f.scrollLeft=Math.max(0,e-10-v)):n>p+d-3&&(f.scrollLeft=n+10-p),f}function er(e){var t=Jr(),n=(e!=null?e:bt.scrollTop)-Yr(),r=Math.max(0,Math.floor(n/t)),i=Math.ceil((n+K.clientHeight)/t);return{from:x(Ct,r),to:x(Ct,i)}}function tr(e,t,n){function d(){var e=yt.firstChild,t=!1;return Ct.iter($t,Jt,function(n){if(!n.hidden){var r=Math.round(e.offsetHeight/c)||1;n.height!=r&&(an(n,r),Wt=t=!0)}e=e.nextSibling}),t}if(!K.clientWidth){$t=Jt=Vt=0;return}var r=er(n);if(e!==!0&&e.length==0&&r.from>$t&&r.to<Jt){Pn(n);return}var i=Math.max(r.from-100,0),o=Math.min(Ct.size,r.to+100);$t<i&&i-$t<20&&(i=$t),Jt>o&&Jt-o<20&&(o=Math.min(Ct.size,Jt));var u=e===!0?[]:nr([{from:$t,to:Jt,domStart:0}],e),a=0;for(var f=0;f<u.length;++f){var l=u[f];l.from<i&&(l.domStart+=i-l.from,l.from=i),l.to>o&&(l.to=o),l.from>=l.to?u.splice(f--,1):a+=l.to-l.from}if(a==o-i&&i==$t&&o==Jt){Pn(n);return}u.sort(function(e,t){return e.domStart-t.domStart});var c=Jr(),h=st.style.display;yt.style.display="none",rr(i,o,u),yt.style.display=st.style.display="";var p=i!=$t||o!=Jt||Kt!=K.clientHeight+c;p&&(Kt=K.clientHeight+c),$t=i,Jt=o,Vt=T(Ct,i);if(yt.childNodes.length!=Jt-$t)throw new Error("BAD PATCH! "+JSON.stringify(u)+" size="+(Jt-$t)+" nodes="+yt.childNodes.length);if(s.lineWrapping){d();var v=Dn(),m=v?"block":"none";bt.style.display!=m&&(bt.style.display=m,v&&(wt.style.height=v+"px"),d())}return st.style.display=h,(p||Wt)&&ir()&&s.lineWrapping&&d()&&ir(),Pn(n),sr(),!t&&s.onUpdate&&s.onUpdate(on),!0}function nr(e,t){for(var n=0,r=t.length||0;n<r;++n){var i=t[n],s=[],o=i.diff||0;for(var u=0,a=e.length;u<a;++u){var f=e[u];i.to<=f.from&&i.diff?s.push({from:f.from+o,to:f.to+o,domStart:f.domStart}):i.to<=f.from||i.from>=f.to?s.push(f):(i.from>f.from&&s.push({from:f.from,to:i.from,domStart:f.domStart}),i.to<f.to&&s.push({from:i.to+o,to:f.to+o,domStart:f.domStart+(i.to-f.from)}))}e=s}return e}function rr(e,t,n){if(!n.length)yt.innerHTML="";else{function r(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var i=0,s=yt.firstChild,o;for(var u=0;u<n.length;++u){var a=n[u];while(a.domStart>i)s=r(s),i++;for(var f=0,l=a.to-a.from;f<l;++f)s=s.nextSibling,i++}while(s)s=r(s)}var c=n.shift(),s=yt.firstChild,f=e,h=document.createElement("div");Ct.iter(e,t,function(e){c&&c.to==f&&(c=n.shift());if(!c||c.from>f){if(e.hidden)var t=h.innerHTML="<pre></pre>";else{var t="<pre"+(e.className?' class="'+e.className+'"':"")+">"+e.getHTML(Nr)+"</pre>";e.bgClassName&&(t='<div style="position: relative"><pre class="'+e.bgClassName+'" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2">&#160;</pre>'+t+"</div>")}h.innerHTML=t,yt.insertBefore(h.firstChild,s)}else s=s.nextSibling;++f})}function ir(){if(!s.gutter&&!s.lineNumbers)return;var e=Y.offsetHeight,t=K.clientHeight;st.style.height=(e-t<2?t:e)+"px";var n=[],r=$t,i;Ct.iter($t,Math.max(Jt,$t+1),function(e){if(e.hidden)n.push("<pre></pre>");else{var t=e.gutterMarker,o=s.lineNumbers?s.lineNumberFormatter(r+s.firstLineNumber):null;t&&t.text?o=t.text.replace("%N%",o!=null?o:""):o==null&&(o="\u00a0"),n.push(t&&t.style?'<pre class="'+t.style+'">':"<pre>",o);for(var u=1;u<e.height;++u)n.push("<br/>&#160;");n.push("</pre>"),t||(i=r)}++r}),st.style.display="none",ot.innerHTML=n.join("");if(i!=null&&s.lineNumbers){var o=ot.childNodes[i-$t],u=String(Ct.size).length,a=et(o.firstChild),f="";while(a.length+f.length<u)f+="\u00a0";f&&o.insertBefore(document.createTextNode(f),o.firstChild)}st.style.display="";var l=Math.abs((parseInt(pt.style.marginLeft)||0)-st.offsetWidth)>2;return pt.style.marginLeft=st.offsetWidth+"px",Wt=!1,l}function sr(){var e=nt(At.from,At.to),t=Ur(At.from,!0),n=e?t:Ur(At.to,!0),r=At.inverted?t:n,i=Jr(),o=Z(C),u=Z(yt);A.style.top=Math.max(0,Math.min(K.offsetHeight,r.y+u.top-o.top))+"px",A.style.left=Math.max(0,Math.min(K.offsetWidth,r.x+u.left-o.left))+"px";if(e)vt.style.top=r.y+"px",vt.style.left=(s.lineWrapping?Math.min(r.x,pt.offsetWidth):r.x)+"px",vt.style.display="",gt.style.display="none";else{var a=t.y==n.y,f="",l=pt.clientWidth||pt.offsetWidth,c=pt.clientHeight||pt.offsetHeight;function h(e,t,n,r){var i=R?"width: "+(n?l-n-e:l)+"px":"right: "+n+"px";f+='<div class="CodeMirror-selected" style="position: absolute; left: '+e+"px; top: "+t+"px; "+i+"; height: "+r+'px"></div>'}if(At.from.ch&&t.y>=0){var p=a?l-n.x:0;h(t.x,t.y,p,i)}var d=Math.max(0,t.y+(At.from.ch?i:0)),v=Math.min(n.y,c)-d;v>.2*i&&h(0,d,0,v),(!a||!At.from.ch)&&n.y<c-.5*i&&h(0,n.y,l-n.x,i),gt.innerHTML=f,vt.style.display="none",gt.style.display=""}}function or(e){e?Ot=Ot||(At.inverted?At.to:At.from):Ot=null}function ur(e,t){var n=Ot&&hr(Ot);n&&(rt(n,e)?e=n:rt(t,n)&&(t=n)),ar(e,t),It=!0}function ar(e,t,n,r){mr=null,n==null&&(n=At.from.line,r=At.to.line);if(nt(At.from,e)&&nt(At.to,t))return;if(rt(t,e)){var i=t;t=e,e=i}if(e.line!=n){var o=fr(e,n,At.from.ch);o?e=o:Br(e.line,!1)}t.line!=r&&(t=fr(t,r,At.to.ch)),nt(e,t)?At.inverted=!1:nt(e,At.to)?At.inverted=!1:nt(t,At.from)&&(At.inverted=!0);if(s.autoClearEmptyLines&&nt(At.from,At.to)){var u=At.inverted?e:t;if(u.line!=At.from.line&&At.from.line<Ct.size){var a=un(At.from.line);/^\s+$/.test(a.text)&&setTimeout(pi(function(){if(a.parent&&/^\s+$/.test(a.text)){var e=S(a);jn("",{line:e,ch:0},{line:e,ch:a.text.length})}},10))}}At.from=e,At.to=t,Ut=!0}function fr(e,t,n){function r(t){var r=e.line+t,i=t==1?Ct.size:-1;while(r!=i){var o=un(r);if(!o.hidden){var u=e.ch;if(s||u>n||u>o.text.length)u=o.text.length;return{line:r,ch:u}}r+=t}}var i=un(e.line),s=e.ch==i.text.length&&e.ch!=n;return i.hidden?e.line>=t?r(1)||r(-1):r(-1)||r(1):e}function lr(e,t,n){var r=hr({line:e,ch:t||0});(n?ur:ar)(r,r)}function cr(e){return Math.max(0,Math.min(e,Ct.size-1))}function hr(e){if(e.line<0)return{line:0,ch:0};if(e.line>=Ct.size)return{line:Ct.size-1,ch:un(Ct.size-1).text.length};var t=e.ch,n=un(e.line).text.length;return t==null||t>n?{line:e.line,ch:n}:t<0?{line:e.line,ch:0}:e}function pr(e,t){function o(){for(var t=r+e,n=e<0?-1:Ct.size;t!=n;t+=e){var i=un(t);if(!i.hidden)return r=t,s=i,!0}}function u(t){if(i==(e<0?0:s.text.length)){if(!!t||!o())return!1;i=e<0?s.text.length:0}else i+=e;return!0}var n=At.inverted?At.from:At.to,r=n.line,i=n.ch,s=un(r);if(t=="char")u();else if(t=="column")u(!0);else if(t=="word"){var a=!1;for(;;){if(e<0&&!u())break;if(ft(s.text.charAt(i)))a=!0;else if(a){e<0&&(e=1,u());break}if(e>0&&!u())break}}return{line:r,ch:i}}function dr(e,t){var n=e<0?At.from:At.to;if(Ot||nt(At.from,At.to))n=pr(e,t);lr(n.line,n.ch,!0)}function vr(e,t){nt(At.from,At.to)?e<0?jn("",pr(e,t),At.to):jn("",At.from,pr(e,t)):jn("",At.from,At.to),It=!0}function gr(e,t){var n=0,r=Ur(At.inverted?At.from:At.to,!0);mr!=null&&(r.x=mr),t=="page"?n=Math.min(K.clientHeight,window.innerHeight||document.documentElement.clientHeight):t=="line"&&(n=Jr());var i=zr(r.x,r.y+n*e+2);t=="page"&&(bt.scrollTop+=Ur(i,!0).y-r.y),lr(i.line,i.ch,!0),mr=r.x}function yr(e){var t=un(e.line).text,n=e.ch,r=e.ch,i=ft(t.charAt(n<t.length?n:n-1))?ft:function(e){return!ft(e)};while(n>0&&i(t.charAt(n-1)))--n;while(r<t.length&&i(t.charAt(r)))++r;return{from:{line:e.line,ch:n},to:{line:e.line,ch:r}}}function br(e){ur({line:e,ch:0},hr({line:e+1,ch:0}))}function wr(e){if(nt(At.from,At.to))return Er(At.from.line,e);var t=At.to.line-(At.to.ch?0:1);for(var n=At.from.line;n<=t;++n)Er(n,e)}function Er(e,t){t||(t="add");if(t=="smart")if(!Nt.indent)t="prev";else var n=oi(e);var r=un(e),i=r.indentation(s.tabSize),o=r.text.match(/^\s*/)[0],u;t=="smart"&&(u=Nt.indent(n,r.text.slice(o.length),r.text),u==B&&(t="prev")),t=="prev"?e?u=un(e-1).indentation(s.tabSize):u=0:t=="add"?u=i+s.indentUnit:t=="subtract"&&(u=i-s.indentUnit),u=Math.max(0,u);var a=u-i,f="",l=0;if(s.indentWithTabs)for(var c=Math.floor(u/s.tabSize);c;--c)l+=s.tabSize,f+="	";while(l<u)++l,f+=" ";jn(f,{line:e,ch:0},{line:e,ch:o.length})}function Sr(){Nt=e.getMode(s,s.mode),Ct.iter(0,Ct.size,function(e){e.stateAfter=null}),kt=[0],fi()}function xr(){var e=s.gutter||s.lineNumbers;st.style.display=e?"":"none",e?Wt=!0:yt.parentNode.style.marginLeft=0}function Tr(e,t){if(s.lineWrapping){C.className+=" CodeMirror-wrap";var n=K.clientWidth/Gr()-3;Ct.iter(0,Ct.size,function(e){if(e.hidden)return;var t=Math.ceil(e.text.length/n)||1;t!=1&&an(e,t)}),pt.style.width=G.style.width="",mt.style.left=""}else C.className=C.className.replace(" CodeMirror-wrap",""),Gt="",Zt=!0,Ct.iter(0,Ct.size,function(e){e.height!=1&&!e.hidden&&an(e,1),e.text.length>Gt.length&&(Gt=e.text)});qt.push({from:0,to:Ct.size})}function Nr(e){var t=s.tabSize-e%s.tabSize,n=en[t];if(n)return n;for(var r='<span class="cm-tab">',i=0;i<t;++i)r+=" ";return en[t]={html:r+"</span>",width:t}}function Cr(){K.className=K.className.replace(/\s*cm-s-\S+/g,"")+s.theme.replace(/(^|\s)\s*/g," cm-s-")}function kr(){var e=a[s.keyMap].style;C.className=C.className.replace(/\s*cm-keymap-\S+/g,"")+(e?" cm-keymap-"+e:"")}function Lr(){this.set=[]}function Ar(e,t,n){function i(e,t,n,i){un(e).addMark(new v(t,n,i,r))}e=hr(e),t=hr(t);var r=new Lr;if(!rt(e,t))return r;if(e.line==t.line)i(e.line,e.ch,t.ch,n);else{i(e.line,e.ch,null,n);for(var s=e.line+1,o=t.line;s<o;++s)i(s,null,null,n);i(t.line,null,t.ch,n)}return qt.push({from:e.line,to:t.line+1}),r}function Or(e){e=hr(e);var t=new m(e.ch);return un(e.line).addMark(t),t}function Mr(e){e=hr(e);var t=[],n=un(e.line).marked;if(!n)return t;for(var r=0,i=n.length;r<i;++r){var s=n[r];(s.from==null||s.from<=e.ch)&&(s.to==null||s.to>=e.ch)&&t.push(s.marker||s)}return t}function _r(e,t,n){return typeof e=="number"&&(e=un(cr(e))),e.gutterMarker={text:t,style:n},Wt=!0,e}function Dr(e){typeof e=="number"&&(e=un(cr(e))),e.gutterMarker=null,Wt=!0}function Pr(e,t){var n=e,r=e;return typeof e=="number"?r=un(cr(e)):n=S(e),n==null?null:t(r,n)?(qt.push({from:n,to:n+1}),r):null}function Hr(e,t,n){return Pr(e,function(e){if(e.className!=t||e.bgClassName!=n)return e.className=t,e.bgClassName=n,!0})}function Br(e,t){return Pr(e,function(e,n){if(e.hidden!=t){e.hidden=t;if(!s.lineWrapping){var r=e.text;t&&r.length==Gt.length?Yt=!0:!t&&r.length>Gt.length&&(Gt=r,Yt=!1)}an(e,t?0:1);var i=At.from.line,o=At.to.line;if(t&&(i==n||o==n)){var u=i==n?fr({line:i,ch:0},i,0):At.from,a=o==n?fr({line:o,ch:0},o,0):At.to;if(!a)return;ar(u,a)}return Wt=!0}})}function jr(e){if(typeof e=="number"){if(!sn(e))return null;var t=e;e=un(e);if(!e)return null}else{var t=S(e);if(t==null)return null}var n=e.gutterMarker;return{line:t,handle:e,text:e.text,markerText:n&&n.text,markerClass:n&&n.style,lineClass:e.className,bgClass:e.bgClassName}}function Fr(e){return dt.innerHTML="<pre><span>x</span></pre>",dt.firstChild.firstChild.firstChild.nodeValue=e,dt.firstChild.firstChild.offsetWidth||10}function Ir(e,t){function i(e){return Rr(n,e).left}if(t<=0)return 0;var n=un(e),r=n.text,s=0,o=0,u=r.length,a,f=Math.min(u,Math.ceil(t/Gr()));for(;;){var l=i(f);if(!(l<=t&&f<u)){a=l,u=f;break}f=Math.min(u,Math.ceil(f*1.2))}if(t>a)return u;f=Math.floor(u*.8),l=i(f),l<t&&(s=f,o=l);for(;;){if(u-s<=1)return a-t>t-o?s:u;var c=Math.ceil((s+u)/2),h=i(c);h>t?(u=c,a=h):(s=c,o=h)}}function Rr(e,t){if(t==0)return{top:0,left:0};var n=s.lineWrapping&&t<e.text.length&&Q.test(e.text.slice(t-1,t+1));dt.innerHTML="<pre>"+e.getHTML(Nr,t,qr,n)+"</pre>";var r=document.getElementById(qr),i=r.offsetTop,o=r.offsetLeft;if(F&&i==0&&o==0){var u=document.createElement("span");u.innerHTML="x",r.parentNode.insertBefore(u,r.nextSibling),i=u.offsetTop}return{top:i,left:o}}function Ur(e,t){var n,r=Jr(),i=r*(T(Ct,e.line)-(t?Vt:0));if(e.ch==0)n=0;else{var o=Rr(un(e.line),e.ch);n=o.left,s.lineWrapping&&(i+=Math.max(0,o.top))}return{x:n,y:i,yBot:i+r}}function zr(e,t){function c(e){var t=Rr(u,e);if(f){var r=Math.round(t.top/n);return Math.max(0,t.left+(r-l)*K.clientWidth)}return t.left}t<0&&(t=0);var n=Jr(),r=Gr(),i=Vt+Math.floor(t/n),o=x(Ct,i);if(o>=Ct.size)return{line:Ct.size-1,ch:un(Ct.size-1).text.length};var u=un(o),a=u.text,f=s.lineWrapping,l=f?i-T(Ct,o):0;if(e<=0&&l==0)return{line:o,ch:0};var h=0,p=0,d=a.length,v,m=Math.min(d,Math.ceil((e+l*K.clientWidth*.9)/r));for(;;){var g=c(m);if(!(g<=e&&m<d)){v=g,d=m;break}m=Math.min(d,Math.ceil(m*1.2))}if(e>v)return{line:o,ch:d};m=Math.floor(d*.8),g=c(m),g<e&&(h=m,p=g);for(;;){if(d-h<=1)return{line:o,ch:v-e>e-p?h:d};var y=Math.ceil((h+d)/2),b=c(y);b>e?(d=y,v=b):(h=y,p=b)}}function Wr(e){var t=Ur(e,!0),n=Z(pt);return{x:n.left+t.x,y:n.top+t.y,yBot:n.top+t.yBot}}function Jr(){if($r==null){$r="<pre>";for(var e=0;e<49;++e)$r+="x<br/>";$r+="x</pre>"}var t=yt.clientHeight;return t==Vr?Xr:(Vr=t,dt.innerHTML=$r,Xr=dt.firstChild.offsetHeight/50||1,dt.innerHTML="",Xr)}function Gr(){return K.clientWidth==Qr?Kr:(Qr=K.clientWidth,Kr=Fr("x"))}function Yr(){return pt.offsetTop}function Zr(){return pt.offsetLeft}function ei(e,t){var n=Z(K,!0),r,i;try{r=e.clientX,i=e.clientY}catch(e){return null}if(!t&&(r-n.left>K.clientWidth||i-n.top>K.clientHeight))return null;var s=Z(pt,!0);return zr(r-s.left,i-s.top)}function ti(e){function o(){var e=lt(X.value).join("\n");e!=i&&!s.readOnly&&pi(Fn)(e,"end"),A.style.position="relative",X.style.cssText=r,q&&(bt.scrollTop=n),zt=!1,$n(!0),zn()}var t=ei(e),n=bt.scrollTop;if(!t||W)return;(nt(At.from,At.to)||rt(t,At.from)||!rt(t,At.to))&&pi(lr)(t.line,t.ch);var r=X.style.cssText;A.style.position="absolute",X.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: white; "+"border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",zt=!0;var i=X.value=Rn();Jn(),tt(X);if(j){O(e);var u=P(window,"mouseup",function(){u(),setTimeout(o,20)},!0)}else setTimeout(o,50)}function ni(){clearInterval(Tt);var e=!0;vt.style.visibility="",Tt=setInterval(function(){vt.style.visibility=(e=!e)?"":"hidden"},650)}function ii(e){function v(e,t,n){if(!e.text)return;var r=e.styles,i=o?0:e.text.length-1,s;for(var a=o?0:r.length-2,f=o?r.length:-2;a!=f;a+=2*u){var l=r[a];if(r[a+1]!=h){i+=u*l.length;continue}for(var c=o?0:l.length-1,v=o?l.length:-1;c!=v;c+=u,i+=u)if(i>=t&&i<n&&d.test(s=l.charAt(c))){var m=ri[s];if(m.charAt(1)==">"==o)p.push(s);else{if(p.pop()!=m.charAt(0))return{pos:i,match:!1};if(!p.length)return{pos:i,match:!0}}}}}var t=At.inverted?At.from:At.to,n=un(t.line),r=t.ch-1,i=r>=0&&ri[n.text.charAt(r)]||ri[n.text.charAt(++r)];if(!i)return;var s=i.charAt(0),o=i.charAt(1)==">",u=o?1:-1,a=n.styles;for(var f=r+1,l=0,c=a.length;l<c;l+=2)if((f-=a[l].length)<=0){var h=a[l+1];break}var p=[n.text.charAt(r)],d=/[(){}[\]]/;for(var l=t.line,c=o?Math.min(l+100,Ct.size):Math.max(-1,l-100);l!=c;l+=u){var n=un(l),m=l==t.line,g=v(n,m&&o?r+1:0,m&&!o?r:n.text.length);if(g)break}g||(g={pos:null,match:!1});var h=g.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",y=Ar({line:t.line,ch:r},{line:t.line,ch:r+1},h),b=g.pos!=null&&Ar({line:l,ch:g.pos},{line:l,ch:g.pos+1},h),w=pi(function(){y.clear(),b&&b.clear()});e?setTimeout(w,800):Qt=w}function si(e){var t,n;for(var r=e,i=e-40;r>i;--r){if(r==0)return 0;var o=un(r-1);if(o.stateAfter)return r;var u=o.indentation(s.tabSize);if(n==null||t>u)n=r-1,t=u}return n}function oi(e){var t=si(e),n=t&&un(t-1).stateAfter;return n?n=h(Nt,n):n=p(Nt),Ct.iter(t,e,function(e){e.highlight(Nt,n,s.tabSize),e.stateAfter=h(Nt,n)}),t<e&&qt.push({from:t,to:e}),e<Ct.size&&!un(e).stateAfter&&kt.push(e),n}function ui(e,t){var n=oi(e);Ct.iter(e,t,function(e){e.highlight(Nt,n,s.tabSize),e.stateAfter=h(Nt,n)})}function ai(){var e=+(new Date)+s.workTime,t=kt.length;while(kt.length){if(!un($t).stateAfter)var n=$t;else var n=kt.pop();if(n>=Ct.size)continue;var r=si(n),i=r&&un(r-1).stateAfter;i?i=h(Nt,i):i=p(Nt);var o=0,u=Nt.compareStates,a=!1,f=r,l=!1;Ct.iter(f,Ct.size,function(t){var r=t.stateAfter;if(+(new Date)>e)return kt.push(f),fi(s.workDelay),a&&qt.push({from:n,to:f+1}),l=!0;var c=t.highlight(Nt,i,s.tabSize);c&&(a=!0),t.stateAfter=h(Nt,i);var p=null;if(u){var d=r&&u(r,i);d!=B&&(p=!!d)}p==null&&(c!==!1||!r?o=0:++o>3&&(!Nt.indent||Nt.indent(r,"")==Nt.indent(i,""))&&(p=!0));if(p)return!0;++f});if(l)return;a&&qt.push({from:n,to:f+1})}t&&s.onHighlightComplete&&s.onHighlightComplete(on)}function fi(e){if(!kt.length)return;xt.set(e,pi(ai))}function li(){Ft=It=Rt=null,qt=[],Ut=!1,Xt=[]}function ci(){Yt&&Bn();if(Zt&&!s.lineWrapping){var e=mt.offsetWidth,t=Fr(Gt);mt.style.left=t+"px",pt.style.minWidth=t+e+"px",Zt=!1}var n,r;if(Ut){var i=Gn();n=Zn(i.x,i.y,i.x,i.yBot)}qt.length?r=tr(qt,!0,n?n.scrollTop:null):(Ut&&sr(),Wt&&ir()),n&&Qn(),Ut&&(Kn(),ni()),Lt&&!zt&&(Ft===!0||Ft!==!1&&Ut)&&$n(It),Ut&&s.matchBrackets&&setTimeout(pi(function(){Qt&&(Qt(),Qt=null),nt(At.from,At.to)&&ii(!1)}),20);var o=Ut,u=Xt;Rt&&s.onChange&&on&&s.onChange(on,Rt),o&&s.onCursorActivity&&s.onCursorActivity(on);for(var a=0;a<u.length;++a)u[a](on);r&&s.onUpdate&&s.onUpdate(on)}function pi(e){return function(){hi++||li();try{var t=e.apply(this,arguments)}finally{--hi||ci()}return t}}function di(e){tn.startCompound();try{return e()}finally{tn.endCompound()}}var s={},d=e.defaults;for(var y in d)d.hasOwnProperty(y)&&(s[y]=(i&&i.hasOwnProperty(y)?i:d)[y]);var C=document.createElement("div");C.className="CodeMirror"+(s.lineWrapping?" CodeMirror-wrap":""),C.innerHTML='<div style="overflow: hidden; position: relative; width: 3px; height: 0px;"><textarea style="position: absolute; padding: 0; width: 1px; height: 1em" wrap="off" autocorrect="off" autocapitalize="off"></textarea></div><div class="CodeMirror-scrollbar"><div class="CodeMirror-scrollbar-inner"></div></div><div class="CodeMirror-scroll" tabindex="-1"><div style="position: relative"><div style="position: relative"><div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div><div class="CodeMirror-lines"><div style="position: relative; z-index: 0"><div style="position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden;"></div><pre class="CodeMirror-cursor">&#160;</pre><pre class="CodeMirror-cursor" style="visibility: hidden">&#160;</pre><div style="position: relative; z-index: -1"></div><div></div></div></div></div></div></div>',r.appendChild?r.appendChild(C):r(C);var A=C.firstChild,X=A.firstChild,K=C.lastChild,G=K.firstChild,Y=G.firstChild,st=Y.firstChild,ot=st.firstChild,pt=st.nextSibling.firstChild,dt=pt.firstChild,vt=dt.nextSibling,mt=vt.nextSibling,gt=mt.nextSibling,yt=gt.nextSibling,bt=A.nextSibling,wt=bt.firstChild;Cr(),kr(),t&&(X.style.width="0px"),U||(K.draggable=!0),pt.style.outline="none",s.tabindex!=null&&(X.tabIndex=s.tabindex),s.autofocus&&Jn(),!s.gutter&&!s.lineNumbers&&(st.style.display="none"),V&&(A.style.height="1px",A.style.position="absolute"),$?bt.className+=Hn()?" cm-sb-overlap":" cm-sb-nonoverlap":I&&(bt.className+=" cm-sb-ie7");try{Fr("x")}catch(Et){throw Et.message.match(/runtime/i)&&(Et=new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)")),Et}var St=new H,xt=new H,Tt,Nt,Ct=new w([new b([new g("")])]),kt,Lt;Sr();var At={from:{line:0,ch:0},to:{line:0,ch:0},inverted:!1},Ot,Mt,_t,Dt=0,Pt=0,Ht,Bt=!1,jt=!1,Ft,It,qt,Rt,Ut,zt,Wt,Xt,Vt=0,$t=0,Jt=0,Kt=0,Qt,Gt="",Yt=!1,Zt=!0,en={};pi(function(){fn(s.value||""),Ft=!1})();var tn=new N;P(K,"mousedown",pi(hn)),P(K,"dblclick",pi(pn)),P(pt,"selectstart",L),j||P(K,"contextmenu",ti),P(K,"scroll",cn),P(bt,"scroll",cn),P(bt,"mousedown",function(){Lt&&setTimeout(Jn,0)}),P(K,"mousewheel",kn),P(K,"DOMMouseScroll",kn),P(window,"resize",function(){tr(!0)}),P(X,"keyup",pi(xn)),P(X,"input",Wn),P(X,"keydown",pi(En)),P(X,"keypress",pi(Sn)),P(X,"focus",Tn),P(X,"blur",Nn);if(s.dragDrop){P(K,"dragstart",vn);function nn(e){if(s.onDragEvent&&s.onDragEvent(on,k(e)))return;O(e)}P(K,"dragenter",nn),P(K,"dragover",nn),P(K,"drop",pi(dn))}P(K,"paste",function(){Jn(),Wn()}),P(X,"paste",Wn),P(X,"cut",pi(function(){s.readOnly||Fn("")})),V&&P(G,"mouseup",function(){document.activeElement==X&&X.blur(),Jn()});var rn;try{rn=document.activeElement==X}catch(Et){}rn||s.autofocus?setTimeout(Tn,20):Nn();var on=C.CodeMirror={getValue:ln,setValue:pi(fn),getSelection:Rn,replaceSelection:pi(Fn),focus:function(){window.focus(),Jn(),Tn(),Wn()},setOption:function(e,t){var n=s[e];s[e]=t,e=="mode"||e=="indentUnit"?Sr():e=="readOnly"&&t=="nocursor"?(Nn(),X.blur()):e=="readOnly"&&!t?$n(!0):e=="theme"?Cr():e=="lineWrapping"&&n!=t?pi(Tr)():e=="tabSize"?tr(!0):e=="keyMap"&&kr();if(e=="lineNumbers"||e=="gutter"||e=="firstLineNumber"||e=="theme")xr(),tr(!0)},getOption:function(e){return s[e]},undo:pi(On),redo:pi(Mn),indentLine:pi(function(e,t){typeof t!="string"&&(t==null?t=s.smartIndent?"smart":"prev":t=t?"add":"subtract"),sn(e)&&Er(e,t)}),indentSelection:pi(wr),historySize:function(){return{undo:tn.done.length,redo:tn.undone.length}},clearHistory:function(){tn=new N},setHistory:function(e){tn=new N,tn.done=e.done,tn.undone=e.undone},getHistory:function(){return tn.time=0,{done:tn.done.concat([]),undone:tn.undone.concat([])}},matchBrackets:pi(function(){ii(!0)}),getTokenAt:pi(function(e){return e=hr(e),un(e.line).getTokenAt(Nt,oi(e.line),e.ch)}),getStateAfter:function(e){return e=cr(e==null?Ct.size-1:e),oi(e+1)},cursorCoords:function(e,t){return e==null&&(e=At.inverted),this.charCoords(e?At.from:At.to,t)},charCoords:function(e,t){return e=hr(e),t=="local"?Ur(e,!1):t=="div"?Ur(e,!0):Wr(e)},coordsChar:function(e){var t=Z(pt);return zr(e.x-t.left,e.y-t.top)},markText:pi(Ar),setBookmark:Or,findMarksAt:Mr,setMarker:pi(_r),clearMarker:pi(Dr),setLineClass:pi(Hr),hideLine:pi(function(e){return Br(e,!0)}),showLine:pi(function(e){return Br(e,!1)}),onDeleteLine:function(e,t){if(typeof e=="number"){if(!sn(e))return null;e=un(e)}return(e.handlers||(e.handlers=[])).push(t),e},lineInfo:jr,addWidget:function(e,t,n,r,i){e=Ur(hr(e));var s=e.yBot,o=e.x;t.style.position="absolute",G.appendChild(t);if(r=="over")s=e.y;else if(r=="near"){var u=Math.max(K.offsetHeight,Ct.height*Jr()),a=Math.max(G.clientWidth,pt.clientWidth)-Zr();e.yBot+t.offsetHeight>u&&e.y>t.offsetHeight&&(s=e.y-t.offsetHeight),o+t.offsetWidth>a&&(o=a-t.offsetWidth)}t.style.top=s+Yr()+"px",t.style.left=t.style.right="",i=="right"?(o=G.clientWidth-t.offsetWidth,t.style.right="0px"):(i=="left"?o=0:i=="middle"&&(o=(G.clientWidth-t.offsetWidth)/2),t.style.left=o+Zr()+"px"),n&&Yn(o,s,o+t.offsetWidth,s+t.offsetHeight)},lineCount:function(){return Ct.size},clipPos:hr,getCursor:function(e){return e==null&&(e=At.inverted),it(e?At.from:At.to)},somethingSelected:function(){return!nt(At.from,At.to)},setCursor:pi(function(e,t,n){t==null&&typeof e.line=="number"?lr(e.line,e.ch,n):lr(e,t,n)}),setSelection:pi(function(e,t,n){(n?ur:ar)(hr(e),hr(t||e))}),getLine:function(e){if(sn(e))return un(e).text},getLineHandle:function(e){if(sn(e))return un(e)},setLine:pi(function(e,t){sn(e)&&jn(t,{line:e,ch:0},{line:e,ch:un(e).text.length})}),removeLine:pi(function(e){sn(e)&&jn("",{line:e,ch:0},hr({line:e+1,ch:0}))}),replaceRange:pi(jn),getRange:function(e,t,n){return qn(hr(e),hr(t),n)},triggerOnKeyDown:pi(En),execCommand:function(e){return u[e](on)},moveH:pi(dr),deleteH:pi(vr),moveV:pi(gr),toggleOverwrite:function(){Bt?(Bt=!1,vt.className=vt.className.replace(" CodeMirror-overwrite","")):(Bt=!0,vt.className+=" CodeMirror-overwrite")},posFromIndex:function(e){var t=0,n;return Ct.iter(0,Ct.size,function(r){var i=r.text.length+1;if(i>e)return n=e,!0;e-=i,++t}),hr({line:t,ch:n})},indexFromPos:function(e){if(e.line<0||e.ch<0)return 0;var t=e.ch;return Ct.iter(0,e.line,function(e){t+=e.text.length+1}),t},scrollTo:function(e,t){e!=null&&(K.scrollLeft=e),t!=null&&(bt.scrollTop=t),tr([])},getScrollInfo:function(){return{x:K.scrollLeft,y:bt.scrollTop,height:bt.scrollHeight,width:K.scrollWidth}},setSize:function(e,t){function n(e){return e=String(e),/^\d+$/.test(e)?e+"px":e}e!=null&&(C.style.width=n(e)),t!=null&&(K.style.height=n(t))},operation:function(e){return pi(e)()},compoundChange:function(e){return di(e)},refresh:function(){tr(!0,null,Dt),bt.scrollHeight>Dt&&(bt.scrollTop=Dt)},getInputField:function(){return X},getWrapperElement:function(){return C},getScrollerElement:function(){return K},getGutterElement:function(){return st}},bn=null,wn,Un=!1,Xn="",mr=null;Lr.prototype.clear=pi(function(){var e=Infinity,t=-Infinity;for(var n=0,r=this.set.length;n<r;++n){var i=this.set[n],s=i.marked;if(!s||!i.parent)continue;var o=S(i);e=Math.min(e,o),t=Math.max(t,o);for(var u=0;u<s.length;++u)s[u].marker==this&&s.splice(u--,1)}e!=Infinity&&qt.push({from:e,to:t+1})}),Lr.prototype.find=function(){var e,t;for(var n=0,r=this.set.length;n<r;++n){var i=this.set[n],s=i.marked;for(var o=0;o<s.length;++o){var u=s[o];if(u.marker==this)if(u.from!=null||u.to!=null){var a=S(i);a!=null&&(u.from!=null&&(e={line:a,ch:u.from}),u.to!=null&&(t={line:a,ch:u.to}))}}}return{from:e,to:t}};var qr="CodeMirror-temp-"+Math.floor(Math.random()*16777215).toString(16),Xr,Vr,$r,Kr,Qr=0,ri={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},hi=0;for(var vi in o)o.propertyIsEnumerable(vi)&&!on.propertyIsEnumerable(vi)&&(on[vi]=o[vi]);return on}function f(e){return typeof e=="string"?a[e]:e}function l(e,t,n,r,i){function s(t){t=f(t);var n=t[e];if(n!=null&&r(n))return!0;if(t.nofallthrough)return i&&i(),!0;var o=t.fallthrough;if(o==null)return!1;if(Object.prototype.toString.call(o)!="[object Array]")return s(o);for(var u=0,a=o.length;u<a;++u)if(s(o[u]))return!0;return!1}return t&&s(t)?!0:s(n)}function c(e){var t=ht[D(e,"keyCode")];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function h(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function p(e,t,n){return e.startState?e.startState(t,n):!0}function d(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8}function v(e,t,n,r){this.from=e,this.to=t,this.style=n,this.marker=r}function m(e){this.from=e,this.to=e,this.line=null}function g(e,t){this.styles=t||[e,null],this.text=e,this.height=1,this.marked=this.gutterMarker=this.className=this.bgClassName=this.handlers=null,this.stateAfter=this.parent=this.hidden=null}function y(e,t,n,r){for(var i=0,s=0,o=0;s<t;i+=2){var u=n[i],a=s+u.length;o==0?(a>e&&r.push(u.slice(e-s,Math.min(u.length,t-s)),n[i+1]),a>=e&&(o=1)):o==1&&(a>t?r.push(u.slice(0,t-s),n[i+1]):r.push(u,n[i+1])),s=a}}function b(e){this.lines=e,this.parent=null;for(var t=0,n=e.length,r=0;t<n;++t)e[t].parent=this,r+=e[t].height;this.height=r}function w(e){this.children=e;var t=0,n=0;for(var r=0,i=e.length;r<i;++r){var s=e[r];t+=s.chunkSize(),n+=s.height,s.parent=this}this.size=t,this.height=n,this.parent=null}function E(e,t){while(!e.lines)for(var n=0;;++n){var r=e.children[n],i=r.chunkSize();if(t<i){e=r;break}t-=i}return e.lines[t]}function S(e){if(e.parent==null)return null;var t=e.parent,n=at(t.lines,e);for(var r=t.parent;r;t=r,r=r.parent)for(var i=0,s=r.children.length;;++i){if(r.children[i]==t)break;n+=r.children[i].chunkSize()}return n}function x(e,t){var n=0;e:do{for(var r=0,i=e.children.length;r<i;++r){var s=e.children[r],o=s.height;if(t<o){e=s;continue e}t-=o,n+=s.chunkSize()}return n}while(!e.lines);for(var r=0,i=e.lines.length;r<i;++r){var u=e.lines[r],a=u.height;if(t<a)break;t-=a}return n+r}function T(e,t){var n=0;e:do{for(var r=0,i=e.children.length;r<i;++r){var s=e.children[r],o=s.chunkSize();if(t<o){e=s;continue e}t-=o,n+=s.height}return n}while(!e.lines);for(var r=0;r<t;++r)n+=e.lines[r].height;return n}function N(){this.time=0,this.done=[],this.undone=[],this.compound=0,this.closed=!1}function C(){O(this)}function k(e){return e.stop||(e.stop=C),e}function L(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function A(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function O(e){L(e),A(e)}function M(e){return e.target||e.srcElement}function _(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),n&&e.ctrlKey&&t==1&&(t=3),t}function D(e,t){var n=e.override&&e.override.hasOwnProperty(t);return n?e.override[t]:e[t]}function P(e,t,n,r){if(typeof e.addEventListener=="function"){e.addEventListener(t,n,!1);if(r)return function(){e.removeEventListener(t,n,!1)}}else{var i=function(e){n(e||window.event)};e.attachEvent("on"+t,i);if(r)return function(){e.detachEvent("on"+t,i)}}}function H(){this.id=null}function G(e,t,n){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var r=0,i=0;r<t;++r)e.charAt(r)=="	"?i+=n-i%n:++i;return i}function Y(e){return e.currentStyle?e.currentStyle:window.getComputedStyle(e,null)}function Z(e,t){try{var n=e.getBoundingClientRect();n={top:n.top,left:n.left}}catch(r){n={top:0,left:0}}if(!t)if(window.pageYOffset==null){var i=document.documentElement||document.body.parentNode;i.scrollTop==null&&(i=document.body),n.top+=i.scrollTop,n.left+=i.scrollLeft}else n.top+=window.pageYOffset,n.left+=window.pageXOffset;return n}function et(e){return e.textContent||e.innerText||e.nodeValue||""}function tt(e){t?(e.selectionStart=0,e.selectionEnd=e.value.length):e.select()}function nt(e,t){return e.line==t.line&&e.ch==t.ch}function rt(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function it(e){return{line:e.line,ch:e.ch}}function ot(e){return st.textContent=e,st.innerHTML}function ut(e,t){if(!t)return 0;if(!e)return t.length;for(var n=e.length,r=t.length;n>=0&&r>=0;--n,--r)if(e.charAt(n)!=t.charAt(r))break;return r+1}function at(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function ft(e){return/\w/.test(e)||e.toUpperCase()!=e.toLowerCase()}e.defaults={value:"",mode:null,theme:"default",indentUnit:2,indentWithTabs:!1,smartIndent:!0,tabSize:4,keyMap:"default",extraKeys:null,electricChars:!0,autoClearEmptyLines:!1,onKeyEvent:null,onDragEvent:null,lineWrapping:!1,lineNumbers:!1,gutter:!1,fixedGutter:!1,firstLineNumber:1,readOnly:!1,dragDrop:!0,onChange:null,onCursorActivity:null,onGutterClick:null,onHighlightComplete:null,onUpdate:null,onFocus:null,onBlur:null,onScroll:null,matchBrackets:!1,workTime:100,workDelay:200,pollInterval:100,undoDepth:40,tabindex:null,autofocus:null,lineNumberFormatter:function(e){return e}};var t=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),n=t||/Mac/.test(navigator.platform),r=/Win/.test(navigator.platform),i=e.modes={},s=e.mimeModes={};e.defineMode=function(t,n){!e.defaults.mode&&t!="null"&&(e.defaults.mode=t);if(arguments.length>2){n.dependencies=[];for(var r=2;r<arguments.length;++r)n.dependencies.push(arguments[r])}i[t]=n},e.defineMIME=function(e,t){s[e]=t},e.resolveMode=function(t){if(typeof t=="string"&&s.hasOwnProperty(t))t=s[t];else if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return typeof t=="string"?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=i[n.name];return r?r(t,n):e.getMode(t,"text/plain")},e.listModes=function(){var e=[];for(var t in i)i.propertyIsEnumerable(t)&&e.push(t);return e},e.listMIMEs=function(){var e=[];for(var t in s)s.propertyIsEnumerable(t)&&e.push({mime:t,mode:s[t]});return e};var o=e.extensions={};e.defineExtension=function(e,t){o[e]=t};var u=e.commands={selectAll:function(e){e.setSelection({line:0,ch:0},{line:e.lineCount()-1})},killLine:function(e){var t=e.getCursor(!0),n=e.getCursor(!1),r=!nt(t,n);!r&&e.getLine(t.line).length==t.ch?e.replaceRange("",t,{line:t.line+1,ch:0}):e.replaceRange("",t,r?n:{line:t.line})},deleteLine:function(e){var t=e.getCursor().line;e.replaceRange("",{line:t,ch:0},{line:t})},undo:function(e){e.undo()},redo:function(e){e.redo()},goDocStart:function(e){e.setCursor(0,0,!0)},goDocEnd:function(e){e.setSelection({line:e.lineCount()-1},null,!0)},goLineStart:function(e){e.setCursor(e.getCursor().line,0,!0)},goLineStartSmart:function(e){var t=e.getCursor(),n=e.getLine(t.line),r=Math.max(0,n.search(/\S/));e.setCursor(t.line,t.ch<=r&&t.ch?0:r,!0)},goLineEnd:function(e){e.setSelection({line:e.getCursor().line},null,!0)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goWordRight:function(e){e.moveH(1,"word")},delCharLeft:function(e){e.deleteH(-1,"char")},delCharRight:function(e){e.deleteH(1,"char")},delWordLeft:function(e){e.deleteH(-1,"word")},delWordRight:function(e){e.deleteH(1,"word")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection("	","end")},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.replaceSelection("	","end")},transposeChars:function(e){var t=e.getCursor(),n=e.getLine(t.line);t.ch>0&&t.ch<n.length-1&&e.replaceRange(n.charAt(t.ch)+n.charAt(t.ch-1),{line:t.line,ch:t.ch-1},{line:t.line,ch:t.ch+1})},newlineAndIndent:function(e){e.replaceSelection("\n","end"),e.indentLine(e.getCursor().line)},toggleOverwrite:function(e){e.toggleOverwrite()}},a=e.keyMap={};a.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharRight",Backspace:"delCharLeft",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"},a.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goWordLeft","Ctrl-Right":"goWordRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delWordLeft","Ctrl-Delete":"delWordRight","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"},a.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goWordLeft","Alt-Right":"goWordRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delWordLeft","Ctrl-Alt-Backspace":"delWordRight","Alt-Delete":"delWordRight","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore",fallthrough:["basic","emacsy"]},a["default"]=n?a.macDefault:a.pcDefault,a.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageUp","Shift-Ctrl-V":"goPageDown","Ctrl-D":"delCharRight","Ctrl-H":"delCharLeft","Alt-D":"delWordRight","Alt-Backspace":"delWordLeft","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},e.fromTextArea=function(t,n){function r(){t.value=u.getValue()}n||(n={}),n.value=t.value,!n.tabindex&&t.tabindex&&(n.tabindex=t.tabindex),n.autofocus==null&&t.getAttribute("autofocus")!=null&&(n.autofocus=!0);if(t.form){var i=P(t.form,"submit",r,!0);if(typeof t.form.submit=="function"){var s=t.form.submit;function o(){r(),t.form.submit=s,t.form.submit(),t.form.submit=o}t.form.submit=o}}t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},n);return u.save=r,u.getTextArea=function(){return t},u.toTextArea=function(){r(),t.parentNode.removeChild(u.getWrapperElement()),t.style.display="",t.form&&(i(),typeof t.form.submit=="function"&&(t.form.submit=s))},u},e.copyState=h,e.startState=p,d.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if(typeof e=="string")var n=t==e;else var n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){var t=this.pos;while(this.eat(e));return this.pos>t},eatSpace:function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return G(this.string,this.start,this.tabSize)},indentation:function(){return G(this.string,null,this.tabSize)},match:function(e,t,n){if(typeof e!="string"){var i=this.string.slice(this.pos).match(e);return i&&t!==!1&&(this.pos+=i[0].length),i}function r(e){return n?e.toLowerCase():e}if(r(this.string).indexOf(r(e),this.pos)==this.pos)return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)}},e.StringStream=d,v.prototype={attach:function(e){this.marker.set.push(e)},detach:function(e){var t=at(this.marker.set,e);t>-1&&this.marker.set.splice(t,1)},split:function(e,t){if(this.to<=e&&this.to!=null)return null;var n=this.from<e||this.from==null?null:this.from-e+t,r=this.to==null?null:this.to-e+t;return new v(n,r,this.style,this.marker)},dup:function(){return new v(null,null,this.style,this.marker)},clipTo:function(e,t,n,r,i){e&&r>this.from&&(r<this.to||this.to==null)?this.from=null:this.from!=null&&this.from>=t&&(this.from=Math.max(r,this.from)+i),n&&(t<this.to||this.to==null)&&(t>this.from||this.from==null)?this.to=null:this.to!=null&&this.to>t&&(this.to=r<this.to?this.to+i:t)},isDead:function(){return this.from!=null&&this.to!=null&&this.from>=this.to},sameSet:function(e){return this.marker==e.marker}},m.prototype={attach:function(e){this.line=e},detach:function(e){this.line==e&&(this.line=null)},split:function(e,t){if(e<this.from)return this.from=this.to=this.from-e+t,this},isDead:function(){return this.from>this.to},clipTo:function(e,t,n,r,i){(e||t<this.from)&&(n||r>this.to)?(this.from=0,this.to=-1):this.from>t&&(this.from=this.to=Math.max(r,this.from)+i)},sameSet:function(e){return!1},find:function(){return!this.line||!this.line.parent?null:{line:S(this.line),ch:this.from}},clear:function(){if(this.line){var e=at(this.line.marked,this);e!=-1&&this.line.marked.splice(e,1),this.line=null}}},g.inheritMarks=function(e,t){var n=new g(e),r=t&&t.marked;if(r)for(var i=0;i<r.length;++i)if(r[i].to==null&&r[i].style){var s=n.marked||(n.marked=[]),o=r[i],u=o.dup();s.push(u),u.attach(n)}return n},g.prototype={replace:function(e,t,n){var r=[],i=this.marked,s=t==null?this.text.length:t;y(0,e,this.styles,r),n&&r.push(n,null),y(s,this.text.length,this.styles,r),this.styles=r,this.text=this.text.slice(0,e)+n+this.text.slice(s),this.stateAfter=null;if(i){var o=n.length-(s-e);for(var u=0;u<i.length;++u){var a=i[u];a.clipTo(e==null,e||0,t==null,s,o),a.isDead()&&(a.detach(this),i.splice(u--,1))}}},split:function(e,t){var n=[t,null],r=this.marked;y(e,this.text.length,this.styles,n);var i=new g(t+this.text.slice(e),n);if(r)for(var s=0;s<r.length;++s){var o=r[s],u=o.split(e,t.length);u&&(i.marked||(i.marked=[]),i.marked.push(u),u.attach(i),u==o&&r.splice(s--,1))}return i},append:function(e){var t=this.text.length,n=e.marked,r=this.marked;this.text+=e.text,y(0,e.text.length,e.styles,this.styles);if(r)for(var i=0;i<r.length;++i)r[i].to==null&&(r[i].to=t);if(n&&n.length){r||(this.marked=r=[]);e:for(var i=0;i<n.length;++i){var s=n[i];if(!s.from)for(var o=0;o<r.length;++o){var u=r[o];if(u.to==t&&u.sameSet(s)){u.to=s.to==null?null:s.to+t,u.isDead()&&(u.detach(this),n.splice(i--,1));continue e}}r.push(s),s.attach(this),s.from+=t,s.to!=null&&(s.to+=t)}}},fixMarkEnds:function(e){var t=this.marked,n=e.marked;if(!t)return;e:for(var r=0;r<t.length;++r){var i=t[r],s=i.to==null;if(s&&n)for(var o=0;o<n.length;++o){var u=n[o];if(!u.sameSet(i)||u.from!=null)continue;if(i.from==this.text.length&&u.to==0){n.splice(o,1),t.splice(r--,1);continue e}s=!1;break}s&&(i.to=this.text.length)}},fixMarkStarts:function(){var e=this.marked;if(!e)return;for(var t=0;t<e.length;++t)e[t].from==null&&(e[t].from=0)},addMark:function(e){e.attach(this),this.marked==null&&(this.marked=[]),this.marked.push(e),this.marked.sort(function(e,t){return(e.from||0)-(t.from||0)})},highlight:function(e,t,n){var r=new d(this.text,n),i=this.styles,s=0,o=!1,u=i[0],a;this.text==""&&e.blankLine&&e.blankLine(t);while(!r.eol()){var f=e.token(r,t),l=this.text.slice(r.start,r.pos);r.start=r.pos,s&&i[s-1]==f?i[s-2]+=l:l&&(!o&&(i[s+1]!=f||s&&i[s-2]!=a)&&(o=!0),i[s++]=l,i[s++]=f,a=u,u=i[s]);if(r.pos>5e3){i[s++]=this.text.slice(r.pos),i[s++]=null;break}}return i.length!=s&&(i.length=s,o=!0),s&&i[s-2]!=a&&(o=!0),o||(i.length<5&&this.text.length<10?null:!1)},getTokenAt:function(e,t,n){var r=this.text,i=new d(r);while(i.pos<n&&!i.eol()){i.start=i.pos;var s=e.token(i,t)}return{start:i.start,end:i.pos,string:i.current(),className:s||null,state:t}},indentation:function(e){return G(this.text,null,e)},getHTML:function(e,t,n,r){function u(t,n){if(!t)return;s&&F&&t.charAt(0)==" "&&(t="\u00a0"+t.slice(1)),s=!1;if(t.indexOf("	")==-1){o+=t.length;var r=ot(t)}else{var r="";for(var u=0;;){var a=t.indexOf("	",u);if(a==-1){r+=ot(t.slice(u)),o+=t.length-u;break}o+=a-u;var f=e(o);r+=ot(t.slice(u,a))+f.html,o+=f.width,u=a+1}}n?i.push('<span class="',n,'">',r,"</span>"):i.push(r)}function v(e){return e?"cm-"+e.replace(/ +/g," cm-"):null}var i=[],s=!0,o=0,a=u;if(t!=null){var f=0,l='<span id="'+n+'">';a=function(e,n){var s=e.length;if(t>=f&&t<f+s){t>f&&(u(e.slice(0,t-f),n),r&&i.push("<wbr>")),i.push(l);var o=t-f;u(W?e.slice(o,o+1):e.slice(o),n),i.push("</span>"),W&&u(e.slice(o+1),n),t--,f+=s}else f+=s,u(e,n),f==t&&f==d?i.push(l+(j||F&&!I?"&#x200b;":" ")+"</span>"):f>t+10&&/\s/.test(e)&&(a=function(){})}}var c=this.styles,h=this.text,p=this.marked,d=h.length;if(!h&&t==null)a(" ");else if(!p||!p.length)for(var m=0,g=0;g<d;m+=2){var y=c[m],b=c[m+1],w=y.length;g+w>d&&(y=y.slice(0,d-g)),g+=w,a(y,v(b))}else{var E=0,m=0,S="",b,x=0,T=p[0].from||0,N=[],C=0;function k(){var e;while(C<p.length&&((e=p[C]).from==E||e.from==null))e.style!=null&&N.push(e),++C;T=C<p.length?p[C].from:Infinity;for(var t=0;t<N.length;++t){var n=N[t].to;n==null&&(n=Infinity),n==E?N.splice(t--,1):T=Math.min(n,T)}}var L=0;while(E<d){T==E&&k();var A=Math.min(d,T);for(;;){if(S){var O=E+S.length,M=b;for(var _=0;_<N.length;++_)M=(M?M+" ":"")+N[_].style;a(O>A?S.slice(0,A-E):S,M);if(O>=A){S=S.slice(A-E),E=A;break}E=O}S=c[m++],b=v(c[m++])}}}return i.join("")},cleanUp:function(){this.parent=null;if(this.marked)for(var e=0,t=this.marked.length;e<t;++e)this.marked[e].detach(this)}},b.prototype={chunkSize:function(){return this.lines.length},remove:function(e,t,n){for(var r=e,i=e+t;r<i;++r){var s=this.lines[r];this.height-=s.height,s.cleanUp();if(s.handlers)for(var o=0;o<s.handlers.length;++o)n.push(s.handlers[o])}this.lines.splice(e,t)},collapse:function(e){e.splice.apply(e,[e.length,0].concat(this.lines))},insertHeight:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0,i=t.length;r<i;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},w.prototype={chunkSize:function(){return this.size},remove:function(e,t,n){this.size-=t;for(var r=0;r<this.children.length;++r){var i=this.children[r],s=i.chunkSize();if(e<s){var o=Math.min(t,s-e),u=i.height;i.remove(e,o,n),this.height-=u-i.height,s==o&&(this.children.splice(r--,1),i.parent=null);if((t-=o)==0)break;e=0}else e-=s}if(this.size-t<25){var a=[];this.collapse(a),this.children=[new b(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0,n=this.children.length;t<n;++t)this.children[t].collapse(e)},insert:function(e,t){var n=0;for(var r=0,i=t.length;r<i;++r)n+=t[r].height;this.insertHeight(e,t,n)},insertHeight:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0,i=this.children.length;r<i;++r){var s=this.children[r],o=s.chunkSize();if(e<=o){s.insertHeight(e,t,n);if(s.lines&&s.lines.length>50){while(s.lines.length>50){var u=s.lines.splice(s.lines.length-25,25),a=new b(u);s.height-=a.height,this.children.splice(r+1,0,a),a.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new w(t);if(!e.parent){var r=new w(e.children);r.parent=e,e.children=[r,n],e=r}else{e.size-=n.size,e.height-=n.height;var i=at(e.parent.children,e);e.parent.children.splice(i+1,0,n)}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iter:function(e,t,n){this.iterN(e,t-e,n)},iterN:function(e,t,n){for(var r=0,i=this.children.length;r<i;++r){var s=this.children[r],o=s.chunkSize();if(e<o){var u=Math.min(t,o-e);if(s.iterN(e,u,n))return!0;if((t-=u)==0)break;e=0}else e-=o}}},N.prototype={addChange:function(e,t,n){this.undone.length=0;var r=+(new Date),i=this.done[this.done.length-1],s=i&&i[i.length-1],o=r-this.time;if(this.compound&&i&&!this.closed)i.push({start:e,added:t,old:n});else if(o>400||!s||this.closed||s.start>e+n.length||s.start+s.added<e)this.done.push([{start:e,added:t,old:n}]),this.closed=!1;else{var u=Math.max(0,s.start-e),a=Math.max(0,e+n.length-(s.start+s.added));for(var f=u;f>0;--f)s.old.unshift(n[f-1]);for(var f=a;f>0;--f)s.old.push(n[n.length-f]);u&&(s.start=e),s.added+=t-(n.length-u-a)}this.time=r},startCompound:function(){this.compound++||(this.closed=!0)},endCompound:function(){--this.compound||(this.closed=!0)}},e.e_stop=O,e.e_preventDefault=L,e.e_stopPropagation=A,e.connect=P,H.prototype={set:function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)}};var B=e.Pass={toString:function(){return"CodeMirror.Pass"}},j=/gecko\/\d{7}/i.test(navigator.userAgent),F=/MSIE \d/.test(navigator.userAgent),I=/MSIE [1-7]\b/.test(navigator.userAgent),q=/MSIE [1-8]\b/.test(navigator.userAgent),R=F&&document.documentMode==5,U=/WebKit\//.test(navigator.userAgent),z=/Chrome\//.test(navigator.userAgent),W=/Opera\//.test(navigator.userAgent),X=/Apple Computer/.test(navigator.vendor),V=/KHTML\//.test(navigator.userAgent),$=/Mac OS X 10\D([7-9]|\d\d)\D/.test(navigator.userAgent),J=function(){if(q)return!1;var e=document.createElement("div");return"draggable"in e||"dragDrop"in e}(),K=function(){var e=document.createElement("textarea");return e.value="foo\nbar",e.value.indexOf("\r")>-1?"\r\n":"\n"}(),Q=/^$/;j?Q=/$'/:X?Q=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/:z&&(Q=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/);var st=document.createElement("pre");ot("a")=="\na"?ot=function(e){return st.textContent=e,st.innerHTML.slice(1)}:ot("	")!="	"&&(ot=function(e){return st.innerHTML="",st.appendChild(document.createTextNode(e)),st.innerHTML}),e.htmlEscape=ot;var lt="\n\nb".split(/\n/).length!=3?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var s=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=s.indexOf("\r");o!=-1?(n.push(s.slice(0,o)),t+=o+1):(n.push(s),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)};e.splitLines=lt;var ct=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0};e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ht={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};return e.keyNames=ht,function(){for(var e=0;e<10;e++)ht[e+48]=String(e);for(var e=65;e<=90;e++)ht[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)ht[e+111]=ht[e+63235]="F"+e}(),e}();CodeMirror.defineMode("clike",function(e,t){function c(e,t){var n=e.next();if(u[n]){var a=u[n](e,t);if(a!==!1)return a}if(n=='"'||n=="'")return t.tokenize=h(n),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return l=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if(n=="/"){if(e.eat("*"))return t.tokenize=p,p(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(f.test(n))return e.eatWhile(f),"operator";e.eatWhile(/[\w\$_]/);var c=e.current();return r.propertyIsEnumerable(c)?(s.propertyIsEnumerable(c)&&(l="newstatement"),"keyword"):i.propertyIsEnumerable(c)?(s.propertyIsEnumerable(c)&&(l="newstatement"),"builtin"):o.propertyIsEnumerable(c)?"atom":"variable"}function h(e){return function(t,n){var r=!1,i,s=!1;while((i=t.next())!=null){if(i==e&&!r){s=!0;break}r=!r&&i=="\\"}if(s||!r&&!a)n.tokenize=null;return"string"}}function p(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=null;break}n=r=="*"}return"comment"}function d(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function v(e,t,n){return e.context=new d(e.indented,t,n,null,e.context)}function m(e){var t=e.context.type;if(t==")"||t=="]"||t=="}")e.indented=e.context.indented;return e.context=e.context.prev}var n=e.indentUnit,r=t.keywords||{},i=t.builtin||{},s=t.blockKeywords||{},o=t.atoms||{},u=t.hooks||{},a=t.multiLineStrings,f=/[+\-*&%=<>!?|\/]/,l;return{startState:function(e){return{tokenize:null,context:new d((e||0)-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;e.sol()&&(n.align==null&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0);if(e.eatSpace())return null;l=null;var r=(t.tokenize||c)(e,t);if(r=="comment"||r=="meta")return r;n.align==null&&(n.align=!0);if(l!=";"&&l!=":"||n.type!="statement")if(l=="{")v(t,e.column(),"}");else if(l=="[")v(t,e.column(),"]");else if(l=="(")v(t,e.column(),")");else if(l=="}"){while(n.type=="statement")n=m(t);n.type=="}"&&(n=m(t));while(n.type=="statement")n=m(t)}else l==n.type?m(t):(n.type=="}"||n.type=="top"||n.type=="statement"&&l=="newstatement")&&v(t,e.column(),"statement");else m(t);return t.startOfLine=!1,r},indent:function(e,t){if(e.tokenize!=c&&e.tokenize!=null)return 0;var r=e.context,i=t&&t.charAt(0);r.type=="statement"&&i=="}"&&(r=r.prev);var s=i==r.type;return r.type=="statement"?r.indented+(i=="{"?0:n):r.align?r.column+(s?0:1):r.indented+(s?0:n)},electricChars:"{}"}}),function(){function e(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}function n(e,t){return t.startOfLine?(e.skipToEnd(),"meta"):!1}function r(e,t){var n;while((n=e.next())!=null)if(n=='"'&&!e.eat('"')){t.tokenize=null;break}return"string"}var t="auto if break int case long char register continue return default short do sizeof double static else struct entry switch extern typedef float union for unsigned goto while enum void const signed volatile";CodeMirror.defineMIME("text/x-csrc",{name:"clike",keywords:e(t),blockKeywords:e("case do else for if switch while struct"),atoms:e("null"),hooks:{"#":n}}),CodeMirror.defineMIME("text/x-c++src",{name:"clike",keywords:e(t+" asm dynamic_cast namespace reinterpret_cast try bool explicit new "+"static_cast typeid catch operator template typename class friend private "+"this using const_cast inline public throw virtual delete mutable protected "+"wchar_t"),blockKeywords:e("catch class do else finally for if struct switch try while"),atoms:e("true false null"),hooks:{"#":n}}),CodeMirror.defineMIME("text/x-java",{name:"clike",keywords:e("abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while"),blockKeywords:e("catch class do else finally for if switch try while"),atoms:e("true false null"),hooks:{"@":function(e,t){return e.eatWhile(/[\w\$_]/),"meta"}}}),CodeMirror.defineMIME("text/x-csharp",{name:"clike",keywords:e("abstract as base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),blockKeywords:e("catch class do else finally for foreach if struct switch try while"),builtin:e("Boolean Byte Char DateTime DateTimeOffset Decimal Double Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),atoms:e("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=r,r(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),CodeMirror.defineMIME("text/x-scala",{name:"clike",keywords:e("abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try trye type val var while with yield _ : = => <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),blockKeywords:e("catch class do else finally for forSome if match switch try while"),atoms:e("true false null"),hooks:{"@":function(e,t){return e.eatWhile(/[\w\$_]/),"meta"}}})}(),CodeMirror.defineMode("clojure",function(e,t){function h(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}function y(e,t,n){this.indent=e,this.type=t,this.prev=n}function b(e,t,n){e.indentStack=new y(t,n,e.indentStack)}function w(e){e.indentStack=e.indentStack.prev}function E(e,t){if(e==="0"&&"x"==t.peek().toLowerCase())return t.eat("x"),t.eatWhile(g.hex),!0;if(e=="+"||e=="-")t.eat(g.sign),e=t.next();return g.digit.test(e)?(t.eat(e),t.eatWhile(g.digit),"."==t.peek()&&(t.eat("."),t.eatWhile(g.digit)),"e"==t.peek().toLowerCase()&&(t.eat(g.exponent),t.eat(g.sign),t.eatWhile(g.digit)),!0):!1}var n="builtin",r="comment",i="string",s="tag",o="atom",u="number",a="bracket",f="keyword",l=2,c=1,p=h("true false nil"),d=h("defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle"),v=h("* *1 *2 *3 *agent* *allow-unresolved-vars* *assert *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - / < <= = == > >= accessor aclone agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? extend extend-protocol extend-type extends? extenders false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reify reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq"),m=h("ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch let letfn binding loop for doseq dotimes when-let if-let defstruct struct-map assoc testing deftest handler-case handle dotrace deftrace"),g={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-fA-F]/,sign:/[+-]/,exponent:/[eE]/,keyword_char:/[^\s\(\[\;\)\]]/,basic:/[\w\$_\-]/,lang_keyword:/[\w*+!\-_?:\/]/};return{startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(e,t){t.indentStack==null&&e.sol()&&(t.indentation=e.indentation());if(e.eatSpace())return null;var s=null;switch(t.mode){case"string":var c,h=!1;while((c=e.next())!=null){if(c=='"'&&!h){t.mode=!1;break}h=!h&&c=="\\"}s=i;break;default:var y=e.next();if(y=='"')t.mode="string",s=i;else if(y=="'"&&!g.digit_or_colon.test(e.peek()))s=o;else if(y==";")e.skipToEnd(),s=r;else if(E(y,e))s=u;else if(y=="("||y=="["){var S="",x=e.column();if(y=="(")while((letter=e.eat(g.keyword_char))!=null)S+=letter;S.length>0&&m.propertyIsEnumerable(S)?b(t,x+l,y):(e.eatSpace(),e.eol()||e.peek()==";"?b(t,x+1,y):b(t,x+e.current().length,y)),e.backUp(e.current().length-1),s=a}else if(y==")"||y=="]")s=a,t.indentStack!=null&&t.indentStack.type==(y==")"?"(":"[")&&w(t);else{if(y==":")return e.eatWhile(g.lang_keyword),o;e.eatWhile(g.basic),d&&d.propertyIsEnumerable(e.current())?s=f:v&&v.propertyIsEnumerable(e.current())?s=n:p&&p.propertyIsEnumerable(e.current())?s=o:s=null}}return s},indent:function(e,t){return e.indentStack==null?e.indentation:e.indentStack.indent}}}),CodeMirror.defineMIME("text/x-clojure","clojure"),CodeMirror.defineMode("coffeescript",function(e){function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function y(e,n){if(e.sol()){var c=n.scopes[0].offset;if(e.eatSpace()){var h=e.indentation();return h>c?"indent":h<c?"dedent":null}c>0&&S(e,n)}if(e.eatSpace())return null;var m=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return n.tokenize=w,n.tokenize(e,n);if(m==="#")return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var y=!1;e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(y=!0),e.match(/^-?\d+\.\d*/)&&(y=!0),e.match(/^-?\.\d+/)&&(y=!0);if(y)return e.peek()=="."&&e.backUp(1),"number";var E=!1;e.match(/^-?0x[0-9a-f]+/i)&&(E=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(E=!0),e.match(/^-?0(?![\dx])/i)&&(E=!0);if(E)return"number"}if(e.match(d))return n.tokenize=b(e.current(),"string"),n.tokenize(e,n);if(e.match(v)){if(e.current()!="/"||e.match(/^.*\//,!1))return n.tokenize=b(e.current(),"string-2"),n.tokenize(e,n);e.backUp(1)}return e.match(u)||e.match(o)?"punctuation":e.match(s)||e.match(r)||e.match(l)?"operator":e.match(i)?"punctuation":e.match(g)?"atom":e.match(p)?"keyword":e.match(a)?"variable":e.match(f)?"property":(e.next(),t)}function b(n,r){var i=n.length==1;return function(o,u){while(!o.eol()){o.eatWhile(/[^'"\/\\]/);if(o.eat("\\")){o.next();if(i&&o.eol())return r}else{if(o.match(n))return u.tokenize=y,r;o.eat(/['"\/]/)}}return i&&(e.mode.singleLineStringErrors?r=t:u.tokenize=y),r}}function w(e,t){while(!e.eol()){e.eatWhile(/[^#]/);if(e.match("###")){t.tokenize=y;break}e.eatWhile("#")}return"comment"}function E(t,n,r){r=r||"coffee";var i=0;if(r==="coffee"){for(var s=0;s<n.scopes.length;s++)if(n.scopes[s].type==="coffee"){i=n.scopes[s].offset+e.indentUnit;break}}else i=t.column()+t.current().length;n.scopes.unshift({offset:i,type:r})}function S(e,t){if(t.scopes.length==1)return;if(t.scopes[0].type==="coffee"){var n=e.indentation(),r=-1;for(var i=0;i<t.scopes.length;++i)if(n===t.scopes[i].offset){r=i;break}if(r===-1)return!0;while(t.scopes[0].offset!==n)t.scopes.shift();return!1}return t.scopes.shift(),!1}function x(e,n){var r=n.tokenize(e,n),i=e.current();if(i===".")return r=n.tokenize(e,n),i=e.current(),r==="variable"?"variable":t;i==="return"&&(n.dedent+=1),((i==="->"||i==="=>")&&!n.lambda&&n.scopes[0].type=="coffee"&&e.peek()===""||r==="indent")&&E(e,n);var s="[({".indexOf(i);return s!==-1&&E(e,n,"])}".slice(s,s+1)),c.exec(i)&&E(e,n),i=="then"&&S(e,n),r==="dedent"&&S(e,n)?t:(s="])}".indexOf(i),s!==-1&&S(e,n)?t:(n.dedent>0&&e.eol()&&n.scopes[0].type=="coffee"&&(n.scopes.length>1&&n.scopes.shift(),n.dedent-=1),r))}var t="error",r=new RegExp("^[\\+\\-\\*/%&|\\^~<>!?]"),i=new RegExp("^[\\(\\)\\[\\]\\{\\},:`=;\\.]"),s=new RegExp("^((->)|(=>)|(\\+\\+)|(\\+\\=)|(\\-\\-)|(\\-\\=)|(\\*\\*)|(\\*\\=)|(\\/\\/)|(\\/\\=)|(==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//))"),o=new RegExp("^((\\.\\.)|(\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),u=new RegExp("^((\\.\\.\\.)|(//=)|(>>=)|(<<=)|(\\*\\*=))"),a=new RegExp("^[_A-Za-z$][_A-Za-z$0-9]*"),f=new RegExp("^(@|this.)[_A-Za-z$][_A-Za-z$0-9]*"),l=n(["and","or","not","is","isnt","in","instanceof","typeof"]),c=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],h=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","throw","when","until"],p=n(c.concat(h));c=n(c);var d=new RegExp("^('{3}|\"{3}|['\"])"),v=new RegExp("^(/{3}|/)"),m=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],g=n(m),T={startState:function(e){return{tokenize:y,scopes:[{offset:e||0,type:"coffee"}],lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=x(e,t);return t.lastToken={style:n,content:e.current()},e.eol()&&e.lambda&&(t.lambda=!1),n},indent:function(e,t){return e.tokenize!=y?0:e.scopes[0].offset}};return T}),CodeMirror.defineMIME("text/x-coffeescript","coffeescript"),CodeMirror.defineMode("css",function(e){function r(e,t){return n=t,e}function i(e,t){var n=e.next();if(n=="@")return e.eatWhile(/[\w\\\-]/),r("meta",e.current());if(n=="/"&&e.eat("*"))return t.tokenize=s,s(e,t);if(n=="<"&&e.eat("!"))return t.tokenize=o,o(e,t);if(n!="=")return n!="~"&&n!="|"||!e.eat("=")?n=='"'||n=="'"?(t.tokenize=u(n),t.tokenize(e,t)):n=="#"?(e.eatWhile(/[\w\\\-]/),r("atom","hash")):n=="!"?(e.match(/^\s*\w*/),r("keyword","important")):/\d/.test(n)?(e.eatWhile(/[\w.%]/),r("number","unit")):/[,.+>*\/]/.test(n)?r(null,"select-op"):/[;{}:\[\]]/.test(n)?r(null,n):(e.eatWhile(/[\w\\\-]/),r("variable","variable")):r(null,"compare");r(null,"compare")}function s(e,t){var n=!1,s;while((s=e.next())!=null){if(n&&s=="/"){t.tokenize=i;break}n=s=="*"}return r("comment","comment")}function o(e,t){var n=0,s;while((s=e.next())!=null){if(n>=2&&s==">"){t.tokenize=i;break}n=s=="-"?n+1:0}return r("comment","comment")}function u(e){return function(t,n){var s=!1,o;while((o=t.next())!=null){if(o==e&&!s)break;s=!s&&o=="\\"}return s||(n.tokenize=i),r("string","string")}}var t=e.indentUnit,n;return{startState:function(e){return{tokenize:i,baseIndent:e||0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;var r=t.tokenize(e,t),i=t.stack[t.stack.length-1];if(n=="hash"&&i!="rule")r="string-2";else if(r=="variable")if(i=="rule")r="number";else if(!i||i=="@media{")r="tag";return i=="rule"&&/^[\{\};]$/.test(n)&&t.stack.pop(),n=="{"?i=="@media"?t.stack[t.stack.length-1]="@media{":t.stack.push("{"):n=="}"?t.stack.pop():n=="@media"?t.stack.push("@media"):i=="{"&&n!="comment"&&t.stack.push("rule"),r},indent:function(e,n){var r=e.stack.length;return/^\}/.test(n)&&(r-=e.stack[e.stack.length-1]=="rule"?2:1),e.baseIndent+r*t},electricChars:"}"}}),CodeMirror.defineMIME("text/css","css"),CodeMirror.defineMode("diff",function(){var e={"+":"tag","-":"string","@":"meta"};return{token:function(t){var n=t.string.search(/[\t ]+?$/);if(!t.sol()||n===0)return t.skipToEnd(),("error "+(e[t.string.charAt(0)]||"")).replace(/ $/,"");var r=e[t.peek()]||t.skipToEnd();return n===-1?t.skipToEnd():t.pos=n,r}}}),CodeMirror.defineMIME("text/x-diff","diff"),CodeMirror.defineMode("ecl",function(e){function t(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}function n(e,t){return t.startOfLine?(e.skipToEnd(),"meta"):!1}function r(e,t){var n;while((n=e.next())!=null)if(n=='"'&&!e.eat('"')){t.tokenize=null;break}return"string"}function m(e,t){var n=e.next();if(h[n]){var r=h[n](e,t);if(r!==!1)return r}if(n=='"'||n=="'")return t.tokenize=g(n),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return v=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if(n=="/"){if(e.eat("*"))return t.tokenize=y,y(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(d.test(n))return e.eatWhile(d),"operator";e.eatWhile(/[\w\$_]/);var i=e.current().toLowerCase();if(s.propertyIsEnumerable(i))return l.propertyIsEnumerable(i)&&(v="newstatement"),"keyword";if(o.propertyIsEnumerable(i))return l.propertyIsEnumerable(i)&&(v="newstatement"),"variable";if(u.propertyIsEnumerable(i))return l.propertyIsEnumerable(i)&&(v="newstatement"),"variable-2";if(a.propertyIsEnumerable(i))return l.propertyIsEnumerable(i)&&(v="newstatement"),"variable-3";if(f.propertyIsEnumerable(i))return l.propertyIsEnumerable(i)&&(v="newstatement"),"builtin";var p=i.length-1;while(p>=0&&(!isNaN(i[p])||i[p]=="_"))--p;if(p>0){var m=i.substr(0,p+1);if(a.propertyIsEnumerable(m))return l.propertyIsEnumerable(m)&&(v="newstatement"),"variable-3"}return c.propertyIsEnumerable(i)?"atom":null}function g(e){return function(t,n){var r=!1,i,s=!1;while((i=t.next())!=null){if(i==e&&!r){s=!0;break}r=!r&&i=="\\"}if(s||!r&&!p)n.tokenize=m;return"string"}}function y(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=m;break}n=r=="*"}return"comment"}function b(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function w(e,t,n){return e.context=new b(e.indented,t,n,null,e.context)}function E(e){var t=e.context.type;if(t==")"||t=="]"||t=="}")e.indented=e.context.indented;return e.context=e.context.prev}var i=e.indentUnit,s=t("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"),o=t("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),u=t("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"),a=t("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"),f=t("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"),l=t("catch class do else finally for if switch try while"),c=t("true false null"),h={"#":n},p,d=/[+\-*&%=<>!?|\/]/,v;return{startState:function(e){return{tokenize:null,context:new b((e||0)-i,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;e.sol()&&(n.align==null&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0);if(e.eatSpace())return null;v=null;var r=(t.tokenize||m)(e,t);if(r=="comment"||r=="meta")return r;n.align==null&&(n.align=!0);if(v!=";"&&v!=":"||n.type!="statement")if(v=="{")w(t,e.column(),"}");else if(v=="[")w(t,e.column(),"]");else if(v=="(")w(t,e.column(),")");else if(v=="}"){while(n.type=="statement")n=E(t);n.type=="}"&&(n=E(t));while(n.type=="statement")n=E(t)}else v==n.type?E(t):(n.type=="}"||n.type=="top"||n.type=="statement"&&v=="newstatement")&&w(t,e.column(),"statement");else E(t);return t.startOfLine=!1,r},indent:function(e,t){if(e.tokenize!=m&&e.tokenize!=null)return 0;var n=e.context,r=t&&t.charAt(0);n.type=="statement"&&r=="}"&&(n=n.prev);var s=r==n.type;return n.type=="statement"?n.indented+(r=="{"?0:i):n.align?n.column+(s?0:1):n.indented+(s?0:i)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-ecl","ecl"),CodeMirror.defineMIME("text/x-erlang","erlang"),CodeMirror.defineMode("erlang",function(e,t){function n(e,t,n){n=="record"?e.context="record":e.context=!1,n!="whitespace"&&n!="comment"&&(e.lastToken=t.current());switch(n){case"atom":return"atom";case"attribute":return"attribute";case"builtin":return"builtin";case"comment":return"comment";case"fun":return"meta";case"function":return"tag";case"guard":return"property";case"keyword":return"keyword";case"macro":return"variable-2";case"number":return"number";case"operator":return"operator";case"record":return"bracket";case"string":return"string";case"type":return"def";case"variable":return"variable";case"error":return"error";case"separator":return null;case"open_paren":return null;case"close_paren":return null;default:return null}}function S(e,t){return-1<t.indexOf(e)}function x(e,t){var n=e.start,r=t.length;if(r<=n){var i=e.string.slice(n-r,n);return i==t}return!1}function T(e,t){if(e.eatSpace())return n(t,e,"whitespace");if((P(t).token==""||P(t).token==".")&&e.peek()=="-"){e.next();if(e.eat(p)&&e.eatWhile(g))return S(e.current(),r)?n(t,e,"type"):n(t,e,"attribute");e.backUp(1)}var h=e.next();if(h=="%")return e.skipToEnd(),n(t,e,"comment");if(h=="?")return e.eatWhile(g),n(t,e,"macro");if(h=="#")return e.eatWhile(g),n(t,e,"record");if(h=="$")return e.next()=="\\"&&(e.eatWhile(m)||e.next()),n(t,e,"string");if(h=="'")return L(e)?n(t,e,"atom"):n(t,e,"error");if(h=='"')return k(e)?n(t,e,"string"):n(t,e,"error");if(d.test(h))return e.eatWhile(g),n(t,e,"variable");if(p.test(h)){e.eatWhile(g);if(e.peek()=="/")return e.next(),e.eatWhile(v)?n(t,e,"fun"):(e.backUp(1),n(t,e,"atom"));var T=e.current();return S(T,i)?(H(t,e),n(t,e,"keyword")):e.peek()=="("?S(T,c)&&(!x(e,":")||x(e,"erlang:"))?n(t,e,"builtin"):n(t,e,"function"):S(T,l)?n(t,e,"guard"):S(T,o)?n(t,e,"operator"):e.peek()==":"?T=="erlang"?n(t,e,"builtin"):n(t,e,"function"):n(t,e,"atom")}return v.test(h)?(e.eatWhile(v),e.eat("#")?e.eatWhile(v):(e.eat(".")&&e.eatWhile(v),e.eat(/[eE]/)&&(e.eat(/[-+]/),e.eatWhile(v))),n(t,e,"number")):N(e,b,a)?(H(t,e),n(t,e,"open_paren")):N(e,w,f)?(H(t,e),n(t,e,"close_paren")):C(e,E,s)?(t.context==0&&H(t,e),n(t,e,"separator")):C(e,y,u)?n(t,e,"operator"):n(t,e,null)}function N(e,t,n){if(e.current().length==1&&t.test(e.current())){e.backUp(1);while(t.test(e.peek())){e.next();if(S(e.current(),n))return!0}e.backUp(e.current().length-1)}return!1}function C(e,t,n){if(e.current().length==1&&t.test(e.current())){while(t.test(e.peek()))e.next();while(0<e.current().length){if(S(e.current(),n))return!0;e.backUp(1)}e.next()}return!1}function k(e){return A(e,'"',"\\")}function L(e){return A(e,"'","\\")}function A(e,t,n){while(!e.eol()){var r=e.next();if(r==t)return!0;r==n&&e.next()}return!1}function O(e){this.token=e?e.current():"",this.column=e?e.column():0,this.indent=e?e.indentation():0}function M(t,n){var r=e.indentUnit,i=["after","catch"],s=P(t).token,o=_(n,/[^a-z]/);return S(s,a)?P(t).column+s.length:s=="."||s==""?0:s=="->"?o=="end"?P(t,2).column:P(t,2).token=="fun"?P(t,2).column+r:P(t).indent+r:S(o,i)?P(t).indent:P(t).column+r}function _(e,t){var n=e.match(t);return n?e.slice(0,n.index):e}function D(e){return e.tokenStack.pop()}function P(e,t){var n=e.tokenStack.length,r=t?t:1;return n<r?new O:e.tokenStack[n-r]}function H(e,t){var n=t.current(),r=P(e).token;return S(n,h)?!1:j(r,n)?(D(e),!1):B(r,n)?(D(e),H(e,t)):(e.tokenStack.push(new O(t)),!0)}function B(e,t){switch(e+" "+t){case"when ->":return!0;case"-> end":return!0;case"-> .":return!0;case". .":return!0;default:return!1}}function j(e,t){switch(e+" "+t){case"( )":return!0;case"[ ]":return!0;case"{ }":return!0;case"<< >>":return!0;case"begin end":return!0;case"case end":return!0;case"fun end":return!0;case"if end":return!0;case"receive end":return!0;case"try end":return!0;case"-> ;":return!0;default:return!1}}var r=["-type","-spec","-export_type","-opaque"],i=["after","begin","catch","case","cond","end","fun","if","let","of","query","receive","try","when"],s=["->",";",":",".",","],o=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],u=["+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-"],a=["<<","(","[","{"],f=["}","]",")",">>"],l=["is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_record","is_reference","is_tuple","atom","binary","bitstring","boolean","function","integer","list","number","pid","port","record","reference","tuple"],c=["abs","adler32","adler32_combine","alive","apply","atom_to_binary","atom_to_list","binary_to_atom","binary_to_existing_atom","binary_to_list","binary_to_term","bit_size","bitstring_to_list","byte_size","check_process_code","contact_binary","crc32","crc32_combine","date","decode_packet","delete_module","disconnect_node","element","erase","exit","float","float_to_list","garbage_collect","get","get_keys","group_leader","halt","hd","integer_to_list","internal_bif","iolist_size","iolist_to_binary","is_alive","is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_process_alive","is_record","is_reference","is_tuple","length","link","list_to_atom","list_to_binary","list_to_bitstring","list_to_existing_atom","list_to_float","list_to_integer","list_to_pid","list_to_tuple","load_module","make_ref","module_loaded","monitor_node","node","node_link","node_unlink","nodes","notalive","now","open_port","pid_to_list","port_close","port_command","port_connect","port_control","pre_loaded","process_flag","process_info","processes","purge_module","put","register","registered","round","self","setelement","size","spawn","spawn_link","spawn_monitor","spawn_opt","split_binary","statistics","term_to_binary","time","throw","tl","trunc","tuple_size","tuple_to_list","unlink","unregister","whereis"],h=[",",":","catch","after","of","cond","let","query"],p=/[a-z_]/,d=/[A-Z_]/,v=/[0-9]/,m=/[0-7]/,g=/[a-z_A-Z0-9]/,y=/[\+\-\*\/<>=\|:]/,b=/[<\(\[\{]/,w=/[>\)\]\}]/,E=/[\->\.,:;]/;return{startState:function(){return{tokenStack:[],context:!1,lastToken:null}},token:function(e,t){return T(e,t)},indent:function(e,t){return M(e,t)}}}),CodeMirror.defineMode("gfm",function(e,t){function s(e,t){return e.sol()&&e.match(/^```([\w+#]*)/)?(t.localMode=i(RegExp.$1),t.localMode&&(t.localState=t.localMode.startState()),t.token=o,"code"):n.token(e,t.mdState)}function o(e,t){return e.sol()&&e.match(/^```/)?(t.localMode=t.localState=null,t.token=s,"code"):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),"code")}function u(e,t){var r;if(e.match(/^\w+:\/\/\S+/))return"link";if(e.match(/^[^\[*\\<>` _][^\[*\\<>` ]*[^\[*\\<>` _]/))return n.getType(t);if(r=e.match(/^[^\[*\\<>` ]+/)){var i=r[0];return i[0]==="_"&&i[i.length-1]==="_"?(e.backUp(i.length),undefined):n.getType(t)}if(e.eatSpace())return null}var n=CodeMirror.getMode(e,"markdown"),r={html:"htmlmixed",js:"javascript",json:"application/json",c:"text/x-csrc","c++":"text/x-c++src",java:"text/x-java",csharp:"text/x-csharp","c#":"text/x-csharp"},i=function(){var t,n={},i={},s,o=CodeMirror.listModes();for(t=0;t<o.length;t++)n[o[t]]=o[t];var u=CodeMirror.listMIMEs();for(t=0;t<u.length;t++)s=u[t].mime,i[s]=u[t].mime;for(var a in r)if(r[a]in n||r[a]in i)n[a]=r[a];return function(t){return n[t]?CodeMirror.getMode(e,n[t]):null}}();return{startState:function(){var e=n.startState();return e.text=u,{token:s,mode:"markdown",mdState:e,localMode:null,localState:null}},copyState:function(e){return{token:e.token,mode:e.mode,mdState:CodeMirror.copyState(n,e.mdState),localMode:e.localMode,localState:e.localMode?CodeMirror.copyState(e.localMode,e.localState):null}},token:function(e,t){if((ch=e.peek())!=undefined&&ch=="["){e.next();if((ch=e.peek())==undefined||ch!="[")return e.backUp(1),t.token(e,t);while((ch=e.next())!=undefined&&ch!="]");if(ch=="]"&&(ch=e.next())!=undefined&&ch=="]")return"link";e.backUp(1)}return e.match(/^\$[^\$]+\$/)?"string":e.match(/^\\\((.*?)\\\)/)?"string":e.match(/^\$\$[^\$]+\$\$/)?"string":e.match(/^\\\[(.*?)\\\]/)?"string":t.token(e,t)}}},"markdown"),CodeMirror.defineMode("go",function(e,t){function a(e,t){var n=e.next();if(n=='"'||n=="'"||n=="`")return t.tokenize=f(n),t.tokenize(e,t);if(/[\d\.]/.test(n))return n=="."?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):n=="0"?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(n))return u=n,null;if(n=="/"){if(e.eat("*"))return t.tokenize=l,l(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(o.test(n))return e.eatWhile(o),"operator";e.eatWhile(/[\w\$_]/);var s=e.current();if(r.propertyIsEnumerable(s)){if(s=="case"||s=="default")u="case";return"keyword"}return i.propertyIsEnumerable(s)?"atom":"variable"}function f(e){return function(t,n){var r=!1,i,s=!1;while((i=t.next())!=null){if(i==e&&!r){s=!0;break}r=!r&&i=="\\"}if(s||!r&&e!="`")n.tokenize=a;return"string"}}function l(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=a;break}n=r=="*"}return"comment"}function c(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function h(e,t,n){return e.context=new c(e.indented,t,n,null,e.context)}function p(e){var t=e.context.type;if(t==")"||t=="]"||t=="}")e.indented=e.context.indented;return e.context=e.context.prev}var n=e.indentUnit,r={"break":!0,"case":!0,chan:!0,"const":!0,"continue":!0,"default":!0,defer:!0,"else":!0,fallthrough:!0,"for":!0,func:!0,go:!0,"goto":!0,"if":!0,"import":!0,"interface":!0,map:!0,"package":!0,range:!0,"return":!0,select:!0,struct:!0,"switch":!0,type:!0,"var":!0,bool:!0,"byte":!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,"int":!0,uint:!0,uintptr:!0},i={"true":!0,"false":!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,imag:!0,len:!0,make:!0,"new":!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},s={"else":!0,"for":!0,func:!0,"if":!0,"interface":!0,select:!0,struct:!0,"switch":!0},o=/[+\-*&^%:=<>!|\/]/,u;return{startState:function(e){return{tokenize:null,context:new c((e||0)-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;e.sol()&&(n.align==null&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,n.type=="case"&&(n.type="}"));if(e.eatSpace())return null;u=null;var r=(t.tokenize||a)(e,t);return r=="comment"?r:(n.align==null&&(n.align=!0),u=="{"?h(t,e.column(),"}"):u=="["?h(t,e.column(),"]"):u=="("?h(t,e.column(),")"):u=="case"?n.type="case":u=="}"&&n.type=="}"?n=p(t):u==n.type&&p(t),t.startOfLine=!1,r)},indent:function(e,t){if(e.tokenize!=a&&e.tokenize!=null)return 0;var r=e.context,i=t&&t.charAt(0);if(r.type=="case"&&/^(?:case|default)\b/.test(t))return e.context.type="}",r.indented;var s=i==r.type;return r.align?r.column+(s?0:1):r.indented+(s?0:n)},electricChars:"{}:"}}),CodeMirror.defineMIME("text/x-go","go"),CodeMirror.defineMode("groovy",function(e,t){function n(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}function u(e,t){var n=e.next();if(n=='"'||n=="'")return a(n,e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return o=n,null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),e.eat(/eE/)&&(e.eat(/\+\-/),e.eatWhile(/\d/)),"number";if(n=="/"){if(e.eat("*"))return t.tokenize.push(l),l(e,t);if(e.eat("/"))return e.skipToEnd(),"comment";if(c(t.lastToken))return a(n,e,t)}if(n=="-"&&e.eat(">"))return o="->",null;if(/[+\-*&%=<>!?|\/~]/.test(n))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";e.eatWhile(/[\w\$_]/);if(n=="@")return e.eatWhile(/[\w\$_\.]/),"meta";if(t.lastToken==".")return"property";if(e.eat(":"))return o="proplabel","property";var u=e.current();return s.propertyIsEnumerable(u)?"atom":r.propertyIsEnumerable(u)?(i.propertyIsEnumerable(u)&&(o="newstatement"),"keyword"):"variable"}function a(e,t,n){function i(t,n){var i=!1,s,o=!r;while((s=t.next())!=null){if(s==e&&!i){if(!r)break;if(t.match(e+e)){o=!0;break}}if(e=='"'&&s=="$"&&!i&&t.eat("{"))return n.tokenize.push(f()),"string";i=!i&&s=="\\"}return o&&n.tokenize.pop(),"string"}var r=!1;if(e!="/"&&t.eat(e)){if(!t.eat(e))return"string";r=!0}return n.tokenize.push(i),i(t,n)}function f(){function t(t,n){if(t.peek()=="}"){e--;if(e==0)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)}else t.peek()=="{"&&e++;return u(t,n)}var e=1;return t.isBase=!0,t}function l(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize.pop();break}n=r=="*"}return"comment"}function c(e){return!e||e=="operator"||e=="->"||/[\.\[\{\(,;:]/.test(e)||e=="newstatement"||e=="keyword"||e=="proplabel"}function h(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function p(e,t,n){return e.context=new h(e.indented,t,n,null,e.context)}function d(e){var t=e.context.type;if(t==")"||t=="]"||t=="}")e.indented=e.context.indented;return e.context=e.context.prev}var r=n("abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws transient try void volatile while"),i=n("catch class do else finally for if switch try while enum interface def"),s=n("null true false this"),o;return u.isBase=!0,{startState:function(t){return{tokenize:[u],context:new h((t||0)-e.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,t){var n=t.context;e.sol()&&(n.align==null&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,n.type=="statement"&&!c(t.lastToken)&&(d(t),n=t.context));if(e.eatSpace())return null;o=null;var r=t.tokenize[t.tokenize.length-1](e,t);if(r=="comment")return r;n.align==null&&(n.align=!0);if(o!=";"&&o!=":"||n.type!="statement")if(o=="->"&&n.type=="statement"&&n.prev.type=="}")d(t),t.context.align=!1;else if(o=="{")p(t,e.column(),"}");else if(o=="[")p(t,e.column(),"]");else if(o=="(")p(t,e.column(),")");else if(o=="}"){while(n.type=="statement")n=d(t);n.type=="}"&&(n=d(t));while(n.type=="statement")n=d(t)}else o==n.type?d(t):(n.type=="}"||n.type=="top"||n.type=="statement"&&o=="newstatement")&&p(t,e.column(),"statement");else d(t);return t.startOfLine=!1,t.lastToken=o||r,r},indent:function(t,n){if(!t.tokenize[t.tokenize.length-1].isBase)return 0;var r=n&&n.charAt(0),i=t.context;i.type=="statement"&&!c(t.lastToken)&&(i=i.prev);var s=r==i.type;return i.type=="statement"?i.indented+(r=="{"?0:e.indentUnit):i.align?i.column+(s?0:1):i.indented+(s?0:e.indentUnit)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-groovy","groovy"),CodeMirror.defineMode("haskell",function(e,t){function n(e,t,n){return t(n),n(e,t)}function h(e,t){if(e.eatWhile(c))return null;var h=e.next();if(l.test(h)){if(h=="{"&&e.eat("-")){var v="comment";return e.eat("#")&&(v="meta"),n(e,t,p(v,1))}return null}if(h=="'")return e.eat("\\")?e.next():e.next(),e.eat("'")?"string":"error";if(h=='"')return n(e,t,d);if(i.test(h))return e.eatWhile(a),e.eat(".")?"qualifier":"variable-2";if(r.test(h))return e.eatWhile(a),"variable";if(s.test(h)){if(h=="0"){if(e.eat(/[xX]/))return e.eatWhile(o),"integer";if(e.eat(/[oO]/))return e.eatWhile(u),"number"}e.eatWhile(s);var v="number";return e.eat(".")&&(v="number",e.eatWhile(s)),e.eat(/[eE]/)&&(v="number",e.eat(/[-+]/),e.eatWhile(s)),v}if(f.test(h)){if(h=="-"&&e.eat(/-/)){e.eatWhile(/-/);if(!e.eat(f))return e.skipToEnd(),"comment"}var v="variable";return h==":"&&(v="variable-2"),e.eatWhile(f),v}return"error"}function p(e,t){return t==0?h:function(n,r){var i=t;while(!n.eol()){var s=n.next();if(s=="{"&&n.eat("-"))++i;else if(s=="-"&&n.eat("}")){--i;if(i==0)return r(h),e}}return r(p(e,i)),e}}function d(e,t){while(!e.eol()){var n=e.next();if(n=='"')return t(h),"string";if(n=="\\"){if(e.eol()||e.eat(c))return t(v),"string";e.eat("&")||e.next()}}return t(h),"error"}function v(e,t){return e.eat("\\")?n(e,t,d):(e.next(),t(h),"error")}var r=/[a-z_]/,i=/[A-Z]/,s=/[0-9]/,o=/[0-9A-Fa-f]/,u=/[0-7]/,a=/[a-z_A-Z0-9']/,f=/[-!#$%&*+.\/<=>?@\\^|~:]/,l=/[(),;[\]`{}]/,c=/[ \t\v\f]/,m=function(){function t(t){return function(){for(var n=0;n<arguments.length;n++)e[arguments[n]]=t}}var e={};return t("keyword")("case","class","data","default","deriving","do","else","foreign","if","import","in","infix","infixl","infixr","instance","let","module","newtype","of","then","type","where","_"),t("keyword")("..",":","::","=","\\",'"',"<-","->","@","~","=>"),t("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<=","=<<","==",">",">=",">>",">>=","^","^^","||","*","**"),t("builtin")("Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),t("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3"),e}();return{startState:function(){return{f:h}},copyState:function(e){return{f:e.f}},token:function(e,t){var n=t.f(e,function(e){t.f=e}),r=e.current();return r in m?m[r]:n}}}),CodeMirror.defineMIME("text/x-haskell","haskell"),CodeMirror.defineMode("haxe",function(e,t){function s(e,t,n){return t.tokenize=n,n(e,t)}function o(e,t){var n=!1,r;while((r=e.next())!=null){if(r==t&&!n)return!1;n=!n&&r=="\\"}return n}function f(e,t,n){return u=e,a=n,t}function l(e,t){var n=e.next();if(n=='"'||n=="'")return s(e,t,c(n));if(/[\[\]{}\(\),;\:\.]/.test(n))return f(n);if(n=="0"&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),f("number","number");if(/\d/.test(n)||n=="-"&&e.eat(/\d/))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),f("number","number");if(t.reAllowed&&n=="~"&&e.eat(/\//))return o(e,"/"),e.eatWhile(/[gimsu]/),f("regexp","string-2");if(n=="/")return e.eat("*")?s(e,t,h):e.eat("/")?(e.skipToEnd(),f("comment","comment")):(e.eatWhile(i),f("operator",null,e.current()));if(n=="#")return e.skipToEnd(),f("conditional","meta");if(n=="@")return e.eat(/:/),e.eatWhile(/[\w_]/),f("metadata","meta");if(i.test(n))return e.eatWhile(i),f("operator",null,e.current());var u;if(/[A-Z]/.test(n))return e.eatWhile(/[\w_<>]/),u=e.current(),f("type","variable-3",u);e.eatWhile(/[\w_]/);var u=e.current(),a=r.propertyIsEnumerable(u)&&r[u];return a&&t.kwAllowed?f(a.type,a.style,u):f("variable","variable",u)}function c(e){return function(t,n){return o(t,e)||(n.tokenize=l),f("string","string")}}function h(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=l;break}n=r=="*"}return f("comment","comment")}function d(e,t,n,r,i,s){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=s,r!=null&&(this.align=r)}function v(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0}function m(e,t,n,r,i){var s=e.cc;b.state=e,b.stream=i,b.marked=null,b.cc=s,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);for(;;){var o=s.length?s.pop():A;if(o(n,r)){while(s.length&&s[s.length-1].lex)s.pop()();return b.marked?b.marked:n=="variable"&&v(e,r)?"variable-2":n=="variable"&&g(e,r)?"variable-3":t}}}function g(e,t){if(/[a-z]/.test(t.charAt(0)))return!1;var n=e.importedtypes.length;for(var r=0;r<n;r++)if(e.importedtypes[r]==t)return!0}function y(e){var t=b.state;for(var n=t.importedtypes;n;n=n.next)if(n.name==e)return;t.importedtypes={name:e,next:t.importedtypes}}function w(){for(var e=arguments.length-1;e>=0;e--)b.cc.push(arguments[e])}function E(){return w.apply(null,arguments),!0}function S(e){var t=b.state;if(t.context){b.marked="def";for(var n=t.localVars;n;n=n.next)if(n.name==e)return;t.localVars={name:e,next:t.localVars}}}function T(){b.state.context||(b.state.localVars=x),b.state.context={prev:b.state.context,vars:b.state.localVars}}function N(){b.state.localVars=b.state.context.vars,b.state.context=b.state.context.prev}function C(e,t){var n=function(){var n=b.state;n.lexical=new d(n.indented,b.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function k(){var e=b.state;e.lexical.prev&&(e.lexical.type==")"&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function L(e){return function(n){return n==e?E():e==";"?w():E(arguments.callee)}}function A(e){return e=="@"?E(P):e=="var"?E(C("vardef"),z,L(";"),k):e=="keyword a"?E(C("form"),O,A,k):e=="keyword b"?E(C("form"),A,k):e=="{"?E(C("}"),T,U,k,N):e==";"?E():e=="attribute"?E(D):e=="function"?E($):e=="for"?E(C("form"),L("("),C(")"),X,L(")"),k,A,k):e=="variable"?E(C("stat"),F):e=="switch"?E(C("form"),O,C("}","switch"),L("{"),U,k,k):e=="case"?E(O,L(":")):e=="default"?E(L(":")):e=="catch"?E(C("form"),T,L("("),G,L(")"),A,k,N):e=="import"?E(B,L(";")):e=="typedef"?E(j):w(C("stat"),O,L(";"),k)}function O(e){return p.hasOwnProperty(e)?E(_):e=="function"?E($):e=="keyword c"?E(M):e=="("?E(C(")"),M,L(")"),k,_):e=="operator"?E(O):e=="["?E(C("]"),R(O,"]"),k,_):e=="{"?E(C("}"),R(q,"}"),k,_):E()}function M(e){return e.match(/[;\}\)\],]/)?w():w(O)}function _(e,t){if(e=="operator"&&/\+\+|--/.test(t))return E(_);if(e=="operator"||e==":")return E(O);if(e==";")return;if(e=="(")return E(C(")"),R(O,")"),k,_);if(e==".")return E(I,_);if(e=="[")return E(C("]"),O,L("]"),k,_)}function D(e,t){if(e=="attribute")return E(D);if(e=="function")return E($);if(e=="var")return E(z)}function P(e,t){if(e==":")return E(P);if(e=="variable")return E(P);if(e=="(")return E(C(")"),comasep(H,")"),k,A)}function H(e,t){if(typ=="variable")return E()}function B(e,t){if(e=="variable"&&/[A-Z]/.test(t.charAt(0)))return y(t),E();if(e=="variable"||e=="property"||e==".")return E(B)}function j(e,t){if(e=="variable"&&/[A-Z]/.test(t.charAt(0)))return y(t),E()}function F(e){return e==":"?E(k,A):w(_,L(";"),k)}function I(e){if(e=="variable")return b.marked="property",E()}function q(e){e=="variable"&&(b.marked="property");if(p.hasOwnProperty(e))return E(L(":"),O)}function R(e,t){function n(r){return r==","?E(e,n):r==t?E():E(L(t))}return function(i){return i==t?E():w(e,n)}}function U(e){return e=="}"?E():w(A,U)}function z(e,t){return e=="variable"?(S(t),E(J,W)):E()}function W(e,t){if(t=="=")return E(O,W);if(e==",")return E(z)}function X(e,t){return e=="variable"&&S(t),E(C(")"),T,V,O,k,A,N)}function V(e,t){if(t=="in")return E()}function $(e,t){if(e=="variable")return S(t),E($);if(t=="new")return E($);if(e=="(")return E(C(")"),T,R(G,")"),k,J,A,N)}function J(e,t){if(e==":")return E(K)}function K(e,t){if(e=="type")return E();if(e=="variable")return E();if(e=="{")return E(C("}"),R(Q,"}"),k)}function Q(e,t){if(e=="variable")return E(J)}function G(e,t){if(e=="variable")return S(t),E(J)}var n=e.indentUnit,r=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),s={type:"atom",style:"atom"},o={type:"attribute",style:"attribute"},u=e("typedef");return{"if":t,"while":t,"else":n,"do":n,"try":n,"return":r,"break":r,"continue":r,"new":r,"throw":r,"var":e("var"),inline:o,"static":o,using:e("import"),"public":o,"private":o,cast:e("cast"),"import":e("import"),macro:e("macro"),"function":e("function"),"catch":e("catch"),untyped:e("untyped"),callback:e("cb"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,never:e("property_access"),trace:e("trace"),"class":u,"enum":u,"interface":u,typedef:u,"extends":u,"implements":u,dynamic:u,"true":s,"false":s,"null":s}}(),i=/[+\-*&%=<>!?|]/,u,a,p={atom:!0,number:!0,variable:!0,string:!0,regexp:!0},b={state:null,column:null,marked:null,cc:null},x={name:"this",next:null};return k.lex=!0,{startState:function(e){var r=["Int","Float","String","Void","Std","Bool","Dynamic","Array"];return{tokenize:l,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new d((e||0)-n,0,"block",!1),localVars:t.localVars,importedtypes:r,context:t.localVars&&{vars:t.localVars},indented:0}},token:function(e,t){e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation());if(e.eatSpace())return null;var n=t.tokenize(e,t);return u=="comment"?n:(t.reAllowed=u=="operator"||u=="keyword c"||!!u.match(/^[\[{}\(,;:]$/),t.kwAllowed=u!=".",m(t,n,u,a,e))},indent:function(e,t){if(e.tokenize!=l)return 0;var r=t&&t.charAt(0),i=e.lexical;i.type=="stat"&&r=="}"&&(i=i.prev);var s=i.type,o=r==s;return s=="vardef"?i.indented+4:s=="form"&&r=="{"?i.indented:s=="stat"||s=="form"?i.indented+n:i.info=="switch"&&!o?i.indented+(/^(?:case|default)\b/.test(t)?n:2*n):i.align?i.column+(o?0:1):i.indented+(o?0:n)},compareStates:function(e,t){return e.localVars==t.localVars&&e.context==t.context},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-haxe","haxe"),CodeMirror.defineMode("htmlembedded",function(e,t){function o(e,t){return e.match(n,!1)?(t.token=u,i.token(e,t.scriptState)):s.token(e,t.htmlState)}function u(e,t){return e.match(r,!1)?(t.token=o,s.token(e,t.htmlState)):i.token(e,t.scriptState)}var n=t.scriptStartRegex||/^<%/i,r=t.scriptEndRegex||/^%>/i,i,s;return{startState:function(){return i=i||CodeMirror.getMode(e,t.scriptingModeSpec),s=s||CodeMirror.getMode(e,"htmlmixed"),{token:t.startOpen?u:o,htmlState:s.startState(),scriptState:i.startState()}},token:function(e,t){return t.token(e,t)},indent:function(e,t){return e.token==o?s.indent(e.htmlState,t):i.indent(e.scriptState,t)},copyState:function(e){return{token:e.token,htmlState:CodeMirror.copyState(s,e.htmlState),scriptState:CodeMirror.copyState(i,e.scriptState)}},electricChars:"/{}:"}},"htmlmixed"),CodeMirror.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),CodeMirror.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),CodeMirror.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),CodeMirror.defineMode("htmlmixed",function(e,t){function s(e,t){var s=n.token(e,t.htmlState);return s=="tag"&&e.current()==">"&&t.htmlState.context&&(/^script$/i.test(t.htmlState.context.tagName)?(t.token=u,t.localState=r.startState(n.indent(t.htmlState,"")),t.mode="javascript"):/^style$/i.test(t.htmlState.context.tagName)&&(t.token=a,t.localState=i.startState(n.indent(t.htmlState,"")),t.mode="css")),s}function o(e,t,n){var r=e.current(),i=r.search(t);return i>-1&&e.backUp(r.length-i),n}function u(e,t){return e.match(/^<\/\s*script\s*>/i,!1)?(t.token=s,t.localState=null,t.mode="html",s(e,t)):o(e,/<\/\s*script\s*>/,r.token(e,t.localState))}function a(e,t){return e.match(/^<\/\s*style\s*>/i,!1)?(t.token=s,t.localState=null,t.mode="html",s(e,t)):o(e,/<\/\s*style\s*>/,i.token(e,t.localState))}var n=CodeMirror.getMode(e,{name:"xml",htmlMode:!0}),r=CodeMirror.getMode(e,"javascript"),i=CodeMirror.getMode(e,"css");return{startState:function(){var e=n.startState();return{token:s,localState:null,mode:"html",htmlState:e}},copyState:function(e){if(e.localState)var t=CodeMirror.copyState(e.token==a?i:r,e.localState);return{token:e.token,localState:t,mode:e.mode,htmlState:CodeMirror.copyState(n,e.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t){return e.token==s||/^\s*<\//.test(t)?n.indent(e.htmlState,t):e.token==u?r.indent(e.localState,t):i.indent(e.localState,t)},compareStates:function(e,t){return e.mode!=t.mode?!1:e.localState?CodeMirror.Pass:n.compareStates(e.htmlState,t.htmlState)},electricChars:"/{}:"}},"xml","javascript","css"),CodeMirror.defineMIME("text/html","htmlmixed"),CodeMirror.defineMode("javascript",function(e,t){function o(e,t,n){return t.tokenize=n,n(e,t)}function u(e,t){var n=!1,r;while((r=e.next())!=null){if(r==t&&!n)return!1;n=!n&&r=="\\"}return n}function l(e,t,n){return a=e,f=n,t}function c(e,t){var n=e.next();if(n=='"'||n=="'")return o(e,t,h(n));if(/[\[\]{}\(\),;\:\.]/.test(n))return l(n);if(n=="0"&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),l("number","number");if(/\d/.test(n)||n=="-"&&e.eat(/\d/))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),l("number","number");if(n=="/")return e.eat("*")?o(e,t,p):e.eat("/")?(e.skipToEnd(),l("comment","comment")):t.reAllowed?(u(e,"/"),e.eatWhile(/[gimy]/),l("regexp","string-2")):(e.eatWhile(s),l("operator",null,e.current()));if(n=="#")return e.skipToEnd(),l("error","error");if(s.test(n))return e.eatWhile(s),l("operator",null,e.current());e.eatWhile(/[\w\$_]/);var r=e.current(),a=i.propertyIsEnumerable(r)&&i[r];return a&&t.kwAllowed?l(a.type,a.style,r):l("variable","variable",r)}function h(e){return function(t,n){return u(t,e)||(n.tokenize=c),l("string","string")}}function p(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=c;break}n=r=="*"}return l("comment","comment")}function v(e,t,n,r,i,s){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=s,r!=null&&(this.align=r)}function m(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0}function g(e,t,n,i,s){var o=e.cc;y.state=e,y.stream=s,y.marked=null,y.cc=o,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);for(;;){var u=o.length?o.pop():r?A:L;if(u(n,i)){while(o.length&&o[o.length-1].lex)o.pop()();return y.marked?y.marked:n=="variable"&&m(e,i)?"variable-2":t}}}function b(){for(var e=arguments.length-1;e>=0;e--)y.cc.push(arguments[e])}function w(){return b.apply(null,arguments),!0}function E(e){var t=y.state;if(t.context){y.marked="def";for(var n=t.localVars;n;n=n.next)if(n.name==e)return;t.localVars={name:e,next:t.localVars}}}function x(){y.state.context||(y.state.localVars=S),y.state.context={prev:y.state.context,vars:y.state.localVars}}function T(){y.state.localVars=y.state.context.vars,y.state.context=y.state.context.prev}function N(e,t){var n=function(){var n=y.state;n.lexical=new v(n.indented,y.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function C(){var e=y.state;e.lexical.prev&&(e.lexical.type==")"&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function k(e){return function(n){return n==e?w():e==";"?b():w(arguments.callee)}}function L(e){return e=="var"?w(N("vardef"),j,k(";"),C):e=="keyword a"?w(N("form"),A,L,C):e=="keyword b"?w(N("form"),L,C):e=="{"?w(N("}"),B,C):e==";"?w():e=="function"?w(z):e=="for"?w(N("form"),k("("),N(")"),I,k(")"),C,L,C):e=="variable"?w(N("stat"),_):e=="switch"?w(N("form"),A,N("}","switch"),k("{"),B,C,C):e=="case"?w(A,k(":")):e=="default"?w(k(":")):e=="catch"?w(N("form"),x,k("("),W,k(")"),L,C,T):b(N("stat"),A,k(";"),C)}function A(e){return d.hasOwnProperty(e)?w(M):e=="function"?w(z):e=="keyword c"?w(O):e=="("?w(N(")"),O,k(")"),C,M):e=="operator"?w(A):e=="["?w(N("]"),H(A,"]"),C,M):e=="{"?w(N("}"),H(P,"}"),C,M):w()}function O(e){return e.match(/[;\}\)\],]/)?b():b(A)}function M(e,t){if(e=="operator"&&/\+\+|--/.test(t))return w(M);if(e=="operator"||e==":")return w(A);if(e==";")return;if(e=="(")return w(N(")"),H(A,")"),C,M);if(e==".")return w(D,M);if(e=="[")return w(N("]"),A,k("]"),C,M)}function _(e){return e==":"?w(C,L):b(M,k(";"),C)}function D(e){if(e=="variable")return y.marked="property",w()}function P(e){e=="variable"&&(y.marked="property");if(d.hasOwnProperty(e))return w(k(":"),A)}function H(e,t){function n(r){return r==","?w(e,n):r==t?w():w(k(t))}return function(i){return i==t?w():b(e,n)}}function B(e){return e=="}"?w():b(L,B)}function j(e,t){return e=="variable"?(E(t),w(F)):w()}function F(e,t){if(t=="=")return w(A,F);if(e==",")return w(j)}function I(e){return e=="var"?w(j,R):e==";"?b(R):e=="variable"?w(q):b(R)}function q(e,t){return t=="in"?w(A):w(M,R)}function R(e,t){return e==";"?w(U):t=="in"?w(A):w(A,k(";"),U)}function U(e){e!=")"&&w(A)}function z(e,t){if(e=="variable")return E(t),w(z);if(e=="(")return w(N(")"),x,H(W,")"),C,L,T)}function W(e,t){if(e=="variable")return E(t),w()}var n=e.indentUnit,r=t.json,i=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),s={type:"atom",style:"atom"};return{"if":t,"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":r,"break":r,"continue":r,"new":r,"delete":r,"throw":r,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":s,"false":s,"null":s,"undefined":s,NaN:s,Infinity:s}}(),s=/[+\-*&%=<>!?|]/,a,f,d={atom:!0,number:!0,variable:!0,string:!0,regexp:!0},y={state:null,column:null,marked:null,cc:null},S={name:"this",next:{name:"arguments"}};return C.lex=!0,{startState:function(e){return{tokenize:c,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new v((e||0)-n,0,"block",!1),localVars:t.localVars,context:t.localVars&&{vars:t.localVars},indented:0}},token:function(e,t){e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation());if(e.eatSpace())return null;var n=t.tokenize(e,t);return a=="comment"?n:(t.reAllowed=a=="operator"||a=="keyword c"||!!a.match(/^[\[{}\(,;:]$/),t.kwAllowed=a!=".",g(t,n,a,f,e))},indent:function(e,t){if(e.tokenize!=c)return 0;var r=t&&t.charAt(0),i=e.lexical;i.type=="stat"&&r=="}"&&(i=i.prev);var s=i.type,o=r==s;return s=="vardef"?i.indented+4:s=="form"&&r=="{"?i.indented:s=="stat"||s=="form"?i.indented+n:i.info=="switch"&&!o?i.indented+(/^(?:case|default)\b/.test(t)?n:2*n):i.align?i.column+(o?0:1):i.indented+(o?0:n)},electricChars:":{}"}}),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMode("jinja2",function(e,t){function r(e,t){var n=e.next();if(n=="{")if(n=e.eat(/\{|%|#/))return e.eat("-"),t.tokenize=i(n),"tag"}function i(e){return e=="{"&&(e="}"),function(t,i){var s=t.next();return(s==e||s=="-"&&t.eat(e))&&t.eat("}")?(i.tokenize=r,"tag"):t.match(n)?"keyword":e=="#"?"comment":"string"}}var n=["block","endblock","for","endfor","in","true","false","loop","none","self","super","if","as","not","and","else","import","with","without","context"];return n=new RegExp("^(("+n.join(")|(")+"))\\b"),{startState:function(){return{tokenize:r}},token:function(e,t){return t.tokenize(e,t)}}}),CodeMirror.defineMode("less",function(e){function r(e,t){return n=t,e}function s(e){for(var t=0;t<i.length;t++)if(e===i[t])return!0}function o(e,t){var n=e.next();if(n=="@")return e.eatWhile(/[\w\-]/),r("meta",e.current());if(n=="/"&&e.eat("*"))return t.tokenize=a,a(e,t);if(n=="<"&&e.eat("!"))return t.tokenize=f,f(e,t);if(n!="=")return n!="~"&&n!="|"||!e.eat("=")?n=='"'||n=="'"?(t.tokenize=l(n),t.tokenize(e,t)):n=="/"?e.eat("/")?(t.tokenize=u,u(e,t)):(e.eatWhile(/[\a-zA-Z0-9\-_.\s]/),/\/|\)|#/.test(e.peek()||e.eol()||e.eatSpace()&&e.peek()==")")?r("string","string"):r("number","unit")):n=="!"?(e.match(/^\s*\w*/),r("keyword","important")):/\d/.test(n)?(e.eatWhile(/[\w.%]/),r("number","unit")):/[,+<>*\/]/.test(n)?r(null,"select-op"):/[;{}:\[\]()]/.test(n)?n==":"?(e.eatWhile(/[active|hover|link|visited]/),e.current().match(/active|hover|link|visited/)?r("tag","tag"):r(null,n)):r(null,n):n=="."?(e.eatWhile(/[\a-zA-Z0-9\-_]/),r("tag","tag")):n=="#"?(e.eatWhile(/[A-Za-z0-9]/),e.current().length===4||e.current().length===7?e.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false)!=null?e.current().substring(1)!=e.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false)?r("atom","tag"):(e.eatSpace(),/[\/<>.(){!$%^&*_\-\\?=+\|#'~`]/.test(e.peek())?r("atom","tag"):e.peek()=="}"?r("number","unit"):/[a-zA-Z\\]/.test(e.peek())?r("atom","tag"):e.eol()?r("atom","tag"):r("number","unit")):(e.eatWhile(/[\w\\\-]/),r("atom","tag")):(e.eatWhile(/[\w\\\-]/),r("atom","tag"))):n=="&"?(e.eatWhile(/[\w\-]/),r(null,n)):(e.eatWhile(/[\w\\\-_%.{]/),e.current().match(/http|https/)!=null?(e.eatWhile(/[\w\\\-_%.{:\/]/),r("string","string")):e.peek()=="<"||e.peek()==">"?r("tag","tag"):e.peek().match(/\(/)!=null?r(null,n):e.peek()=="/"&&t.stack[t.stack.length-1]!=undefined?r("string","string"):e.current().match(/\-\d|\-.\d/)?r("number","unit"):s(e.current())?r("tag","tag"):/\/|[\s\)]/.test(e.peek()||e.eol()||e.eatSpace()&&e.peek()=="/")&&e.current().indexOf(".")!==-1?e.current().substring(e.current().length-1,e.current().length)=="{"?(e.backUp(1),r("tag","tag")):e.eatSpace()&&e.peek().match(/[{<>.a-zA-Z]/)!=null||e.eol()?r("tag","tag"):r("string","string"):e.eol()?(e.current().substring(e.current().length-1,e.current().length)=="{"&&e.backUp(1),r("tag","tag")):r("variable","variable")):r(null,"compare");r(null,"compare")}function u(e,t){return e.skipToEnd(),t.tokenize=o,r("comment","comment")}function a(e,t){var n=!1,i;while((i=e.next())!=null){if(n&&i=="/"){t.tokenize=o;break}n=i=="*"}return r("comment","comment")}function f(e,t){var n=0,i;while((i=e.next())!=null){if(n>=2&&i==">"){t.tokenize=o;break}n=i=="-"?n+1:0}return r("comment","comment")}function l(e){return function(t,n){var i=!1,s;while((s=t.next())!=null){if(s==e&&!i)break;i=!i&&s=="\\"}return i||(n.tokenize=o),r("string","string")}}var t=e.indentUnit,n,i=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","legend","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr"];return{startState:function(e){return{tokenize:o,baseIndent:e||0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;var r=t.tokenize(e,t),i=t.stack[t.stack.length-1];if(n=="hash"&&i=="rule")r="atom";else if(r=="variable")if(i=="rule")r=null;else if(!i||i=="@media{")r=e.current()=="when"?"variable":e.string.match(/#/g)!=undefined?null:/[\s,|\s\)]/.test(e.peek())?"tag":null;return i=="rule"&&/^[\{\};]$/.test(n)&&t.stack.pop(),n=="{"?i=="@media"?t.stack[t.stack.length-1]="@media{":t.stack.push("{"):n=="}"?t.stack.pop():n=="@media"?t.stack.push("@media"):i=="{"&&n!="comment"&&t.stack.push("rule"),r},indent:function(e,n){var r=e.stack.length;return/^\}/.test(n)&&(r-=e.stack[e.stack.length-1]=="rule"?2:1),e.baseIndent+r*t},electricChars:"}"}}),CodeMirror.defineMIME("text/x-less","less"),CodeMirror.mimeModes.hasOwnProperty("text/css")||CodeMirror.defineMIME("text/css","less"),CodeMirror.defineMode("lua",function(e,t){function r(e){return new RegExp("^(?:"+e.join("|")+")","i")}function i(e){return new RegExp("^(?:"+e.join("|")+")$","i")}function c(e){var t=0;while(e.eat("="))++t;return e.eat("["),t}function h(e,t){var n=e.next();return n=="-"&&e.eat("-")?e.eat("[")?(t.cur=p(c(e),"comment"))(e,t):(e.skipToEnd(),"comment"):n=='"'||n=="'"?(t.cur=d(n))(e,t):n=="["&&/[\[=]/.test(e.peek())?(t.cur=p(c(e),"string"))(e,t):/\d/.test(n)?(e.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(n)?(e.eatWhile(/[\w\\\-_.]/),"variable"):null}function p(e,t){return function(n,r){var i=null,s;while((s=n.next())!=null)if(i==null)s=="]"&&(i=0);else if(s=="=")++i;else{if(s=="]"&&i==e){r.cur=h;break}i=null}return t}}function d(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r)break;r=!r&&i=="\\"}return r||(n.cur=h),"string"}}var n=e.indentUnit,s=i(t.specials||[]),o=i(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]),u=i(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),a=i(["function","if","repeat","do","\\(","{"]),f=i(["end","until","\\)","}"]),l=r(["end","until","\\)","}","else","elseif"]);return{startState:function(e){return{basecol:e||0,indentDepth:0,cur:h}},token:function(e,t){if(e.eatSpace())return null;var n=t.cur(e,t),r=e.current();return n=="variable"&&(u.test(r)?n="keyword":o.test(r)?n="builtin":s.test(r)&&(n="variable-2")),n!="comment"&&n!="string"&&(a.test(r)?++t.indentDepth:f.test(r)&&--t.indentDepth),n},indent:function(e,t){var r=l.test(t);return e.basecol+n*(e.indentDepth-(r?1:0))}}}),CodeMirror.defineMIME("text/x-lua","lua"),CodeMirror.defineMode("markdown",function(e,t){function b(e,t,n){return t.f=t.inline=n,n(e,t)}function w(e,t,n){return t.f=t.block=n,n(e,t)}function E(e){return e.em=!1,e.strong=!1,!n&&e.f==x&&(e.f=C,e.block=S),null}function S(e,t){var n;if(t.indentationDiff>=4)return t.indentation-=t.indentationDiff,e.skipToEnd(),s;if(e.eatSpace())return null;if(e.peek()==="#"||e.match(g))t.header=!0;else if(e.eat(">"))t.indentation++,t.quote=!0;else{if(e.peek()==="[")return b(e,t,A);if(e.match(d,!0))return a;if(n=e.match(v,!0)||e.match(m,!0))return t.indentation+=n[0].length,u}return b(e,t,t.inline)}function x(e,t){var i=r.token(e,t.htmlState);return n&&i==="tag"&&t.htmlState.type!=="openTag"&&!t.htmlState.context&&(t.f=C,t.block=S),t.md_inside&&e.current().indexOf(">")!=-1&&(t.f=C,t.block=S,t.htmlState.context=undefined),i}function T(e){var t=[];return e.strong?t.push(e.em?p:h):e.em&&t.push(c),e.header&&t.push(i),e.quote&&t.push(o),t.length?t.join(" "):null}function N(e,t){return e.match(y,!0)?T(t):undefined}function C(e,t){var n=t.text(e,t);if(typeof n!="undefined")return n;var r=e.next();if(r==="\\")return e.next(),T(t);if(r==="`")return b(e,t,_(s,"`"));if(r==="[")return b(e,t,k);if(r==="<"&&e.match(/^\w/,!1)){var i=!1;if(e.string.indexOf(">")!=-1){var o=e.string.substring(1,e.string.indexOf(">"));/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(o)&&(t.md_inside=!0)}return e.backUp(1),w(e,t,x)}if(r==="<"&&e.match(/^\/\w*?>/))return t.md_inside=!1,"tag";var u=T(t);return r==="*"||r==="_"?e.eat(r)?(t.strong=!t.strong)?T(t):u:(t.em=!t.em)?T(t):u:T(t)}function k(e,t){while(!e.eol()){var n=e.next();n==="\\"&&e.next();if(n==="]")return t.inline=t.f=L,f}return f}function L(e,t){e.eatSpace();var n=e.next();return n==="("||n==="["?b(e,t,_(l,n==="("?")":"]")):"error"}function A(e,t){return e.match(/^[^\]]*\]:/,!0)?(t.f=O,f):b(e,t,C)}function O(e,t){return e.eatSpace(),e.match(/^[^\s]+/,!0),t.f=t.inline=C,l}function M(e){return M[e]||(M[e]=new RegExp("^(?:[^\\\\\\"+e+"]|\\\\.)*(?:\\"+e+"|$)")),M[e]}function _(e,t,n){return n=n||C,function(r,i){return r.match(M(t)),i.inline=i.f=n,e}}var n=CodeMirror.mimeModes.hasOwnProperty("text/html"),r=CodeMirror.getMode(e,n?"text/html":"text/plain"),i="header",s="comment",o="quote",u="string",a="hr",f="link",l="string",c="em",h="strong",p="emstrong",d=/^([*\-=_])(?:\s*\1){2,}\s*$/,v=/^[*\-+]\s+/,m=/^[0-9]+\.\s+/,g=/^(?:\={3,}|-{3,})$/,y=/^[^\[*_\\<>`]+/;return{startState:function(){return{f:S,block:S,htmlState:CodeMirror.startState(r),indentation:0,inline:C,text:N,em:!1,strong:!1,header:!1,quote:!1}},copyState:function(e){return{f:e.f,block:e.block,htmlState:CodeMirror.copyState(r,e.htmlState),indentation:e.indentation,inline:e.inline,text:e.text,em:e.em,strong:e.strong,header:e.header,quote:e.quote,md_inside:e.md_inside}},token:function(e,t){if(e.sol()){if(e.match(/^\s*$/,!0))return E(t);t.header=!1,t.quote=!1,t.f=t.block;var n=e.match(/^\s*/,!0)[0].replace(/\t/g,"    ").length;t.indentationDiff=n-t.indentation,t.indentation=n;if(n>0)return null}return t.f(e,t)},blankLine:E,getType:T}},"xml"),CodeMirror.defineMIME("text/x-markdown","markdown"),CodeMirror.defineMode("mysql",function(e){function r(e){return new RegExp("^(?:"+e.join("|")+")$","i")}function u(e,t){var r=e.next();n=null;if(r=="$"||r=="?")return e.match(/^[\w\d]*/),"variable-2";if(r=="<"&&!e.match(/^[\s\u00a0=]/,!1))return e.match(/^[^\s\u00a0>]*>?/),"atom";if(r=='"'||r=="'")return t.tokenize=a(r),t.tokenize(e,t);if(r=="`")return t.tokenize=f(r),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(r))return n=r,null;if(r!="-"){if(o.test(r))return e.eatWhile(o),null;if(r==":")return e.eatWhile(/[\w\d\._\-]/),"atom";e.eatWhile(/[_\w\d]/);if(e.eat(":"))return e.eatWhile(/[\w\d_\-]/),"atom";var l=e.current(),c;return i.test(l)?null:s.test(l)?"keyword":"variable"}var u=e.next();if(u=="-")return e.skipToEnd(),"comment"}function a(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r){n.tokenize=u;break}r=!r&&i=="\\"}return"string"}}function f(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r){n.tokenize=u;break}r=!r&&i=="\\"}return"variable-2"}}function l(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function c(e){e.indent=e.context.indent,e.context=e.context.prev}var t=e.indentUnit,n,i=r(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","isblank","isliteral","union","a"]),s=r(["ACCESSIBLE","ALTER","AS","BEFORE","BINARY","BY","CASE","CHARACTER","COLUMN","CONTINUE","CROSS","CURRENT_TIMESTAMP","DATABASE","DAY_MICROSECOND","DEC","DEFAULT","DESC","DISTINCT","DOUBLE","EACH","ENCLOSED","EXIT","FETCH","FLOAT8","FOREIGN","GRANT","HIGH_PRIORITY","HOUR_SECOND","IN","INNER","INSERT","INT2","INT8","INTO","JOIN","KILL","LEFT","LINEAR","LOCALTIME","LONG","LOOP","MATCH","MEDIUMTEXT","MINUTE_SECOND","NATURAL","NULL","OPTIMIZE","OR","OUTER","PRIMARY","RANGE","READ_WRITE","REGEXP","REPEAT","RESTRICT","RIGHT","SCHEMAS","SENSITIVE","SHOW","SPECIFIC","SQLSTATE","SQL_CALC_FOUND_ROWS","STARTING","TERMINATED","TINYINT","TRAILING","UNDO","UNLOCK","USAGE","UTC_DATE","VALUES","VARCHARACTER","WHERE","WRITE","ZEROFILL","ALL","AND","ASENSITIVE","BIGINT","BOTH","CASCADE","CHAR","COLLATE","CONSTRAINT","CREATE","CURRENT_TIME","CURSOR","DAY_HOUR","DAY_SECOND","DECLARE","DELETE","DETERMINISTIC","DIV","DUAL","ELSEIF","EXISTS","FALSE","FLOAT4","FORCE","FULLTEXT","HAVING","HOUR_MINUTE","IGNORE","INFILE","INSENSITIVE","INT1","INT4","INTERVAL","ITERATE","KEYS","LEAVE","LIMIT","LOAD","LOCK","LONGTEXT","MASTER_SSL_VERIFY_SERVER_CERT","MEDIUMINT","MINUTE_MICROSECOND","MODIFIES","NO_WRITE_TO_BINLOG","ON","OPTIONALLY","OUT","PRECISION","PURGE","READS","REFERENCES","RENAME","REQUIRE","REVOKE","SCHEMA","SELECT","SET","SPATIAL","SQLEXCEPTION","SQL_BIG_RESULT","SSL","TABLE","TINYBLOB","TO","TRUE","UNIQUE","UPDATE","USING","UTC_TIMESTAMP","VARCHAR","WHEN","WITH","YEAR_MONTH","ADD","ANALYZE","ASC","BETWEEN","BLOB","CALL","CHANGE","CHECK","CONDITION","CONVERT","CURRENT_DATE","CURRENT_USER","DATABASES","DAY_MINUTE","DECIMAL","DELAYED","DESCRIBE","DISTINCTROW","DROP","ELSE","ESCAPED","EXPLAIN","FLOAT","FOR","FROM","GROUP","HOUR_MICROSECOND","IF","INDEX","INOUT","INT","INT3","INTEGER","IS","KEY","LEADING","LIKE","LINES","LOCALTIMESTAMP","LONGBLOB","LOW_PRIORITY","MEDIUMBLOB","MIDDLEINT","MOD","NOT","NUMERIC","OPTION","ORDER","OUTFILE","PROCEDURE","READ","REAL","RELEASE","REPLACE","RETURN","RLIKE","SECOND_MICROSECOND","SEPARATOR","SMALLINT","SQL","SQLWARNING","SQL_SMALL_RESULT","STRAIGHT_JOIN","THEN","TINYTEXT","TRIGGER","UNION","UNSIGNED","USE","UTC_TIME","VARBINARY","VARYING","WHILE","XOR","FULL","COLUMNS","MIN","MAX","STDEV","COUNT"]),o=/[*+\-<>=&|]/;return{startState:function(e){return{tokenize:u,context:null,indent:0,col:0}},token:function(e,t){e.sol()&&(t.context&&t.context.align==null&&(t.context.align=!1),t.indent=e.indentation());if(e.eatSpace())return null;var r=t.tokenize(e,t);r!="comment"&&t.context&&t.context.align==null&&t.context.type!="pattern"&&(t.context.align=!0);if(n=="(")l(t,")",e.column());else if(n=="[")l(t,"]",e.column());else if(n=="{")l(t,"}",e.column());else if(/[\]\}\)]/.test(n)){while(t.context&&t.context.type=="pattern")c(t);t.context&&n==t.context.type&&c(t)}else n=="."&&t.context&&t.context.type=="pattern"?c(t):/atom|string|variable/.test(r)&&t.context&&(/[\}\]]/.test(t.context.type)?l(t,"pattern",e.column()):t.context.type=="pattern"&&!t.context.align&&(t.context.align=!0,t.context.col=e.column()));return r},indent:function(e,n){var r=n&&n.charAt(0),i=e.context;if(/[\]\}]/.test(r))while(i&&i.type=="pattern")i=i.prev;var s=i&&r==i.type;return i?i.type=="pattern"?i.col:i.align?i.col+(s?0:1):i.indent+(s?0:t):0}}}),CodeMirror.defineMIME("text/x-mysql","mysql"),CodeMirror.defineMode("ntriples",function(){function e(e,t){var n=e.location,r;n==Location.PRE_SUBJECT&&t=="<"?r=Location.WRITING_SUB_URI:n==Location.PRE_SUBJECT&&t=="_"?r=Location.WRITING_BNODE_URI:n==Location.PRE_PRED&&t=="<"?r=Location.WRITING_PRED_URI:n==Location.PRE_OBJ&&t=="<"?r=Location.WRITING_OBJ_URI:n==Location.PRE_OBJ&&t=="_"?r=Location.WRITING_OBJ_BNODE:n==Location.PRE_OBJ&&t=='"'?r=Location.WRITING_OBJ_LITERAL:n==Location.WRITING_SUB_URI&&t==">"?r=Location.PRE_PRED:n==Location.WRITING_BNODE_URI&&t==" "?r=Location.PRE_PRED:n==Location.WRITING_PRED_URI&&t==">"?r=Location.PRE_OBJ:n==Location.WRITING_OBJ_URI&&t==">"?r=Location.POST_OBJ:n==Location.WRITING_OBJ_BNODE&&t==" "?r=Location.POST_OBJ:n==Location.WRITING_OBJ_LITERAL&&t=='"'?r=Location.POST_OBJ:n==Location.WRITING_LIT_LANG&&t==" "?r=Location.POST_OBJ:n==Location.WRITING_LIT_TYPE&&t==">"?r=Location.POST_OBJ:n==Location.WRITING_OBJ_LITERAL&&t=="@"?r=Location.WRITING_LIT_LANG:n==Location.WRITING_OBJ_LITERAL&&t=="^"?r=Location.WRITING_LIT_TYPE:t!=" "||n!=Location.PRE_SUBJECT&&n!=Location.PRE_PRED&&n!=Location.PRE_OBJ&&n!=Location.POST_OBJ?n==Location.POST_OBJ&&t=="."?r=Location.PRE_SUBJECT:r=Location.ERROR:r=n,e.location=r}return Location={PRE_SUBJECT:0,WRITING_SUB_URI:1,WRITING_BNODE_URI:2,PRE_PRED:3,WRITING_PRED_URI:4,PRE_OBJ:5,WRITING_OBJ_URI:6,WRITING_OBJ_BNODE:7,WRITING_OBJ_LITERAL:8,WRITING_LIT_LANG:9,WRITING_LIT_TYPE:10,POST_OBJ:11,ERROR:12},untilSpace=function(e){return e!=" "},untilEndURI=function(e){return e!=">"},{startState:function(){return{location:Location.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(t,n){var r=t.next();if(r=="<"){e(n,r);var i="";return t.eatWhile(function(e){return e!="#"&&e!=">"?(i+=e,!0):!1}),n.uris.push(i),t.match("#",!1)?"variable":(t.next(),e(n,">"),"variable")}if(r=="#"){var s="";return t.eatWhile(function(e){return e!=">"&&e!=" "?(s+=e,!0):!1}),n.anchors.push(s),"variable-2"}if(r==">")return e(n,">"),"variable";if(r=="_"){e(n,r);var o="";return t.eatWhile(function(e){return e!=" "?(o+=e,!0):!1}),n.bnodes.push(o),t.next(),e(n," "),"builtin"}if(r=='"')return e(n,r),t.eatWhile(function(e){return e!='"'}),t.next(),t.peek()!="@"&&t.peek()!="^"&&e(n,'"'),"string";if(r=="@"){e(n,"@");var u="";return t.eatWhile(function(e){return e!=" "?(u+=e,!0):!1}),n.langs.push(u),t.next(),e(n," "),"string-2"}if(r=="^"){t.next(),e(n,"^");var a="";return t.eatWhile(function(e){return e!=">"?(a+=e,!0):!1}),n.types.push(a),t.next(),e(n,">"),"variable"}r==" "&&e(n,r),r=="."&&e(n,r)}}}),CodeMirror.defineMIME("text/n-triples","ntriples"),CodeMirror.defineMode("ocaml",function(e){function n(e,n){var s=e.sol(),o=e.next();if(o==='"')return n.tokenize=r,n.tokenize(e,n);if(o==="("&&e.eat("*"))return n.commentLevel++,n.tokenize=i,n.tokenize(e,n);if(o==="~")return e.eatWhile(/\w/),"variable-2";if(o==="`")return e.eatWhile(/\w/),"quote";if(/\d/.test(o))return e.eatWhile(/[\d]/),e.eat(".")&&e.eatWhile(/[\d]/),"number";if(/[+\-*&%=<>!?|]/.test(o))return"operator";e.eatWhile(/\w/);var u=e.current();return t[u]||"variable"}function r(e,t){var r,i=!1,s=!1;while((r=e.next())!=null){if(r==='"'&&!s){i=!0;break}s=!s&&r==="\\"}return i&&!s&&(t.tokenize=n),"string"}function i(e,t){var r,i;while(t.commentLevel>0&&(i=e.next())!=null)r==="("&&i==="*"&&t.commentLevel++,r==="*"&&i===")"&&t.commentLevel--,r=i;return t.commentLevel<=0&&(t.tokenize=n),"comment"}var t={"true":"atom","false":"atom",let:"keyword",rec:"keyword","in":"keyword",of:"keyword",and:"keyword",succ:"keyword","if":"keyword",then:"keyword","else":"keyword","for":"keyword",to:"keyword","while":"keyword","do":"keyword",done:"keyword",fun:"keyword","function":"keyword",val:"keyword",type:"keyword",mutable:"keyword",match:"keyword","with":"keyword","try":"keyword",raise:"keyword",begin:"keyword",end:"keyword",open:"builtin",trace:"builtin",ignore:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin"};return{startState:function(){return{tokenize:n,commentLevel:0}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),CodeMirror.defineMIME("text/x-ocaml","ocaml"),CodeMirror.defineMode("pascal",function(e){function t(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}function s(e,t){var s=e.next();if(s=="#"&&t.startOfLine)return e.skipToEnd(),"meta";if(s=='"'||s=="'")return t.tokenize=o(s),t.tokenize(e,t);if(s=="("&&e.eat("*"))return t.tokenize=u,u(e,t);if(/[\[\]{}\(\),;\:\.]/.test(s))return null;if(/\d/.test(s))return e.eatWhile(/[\w\.]/),"number";if(s=="/"&&e.eat("/"))return e.skipToEnd(),"comment";if(i.test(s))return e.eatWhile(i),"operator";e.eatWhile(/[\w\$_]/);var a=e.current();return n.propertyIsEnumerable(a)?"keyword":r.propertyIsEnumerable(a)?"atom":"variable"}function o(e){return function(t,n){var r=!1,i,s=!1;while((i=t.next())!=null){if(i==e&&!r){s=!0;break}r=!r&&i=="\\"}if(s||!r)n.tokenize=null;return"string"}}function u(e,t){var n=!1,r;while(r=e.next()){if(r==")"&&n){t.tokenize=null;break}n=r=="*"}return"comment"}var n=t("and array begin case const div do downto else end file for forward integer boolean char function goto if in label mod nil not of or packed procedure program record repeat set string then to type until var while with"),r={"null":!0},i=/[+\-*&%=<>!?|\/]/;return{startState:function(e){return{tokenize:null}},token:function(e,t){if(e.eatSpace())return null;var n=(t.tokenize||s)(e,t);return n=="comment"||n=="meta"?n:n},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-pascal","pascal"),CodeMirror.defineMode("perl",function(e,t){function s(e,t,n,r,i){return t.chain=null,t.style=null,t.tail=null,t.tokenize=function(e,t){var s=!1,o,a=0;while(o=e.next()){if(o===n[a]&&!s)return n[++a]!==undefined?(t.chain=n[a],t.style=r,t.tail=i):i&&e.eatWhile(i),t.tokenize=u,r;s=!s&&o=="\\"}return r},t.tokenize(e,t)}function o(e,t,n){return t.tokenize=function(e,t){return e.string==n&&(t.tokenize=u),e.skipToEnd(),"string"},t.tokenize(e,t)}function u(e,t){if(e.eatSpace())return null;if(t.chain)return s(e,t,t.chain,t.style,t.tail);if(e.match(/^\-?[\d\.]/,!1)&&e.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(e.match(/^<<(?=\w)/))return e.eatWhile(/\w/),o(e,t,e.current().substr(2));if(e.sol()&&e.match(/^\=item(?!\w)/))return o(e,t,"=cut");var u=e.next();if(u=='"'||u=="'"){if(e.prefix(3)=="<<"+u){var a=e.pos;e.eatWhile(/\w/);var f=e.current().substr(1);if(f&&e.eat(u))return o(e,t,f);e.pos=a}return s(e,t,[u],"string")}if(u=="q"){var l=e.look(-2);if(!l||!/\w/.test(l)){l=e.look(0);if(l=="x"){l=e.look(1);if(l=="(")return e.eatSuffix(2),s(e,t,[")"],r,i);if(l=="[")return e.eatSuffix(2),s(e,t,["]"],r,i);if(l=="{")return e.eatSuffix(2),s(e,t,["}"],r,i);if(l=="<")return e.eatSuffix(2),s(e,t,[">"],r,i);if(/[\^'"!~\/]/.test(l))return e.eatSuffix(1),s(e,t,[e.eat(l)],r,i)}else if(l=="q"){l=e.look(1);if(l=="(")return e.eatSuffix(2),s(e,t,[")"],"string");if(l=="[")return e.eatSuffix(2),s(e,t,["]"],"string");if(l=="{")return e.eatSuffix(2),s(e,t,["}"],"string");if(l=="<")return e.eatSuffix(2),s(e,t,[">"],"string");if(/[\^'"!~\/]/.test(l))return e.eatSuffix(1),s(e,t,[e.eat(l)],"string")}else if(l=="w"){l=e.look(1);if(l=="(")return e.eatSuffix(2),s(e,t,[")"],"bracket");if(l=="[")return e.eatSuffix(2),s(e,t,["]"],"bracket");if(l=="{")return e.eatSuffix(2),s(e,t,["}"],"bracket");if(l=="<")return e.eatSuffix(2),s(e,t,[">"],"bracket");if(/[\^'"!~\/]/.test(l))return e.eatSuffix(1),s(e,t,[e.eat(l)],"bracket")}else if(l=="r"){l=e.look(1);if(l=="(")return e.eatSuffix(2),s(e,t,[")"],r,i);if(l=="[")return e.eatSuffix(2),s(e,t,["]"],r,i);if(l=="{")return e.eatSuffix(2),s(e,t,["}"],r,i);if(l=="<")return e.eatSuffix(2),s(e,t,[">"],r,i);if(/[\^'"!~\/]/.test(l))return e.eatSuffix(1),s(e,t,[e.eat(l)],r,i)}else if(/[\^'"!~\/(\[{<]/.test(l)){if(l=="(")return e.eatSuffix(1),s(e,t,[")"],"string");if(l=="[")return e.eatSuffix(1),s(e,t,["]"],"string");if(l=="{")return e.eatSuffix(1),s(e,t,["}"],"string");if(l=="<")return e.eatSuffix(1),s(e,t,[">"],"string");if(/[\^'"!~\/]/.test(l))return s(e,t,[e.eat(l)],"string")}}}if(u=="m"){var l=e.look(-2);if(!l||!/\w/.test(l)){l=e.eat(/[(\[{<\^'"!~\/]/);if(l){if(/[\^'"!~\/]/.test(l))return s(e,t,[l],r,i);if(l=="(")return s(e,t,[")"],r,i);if(l=="[")return s(e,t,["]"],r,i);if(l=="{")return s(e,t,["}"],r,i);if(l=="<")return s(e,t,[">"],r,i)}}}if(u=="s"){var l=/[\/>\]})\w]/.test(e.look(-2));if(!l){l=e.eat(/[(\[{<\^'"!~\/]/);if(l)return l=="["?s(e,t,["]","]"],r,i):l=="{"?s(e,t,["}","}"],r,i):l=="<"?s(e,t,[">",">"],r,i):l=="("?s(e,t,[")",")"],r,i):s(e,t,[l,l],r,i)}}if(u=="y"){var l=/[\/>\]})\w]/.test(e.look(-2));if(!l){l=e.eat(/[(\[{<\^'"!~\/]/);if(l)return l=="["?s(e,t,["]","]"],r,i):l=="{"?s(e,t,["}","}"],r,i):l=="<"?s(e,t,[">",">"],r,i):l=="("?s(e,t,[")",")"],r,i):s(e,t,[l,l],r,i)}}if(u=="t"){var l=/[\/>\]})\w]/.test(e.look(-2));if(!l){l=e.eat("r");if(l){l=e.eat(/[(\[{<\^'"!~\/]/);if(l)return l=="["?s(e,t,["]","]"],r,i):l=="{"?s(e,t,["}","}"],r,i):l=="<"?s(e,t,[">",">"],r,i):l=="("?s(e,t,[")",")"],r,i):s(e,t,[l,l],r,i)}}}if(u=="`")return s(e,t,[u],"variable-2");if(u=="/")return/~\s*$/.test(e.prefix())?s(e,t,[u],r,i):"operator";if(u=="$"){var a=e.pos;if(e.eatWhile(/\d/)||e.eat("{")&&e.eatWhile(/\d/)&&e.eat("}"))return"variable-2";e.pos=a}if(/[$@%]/.test(u)){var a=e.pos;if(e.eat("^")&&e.eat(/[A-Z]/)||!/[@$%&]/.test(e.look(-2))&&e.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var l=e.current();if(n[l])return"variable-2"}e.pos=a}if(/[$@%&]/.test(u))if(e.eatWhile(/[\w$\[\]]/)||e.eat("{")&&e.eatWhile(/[\w$\[\]]/)&&e.eat("}")){var l=e.current();return n[l]?"variable-2":"variable"}if(u=="#"&&e.look(-2)!="$")return e.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(u)){var a=e.pos;e.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/);if(n[e.current()])return"operator";e.pos=a}if(u=="_"&&e.pos==1){if(e.suffix(6)=="_END__")return s(e,t,["\0"],"comment");if(e.suffix(7)=="_DATA__")return s(e,t,["\0"],"variable-2");if(e.suffix(7)=="_C__")return s(e,t,["\0"],"string")}if(/\w/.test(u)){var a=e.pos;if(e.look(-2)=="{"&&(e.look(0)=="}"||e.eatWhile(/\w/)&&e.look(0)=="}"))return"string";e.pos=a}if(/[A-Z]/.test(u)){var c=e.look(-2),a=e.pos;e.eatWhile(/[A-Z_]/);if(!/[\da-z]/.test(e.look(0))){var l=n[e.current()];return l?(l[1]&&(l=l[0]),c!=":"?l==1?"keyword":l==2?"def":l==3?"atom":l==4?"operator":l==5?"variable-2":"meta":"meta"):"meta"}e.pos=a}if(/[a-zA-Z_]/.test(u)){var c=e.look(-2);e.eatWhile(/\w/);var l=n[e.current()];return l?(l[1]&&(l=l[0]),c!=":"?l==1?"keyword":l==2?"def":l==3?"atom":l==4?"operator":l==5?"variable-2":"meta":"meta"):"meta"}return null}var n={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,"if":[1,1],elsif:[1,1],"else":[1,1],"while":[1,1],unless:[1,1],"for":[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,"break":1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,"continue":[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,"default":1,defined:1,"delete":1,die:1,"do":1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,"goto":1,grep:1,hex:1,"import":1,index:1,"int":1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,"new":1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,"package":1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,"return":1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},r="string-2",i=/[goseximacplud]/;return{startState:function(){return{tokenize:u,chain:null,style:null,tail:null}},token:function(e,t){return(t.tokenize||u)(e,t)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-perl","perl"),CodeMirror.StringStream.prototype.look=function(e){return this.string.charAt(this.pos+(e||0))},CodeMirror.StringStream.prototype.prefix=function(e){if(e){var t=this.pos-e;return this.string.substr(t>=0?t:0,e)}return this.string.substr(0,this.pos-1)},CodeMirror.StringStream.prototype.suffix=function(e){var t=this.string.length,n=t-this.pos+1;return this.string.substr(this.pos,e&&e<t?e:n)},CodeMirror.StringStream.prototype.nsuffix=function(e){var t=this.pos,n=e||this.string.length-this.pos+1;return this.pos+=n,this.string.substr(t,n)},CodeMirror.StringStream.prototype.eatSuffix=function(e){var t=this.pos+e,n;t<=0?this.pos=0:t>=(n=this.string.length-1)?this.pos=n:this.pos=t},function(){function e(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}function t(e){return function(t,n){return t.match(e)?n.tokenize=null:t.skipToEnd(),"string"}}var n={name:"clike",keywords:e("abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent"),blockKeywords:e("catch do else elseif for foreach if switch try while"),atoms:e("true false null TRUE FALSE NULL"),multiLineStrings:!0,hooks:{$:function(e,t){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,n){return e.match(/<</)?(e.eatWhile(/[\w\.]/),n.tokenize=t(e.current().slice(3)),n.tokenize(e,n)):!1},"#":function(e,t){while(!e.eol()&&!e.match("?>",!1))e.next();return"comment"},"/":function(e,t){if(e.eat("/")){while(!e.eol()&&!e.match("?>",!1))e.next();return"comment"}return!1}}};CodeMirror.defineMode("php",function(e,t){function u(e,t){var n=t.mode=="php";e.sol()&&t.pending!='"'&&(t.pending=null);if(t.curMode==r){if(e.match(/^<\?\w*/))return t.curMode=o,t.curState=t.php,t.curClose="?>",t.mode="php","meta";if(t.pending=='"'){while(!e.eol()&&e.next()!='"');var a="string"}else if(t.pending&&e.pos<t.pending.end){e.pos=t.pending.end;var a=t.pending.style}else var a=r.token(e,t.curState);t.pending=null;var f=e.current(),l=f.search(/<\?/);return l!=-1?(a=="string"&&/\"$/.test(f)&&!/\?>/.test(f)?t.pending='"':t.pending={end:e.pos,style:a},e.backUp(f.length-l)):a=="tag"&&e.current()==">"&&t.curState.context&&(/^script$/i.test(t.curState.context.tagName)?(t.curMode=i,t.curState=i.startState(r.indent(t.curState,"")),t.curClose=/^<\/\s*script\s*>/i,t.mode="javascript"):/^style$/i.test(t.curState.context.tagName)&&(t.curMode=s,t.curState=s.startState(r.indent(t.curState,"")),t.curClose=/^<\/\s*style\s*>/i,t.mode="css")),a}return(!n||t.php.tokenize==null)&&e.match(t.curClose,n)?(t.curMode=r,t.curState=t.html,t.curClose=null,t.mode="html",n?"meta":u(e,t)):t.curMode.token(e,t.curState)}var r=CodeMirror.getMode(e,{name:"xml",htmlMode:!0}),i=CodeMirror.getMode(e,"javascript"),s=CodeMirror.getMode(e,"css"),o=CodeMirror.getMode(e,n);return{startState:function(){var e=r.startState();return{html:e,php:o.startState(),curMode:t.startOpen?o:r,curState:t.startOpen?o.startState():e,curClose:t.startOpen?/^\?>/:null,mode:t.startOpen?"php":"html",pending:null}},copyState:function(e){var t=e.html,n=CodeMirror.copyState(r,t),i=e.php,s=CodeMirror.copyState(o,i),u;return e.curState==t?u=n:e.curState==i?u=s:u=CodeMirror.copyState(e.curMode,e.curState),{html:n,php:s,curMode:e.curMode,curState:u,curClose:e.curClose,mode:e.mode,pending:e.pending}},token:u,indent:function(e,t){return e.curMode!=o&&/^\s*<\//.test(t)||e.curMode==o&&/^\?>/.test(t)?r.indent(e.html,t):e.curMode.indent(e.curState,t)},electricChars:"/{}:"}},"xml","clike","javascript","css"),CodeMirror.defineMIME("application/x-httpd-php","php"),CodeMirror.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),CodeMirror.defineMIME("text/x-php",n)}(),CodeMirror.defineMode("pig",function(e,t){function a(e,t,n){return t.tokenize=n,n(e,t)}function l(e,t){return f=e,t}function c(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=p;break}n=r=="*"}return l("comment","comment")}function h(e){return function(t,n){var r=!1,i,s=!1;while((i=t.next())!=null){if(i==e&&!r){s=!0;break}r=!r&&i=="\\"}if(s||!r&&!o)n.tokenize=p;return l("string","error")}}function p(e,t){var n=e.next();return n=='"'||n=="'"?a(e,t,h(n)):/[\[\]{}\(\),;\.]/.test(n)?l(n):/\d/.test(n)?(e.eatWhile(/[\w\.]/),l("number","number")):n=="/"?e.eat("*")?a(e,t,c):(e.eatWhile(u),l("operator","operator")):n=="-"?e.eat("-")?(e.skipToEnd(),l("comment","comment")):(e.eatWhile(u),l("operator","operator")):u.test(n)?(e.eatWhile(u),l("operator","operator")):(e.eatWhile(/[\w\$_]/),r&&r.propertyIsEnumerable(e.current().toUpperCase())&&!e.eat(")")&&!e.eat(".")?("keyword","keyword"):i&&i.propertyIsEnumerable(e.current().toUpperCase())?("keyword","variable-2"):s&&s.propertyIsEnumerable(e.current().toUpperCase())?("keyword","variable-3"):l("variable","pig-word"))}var n=e.indentUnit,r=t.keywords,i=t.builtins,s=t.types,o=t.multiLineStrings,u=/[*+\-%<>=&?:\/!|]/,f;return{startState:function(e){return{tokenize:p,startOfLine:!0}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t);return n}}}),function(){function e(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}var t="ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA  PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER ",n="VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE NEQ MATCHES TRUE FALSE ",r="BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP ";CodeMirror.defineMIME("text/x-pig",{name:"pig",builtins:e(t),keywords:e(n),types:e(r)})}(),CodeMirror.defineMode("plsql",function(e,t){function f(e,t,n){return t.tokenize=n,n(e,t)}function c(e,t){return l=e,t}function h(e,t){var n=e.next();return n=='"'||n=="'"?f(e,t,p(n)):/[\[\]{}\(\),;\.]/.test(n)?c(n):/\d/.test(n)?(e.eatWhile(/[\w\.]/),c("number","number")):n=="/"?e.eat("*")?f(e,t,d):(e.eatWhile(a),c("operator","operator")):n=="-"?e.eat("-")?(e.skipToEnd(),c("comment","comment")):(e.eatWhile(a),c("operator","operator")):n=="@"||n=="$"?(e.eatWhile(/[\w\d\$_]/),c("word","variable")):a.test(n)?(e.eatWhile(a),c("operator","operator")):(e.eatWhile(/[\w\$_]/),r&&r.propertyIsEnumerable(e.current().toLowerCase())?c("keyword","keyword"):i&&i.propertyIsEnumerable(e.current().toLowerCase())?c("keyword","builtin"):s&&s.propertyIsEnumerable(e.current().toLowerCase())?c("keyword","variable-2"):o&&o.propertyIsEnumerable(e.current().toLowerCase())?c("keyword","variable-3"):c("word","variable"))}function p(e){return function(t,n){var r=!1,i,s=!1;while((i=t.next())!=null){if(i==e&&!r){s=!0;break}r=!r&&i=="\\"}if(s||!r&&!u)n.tokenize=h;return c("string","plsql-string")}}function d(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=h;break}n=r=="*"}return c("comment","plsql-comment")}var n=e.indentUnit,r=t.keywords,i=t.functions,s=t.types,o=t.sqlplus,u=t.multiLineStrings,a=/[+\-*&%=<>!?:\/|]/,l;return{startState:function(e){return{tokenize:h,startOfLine:!0}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t);return n}}}),function(){function e(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}var t="abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work",n="abs acos add_months ascii asin atan atan2 average bfilename ceil chartorowid chr concat convert cos cosh count decode deref dual dump dup_val_on_index empty error exp false floor found glb greatest hextoraw initcap instr instrb isopen last_day least lenght lenghtb ln lower lpad ltrim lub make_ref max min mod months_between new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null nvl others power rawtohex reftohex round rowcount rowidtochar rpad rtrim sign sin sinh soundex sqlcode sqlerrm sqrt stddev substr substrb sum sysdate tan tanh to_char to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid upper user userenv variance vsize",r="bfile blob character clob dec float int integer mlslabel natural naturaln nchar nclob number numeric nvarchar2 real rowtype signtype smallint string varchar varchar2",i="appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap";CodeMirror.defineMIME("text/x-plsql",{name:"plsql",keywords:e(t),functions:e(n),types:e(r),sqlplus:e(i)})}(),CodeMirror.defineMode("properties",function(){return{token:function(e,t){var n=e.sol()||t.afterSection,r=e.eol();t.afterSection=!1,n&&(t.nextMultiline?(t.inMultiline=!0,t.nextMultiline=!1):t.position="def"),r&&!t.nextMultiline&&(t.inMultiline=!1,t.position="def");if(n)while(e.eatSpace());var i=e.next();return!n||i!=="#"&&i!=="!"&&i!==";"?n&&i==="["?(t.afterSection=!0,e.skipTo("]"),e.eat("]"),"header"):i==="="||i===":"?(t.position="quote",null):(i==="\\"&&t.position==="quote"&&e.next()!=="u"&&(t.nextMultiline=!0),t.position):(t.position="comment",e.skipToEnd(),"comment")},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),CodeMirror.defineMIME("text/x-properties","properties"),CodeMirror.defineMIME("text/x-ini","properties"),CodeMirror.defineMode("python",function(e,t){function r(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function b(e,t){if(e.sol()){var r=t.scopes[0].offset;if(e.eatSpace()){var c=e.indentation();return c>r?y="indent":c<r&&(y="dedent"),null}r>0&&S(e,t)}if(e.eatSpace())return null;var h=e.peek();if(h==="#")return e.skipToEnd(),"comment";if(e.match(/^[0-9\.]/,!1)){var p=!1;e.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)&&(p=!0),e.match(/^\d+\.\d*/)&&(p=!0),e.match(/^\.\d+/)&&(p=!0);if(p)return e.eat(/J/i),"number";var d=!1;e.match(/^0x[0-9a-f]+/i)&&(d=!0),e.match(/^0b[01]+/i)&&(d=!0),e.match(/^0o[0-7]+/i)&&(d=!0),e.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(e.eat(/J/i),d=!0),e.match(/^0(?![\dx])/i)&&(d=!0);if(d)return e.eat(/L/i),"number"}return e.match(v)?(t.tokenize=w(e.current()),t.tokenize(e,t)):e.match(a)||e.match(u)?null:e.match(o)||e.match(i)||e.match(l)?"operator":e.match(s)?null:e.match(m)?"keyword":e.match(g)?"builtin":e.match(f)?"variable":(e.next(),n)}function w(e){while("rub".indexOf(e.charAt(0).toLowerCase())>=0)e=e.substr(1);var r=e.length==1,i="string";return function(o,u){while(!o.eol()){o.eatWhile(/[^'"\\]/);if(o.eat("\\")){o.next();if(r&&o.eol())return i}else{if(o.match(e))return u.tokenize=b,i;o.eat(/['"]/)}}if(r){if(t.singleLineStringErrors)return n;u.tokenize=b}return i}}function E(t,n,r){r=r||"py";var i=0;if(r==="py"){if(n.scopes[0].type!=="py"){n.scopes[0].offset=t.indentation();return}for(var s=0;s<n.scopes.length;++s)if(n.scopes[s].type==="py"){i=n.scopes[s].offset+e.indentUnit;break}}else i=t.column()+t.current().length;n.scopes.unshift({offset:i,type:r})}function S(e,t,n){n=n||"py";if(t.scopes.length==1)return;if(t.scopes[0].type==="py"){var r=e.indentation(),i=-1;for(var s=0;s<t.scopes.length;++s)if(r===t.scopes[s].offset){i=s;break}if(i===-1)return!0;while(t.scopes[0].offset!==r)t.scopes.shift();return!1}return n==="py"?(t.scopes[0].offset=e.indentation(),!1):t.scopes[0].type!=n?!0:(t.scopes.shift(),!1)}function x(e,t){y=null;var r=t.tokenize(e,t),i=e.current();if(i===".")return r=e.match(f,!1)?null:n,r===null&&t.lastToken==="meta"&&(r="meta"),r;if(i==="@")return e.match(f,!1)?"meta":n;(r==="variable"||r==="builtin")&&t.lastToken==="meta"&&(r="meta");if(i==="pass"||i==="return")t.dedent+=1;i==="lambda"&&(t.lambda=!0),(i===":"&&!t.lambda&&t.scopes[0].type=="py"||y==="indent")&&E(e,t);var s="[({".indexOf(i);return s!==-1&&E(e,t,"])}".slice(s,s+1)),y==="dedent"&&S(e,t)?n:(s="])}".indexOf(i),s!==-1&&S(e,t,i)?n:(t.dedent>0&&e.eol()&&t.scopes[0].type=="py"&&(t.scopes.length>1&&t.scopes.shift(),t.dedent-=1),r))}var n="error",i=new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"),s=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),o=new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),u=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),a=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),f=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),l=r(["and","or","not","is","in"]),c=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield"],h=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"],p={builtins:["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"],keywords:["exec","print"]},d={builtins:["ascii","bytes","exec","print"],keywords:["nonlocal","False","True","None"]};if(!t.version||parseInt(t.version,10)!==3){c=c.concat(p.keywords),h=h.concat(p.builtins);var v=new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}else{c=c.concat(d.keywords),h=h.concat(d.builtins);var v=new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))","i")}var m=r(c),g=r(h),y=null,T={startState:function(e){return{tokenize:b,scopes:[{offset:e||0,type:"py"}],lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=x(e,t);return t.lastToken=n,e.eol()&&e.lambda&&(t.lambda=!1),n},indent:function(e,t){return e.tokenize!=b?0:e.scopes[0].offset}};return T}),CodeMirror.defineMIME("text/x-python","python"),CodeMirror.defineMode("r",function(e){function t(e){var t=e.split(" "),n={};for(var r=0;r<t.length;++r)n[t[r]]=!0;return n}function a(e,t){u=null;var a=e.next();if(a=="#")return e.skipToEnd(),"comment";if(a=="0"&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if(a=="."&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(a))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if(a=="'"||a=='"')return t.tokenize=f(a),"string";if(a=="."&&e.match(/.[.\d]+/))return"keyword";if(/[\w\.]/.test(a)&&a!="_"){e.eatWhile(/[\w\.]/);var l=e.current();return n.propertyIsEnumerable(l)?"atom":i.propertyIsEnumerable(l)?(s.propertyIsEnumerable(l)&&(u="block"),"keyword"):r.propertyIsEnumerable(l)?"builtin":"variable"}return a=="%"?(e.skipTo("%")&&e.next(),"variable-2"):a=="<"&&e.eat("-")?"arrow":a=="="&&t.ctx.argList?"arg-is":o.test(a)?a=="$"?"dollar":(e.eatWhile(o),"operator"):/[\(\){}\[\];]/.test(a)?(u=a,a==";"?"semi":null):null}function f(e){return function(t,n){if(t.eat("\\")){var r=t.next();return r=="x"?t.match(/^[a-f0-9]{2}/i):(r=="u"||r=="U")&&t.eat("{")&&t.skipTo("}")?t.next():r=="u"?t.match(/^[a-f0-9]{4}/i):r=="U"?t.match(/^[a-f0-9]{8}/i):/[0-7]/.test(r)&&t.match(/^[0-7]{1,2}/),"string-2"}var i;while((i=t.next())!=null){if(i==e){n.tokenize=a;break}if(i=="\\"){t.backUp(1);break}}return"string"}}function l(e,t,n){e.ctx={type:t,indent:e.indent,align:null,column:n.column(),prev:e.ctx}}function c(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}var n=t("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_"),r=t("list quote bquote eval return call parse deparse"),i=t("if else repeat while function for in next break"),s=t("if else repeat while function for"),o=/[+\-*\/^<>=!&|~$:]/,u;return{startState:function(t){return{tokenize:a,ctx:{type:"top",indent:-e.indentUnit,align:!1},indent:0,afterIdent:!1}},token:function(e,t){e.sol()&&(t.ctx.align==null&&(t.ctx.align=!1),t.indent=e.indentation());if(e.eatSpace())return null;var n=t.tokenize(e,t);n!="comment"&&t.ctx.align==null&&(t.ctx.align=!0);var r=t.ctx.type;return(u==";"||u=="{"||u=="}")&&r=="block"&&c(t),u=="{"?l(t,"}",e):u=="("?(l(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):u=="["?l(t,"]",e):u=="block"?l(t,"block",e):u==r&&c(t),t.afterIdent=n=="variable"||n=="keyword",n},indent:function(t,n){if(t.tokenize!=a)return 0;var r=n&&n.charAt(0),i=t.ctx,s=r==i.type;return i.type=="block"?i.indent+(r=="{"?0:e.indentUnit):i.align?i.column+(s?0:1):i.indent+(s?0:e.indentUnit)}}}),CodeMirror.defineMIME("text/x-rsrc","r"),CodeMirror.defineMode("changes",function(e,t){var n=/^-+$/,r=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,i=/^[\w+.-]+@[\w.-]+/;return{token:function(e){if(e.sol()){if(e.match(n))return"tag";if(e.match(r))return"tag"}return e.match(i)?"string":(e.next(),null)}}}),CodeMirror.defineMIME("text/x-rpm-changes","changes"),CodeMirror.defineMode("spec",function(e,t){var n=/^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,r=/^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|BuildRequires|BuildRoot|AutoReqProv|Provides|Requires(\(\w+\))?|Obsoletes|Conflicts|Recommends|Source\d*|Patch\d*|ExclusiveArch|NoSource|Supplements):/,i=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preun|postun|pre|post|triggerin|triggerun|pretrans|posttrans|verifyscript|check|triggerpostun|triggerprein|trigger)/,s=/^%(ifnarch|ifarch|if)/,o=/^%(else|endif)/,u=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(e,t){var a=e.peek();if(a=="#")return e.skipToEnd(),"comment";if(e.sol()){if(e.match(r))return"preamble";if(e.match(i))return"section"}if(e.match(/^\$\w+/))return"def";if(e.match(/^\$\{\w+\}/))return"def";if(e.match(o))return"keyword";if(e.match(s))return t.controlFlow=!0,"keyword";if(t.controlFlow){if(e.match(u))return"operator";if(e.match(/^(\d+)/))return"number";e.eol()&&(t.controlFlow=!1)}if(e.match(n))return"number";if(e.match(/^%[\w]+/))return e.match(/^\(/)&&(t.macroParameters=!0),"macro";if(t.macroParameters){if(e.match(/^\d+/))return"number";if(e.match(/^\)/))return t.macroParameters=!1,"macro"}return e.match(/^%\{\??[\w \-]+\}/)?"macro":(e.next(),null)}}}),CodeMirror.defineMIME("text/x-rpm-spec","spec"),CodeMirror.defineMode("rst",function(e,t){function n(e,t,n){e.fn=t,r(e,n)}function r(e,t){e.ctx=t||{}}function i(e,t){if(t&&typeof t!="string"){var r=t.current();t=r[r.length-1]}n(e,x,{back:t})}function s(e){if(e){var t=CodeMirror.listModes();for(var n in t)if(t[n]==e)return!0}return!1}function o(t){return s(t)?CodeMirror.getMode(e,t):null}function x(e,t){function c(e){return s||!t.ctx.back||e.test(t.ctx.back)}function h(t){return e.eol()||e.match(t,!1)}function p(t){return e.match(t)&&c(/\W/)&&h(/\W/)}var r,s,o;if(e.eat(/\\/))return r=e.next(),i(t,r),null;s=e.sol();if(s&&(r=e.eat(f))){for(o=0;e.eat(r);o++);if(o>=3&&e.match(/^\s*$/))return i(t,null),"header";e.backUp(o+1)}if(s&&e.match(m))return e.eol()||n(t,N),"meta";if(e.match(g)){if(!u)n(t,L);else{var l=u;n(t,L,{mode:l,local:l.startState()})}return"meta"}if(s&&e.match(S,!1)){if(!a)return n(t,L),"meta";var l=a;return n(t,L,{mode:l,local:l.startState()}),null}if(p(d))return i(t,e),"footnote";if(p(v))return i(t,e),"citation";r=e.next();if(c(y)){if(!(r!==":"&&r!=="|"||!e.eat(/\S/))){var b;return r===":"?b="builtin":b="atom",n(t,T,{ch:r,wide:!1,prev:null,token:b}),b}if(r==="*"||r==="`"){var w=r,E=!1;r=e.next(),r==w&&(E=!0,r=e.next());if(r&&!/\s/.test(r)){var b;return w==="*"?b=E?"strong":"em":b=E?"string":"string-2",n(t,T,{ch:w,wide:E,prev:null,token:b}),b}}}return i(t,r),null}function T(e,t){function o(e){return t.ctx.prev=e,s}var r=e.next(),s=t.ctx.token;if(r!=t.ctx.ch)return o(r);if(/\s/.test(t.ctx.prev))return o(r);if(t.ctx.wide){r=e.next();if(r!=t.ctx.ch)return o(r)}return!e.eol()&&!b.test(e.peek())?(t.ctx.wide&&e.backUp(1),o(r)):(n(t,x),i(t,r),s)}function N(e,t){var r=null;if(e.match(l))r="attribute";else if(e.match(c))r="link";else if(e.match(h))r="quote";else{if(!e.match(p))return e.eatSpace(),e.eol()?(i(t,e),null):(e.skipToEnd(),n(t,k),"comment");r="quote"}return n(t,C,{start:!0}),r}function C(e,t){var n="body";return!t.ctx.start||e.sol()?A(e,t,n):(e.skipToEnd(),r(t),n)}function k(e,t){return A(e,t,"comment")}function L(e,t){return u?e.sol()?(e.eatSpace()||i(t,e),null):u.token(e,t.ctx.local):A(e,t,"meta")}function A(e,t,n){return e.eol()||e.eatSpace()?(e.skipToEnd(),n):(i(t,e),null)}var u=o(t.verbatim),a=o("python"),f=/^[!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]/,l=/^\s*\w([-:.\w]*\w)?::(\s|$)/,c=/^\s*_[\w-]+:(\s|$)/,h=/^\s*\[(\d+|#)\](\s|$)/,p=/^\s*\[[A-Za-z][\w-]*\](\s|$)/,d=/^\[(\d+|#)\]_/,v=/^\[[A-Za-z][\w-]*\]_/,m=/^\.\.(\s|$)/,g=/^::\s*$/,y=/^[-\s"([{</:]/,b=/^[-\s`'")\]}>/:.,;!?\\_]/,w=/^\s*((\d+|[A-Za-z#])[.)]|\((\d+|[A-Z-a-z#])\))\s/,E=/^\s*[-\+\*]\s/,S=/^\s+(>>>|In \[\d+\]:)\s/;return{startState:function(){return{fn:x,ctx:{}}},copyState:function(e){return{fn:e.fn,ctx:e.ctx}},token:function(e,t){var n=t.fn(e,t);return n}}},"python"),CodeMirror.defineMIME("text/x-rst","rst"),CodeMirror.defineMode("ruby",function(e,t){function n(e){var t={};for(var n=0,r=e.length;n<r;++n)t[e[n]]=!0;return t}function a(e,t,n){return n.tokenize.push(e),e(t,n)}function f(e,t){u=null;if(e.sol()&&e.match("=begin")&&e.eol())return t.tokenize.push(p),"comment";if(e.eatSpace())return null;var n=e.next(),r;if(n=="`"||n=="'"||n=='"'||n=="/"&&!e.eol()&&e.peek()!=" ")return a(c(n,"string",n=='"'||n=="`"),e,t);if(n=="%"){var i,s=!1;e.eat("s")?i="atom":e.eat(/[WQ]/)?(i="string",s=!0):e.eat(/[wxqr]/)&&(i="string");var f=e.eat(/[^\w\s]/);return f?(o.propertyIsEnumerable(f)&&(f=o[f]),a(c(f,i,s,!0),e,t)):"operator"}if(n=="#")return e.skipToEnd(),"comment";if(n=="<"&&(r=e.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return a(h(r[1]),e,t);if(n=="0")return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(n))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if(n=="?"){while(e.match(/^\\[CM]-/));return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}return n==":"?e.eat("'")?a(c("'","atom",!1),e,t):e.eat('"')?a(c('"',"atom",!0),e,t):(e.eatWhile(/[\w\?]/),"atom"):n=="@"?(e.eat("@"),e.eatWhile(/[\w\?]/),"variable-2"):n=="$"?(e.next(),e.eatWhile(/[\w\?]/),"variable-3"):/\w/.test(n)?(e.eatWhile(/[\w\?]/),e.eat(":")?"atom":"ident"):n!="|"||!t.varList&&t.lastTok!="{"&&t.lastTok!="do"?/[\(\)\[\]{}\\;]/.test(n)?(u=n,null):n=="-"&&e.eat(">")?"arrow":/[=+\-\/*:\.^%<>~|]/.test(n)?(e.eatWhile(/[=+\-\/*:\.^%<>~|]/),"operator"):null:(u="|",null)}function l(){var e=1;return function(t,n){if(t.peek()=="}"){e--;if(e==0)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)}else t.peek()=="{"&&e++;return f(t,n)}}function c(e,t,n,r){return function(i,s){var o=!1,u;while((u=i.next())!=null){if(u==e&&(r||!o)){s.tokenize.pop();break}if(n&&u=="#"&&!o&&i.eat("{")){s.tokenize.push(l(arguments.callee));break}o=!o&&u=="\\"}return t}}function h(e){return function(t,n){return t.match(e)?n.tokenize.pop():t.skipToEnd(),"string"}}function p(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}var r=n(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload"]),i=n(["def","class","case","for","while","do","module","then","catch","loop","proc","begin"]),s=n(["end","until"]),o={"[":"]","{":"}","(":")"},u;return{startState:function(){return{tokenize:[f],indented:0,context:{type:"top",indented:-e.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){e.sol()&&(t.indented=e.indentation());var n=t.tokenize[t.tokenize.length-1](e,t),o;if(n=="ident"){var a=e.current();n=r.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(a)?"tag":t.lastTok=="def"||t.lastTok=="class"||t.varList?"def":"variable",i.propertyIsEnumerable(a)?o="indent":s.propertyIsEnumerable(a)?o="dedent":(a=="if"||a=="unless")&&e.column()==e.indentation()&&(o="indent")}if(u||n&&n!="comment")t.lastTok=a||u||n;return u=="|"&&(t.varList=!t.varList),o=="indent"||/[\(\[\{]/.test(u)?t.context={prev:t.context,type:u||n,indented:t.indented}:(o=="dedent"||/[\)\]\}]/.test(u))&&t.context.prev&&(t.context=t.context.prev),e.eol()&&(t.continuedLine=u=="\\"||n=="operator"),n},indent:function(t,n){if(t.tokenize[t.tokenize.length-1]!=f)return 0;var r=n&&n.charAt(0),i=t.context,s=i.type==o[r]||i.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(n);return i.indented+(s?0:e.indentUnit)+(t.continuedLine?e.indentUnit:0)},electricChars:"}de"}}),CodeMirror.defineMIME("text/x-ruby","ruby"),CodeMirror.defineMode("rust",function(){function u(e,t){return s=e,t}function a(e,t){var n=e.next();if(n=='"')return t.tokenize=f,t.tokenize(e,t);if(n=="'")return s="atom",e.eat("\\")?e.skipTo("'")?(e.next(),"string"):"error":(e.next(),e.eat("'")?"string":"error");if(n=="/"){if(e.eat("/"))return e.skipToEnd(),"comment";if(e.eat("*"))return t.tokenize=l(1),t.tokenize(e,t)}if(n=="#")return e.eat("[")?(s="open-attr",null):(e.eatWhile(/\w/),u("macro","meta"));if(n==":"&&e.match(":<"))return u("op",null);if(n.match(/\d/)||n=="."&&e.eat(/\d/)){var r=!1;return!e.match(/^x[\da-f]+/i)&&!e.match(/^b[01]+/)&&(e.eatWhile(/\d/),e.eat(".")&&(r=!0,e.eatWhile(/\d/)),e.match(/^e[+\-]?\d+/i)&&(r=!0)),r?e.match(/^f(?:32|64)/):e.match(/^[ui](?:8|16|32|64)/),u("atom","number")}return n.match(/[()\[\]{}:;,]/)?u(n,null):n=="-"&&e.eat(">")?u("->",null):n.match(i)?(e.eatWhile(i),u("op",null)):(e.eatWhile(/\w/),o=e.current(),e.match(/^::\w/)?(e.backUp(1),u("prefix","variable-2")):t.keywords.propertyIsEnumerable(o)?u(t.keywords[o],o.match(/true|false/)?"atom":"keyword"):u("name","variable"))}function f(e,t){var n,r=!1;while(n=e.next()){if(n=='"'&&!r)return t.tokenize=a,u("atom","string");r=!r&&n=="\\"}return u("op","string")}function l(e){return function(t,n){var r=null,i;while(i=t.next()){if(i=="/"&&r=="*"){if(e==1){n.tokenize=a;break}return n.tokenize=l(e-1),n.tokenize(t,n)}if(i=="*"&&r=="/")return n.tokenize=l(e+1),n.tokenize(t,n);r=i}return"comment"}}function h(){for(var e=arguments.length-1;e>=0;e--)c.cc.push(arguments[e])}function p(){return h.apply(null,arguments),!0}function d(e,t){var n=function(){var n=c.state;n.lexical={indented:n.indented,column:c.stream.column(),type:e,prev:n.lexical,info:t}};return n.lex=!0,n}function v(){var e=c.state;e.lexical.prev&&(e.lexical.type==")"&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function m(){c.state.keywords=r}function g(){c.state.keywords=n}function y(e,t){function n(r){return r==","?p(e,n):r==t?p():p(n)}return function(r){return r==t?p():h(e,n)}}function b(e,t){return p(d("stat",t),e,v,w)}function w(e){return e=="}"?p():e=="let"?b(L,"let"):e=="fn"?b(_):e=="type"?p(d("stat"),D,E,v,w):e=="enum"?b(P):e=="mod"?b(B):e=="iface"?b(j):e=="impl"?b(F):e=="open-attr"?p(d("]"),y(S,"]"),v):e=="ignore"||e.match(/[\]\);,]/)?p(w):h(d("stat"),S,v,E,w)}function E(e){return e==";"?p():h()}function S(e){return e=="atom"||e=="name"?p(x):e=="{"?p(d("}"),N,v):e.match(/[\[\(]/)?Q(e,S):e.match(/[\]\)\};,]/)?h():e=="if-style"?p(S,S):e=="else-style"||e=="op"?p(S):e=="for"?p(W,O,M,S,S):e=="alt"?p(S,V):e=="fn"?p(_):e=="macro"?p(K):p()}function x(e){return o=="."?p(T):o=="::<"?p(I,x):e=="op"||o==":"?p(S):e=="("||e=="["?Q(e,S):h()}function T(e){return o.match(/^\w+$/)?(c.marked="variable",p(x)):h(S)}function N(e){if(e=="op"){if(o=="|")return p(k,v,d("}","block"),w);if(o=="||")return p(v,d("}","block"),w)}return o=="mutable"||o.match(/^\w+$/)&&c.stream.peek()==":"&&!c.stream.match("::",!1)?h(C(S)):h(w)}function C(e){function t(n){return o=="mutable"||o=="with"?(c.marked="keyword",p(t)):o.match(/^\w*$/)?(c.marked="variable",p(t)):n==":"?p(e,t):n=="}"?p():p(t)}return t}function k(e){return e=="name"?(c.marked="def",p(k)):e=="op"&&o=="|"?p():p(k)}function L(e){return e.match(/[\]\)\};]/)?p():o=="="?p(S,A):e==","?p(L):h(W,O,L)}function A(e){return e.match(/[\]\)\};,]/)?h(L):h(S,A)}function O(e){return e==":"?p(m,R,g):h()}function M(e){return e=="name"&&o=="in"?(c.marked="keyword",p()):h()}function _(e){return o=="@"||o=="~"?(c.marked="keyword",p(_)):e=="name"?(c.marked="def",p(_)):o=="<"?p(I,_):e=="{"?h(S):e=="("?p(d(")"),y(q,")"),v,_):e=="->"?p(m,R,g,_):e==";"?p():p(_)}function D(e){return e=="name"?(c.marked="def",p(D)):o=="<"?p(I,D):o=="="?p(m,R,g):p(D)}function P(e){return e=="name"?(c.marked="def",p(P)):o=="<"?p(I,P):o=="="?p(m,R,g,E):e=="{"?p(d("}"),m,H,g,v):p(P)}function H(e){return e=="}"?p():e=="("?p(d(")"),y(R,")"),v,H):(o.match(/^\w+$/)&&(c.marked="def"),p(H))}function B(e){return e=="name"?(c.marked="def",p(B)):e=="{"?p(d("}"),w,v):h()}function j(e){return e=="name"?(c.marked="def",p(j)):o=="<"?p(I,j):e=="{"?p(d("}"),w,v):h()}function F(e){return o=="<"?p(I,F):o=="of"||o=="for"?(c.marked="keyword",p(R,F)):e=="name"?(c.marked="def",p(F)):e=="{"?p(d("}"),w,v):h()}function I(e){return o==">"?p():o==","?p(I):o==":"?p(R,I):h(R,I)}function q(e){return e=="name"?(c.marked="def",p(q)):e==":"?p(m,R,g):h()}function R(e){return e=="name"?(c.marked="variable-3",p(U)):o=="mutable"?(c.marked="keyword",p(R)):e=="atom"?p(U):e=="op"||e=="obj"?p(R):e=="fn"?p(z):e=="{"?p(d("{"),C(R),v):Q(e,R)}function U(e){return o=="<"?p(I):h()}function z(e){return e=="("?p(d("("),y(R,")"),v,z):e=="->"?p(R):h()}function W(e){return e=="name"?(c.marked="def",p(X)):e=="atom"?p(X):e=="op"?p(W):e.match(/[\]\)\};,]/)?h():Q(e,W)}function X(e){return e=="op"&&o=="."?p():o=="to"?(c.marked="keyword",p(W)):h()}function V(e){return e=="{"?p(d("}","alt"),$,v):h()}function $(e){return e=="}"?p():e=="|"?p($):o=="when"?(c.marked="keyword",p(S,J)):e.match(/[\]\);,]/)?p($):h(W,J)}function J(e){return e=="{"?p(d("}","alt"),w,v,$):h($)}function K(e){return e.match(/[\[\(\{]/)?Q(e,S):h()}function Q(e,t){return e=="["?p(d("]"),y(t,"]"),v):e=="("?p(d(")"),y(t,")"),v):e=="{"?p(d("}"),y(t,"}"),v):p()}function G(e,t,n){var r=e.cc;c.state=e,c.stream=t,c.marked=null,c.cc=r;for(;;){var i=r.length?r.pop():w;if(i(s)){while(r.length&&r[r.length-1].lex)r.pop()();return c.marked||n}}}var e=4,t=2,n={"if":"if-style","while":"if-style","else":"else-style","do":"else-style",ret:"else-style",fail:"else-style","break":"atom",cont:"atom","const":"let",resource:"fn",let:"let",fn:"fn","for":"for",alt:"alt",iface:"iface",impl:"impl",type:"type","enum":"enum",mod:"mod",as:"op","true":"atom","false":"atom",assert:"op",check:"op",claim:"op","native":"ignore",unsafe:"ignore","import":"else-style","export":"else-style",copy:"op",log:"op",log_err:"op",use:"op",bind:"op",self:"atom"},r=function(){var e={fn:"fn",block:"fn",obj:"obj"},t="bool uint int i8 i16 i32 i64 u8 u16 u32 u64 float f32 f64 str char".split(" ");for(var n=0,r=t.length;n<r;++n)e[t[n]]="atom";return e}(),i=/[+\-*&%=<>!?|\.@]/,s,o,c={state:null,stream:null,marked:null,cc:null};return v.lex=m.lex=g.lex=!0,{startState:function(){return{tokenize:a,cc:[],lexical:{indented:-e,column:0,type:"top",align:!1},keywords:n,indented:0}},token:function(e,t){e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation());if(e.eatSpace())return null;s=o=null;var n=t.tokenize(e,t);return n=="comment"?n:(t.lexical.hasOwnProperty("align")||(t.lexical.align=!0),s=="prefix"?n:(o||(o=e.current()),G(t,e,n)))},indent:function(n,r){if(n.tokenize!=a)return 0;var i=r&&r.charAt(0),s=n.lexical,o=s.type,u=i==o;return o=="stat"?s.indented+e:s.align?s.column+(u?0:1):s.indented+(u?0:s.info=="alt"?t:e)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-rustsrc","rust"),CodeMirror.defineMode("scheme",function(e,t){function c(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}function d(e,t,n){this.indent=e,this.type=t,this.prev=n}function v(e,t,n){e.indentStack=new d(t,n,e.indentStack)}function m(e){e.indentStack=e.indentStack.prev}function E(e){return e.match(g)}function S(e){return e.match(y)}function x(e,t){return t===!0&&e.backUp(1),e.match(w)}function T(e){return e.match(b)}var n="builtin",r="comment",i="string",s="atom",o="number",u="bracket",a="keyword",f=2,l=1,h=c("\u03bb case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),p=c("define let letrec let* lambda"),g=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),y=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),b=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),w=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);return{startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1}},token:function(e,t){t.indentStack==null&&e.sol()&&(t.indentation=e.indentation());if(e.eatSpace())return null;var a=null;switch(t.mode){case"string":var l,c=!1;while((l=e.next())!=null){if(l=='"'&&!c){t.mode=!1;break}c=!c&&l=="\\"}a=i;break;case"comment":var l,d=!1;while((l=e.next())!=null){if(l=="#"&&d){t.mode=!1;break}d=l=="|"}a=r;break;case"s-expr-comment":t.mode=!1;if(e.peek()!="("&&e.peek()!="["){e.eatWhile(/[^/s]/),a=r;break}t.sExprComment=0;default:var g=e.next();if(g=='"')t.mode="string",a=i;else if(g=="'")a=s;else if(g=="#")if(e.eat("|"))t.mode="comment",a=r;else if(e.eat(/[tf]/i))a=s;else if(e.eat(";"))t.mode="s-expr-comment",a=r;else{var y=null,b=!1,w=!0;e.eat(/[ei]/i)?b=!0:e.backUp(1),e.match(/^#b/i)?y=E:e.match(/^#o/i)?y=S:e.match(/^#x/i)?y=T:e.match(/^#d/i)?y=x:e.match(/^[-+0-9.]/,!1)?(w=!1,y=x):b||e.eat("#"),y!=null&&(w&&!b&&e.match(/^#[ei]/i),y(e)&&(a=o))}else if(/^[-+0-9.]/.test(g)&&x(e,!0))a=o;else if(g==";")e.skipToEnd(),a=r;else if(g=="("||g=="["){var N="",C=e.column();while((letter=e.eat(/[^\s\(\[\;\)\]]/))!=null)N+=letter;N.length>0&&p.propertyIsEnumerable(N)?v(t,C+f,g):(e.eatSpace(),e.eol()||e.peek()==";"?v(t,C+1,g):v(t,C+e.current().length,g)),e.backUp(e.current().length-1),typeof t.sExprComment=="number"&&t.sExprComment++,a=u}else g==")"||g=="]"?(a=u,t.indentStack!=null&&t.indentStack.type==(g==")"?"(":"[")&&(m(t),typeof t.sExprComment=="number"&&--t.sExprComment==0&&(a=r,t.sExprComment=!1))):(e.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/),h&&h.propertyIsEnumerable(e.current())?a=n:a="variable")}return typeof t.sExprComment=="number"?r:a},indent:function(e,t){return e.indentStack==null?e.indentation:e.indentStack.indent}}}),CodeMirror.defineMIME("text/x-scheme","scheme"),CodeMirror.defineMode("shell",function(e){function n(e,n){var r=n.split(" ");for(var i=0;i<r.length;i++)t[r[i]]=e}function r(e,n){var r=e.sol(),u=e.next();if(u==="'"||u==='"'||u==="`")return n.tokens.unshift(i(u)),o(e,n);if(u==="#")return r&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if(u==="$")return n.tokens.unshift(s),o(e,n);if(u==="+"||u==="=")return"operator";if(u==="-")return e.eat("-"),e.eatWhile(/\w/),"attribute";if(/\d/.test(u)){e.eatWhile(/\d/);if(!/\w/.test(e.peek()))return"number"}e.eatWhile(/\w/);var a=e.current();return e.peek()==="="&&/\w+/.test(a)?"def":t[a]||null}function i(e){return function(t,n){var r,i=!1,o=!1;while((r=t.next())!=null){if(r===e&&!o){i=!0;break}if(r==="$"&&!o&&e!=="'"){o=!0,t.backUp(1),n.tokens.unshift(s);break}o=!o&&r==="\\"}return(i||!o)&&n.tokens.shift(),e==="`"||e===")"?"quote":"string"}}function o(e,t){return(t.tokens[0]||r)(e,t)}var t={};n("atom","true false"),n("keyword","if then do else elif while until for in esac fi fin fil done exit set unset export function"),n("builtin","ab awk bash beep cat cc cd chown chmod chroot clear cp curl cut diff echo find gawk gcc get git grep kill killall ln ls make mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh shopt shred source sort sleep ssh start stop su sudo tee telnet top touch vi vim wall wc wget who write yes zsh");var s=function(e,t){t.tokens.length>1&&e.eat("$");var n=e.next(),r=/\w/;return n==="{"&&(r=/[^}]/),n==="("?(t.tokens[0]=i(")"),o(e,t)):(/\d/.test(n)||(e.eatWhile(r),e.eat("}")),t.tokens.shift(),"def")};return{startState:function(){return{tokens:[]}},token:function(e,t){return e.eatSpace()?null:o(e,t)}}}),CodeMirror.defineMIME("text/x-sh","shell"),CodeMirror.defineMode("smalltalk",function(e,t){var n=/[+\-/\\*~<>=@%|&?!.:;^]/,r=/true|false|nil|self|super|thisContext/,i=function(e,t){this.next=e,this.parent=t},s=function(e,t,n){this.name=e,this.context=t,this.eos=n},o=function(){this.context=new i(u,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};o.prototype.userIndent=function(t){this.userIndentationDelta=t>0?t/e.indentUnit-this.indentation:0};var u=function(e,t,o){var u=new s(null,t,!1),c=e.next();return c==='"'?u=a(e,new i(a,t)):c==="'"?u=f(e,new i(f,t)):c==="#"?(e.eatWhile(/[^ .]/),u.name="string-2"):c==="$"?(e.eatWhile(/[^ ]/),u.name="string-2"):c==="|"&&o.expectVariable?u.context=new i(l,t):/[\[\]{}()]/.test(c)?(u.name="bracket",u.eos=/[\[{(]/.test(c),c==="["?o.indentation++:c==="]"&&(o.indentation=Math.max(0,o.indentation-1))):n.test(c)?(e.eatWhile(n),u.name="operator",u.eos=c!==";"):/\d/.test(c)?(e.eatWhile(/[\w\d]/),u.name="number"):/[\w_]/.test(c)?(e.eatWhile(/[\w\d_]/),u.name=o.expectVariable?r.test(e.current())?"keyword":"variable":null):u.eos=o.expectVariable,u},a=function(e,t){return e.eatWhile(/[^"]/),new s("comment",e.eat('"')?t.parent:t,!0)},f=function(e,t){return e.eatWhile(/[^']/),new s("string",e.eat("'")?t.parent:t,!1)},l=function(e,t,n){var r=new s(null,t,!1),i=e.next();return i==="|"?(r.context=t.parent,r.eos=!0):(e.eatWhile(/[^|]/),r.name="variable"),r};return{startState:function(){return new o},token:function(e,t){t.userIndent(e.indentation());if(e.eatSpace())return null;var n=t.context.next(e,t.context,t);return t.context=n.context,t.expectVariable=n.eos,t.lastToken=n,n.name},blankLine:function(e){e.userIndent(0)},indent:function(t,n){var r=t.context.next===u&&n&&n.charAt(0)==="]"?-1:t.userIndentationDelta;return(t.indentation+r)*e.indentUnit},electricChars:"]"}}),CodeMirror.defineMIME("text/x-stsrc",{name:"smalltalk"}),CodeMirror.defineMode("smarty",function(e,t){function u(e,t){return r=t,e}function a(e,t){function n(n){return t.tokenize=n,n(e,t)}return e.match(s,!0)?e.eat("*")?n(c("comment","*"+o)):(t.tokenize=f,"tag"):(e.next(),null)}function f(e,t){if(e.match(o,!0))return t.tokenize=a,u("tag",null);var s=e.next();if(s=="$")return e.eatWhile(i.validIdentifier),u("variable-2","variable");if(s==".")return u("operator","property");if(i.stringChar.test(s))return t.tokenize=l(s),u("string","string");if(i.operatorChars.test(s))return e.eatWhile(i.operatorChars),u("operator","operator");if(s=="["||s=="]")return u("bracket","bracket");if(/\d/.test(s))return e.eatWhile(/\d/),u("number","number");if(t.last=="variable"){if(s=="@")return e.eatWhile(i.validIdentifier),u("property","property");if(s=="|")return e.eatWhile(i.validIdentifier),u("qualifier","modifier")}else{if(t.last=="whitespace")return e.eatWhile(i.validIdentifier),u("attribute","modifier");if(t.last=="property")return e.eatWhile(i.validIdentifier),u("property",null);if(/\s/.test(s))return r="whitespace",null}var f="";s!="/"&&(f+=s);var c="";while(c=e.eat(i.validIdentifier))f+=c;var h,p;for(h=0,p=n.length;h<p;h++)if(n[h]==f)return u("keyword","keyword");return/\s/.test(s)?null:u("tag","tag")}function l(e){return function(t,n){while(!t.eol())if(t.next()==e){n.tokenize=f;break}return"string"}}function c(e,t){return function(n,r){while(!n.eol()){if(n.match(t)){r.tokenize=a;break}n.next()}return e}}var n=["debug","extends","function","include","literal"],r,i={operatorChars:/[+\-*&%=<>!?]/,validIdentifier:/[a-zA-Z0-9\_]/,stringChar:/[\'\"]/},s=typeof e.mode.leftDelimiter!="undefined"?e.mode.leftDelimiter:"{",o=typeof e.mode.rightDelimiter!="undefined"?e.mode.rightDelimiter:"}";return{startState:function(){return{tokenize:a,mode:"smarty",last:null}},token:function(e,t){var n=t.tokenize(e,t);return t.last=r,n},electricChars:""}}),CodeMirror.defineMIME("text/x-smarty","smarty"),CodeMirror.defineMode("sparql",function(e){function r(e){return new RegExp("^(?:"+e.join("|")+")$","i")}function u(e,t){var r=e.next();n=null;if(r=="$"||r=="?")return e.match(/^[\w\d]*/),"variable-2";if(r=="<"&&!e.match(/^[\s\u00a0=]/,!1))return e.match(/^[^\s\u00a0>]*>?/),"atom";if(r=='"'||r=="'")return t.tokenize=a(r),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(r))return n=r,null;if(r=="#")return e.skipToEnd(),"comment";if(o.test(r))return e.eatWhile(o),null;if(r==":")return e.eatWhile(/[\w\d\._\-]/),"atom";e.eatWhile(/[_\w\d]/);if(e.eat(":"))return e.eatWhile(/[\w\d_\-]/),"atom";var u=e.current(),f;return i.test(u)?null:s.test(u)?"keyword":"variable"}function a(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r){n.tokenize=u;break}r=!r&&i=="\\"}return"string"}}function f(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function l(e){e.indent=e.context.indent,e.context=e.context.prev}var t=e.indentUnit,n,i=r(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","isblank","isliteral","union","a"]),s=r(["base","prefix","select","distinct","reduced","construct","describe","ask","from","named","where","order","limit","offset","filter","optional","graph","by","asc","desc"]),o=/[*+\-<>=&|]/;return{startState:function(e){return{tokenize:u,context:null,indent:0,col:0}},token:function(e,t){e.sol()&&(t.context&&t.context.align==null&&(t.context.align=!1),t.indent=e.indentation());if(e.eatSpace())return null;var r=t.tokenize(e,t);r!="comment"&&t.context&&t.context.align==null&&t.context.type!="pattern"&&(t.context.align=!0);if(n=="(")f(t,")",e.column());else if(n=="[")f(t,"]",e.column());else if(n=="{")f(t,"}",e.column());else if(/[\]\}\)]/.test(n)){while(t.context&&t.context.type=="pattern")l(t);t.context&&n==t.context.type&&l(t)}else n=="."&&t.context&&t.context.type=="pattern"?l(t):/atom|string|variable/.test(r)&&t.context&&(/[\}\]]/.test(t.context.type)?f(t,"pattern",e.column()):t.context.type=="pattern"&&!t.context.align&&(t.context.align=!0,t.context.col=e.column()));return r},indent:function(e,n){var r=n&&n.charAt(0),i=e.context;if(/[\]\}]/.test(r))while(i&&i.type=="pattern")i=i.prev;var s=i&&r==i.type;return i?i.type=="pattern"?i.col:i.align?i.col+(s?0:1):i.indent+(s?0:t):0}}}),CodeMirror.defineMIME("application/x-sparql-query","sparql"),CodeMirror.defineMode("stex",function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e){if(e.cmdState.length>0){var t=e.cmdState.pop();t.closeBracket()}}function s(e){var t=e.cmdState;for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.name=="DEFAULT")continue;return r.styleIdentifier()}return null}function o(e,t,n,r){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=r,this.brackets=n,this.styleIdentifier=function(e){return this.bracketNo<=this.styles.length?this.styles[this.bracketNo-1]:null},this.openBracket=function(e){return this.bracketNo++,"bracket"},this.closeBracket=function(e){}}}function a(e,t){e.f=t}function f(e,t){if(e.match(/^\\[a-zA-Z@]+/)){var i=e.current();i=i.substr(1,i.length-1);var o;return u.hasOwnProperty(i)?o=u[i]:o=u.DEFAULT,o=new o,n(t,o),a(t,c),o.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";var f=e.next();if(f=="%")return e.eol()||a(t,l),"comment";if(f=="}"||f=="]")return o=r(t),o?(o.closeBracket(f),a(t,c),"bracket"):"error";return f=="{"||f=="["?(o=u.DEFAULT,o=new o,n(t,o),"bracket"):/\d/.test(f)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w-_]/),s(t))}function l(e,t){return e.skipToEnd(),a(t,f),"comment"}function c(e,t){var n=e.peek();if(n=="{"||n=="["){var s=r(t),o=s.openBracket(n);return e.eat(n),a(t,f),"bracket"}return/[ \t\r]/.test(n)?(e.eat(n),null):(a(t,f),s=r(t),s&&i(t),f(e,t))}var u=new Array;return u.importmodule=o("importmodule","tag","{[",["string","builtin"]),u.documentclass=o("documentclass","tag","{[",["","atom"]),u.usepackage=o("documentclass","tag","[",["atom"]),u.begin=o("documentclass","tag","[",["atom"]),u.end=o("documentclass","tag","[",["atom"]),u.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=function(e){},this.openBracket=function(e){},this.closeBracket=function(e){}},{startState:function(){return{f:f,cmdState:[]}},copyState:function(e){return{f:e.f,cmdState:e.cmdState.slice(0,e.cmdState.length)}},token:function(e,t){var n=t.f(e,t),r=e.current();return n}}}),CodeMirror.defineMIME("text/x-stex","stex"),CodeMirror.defineMIME("text/x-latex","stex"),CodeMirror.defineMode("tiddlywiki",function(e,t){function y(e,t,n){return t.tokenize=n,n(e,t)}function b(e,t){var n=!1,r;while((r=e.next())!=null){if(r==t&&!n)return!1;n=!n&&r=="\\"}return n}function S(e,t,n){return w=e,E=n,t}function x(e,t){var n=e.sol(),i,v;t.block=!1,i=e.peek();if(n&&/[<\/\*{}\-]/.test(i)){if(e.match(d))return t.block=!0,y(e,t,k);if(e.match(f))return S("quote","quote");if(e.match(u)||e.match(a))return S("code","comment");if(e.match(l)||e.match(c)||e.match(h)||e.match(p))return S("code","comment");if(e.match(o))return S("hr","hr")}i=e.next();if(n&&/[\/\*!#;:>|]/.test(i)){if(i=="!")return e.skipToEnd(),S("header","header");if(i=="*")return e.eatWhile("*"),S("list","comment");if(i=="#")return e.eatWhile("#"),S("list","comment");if(i==";")return e.eatWhile(";"),S("list","comment");if(i==":")return e.eatWhile(":"),S("list","comment");if(i==">")return e.eatWhile(">"),S("quote","quote");if(i=="|")return S("table","header")}if(i=="{"&&e.match(/\{\{/))return y(e,t,k);if(/[hf]/i.test(i)&&/[ti]/i.test(e.peek())&&e.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return S("link","link");if(i=='"')return S("string","string");if(i=="~")return S("text","brace");if(/[\[\]]/.test(i)&&e.peek()==i)return e.next(),S("brace","brace");if(i=="@")return e.eatWhile(s),S("link","link");if(/\d/.test(i))return e.eatWhile(/\d/),S("number","number");if(i=="/"){if(e.eat("%"))return y(e,t,N);if(e.eat("/"))return y(e,t,L)}if(i=="_"&&e.eat("_"))return y(e,t,A);if(i=="-"&&e.eat("-")){if(e.peek()!=" ")return y(e,t,O);if(e.peek()==" ")return S("text","brace")}if(i=="'"&&e.eat("'"))return y(e,t,C);if(i!="<")return S(i);if(e.eat("<"))return y(e,t,M);e.eatWhile(/[\w\$_]/);var m=e.current(),g=r.propertyIsEnumerable(m)&&r[m];return g?S(g.type,g.style,m):S("text",null,m)}function T(e){return function(t,n){return b(t,e)||(n.tokenize=x),S("string","string")}}function N(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=x;break}n=r=="%"}return S("comment","comment")}function C(e,t){var n=!1,r;while(r=e.next()){if(r=="'"&&n){t.tokenize=x;break}n=r=="'"}return S("text","strong")}function k(e,t){var n,r=t.block;return r&&e.current()?S("code","comment"):!r&&e.match(g)?(t.tokenize=x,S("code","comment")):r&&e.sol()&&e.match(v)?(t.tokenize=x,S("code","comment")):(n=e.next(),r?S("code","comment"):S("code","comment"))}function L(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=x;break}n=r=="/"}return S("text","em")}function A(e,t){var n=!1,r;while(r=e.next()){if(r=="_"&&n){t.tokenize=x;break}n=r=="_"}return S("text","underlined")}function O(e,t){var n=!1,r,i;while(r=e.next()){if(r=="-"&&n){t.tokenize=x;break}n=r=="-"}return S("text","strikethrough")}function M(e,t){var n,r,s,o;return e.current()=="<<"?S("brace","macro"):(n=e.next(),n?n==">"&&e.peek()==">"?(e.next(),t.tokenize=x,S("brace","macro")):(e.eatWhile(/[\w\$_]/),s=e.current(),o=i.propertyIsEnumerable(s)&&i[s],o?S(o.type,o.style,s):S("macro",null,s)):(t.tokenize=x,S(n)))}var n=e.indentUnit,r=function(){function e(e){return{type:e,style:"text"}}return{}}(),i=function(){function e(e){return{type:e,style:"macro"}}return{allTags:e("allTags"),closeAll:e("closeAll"),list:e("list"),newJournal:e("newJournal"),newTiddler:e("newTiddler"),permaview:e("permaview"),saveChanges:e("saveChanges"),search:e("search"),slider:e("slider"),tabs:e("tabs"),tag:e("tag"),tagging:e("tagging"),tags:e("tags"),tiddler:e("tiddler"),timeline:e("timeline"),today:e("today"),version:e("version"),option:e("option"),"with":e("with"),filter:e("filter")}}(),s=/[\w_\-]/i,o=/^\-\-\-\-+$/,u=/^\/\*\*\*$/,a=/^\*\*\*\/$/,f=/^<<<$/,l=/^\/\/\{\{\{$/,c=/^\/\/\}\}\}$/,h=/^<!--\{\{\{-->$/,p=/^<!--\}\}\}-->$/,d=/^\{\{\{$/,v=/^\}\}\}$/,m=/\{\{\{/,g=/.*?\}\}\}/,w,E;return{startState:function(e){return{tokenize:x,indented:0,level:0}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t);return n},electricChars:""}}),CodeMirror.defineMIME("text/x-tiddlywiki","tiddlywiki"),CodeMirror.defineMode("tiki",function(e,t){function n(e,t,n){return function(r,s){while(!r.eol()){if(r.match(t)){s.tokenize=i;break}r.next()}return n&&(s.tokenize=n),e}}function r(e,t){return function(t,n){while(!t.eol())t.next();return n.tokenize=i,e}}function i(e,t){function s(n){return t.tokenize=n,n(e,t)}var o=e.sol(),f=e.next();switch(f){case"{":u=e.eat("/")?"closeTag":"openTag",e.eatSpace(),tagName="";var l;while(l=e.eat(/[^\s\u00a0=\"\'\/?(}]/))tagName+=l;return t.tokenize=a,"tag";case"_":if(e.eat("_"))return s(n("strong","__",i));break;case"'":if(e.eat("'"))return s(n("em","''",i));break;case"(":if(e.eat("("))return s(n("variable-2","))",i));break;case"[":return s(n("variable-3","]",i));case"|":if(e.eat("|"))return s(n("comment","||"));break;case"-":if(e.eat("="))return s(n("header string","=-",i));if(e.eat("-"))return s(n("error tw-deleted","--",i));break;case"=":if(e.match("=="))return s(n("tw-underline","===",i));break;case":":if(e.eat(":"))return s(n("comment","::"));break;case"^":return s(n("tw-box","^"));case"~":if(e.match("np~"))return s(n("meta","~/np~"))}if(o)switch(f){case"!":return e.match("!!!!!")?s(r("header string")):e.match("!!!!")?s(r("header string")):e.match("!!!")?s(r("header string")):e.match("!!")?s(r("header string")):s(r("header string"));case"*":case"#":case"+":return s(r("tw-listitem bracket"))}return null}function a(e,t){var n=e.next(),r=e.peek();return n=="}"?(t.tokenize=i,"tag"):n=="("||n==")"?"bracket":n=="="?(u="equals",r==">"&&(n=e.next(),r=e.peek()),/[\'\"]/.test(r)||(t.tokenize=l()),"operator"):/[\'\"]/.test(n)?(t.tokenize=f(n),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function f(e){return function(t,n){while(!t.eol())if(t.next()==e){n.tokenize=a;break}return"string"}}function l(){return function(e,t){while(!e.eol()){var n=e.next(),r=e.peek();if(n==" "||n==","||/[ )}]/.test(r)){t.tokenize=a;break}}return"string"}}function p(){for(var e=arguments.length-1;e>=0;e--)c.cc.push(arguments[e])}function d(){return p.apply(null,arguments),!0}function v(e,t){var n=c.context&&c.context.noIndent;c.context={prev:c.context,pluginName:e,indent:c.indented,startOfLine:t,noIndent:n}}function m(){c.context&&(c.context=c.context.prev)}function g(e){if(e=="openPlugin")return c.pluginName=o,d(w,y(c.startOfLine));if(e=="closePlugin"){var t=!1;return c.context?(t=c.context.pluginName!=o,m()):t=!0,t&&(h="error"),d(b(t))}return e=="string"?((!c.context||c.context.name!="!cdata")&&v("!cdata"),c.tokenize==i&&m(),d()):d()}function y(e){return function(t){return t=="selfclosePlugin"||t=="endPlugin"?d():t=="endPlugin"?(v(c.pluginName,e),d()):d()}}function b(e){return function(t){return e&&(h="error"),t=="endPlugin"?d():p()}}function w(e){return e=="keyword"?(h="attribute",d(w)):e=="equals"?d(E,w):p()}function E(e){return e=="keyword"?(h="string",d()):e=="string"?d(S):p()}function S(e){return e=="string"?d(S):p()}var s=e.indentUnit,o,u,c,h;return{startState:function(){return{tokenize:i,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(e,t){e.sol()&&(t.startOfLine=!0,t.indented=e.indentation());if(e.eatSpace())return null;h=u=o=null;var n=t.tokenize(e,t);if((n||u)&&n!="comment"){c=t;for(;;){var r=t.cc.pop()||g;if(r(u||n))break}}return t.startOfLine=!1,h||n},indent:function(e,t){var n=e.context;if(n&&n.noIndent)return 0;n&&/^{\//.test(t)&&(n=n.prev);while(n&&!n.startOfLine)n=n.prev;return n?n.indent+s:0},compareStates:function(e,t){if(e.indented!=t.indented||e.pluginName!=t.pluginName)return!1;for(var n=e.context,r=t.context;;n=n.prev,r=r.prev){if(!n||!r)return n==r;if(n.pluginName!=r.pluginName)return!1}},electricChars:"/"}}),CodeMirror.defineMIME("text/tiki","tiki"),CodeMirror.defineMode("vb",function(e,t){function r(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}function N(e,t){t.currentIndent++}function C(e,t){t.currentIndent--}function k(e,t){if(e.eatSpace())return null;var r=e.peek();if(r==="'")return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var l=!1;e.match(/^\d*\.\d+F?/i)?l=!0:e.match(/^\d+\.\d*F?/)?l=!0:e.match(/^\.\d+F?/)&&(l=!0);if(l)return e.eat(/J/i),"number";var c=!1;e.match(/^&H[0-9a-f]+/i)?c=!0:e.match(/^&O[0-7]+/i)?c=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),c=!0):e.match(/^0(?![\dx])/i)&&(c=!0);if(c)return e.eat(/L/i),"number"}return e.match(y)?(t.tokenize=L(e.current()),t.tokenize(e,t)):e.match(a)||e.match(u)?null:e.match(o)||e.match(i)||e.match(p)?"operator":e.match(s)?null:e.match(x)?(N(e,t),t.doInCurrentLine=!0,"keyword"):e.match(b)?(t.doInCurrentLine?t.doInCurrentLine=!1:N(e,t),"keyword"):e.match(w)?"keyword":e.match(S)?(C(e,t),C(e,t),"keyword"):e.match(E)?(C(e,t),"keyword"):e.match(g)?"keyword":e.match(m)?"keyword":e.match(f)?"variable":(e.next(),n)}function L(e){var r=e.length==1,i="string";return function(o,u){while(!o.eol()){o.eatWhile(/[^'"]/);if(o.match(e))return u.tokenize=k,i;o.eat(/['"]/)}if(r){if(t.singleLineStringErrors)return n;u.tokenize=k}return i}}function A(e,t){var r=t.tokenize(e,t),i=e.current();if(i===".")return r=t.tokenize(e,t),i=e.current(),r==="variable"?"variable":n;var s="[({".indexOf(i);return s!==-1&&N(e,t),T==="dedent"&&C(e,t)?n:(s="])}".indexOf(i),s!==-1&&C(e,t)?n:r)}var n="error",i=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),s=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),o=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),u=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),a=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),f=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),l=["class","module","sub","enum","select","while","if","function","get","set","property"],c=["else","elseif","case"],h=["next","loop"],p=r(["and","or","not","xor","in"]),d=["as","dim","break","continue","optional","then","until","goto","byval","byref","new","handles","property","return","const","private","protected","friend","public","shared","static","true","false"],v=["integer","string","double","decimal","boolean","short","char","float","single"],m=r(d),g=r(v),y='"',b=r(l),w=r(c),E=r(h),S=r(["end"]),x=r(["do"]),T=null,O={electricChars:"dDpPtTfFeE ",startState:function(e){return{tokenize:k,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var n=A(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(t,n){var r=n.replace(/^\s+|\s+$/g,"");return r.match(E)||r.match(S)||r.match(w)?e.indentUnit*(t.currentIndent-1):t.currentIndent<0?0:t.currentIndent*e.indentUnit}};return O}),CodeMirror.defineMIME("text/x-vb","vb"),CodeMirror.defineMode("vbscript",function(){var e=/^(?:Call|Case|CDate|Clear|CInt|CLng|Const|CStr|Description|Dim|Do|Each|Else|ElseIf|End|Err|Error|Exit|False|For|Function|If|LCase|Loop|LTrim|Next|Nothing|Now|Number|On|Preserve|Quit|ReDim|Resume|RTrim|Select|Set|Sub|Then|To|Trim|True|UBound|UCase|Until|VbCr|VbCrLf|VbLf|VbTab)$/im;return{token:function(t){if(t.eatSpace())return null;var n=t.next();if(n=="'")return t.skipToEnd(),"comment";if(n=='"')return t.skipTo('"'),"string";if(/\w/.test(n)){t.eatWhile(/\w/);if(e.test(t.current()))return"keyword"}return null}}}),CodeMirror.defineMIME("text/vbscript","vbscript"),CodeMirror.defineMode("velocity",function(e){function t(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}function a(e,t,n){return t.tokenize=n,n(e,t)}function f(e,t){var n=t.beforeParams;t.beforeParams=!1;var u=e.next();if(u!='"'&&u!="'"||!t.inParams){if(/[\[\]{}\(\),;\.]/.test(u))return u=="("&&n?t.inParams=!0:u==")"&&(t.inParams=!1),null;if(/\d/.test(u))return e.eatWhile(/[\w\.]/),"number";if(u=="#"&&e.eat("*"))return a(e,t,c);if(u=="#"&&e.match(/ *\[ *\[/))return a(e,t,h);if(u=="#"&&e.eat("#"))return e.skipToEnd(),"comment";if(u=="$")return e.eatWhile(/[\w\d\$_\.{}]/),s&&s.propertyIsEnumerable(e.current().toLowerCase())?"keyword":(t.beforeParams=!0,"builtin");if(o.test(u))return e.eatWhile(o),"operator";e.eatWhile(/[\w\$_{}]/);var f=e.current().toLowerCase();return r&&r.propertyIsEnumerable(f)?"keyword":i&&i.propertyIsEnumerable(f)||e.current().match(/^#[a-z0-9_]+ *$/i)&&e.peek()=="("?(t.beforeParams=!0,"keyword"):null}return a(e,t,l(u))}function l(e){return function(t,n){var r=!1,i,s=!1;while((i=t.next())!=null){if(i==e&&!r){s=!0;break}r=!r&&i=="\\"}return s&&(n.tokenize=f),"string"}}function c(e,t){var n=!1,r;while(r=e.next()){if(r=="#"&&n){t.tokenize=f;break}n=r=="*"}return"comment"}function h(e,t){var n=0,r;while(r=e.next()){if(r=="#"&&n==2){t.tokenize=f;break}r=="]"?n++:r!=" "&&(n=0)}return"meta"}var n=e.indentUnit,r=t("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),i=t("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),s=t("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent $velocityCount"),o=/[+\-*&%=<>!?:\/|]/,u=!0;return{startState:function(e){return{tokenize:f,beforeParams:!1,inParams:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),CodeMirror.defineMIME("text/velocity","velocity"),CodeMirror.defineMode("verilog",function(e,t){function l(e,t){var n=e.next();if(o[n]){var u=o[n](e,t);if(u!==!1)return u}if(n=='"')return t.tokenize=c(n),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(n))return f=n,null;if(/[\d']/.test(n))return e.eatWhile(/[\w\.']/),"number";if(n=="/"){if(e.eat("*"))return t.tokenize=h,h(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(a.test(n))return e.eatWhile(a),"operator";e.eatWhile(/[\w\$_]/);var l=e.current();return r.propertyIsEnumerable(l)?(i.propertyIsEnumerable(l)&&(f="newstatement"),"keyword"):s.propertyIsEnumerable(l)?"atom":"variable"}function c(e){return function(t,n){var r=!1,i,s=!1;while((i=t.next())!=null){if(i==e&&!r){s=!0;break}r=!r&&i=="\\"}if(s||!r&&!u)n.tokenize=l;return"string"}}function h(e,t){var n=!1,r;while(r=e.next()){if(r=="/"&&n){t.tokenize=l;break}n=r=="*"}return"comment"}function p(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function d(e,t,n){return e.context=new p(e.indented,t,n,null,e.context)}function v(e){var t=e.context.type;if(t==")"||t=="]"||t=="}")e.indented=e.context.indented;return e.context=e.context.prev}var n=e.indentUnit,r=t.keywords||{},i=t.blockKeywords||{},s=t.atoms||{},o=t.hooks||{},u=t.multiLineStrings,a=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/,f;return{startState:function(e){return{tokenize:null,context:new p((e||0)-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;e.sol()&&(n.align==null&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0);if(e.eatSpace())return null;f=null;var r=(t.tokenize||l)(e,t);if(r=="comment"||r=="meta")return r;n.align==null&&(n.align=!0);if(f!=";"&&f!=":"||n.type!="statement")if(f=="{")d(t,e.column(),"}");else if(f=="[")d(t,e.column(),"]");else if(f=="(")d(t,e.column(),")");else if(f=="}"){while(n.type=="statement")n=v(t);n.type=="}"&&(n=v(t));while(n.type=="statement")n=v(t)}else f==n.type?v(t):(n.type=="}"||n.type=="top"||n.type=="statement"&&f=="newstatement")&&d(t,e.column(),"statement");else v(t);return t.startOfLine=!1,r},indent:function(e,t){if(e.tokenize!=l&&e.tokenize!=null)return 0;var r=t&&t.charAt(0),i=e.context,s=r==i.type;return i.type=="statement"?i.indented+(r=="{"?0:n):i.align?i.column+(s?0:1):i.indented+(s?0:n)},electricChars:"{}"}}),function(){function e(e){var t={},n=e.split(" ");for(var r=0;r<n.length;++r)t[n[r]]=!0;return t}function r(e,t){return e.eatWhile(/[\w\$_]/),"meta"}function i(e,t){var n;while((n=e.next())!=null)if(n=='"'&&!e.eat('"')){t.tokenize=null;break}return"string"}var t="always and assign automatic begin buf bufif0 bufif1 case casex casez cell cmos config deassign default defparam design disable edge else end endcase endconfig endfunction endgenerate endmodule endprimitive endspecify endtable endtask event for force forever fork function generate genvar highz0 highz1 if ifnone incdir include initial inout input instance integer join large liblist library localparam macromodule medium module nand negedge nmos nor noshowcancelled not notif0 notif1 or output parameter pmos posedge primitive pull0 pull1 pulldown pullup pulsestyle_onevent pulsestyle_ondetect rcmos real realtime reg release repeat rnmos rpmos rtran rtranif0 rtranif1 scalared showcancelled signed small specify specparam strong0 strong1 supply0 supply1 table task time tran tranif0 tranif1 tri tri0 tri1 triand trior trireg unsigned use vectored wait wand weak0 weak1 while wire wor xnor xor",n="begin bufif0 bufif1 case casex casez config else end endcase endconfig endfunction endgenerate endmodule endprimitive endspecify endtable endtask for forever function generate if ifnone macromodule module primitive repeat specify table task while";CodeMirror.defineMIME("text/x-verilog",{name:"verilog",keywords:e(t),blockKeywords:e(n),atoms:e("null"),hooks:{"`":r,$:r}})}(),CodeMirror.defineMode("xml",function(e,t){function u(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if(r=="<"){if(e.eat("!"))return e.eat("[")?e.match("CDATA[")?n(l("atom","]]>")):null:e.match("--")?n(l("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null;if(e.eat("?"))return e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta";o=e.eat("/")?"closeTag":"openTag",e.eatSpace(),s="";var i;while(i=e.eat(/[^\s\u00a0=<>\"\'\/?]/))s+=i;return t.tokenize=a,"tag"}if(r=="&"){var u;return e.eat("#")?e.eat("x")?u=e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):u=e.eatWhile(/[\d]/)&&e.eat(";"):u=e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),u?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();return n==">"||n=="/"&&e.eat(">")?(t.tokenize=u,o=n==">"?"endTag":"selfcloseTag","tag"):n=="="?(o="equals",null):/[\'\"]/.test(n)?(t.tokenize=f(n),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=<>\"\'\/?]/),"word")}function f(e){return function(t,n){while(!t.eol())if(t.next()==e){n.tokenize=a;break}return"string"}}function l(e,t){return function(n,r){while(!n.eol()){if(n.match(t)){r.tokenize=u;break}n.next()}return e}}function c(e){return function(t,n){var r;while((r=t.next())!=null){if(r=="<")return n.tokenize=c(e+1),n.tokenize(t,n);if(r==">"){if(e==1){n.tokenize=u;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function d(){for(var e=arguments.length-1;e>=0;e--)h.cc.push(arguments[e])}function v(){return d.apply(null,arguments),!0}function m(e,t){var n=r.doNotIndent.hasOwnProperty(e)||h.context&&h.context.noIndent;h.context={prev:h.context,tagName:e,indent:h.indented,startOfLine:t,noIndent:n}}function g(){h.context&&(h.context=h.context.prev)}function y(e){if(e=="openTag")return h.tagName=s,v(S,b(h.startOfLine));if(e=="closeTag"){var t=!1;return h.context?h.context.tagName!=s&&(r.implicitlyClosed.hasOwnProperty(h.context.tagName.toLowerCase())&&g(),t=!h.context||h.context.tagName!=s):t=!0,t&&(p="error"),v(w(t))}return v()}function b(e){return function(t){return t=="selfcloseTag"||t=="endTag"&&r.autoSelfClosers.hasOwnProperty(h.tagName.toLowerCase())?(E(h.tagName.toLowerCase()),v()):t=="endTag"?(E(h.tagName.toLowerCase()),m(h.tagName,e),v()):v()}}function w(e){return function(t){return e&&(p="error"),t=="endTag"?(g(),v()):(p="error",v(arguments.callee))}}function E(e){var t;for(;;){if(!h.context)return;t=h.context.tagName.toLowerCase();if(!r.contextGrabbers.hasOwnProperty(t)||!r.contextGrabbers[t].hasOwnProperty(e))return;g()}}function S(e){return e=="word"?(p="attribute",v(x,S)):e=="endTag"||e=="selfcloseTag"?d():(p="error",v(S))}function x(e){return e=="equals"?v(T,S):(r.allowMissing||(p="error"),e=="endTag"||e=="selfcloseTag"?d():v())}function T(e){return e=="string"?v(N):e=="word"&&r.allowUnquoted?(p="string",v()):(p="error",e=="endTag"||e=="selfCloseTag"?d():v())}function N(e){return e=="string"?v(N):d()}var n=e.indentUnit,r=t.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!1}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},i=t.alignCDATA,s,o,h,p;return{startState:function(){return{tokenize:u,cc:[],indented:0,startOfLine:!0,tagName:null,context:null}},token:function(e,t){e.sol()&&(t.startOfLine=!0,t.indented=e.indentation());if(e.eatSpace())return null;p=o=s=null;var n=t.tokenize(e,t);t.type=o;if((n||o)&&n!="comment"){h=t;for(;;){var r=t.cc.pop()||y;if(r(o||n))break}}return t.startOfLine=!1,p||n},indent:function(e,t,r){var s=e.context;if(e.tokenize!=a&&e.tokenize!=u||s&&s.noIndent)return r?r.match(/^(\s*)/)[0].length:0;if(i&&/<!\[CDATA\[/.test(t))return 0;s&&/^<\//.test(t)&&(s=s.prev);while(s&&!s.startOfLine)s=s.prev;return s?s.indent+n:0},compareStates:function(e,t){if(e.indented!=t.indented||e.tokenize!=t.tokenize)return!1;for(var n=e.context,r=t.context;;n=n.prev,r=r.prev){if(!n||!r)return n==r;if(n.tagName!=r.tagName||n.indent!=r.indent)return!1}},electricChars:"/"}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0}),CodeMirror.defineMode("xquery",function(e,t){function s(e,t,n){return r=e,i=n,t}function o(e,t,n){return t.tokenize=n,n(e,t)}function u(e,t){var r=e.next(),i=!1,u=E(e);if(r=="<"){if(e.match("!--",!0))return o(e,t,p);if(e.match("![CDATA",!1))return t.tokenize=d,s("tag","tag");if(e.match("?",!1))return o(e,t,v);var h=e.eat("/");e.eatSpace();var g="",y;while(y=e.eat(/[^\s\u00a0=<>\"\'\/?]/))g+=y;return o(e,t,c(g,h))}if(r=="{")return x(t,{type:"codeblock"}),s("","");if(r=="}")return T(t),s("","");if(m(t))return r==">"?s("tag","tag"):r=="/"&&e.eat(">")?(T(t),s("tag","tag")):s("word","variable");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),s("number","atom");if(r==="("&&e.eat(":"))return x(t,{type:"comment"}),o(e,t,a);if(!!u||r!=='"'&&r!=="'"){if(r==="$")return o(e,t,l);if(r===":"&&e.eat("="))return s("operator","keyword");if(r==="(")return x(t,{type:"paren"}),s("","");if(r===")")return T(t),s("","");if(r==="[")return x(t,{type:"bracket"}),s("","");if(r==="]")return T(t),s("","");var w=n.propertyIsEnumerable(r)&&n[r];if(u&&r==='"')while(e.next()!=='"');if(u&&r==="'")while(e.next()!=="'");w||e.eatWhile(/[\w\$_-]/);var S=e.eat(":");!e.eat(":")&&S&&e.eatWhile(/[\w\$_-]/),e.match(/^[ \t]*\(/,!1)&&(i=!0);var N=e.current();return w=n.propertyIsEnumerable(N)&&n[N],i&&!w&&(w={type:"function_call",style:"variable def"}),b(t)?(T(t),s("word","variable",N)):((N=="element"||N=="attribute"||w.type=="axis_specifier")&&x(t,{type:"xmlconstructor"}),w?s(w.type,w.style,N):s("word","variable",N))}return o(e,t,f(r))}function a(e,t){var n=!1,r=!1,i=0,o;while(o=e.next()){if(o==")"&&n){if(!(i>0)){T(t);break}i--}else o==":"&&r&&i++;n=o==":",r=o=="("}return s("comment","comment")}function f(e,t){return function(n,r){var i;if(w(r)&&n.current()==e)return T(r),t&&(r.tokenize=t),s("string","string");x(r,{type:"string",name:e,tokenize:f(e,t)});if(n.match("{",!1)&&g(r))return r.tokenize=u,s("string","string");while(i=n.next()){if(i==e){T(r),t&&(r.tokenize=t);break}if(n.match("{",!1)&&g(r))return r.tokenize=u,s("string","string")}return s("string","string")}}function l(e,t){var n=/[\w\$_-]/;if(e.eat('"')){while(e.next()!=='"');e.eat(":")}else e.eatWhile(n),e.match(":=",!1)||e.eat(":");return e.eatWhile(n),t.tokenize=u,s("variable","variable")}function c(e,t){return function(n,r){return n.eatSpace(),t&&n.eat(">")?(T(r),r.tokenize=u,s("tag","tag")):(n.eat("/")||x(r,{type:"tag",name:e,tokenize:u}),n.eat(">")?(r.tokenize=u,s("tag","tag")):(r.tokenize=h,s("tag","tag")))}}function h(e,t){var n=e.next();if(n=="/"&&e.eat(">"))return g(t)&&T(t),m(t)&&T(t),s("tag","tag");if(n==">")return g(t)&&T(t),s("tag","tag");if(n=="=")return s("","");if(n=='"'||n=="'")return o(e,t,f(n,h));g(t)||x(t,{type:"attribute",name:name,tokenize:h}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace();if(e.match(">",!1)||e.match("/",!1))T(t),t.tokenize=u;return s("attribute","attribute")}function p(e,t){while(ch=e.next())if(ch=="-"&&e.match("->",!0))return t.tokenize=u,s("comment","comment")}function d(e,t){while(ch=e.next())if(ch=="]"&&e.match("]",!0))return t.tokenize=u,s("comment","comment")}function v(e,t){while(ch=e.next())if(ch=="?"&&e.match(">",!0))return t.tokenize=u,s("comment","comment meta")}function m(e){return S(e,"tag")}function g(e){return S(e,"attribute")}function y(e){return S(e,"codeblock")}function b(e){return S(e,"xmlconstructor")}function w(e){return S(e,"string")}function E(e){return e.current()==='"'?e.match(/^[^\"]+\"\:/,!1):e.current()==="'"?e.match(/^[^\"]+\'\:/,!1):!1}function S(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function x(e,t){e.stack.push(t)}function T(e){var t=e.stack.pop(),n=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=n||u}var n=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),s={type:"atom",style:"atom"},o={type:"punctuation",style:""},u={type:"axis_specifier",style:"qualifier"},a={"if":t,"switch":t,"while":t,"for":t,"else":n,then:n,"try":n,"finally":n,"catch":n,element:r,attribute:r,let:r,"implements":r,"import":r,module:r,namespace:r,"return":r,"super":r,"this":r,"throws":r,where:r,"private":r,",":o,"null":s,"fn:false()":s,"fn:true()":s},f=["after","ancestor","ancestor-or-self","and","as","ascending","assert","attribute","before","by","case","cast","child","comment","declare","default","define","descendant","descendant-or-self","descending","document","document-node","element","else","eq","every","except","external","following","following-sibling","follows","for","function","if","import","in","instance","intersect","item","let","module","namespace","node","node","of","only","or","order","parent","precedes","preceding","preceding-sibling","processing-instruction","ref","return","returns","satisfies","schema","schema-element","self","some","sortby","stable","text","then","to","treat","typeswitch","union","variable","version","where","xquery","empty-sequence"];for(var l=0,c=f.length;l<c;l++)a[f[l]]=e(f[l]);var h=["xs:string","xs:float","xs:decimal","xs:double","xs:integer","xs:boolean","xs:date","xs:dateTime","xs:time","xs:duration","xs:dayTimeDuration","xs:time","xs:yearMonthDuration","numeric","xs:hexBinary","xs:base64Binary","xs:anyURI","xs:QName","xs:byte","xs:boolean","xs:anyURI","xf:yearMonthDuration"];for(var l=0,c=h.length;l<c;l++)a[h[l]]=s;var p=["eq","ne","lt","le","gt","ge",":=","=",">",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"];for(var l=0,c=p.length;l<c;l++)a[p[l]]=i;var d=["self::","attribute::","child::","descendant::","descendant-or-self::","parent::","ancestor::","ancestor-or-self::","following::","preceding::","following-sibling::","preceding-sibling::"];for(var l=0,c=d.length;l<c;l++)a[d[l]]=u;return a}(),r,i;return{startState:function(e){return{tokenize:u,cc:[],stack:[]}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t);return n}}}),CodeMirror.defineMIME("application/xquery","xquery"),CodeMirror.defineMode("yaml",function(){var e=["true","false","on","off","yes","no"],t=new RegExp("\\b(("+e.join(")|(")+"))$","i");return{token:function(e,n){var r=e.peek(),i=n.escaped;n.escaped=!1;if(r=="#")return e.skipToEnd(),"comment";if(n.literal&&e.indentation()>n.keyCol)return e.skipToEnd(),"string";n.literal&&(n.literal=!1);if(e.sol()){n.keyCol=0,n.pair=!1,n.pairStart=!1;if(e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(!n.pair&&e.match(/^\s*([a-z0-9\._-])+(?=\s*:)/i))return n.pair=!0,n.keyCol=e.indentation(),"atom";if(n.pair&&e.match(/^:\s*/))return n.pairStart=!0,"meta";if(e.match(/^(\{|\}|\[|\])/))return r=="{"?n.inlinePairs++:r=="}"?n.inlinePairs--:r=="["?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&r==",")return e.next(),"meta";if(n.inlinePairs>0&&!i&&r==",")return n.keyCol=0,n.pair=!1,n.pairStart=!1,e.next(),"meta";if(n.pairStart){if(e.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(n.inlinePairs==0&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(t))return"keyword"}return n.pairStart=!1,n.escaped=r=="\\",e.next(),null},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),CodeMirror.defineMIME("text/x-yaml","yaml")
0 2
\ No newline at end of file
1 3
new file mode 100644
... ...
@@ -0,0 +1,120 @@
1
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+// Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+(function(mod) {
5
+  if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+    mod(require("../../lib/codemirror"));
7
+  else if (typeof define == "function" && define.amd) // AMD
8
+    define(["../../lib/codemirror"], mod);
9
+  else // Plain browser env
10
+    mod(CodeMirror);
11
+})(function(CodeMirror) {
12
+"use strict";
13
+
14
+CodeMirror.defineMode("commonlisp", function (config) {
15
+  var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/;
16
+  var numLiteral = /^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/;
17
+  var symbol = /[^\s'`,@()\[\]";]/;
18
+  var type;
19
+
20
+  function readSym(stream) {
21
+    var ch;
22
+    while (ch = stream.next()) {
23
+      if (ch == "\\") stream.next();
24
+      else if (!symbol.test(ch)) { stream.backUp(1); break; }
25
+    }
26
+    return stream.current();
27
+  }
28
+
29
+  function base(stream, state) {
30
+    if (stream.eatSpace()) {type = "ws"; return null;}
31
+    if (stream.match(numLiteral)) return "number";
32
+    var ch = stream.next();
33
+    if (ch == "\\") ch = stream.next();
34
+
35
+    if (ch == '"') return (state.tokenize = inString)(stream, state);
36
+    else if (ch == "(") { type = "open"; return "bracket"; }
37
+    else if (ch == ")" || ch == "]") { type = "close"; return "bracket"; }
38
+    else if (ch == ";") { stream.skipToEnd(); type = "ws"; return "comment"; }
39
+    else if (/['`,@]/.test(ch)) return null;
40
+    else if (ch == "|") {
41
+      if (stream.skipTo("|")) { stream.next(); return "symbol"; }
42
+      else { stream.skipToEnd(); return "error"; }
43
+    } else if (ch == "#") {
44
+      var ch = stream.next();
45
+      if (ch == "[") { type = "open"; return "bracket"; }
46
+      else if (/[+\-=\.']/.test(ch)) return null;
47
+      else if (/\d/.test(ch) && stream.match(/^\d*#/)) return null;
48
+      else if (ch == "|") return (state.tokenize = inComment)(stream, state);
49
+      else if (ch == ":") { readSym(stream); return "meta"; }
50
+      else return "error";
51
+    } else {
52
+      var name = readSym(stream);
53
+      if (name == ".") return null;
54
+      type = "symbol";
55
+      if (name == "nil" || name == "t") return "atom";
56
+      if (name.charAt(0) == ":") return "keyword";
57
+      if (name.charAt(0) == "&") return "variable-2";
58
+      return "variable";
59
+    }
60
+  }
61
+
62
+  function inString(stream, state) {
63
+    var escaped = false, next;
64
+    while (next = stream.next()) {
65
+      if (next == '"' && !escaped) { state.tokenize = base; break; }
66
+      escaped = !escaped && next == "\\";
67
+    }
68
+    return "string";
69
+  }
70
+
71
+  function inComment(stream, state) {
72
+    var next, last;
73
+    while (next = stream.next()) {
74
+      if (next == "#" && last == "|") { state.tokenize = base; break; }
75
+      last = next;
76
+    }
77
+    type = "ws";
78
+    return "comment";
79
+  }
80
+
81
+  return {
82
+    startState: function () {
83
+      return {ctx: {prev: null, start: 0, indentTo: 0}, tokenize: base};
84
+    },
85
+
86
+    token: function (stream, state) {
87
+      if (stream.sol() && typeof state.ctx.indentTo != "number")
88
+        state.ctx.indentTo = state.ctx.start + 1;
89
+
90
+      type = null;
91
+      var style = state.tokenize(stream, state);
92
+      if (type != "ws") {
93
+        if (state.ctx.indentTo == null) {
94
+          if (type == "symbol" && assumeBody.test(stream.current()))
95
+            state.ctx.indentTo = state.ctx.start + config.indentUnit;
96
+          else
97
+            state.ctx.indentTo = "next";
98
+        } else if (state.ctx.indentTo == "next") {
99
+          state.ctx.indentTo = stream.column();
100
+        }
101
+      }
102
+      if (type == "open") state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null};
103
+      else if (type == "close") state.ctx = state.ctx.prev || state.ctx;
104
+      return style;
105
+    },
106
+
107
+    indent: function (state, _textAfter) {
108
+      var i = state.ctx.indentTo;
109
+      return typeof i == "number" ? i : state.ctx.start + 1;
110
+    },
111
+
112
+    lineComment: ";;",
113
+    blockCommentStart: "#|",
114
+    blockCommentEnd: "|#"
115
+  };
116
+});
117
+
118
+CodeMirror.defineMIME("text/x-common-lisp", "commonlisp");
119
+
120
+});
0 121
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+// HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed
2
+// Uncompressed source: https://github.com/aFarkas/html5shiv
3
+(function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f<e;++f)d[f].specified&&c.setAttribute(d[f].nodeName,d[f].nodeValue);c.style.cssText=a.style.cssText,a.parentNode.replaceChild(c,a),c.originalElement=a}function g(a){var b=a.originalElement;while(a.childNodes.length)b.appendChild(a.childNodes[0]);a.parentNode.replaceChild(b,a)}function h(a,b){b=b||"all";var c=-1,d=[],e=a.length,f,g;while(++c<e){f=a[c],g=f.media||b;if(f.disabled||!/print|all/.test(g))continue;d.push(h(f.imports,g),f.cssText)}return d.join("")}function i(c){var d=new RegExp("(^|[\\s,{}])("+a.html5.elements.join("|")+")","gi"),e=c.split("{"),f=e.length,g=-1;while(++g<f)e[g]=e[g].split("}"),b.documentMode>7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="<x-element></x-element>",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x<style>","article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}","audio{display:none}","canvas,video{display:inline-block;*display:inline;*zoom:1}","[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}","mark{background:#FF0;color:#000}","</style>"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c<g)j=e[c],d.test(j.nodeName)&&f(j);b.appendChild(b._shivedStyleSheet=b.createElement("style")).styleSheet.cssText=k}),a.attachEvent("onafterprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;var c=-1,d=b.getElementsByTagName("*"),e=d.length,f;while(++c<e)f=d[c],f.originalElement&&g(f);b._shivedStyleSheet&&b._shivedStyleSheet.parentNode.removeChild(b._shivedStyleSheet)})})(this,document)
0 4
\ No newline at end of file
1 5
new file mode 100644
... ...
@@ -0,0 +1,4 @@
1
+/*! jQuery v1.7.1 jquery.com | jquery.org/license */
2
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
3
+f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
4
+{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
0 5
\ No newline at end of file
1 6
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+!function(){function a(b,c,d){var e=a.resolve(b);if(null==e){d=d||b,c=c||"root";var f=new Error('Failed to require "'+d+'" from "'+c+'"');throw f.path=d,f.parent=c,f.require=!0,f}var g=a.modules[e];if(!g._resolving&&!g.exports){var h={};h.exports={},h.client=h.component=!0,g._resolving=!0,g.call(this,h.exports,a.relative(e),h),delete g._resolving,g.exports=h.exports}return g.exports}a.modules={},a.aliases={},a.resolve=function(b){"/"===b.charAt(0)&&(b=b.slice(1));for(var c=[b,b+".js",b+".json",b+"/index.js",b+"/index.json"],d=0;d<c.length;d++){var b=c[d];if(a.modules.hasOwnProperty(b))return b;if(a.aliases.hasOwnProperty(b))return a.aliases[b]}},a.normalize=function(a,b){var c=[];if("."!=b.charAt(0))return b;a=a.split("/"),b=b.split("/");for(var d=0;d<b.length;++d)".."==b[d]?a.pop():"."!=b[d]&&""!=b[d]&&c.push(b[d]);return a.concat(c).join("/")},a.register=function(b,c){a.modules[b]=c},a.alias=function(b,c){if(!a.modules.hasOwnProperty(b))throw new Error('Failed to alias "'+b+'", it does not exist');a.aliases[c]=b},a.relative=function(b){function c(a,b){for(var c=a.length;c--;)if(a[c]===b)return c;return-1}function d(c){var e=d.resolve(c);return a(e,b,c)}var e=a.normalize(b,"..");return d.resolve=function(d){var f=d.charAt(0);if("/"==f)return d.slice(1);if("."==f)return a.normalize(e,d);var g=b.split("/"),h=c(g,"deps")+1;return h||(h=0),d=g.slice(0,h+1).join("/")+"/deps/"+d},d.exists=function(b){return a.modules.hasOwnProperty(d.resolve(b))},d},a.register("component-classes/index.js",function(a,b,c){function d(a){if(!a)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=b("indexof"),f=/\s+/,g=Object.prototype.toString;c.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;c<b.length;c++)a.test(b[c])&&this.remove(b[c]);return this},d.prototype.toggle=function(a,b){return this.list?("undefined"!=typeof b?b!==this.list.toggle(a,b)&&this.list.toggle(a):this.list.toggle(a),this):("undefined"!=typeof b?b?this.add(a):this.remove(a):this.has(a)?this.remove(a):this.add(a),this)},d.prototype.array=function(){var a=this.el.className.replace(/^\s+|\s+$/g,""),b=a.split(f);return""===b[0]&&b.shift(),b},d.prototype.has=d.prototype.contains=function(a){return this.list?this.list.contains(a):!!~e(this.array(),a)}}),a.register("segmentio-extend/index.js",function(a,b,c){c.exports=function(a){for(var b,c=Array.prototype.slice.call(arguments,1),d=0;b=c[d];d++)if(b)for(var e in b)a[e]=b[e];return a}}),a.register("component-indexof/index.js",function(a,b,c){c.exports=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;++c)if(a[c]===b)return c;return-1}}),a.register("component-event/index.js",function(a){var b=window.addEventListener?"addEventListener":"attachEvent",c=window.removeEventListener?"removeEventListener":"detachEvent",d="addEventListener"!==b?"on":"";a.bind=function(a,c,e,f){return a[b](d+c,e,f||!1),e},a.unbind=function(a,b,e,f){return a[c](d+b,e,f||!1),e}}),a.register("javve-to-array/index.js",function(a,b,c){c.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(a instanceof Array)return a;if("number"!=typeof a.length)return[a];if("function"==typeof a)return[a];for(var b=[],c=0;c<a.length;c++)(Object.prototype.hasOwnProperty.call(a,c)||c in a)&&b.push(a[c]);return b.length?b:[]}}),a.register("javve-events/index.js",function(a,b){var c=b("event"),d=b("to-array");a.bind=function(a,b,e,f){a=d(a);for(var g=0;g<a.length;g++)c.bind(a[g],b,e,f)},a.unbind=function(a,b,e,f){a=d(a);for(var g=0;g<a.length;g++)c.unbind(a[g],b,e,f)}}),a.register("javve-get-by-class/index.js",function(a,b,c){c.exports=function(){return document.getElementsByClassName?function(a,b,c){return c?a.getElementsByClassName(b)[0]:a.getElementsByClassName(b)}:document.querySelector?function(a,b,c){return b="."+b,c?a.querySelector(b):a.querySelectorAll(b)}:function(a,b,c){var d=[],e="*";null==a&&(a=document);for(var f=a.getElementsByTagName(e),g=f.length,h=new RegExp("(^|\\s)"+b+"(\\s|$)"),i=0,j=0;g>i;i++)if(h.test(f[i].className)){if(c)return f[i];d[j]=f[i],j++}return d}}()}),a.register("javve-get-attribute/index.js",function(a,b,c){c.exports=function(a,b){var c=a.getAttribute&&a.getAttribute(b)||null;if(!c)for(var d=a.attributes,e=d.length,f=0;e>f;f++)void 0!==b[f]&&b[f].nodeName===b&&(c=b[f].nodeValue);return c}}),a.register("javve-natural-sort/index.js",function(a,b,c){c.exports=function(a,b,c){var d,e,f=/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,g=/(^[ ]*|[ ]*$)/g,h=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,i=/^0x[0-9a-f]+$/i,j=/^0/,c=c||{},k=function(a){return c.insensitive&&(""+a).toLowerCase()||""+a},l=k(a).replace(g,"")||"",m=k(b).replace(g,"")||"",n=l.replace(f,"\x00$1\x00").replace(/\0$/,"").replace(/^\0/,"").split("\x00"),o=m.replace(f,"\x00$1\x00").replace(/\0$/,"").replace(/^\0/,"").split("\x00"),p=parseInt(l.match(i))||1!=n.length&&l.match(h)&&Date.parse(l),q=parseInt(m.match(i))||p&&m.match(h)&&Date.parse(m)||null,r=c.desc?-1:1;if(q){if(q>p)return-1*r;if(p>q)return 1*r}for(var s=0,t=Math.max(n.length,o.length);t>s;s++){if(d=!(n[s]||"").match(j)&&parseFloat(n[s])||n[s]||0,e=!(o[s]||"").match(j)&&parseFloat(o[s])||o[s]||0,isNaN(d)!==isNaN(e))return isNaN(d)?1:-1;if(typeof d!=typeof e&&(d+="",e+=""),e>d)return-1*r;if(d>e)return 1*r}return 0}}),a.register("javve-to-string/index.js",function(a,b,c){c.exports=function(a){return a=void 0===a?"":a,a=null===a?"":a,a=a.toString()}}),a.register("component-type/index.js",function(a,b,c){var d=Object.prototype.toString;c.exports=function(a){switch(d.call(a)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===a?"null":void 0===a?"undefined":a!==a?"nan":a&&1===a.nodeType?"element":typeof a.valueOf()}}),a.register("list.js/index.js",function(a,b,c){!function(a,d){"use strict";var e=a.document,f=b("get-by-class"),g=b("extend"),h=b("indexof"),i=function(a,c,i){var j,k=this,l=b("./src/item")(k),m=b("./src/add-async")(k),n=b("./src/parse")(k);j={start:function(){k.listClass="list",k.searchClass="search",k.sortClass="sort",k.page=200,k.i=1,k.items=[],k.visibleItems=[],k.matchingItems=[],k.searched=!1,k.filtered=!1,k.handlers={updated:[]},k.plugins={},k.helpers={getByClass:f,extend:g,indexOf:h},g(k,c),k.listContainer="string"==typeof a?e.getElementById(a):a,k.listContainer&&(k.list=f(k.listContainer,k.listClass,!0),k.templater=b("./src/templater")(k),k.search=b("./src/search")(k),k.filter=b("./src/filter")(k),k.sort=b("./src/sort")(k),this.items(),k.update(),this.plugins())},items:function(){n(k.list),i!==d&&k.add(i)},plugins:function(){for(var a=0;a<k.plugins.length;a++){var b=k.plugins[a];k[b.name]=b,b.init(k)}}},this.add=function(a,b){if(b)return m(a,b),void 0;var c=[],e=!1;a[0]===d&&(a=[a]);for(var f=0,g=a.length;g>f;f++){var h=null;a[f]instanceof l?(h=a[f],h.reload()):(e=k.items.length>k.page?!0:!1,h=new l(a[f],d,e)),k.items.push(h),c.push(h)}return k.update(),c},this.show=function(a,b){return this.i=a,this.page=b,k.update(),k},this.remove=function(a,b,c){for(var d=0,e=0,f=k.items.length;f>e;e++)k.items[e].values()[a]==b&&(k.templater.remove(k.items[e],c),k.items.splice(e,1),f--,e--,d++);return k.update(),d},this.get=function(a,b){for(var c=[],d=0,e=k.items.length;e>d;d++){var f=k.items[d];f.values()[a]==b&&c.push(f)}return c},this.size=function(){return k.items.length},this.clear=function(){return k.templater.clear(),k.items=[],k},this.on=function(a,b){return k.handlers[a].push(b),k},this.off=function(a,b){var c=k.handlers[a],d=h(c,b);return d>-1&&c.splice(d,1),k},this.trigger=function(a){for(var b=k.handlers[a].length;b--;)k.handlers[a][b](k);return k},this.reset={filter:function(){for(var a=k.items,b=a.length;b--;)a[b].filtered=!1;return k},search:function(){for(var a=k.items,b=a.length;b--;)a[b].found=!1;return k}},this.update=function(){var a=k.items,b=a.length;k.visibleItems=[],k.matchingItems=[],k.templater.clear();for(var c=0;b>c;c++)a[c].matching()&&k.matchingItems.length+1>=k.i&&k.visibleItems.length<k.page?(a[c].show(),k.visibleItems.push(a[c]),k.matchingItems.push(a[c])):a[c].matching()?(k.matchingItems.push(a[c]),a[c].hide()):a[c].hide();return k.trigger("updated"),k},j.start()};c.exports=i}(window)}),a.register("list.js/src/search.js",function(a,b,c){var d=b("events"),e=b("get-by-class"),f=b("to-string");c.exports=function(a){var b,c,g,h,i={resetList:function(){a.i=1,a.templater.clear(),h=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?h=a[1]:3==a.length&&(c=a[1],h=a[2])},setColumns:function(){c=void 0===c?i.toArray(a.items[0].values()):c},setSearchString:function(a){a=f(a).toLowerCase(),a=a.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),g=a},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},j={list:function(){for(var b=0,c=a.items.length;c>b;b++)j.item(a.items[b])},item:function(a){a.found=!1;for(var b=0,d=c.length;d>b;b++)if(j.values(a.values(),c[b]))return a.found=!0,void 0},values:function(a,c){return a.hasOwnProperty(c)&&(b=f(a[c]).toLowerCase(),""!==g&&b.search(g)>-1)?!0:!1},reset:function(){a.reset.search(),a.searched=!1}},k=function(b){return a.trigger("searchStart"),i.resetList(),i.setSearchString(b),i.setOptions(arguments),i.setColumns(),""===g?j.reset():(a.searched=!0,h?h(g,c):j.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],d.bind(e(a.listContainer,a.searchClass),"keyup",function(a){var b=a.target||a.srcElement;k(b.value)}),a.helpers.toString=f,k}}),a.register("list.js/src/sort.js",function(a,b,c){var d=b("natural-sort"),e=b("classes"),f=b("events"),g=b("get-by-class"),h=b("get-attribute");c.exports=function(a){a.sortFunction=a.sortFunction||function(a,b,c){return c.desc="desc"==c.order?!0:!1,d(a.values()[c.valueName],b.values()[c.valueName],c)};var b={els:void 0,clear:function(){for(var a=0,c=b.els.length;c>a;a++)e(b.els[a]).remove("asc"),e(b.els[a]).remove("desc")},getOrder:function(a){var b=h(a,"data-order");return"asc"==b||"desc"==b?b:e(a).has("desc")?"asc":e(a).has("asc")?"desc":"asc"},getInSensitive:function(a,b){var c=h(a,"data-insensitive");b.insensitive="true"===c?!0:!1},setOrder:function(a){for(var c=0,d=b.els.length;d>c;c++){var f=b.els[c];if(h(f,"data-sort")===a.valueName){var g=h(f,"data-order");"asc"==g||"desc"==g?g==a.order&&e(f).add(a.order):e(f).add(a.order)}}}},c=function(){a.trigger("sortStart"),options={};var c=arguments[0].currentTarget||arguments[0].srcElement||void 0;c?(options.valueName=h(c,"data-sort"),b.getInSensitive(c,options),options.order=b.getOrder(c)):(options=arguments[1]||options,options.valueName=arguments[0],options.order=options.order||"asc",options.insensitive="undefined"==typeof options.insensitive?!0:options.insensitive),b.clear(),b.setOrder(options),options.sortFunction=options.sortFunction||a.sortFunction,a.items.sort(function(a,b){return options.sortFunction(a,b,options)}),a.update(),a.trigger("sortComplete")};return a.handlers.sortStart=a.handlers.sortStart||[],a.handlers.sortComplete=a.handlers.sortComplete||[],b.els=g(a.listContainer,a.sortClass),f.bind(b.els,"click",c),a.on("searchStart",b.clear),a.on("filterStart",b.clear),a.helpers.classes=e,a.helpers.naturalSort=d,a.helpers.events=f,a.helpers.getAttribute=h,c}}),a.register("list.js/src/item.js",function(a,b,c){c.exports=function(a){return function(b,c,d){var e=this;this._values={},this.found=!1,this.filtered=!1;var f=function(b,c,d){if(void 0===c)d?e.values(b,d):e.values(b);else{e.elm=c;var f=a.templater.get(e,b);e.values(f)}};this.values=function(b,c){if(void 0===b)return e._values;for(var d in b)e._values[d]=b[d];c!==!0&&a.templater.set(e,e.values())},this.show=function(){a.templater.show(e)},this.hide=function(){a.templater.hide(e)},this.matching=function(){return a.filtered&&a.searched&&e.found&&e.filtered||a.filtered&&!a.searched&&e.filtered||!a.filtered&&a.searched&&e.found||!a.filtered&&!a.searched},this.visible=function(){return e.elm.parentNode==a.list?!0:!1},f(b,c,d)}}}),a.register("list.js/src/templater.js",function(a,b,c){var d=b("get-by-class"),e=function(a){function b(b){if(void 0===b){for(var c=a.list.childNodes,d=0,e=c.length;e>d;d++)if(void 0===c[d].data)return c[d];return null}if(-1!==b.indexOf("<")){var f=document.createElement("div");return f.innerHTML=b,f.firstChild}return document.getElementById(a.item)}var c=b(a.item),e=this;this.get=function(a,b){e.create(a);for(var c={},f=0,g=b.length;g>f;f++){var h=d(a.elm,b[f],!0);c[b[f]]=h?h.innerHTML:""}return c},this.set=function(a,b){if(!e.create(a))for(var c in b)if(b.hasOwnProperty(c)){var f=d(a.elm,c,!0);f&&("IMG"===f.tagName&&""!==b[c]?f.src=b[c]:f.innerHTML=b[c])}},this.create=function(a){if(void 0!==a.elm)return!1;var b=c.cloneNode(!0);return b.removeAttribute("id"),a.elm=b,e.set(a,a.values()),!0},this.remove=function(b){a.list.removeChild(b.elm)},this.show=function(b){e.create(b),a.list.appendChild(b.elm)},this.hide=function(b){void 0!==b.elm&&b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.clear=function(){if(a.list.hasChildNodes())for(;a.list.childNodes.length>=1;)a.list.removeChild(a.list.firstChild)}};c.exports=function(a){return new e(a)}}),a.register("list.js/src/filter.js",function(a,b,c){c.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;e>d;d++){var f=c[d];f.filtered=b(f)?!0:!1}}return a.update(),a.trigger("filterComplete"),a.visibleItems}}}),a.register("list.js/src/add-async.js",function(a,b,c){c.exports=function(a){return function(b,c,d){var e=b.splice(0,100);d=d||[],d=d.concat(a.add(e)),b.length>0?setTimeout(function(){addAsync(b,c,d)},10):(a.update(),c(d))}}}),a.register("list.js/src/parse.js",function(a,b,c){c.exports=function(a){var c=b("./item")(a),d=function(a){for(var b=a.childNodes,c=[],d=0,e=b.length;e>d;d++)void 0===b[d].data&&c.push(b[d]);return c},e=function(b,d){for(var e=0,f=b.length;f>e;e++)a.items.push(new c(d,b[e]))},f=function(b,c){var d=b.splice(0,100);e(d,c),b.length>0?setTimeout(function(){init.items.indexAsync(b,c)},10):a.update()};return function(){var b=d(a.list),c=a.valueNames;a.indexAsync?f(b,c):e(b,c)}}}),a.alias("component-classes/index.js","list.js/deps/classes/index.js"),a.alias("component-classes/index.js","classes/index.js"),a.alias("component-indexof/index.js","component-classes/deps/indexof/index.js"),a.alias("segmentio-extend/index.js","list.js/deps/extend/index.js"),a.alias("segmentio-extend/index.js","extend/index.js"),a.alias("component-indexof/index.js","list.js/deps/indexof/index.js"),a.alias("component-indexof/index.js","indexof/index.js"),a.alias("javve-events/index.js","list.js/deps/events/index.js"),a.alias("javve-events/index.js","events/index.js"),a.alias("component-event/index.js","javve-events/deps/event/index.js"),a.alias("javve-to-array/index.js","javve-events/deps/to-array/index.js"),a.alias("javve-get-by-class/index.js","list.js/deps/get-by-class/index.js"),a.alias("javve-get-by-class/index.js","get-by-class/index.js"),a.alias("javve-get-attribute/index.js","list.js/deps/get-attribute/index.js"),a.alias("javve-get-attribute/index.js","get-attribute/index.js"),a.alias("javve-natural-sort/index.js","list.js/deps/natural-sort/index.js"),a.alias("javve-natural-sort/index.js","natural-sort/index.js"),a.alias("javve-to-string/index.js","list.js/deps/to-string/index.js"),a.alias("javve-to-string/index.js","list.js/deps/to-string/index.js"),a.alias("javve-to-string/index.js","to-string/index.js"),a.alias("javve-to-string/index.js","javve-to-string/index.js"),a.alias("component-type/index.js","list.js/deps/type/index.js"),a.alias("component-type/index.js","type/index.js"),"object"==typeof exports?module.exports=a("list.js"):"function"==typeof define&&define.amd?define(function(){return a("list.js")}):this.List=a("list.js")}();
0 2
\ No newline at end of file
1 3
new file mode 100644
... ...
@@ -0,0 +1,62 @@
1
+$(function () {
2
+    $('.dropdown-toggle').dropdown();
3
+
4
+    if ($('#sourcecode').length) {
5
+        var value = $('#sourcecode').text();
6
+        var mode = $('#sourcecode').attr('language');
7
+        var pre = $('#sourcecode').get(0);
8
+        var viewer = CodeMirror(function(elt) {
9
+            pre.parentNode.replaceChild(elt, pre);
10
+        }, {
11
+            value: value,
12
+            lineNumbers: true,
13
+            matchBrackets: true,
14
+            lineWrapping: true,
15
+            readOnly: true,
16
+            mode: mode,
17
+            theme: 'solarized dark',
18
+            lineNumberFormatter: function(ln) {
19
+                return '<a name="L'+ ln +'"></a><a href="#L'+ ln +'">'+ ln +'</a>';
20
+            }
21
+        });
22
+    }
23
+
24
+    if ($('#md-content').length) {
25
+        var converter = new Showdown.converter({extensions: ['table']});
26
+        $('#md-content').html(converter.makeHtml($('#md-content').text()));
27
+    }
28
+
29
+    function paginate() {
30
+        var $pager = $('.pager');
31
+
32
+        $pager.find('.next a').one('click', function (e) {
33
+            e.preventDefault();
34
+            $.get(this.href, function (html) {
35
+                $pager.after(html);
36
+                $pager.remove();
37
+                paginate();
38
+            });
39
+        });
40
+
41
+        $pager.find('.previous').remove();
42
+    }
43
+    paginate();
44
+});
45
+
46
+if ($('#repositories').length) {
47
+    var listOptions = {
48
+        valueNames: ['name']
49
+    };
50
+    var repoList = new List('repositories', listOptions);
51
+}
52
+
53
+if ($('#branchList').length) {
54
+    var listBranchOptions = {
55
+        valueNames: ['item']
56
+    };
57
+    var repoList = new List('branchList', listBranchOptions);
58
+}
59
+
60
+$('.search').click(function (e) {
61
+    e.stopPropagation();
62
+});
0 63
new file mode 100644
... ...
@@ -0,0 +1,581 @@
1
+/**
2
+ * Network Graph JS
3
+ * This File is a part of the GitList Project at http://gitlist.org
4
+ *
5
+ * @license http://www.opensource.org/licenses/bsd-license.php
6
+ * @author Lukas Domnick <lukx@lukx.de> http://github.com/lukx
7
+ */
8
+
9
+( function( $ ){
10
+	// global config
11
+	var cfg = {
12
+		laneColors: ['#ff0000', '#0000FF', '#00FFFF', '#00FF00', '#FFFF00', '#ff00ff'],
13
+		laneHeight: 20,
14
+		columnWidth: 42,
15
+		dotRadius: 3
16
+	};
17
+
18
+	// Define the jQuery Plugins
19
+
20
+	/**
21
+	 * DragScrollr is a custom made x/y-Drag Scroll Plugin for Gitlist
22
+	 *
23
+	 * TODO: Make this touch-scrollable
24
+	 */
25
+	$.fn.dragScrollr = function() {
26
+		var lastX,
27
+			lastY,
28
+			hotZone = 200,
29
+			container = this.first(),
30
+			domElement = container[0]; // so basically container without the jQuery stuff
31
+
32
+		function handleMouseDown( evt ) {
33
+			container.on('mousemove', handleMouseMove);
34
+			container.on('mouseup', handleMouseUp);
35
+			container.on('mouseleave', handleMouseUp);
36
+			lastX = evt.pageX;
37
+			lastY = evt.pageY;
38
+		}
39
+
40
+		function handleMouseMove(evt) {
41
+			evt.preventDefault();
42
+
43
+			// save the last scroll position to figure out whether the scroll event has entered the hot zone
44
+			var lastScrollLeft = domElement.scrollLeft;
45
+			domElement.scrollLeft = domElement.scrollLeft + lastX - evt.pageX;
46
+			domElement.scrollTop = domElement.scrollTop + lastY - evt.pageY;
47
+
48
+			if( lastScrollLeft > hotZone && domElement.scrollLeft <= hotZone ) {
49
+				container.trigger('enterHotZone');
50
+			}
51
+
52
+			// when we move into the hot zone
53
+
54
+			lastX = evt.pageX;
55
+			lastY = evt.pageY;
56
+		}
57
+
58
+		function handleMouseUp(evt) {
59
+			container.off('mousemove', handleMouseMove)
60
+				.off('mouseup', handleMouseUp)
61
+				.off('mouseleave', handleMouseUp);
62
+		}
63
+
64
+		// now bind the initial event
65
+		container.on('mousedown', handleMouseDown);
66
+
67
+		// return this instead of container, because of the .first() we applied - remember?
68
+		return this;
69
+	};
70
+
71
+	function graphLaneManager() {
72
+		var that = {},
73
+			occupiedLanes = [];
74
+
75
+		// "private" methods
76
+		function findLaneNumberFor( commit ) {
77
+
78
+			if( commit.lane ) {
79
+				// oh? we've already got a lane?
80
+				return commit.lane.number;
81
+			}
82
+
83
+			// find out which lane may draw our dot on. Start with a free one
84
+			var laneNumber = findFreeLane();
85
+
86
+			// if the child is a merge, we need to figure out which lane we may render this commit on.
87
+			// Rules are simple: A "parent" by the same author as the merge may render on the same line as the child
88
+			// others take the next free lane.
89
+			// furthermore, commits in a linear line of events may stay on the same lane, too
90
+			if( commit.children.length > 0) {
91
+				if( !commit.children[0].isMerge // linear ...
92
+					|| ( commit.children[0].isMerge	&& commit.children[0].author.email === commit.author.email ) // same author
93
+					) {
94
+					laneNumber = commit.children[0].lane.number;
95
+				}
96
+			}
97
+
98
+			return laneNumber;
99
+		}
100
+
101
+		function findFreeLane() {
102
+			var i = 0;
103
+
104
+			while( true ) {
105
+				// if an array index is not yet defined or set to false, the lane with that number is free.
106
+				if( !occupiedLanes[i] ) {
107
+					return i;
108
+				}
109
+				i ++;
110
+			}
111
+		}
112
+
113
+		that.occupy = function( lane ) {
114
+			// make sure we work with lane numbers here
115
+			if( typeof lane === 'object' ) {
116
+				lane = lane.number;
117
+			}
118
+
119
+			occupiedLanes[lane] = true;
120
+		};
121
+
122
+		that.free = function( lane ) {
123
+			// make sure we work with lane numbers here
124
+			if( typeof lane === 'object' ) {
125
+				lane = lane.number;
126
+			}
127
+
128
+			occupiedLanes[lane] = false;
129
+		};
130
+
131
+		that.getLaneForCommit = function( commit ) {
132
+			// does this commit have a lane already?
133
+			if( commit.lane ) return commit.lane;
134
+
135
+			var laneNumber = findLaneNumberFor( commit );
136
+			return that.getLane( laneNumber );
137
+		};
138
+
139
+		that.getLane = function(laneNumber) {
140
+			return {
141
+				'number': laneNumber,
142
+				'centerY': ( laneNumber * cfg.laneHeight ) + (cfg.laneHeight/2),
143
+				'color': cfg.laneColors[ laneNumber % cfg.laneColors.length ]
144
+			};
145
+		};
146
+
147
+		return that;
148
+	}
149
+
150
+	function commitDetailOverlay( ) {
151
+		var that = {},
152
+			el = $('<div class="network-commit-overlay"></div>'),
153
+			imageDisplay = $('<img/>').appendTo(el),
154
+			messageDisplay = $('<h4></h4>').appendTo(el),
155
+			metaDisplay = $('<p></p>').appendTo(el),
156
+			authorDisplay = $('<a rel="author"></a>').appendTo(metaDisplay),
157
+			dateDisplay = $('<span></span>').appendTo(metaDisplay),
158
+
159
+			commit;
160
+
161
+		el.hide();
162
+		/**
163
+		 * Pads an input number with one leading '0' if needed, and assure it's a string
164
+		 *
165
+		 * @param input Number
166
+		 * @returns String
167
+		 */
168
+		function twoDigits( input ) {
169
+			if( input < 10 ) {
170
+				return '0' + input;
171
+			}
172
+
173
+			return '' + input;
174
+		}
175
+
176
+		/**
177
+		 * Transform a JS Native Date Object to a string, maintaining the same format given in the commit_list view
178
+		 * 'd/m/Y \\a\\t H:i:s'
179
+		 *
180
+		 * @param date Date
181
+		 * @returns String
182
+		 */
183
+		function getDateString( date )  {
184
+			return twoDigits( date.getDate() )	+ '/'
185
+				+ twoDigits( date.getMonth() ) + '/'
186
+				+ date.getFullYear() + ' at '
187
+				+ twoDigits(date.getHours()) + ':'
188
+				+ twoDigits(date.getMinutes()) + ':'
189
+				+ twoDigits(date.getSeconds());
190
+		}
191
+
192
+		/**
193
+		 * update the author view
194
+		 *
195
+		 * @param author
196
+		 */
197
+		function setAuthor( author ) {
198
+			authorDisplay.html(author.name)
199
+				.attr('href', 'mailto:' + author.email );
200
+
201
+			imageDisplay.attr('src', author.image );
202
+		}
203
+
204
+		/**
205
+		 * Set the commit that is being displayed in this detail overlay instance
206
+		 *
207
+		 * @param commit
208
+		 * @return that
209
+		 */
210
+		that.setCommit = function( commit ) {
211
+			setAuthor( commit.author );
212
+			dateDisplay.html( ' authored on ' + getDateString( commit.date ) );
213
+			messageDisplay.html( commit.message );
214
+			return that;
215
+		};
216
+
217
+		// expose some jquery functions
218
+
219
+		that.show = function() {
220
+			el.show();
221
+			return that;
222
+		};
223
+
224
+		that.hide = function() {
225
+			el.hide();
226
+			return that;
227
+		};
228
+
229
+		that.appendTo = function(where) {
230
+			el.appendTo(where);
231
+
232
+			return that;
233
+		};
234
+
235
+		that.positionTo = function( x, y ) {
236
+			el.css('left', x + 'px');
237
+			el.css('top', y + 'px');
238
+		};
239
+
240
+		that.outerWidth = function( ) {
241
+			return el.outerWidth.apply(el, arguments);
242
+		};
243
+
244
+
245
+		return that;
246
+	}
247
+
248
+	function commitDataRetriever( startPage, callback ) {
249
+		var that = {},
250
+			nextPage = startPage,
251
+			isLoading = false,
252
+			indicatorElements;
253
+
254
+		that.updateIndicators = function() {
255
+			if( isLoading ) {
256
+				$(indicatorElements).addClass('loading-commits');
257
+			} else {
258
+				$(indicatorElements).removeClass('loading-commits');
259
+			}
260
+		};
261
+
262
+		that.bindIndicator = function( el ) {
263
+			if( !indicatorElements ) {
264
+				indicatorElements = $(el);
265
+			} else {
266
+				indicatorElements = indicatorElements.add(el);
267
+			}
268
+
269
+		};
270
+
271
+		that.unbindIndicator = function( el ) {
272
+			indicatorElements.not( el );
273
+		};
274
+
275
+		function handleNetworkDataLoaded(data) {
276
+			isLoading = false;
277
+			that.updateIndicators();
278
+			nextPage = data.nextPage;
279
+
280
+			if( !data.commits || data.commits.length === 0 ) {
281
+				callback( null );
282
+			}
283
+
284
+			callback(data.commits);
285
+		}
286
+
287
+		function handleNetworkDataError() {
288
+			throw "Network Data Error while retrieving Commits";
289
+		}
290
+
291
+		that.retrieve = function() {
292
+
293
+			if( !nextPage ) {
294
+				callback( null );
295
+				return;
296
+			}
297
+
298
+			isLoading = true;
299
+			that.updateIndicators();
300
+			$.ajax({
301
+				dataType: "json",
302
+				url: nextPage,
303
+				success: handleNetworkDataLoaded,
304
+				error: handleNetworkDataError
305
+			});
306
+		};
307
+
308
+		that.hasMore = function () {
309
+			return ( !!nextPage );
310
+		};
311
+
312
+		return that;
313
+	}
314
+
315
+
316
+	// the $(document).ready starting point
317
+	$( function() {
318
+
319
+		// initialise network graph only when there is one network graph container on the page
320
+		if( $('div.network-graph').length !== 1 ) {
321
+			return;
322
+		}
323
+
324
+		var
325
+		// the element into which we will render our graph
326
+			commitsGraph = $('div.network-graph').first(),
327
+			laneManager = graphLaneManager(),
328
+			dataRetriever = commitDataRetriever( commitsGraph.data('source'), handleCommitsRetrieved  ),
329
+			paper = Raphael( commitsGraph[0], commitsGraph.width(), commitsGraph.height()),
330
+			usedColumns = 0,
331
+			detailOverlay = commitDetailOverlay();
332
+
333
+		dataRetriever.bindIndicator( commitsGraph.parent('.network-view') );
334
+		detailOverlay.appendTo( commitsGraph );
335
+
336
+
337
+		function handleEnterHotZone() {
338
+			dataRetriever.retrieve();
339
+		}
340
+
341
+		function handleCommitsRetrieved( commits ) {
342
+
343
+			// no commits or empty commits array? Well, we can't draw a graph of that
344
+			if( commits === null ) {
345
+				handleNoAvailableData();
346
+				return;
347
+			}
348
+
349
+			prepareCommits( commits );
350
+			renderCommits( commits );
351
+		}
352
+
353
+		function handleNoAvailableData() {
354
+			window.console && console.log('No (more) Data available');
355
+		}
356
+
357
+		var awaitedParents = {};
358
+
359
+		function prepareCommits( commits ) {
360
+			$.each( commits, function ( index, commit) {
361
+				prepareCommit( commit );
362
+			});
363
+		}
364
+
365
+		function prepareCommit( commit ) {
366
+			// make "date" an actual JS Date object
367
+			commit.date = new Date(commit.date*1000);
368
+
369
+			// the parents will be filled once they have become prepared
370
+			commit.parents = [];
371
+
372
+			// we will want to store this commit's children
373
+			commit.children = getChildrenFor( commit );
374
+
375
+			commit.isFork  = ( commit.children.length > 1 );
376
+			commit.isMerge = ( commit.parentsHash.length > 1 );
377
+
378
+			// after a fork, the occupied lanes must be cleaned up. The children used some lanes we no longer occupy
379
+			if ( commit.isFork === true ) {
380
+				$.each( commit.children, function( key, thisChild ) {
381
+					// free this lane
382
+					laneManager.occupy( thisChild.lane );
383
+				});
384
+			}
385
+
386
+			commit.lane = laneManager.getLaneForCommit( commit );
387
+
388
+			// now the lane we chose must be marked occupied again.
389
+			laneManager.occupy( commit.lane );
390
+
391
+			registerAwaitedParentsFor( commit );
392
+		}
393
+
394
+		/**
395
+		 * Add a new childCommit to the dictionary of awaited parents
396
+		 *
397
+		 * @param commit who is waiting?
398
+		 */
399
+		function registerAwaitedParentsFor( commit ) {
400
+			// This commit's parents are not yet known in our little world, as we are rendering following the time line.
401
+			// Therefore we are registering this commit as "waiting" for each of the parent hashes
402
+			$.each( commit.parentsHash, function( key, thisParentHash ) {
403
+				// If awaitedParents does not already have a key for thisParent's hash, initialise as array
404
+				if( !awaitedParents.hasOwnProperty(thisParentHash) ) {
405
+					awaitedParents[thisParentHash] = [ commit ];
406
+				} else {
407
+					awaitedParents[ thisParentHash ].push( commit );
408
+				}
409
+			});
410
+		}
411
+
412
+		function getChildrenFor( commit ) {
413
+			var children = [];
414
+
415
+			if( awaitedParents.hasOwnProperty( commit.hash )) {
416
+				// there are child commits waiting
417
+				children = awaitedParents[ commit.hash ];
418
+
419
+				// let the children know their parent objects
420
+				$.each( children, function(key, thisChild ) {
421
+					thisChild.parents.push( commit );
422
+				});
423
+
424
+				// remove this item from parentsBeingWaitedFor
425
+				delete awaitedParents[ commit.hash ];
426
+			}
427
+
428
+			return children;
429
+		}
430
+
431
+		var lastRenderedDate = new Date(0);
432
+		function renderCommits( commits ) {
433
+
434
+			var neededWidth = ((usedColumns + Object.keys(commits).length) * cfg.columnWidth);
435
+
436
+			if (  neededWidth > paper.width ) {
437
+				extendPaper( neededWidth, paper.height  );
438
+			} else if( dataRetriever.hasMore() ) {
439
+				// this is the case when we have not loaded enough commits to fill the paper yet. Get some more then...
440
+				dataRetriever.retrieve();
441
+			}
442
+
443
+			$.each( commits, function ( index, commit) {
444
+				if( lastRenderedDate.getYear() !== commit.date.getYear()
445
+					|| lastRenderedDate.getMonth() !== commit.date.getMonth()
446
+					|| lastRenderedDate.getDate() !== commit.date.getDate() ) {
447
+					// TODO: If desired, one could add a time scale on top, maybe.
448
+				}
449
+				renderCommit(commit);
450
+			});
451
+		}
452
+
453
+		function renderCommit( commit ) {
454
+			// find the column this dot is drawn on
455
+			usedColumns++;
456
+			commit.column = usedColumns;
457
+
458
+			commit.dot = paper.circle( getXPositionForColumnNumber(commit.column), commit.lane.centerY, cfg.dotRadius );
459
+			commit.dot.attr({
460
+					fill: commit.lane.color,
461
+					stroke: 'none',
462
+					cursor: 'pointer'
463
+				})
464
+				.data('commit', commit)
465
+				.mouseover( handleCommitMouseover )
466
+				.mouseout( handleCommitMouseout )
467
+				.click( handleCommitClick );
468
+
469
+			// maybe we have not enough space for the lane yet
470
+			if( commit.lane.centerY + cfg.laneHeight > paper.height ) {
471
+				extendPaper( paper.width, commit.lane.centerY + cfg.laneHeight )
472
+			}
473
+
474
+			$.each( commit.children, function ( idx, thisChild ) {
475
+
476
+				// if there is one child only, stay on the commit's lane as long as possible when connecting the dots.
477
+				// but if there is more than one child, switch to the child's lane ASAP.
478
+				// this is to display merges and forks where they happen (ie. at a commit node/ a dot), rather than
479
+				// connecting from a line.
480
+				// So: commit.isFork decides whether or not we must switch lanes early
481
+
482
+				connectDots( commit, thisChild, commit.isFork );
483
+			});
484
+		}
485
+
486
+		/**
487
+		 *
488
+		 * @param firstCommit
489
+		 * @param secondCommit
490
+		 * @param switchLanesEarly (boolean): Move the line to the secondCommit's lane ASAP? Defaults to false
491
+		 */
492
+		function connectDots( firstCommit, secondCommit, switchLanesEarly ) {
493
+			// default value for switchLanesEarly
494
+			switchLanesEarly = switchLanesEarly || false;
495
+
496
+			var lineLane = switchLanesEarly ? secondCommit.lane : firstCommit.lane;
497
+
498
+			// the connection has 4 stops, resulting in the following 3 segments:
499
+			// - from the x/y center of firstCommit.dot to the rightmost end (x) of the commit's column, with y=lineLane
500
+			// - from the rightmost end of firstCommit's column, to the leftmost end of secondCommit's column
501
+			// - from the leftmost end of secondCommit's column (y=lineLane) to the x/y center of secondCommit
502
+
503
+			paper.path(
504
+				getSvgLineString(
505
+					[firstCommit.dot.attr('cx'), 						firstCommit.dot.attr('cy')],
506
+					[firstCommit.dot.attr('cx') + (cfg.columnWidth/2),	lineLane.centerY],
507
+					[secondCommit.dot.attr('cx') - (cfg.columnWidth/2),	lineLane.centerY],
508
+					[secondCommit.dot.attr('cx'),						secondCommit.dot.attr('cy')]
509
+				)
510
+			).attr({ "stroke": lineLane.color, "stroke-width": 2 }).toBack();
511
+
512
+			return;
513
+		}
514
+
515
+		// set together a path string from any amount of arguments
516
+		// each argument is an array of [x, y] within the paper's coordinate system
517
+		function getSvgLineString( ) {
518
+			if (arguments.length < 2) return;
519
+
520
+			var svgString = 'M' + arguments[0][0] + ' ' + arguments[0][1];
521
+
522
+			for (var i = 1, j = arguments.length; i < j; i++){
523
+				svgString += 'L' + arguments[i][0] + ' ' + arguments[i][1];
524
+			}
525
+
526
+			return svgString;
527
+		}
528
+
529
+		function handleCommitMouseover(evt) {
530
+			detailOverlay.setCommit( this.data('commit'))
531
+				.show();
532
+
533
+			var xPos = evt.pageX - commitsGraph.offset().left + commitsGraph.scrollLeft() - (detailOverlay.outerWidth()/2);
534
+			// check that x doesn't run out the viewport
535
+			xPos = Math.max( xPos, commitsGraph.scrollLeft() + 10);
536
+			xPos = Math.min( xPos, commitsGraph.scrollLeft() + commitsGraph.width() - detailOverlay.outerWidth() - 10);
537
+
538
+			detailOverlay.positionTo( xPos,
539
+							 evt.pageY - commitsGraph.offset().top + commitsGraph.scrollTop() + 10);
540
+		}
541
+
542
+		function handleCommitMouseout(evt) {
543
+			detailOverlay.hide();
544
+		}
545
+
546
+		function handleCommitClick( evt ) {
547
+			window.open( this.data('commit').details );
548
+		}
549
+
550
+		function getXPositionForColumnNumber( columnNumber ) {
551
+			// we want the column's center point
552
+			return ( paper.width - ( columnNumber * cfg.columnWidth ) + (cfg.columnWidth / 2 ));
553
+		}
554
+
555
+		function extendPaper( newWidth, newHeight ) {
556
+			var deltaX = newWidth - paper.width;
557
+
558
+			paper.setSize( newWidth, newHeight );
559
+			// fixup parent's scroll position
560
+			paper.canvas.parentNode.scrollLeft = paper.canvas.parentNode.scrollLeft + deltaX;
561
+
562
+			// now fixup the x positions of existing circles and lines
563
+			paper.forEach( function( el ) {
564
+
565
+				if( el.type === "circle" ) {
566
+					el.attr('cx', el.attr('cx') + deltaX);
567
+				} else if ( el.type === "path") {
568
+					var newXTranslation = el.data('currentXTranslation') || 0;
569
+					newXTranslation += deltaX;
570
+					el.transform( 't' + newXTranslation + ' 0' );
571
+					el.data('currentXTranslation', newXTranslation);
572
+				}
573
+			});
574
+		}
575
+
576
+		commitsGraph.dragScrollr();
577
+		commitsGraph.on('enterHotZone', handleEnterHotZone);
578
+		// load initial data
579
+		dataRetriever.retrieve( );
580
+	});
581
+}( jQuery ));
0 582
\ No newline at end of file
1 583
new file mode 100644
... ...
@@ -0,0 +1,10 @@
1
+// ┌────────────────────────────────────────────────────────────────────┐ \\
2
+// │ Raphaël 2.1.0 - JavaScript Vector Library                          │ \\
3
+// ├────────────────────────────────────────────────────────────────────┤ \\
4
+// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com)    │ \\
5
+// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com)              │ \\
6
+// ├────────────────────────────────────────────────────────────────────┤ \\
7
+// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\
8
+// └────────────────────────────────────────────────────────────────────┘ \\
9
+(function(n){var e,t,r="0.4.2",f="hasOwnProperty",i=/[\.\/]/,o="*",u=function(){},l=function(n,e){return n-e},s={n:{}},p=function(n,r){n+="";var f,i=t,o=Array.prototype.slice.call(arguments,2),u=p.listeners(n),s=0,a=[],c={},h=[],d=e;e=n,t=0;for(var g=0,v=u.length;v>g;g++)"zIndex"in u[g]&&(a.push(u[g].zIndex),0>u[g].zIndex&&(c[u[g].zIndex]=u[g]));for(a.sort(l);0>a[s];)if(f=c[a[s++]],h.push(f.apply(r,o)),t)return t=i,h;for(g=0;v>g;g++)if(f=u[g],"zIndex"in f)if(f.zIndex==a[s]){if(h.push(f.apply(r,o)),t)break;do if(s++,f=c[a[s]],f&&h.push(f.apply(r,o)),t)break;while(f)}else c[f.zIndex]=f;else if(h.push(f.apply(r,o)),t)break;return t=i,e=d,h.length?h:null};p._events=s,p.listeners=function(n){var e,t,r,f,u,l,p,a,c=n.split(i),h=s,d=[h],g=[];for(f=0,u=c.length;u>f;f++){for(a=[],l=0,p=d.length;p>l;l++)for(h=d[l].n,t=[h[c[f]],h[o]],r=2;r--;)e=t[r],e&&(a.push(e),g=g.concat(e.f||[]));d=a}return g},p.on=function(n,e){if(n+="","function"!=typeof e)return function(){};for(var t=n.split(i),r=s,f=0,o=t.length;o>f;f++)r=r.n,r=r.hasOwnProperty(t[f])&&r[t[f]]||(r[t[f]]={n:{}});for(r.f=r.f||[],f=0,o=r.f.length;o>f;f++)if(r.f[f]==e)return u;return r.f.push(e),function(n){+n==+n&&(e.zIndex=+n)}},p.f=function(n){var e=[].slice.call(arguments,1);return function(){p.apply(null,[n,null].concat(e).concat([].slice.call(arguments,0)))}},p.stop=function(){t=1},p.nt=function(n){return n?RegExp("(?:\\.|\\/|^)"+n+"(?:\\.|\\/|$)").test(e):e},p.nts=function(){return e.split(i)},p.off=p.unbind=function(n,e){if(!n)return p._events=s={n:{}},void 0;var t,r,u,l,a,c,h,d=n.split(i),g=[s];for(l=0,a=d.length;a>l;l++)for(c=0;g.length>c;c+=u.length-2){if(u=[c,1],t=g[c].n,d[l]!=o)t[d[l]]&&u.push(t[d[l]]);else for(r in t)t[f](r)&&u.push(t[r]);g.splice.apply(g,u)}for(l=0,a=g.length;a>l;l++)for(t=g[l];t.n;){if(e){if(t.f){for(c=0,h=t.f.length;h>c;c++)if(t.f[c]==e){t.f.splice(c,1);break}!t.f.length&&delete t.f}for(r in t.n)if(t.n[f](r)&&t.n[r].f){var v=t.n[r].f;for(c=0,h=v.length;h>c;c++)if(v[c]==e){v.splice(c,1);break}!v.length&&delete t.n[r].f}}else{delete t.f;for(r in t.n)t.n[f](r)&&t.n[r].f&&delete t.n[r].f}t=t.n}},p.once=function(n,e){var t=function(){return p.unbind(n,t),e.apply(this,arguments)};return p.on(n,t)},p.version=r,p.toString=function(){return"You are running Eve "+r},"undefined"!=typeof module&&module.exports?module.exports=p:"undefined"!=typeof define?define("eve",[],function(){return p}):n.eve=p})(this);(function(){function t(e){if(t.is(e,"function"))return m?e():eve.on("raphael.DOMload",e);if(t.is(e,N))return t._engine.create[F](t,e.splice(0,3+t.is(e[0],Y))).add(e);var n=Array.prototype.slice.call(arguments,0);if(t.is(n[n.length-1],"function")){var r=n.pop();return m?r.call(t._engine.create[F](t,n)):eve.on("raphael.DOMload",function(){r.call(t._engine.create[F](t,n))})}return t._engine.create[F](t,arguments)}function e(t){if(Object(t)!==t)return t;var n=new t.constructor;for(var r in t)t[k](r)&&(n[r]=e(t[r]));return n}function n(t,e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return t.push(t.splice(n,1)[0])}function r(t,e,r){function i(){var a=Array.prototype.slice.call(arguments,0),s=a.join("␀"),o=i.cache=i.cache||{},u=i.count=i.count||[];return o[k](s)?(n(u,s),r?r(o[s]):o[s]):(u.length>=1e3&&delete o[u.shift()],u.push(s),o[s]=t[F](e,a),r?r(o[s]):o[s])}return i}function i(){return this.hex}function a(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4==r?a[3]={x:+t[0],y:+t[1]}:i-2==r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4==r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n}function s(t,e,n,r,i){var a=-3*e+9*n-9*r+3*i,s=t*a+6*e-12*n+6*r;return t*s-3*e+3*n}function o(t,e,n,r,i,a,o,u,l){null==l&&(l=1),l=l>1?1:0>l?0:l;for(var h=l/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;c>g;g++){var x=h*f[g]+h,v=s(x,t,n,i,o),m=s(x,e,r,a,u),y=v*v+m*m;d+=p[g]*j.sqrt(y)}return h*d}function u(t,e,n,r,i,a,s,u,l){if(!(0>l||l>o(t,e,n,r,i,a,s,u))){var h,c=1,f=c/2,p=c-f,d=.01;for(h=o(t,e,n,r,i,a,s,u,p);O(h-l)>d;)f/=2,p+=(l>h?1:-1)*f,h=o(t,e,n,r,i,a,s,u,p);return p}}function l(t,e,n,r,i,a,s,o){if(!(D(t,n)<z(i,s)||z(t,n)>D(i,s)||D(e,r)<z(a,o)||z(e,r)>D(a,o))){var u=(t*r-e*n)*(i-s)-(t-n)*(i*o-a*s),l=(t*r-e*n)*(a-o)-(e-r)*(i*o-a*s),h=(t-n)*(a-o)-(e-r)*(i-s);if(h){var c=u/h,f=l/h,p=+c.toFixed(2),d=+f.toFixed(2);if(!(+z(t,n).toFixed(2)>p||p>+D(t,n).toFixed(2)||+z(i,s).toFixed(2)>p||p>+D(i,s).toFixed(2)||+z(e,r).toFixed(2)>d||d>+D(e,r).toFixed(2)||+z(a,o).toFixed(2)>d||d>+D(a,o).toFixed(2)))return{x:c,y:f}}}}function h(e,n,r){var i=t.bezierBBox(e),a=t.bezierBBox(n);if(!t.isBBoxIntersect(i,a))return r?0:[];for(var s=o.apply(0,e),u=o.apply(0,n),h=~~(s/5),c=~~(u/5),f=[],p=[],d={},g=r?0:[],x=0;h+1>x;x++){var v=t.findDotsAtSegment.apply(t,e.concat(x/h));f.push({x:v.x,y:v.y,t:x/h})}for(x=0;c+1>x;x++)v=t.findDotsAtSegment.apply(t,n.concat(x/c)),p.push({x:v.x,y:v.y,t:x/c});for(x=0;h>x;x++)for(var m=0;c>m;m++){var y=f[x],b=f[x+1],_=p[m],w=p[m+1],k=.001>O(b.x-y.x)?"y":"x",B=.001>O(w.x-_.x)?"y":"x",S=l(y.x,y.y,b.x,b.y,_.x,_.y,w.x,w.y);if(S){if(d[S.x.toFixed(4)]==S.y.toFixed(4))continue;d[S.x.toFixed(4)]=S.y.toFixed(4);var C=y.t+O((S[k]-y[k])/(b[k]-y[k]))*(b.t-y.t),F=_.t+O((S[B]-_[B])/(w[B]-_[B]))*(w.t-_.t);C>=0&&1>=C&&F>=0&&1>=F&&(r?g++:g.push({x:S.x,y:S.y,t1:C,t2:F}))}}return g}function c(e,n,r){e=t._path2curve(e),n=t._path2curve(n);for(var i,a,s,o,u,l,c,f,p,d,g=r?0:[],x=0,v=e.length;v>x;x++){var m=e[x];if("M"==m[0])i=u=m[1],a=l=m[2];else{"C"==m[0]?(p=[i,a].concat(m.slice(1)),i=p[6],a=p[7]):(p=[i,a,i,a,u,l,u,l],i=u,a=l);for(var y=0,b=n.length;b>y;y++){var _=n[y];if("M"==_[0])s=c=_[1],o=f=_[2];else{"C"==_[0]?(d=[s,o].concat(_.slice(1)),s=d[6],o=d[7]):(d=[s,o,s,o,c,f,c,f],s=c,o=f);var w=h(p,d,r);if(r)g+=w;else{for(var k=0,B=w.length;B>k;k++)w[k].segment1=x,w[k].segment2=y,w[k].bez1=p,w[k].bez2=d;g=g.concat(w)}}}}}return g}function f(t,e,n,r,i,a){null!=t?(this.a=+t,this.b=+e,this.c=+n,this.d=+r,this.e=+i,this.f=+a):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function p(){return this.x+P+this.y+P+this.width+" × "+this.height}function d(t,e,n,r,i,a){function s(t){return((c*t+h)*t+l)*t}function o(t,e){var n=u(t,e);return((d*n+p)*n+f)*n}function u(t,e){var n,r,i,a,o,u;for(i=t,u=0;8>u;u++){if(a=s(i)-t,e>O(a))return i;if(o=(3*c*i+2*h)*i+l,1e-6>O(o))break;i-=a/o}if(n=0,r=1,i=t,n>i)return n;if(i>r)return r;for(;r>n;){if(a=s(i),e>O(a-t))return i;t>a?n=i:r=i,i=(r-n)/2+n}return i}var l=3*e,h=3*(r-e)-l,c=1-l-h,f=3*n,p=3*(i-n)-f,d=1-f-p;return o(t,1/(200*a))}function g(t,e){var n=[],r={};if(this.ms=e,this.times=1,t){for(var i in t)t[k](i)&&(r[Q(i)]=t[i],n.push(Q(i)));n.sort(le)}this.anim=r,this.top=n[n.length-1],this.percents=n}function x(e,n,r,i,a,s){r=Q(r);var o,u,l,h,c,p,g=e.ms,x={},v={},m={};if(i)for(_=0,w=sn.length;w>_;_++){var y=sn[_];if(y.el.id==n.id&&y.anim==e){y.percent!=r?(sn.splice(_,1),l=1):u=y,n.attr(y.totalOrigin);break}}else i=+v;for(var _=0,w=e.percents.length;w>_;_++){if(e.percents[_]==r||e.percents[_]>i*e.top){r=e.percents[_],c=e.percents[_-1]||0,g=g/e.top*(r-c),h=e.percents[_+1],o=e.anim[r];break}i&&n.attr(e.anim[e.percents[_]])}if(o){if(u)u.initstatus=i,u.start=new Date-u.ms*i;else{for(var B in o)if(o[k](B)&&(ee[k](B)||n.paper.customAttributes[k](B)))switch(x[B]=n.attr(B),null==x[B]&&(x[B]=te[B]),v[B]=o[B],ee[B]){case Y:m[B]=(v[B]-x[B])/g;break;case"colour":x[B]=t.getRGB(x[B]);var S=t.getRGB(v[B]);m[B]={r:(S.r-x[B].r)/g,g:(S.g-x[B].g)/g,b:(S.b-x[B].b)/g};break;case"path":var C=Ie(x[B],v[B]),F=C[1];for(x[B]=C[0],m[B]=[],_=0,w=x[B].length;w>_;_++){m[B][_]=[0];for(var L=1,A=x[B][_].length;A>L;L++)m[B][_][L]=(F[_][L]-x[B][_][L])/g}break;case"transform":var P=n._,I=ze(P[B],v[B]);if(I)for(x[B]=I.from,v[B]=I.to,m[B]=[],m[B].real=!0,_=0,w=x[B].length;w>_;_++)for(m[B][_]=[x[B][_][0]],L=1,A=x[B][_].length;A>L;L++)m[B][_][L]=(v[B][_][L]-x[B][_][L])/g;else{var R=n.matrix||new f,q={_:{transform:P.transform},getBBox:function(){return n.getBBox(1)}};x[B]=[R.a,R.b,R.c,R.d,R.e,R.f],je(q,v[B]),v[B]=q._.transform,m[B]=[(q.matrix.a-R.a)/g,(q.matrix.b-R.b)/g,(q.matrix.c-R.c)/g,(q.matrix.d-R.d)/g,(q.matrix.e-R.e)/g,(q.matrix.f-R.f)/g]}break;case"csv":var j=E(o[B])[M](b),D=E(x[B])[M](b);if("clip-rect"==B)for(x[B]=D,m[B]=[],_=D.length;_--;)m[B][_]=(j[_]-x[B][_])/g;v[B]=j;break;default:for(j=[][T](o[B]),D=[][T](x[B]),m[B]=[],_=n.paper.customAttributes[B].length;_--;)m[B][_]=((j[_]||0)-(D[_]||0))/g}var z=o.easing,O=t.easing_formulas[z];if(!O)if(O=E(z).match(U),O&&5==O.length){var V=O;O=function(t){return d(t,+V[1],+V[2],+V[3],+V[4],g)}}else O=ce;if(p=o.start||e.start||+new Date,y={anim:e,percent:r,timestamp:p,start:p+(e.del||0),status:0,initstatus:i||0,stop:!1,ms:g,easing:O,from:x,diff:m,to:v,el:n,callback:o.callback,prev:c,next:h,repeat:s||e.times,origin:n.attr(),totalOrigin:a},sn.push(y),i&&!u&&!l&&(y.stop=!0,y.start=new Date-g*i,1==sn.length))return un();l&&(y.start=new Date-y.ms*i),1==sn.length&&on(un)}eve("raphael.anim.start."+n.id,n,e)}}function v(t){for(var e=0;sn.length>e;e++)sn[e].el.paper==t&&sn.splice(e--,1)}t.version="2.1.0",t.eve=eve;var m,y,b=/[, ]+/,_={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},w=/\{(\d+)\}/g,k="hasOwnProperty",B={doc:document,win:window},S={was:Object.prototype[k].call(B.win,"Raphael"),is:B.win.Raphael},C=function(){this.ca=this.customAttributes={}},F="apply",T="concat",L="createTouch"in B.doc,A="",P=" ",E=String,M="split",I="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[M](P),R={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},q=E.prototype.toLowerCase,j=Math,D=j.max,z=j.min,O=j.abs,V=j.pow,X=j.PI,Y="number",G="string",N="array",W=Object.prototype.toString,$=(t._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),H={NaN:1,Infinity:1,"-Infinity":1},U=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Z=j.round,Q=parseFloat,J=parseInt,K=E.prototype.toUpperCase,te=t._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},ee=t._availableAnimAttrs={blur:Y,"clip-rect":"csv",cx:Y,cy:Y,fill:"colour","fill-opacity":Y,"font-size":Y,height:Y,opacity:Y,path:"path",r:Y,rx:Y,ry:Y,stroke:"colour","stroke-opacity":Y,"stroke-width":Y,transform:"transform",width:Y,x:Y,y:Y},ne=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,re={hs:1,rg:1},ie=/,?([achlmqrstvxz]),?/gi,ae=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,se=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,oe=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,ue=(t._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),le=function(t,e){return Q(t)-Q(e)},he=function(){},ce=function(t){return t},fe=t._rectPath=function(t,e,n,r,i){return i?[["M",t+i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]]},pe=function(t,e,n,r){return null==r&&(r=n),[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]]},de=t._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return pe(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return pe(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return fe(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return fe(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return fe(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return fe(e.x,e.y,e.width,e.height)}},ge=t.mapPath=function(t,e){if(!e)return t;var n,r,i,a,s,o,u;for(t=Ie(t),i=0,s=t.length;s>i;i++)for(u=t[i],a=1,o=u.length;o>a;a+=2)n=e.x(u[a],u[a+1]),r=e.y(u[a],u[a+1]),u[a]=n,u[a+1]=r;return t};if(t._g=B,t.type=B.win.SVGAngle||B.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==t.type){var xe,ve=B.doc.createElement("div");if(ve.innerHTML='<v:shape adj="1"/>',xe=ve.firstChild,xe.style.behavior="url(#default#VML)",!xe||"object"!=typeof xe.adj)return t.type=A;ve=null}t.svg=!(t.vml="VML"==t.type),t._Paper=C,t.fn=y=C.prototype=t.prototype,t._id=0,t._oid=0,t.is=function(t,e){return e=q.call(e),"finite"==e?!H[k](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e},t.angle=function(e,n,r,i,a,s){if(null==a){var o=e-r,u=n-i;return o||u?(180+180*j.atan2(-u,-o)/X+360)%360:0}return t.angle(e,n,a,s)-t.angle(r,i,a,s)},t.rad=function(t){return t%360*X/180},t.deg=function(t){return 180*t/X%360},t.snapTo=function(e,n,r){if(r=t.is(r,"finite")?r:10,t.is(e,N)){for(var i=e.length;i--;)if(r>=O(e[i]-n))return e[i]}else{e=+e;var a=n%e;if(r>a)return n-a;if(a>e-r)return n-a+e}return n},t.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=0|16*j.random(),n="x"==t?e:8|3&e;return n.toString(16)}),t.setWindow=function(e){eve("raphael.setWindow",t,B.win,e),B.win=e,B.doc=B.win.document,t._engine.initWin&&t._engine.initWin(B.win)};var me=function(e){if(t.vml){var n,i=/^\s+|\s+$/g;try{var a=new ActiveXObject("htmlfile");a.write("<body>"),a.close(),n=a.body}catch(s){n=createPopup().document.body}var o=n.createTextRange();me=r(function(t){try{n.style.color=E(t).replace(i,A);var e=o.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(r){return"none"}})}else{var u=B.doc.createElement("i");u.title="Raphaël Colour Picker",u.style.display="none",B.doc.body.appendChild(u),me=r(function(t){return u.style.color=t,B.doc.defaultView.getComputedStyle(u,A).getPropertyValue("color")})}return me(e)},ye=function(){return"hsb("+[this.h,this.s,this.b]+")"},be=function(){return"hsl("+[this.h,this.s,this.l]+")"},_e=function(){return this.hex},we=function(e,n,r){if(null==n&&t.is(e,"object")&&"r"in e&&"g"in e&&"b"in e&&(r=e.b,n=e.g,e=e.r),null==n&&t.is(e,G)){var i=t.getRGB(e);e=i.r,n=i.g,r=i.b}return(e>1||n>1||r>1)&&(e/=255,n/=255,r/=255),[e,n,r]},ke=function(e,n,r,i){e*=255,n*=255,r*=255;var a={r:e,g:n,b:r,hex:t.rgb(e,n,r),toString:_e};return t.is(i,"finite")&&(a.opacity=i),a};t.color=function(e){var n;return t.is(e,"object")&&"h"in e&&"s"in e&&"b"in e?(n=t.hsb2rgb(e),e.r=n.r,e.g=n.g,e.b=n.b,e.hex=n.hex):t.is(e,"object")&&"h"in e&&"s"in e&&"l"in e?(n=t.hsl2rgb(e),e.r=n.r,e.g=n.g,e.b=n.b,e.hex=n.hex):(t.is(e,"string")&&(e=t.getRGB(e)),t.is(e,"object")&&"r"in e&&"g"in e&&"b"in e?(n=t.rgb2hsl(e),e.h=n.h,e.s=n.s,e.l=n.l,n=t.rgb2hsb(e),e.v=n.b):(e={hex:"none"},e.r=e.g=e.b=e.h=e.s=e.v=e.l=-1)),e.toString=_e,e},t.hsb2rgb=function(t,e,n,r){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,t=t.h,r=t.o),t*=360;var i,a,s,o,u;return t=t%360/60,u=n*e,o=u*(1-O(t%2-1)),i=a=s=n-u,t=~~t,i+=[u,o,0,0,o,u][t],a+=[o,u,u,o,0,0][t],s+=[0,0,o,u,u,o][t],ke(i,a,s,r)},t.hsl2rgb=function(t,e,n,r){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var i,a,s,o,u;return t=t%360/60,u=2*e*(.5>n?n:1-n),o=u*(1-O(t%2-1)),i=a=s=n-u/2,t=~~t,i+=[u,o,0,0,o,u][t],a+=[o,u,u,o,0,0][t],s+=[0,0,o,u,u,o][t],ke(i,a,s,r)},t.rgb2hsb=function(t,e,n){n=we(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,a,s;return a=D(t,e,n),s=a-z(t,e,n),r=0==s?null:a==t?(e-n)/s:a==e?(n-t)/s+2:(t-e)/s+4,r=60*((r+360)%6)/360,i=0==s?0:s/a,{h:r,s:i,b:a,toString:ye}},t.rgb2hsl=function(t,e,n){n=we(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,a,s,o,u;return s=D(t,e,n),o=z(t,e,n),u=s-o,r=0==u?null:s==t?(e-n)/u:s==e?(n-t)/u+2:(t-e)/u+4,r=60*((r+360)%6)/360,a=(s+o)/2,i=0==u?0:.5>a?u/(2*a):u/(2-2*a),{h:r,s:i,l:a,toString:be}},t._path2string=function(){return this.join(",").replace(ie,"$1")},t._preload=function(t,e){var n=B.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,B.doc.body.removeChild(this)},n.onerror=function(){B.doc.body.removeChild(this)},B.doc.body.appendChild(n),n.src=t},t.getRGB=r(function(e){if(!e||(e=E(e)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:i};if("none"==e)return{r:-1,g:-1,b:-1,hex:"none",toString:i};!(re[k](e.toLowerCase().substring(0,2))||"#"==e.charAt())&&(e=me(e));var n,r,a,s,o,u,l=e.match($);return l?(l[2]&&(a=J(l[2].substring(5),16),r=J(l[2].substring(3,5),16),n=J(l[2].substring(1,3),16)),l[3]&&(a=J((o=l[3].charAt(3))+o,16),r=J((o=l[3].charAt(2))+o,16),n=J((o=l[3].charAt(1))+o,16)),l[4]&&(u=l[4][M](ne),n=Q(u[0]),"%"==u[0].slice(-1)&&(n*=2.55),r=Q(u[1]),"%"==u[1].slice(-1)&&(r*=2.55),a=Q(u[2]),"%"==u[2].slice(-1)&&(a*=2.55),"rgba"==l[1].toLowerCase().slice(0,4)&&(s=Q(u[3])),u[3]&&"%"==u[3].slice(-1)&&(s/=100)),l[5]?(u=l[5][M](ne),n=Q(u[0]),"%"==u[0].slice(-1)&&(n*=2.55),r=Q(u[1]),"%"==u[1].slice(-1)&&(r*=2.55),a=Q(u[2]),"%"==u[2].slice(-1)&&(a*=2.55),("deg"==u[0].slice(-3)||"°"==u[0].slice(-1))&&(n/=360),"hsba"==l[1].toLowerCase().slice(0,4)&&(s=Q(u[3])),u[3]&&"%"==u[3].slice(-1)&&(s/=100),t.hsb2rgb(n,r,a,s)):l[6]?(u=l[6][M](ne),n=Q(u[0]),"%"==u[0].slice(-1)&&(n*=2.55),r=Q(u[1]),"%"==u[1].slice(-1)&&(r*=2.55),a=Q(u[2]),"%"==u[2].slice(-1)&&(a*=2.55),("deg"==u[0].slice(-3)||"°"==u[0].slice(-1))&&(n/=360),"hsla"==l[1].toLowerCase().slice(0,4)&&(s=Q(u[3])),u[3]&&"%"==u[3].slice(-1)&&(s/=100),t.hsl2rgb(n,r,a,s)):(l={r:n,g:r,b:a,toString:i},l.hex="#"+(16777216|a|r<<8|n<<16).toString(16).slice(1),t.is(s,"finite")&&(l.opacity=s),l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:i}},t),t.hsb=r(function(e,n,r){return t.hsb2rgb(e,n,r).hex}),t.hsl=r(function(e,n,r){return t.hsl2rgb(e,n,r).hex}),t.rgb=r(function(t,e,n){return"#"+(16777216|n|e<<8|t<<16).toString(16).slice(1)}),t.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,0>=e.s&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},t.getColor.reset=function(){delete this.start},t.parsePathString=function(e){if(!e)return null;var n=Be(e);if(n.arr)return Ce(n.arr);var r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return t.is(e,N)&&t.is(e[0],N)&&(i=Ce(e)),i.length||E(e).replace(ae,function(t,e,n){var a=[],s=e.toLowerCase();if(n.replace(oe,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(i.push([e][T](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)i.push([e][T](a));else for(;a.length>=r[s]&&(i.push([e][T](a.splice(0,r[s]))),r[s]););}),i.toString=t._path2string,n.arr=Ce(i),i},t.parseTransformString=r(function(e){if(!e)return null;var n=[];return t.is(e,N)&&t.is(e[0],N)&&(n=Ce(e)),n.length||E(e).replace(se,function(t,e,r){var i=[];q.call(e),r.replace(oe,function(t,e){e&&i.push(+e)}),n.push([e][T](i))}),n.toString=t._path2string,n});var Be=function(t){var e=Be.ps=Be.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[k](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};t.findDotsAtSegment=function(t,e,n,r,i,a,s,o,u){var l=1-u,h=V(l,3),c=V(l,2),f=u*u,p=f*u,d=h*t+3*c*u*n+3*l*u*u*i+p*s,g=h*e+3*c*u*r+3*l*u*u*a+p*o,x=t+2*u*(n-t)+f*(i-2*n+t),v=e+2*u*(r-e)+f*(a-2*r+e),m=n+2*u*(i-n)+f*(s-2*i+n),y=r+2*u*(a-r)+f*(o-2*a+r),b=l*t+u*n,_=l*e+u*r,w=l*i+u*s,k=l*a+u*o,B=90-180*j.atan2(x-m,v-y)/X;return(x>m||y>v)&&(B+=180),{x:d,y:g,m:{x:x,y:v},n:{x:m,y:y},start:{x:b,y:_},end:{x:w,y:k},alpha:B}},t.bezierBBox=function(e,n,r,i,a,s,o,u){t.is(e,"array")||(e=[e,n,r,i,a,s,o,u]);var l=Me.apply(null,e);return{x:l.min.x,y:l.min.y,x2:l.max.x,y2:l.max.y,width:l.max.x-l.min.x,height:l.max.y-l.min.y}},t.isPointInsideBBox=function(t,e,n){return e>=t.x&&t.x2>=e&&n>=t.y&&t.y2>=n},t.isBBoxIntersect=function(e,n){var r=t.isPointInsideBBox;return r(n,e.x,e.y)||r(n,e.x2,e.y)||r(n,e.x,e.y2)||r(n,e.x2,e.y2)||r(e,n.x,n.y)||r(e,n.x2,n.y)||r(e,n.x,n.y2)||r(e,n.x2,n.y2)||(e.x<n.x2&&e.x>n.x||n.x<e.x2&&n.x>e.x)&&(e.y<n.y2&&e.y>n.y||n.y<e.y2&&n.y>e.y)},t.pathIntersection=function(t,e){return c(t,e)},t.pathIntersectionNumber=function(t,e){return c(t,e,1)},t.isPointInsidePath=function(e,n,r){var i=t.pathBBox(e);return t.isPointInsideBBox(i,n,r)&&1==c(e,[["M",n,r],["H",i.x2+10]],1)%2},t._removedFactory=function(t){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+t+"” of removed object",t)}};var Se=t.pathBBox=function(t){var n=Be(t);if(n.bbox)return e(n.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Ie(t);for(var r,i=0,a=0,s=[],o=[],u=0,l=t.length;l>u;u++)if(r=t[u],"M"==r[0])i=r[1],a=r[2],s.push(i),o.push(a);else{var h=Me(i,a,r[1],r[2],r[3],r[4],r[5],r[6]);s=s[T](h.min.x,h.max.x),o=o[T](h.min.y,h.max.y),i=r[5],a=r[6]}var c=z[F](0,s),f=z[F](0,o),p=D[F](0,s),d=D[F](0,o),g=p-c,x=d-f,v={x:c,y:f,x2:p,y2:d,width:g,height:x,cx:c+g/2,cy:f+x/2};return n.bbox=e(v),v},Ce=function(n){var r=e(n);return r.toString=t._path2string,r},Fe=t._pathToRelative=function(e){var n=Be(e);if(n.rel)return Ce(n.rel);t.is(e,N)&&t.is(e&&e[0],N)||(e=t.parsePathString(e));var r=[],i=0,a=0,s=0,o=0,u=0;"M"==e[0][0]&&(i=e[0][1],a=e[0][2],s=i,o=a,u++,r.push(["M",i,a]));for(var l=u,h=e.length;h>l;l++){var c=r[l]=[],f=e[l];if(f[0]!=q.call(f[0]))switch(c[0]=q.call(f[0]),c[0]){case"a":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+(f[6]-i).toFixed(3),c[7]=+(f[7]-a).toFixed(3);break;case"v":c[1]=+(f[1]-a).toFixed(3);break;case"m":s=f[1],o=f[2];default:for(var p=1,d=f.length;d>p;p++)c[p]=+(f[p]-(p%2?i:a)).toFixed(3)}else{c=r[l]=[],"m"==f[0]&&(s=f[1]+i,o=f[2]+a);for(var g=0,x=f.length;x>g;g++)r[l][g]=f[g]}var v=r[l].length;switch(r[l][0]){case"z":i=s,a=o;break;case"h":i+=+r[l][v-1];break;case"v":a+=+r[l][v-1];break;default:i+=+r[l][v-2],a+=+r[l][v-1]}}return r.toString=t._path2string,n.rel=Ce(r),r},Te=t._pathToAbsolute=function(e){var n=Be(e);if(n.abs)return Ce(n.abs);if(t.is(e,N)&&t.is(e&&e[0],N)||(e=t.parsePathString(e)),!e||!e.length)return[["M",0,0]];var r=[],i=0,s=0,o=0,u=0,l=0;"M"==e[0][0]&&(i=+e[0][1],s=+e[0][2],o=i,u=s,l++,r[0]=["M",i,s]);for(var h,c,f=3==e.length&&"M"==e[0][0]&&"R"==e[1][0].toUpperCase()&&"Z"==e[2][0].toUpperCase(),p=l,d=e.length;d>p;p++){if(r.push(h=[]),c=e[p],c[0]!=K.call(c[0]))switch(h[0]=K.call(c[0]),h[0]){case"A":h[1]=c[1],h[2]=c[2],h[3]=c[3],h[4]=c[4],h[5]=c[5],h[6]=+(c[6]+i),h[7]=+(c[7]+s);break;case"V":h[1]=+c[1]+s;break;case"H":h[1]=+c[1]+i;break;case"R":for(var g=[i,s][T](c.slice(1)),x=2,v=g.length;v>x;x++)g[x]=+g[x]+i,g[++x]=+g[x]+s;r.pop(),r=r[T](a(g,f));break;case"M":o=+c[1]+i,u=+c[2]+s;default:for(x=1,v=c.length;v>x;x++)h[x]=+c[x]+(x%2?i:s)}else if("R"==c[0])g=[i,s][T](c.slice(1)),r.pop(),r=r[T](a(g,f)),h=["R"][T](c.slice(-2));else for(var m=0,y=c.length;y>m;m++)h[m]=c[m];switch(h[0]){case"Z":i=o,s=u;break;case"H":i=h[1];break;case"V":s=h[1];break;case"M":o=h[h.length-2],u=h[h.length-1];default:i=h[h.length-2],s=h[h.length-1]}}return r.toString=t._path2string,n.abs=Ce(r),r},Le=function(t,e,n,r){return[t,e,n,r,n,r]},Ae=function(t,e,n,r,i,a){var s=1/3,o=2/3;return[s*t+o*n,s*e+o*r,s*i+o*n,s*a+o*r,i,a]},Pe=function(t,e,n,i,a,s,o,u,l,h){var c,f=120*X/180,p=X/180*(+a||0),d=[],g=r(function(t,e,n){var r=t*j.cos(n)-e*j.sin(n),i=t*j.sin(n)+e*j.cos(n);return{x:r,y:i}});if(h)B=h[0],S=h[1],w=h[2],k=h[3];else{c=g(t,e,-p),t=c.x,e=c.y,c=g(u,l,-p),u=c.x,l=c.y;var x=(j.cos(X/180*a),j.sin(X/180*a),(t-u)/2),v=(e-l)/2,m=x*x/(n*n)+v*v/(i*i);m>1&&(m=j.sqrt(m),n=m*n,i=m*i);var y=n*n,b=i*i,_=(s==o?-1:1)*j.sqrt(O((y*b-y*v*v-b*x*x)/(y*v*v+b*x*x))),w=_*n*v/i+(t+u)/2,k=_*-i*x/n+(e+l)/2,B=j.asin(((e-k)/i).toFixed(9)),S=j.asin(((l-k)/i).toFixed(9));B=w>t?X-B:B,S=w>u?X-S:S,0>B&&(B=2*X+B),0>S&&(S=2*X+S),o&&B>S&&(B-=2*X),!o&&S>B&&(S-=2*X)}var C=S-B;if(O(C)>f){var F=S,L=u,A=l;S=B+f*(o&&S>B?1:-1),u=w+n*j.cos(S),l=k+i*j.sin(S),d=Pe(u,l,n,i,a,0,o,L,A,[S,F,w,k])}C=S-B;var P=j.cos(B),E=j.sin(B),I=j.cos(S),R=j.sin(S),q=j.tan(C/4),D=4/3*n*q,z=4/3*i*q,V=[t,e],Y=[t+D*E,e-z*P],G=[u+D*R,l-z*I],N=[u,l];if(Y[0]=2*V[0]-Y[0],Y[1]=2*V[1]-Y[1],h)return[Y,G,N][T](d);d=[Y,G,N][T](d).join()[M](",");for(var W=[],$=0,H=d.length;H>$;$++)W[$]=$%2?g(d[$-1],d[$],p).y:g(d[$],d[$+1],p).x;return W},Ee=function(t,e,n,r,i,a,s,o,u){var l=1-u;return{x:V(l,3)*t+3*V(l,2)*u*n+3*l*u*u*i+V(u,3)*s,y:V(l,3)*e+3*V(l,2)*u*r+3*l*u*u*a+V(u,3)*o}},Me=r(function(t,e,n,r,i,a,s,o){var u,l=i-2*n+t-(s-2*i+n),h=2*(n-t)-2*(i-n),c=t-n,f=(-h+j.sqrt(h*h-4*l*c))/2/l,p=(-h-j.sqrt(h*h-4*l*c))/2/l,d=[e,o],g=[t,s];return O(f)>"1e12"&&(f=.5),O(p)>"1e12"&&(p=.5),f>0&&1>f&&(u=Ee(t,e,n,r,i,a,s,o,f),g.push(u.x),d.push(u.y)),p>0&&1>p&&(u=Ee(t,e,n,r,i,a,s,o,p),g.push(u.x),d.push(u.y)),l=a-2*r+e-(o-2*a+r),h=2*(r-e)-2*(a-r),c=e-r,f=(-h+j.sqrt(h*h-4*l*c))/2/l,p=(-h-j.sqrt(h*h-4*l*c))/2/l,O(f)>"1e12"&&(f=.5),O(p)>"1e12"&&(p=.5),f>0&&1>f&&(u=Ee(t,e,n,r,i,a,s,o,f),g.push(u.x),d.push(u.y)),p>0&&1>p&&(u=Ee(t,e,n,r,i,a,s,o,p),g.push(u.x),d.push(u.y)),{min:{x:z[F](0,g),y:z[F](0,d)},max:{x:D[F](0,g),y:D[F](0,d)}}}),Ie=t._path2curve=r(function(t,e){var n=!e&&Be(t);if(!e&&n.curve)return Ce(n.curve);for(var r=Te(t),i=e&&Te(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=(function(t,e){var n,r;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][T](Pe[F](0,[e.x,e.y][T](t.slice(1))));break;case"S":n=e.x+(e.x-(e.bx||e.x)),r=e.y+(e.y-(e.by||e.y)),t=["C",n,r][T](t.slice(1));break;case"T":e.qx=e.x+(e.x-(e.qx||e.x)),e.qy=e.y+(e.y-(e.qy||e.y)),t=["C"][T](Ae(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][T](Ae(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][T](Le(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][T](Le(e.x,e.y,t[1],e.y));break;case"V":t=["C"][T](Le(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][T](Le(e.x,e.y,e.X,e.Y))}return t}),u=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)t.splice(e++,0,["C"][T](n.splice(0,6)));t.splice(e,1),c=D(r.length,i&&i.length||0)}},l=function(t,e,n,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),n.bx=0,n.by=0,n.x=t[s][1],n.y=t[s][2],c=D(r.length,i&&i.length||0))},h=0,c=D(r.length,i&&i.length||0);c>h;h++){r[h]=o(r[h],a),u(r,h),i&&(i[h]=o(i[h],s)),i&&u(i,h),l(r,i,a,s,h),l(i,r,s,a,h);var f=r[h],p=i&&i[h],d=f.length,g=i&&p.length;a.x=f[d-2],a.y=f[d-1],a.bx=Q(f[d-4])||a.x,a.by=Q(f[d-3])||a.y,s.bx=i&&(Q(p[g-4])||s.x),s.by=i&&(Q(p[g-3])||s.y),s.x=i&&p[g-2],s.y=i&&p[g-1]}return i||(n.curve=Ce(r)),i?[r,i]:r},null,Ce),Re=(t._parseDots=r(function(e){for(var n=[],r=0,i=e.length;i>r;r++){var a={},s=e[r].match(/^([^:]*):?([\d\.]*)/);if(a.color=t.getRGB(s[1]),a.color.error)return null;a.color=a.color.hex,s[2]&&(a.offset=s[2]+"%"),n.push(a)}for(r=1,i=n.length-1;i>r;r++)if(!n[r].offset){for(var o=Q(n[r-1].offset||0),u=0,l=r+1;i>l;l++)if(n[l].offset){u=n[l].offset;break}u||(u=100,l=i),u=Q(u);for(var h=(u-o)/(l-r+1);l>r;r++)o+=h,n[r].offset=o+"%"}return n}),t._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),qe=(t._tofront=function(t,e){e.top!==t&&(Re(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},t._toback=function(t,e){e.bottom!==t&&(Re(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},t._insertafter=function(t,e,n){Re(t,n),e==n.top&&(n.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},t._insertbefore=function(t,e,n){Re(t,n),e==n.bottom&&(n.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},t.toMatrix=function(t,e){var n=Se(t),r={_:{transform:A},getBBox:function(){return n}};return je(r,e),r.matrix}),je=(t.transformPath=function(t,e){return ge(t,qe(t,e))},t._extractTransform=function(e,n){if(null==n)return e._.transform;n=E(n).replace(/\.{3}|\u2026/g,e._.transform||A);var r=t.parseTransformString(n),i=0,a=0,s=0,o=1,u=1,l=e._,h=new f;if(l.transform=r||[],r)for(var c=0,p=r.length;p>c;c++){var d,g,x,v,m,y=r[c],b=y.length,_=E(y[0]).toLowerCase(),w=y[0]!=_,k=w?h.invert():0;"t"==_&&3==b?w?(d=k.x(0,0),g=k.y(0,0),x=k.x(y[1],y[2]),v=k.y(y[1],y[2]),h.translate(x-d,v-g)):h.translate(y[1],y[2]):"r"==_?2==b?(m=m||e.getBBox(1),h.rotate(y[1],m.x+m.width/2,m.y+m.height/2),i+=y[1]):4==b&&(w?(x=k.x(y[2],y[3]),v=k.y(y[2],y[3]),h.rotate(y[1],x,v)):h.rotate(y[1],y[2],y[3]),i+=y[1]):"s"==_?2==b||3==b?(m=m||e.getBBox(1),h.scale(y[1],y[b-1],m.x+m.width/2,m.y+m.height/2),o*=y[1],u*=y[b-1]):5==b&&(w?(x=k.x(y[3],y[4]),v=k.y(y[3],y[4]),h.scale(y[1],y[2],x,v)):h.scale(y[1],y[2],y[3],y[4]),o*=y[1],u*=y[2]):"m"==_&&7==b&&h.add(y[1],y[2],y[3],y[4],y[5],y[6]),l.dirtyT=1,e.matrix=h}e.matrix=h,l.sx=o,l.sy=u,l.deg=i,l.dx=a=h.e,l.dy=s=h.f,1==o&&1==u&&!i&&l.bbox?(l.bbox.x+=+a,l.bbox.y+=+s):l.dirtyT=1}),De=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},ze=t._equaliseTransform=function(e,n){n=E(n).replace(/\.{3}|\u2026/g,e),e=t.parseTransformString(e)||[],n=t.parseTransformString(n)||[];for(var r,i,a,s,o=D(e.length,n.length),u=[],l=[],h=0;o>h;h++){if(a=e[h]||De(n[h]),s=n[h]||De(a),a[0]!=s[0]||"r"==a[0].toLowerCase()&&(a[2]!=s[2]||a[3]!=s[3])||"s"==a[0].toLowerCase()&&(a[3]!=s[3]||a[4]!=s[4]))return;for(u[h]=[],l[h]=[],r=0,i=D(a.length,s.length);i>r;r++)r in a&&(u[h][r]=a[r]),r in s&&(l[h][r]=s[r])}return{from:u,to:l}};t._getContainer=function(e,n,r,i){var a;return a=null!=i||t.is(e,"object")?e:B.doc.getElementById(e),null!=a?a.tagName?null==n?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:n,height:r}:{container:1,x:e,y:n,width:r,height:i}:void 0},t.pathToRelative=Fe,t._engine={},t.path2curve=Ie,t.matrix=function(t,e,n,r,i,a){return new f(t,e,n,r,i,a)},function(e){function n(t){return t[0]*t[0]+t[1]*t[1]}function r(t){var e=j.sqrt(n(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}e.add=function(t,e,n,r,i,a){var s,o,u,l,h=[[],[],[]],c=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],p=[[t,n,i],[e,r,a],[0,0,1]];for(t&&t instanceof f&&(p=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;3>s;s++)for(o=0;3>o;o++){for(l=0,u=0;3>u;u++)l+=c[s][u]*p[u][o];h[s][o]=l}this.a=h[0][0],this.b=h[1][0],this.c=h[0][1],this.d=h[1][1],this.e=h[0][2],this.f=h[1][2]},e.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new f(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},e.clone=function(){return new f(this.a,this.b,this.c,this.d,this.e,this.f)},e.translate=function(t,e){this.add(1,0,0,1,t,e)},e.scale=function(t,e,n,r){null==e&&(e=t),(n||r)&&this.add(1,0,0,1,n,r),this.add(t,0,0,e,0,0),(n||r)&&this.add(1,0,0,1,-n,-r)},e.rotate=function(e,n,r){e=t.rad(e),n=n||0,r=r||0;var i=+j.cos(e).toFixed(9),a=+j.sin(e).toFixed(9);this.add(i,a,-a,i,n,r),this.add(1,0,0,1,-n,-r)},e.x=function(t,e){return t*this.a+e*this.c+this.e},e.y=function(t,e){return t*this.b+e*this.d+this.f},e.get=function(t){return+this[E.fromCharCode(97+t)].toFixed(4)},e.toString=function(){return t.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},e.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},e.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},e.split=function(){var e={};e.dx=this.e,e.dy=this.f;var i=[[this.a,this.c],[this.b,this.d]];e.scalex=j.sqrt(n(i[0])),r(i[0]),e.shear=i[0][0]*i[1][0]+i[0][1]*i[1][1],i[1]=[i[1][0]-i[0][0]*e.shear,i[1][1]-i[0][1]*e.shear],e.scaley=j.sqrt(n(i[1])),r(i[1]),e.shear/=e.scaley;var a=-i[0][1],s=i[1][1];return 0>s?(e.rotate=t.deg(j.acos(s)),0>a&&(e.rotate=360-e.rotate)):e.rotate=t.deg(j.asin(a)),e.isSimple=!(+e.shear.toFixed(9)||e.scalex.toFixed(9)!=e.scaley.toFixed(9)&&e.rotate),e.isSuperSimple=!+e.shear.toFixed(9)&&e.scalex.toFixed(9)==e.scaley.toFixed(9)&&!e.rotate,e.noRotation=!+e.shear.toFixed(9)&&!e.rotate,e
10
+},e.toTransformString=function(t){var e=t||this[M]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:A)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:A)+(e.rotate?"r"+[e.rotate,0,0]:A)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(f.prototype);var Oe=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);y.safari="Apple Computer, Inc."==navigator.vendor&&(Oe&&4>Oe[1]||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Oe&&8>Oe[1]?function(){var t=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){t.remove()})}:he;for(var Ve=function(){this.returnValue=!1},Xe=function(){return this.originalEvent.preventDefault()},Ye=function(){this.cancelBubble=!0},Ge=function(){return this.originalEvent.stopPropagation()},Ne=function(){return B.doc.addEventListener?function(t,e,n,r){var i=L&&R[e]?R[e]:e,a=function(i){var a=B.doc.documentElement.scrollTop||B.doc.body.scrollTop,s=B.doc.documentElement.scrollLeft||B.doc.body.scrollLeft,o=i.clientX+s,u=i.clientY+a;if(L&&R[k](e))for(var l=0,h=i.targetTouches&&i.targetTouches.length;h>l;l++)if(i.targetTouches[l].target==t){var c=i;i=i.targetTouches[l],i.originalEvent=c,i.preventDefault=Xe,i.stopPropagation=Ge;break}return n.call(r,i,o,u)};return t.addEventListener(i,a,!1),function(){return t.removeEventListener(i,a,!1),!0}}:B.doc.attachEvent?function(t,e,n,r){var i=function(t){t=t||B.win.event;var e=B.doc.documentElement.scrollTop||B.doc.body.scrollTop,i=B.doc.documentElement.scrollLeft||B.doc.body.scrollLeft,a=t.clientX+i,s=t.clientY+e;return t.preventDefault=t.preventDefault||Ve,t.stopPropagation=t.stopPropagation||Ye,n.call(r,t,a,s)};t.attachEvent("on"+e,i);var a=function(){return t.detachEvent("on"+e,i),!0};return a}:void 0}(),We=[],$e=function(t){for(var e,n=t.clientX,r=t.clientY,i=B.doc.documentElement.scrollTop||B.doc.body.scrollTop,a=B.doc.documentElement.scrollLeft||B.doc.body.scrollLeft,s=We.length;s--;){if(e=We[s],L){for(var o,u=t.touches.length;u--;)if(o=t.touches[u],o.identifier==e.el._drag.id){n=o.clientX,r=o.clientY,(t.originalEvent?t.originalEvent:t).preventDefault();break}}else t.preventDefault();var l,h=e.el.node,c=h.nextSibling,f=h.parentNode,p=h.style.display;B.win.opera&&f.removeChild(h),h.style.display="none",l=e.el.paper.getElementByPoint(n,r),h.style.display=p,B.win.opera&&(c?f.insertBefore(h,c):f.appendChild(h)),l&&eve("raphael.drag.over."+e.el.id,e.el,l),n+=a,r+=i,eve("raphael.drag.move."+e.el.id,e.move_scope||e.el,n-e.el._drag.x,r-e.el._drag.y,n,r,t)}},He=function(e){t.unmousemove($e).unmouseup(He);for(var n,r=We.length;r--;)n=We[r],n.el._drag={},eve("raphael.drag.end."+n.el.id,n.end_scope||n.start_scope||n.move_scope||n.el,e);We=[]},Ue=t.el={},Ze=I.length;Ze--;)(function(e){t[e]=Ue[e]=function(n,r){return t.is(n,"function")&&(this.events=this.events||[],this.events.push({name:e,f:n,unbind:Ne(this.shape||this.node||B.doc,e,n,r||this)})),this},t["un"+e]=Ue["un"+e]=function(t){for(var n=this.events||[],r=n.length;r--;)if(n[r].name==e&&n[r].f==t)return n[r].unbind(),n.splice(r,1),!n.length&&delete this.events,this;return this}})(I[Ze]);Ue.data=function(e,n){var r=ue[this.id]=ue[this.id]||{};if(1==arguments.length){if(t.is(e,"object")){for(var i in e)e[k](i)&&this.data(i,e[i]);return this}return eve("raphael.data.get."+this.id,this,r[e],e),r[e]}return r[e]=n,eve("raphael.data.set."+this.id,this,n,e),this},Ue.removeData=function(t){return null==t?ue[this.id]={}:ue[this.id]&&delete ue[this.id][t],this},Ue.getData=function(){return e(ue[this.id]||{})},Ue.hover=function(t,e,n,r){return this.mouseover(t,n).mouseout(e,r||n)},Ue.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var Qe=[];Ue.drag=function(e,n,r,i,a,s){function o(o){(o.originalEvent||o).preventDefault();var u=B.doc.documentElement.scrollTop||B.doc.body.scrollTop,l=B.doc.documentElement.scrollLeft||B.doc.body.scrollLeft;this._drag.x=o.clientX+l,this._drag.y=o.clientY+u,this._drag.id=o.identifier,!We.length&&t.mousemove($e).mouseup(He),We.push({el:this,move_scope:i,start_scope:a,end_scope:s}),n&&eve.on("raphael.drag.start."+this.id,n),e&&eve.on("raphael.drag.move."+this.id,e),r&&eve.on("raphael.drag.end."+this.id,r),eve("raphael.drag.start."+this.id,a||i||this,o.clientX+l,o.clientY+u,o)}return this._drag={},Qe.push({el:this,start:o}),this.mousedown(o),this},Ue.onDragOver=function(t){t?eve.on("raphael.drag.over."+this.id,t):eve.unbind("raphael.drag.over."+this.id)},Ue.undrag=function(){for(var e=Qe.length;e--;)Qe[e].el==this&&(this.unmousedown(Qe[e].start),Qe.splice(e,1),eve.unbind("raphael.drag.*."+this.id));!Qe.length&&t.unmousemove($e).unmouseup(He),We=[]},y.circle=function(e,n,r){var i=t._engine.circle(this,e||0,n||0,r||0);return this.__set__&&this.__set__.push(i),i},y.rect=function(e,n,r,i,a){var s=t._engine.rect(this,e||0,n||0,r||0,i||0,a||0);return this.__set__&&this.__set__.push(s),s},y.ellipse=function(e,n,r,i){var a=t._engine.ellipse(this,e||0,n||0,r||0,i||0);return this.__set__&&this.__set__.push(a),a},y.path=function(e){e&&!t.is(e,G)&&!t.is(e[0],N)&&(e+=A);var n=t._engine.path(t.format[F](t,arguments),this);return this.__set__&&this.__set__.push(n),n},y.image=function(e,n,r,i,a){var s=t._engine.image(this,e||"about:blank",n||0,r||0,i||0,a||0);return this.__set__&&this.__set__.push(s),s},y.text=function(e,n,r){var i=t._engine.text(this,e||0,n||0,E(r));return this.__set__&&this.__set__.push(i),i},y.set=function(e){!t.is(e,"array")&&(e=Array.prototype.splice.call(arguments,0,arguments.length));var n=new hn(e);return this.__set__&&this.__set__.push(n),n.paper=this,n.type="set",n},y.setStart=function(t){this.__set__=t||this.set()},y.setFinish=function(){var t=this.__set__;return delete this.__set__,t},y.setSize=function(e,n){return t._engine.setSize.call(this,e,n)},y.setViewBox=function(e,n,r,i,a){return t._engine.setViewBox.call(this,e,n,r,i,a)},y.top=y.bottom=null,y.raphael=t;var Je=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,r=n.body,i=n.documentElement,a=i.clientTop||r.clientTop||0,s=i.clientLeft||r.clientLeft||0,o=e.top+(B.win.pageYOffset||i.scrollTop||r.scrollTop)-a,u=e.left+(B.win.pageXOffset||i.scrollLeft||r.scrollLeft)-s;return{y:o,x:u}};y.getElementByPoint=function(t,e){var n=this,r=n.canvas,i=B.doc.elementFromPoint(t,e);if(B.win.opera&&"svg"==i.tagName){var a=Je(r),s=r.createSVGRect();s.x=t-a.x,s.y=e-a.y,s.width=s.height=1;var o=r.getIntersectionList(s,null);o.length&&(i=o[o.length-1])}if(!i)return null;for(;i.parentNode&&i!=r.parentNode&&!i.raphael;)i=i.parentNode;return i==n.canvas.parentNode&&(i=r),i=i&&i.raphael?n.getById(i.raphaelid):null},y.getElementsByBBox=function(e){var n=this.set();return this.forEach(function(r){t.isBBoxIntersect(r.getBBox(),e)&&n.push(r)}),n},y.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},y.forEach=function(t,e){for(var n=this.bottom;n;){if(t.call(e,n)===!1)return this;n=n.next}return this},y.getElementsByPoint=function(t,e){var n=this.set();return this.forEach(function(r){r.isPointInside(t,e)&&n.push(r)}),n},Ue.isPointInside=function(e,n){var r=this.realPath=this.realPath||de[this.type](this);return t.isPointInsidePath(r,e,n)},Ue.getBBox=function(t){if(this.removed)return{};var e=this._;return t?((e.dirty||!e.bboxwt)&&(this.realPath=de[this.type](this),e.bboxwt=Se(this.realPath),e.bboxwt.toString=p,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&((e.dirty||!this.realPath)&&(e.bboxwt=0,this.realPath=de[this.type](this)),e.bbox=Se(ge(this.realPath,this.matrix)),e.bbox.toString=p,e.dirty=e.dirtyT=0),e.bbox)},Ue.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Ue.glow=function(t){if("text"==this.type)return null;t=t||{};var e={width:(t.width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:t.opacity||.5,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},n=e.width/2,r=this.paper,i=r.set(),a=this.realPath||de[this.type](this);a=this.matrix?ge(a,this.matrix):a;for(var s=1;n+1>s;s++)i.push(r.path(a).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/n*s).toFixed(3),opacity:+(e.opacity/n).toFixed(3)}));return i.insertBefore(this).translate(e.offsetx,e.offsety)};var Ke=function(e,n,r,i,a,s,l,h,c){return null==c?o(e,n,r,i,a,s,l,h):t.findDotsAtSegment(e,n,r,i,a,s,l,h,u(e,n,r,i,a,s,l,h,c))},tn=function(e,n){return function(r,i,a){r=Ie(r);for(var s,o,u,l,h,c="",f={},p=0,d=0,g=r.length;g>d;d++){if(u=r[d],"M"==u[0])s=+u[1],o=+u[2];else{if(l=Ke(s,o,u[1],u[2],u[3],u[4],u[5],u[6]),p+l>i){if(n&&!f.start){if(h=Ke(s,o,u[1],u[2],u[3],u[4],u[5],u[6],i-p),c+=["C"+h.start.x,h.start.y,h.m.x,h.m.y,h.x,h.y],a)return c;f.start=c,c=["M"+h.x,h.y+"C"+h.n.x,h.n.y,h.end.x,h.end.y,u[5],u[6]].join(),p+=l,s=+u[5],o=+u[6];continue}if(!e&&!n)return h=Ke(s,o,u[1],u[2],u[3],u[4],u[5],u[6],i-p),{x:h.x,y:h.y,alpha:h.alpha}}p+=l,s=+u[5],o=+u[6]}c+=u.shift()+u}return f.end=c,h=e?p:n?f:t.findDotsAtSegment(s,o,u[0],u[1],u[2],u[3],u[4],u[5],1),h.alpha&&(h={x:h.x,y:h.y,alpha:h.alpha}),h}},en=tn(1),nn=tn(),rn=tn(0,1);t.getTotalLength=en,t.getPointAtLength=nn,t.getSubpath=function(t,e,n){if(1e-6>this.getTotalLength(t)-n)return rn(t,e).end;var r=rn(t,n,1);return e?rn(r,e).end:r},Ue.getTotalLength=function(){return"path"==this.type?this.node.getTotalLength?this.node.getTotalLength():en(this.attrs.path):void 0},Ue.getPointAtLength=function(t){return"path"==this.type?nn(this.attrs.path,t):void 0},Ue.getSubpath=function(e,n){return"path"==this.type?t.getSubpath(this.attrs.path,e,n):void 0};var an=t.easing_formulas={linear:function(t){return t},"<":function(t){return V(t,1.7)},">":function(t){return V(t,.48)},"<>":function(t){var e=.48-t/1.04,n=j.sqrt(.1734+e*e),r=n-e,i=V(O(r),1/3)*(0>r?-1:1),a=-n-e,s=V(O(a),1/3)*(0>a?-1:1),o=i+s+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:V(2,-10*t)*j.sin((t-.075)*2*X/.3)+1},bounce:function(t){var e,n=7.5625,r=2.75;return 1/r>t?e=n*t*t:2/r>t?(t-=1.5/r,e=n*t*t+.75):2.5/r>t?(t-=2.25/r,e=n*t*t+.9375):(t-=2.625/r,e=n*t*t+.984375),e}};an.easeIn=an["ease-in"]=an["<"],an.easeOut=an["ease-out"]=an[">"],an.easeInOut=an["ease-in-out"]=an["<>"],an["back-in"]=an.backIn,an["back-out"]=an.backOut;var sn=[],on=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},un=function(){for(var e=+new Date,n=0;sn.length>n;n++){var r=sn[n];if(!r.el.removed&&!r.paused){var i,a,s=e-r.start,o=r.ms,u=r.easing,l=r.from,h=r.diff,c=r.to,f=(r.t,r.el),p={},d={};if(r.initstatus?(s=(r.initstatus*r.anim.top-r.prev)/(r.percent-r.prev)*o,r.status=r.initstatus,delete r.initstatus,r.stop&&sn.splice(n--,1)):r.status=(r.prev+(r.percent-r.prev)*(s/o))/r.anim.top,!(0>s))if(o>s){var g=u(s/o);for(var v in l)if(l[k](v)){switch(ee[v]){case Y:i=+l[v]+g*o*h[v];break;case"colour":i="rgb("+[ln(Z(l[v].r+g*o*h[v].r)),ln(Z(l[v].g+g*o*h[v].g)),ln(Z(l[v].b+g*o*h[v].b))].join(",")+")";break;case"path":i=[];for(var m=0,y=l[v].length;y>m;m++){i[m]=[l[v][m][0]];for(var b=1,_=l[v][m].length;_>b;b++)i[m][b]=+l[v][m][b]+g*o*h[v][m][b];i[m]=i[m].join(P)}i=i.join(P);break;case"transform":if(h[v].real)for(i=[],m=0,y=l[v].length;y>m;m++)for(i[m]=[l[v][m][0]],b=1,_=l[v][m].length;_>b;b++)i[m][b]=l[v][m][b]+g*o*h[v][m][b];else{var w=function(t){return+l[v][t]+g*o*h[v][t]};i=[["m",w(0),w(1),w(2),w(3),w(4),w(5)]]}break;case"csv":if("clip-rect"==v)for(i=[],m=4;m--;)i[m]=+l[v][m]+g*o*h[v][m];break;default:var B=[][T](l[v]);for(i=[],m=f.paper.customAttributes[v].length;m--;)i[m]=+B[m]+g*o*h[v][m]}p[v]=i}f.attr(p),function(t,e,n){setTimeout(function(){eve("raphael.anim.frame."+t,e,n)})}(f.id,f,r.anim)}else{if(function(e,n,r){setTimeout(function(){eve("raphael.anim.frame."+n.id,n,r),eve("raphael.anim.finish."+n.id,n,r),t.is(e,"function")&&e.call(n)})}(r.callback,f,r.anim),f.attr(c),sn.splice(n--,1),r.repeat>1&&!r.next){for(a in c)c[k](a)&&(d[a]=r.totalOrigin[a]);r.el.attr(d),x(r.anim,r.el,r.anim.percents[0],null,r.totalOrigin,r.repeat-1)}r.next&&!r.stop&&x(r.anim,r.el,r.next,null,r.totalOrigin,r.repeat)}}}t.svg&&f&&f.paper&&f.paper.safari(),sn.length&&on(un)},ln=function(t){return t>255?255:0>t?0:t};Ue.animateWith=function(e,n,r,i,a,s){var o=this;if(o.removed)return s&&s.call(o),o;var u=r instanceof g?r:t.animation(r,i,a,s);x(u,o,u.percents[0],null,o.attr());for(var l=0,h=sn.length;h>l;l++)if(sn[l].anim==n&&sn[l].el==e){sn[h-1].start=sn[l].start;break}return o},Ue.onAnimation=function(t){return t?eve.on("raphael.anim.frame."+this.id,t):eve.unbind("raphael.anim.frame."+this.id),this},g.prototype.delay=function(t){var e=new g(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},g.prototype.repeat=function(t){var e=new g(this.anim,this.ms);return e.del=this.del,e.times=j.floor(D(t,0))||1,e},t.animation=function(e,n,r,i){if(e instanceof g)return e;(t.is(r,"function")||!r)&&(i=i||r||null,r=null),e=Object(e),n=+n||0;var a,s,o={};for(s in e)e[k](s)&&Q(s)!=s&&Q(s)+"%"!=s&&(a=!0,o[s]=e[s]);return a?(r&&(o.easing=r),i&&(o.callback=i),new g({100:o},n)):new g(e,n)},Ue.animate=function(e,n,r,i){var a=this;if(a.removed)return i&&i.call(a),a;var s=e instanceof g?e:t.animation(e,n,r,i);return x(s,a,s.percents[0],null,a.attr()),a},Ue.setTime=function(t,e){return t&&null!=e&&this.status(t,z(e,t.ms)/t.ms),this},Ue.status=function(t,e){var n,r,i=[],a=0;if(null!=e)return x(t,this,-1,z(e,1)),this;for(n=sn.length;n>a;a++)if(r=sn[a],r.el.id==this.id&&(!t||r.anim==t)){if(t)return r.status;i.push({anim:r.anim,status:r.status})}return t?0:i},Ue.pause=function(t){for(var e=0;sn.length>e;e++)sn[e].el.id!=this.id||t&&sn[e].anim!=t||eve("raphael.anim.pause."+this.id,this,sn[e].anim)!==!1&&(sn[e].paused=!0);return this},Ue.resume=function(t){for(var e=0;sn.length>e;e++)if(sn[e].el.id==this.id&&(!t||sn[e].anim==t)){var n=sn[e];eve("raphael.anim.resume."+this.id,this,n.anim)!==!1&&(delete n.paused,this.status(n.anim,n.status))}return this},Ue.stop=function(t){for(var e=0;sn.length>e;e++)sn[e].el.id!=this.id||t&&sn[e].anim!=t||eve("raphael.anim.stop."+this.id,this,sn[e].anim)!==!1&&sn.splice(e--,1);return this},eve.on("raphael.remove",v),eve.on("raphael.clear",v),Ue.toString=function(){return"Raphaël’s object"};var hn=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,n=t.length;n>e;e++)!t[e]||t[e].constructor!=Ue.constructor&&t[e].constructor!=hn||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},cn=hn.prototype;cn.push=function(){for(var t,e,n=0,r=arguments.length;r>n;n++)t=arguments[n],!t||t.constructor!=Ue.constructor&&t.constructor!=hn||(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},cn.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},cn.forEach=function(t,e){for(var n=0,r=this.items.length;r>n;n++)if(t.call(e,this.items[n],n)===!1)return this;return this};for(var fn in Ue)Ue[k](fn)&&(cn[fn]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t][F](n,e)})}}(fn));cn.attr=function(e,n){if(e&&t.is(e,N)&&t.is(e[0],"object"))for(var r=0,i=e.length;i>r;r++)this.items[r].attr(e[r]);else for(var a=0,s=this.items.length;s>a;a++)this.items[a].attr(e,n);return this},cn.clear=function(){for(;this.length;)this.pop()},cn.splice=function(t,e){t=0>t?D(this.length+t,0):t,e=D(0,z(this.length-t,e));var n,r=[],i=[],a=[];for(n=2;arguments.length>n;n++)a.push(arguments[n]);for(n=0;e>n;n++)i.push(this[t+n]);for(;this.length-t>n;n++)r.push(this[t+n]);var s=a.length;for(n=0;s+r.length>n;n++)this.items[t+n]=this[t+n]=s>n?a[n]:r[n-s];for(n=this.items.length=this.length-=e-s;this[n];)delete this[n++];return new hn(i)},cn.exclude=function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]==t)return this.splice(e,1),!0},cn.animate=function(e,n,r,i){(t.is(r,"function")||!r)&&(i=r||null);var a,s,o=this.items.length,u=o,l=this;if(!o)return this;i&&(s=function(){!--o&&i.call(l)}),r=t.is(r,G)?r:s;var h=t.animation(e,n,r,s);for(a=this.items[--u].animate(h);u--;)this.items[u]&&!this.items[u].removed&&this.items[u].animateWith(a,h,h);return this},cn.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},cn.getBBox=function(){for(var t=[],e=[],n=[],r=[],i=this.items.length;i--;)if(!this.items[i].removed){var a=this.items[i].getBBox();t.push(a.x),e.push(a.y),n.push(a.x+a.width),r.push(a.y+a.height)}return t=z[F](0,t),e=z[F](0,e),n=D[F](0,n),r=D[F](0,r),{x:t,y:e,x2:n,y2:r,width:n-t,height:r-e}},cn.clone=function(t){t=this.paper.set();for(var e=0,n=this.items.length;n>e;e++)t.push(this.items[e].clone());return t},cn.toString=function(){return"Raphaël‘s set"},cn.glow=function(t){var e=this.paper.set();return this.forEach(function(n){var r=n.glow(t);null!=r&&r.forEach(function(t){e.push(t)})}),e},t.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},n=t.face["font-family"];for(var r in t.face)t.face[k](r)&&(e.face[r]=t.face[r]);if(this.fonts[n]?this.fonts[n].push(e):this.fonts[n]=[e],!t.svg){e.face["units-per-em"]=J(t.face["units-per-em"],10);for(var i in t.glyphs)if(t.glyphs[k](i)){var a=t.glyphs[i];if(e.glyphs[i]={w:a.w,k:{},d:a.d&&"M"+a.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},a.k)for(var s in a.k)a[k](s)&&(e.glyphs[i].k[s]=a.k[s])}}return t},y.getFont=function(e,n,r,i){if(i=i||"normal",r=r||"normal",n=+n||{normal:400,bold:700,lighter:300,bolder:800}[n]||400,t.fonts){var a=t.fonts[e];if(!a){var s=RegExp("(^|\\s)"+e.replace(/[^\w\d\s+!~.:_-]/g,A)+"(\\s|$)","i");for(var o in t.fonts)if(t.fonts[k](o)&&s.test(o)){a=t.fonts[o];break}}var u;if(a)for(var l=0,h=a.length;h>l&&(u=a[l],u.face["font-weight"]!=n||u.face["font-style"]!=r&&u.face["font-style"]||u.face["font-stretch"]!=i);l++);return u}},y.print=function(e,n,r,i,a,s,o){s=s||"middle",o=D(z(o||0,1),-1);var u,l=E(r)[M](A),h=0,c=0,f=A;if(t.is(i,"string")&&(i=this.getFont(i)),i){u=(a||16)/i.face["units-per-em"];for(var p=i.face.bbox[M](b),d=+p[0],g=p[3]-p[1],x=0,v=+p[1]+("baseline"==s?g+ +i.face.descent:g/2),m=0,y=l.length;y>m;m++){if("\n"==l[m])h=0,w=0,c=0,x+=g;else{var _=c&&i.glyphs[l[m-1]]||{},w=i.glyphs[l[m]];h+=c?(_.w||i.w)+(_.k&&_.k[l[m]]||0)+i.w*o:0,c=1}w&&w.d&&(f+=t.transformPath(w.d,["t",h*u,x*u,"s",u,u,d,v,"t",(e-d)/u,(n-v)/u]))}}return this.path(f).attr({fill:"#000",stroke:"none"})},y.add=function(e){if(t.is(e,"array"))for(var n,r=this.set(),i=0,a=e.length;a>i;i++)n=e[i]||{},_[k](n.type)&&r.push(this[n.type]().attr(n));return r},t.format=function(e,n){var r=t.is(n,N)?[0][T](n):arguments;return e&&t.is(e,G)&&r.length-1&&(e=e.replace(w,function(t,e){return null==r[++e]?A:r[e]})),e||A},t.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,n=function(t,n,r){var i=r;return n.replace(e,function(t,e,n,r,a){e=e||r,i&&(e in i&&(i=i[e]),"function"==typeof i&&a&&(i=i()))}),i=(null==i||i==r?t:i)+""};return function(e,r){return(e+"").replace(t,function(t,e){return n(t,e,r)})}}(),t.ninja=function(){return S.was?B.win.Raphael=S.is:delete Raphael,t},t.st=cn,function(e,n,r){function i(){/in/.test(e.readyState)?setTimeout(i,9):t.eve("raphael.DOMload")}null==e.readyState&&e.addEventListener&&(e.addEventListener(n,r=function(){e.removeEventListener(n,r,!1),e.readyState="complete"},!1),e.readyState="loading"),i()}(document,"DOMContentLoaded"),S.was?B.win.Raphael=t:Raphael=t,eve.on("raphael.DOMload",function(){m=!0})})();window.Raphael&&window.Raphael.svg&&function(t){var e="hasOwnProperty",r=String,n=parseFloat,i=parseInt,a=Math,s=a.max,o=a.abs,u=a.pow,h=/[, ]+/,l=t.eve,c="",f=" ",p="http://www.w3.org/1999/xlink",d={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},g={};t.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var v=function(n,i){if(i){"string"==typeof n&&(n=v(n));for(var a in i)i[e](a)&&("xlink:"==a.substring(0,6)?n.setAttributeNS(p,a.substring(6),r(i[a])):n.setAttribute(a,r(i[a])))}else n=t._g.doc.createElementNS("http://www.w3.org/2000/svg",n),n.style&&(n.style.webkitTapHighlightColor="rgba(0,0,0,0)");return n},x=function(e,i){var h="linear",l=e.id+i,f=.5,p=.5,d=e.node,g=e.paper,x=d.style,y=t._g.doc.getElementById(l);if(!y){if(i=r(i).replace(t._radial_gradient,function(t,e,r){if(h="radial",e&&r){f=n(e),p=n(r);var i=2*(p>.5)-1;u(f-.5,2)+u(p-.5,2)>.25&&(p=a.sqrt(.25-u(f-.5,2))*i+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*i)}return c}),i=i.split(/\s*\-\s*/),"linear"==h){var m=i.shift();if(m=-n(m),isNaN(m))return null;var b=[0,0,a.cos(t.rad(m)),a.sin(t.rad(m))],_=1/(s(o(b[2]),o(b[3]))||1);b[2]*=_,b[3]*=_,0>b[2]&&(b[0]=-b[2],b[2]=0),0>b[3]&&(b[1]=-b[3],b[3]=0)}var w=t._parseDots(i);if(!w)return null;if(l=l.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&l!=e.gradient.id&&(g.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){y=v(h+"Gradient",{id:l}),e.gradient=y,v(y,"radial"==h?{fx:f,fy:p}:{x1:b[0],y1:b[1],x2:b[2],y2:b[3],gradientTransform:e.matrix.invert()}),g.defs.appendChild(y);for(var k=0,C=w.length;C>k;k++)y.appendChild(v("stop",{offset:w[k].offset?w[k].offset:k?"100%":"0%","stop-color":w[k].color||"#fff"}))}}return v(d,{fill:"url(#"+l+")",opacity:1,"fill-opacity":1}),x.fill=c,x.opacity=1,x.fillOpacity=1,1},y=function(t){var e=t.getBBox(1);v(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},m=function(n,i,a){if("path"==n.type){for(var s,o,u,h,l,f=r(i).toLowerCase().split("-"),p=n.paper,x=a?"end":"start",y=n.node,m=n.attrs,b=m["stroke-width"],_=f.length,w="classic",k=3,C=3,B=5;_--;)switch(f[_]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=f[_];break;case"wide":C=5;break;case"narrow":C=2;break;case"long":k=5;break;case"short":k=2}if("open"==w?(k+=2,C+=2,B+=2,u=1,h=a?4:1,l={fill:"none",stroke:m.stroke}):(h=u=k/2,l={fill:m.stroke,stroke:"none"}),n._.arrows?a?(n._.arrows.endPath&&g[n._.arrows.endPath]--,n._.arrows.endMarker&&g[n._.arrows.endMarker]--):(n._.arrows.startPath&&g[n._.arrows.startPath]--,n._.arrows.startMarker&&g[n._.arrows.startMarker]--):n._.arrows={},"none"!=w){var S="raphael-marker-"+w,A="raphael-marker-"+x+w+k+C;t._g.doc.getElementById(S)?g[S]++:(p.defs.appendChild(v(v("path"),{"stroke-linecap":"round",d:d[w],id:S})),g[S]=1);var T,M=t._g.doc.getElementById(A);M?(g[A]++,T=M.getElementsByTagName("use")[0]):(M=v(v("marker"),{id:A,markerHeight:C,markerWidth:k,orient:"auto",refX:h,refY:C/2}),T=v(v("use"),{"xlink:href":"#"+S,transform:(a?"rotate(180 "+k/2+" "+C/2+") ":c)+"scale("+k/B+","+C/B+")","stroke-width":(1/((k/B+C/B)/2)).toFixed(4)}),M.appendChild(T),p.defs.appendChild(M),g[A]=1),v(T,l);var F=u*("diamond"!=w&&"oval"!=w);a?(s=n._.arrows.startdx*b||0,o=t.getTotalLength(m.path)-F*b):(s=F*b,o=t.getTotalLength(m.path)-(n._.arrows.enddx*b||0)),l={},l["marker-"+x]="url(#"+A+")",(o||s)&&(l.d=Raphael.getSubpath(m.path,s,o)),v(y,l),n._.arrows[x+"Path"]=S,n._.arrows[x+"Marker"]=A,n._.arrows[x+"dx"]=F,n._.arrows[x+"Type"]=w,n._.arrows[x+"String"]=i}else a?(s=n._.arrows.startdx*b||0,o=t.getTotalLength(m.path)-s):(s=0,o=t.getTotalLength(m.path)-(n._.arrows.enddx*b||0)),n._.arrows[x+"Path"]&&v(y,{d:Raphael.getSubpath(m.path,s,o)}),delete n._.arrows[x+"Path"],delete n._.arrows[x+"Marker"],delete n._.arrows[x+"dx"],delete n._.arrows[x+"Type"],delete n._.arrows[x+"String"];for(l in g)if(g[e](l)&&!g[l]){var L=t._g.doc.getElementById(l);L&&L.parentNode.removeChild(L)}}},b={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},_=function(t,e,n){if(e=b[r(e).toLowerCase()]){for(var i=t.attrs["stroke-width"]||"1",a={round:i,square:i,butt:0}[t.attrs["stroke-linecap"]||n["stroke-linecap"]]||0,s=[],o=e.length;o--;)s[o]=e[o]*i+(o%2?1:-1)*a;v(t.node,{"stroke-dasharray":s.join(",")})}},w=function(n,a){var u=n.node,l=n.attrs,f=u.style.visibility;u.style.visibility="hidden";for(var d in a)if(a[e](d)){if(!t._availableAttrs[e](d))continue;var g=a[d];switch(l[d]=g,d){case"blur":n.blur(g);break;case"href":case"title":case"target":var b=u.parentNode;if("a"!=b.tagName.toLowerCase()){var w=v("a");b.insertBefore(w,u),w.appendChild(u),b=w}"target"==d?b.setAttributeNS(p,"show","blank"==g?"new":g):b.setAttributeNS(p,d,g);break;case"cursor":u.style.cursor=g;break;case"transform":n.transform(g);break;case"arrow-start":m(n,g);break;case"arrow-end":m(n,g,1);break;case"clip-rect":var k=r(g).split(h);if(4==k.length){n.clip&&n.clip.parentNode.parentNode.removeChild(n.clip.parentNode);var B=v("clipPath"),S=v("rect");B.id=t.createUUID(),v(S,{x:k[0],y:k[1],width:k[2],height:k[3]}),B.appendChild(S),n.paper.defs.appendChild(B),v(u,{"clip-path":"url(#"+B.id+")"}),n.clip=S}if(!g){var A=u.getAttribute("clip-path");if(A){var T=t._g.doc.getElementById(A.replace(/(^url\(#|\)$)/g,c));T&&T.parentNode.removeChild(T),v(u,{"clip-path":c}),delete n.clip}}break;case"path":"path"==n.type&&(v(u,{d:g?l.path=t._pathToAbsolute(g):"M0,0"}),n._.dirty=1,n._.arrows&&("startString"in n._.arrows&&m(n,n._.arrows.startString),"endString"in n._.arrows&&m(n,n._.arrows.endString,1)));break;case"width":if(u.setAttribute(d,g),n._.dirty=1,!l.fx)break;d="x",g=l.x;case"x":l.fx&&(g=-l.x-(l.width||0));case"rx":if("rx"==d&&"rect"==n.type)break;case"cx":u.setAttribute(d,g),n.pattern&&y(n),n._.dirty=1;break;case"height":if(u.setAttribute(d,g),n._.dirty=1,!l.fy)break;d="y",g=l.y;case"y":l.fy&&(g=-l.y-(l.height||0));case"ry":if("ry"==d&&"rect"==n.type)break;case"cy":u.setAttribute(d,g),n.pattern&&y(n),n._.dirty=1;break;case"r":"rect"==n.type?v(u,{rx:g,ry:g}):u.setAttribute(d,g),n._.dirty=1;break;case"src":"image"==n.type&&u.setAttributeNS(p,"href",g);break;case"stroke-width":(1!=n._.sx||1!=n._.sy)&&(g/=s(o(n._.sx),o(n._.sy))||1),n.paper._vbSize&&(g*=n.paper._vbSize),u.setAttribute(d,g),l["stroke-dasharray"]&&_(n,l["stroke-dasharray"],a),n._.arrows&&("startString"in n._.arrows&&m(n,n._.arrows.startString),"endString"in n._.arrows&&m(n,n._.arrows.endString,1));break;case"stroke-dasharray":_(n,g,a);break;case"fill":var M=r(g).match(t._ISURL);if(M){B=v("pattern");var F=v("image");B.id=t.createUUID(),v(B,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),v(F,{x:0,y:0,"xlink:href":M[1]}),B.appendChild(F),function(e){t._preload(M[1],function(){var t=this.offsetWidth,r=this.offsetHeight;v(e,{width:t,height:r}),v(F,{width:t,height:r}),n.paper.safari()})}(B),n.paper.defs.appendChild(B),v(u,{fill:"url(#"+B.id+")"}),n.pattern=B,n.pattern&&y(n);break}var L=t.getRGB(g);if(L.error){if(("circle"==n.type||"ellipse"==n.type||"r"!=r(g).charAt())&&x(n,g)){if("opacity"in l||"fill-opacity"in l){var N=t._g.doc.getElementById(u.getAttribute("fill").replace(/^url\(#|\)$/g,c));if(N){var P=N.getElementsByTagName("stop");v(P[P.length-1],{"stop-opacity":("opacity"in l?l.opacity:1)*("fill-opacity"in l?l["fill-opacity"]:1)})}}l.gradient=g,l.fill="none";break}}else delete a.gradient,delete l.gradient,!t.is(l.opacity,"undefined")&&t.is(a.opacity,"undefined")&&v(u,{opacity:l.opacity}),!t.is(l["fill-opacity"],"undefined")&&t.is(a["fill-opacity"],"undefined")&&v(u,{"fill-opacity":l["fill-opacity"]});L[e]("opacity")&&v(u,{"fill-opacity":L.opacity>1?L.opacity/100:L.opacity});case"stroke":L=t.getRGB(g),u.setAttribute(d,L.hex),"stroke"==d&&L[e]("opacity")&&v(u,{"stroke-opacity":L.opacity>1?L.opacity/100:L.opacity}),"stroke"==d&&n._.arrows&&("startString"in n._.arrows&&m(n,n._.arrows.startString),"endString"in n._.arrows&&m(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=r(g).charAt())&&x(n,g);break;case"opacity":l.gradient&&!l[e]("stroke-opacity")&&v(u,{"stroke-opacity":g>1?g/100:g});case"fill-opacity":if(l.gradient){N=t._g.doc.getElementById(u.getAttribute("fill").replace(/^url\(#|\)$/g,c)),N&&(P=N.getElementsByTagName("stop"),v(P[P.length-1],{"stop-opacity":g}));break}default:"font-size"==d&&(g=i(g,10)+"px");var E=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});u.style[E]=g,n._.dirty=1,u.setAttribute(d,g)}}C(n,a),u.style.visibility=f},k=1.2,C=function(n,a){if("text"==n.type&&(a[e]("text")||a[e]("font")||a[e]("font-size")||a[e]("x")||a[e]("y"))){var s=n.attrs,o=n.node,u=o.firstChild?i(t._g.doc.defaultView.getComputedStyle(o.firstChild,c).getPropertyValue("font-size"),10):10;if(a[e]("text")){for(s.text=a.text;o.firstChild;)o.removeChild(o.firstChild);for(var h,l=r(a.text).split("\n"),f=[],p=0,d=l.length;d>p;p++)h=v("tspan"),p&&v(h,{dy:u*k,x:s.x}),h.appendChild(t._g.doc.createTextNode(l[p])),o.appendChild(h),f[p]=h}else for(f=o.getElementsByTagName("tspan"),p=0,d=f.length;d>p;p++)p?v(f[p],{dy:u*k,x:s.x}):v(f[0],{dy:0});v(o,{x:s.x,y:s.y}),n._.dirty=1;var g=n._getBBox(),x=s.y-(g.y+g.height/2);x&&t.is(x,"finite")&&v(f[0],{dy:x})}},B=function(e,r){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.matrix=t.matrix(),this.realPath=null,this.paper=r,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!r.bottom&&(r.bottom=this),this.prev=r.top,r.top&&(r.top.next=this),r.top=this,this.next=null},S=t.el;B.prototype=S,S.constructor=B,t._engine.path=function(t,e){var r=v("path");e.canvas&&e.canvas.appendChild(r);var n=new B(r,e);return n.type="path",w(n,{fill:"none",stroke:"#000",path:t}),n},S.rotate=function(t,e,i){if(this.removed)return this;if(t=r(t).split(h),t.length-1&&(e=n(t[1]),i=n(t[2])),t=n(t[0]),null==i&&(e=i),null==e||null==i){var a=this.getBBox(1);e=a.x+a.width/2,i=a.y+a.height/2}return this.transform(this._.transform.concat([["r",t,e,i]])),this},S.scale=function(t,e,i,a){if(this.removed)return this;if(t=r(t).split(h),t.length-1&&(e=n(t[1]),i=n(t[2]),a=n(t[3])),t=n(t[0]),null==e&&(e=t),null==a&&(i=a),null==i||null==a)var s=this.getBBox(1);return i=null==i?s.x+s.width/2:i,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,i,a]])),this},S.translate=function(t,e){return this.removed?this:(t=r(t).split(h),t.length-1&&(e=n(t[1])),t=n(t[0])||0,e=+e||0,this.transform(this._.transform.concat([["t",t,e]])),this)},S.transform=function(r){var n=this._;if(null==r)return n.transform;if(t._extractTransform(this,r),this.clip&&v(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&v(this.node,{transform:this.matrix}),1!=n.sx||1!=n.sy){var i=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":i})}return this},S.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},S.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},S.remove=function(){if(!this.removed&&this.node.parentNode){var e=this.paper;e.__set__&&e.__set__.exclude(this),l.unbind("raphael.*.*."+this.id),this.gradient&&e.defs.removeChild(this.gradient),t._tear(this,e),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var r in this)this[r]="function"==typeof this[r]?t._removedFactory(r):null;this.removed=!0}},S._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e={};try{e=this.node.getBBox()}catch(r){}finally{e=e||{}}return t&&this.hide(),e},S.attr=function(r,n){if(this.removed)return this;if(null==r){var i={};for(var a in this.attrs)this.attrs[e](a)&&(i[a]=this.attrs[a]);return i.gradient&&"none"==i.fill&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(null==n&&t.is(r,"string")){if("fill"==r&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==r)return this._.transform;for(var s=r.split(h),o={},u=0,c=s.length;c>u;u++)r=s[u],o[r]=r in this.attrs?this.attrs[r]:t.is(this.paper.customAttributes[r],"function")?this.paper.customAttributes[r].def:t._availableAttrs[r];return c-1?o:o[s[0]]}if(null==n&&t.is(r,"array")){for(o={},u=0,c=r.length;c>u;u++)o[r[u]]=this.attr(r[u]);return o}if(null!=n){var f={};f[r]=n}else null!=r&&t.is(r,"object")&&(f=r);for(var p in f)l("raphael.attr."+p+"."+this.id,this,f[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&f[e](p)&&t.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(f[p]));this.attrs[p]=f[p];for(var g in d)d[e](g)&&(f[g]=d[g])}return w(this,f),this},S.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var e=this.paper;return e.top!=this&&t._tofront(this,e),this},S.toBack=function(){if(this.removed)return this;var e=this.node.parentNode;return"a"==e.tagName.toLowerCase()?e.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):e.firstChild!=this.node&&e.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper),this.paper,this},S.insertAfter=function(e){if(this.removed)return this;var r=e.node||e[e.length-1].node;return r.nextSibling?r.parentNode.insertBefore(this.node,r.nextSibling):r.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this},S.insertBefore=function(e){if(this.removed)return this;var r=e.node||e[0].node;return r.parentNode.insertBefore(this.node,r),t._insertbefore(this,e,this.paper),this},S.blur=function(e){var r=this;if(0!==+e){var n=v("filter"),i=v("feGaussianBlur");r.attrs.blur=e,n.id=t.createUUID(),v(i,{stdDeviation:+e||1.5}),n.appendChild(i),r.paper.defs.appendChild(n),r._blur=n,v(r.node,{filter:"url(#"+n.id+")"})}else r._blur&&(r._blur.parentNode.removeChild(r._blur),delete r._blur,delete r.attrs.blur),r.node.removeAttribute("filter")},t._engine.circle=function(t,e,r,n){var i=v("circle");t.canvas&&t.canvas.appendChild(i);var a=new B(i,t);return a.attrs={cx:e,cy:r,r:n,fill:"none",stroke:"#000"},a.type="circle",v(i,a.attrs),a},t._engine.rect=function(t,e,r,n,i,a){var s=v("rect");t.canvas&&t.canvas.appendChild(s);var o=new B(s,t);return o.attrs={x:e,y:r,width:n,height:i,r:a||0,rx:a||0,ry:a||0,fill:"none",stroke:"#000"},o.type="rect",v(s,o.attrs),o},t._engine.ellipse=function(t,e,r,n,i){var a=v("ellipse");t.canvas&&t.canvas.appendChild(a);var s=new B(a,t);return s.attrs={cx:e,cy:r,rx:n,ry:i,fill:"none",stroke:"#000"},s.type="ellipse",v(a,s.attrs),s},t._engine.image=function(t,e,r,n,i,a){var s=v("image");v(s,{x:r,y:n,width:i,height:a,preserveAspectRatio:"none"}),s.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(s);var o=new B(s,t);return o.attrs={x:r,y:n,width:i,height:a,src:e},o.type="image",o},t._engine.text=function(e,r,n,i){var a=v("text");e.canvas&&e.canvas.appendChild(a);var s=new B(a,e);return s.attrs={x:r,y:n,"text-anchor":"middle",text:i,font:t._availableAttrs.font,stroke:"none",fill:"#000"},s.type="text",w(s,s.attrs),s},t._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e&&e.container,n=e.x,i=e.y,a=e.width,s=e.height;if(!r)throw Error("SVG container not found.");var o,u=v("svg"),h="overflow:hidden;";return n=n||0,i=i||0,a=a||512,s=s||342,v(u,{height:s,version:1.1,width:a,xmlns:"http://www.w3.org/2000/svg"}),1==r?(u.style.cssText=h+"position:absolute;left:"+n+"px;top:"+i+"px",t._g.doc.body.appendChild(u),o=1):(u.style.cssText=h+"position:relative",r.firstChild?r.insertBefore(u,r.firstChild):r.appendChild(u)),r=new t._Paper,r.width=a,r.height=s,r.canvas=u,r.clear(),r._left=r._top=0,o&&(r.renderfix=function(){}),r.renderfix(),r},t._engine.setViewBox=function(t,e,r,n,i){l("raphael.setViewBox",this,this._viewBox,[t,e,r,n,i]);var a,o,u=s(r/this.width,n/this.height),h=this.top,c=i?"meet":"xMinYMin";for(null==t?(this._vbSize&&(u=1),delete this._vbSize,a="0 0 "+this.width+f+this.height):(this._vbSize=u,a=t+f+e+f+r+f+n),v(this.canvas,{viewBox:a,preserveAspectRatio:c});u&&h;)o="stroke-width"in h.attrs?h.attrs["stroke-width"]:1,h.attr({"stroke-width":o}),h._.dirty=1,h._.dirtyT=1,h=h.prev;return this._viewBox=[t,e,r,n,!!i],this},t.prototype.renderfix=function(){var t,e=this.canvas,r=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(n){t=e.createSVGMatrix()}var i=-t.e%1,a=-t.f%1;(i||a)&&(i&&(this._left=(this._left+i)%1,r.left=this._left+"px"),a&&(this._top=(this._top+a)%1,r.top=this._top+"px"))},t.prototype.clear=function(){t.eve("raphael.clear",this);for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=v("desc")).appendChild(t._g.doc.createTextNode("Created with Raphaël "+t.version)),e.appendChild(this.desc),e.appendChild(this.defs=v("defs"))},t.prototype.remove=function(){l("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null};var A=t.st;for(var T in S)S[e](T)&&!A[e](T)&&(A[T]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(T))}(window.Raphael);window.Raphael&&window.Raphael.vml&&function(t){var e="hasOwnProperty",r=String,i=parseFloat,n=Math,a=n.round,s=n.max,o=n.min,l=n.abs,h="fill",u=/[, ]+/,c=t.eve,f=" progid:DXImageTransform.Microsoft",p=" ",d="",g={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},v=/([clmz]),?([^clmz]*)/gi,x=/ progid:\S+Blur\([^\)]+\)/g,y=/-?[^,\s-]+/g,m="position:absolute;left:0;top:0;width:1px;height:1px",b=21600,_={path:1,rect:1,image:1},w={circle:1,ellipse:1},k=function(e){var i=/[ahqstv]/gi,n=t._pathToAbsolute;if(r(e).match(i)&&(n=t._path2curve),i=/[clmz]/g,n==t._pathToAbsolute&&!r(e).match(i)){var s=r(e).replace(v,function(t,e,r){var i=[],n="m"==e.toLowerCase(),s=g[e];return r.replace(y,function(t){n&&2==i.length&&(s+=i+g["m"==e?"l":"L"],i=[]),i.push(a(t*b))}),s+i});return s}var o,l,h=n(e);s=[];for(var u=0,c=h.length;c>u;u++){o=h[u],l=h[u][0].toLowerCase(),"z"==l&&(l="x");for(var f=1,x=o.length;x>f;f++)l+=a(o[f]*b)+(f!=x-1?",":d);s.push(l)}return s.join(p)},C=function(e,r,i){var n=t.matrix();return n.rotate(-e,.5,.5),{dx:n.x(r,i),dy:n.y(r,i)}},B=function(t,e,r,i,n,a){var s=t._,o=t.matrix,u=s.fillpos,c=t.node,f=c.style,d=1,g="",v=b/e,x=b/r;if(f.visibility="hidden",e&&r){if(c.coordsize=l(v)+p+l(x),f.rotation=a*(0>e*r?-1:1),a){var y=C(a,i,n);i=y.dx,n=y.dy}if(0>e&&(g+="x"),0>r&&(g+=" y")&&(d=-1),f.flip=g,c.coordorigin=i*-v+p+n*-x,u||s.fillsize){var m=c.getElementsByTagName(h);m=m&&m[0],c.removeChild(m),u&&(y=C(a,o.x(u[0],u[1]),o.y(u[0],u[1])),m.position=y.dx*d+p+y.dy*d),s.fillsize&&(m.size=s.fillsize[0]*l(e)+p+s.fillsize[1]*l(r)),c.appendChild(m)}f.visibility="visible"}};t.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var S=function(t,e,i){for(var n=r(e).toLowerCase().split("-"),a=i?"end":"start",s=n.length,o="classic",l="medium",h="medium";s--;)switch(n[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":o=n[s];break;case"wide":case"narrow":h=n[s];break;case"long":case"short":l=n[s]}var u=t.node.getElementsByTagName("stroke")[0];u[a+"arrow"]=o,u[a+"arrowlength"]=l,u[a+"arrowwidth"]=h},A=function(n,l){n.attrs=n.attrs||{};var c=n.node,f=n.attrs,g=c.style,v=_[n.type]&&(l.x!=f.x||l.y!=f.y||l.width!=f.width||l.height!=f.height||l.cx!=f.cx||l.cy!=f.cy||l.rx!=f.rx||l.ry!=f.ry||l.r!=f.r),x=w[n.type]&&(f.cx!=l.cx||f.cy!=l.cy||f.r!=l.r||f.rx!=l.rx||f.ry!=l.ry),y=n;for(var m in l)l[e](m)&&(f[m]=l[m]);if(v&&(f.path=t._getPath[n.type](n),n._.dirty=1),l.href&&(c.href=l.href),l.title&&(c.title=l.title),l.target&&(c.target=l.target),l.cursor&&(g.cursor=l.cursor),"blur"in l&&n.blur(l.blur),(l.path&&"path"==n.type||v)&&(c.path=k(~r(f.path).toLowerCase().indexOf("r")?t._pathToAbsolute(f.path):f.path),"image"==n.type&&(n._.fillpos=[f.x,f.y],n._.fillsize=[f.width,f.height],B(n,1,1,0,0,0))),"transform"in l&&n.transform(l.transform),x){var C=+f.cx,A=+f.cy,N=+f.rx||+f.r||0,E=+f.ry||+f.r||0;c.path=t.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",a((C-N)*b),a((A-E)*b),a((C+N)*b),a((A+E)*b),a(C*b))}if("clip-rect"in l){var M=r(l["clip-rect"]).split(u);if(4==M.length){M[2]=+M[2]+ +M[0],M[3]=+M[3]+ +M[1];var z=c.clipRect||t._g.doc.createElement("div"),F=z.style;F.clip=t.format("rect({1}px {2}px {3}px {0}px)",M),c.clipRect||(F.position="absolute",F.top=0,F.left=0,F.width=n.paper.width+"px",F.height=n.paper.height+"px",c.parentNode.insertBefore(z,c),z.appendChild(c),c.clipRect=z)}l["clip-rect"]||c.clipRect&&(c.clipRect.style.clip="auto")}if(n.textpath){var R=n.textpath.style;l.font&&(R.font=l.font),l["font-family"]&&(R.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),l["font-size"]&&(R.fontSize=l["font-size"]),l["font-weight"]&&(R.fontWeight=l["font-weight"]),l["font-style"]&&(R.fontStyle=l["font-style"])}if("arrow-start"in l&&S(y,l["arrow-start"]),"arrow-end"in l&&S(y,l["arrow-end"],1),null!=l.opacity||null!=l["stroke-width"]||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var P=c.getElementsByTagName(h),I=!1;if(P=P&&P[0],!P&&(I=P=L(h)),"image"==n.type&&l.src&&(P.src=l.src),l.fill&&(P.on=!0),(null==P.on||"none"==l.fill||null===l.fill)&&(P.on=!1),P.on&&l.fill){var j=r(l.fill).match(t._ISURL);if(j){P.parentNode==c&&c.removeChild(P),P.rotate=!0,P.src=j[1],P.type="tile";var q=n.getBBox(1);P.position=q.x+p+q.y,n._.fillpos=[q.x,q.y],t._preload(j[1],function(){n._.fillsize=[this.offsetWidth,this.offsetHeight]})}else P.color=t.getRGB(l.fill).hex,P.src=d,P.type="solid",t.getRGB(l.fill).error&&(y.type in{circle:1,ellipse:1}||"r"!=r(l.fill).charAt())&&T(y,l.fill,P)&&(f.fill="none",f.gradient=l.fill,P.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var D=((+f["fill-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+t.getRGB(l.fill).o+1||2)-1);D=o(s(D,0),1),P.opacity=D,P.src&&(P.color="none")}c.appendChild(P);var O=c.getElementsByTagName("stroke")&&c.getElementsByTagName("stroke")[0],V=!1;!O&&(V=O=L("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(O.on=!0),("none"==l.stroke||null===l.stroke||null==O.on||0==l.stroke||0==l["stroke-width"])&&(O.on=!1);var Y=t.getRGB(l.stroke);O.on&&l.stroke&&(O.color=Y.hex),D=((+f["stroke-opacity"]+1||2)-1)*((+f.opacity+1||2)-1)*((+Y.o+1||2)-1);var G=.75*(i(l["stroke-width"])||1);if(D=o(s(D,0),1),null==l["stroke-width"]&&(G=f["stroke-width"]),l["stroke-width"]&&(O.weight=G),G&&1>G&&(D*=G)&&(O.weight=1),O.opacity=D,l["stroke-linejoin"]&&(O.joinstyle=l["stroke-linejoin"]||"miter"),O.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(O.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),l["stroke-dasharray"]){var W={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};O.dashstyle=W[e](l["stroke-dasharray"])?W[l["stroke-dasharray"]]:d}V&&c.appendChild(O)}if("text"==y.type){y.paper.canvas.style.display=d;var X=y.paper.span,H=100,U=f.font&&f.font.match(/\d+(?:\.\d*)?(?=px)/);g=X.style,f.font&&(g.font=f.font),f["font-family"]&&(g.fontFamily=f["font-family"]),f["font-weight"]&&(g.fontWeight=f["font-weight"]),f["font-style"]&&(g.fontStyle=f["font-style"]),U=i(f["font-size"]||U&&U[0])||10,g.fontSize=U*H+"px",y.textpath.string&&(X.innerHTML=r(y.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var $=X.getBoundingClientRect();y.W=f.w=($.right-$.left)/H,y.H=f.h=($.bottom-$.top)/H,y.X=f.x,y.Y=f.y+y.H/2,("x"in l||"y"in l)&&(y.path.v=t.format("m{0},{1}l{2},{1}",a(f.x*b),a(f.y*b),a(f.x*b)+1));for(var Z=["x","y","text","font","font-family","font-weight","font-style","font-size"],Q=0,J=Z.length;J>Q;Q++)if(Z[Q]in l){y._.dirty=1;break}switch(f["text-anchor"]){case"start":y.textpath.style["v-text-align"]="left",y.bbx=y.W/2;break;case"end":y.textpath.style["v-text-align"]="right",y.bbx=-y.W/2;break;default:y.textpath.style["v-text-align"]="center",y.bbx=0}y.textpath.style["v-text-kern"]=!0}},T=function(e,a,s){e.attrs=e.attrs||{};var o=(e.attrs,Math.pow),l="linear",h=".5 .5";if(e.attrs.gradient=a,a=r(a).replace(t._radial_gradient,function(t,e,r){return l="radial",e&&r&&(e=i(e),r=i(r),o(e-.5,2)+o(r-.5,2)>.25&&(r=n.sqrt(.25-o(e-.5,2))*(2*(r>.5)-1)+.5),h=e+p+r),d}),a=a.split(/\s*\-\s*/),"linear"==l){var u=a.shift();if(u=-i(u),isNaN(u))return null}var c=t._parseDots(a);if(!c)return null;if(e=e.shape||e.node,c.length){e.removeChild(s),s.on=!0,s.method="none",s.color=c[0].color,s.color2=c[c.length-1].color;for(var f=[],g=0,v=c.length;v>g;g++)c[g].offset&&f.push(c[g].offset+p+c[g].color);s.colors=f.length?f.join():"0% "+s.color,"radial"==l?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=h,s.angle=0):(s.type="gradient",s.angle=(270-u)%360),e.appendChild(s)}return 1},N=function(e,r){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=r,this.matrix=t.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!r.bottom&&(r.bottom=this),this.prev=r.top,r.top&&(r.top.next=this),r.top=this,this.next=null},E=t.el;N.prototype=E,E.constructor=N,E.transform=function(e){if(null==e)return this._.transform;var i,n=this.paper._viewBoxShift,a=n?"s"+[n.scale,n.scale]+"-1-1t"+[n.dx,n.dy]:d;n&&(i=e=r(e).replace(/\.{3}|\u2026/g,this._.transform||d)),t._extractTransform(this,a+e);var s,o=this.matrix.clone(),l=this.skew,h=this.node,u=~r(this.attrs.fill).indexOf("-"),c=!r(this.attrs.fill).indexOf("url(");if(o.translate(-.5,-.5),c||u||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",s=o.split(),u&&s.noRotation||!s.isSimple){h.style.filter=o.toFilter();var f=this.getBBox(),g=this.getBBox(1),v=f.x-g.x,x=f.y-g.y;h.coordorigin=v*-b+p+x*-b,B(this,1,1,v,x,0)}else h.style.filter=d,B(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else h.style.filter=d,l.matrix=r(o),l.offset=o.offset();return i&&(this._.transform=i),this},E.rotate=function(t,e,n){if(this.removed)return this;if(null!=t){if(t=r(t).split(u),t.length-1&&(e=i(t[1]),n=i(t[2])),t=i(t[0]),null==n&&(e=n),null==e||null==n){var a=this.getBBox(1);e=a.x+a.width/2,n=a.y+a.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,e,n]])),this}},E.translate=function(t,e){return this.removed?this:(t=r(t).split(u),t.length-1&&(e=i(t[1])),t=i(t[0])||0,e=+e||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=e),this.transform(this._.transform.concat([["t",t,e]])),this)},E.scale=function(t,e,n,a){if(this.removed)return this;if(t=r(t).split(u),t.length-1&&(e=i(t[1]),n=i(t[2]),a=i(t[3]),isNaN(n)&&(n=null),isNaN(a)&&(a=null)),t=i(t[0]),null==e&&(e=t),null==a&&(n=a),null==n||null==a)var s=this.getBBox(1);return n=null==n?s.x+s.width/2:n,a=null==a?s.y+s.height/2:a,this.transform(this._.transform.concat([["s",t,e,n,a]])),this._.dirtyT=1,this},E.hide=function(){return!this.removed&&(this.node.style.display="none"),this},E.show=function(){return!this.removed&&(this.node.style.display=d),this},E._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},E.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),t.eve.unbind("raphael.*.*."+this.id),t._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;this.removed=!0}},E.attr=function(r,i){if(this.removed)return this;if(null==r){var n={};for(var a in this.attrs)this.attrs[e](a)&&(n[a]=this.attrs[a]);return n.gradient&&"none"==n.fill&&(n.fill=n.gradient)&&delete n.gradient,n.transform=this._.transform,n}if(null==i&&t.is(r,"string")){if(r==h&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=r.split(u),o={},l=0,f=s.length;f>l;l++)r=s[l],o[r]=r in this.attrs?this.attrs[r]:t.is(this.paper.customAttributes[r],"function")?this.paper.customAttributes[r].def:t._availableAttrs[r];return f-1?o:o[s[0]]}if(this.attrs&&null==i&&t.is(r,"array")){for(o={},l=0,f=r.length;f>l;l++)o[r[l]]=this.attr(r[l]);return o}var p;null!=i&&(p={},p[r]=i),null==i&&t.is(r,"object")&&(p=r);for(var d in p)c("raphael.attr."+d+"."+this.id,this,p[d]);if(p){for(d in this.paper.customAttributes)if(this.paper.customAttributes[e](d)&&p[e](d)&&t.is(this.paper.customAttributes[d],"function")){var g=this.paper.customAttributes[d].apply(this,[].concat(p[d]));this.attrs[d]=p[d];for(var v in g)g[e](v)&&(p[v]=g[v])}p.text&&"text"==this.type&&(this.textpath.string=p.text),A(this,p)}return this},E.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&t._tofront(this,this.paper),this},E.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper)),this)},E.insertAfter=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this)},E.insertBefore=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),t._insertbefore(this,e,this.paper),this)},E.blur=function(e){var r=this.node.runtimeStyle,i=r.filter;i=i.replace(x,d),0!==+e?(this.attrs.blur=e,r.filter=i+p+f+".Blur(pixelradius="+(+e||1.5)+")",r.margin=t.format("-{0}px 0 0 -{0}px",a(+e||1.5))):(r.filter=i,r.margin=0,delete this.attrs.blur)},t._engine.path=function(t,e){var r=L("shape");r.style.cssText=m,r.coordsize=b+p+b,r.coordorigin=e.coordorigin;var i=new N(r,e),n={fill:"none",stroke:"#000"};t&&(n.path=t),i.type="path",i.path=[],i.Path=d,A(i,n),e.canvas.appendChild(r);var a=L("skew");return a.on=!0,r.appendChild(a),i.skew=a,i.transform(d),i},t._engine.rect=function(e,r,i,n,a,s){var o=t._rectPath(r,i,n,a,s),l=e.path(o),h=l.attrs;return l.X=h.x=r,l.Y=h.y=i,l.W=h.width=n,l.H=h.height=a,h.r=s,h.path=o,l.type="rect",l},t._engine.ellipse=function(t,e,r,i,n){var a=t.path();return a.attrs,a.X=e-i,a.Y=r-n,a.W=2*i,a.H=2*n,a.type="ellipse",A(a,{cx:e,cy:r,rx:i,ry:n}),a},t._engine.circle=function(t,e,r,i){var n=t.path();return n.attrs,n.X=e-i,n.Y=r-i,n.W=n.H=2*i,n.type="circle",A(n,{cx:e,cy:r,r:i}),n},t._engine.image=function(e,r,i,n,a,s){var o=t._rectPath(i,n,a,s),l=e.path(o).attr({stroke:"none"}),u=l.attrs,c=l.node,f=c.getElementsByTagName(h)[0];return u.src=r,l.X=u.x=i,l.Y=u.y=n,l.W=u.width=a,l.H=u.height=s,u.path=o,l.type="image",f.parentNode==c&&c.removeChild(f),f.rotate=!0,f.src=r,f.type="tile",l._.fillpos=[i,n],l._.fillsize=[a,s],c.appendChild(f),B(l,1,1,0,0,0),l},t._engine.text=function(e,i,n,s){var o=L("shape"),l=L("path"),h=L("textpath");i=i||0,n=n||0,s=s||"",l.v=t.format("m{0},{1}l{2},{1}",a(i*b),a(n*b),a(i*b)+1),l.textpathok=!0,h.string=r(s),h.on=!0,o.style.cssText=m,o.coordsize=b+p+b,o.coordorigin="0 0";var u=new N(o,e),c={fill:"#000",stroke:"none",font:t._availableAttrs.font,text:s};u.shape=o,u.path=l,u.textpath=h,u.type="text",u.attrs.text=r(s),u.attrs.x=i,u.attrs.y=n,u.attrs.w=1,u.attrs.h=1,A(u,c),o.appendChild(h),o.appendChild(l),e.canvas.appendChild(o);var f=L("skew");return f.on=!0,o.appendChild(f),u.skew=f,u.transform(d),u},t._engine.setSize=function(e,r){var i=this.canvas.style;return this.width=e,this.height=r,e==+e&&(e+="px"),r==+r&&(r+="px"),i.width=e,i.height=r,i.clip="rect(0 "+e+" "+r+" 0)",this._viewBox&&t._engine.setViewBox.apply(this,this._viewBox),this},t._engine.setViewBox=function(e,r,i,n,a){t.eve("raphael.setViewBox",this,this._viewBox,[e,r,i,n,a]);var o,l,h=this.width,u=this.height,c=1/s(i/h,n/u);return a&&(o=u/n,l=h/i,h>i*o&&(e-=(h-i*o)/2/o),u>n*l&&(r-=(u-n*l)/2/l)),this._viewBox=[e,r,i,n,!!a],this._viewBoxShift={dx:-e,dy:-r,scale:c},this.forEach(function(t){t.transform("...")}),this};var L;t._engine.initWin=function(t){var e=t.document;e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),L=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(r){L=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e.container,i=e.height,n=e.width,a=e.x,s=e.y;if(!r)throw Error("VML container not found.");var o=new t._Paper,l=o.canvas=t._g.doc.createElement("div"),h=l.style;return a=a||0,s=s||0,n=n||512,i=i||342,o.width=n,o.height=i,n==+n&&(n+="px"),i==+i&&(i+="px"),o.coordsize=1e3*b+p+1e3*b,o.coordorigin="0 0",o.span=t._g.doc.createElement("span"),o.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(o.span),h.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",n,i),1==r?(t._g.doc.body.appendChild(l),h.left=a+"px",h.top=s+"px",h.position="absolute"):r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),o.renderfix=function(){},o},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var M=t.st;for(var z in E)E[e](z)&&!M[e](z)&&(M[z]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(z))}(window.Raphael);
0 11
\ No newline at end of file
1 12
new file mode 100644
... ...
@@ -0,0 +1,1454 @@
1
+//
2
+// showdown.js -- A javascript port of Markdown.
3
+//
4
+// Copyright (c) 2007 John Fraser.
5
+//
6
+// Original Markdown Copyright (c) 2004-2005 John Gruber
7
+//   <http://daringfireball.net/projects/markdown/>
8
+//
9
+// Redistributable under a BSD-style open source license.
10
+// See license.txt for more information.
11
+//
12
+// The full source distribution is at:
13
+//
14
+//				A A L
15
+//				T C A
16
+//				T K B
17
+//
18
+//   <http://www.attacklab.net/>
19
+//
20
+
21
+//
22
+// Wherever possible, Showdown is a straight, line-by-line port
23
+// of the Perl version of Markdown.
24
+//
25
+// This is not a normal parser design; it's basically just a
26
+// series of string substitutions.  It's hard to read and
27
+// maintain this way,  but keeping Showdown close to the original
28
+// design makes it easier to port new features.
29
+//
30
+// More importantly, Showdown behaves like markdown.pl in most
31
+// edge cases.  So web applications can do client-side preview
32
+// in Javascript, and then build identical HTML on the server.
33
+//
34
+// This port needs the new RegExp functionality of ECMA 262,
35
+// 3rd Edition (i.e. Javascript 1.5).  Most modern web browsers
36
+// should do fine.  Even with the new regular expression features,
37
+// We do a lot of work to emulate Perl's regex functionality.
38
+// The tricky changes in this file mostly have the "attacklab:"
39
+// label.  Major or self-explanatory changes don't.
40
+//
41
+// Smart diff tools like Araxis Merge will be able to match up
42
+// this file with markdown.pl in a useful way.  A little tweaking
43
+// helps: in a copy of markdown.pl, replace "#" with "//" and
44
+// replace "$text" with "text".  Be sure to ignore whitespace
45
+// and line endings.
46
+//
47
+
48
+
49
+//
50
+// Showdown usage:
51
+//
52
+//   var text = "Markdown *rocks*.";
53
+//
54
+//   var converter = new Showdown.converter();
55
+//   var html = converter.makeHtml(text);
56
+//
57
+//   alert(html);
58
+//
59
+// Note: move the sample code to the bottom of this
60
+// file before uncommenting it.
61
+//
62
+
63
+
64
+//
65
+// Showdown namespace
66
+//
67
+var Showdown = { extensions: {} };
68
+
69
+//
70
+// forEach
71
+//
72
+var forEach = Showdown.forEach = function(obj, callback) {
73
+	if (typeof obj.forEach === 'function') {
74
+		obj.forEach(callback);
75
+	} else {
76
+		var i, len = obj.length;
77
+		for (i = 0; i < len; i++) {
78
+			callback(obj[i], i, obj);
79
+		}
80
+	}
81
+};
82
+
83
+//
84
+// Standard extension naming
85
+//
86
+var stdExtName = function(s) {
87
+	return s.replace(/[_-]||\s/g, '').toLowerCase();
88
+};
89
+
90
+//
91
+// converter
92
+//
93
+// Wraps all "globals" so that the only thing
94
+// exposed is makeHtml().
95
+//
96
+Showdown.converter = function(converter_options) {
97
+
98
+//
99
+// Globals:
100
+//
101
+
102
+// Global hashes, used by various utility routines
103
+var g_urls;
104
+var g_titles;
105
+var g_html_blocks;
106
+
107
+// Used to track when we're inside an ordered or unordered list
108
+// (see _ProcessListItems() for details):
109
+var g_list_level = 0;
110
+
111
+// Global extensions
112
+var g_lang_extensions = [];
113
+var g_output_modifiers = [];
114
+
115
+
116
+//
117
+// Automatic Extension Loading (node only):
118
+//
119
+
120
+if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof require !== 'undefind') {
121
+	var fs = require('fs');
122
+
123
+	if (fs) {
124
+		// Search extensions folder
125
+		var extensions = fs.readdirSync((__dirname || '.')+'/extensions').filter(function(file){
126
+			return ~file.indexOf('.js');
127
+		}).map(function(file){
128
+			return file.replace(/\.js$/, '');
129
+		});
130
+		// Load extensions into Showdown namespace
131
+		Showdown.forEach(extensions, function(ext){
132
+			var name = stdExtName(ext);
133
+			Showdown.extensions[name] = require('./extensions/' + ext);
134
+		});
135
+	}
136
+}
137
+
138
+this.makeHtml = function(text) {
139
+//
140
+// Main function. The order in which other subs are called here is
141
+// essential. Link and image substitutions need to happen before
142
+// _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the <a>
143
+// and <img> tags get encoded.
144
+//
145
+
146
+	// Clear the global hashes. If we don't clear these, you get conflicts
147
+	// from other articles when generating a page which contains more than
148
+	// one article (e.g. an index page that shows the N most recent
149
+	// articles):
150
+	g_urls = {};
151
+	g_titles = {};
152
+	g_html_blocks = [];
153
+
154
+	// attacklab: Replace ~ with ~T
155
+	// This lets us use tilde as an escape char to avoid md5 hashes
156
+	// The choice of character is arbitray; anything that isn't
157
+	// magic in Markdown will work.
158
+	text = text.replace(/~/g,"~T");
159
+
160
+	// attacklab: Replace $ with ~D
161
+	// RegExp interprets $ as a special character
162
+	// when it's in a replacement string
163
+	text = text.replace(/\$/g,"~D");
164
+
165
+	// Standardize line endings
166
+	text = text.replace(/\r\n/g,"\n"); // DOS to Unix
167
+	text = text.replace(/\r/g,"\n"); // Mac to Unix
168
+
169
+	// Make sure text begins and ends with a couple of newlines:
170
+	text = "\n\n" + text + "\n\n";
171
+
172
+	// Convert all tabs to spaces.
173
+	text = _Detab(text);
174
+
175
+	// Strip any lines consisting only of spaces and tabs.
176
+	// This makes subsequent regexen easier to write, because we can
177
+	// match consecutive blank lines with /\n+/ instead of something
178
+	// contorted like /[ \t]*\n+/ .
179
+	text = text.replace(/^[ \t]+$/mg,"");
180
+
181
+	// Run language extensions
182
+	Showdown.forEach(g_lang_extensions, function(x){
183
+		text = _ExecuteExtension(x, text);
184
+	});
185
+
186
+	// Handle github codeblocks prior to running HashHTML so that
187
+	// HTML contained within the codeblock gets escaped propertly
188
+	text = _DoGithubCodeBlocks(text);
189
+
190
+	// Turn block-level HTML blocks into hash entries
191
+	text = _HashHTMLBlocks(text);
192
+
193
+	// Strip link definitions, store in hashes.
194
+	text = _StripLinkDefinitions(text);
195
+
196
+	text = _RunBlockGamut(text);
197
+
198
+	text = _UnescapeSpecialChars(text);
199
+
200
+	// attacklab: Restore dollar signs
201
+	text = text.replace(/~D/g,"$$");
202
+
203
+	// attacklab: Restore tildes
204
+	text = text.replace(/~T/g,"~");
205
+
206
+	// Run output modifiers
207
+	Showdown.forEach(g_output_modifiers, function(x){
208
+		text = _ExecuteExtension(x, text);
209
+	});
210
+
211
+	return text;
212
+};
213
+//
214
+// Options:
215
+//
216
+
217
+// Parse extensions options into separate arrays
218
+if (converter_options && converter_options.extensions) {
219
+
220
+  var self = this;
221
+
222
+	// Iterate over each plugin
223
+	Showdown.forEach(converter_options.extensions, function(plugin){
224
+
225
+		// Assume it's a bundled plugin if a string is given
226
+		if (typeof plugin === 'string') {
227
+			plugin = Showdown.extensions[stdExtName(plugin)];
228
+		}
229
+
230
+		if (typeof plugin === 'function') {
231
+			// Iterate over each extension within that plugin
232
+			Showdown.forEach(plugin(self), function(ext){
233
+				// Sort extensions by type
234
+				if (ext.type) {
235
+					if (ext.type === 'language' || ext.type === 'lang') {
236
+						g_lang_extensions.push(ext);
237
+					} else if (ext.type === 'output' || ext.type === 'html') {
238
+						g_output_modifiers.push(ext);
239
+					}
240
+				} else {
241
+					// Assume language extension
242
+					g_output_modifiers.push(ext);
243
+				}
244
+			});
245
+		} else {
246
+			throw "Extension '" + plugin + "' could not be loaded.  It was either not found or is not a valid extension.";
247
+		}
248
+	});
249
+}
250
+
251
+
252
+var _ExecuteExtension = function(ext, text) {
253
+	if (ext.regex) {
254
+		var re = new RegExp(ext.regex, 'g');
255
+		return text.replace(re, ext.replace);
256
+	} else if (ext.filter) {
257
+		return ext.filter(text);
258
+	}
259
+};
260
+
261
+var _StripLinkDefinitions = function(text) {
262
+//
263
+// Strips link definitions from text, stores the URLs and titles in
264
+// hash references.
265
+//
266
+
267
+	// Link defs are in the form: ^[id]: url "optional title"
268
+
269
+	/*
270
+		var text = text.replace(/
271
+				^[ ]{0,3}\[(.+)\]:  // id = $1  attacklab: g_tab_width - 1
272
+				  [ \t]*
273
+				  \n?				// maybe *one* newline
274
+				  [ \t]*
275
+				<?(\S+?)>?			// url = $2
276
+				  [ \t]*
277
+				  \n?				// maybe one newline
278
+				  [ \t]*
279
+				(?:
280
+				  (\n*)				// any lines skipped = $3 attacklab: lookbehind removed
281
+				  ["(]
282
+				  (.+?)				// title = $4
283
+				  [")]
284
+				  [ \t]*
285
+				)?					// title is optional
286
+				(?:\n+|$)
287
+			  /gm,
288
+			  function(){...});
289
+	*/
290
+
291
+	// attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
292
+	text += "~0";
293
+
294
+	text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|(?=~0))/gm,
295
+		function (wholeMatch,m1,m2,m3,m4) {
296
+			m1 = m1.toLowerCase();
297
+			g_urls[m1] = _EncodeAmpsAndAngles(m2);  // Link IDs are case-insensitive
298
+			if (m3) {
299
+				// Oops, found blank lines, so it's not a title.
300
+				// Put back the parenthetical statement we stole.
301
+				return m3+m4;
302
+			} else if (m4) {
303
+				g_titles[m1] = m4.replace(/"/g,"&quot;");
304
+			}
305
+
306
+			// Completely remove the definition from the text
307
+			return "";
308
+		}
309
+	);
310
+
311
+	// attacklab: strip sentinel
312
+	text = text.replace(/~0/,"");
313
+
314
+	return text;
315
+}
316
+
317
+
318
+var _HashHTMLBlocks = function(text) {
319
+	// attacklab: Double up blank lines to reduce lookaround
320
+	text = text.replace(/\n/g,"\n\n");
321
+
322
+	// Hashify HTML blocks:
323
+	// We only want to do this for block-level HTML tags, such as headers,
324
+	// lists, and tables. That's because we still want to wrap <p>s around
325
+	// "paragraphs" that are wrapped in non-block-level tags, such as anchors,
326
+	// phrase emphasis, and spans. The list of tags we're looking for is
327
+	// hard-coded:
328
+	var block_tags_a = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del|style|section|header|footer|nav|article|aside";
329
+	var block_tags_b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside";
330
+
331
+	// First, look for nested blocks, e.g.:
332
+	//   <div>
333
+	//     <div>
334
+	//     tags for inner block must be indented.
335
+	//     </div>
336
+	//   </div>
337
+	//
338
+	// The outermost tags must start at the left margin for this to match, and
339
+	// the inner nested divs must be indented.
340
+	// We need to do this before the next, more liberal match, because the next
341
+	// match will start at the first `<div>` and stop at the first `</div>`.
342
+
343
+	// attacklab: This regex can be expensive when it fails.
344
+	/*
345
+		var text = text.replace(/
346
+		(						// save in $1
347
+			^					// start of line  (with /m)
348
+			<($block_tags_a)	// start tag = $2
349
+			\b					// word break
350
+								// attacklab: hack around khtml/pcre bug...
351
+			[^\r]*?\n			// any number of lines, minimally matching
352
+			</\2>				// the matching end tag
353
+			[ \t]*				// trailing spaces/tabs
354
+			(?=\n+)				// followed by a newline
355
+		)						// attacklab: there are sentinel newlines at end of document
356
+		/gm,function(){...}};
357
+	*/
358
+	text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,hashElement);
359
+
360
+	//
361
+	// Now match more liberally, simply from `\n<tag>` to `</tag>\n`
362
+	//
363
+
364
+	/*
365
+		var text = text.replace(/
366
+		(						// save in $1
367
+			^					// start of line  (with /m)
368
+			<($block_tags_b)	// start tag = $2
369
+			\b					// word break
370
+								// attacklab: hack around khtml/pcre bug...
371
+			[^\r]*?				// any number of lines, minimally matching
372
+			</\2>				// the matching end tag
373
+			[ \t]*				// trailing spaces/tabs
374
+			(?=\n+)				// followed by a newline
375
+		)						// attacklab: there are sentinel newlines at end of document
376
+		/gm,function(){...}};
377
+	*/
378
+	text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,hashElement);
379
+
380
+	// Special case just for <hr />. It was easier to make a special case than
381
+	// to make the other regex more complicated.
382
+
383
+	/*
384
+		text = text.replace(/
385
+		(						// save in $1
386
+			\n\n				// Starting after a blank line
387
+			[ ]{0,3}
388
+			(<(hr)				// start tag = $2
389
+			\b					// word break
390
+			([^<>])*?			//
391
+			\/?>)				// the matching end tag
392
+			[ \t]*
393
+			(?=\n{2,})			// followed by a blank line
394
+		)
395
+		/g,hashElement);
396
+	*/
397
+	text = text.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,hashElement);
398
+
399
+	// Special case for standalone HTML comments:
400
+
401
+	/*
402
+		text = text.replace(/
403
+		(						// save in $1
404
+			\n\n				// Starting after a blank line
405
+			[ ]{0,3}			// attacklab: g_tab_width - 1
406
+			<!
407
+			(--[^\r]*?--\s*)+
408
+			>
409
+			[ \t]*
410
+			(?=\n{2,})			// followed by a blank line
411
+		)
412
+		/g,hashElement);
413
+	*/
414
+	text = text.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,hashElement);
415
+
416
+	// PHP and ASP-style processor instructions (<?...?> and <%...%>)
417
+
418
+	/*
419
+		text = text.replace(/
420
+		(?:
421
+			\n\n				// Starting after a blank line
422
+		)
423
+		(						// save in $1
424
+			[ ]{0,3}			// attacklab: g_tab_width - 1
425
+			(?:
426
+				<([?%])			// $2
427
+				[^\r]*?
428
+				\2>
429
+			)
430
+			[ \t]*
431
+			(?=\n{2,})			// followed by a blank line
432
+		)
433
+		/g,hashElement);
434
+	*/
435
+	text = text.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,hashElement);
436
+
437
+	// attacklab: Undo double lines (see comment at top of this function)
438
+	text = text.replace(/\n\n/g,"\n");
439
+	return text;
440
+}
441
+
442
+var hashElement = function(wholeMatch,m1) {
443
+	var blockText = m1;
444
+
445
+	// Undo double lines
446
+	blockText = blockText.replace(/\n\n/g,"\n");
447
+	blockText = blockText.replace(/^\n/,"");
448
+
449
+	// strip trailing blank lines
450
+	blockText = blockText.replace(/\n+$/g,"");
451
+
452
+	// Replace the element text with a marker ("~KxK" where x is its key)
453
+	blockText = "\n\n~K" + (g_html_blocks.push(blockText)-1) + "K\n\n";
454
+
455
+	return blockText;
456
+};
457
+
458
+var _RunBlockGamut = function(text) {
459
+//
460
+// These are all the transformations that form block-level
461
+// tags like paragraphs, headers, and list items.
462
+//
463
+	text = _DoHeaders(text);
464
+
465
+	// Do Horizontal Rules:
466
+	var key = hashBlock("<hr />");
467
+	text = text.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,key);
468
+	text = text.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,key);
469
+	text = text.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,key);
470
+
471
+	text = _DoLists(text);
472
+	text = _DoCodeBlocks(text);
473
+	text = _DoBlockQuotes(text);
474
+
475
+	// We already ran _HashHTMLBlocks() before, in Markdown(), but that
476
+	// was to escape raw HTML in the original Markdown source. This time,
477
+	// we're escaping the markup we've just created, so that we don't wrap
478
+	// <p> tags around block-level tags.
479
+	text = _HashHTMLBlocks(text);
480
+	text = _FormParagraphs(text);
481
+
482
+	return text;
483
+};
484
+
485
+
486
+var _RunSpanGamut = function(text) {
487
+//
488
+// These are all the transformations that occur *within* block-level
489
+// tags like paragraphs, headers, and list items.
490
+//
491
+
492
+	text = _DoCodeSpans(text);
493
+	text = _EscapeSpecialCharsWithinTagAttributes(text);
494
+	text = _EncodeBackslashEscapes(text);
495
+
496
+	// Process anchor and image tags. Images must come first,
497
+	// because ![foo][f] looks like an anchor.
498
+	text = _DoImages(text);
499
+	text = _DoAnchors(text);
500
+
501
+	// Make links out of things like `<http://example.com/>`
502
+	// Must come after _DoAnchors(), because you can use < and >
503
+	// delimiters in inline links like [this](<url>).
504
+	text = _DoAutoLinks(text);
505
+	text = _EncodeAmpsAndAngles(text);
506
+	text = _DoItalicsAndBold(text);
507
+
508
+	// Do hard breaks:
509
+	text = text.replace(/  +\n/g," <br />\n");
510
+
511
+	return text;
512
+}
513
+
514
+var _EscapeSpecialCharsWithinTagAttributes = function(text) {
515
+//
516
+// Within tags -- meaning between < and > -- encode [\ ` * _] so they
517
+// don't conflict with their use in Markdown for code, italics and strong.
518
+//
519
+
520
+	// Build a regex to find HTML tags and comments.  See Friedl's
521
+	// "Mastering Regular Expressions", 2nd Ed., pp. 200-201.
522
+	var regex = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
523
+
524
+	text = text.replace(regex, function(wholeMatch) {
525
+		var tag = wholeMatch.replace(/(.)<\/?code>(?=.)/g,"$1`");
526
+		tag = escapeCharacters(tag,"\\`*_");
527
+		return tag;
528
+	});
529
+
530
+	return text;
531
+}
532
+
533
+var _DoAnchors = function(text) {
534
+//
535
+// Turn Markdown link shortcuts into XHTML <a> tags.
536
+//
537
+	//
538
+	// First, handle reference-style links: [link text] [id]
539
+	//
540
+
541
+	/*
542
+		text = text.replace(/
543
+		(							// wrap whole match in $1
544
+			\[
545
+			(
546
+				(?:
547
+					\[[^\]]*\]		// allow brackets nested one level
548
+					|
549
+					[^\[]			// or anything else
550
+				)*
551
+			)
552
+			\]
553
+
554
+			[ ]?					// one optional space
555
+			(?:\n[ ]*)?				// one optional newline followed by spaces
556
+
557
+			\[
558
+			(.*?)					// id = $3
559
+			\]
560
+		)()()()()					// pad remaining backreferences
561
+		/g,_DoAnchors_callback);
562
+	*/
563
+	text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeAnchorTag);
564
+
565
+	//
566
+	// Next, inline-style links: [link text](url "optional title")
567
+	//
568
+
569
+	/*
570
+		text = text.replace(/
571
+			(						// wrap whole match in $1
572
+				\[
573
+				(
574
+					(?:
575
+						\[[^\]]*\]	// allow brackets nested one level
576
+					|
577
+					[^\[\]]			// or anything else
578
+				)
579
+			)
580
+			\]
581
+			\(						// literal paren
582
+			[ \t]*
583
+			()						// no id, so leave $3 empty
584
+			<?(.*?)>?				// href = $4
585
+			[ \t]*
586
+			(						// $5
587
+				(['"])				// quote char = $6
588
+				(.*?)				// Title = $7
589
+				\6					// matching quote
590
+				[ \t]*				// ignore any spaces/tabs between closing quote and )
591
+			)?						// title is optional
592
+			\)
593
+		)
594
+		/g,writeAnchorTag);
595
+	*/
596
+	text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeAnchorTag);
597
+
598
+	//
599
+	// Last, handle reference-style shortcuts: [link text]
600
+	// These must come last in case you've also got [link test][1]
601
+	// or [link test](/foo)
602
+	//
603
+
604
+	/*
605
+		text = text.replace(/
606
+		(		 					// wrap whole match in $1
607
+			\[
608
+			([^\[\]]+)				// link text = $2; can't contain '[' or ']'
609
+			\]
610
+		)()()()()()					// pad rest of backreferences
611
+		/g, writeAnchorTag);
612
+	*/
613
+	text = text.replace(/(\[([^\[\]]+)\])()()()()()/g, writeAnchorTag);
614
+
615
+	return text;
616
+}
617
+
618
+var writeAnchorTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) {
619
+	if (m7 == undefined) m7 = "";
620
+	var whole_match = m1;
621
+	var link_text   = m2;
622
+	var link_id	 = m3.toLowerCase();
623
+	var url		= m4;
624
+	var title	= m7;
625
+
626
+	if (url == "") {
627
+		if (link_id == "") {
628
+			// lower-case and turn embedded newlines into spaces
629
+			link_id = link_text.toLowerCase().replace(/ ?\n/g," ");
630
+		}
631
+		url = "#"+link_id;
632
+
633
+		if (g_urls[link_id] != undefined) {
634
+			url = g_urls[link_id];
635
+			if (g_titles[link_id] != undefined) {
636
+				title = g_titles[link_id];
637
+			}
638
+		}
639
+		else {
640
+			if (whole_match.search(/\(\s*\)$/m)>-1) {
641
+				// Special case for explicit empty url
642
+				url = "";
643
+			} else {
644
+				return whole_match;
645
+			}
646
+		}
647
+	}
648
+
649
+	url = escapeCharacters(url,"*_");
650
+	var result = "<a href=\"" + url + "\"";
651
+
652
+	if (title != "") {
653
+		title = title.replace(/"/g,"&quot;");
654
+		title = escapeCharacters(title,"*_");
655
+		result +=  " title=\"" + title + "\"";
656
+	}
657
+
658
+	result += ">" + link_text + "</a>";
659
+
660
+	return result;
661
+}
662
+
663
+
664
+var _DoImages = function(text) {
665
+//
666
+// Turn Markdown image shortcuts into <img> tags.
667
+//
668
+
669
+	//
670
+	// First, handle reference-style labeled images: ![alt text][id]
671
+	//
672
+
673
+	/*
674
+		text = text.replace(/
675
+		(						// wrap whole match in $1
676
+			!\[
677
+			(.*?)				// alt text = $2
678
+			\]
679
+
680
+			[ ]?				// one optional space
681
+			(?:\n[ ]*)?			// one optional newline followed by spaces
682
+
683
+			\[
684
+			(.*?)				// id = $3
685
+			\]
686
+		)()()()()				// pad rest of backreferences
687
+		/g,writeImageTag);
688
+	*/
689
+	text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeImageTag);
690
+
691
+	//
692
+	// Next, handle inline images:  ![alt text](url "optional title")
693
+	// Don't forget: encode * and _
694
+
695
+	/*
696
+		text = text.replace(/
697
+		(						// wrap whole match in $1
698
+			!\[
699
+			(.*?)				// alt text = $2
700
+			\]
701
+			\s?					// One optional whitespace character
702
+			\(					// literal paren
703
+			[ \t]*
704
+			()					// no id, so leave $3 empty
705
+			<?(\S+?)>?			// src url = $4
706
+			[ \t]*
707
+			(					// $5
708
+				(['"])			// quote char = $6
709
+				(.*?)			// title = $7
710
+				\6				// matching quote
711
+				[ \t]*
712
+			)?					// title is optional
713
+		\)
714
+		)
715
+		/g,writeImageTag);
716
+	*/
717
+	text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeImageTag);
718
+
719
+	return text;
720
+}
721
+
722
+var writeImageTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) {
723
+	var whole_match = m1;
724
+	var alt_text   = m2;
725
+	var link_id	 = m3.toLowerCase();
726
+	var url		= m4;
727
+	var title	= m7;
728
+
729
+	if (!title) title = "";
730
+
731
+	if (url == "") {
732
+		if (link_id == "") {
733
+			// lower-case and turn embedded newlines into spaces
734
+			link_id = alt_text.toLowerCase().replace(/ ?\n/g," ");
735
+		}
736
+		url = "#"+link_id;
737
+
738
+		if (g_urls[link_id] != undefined) {
739
+			url = g_urls[link_id];
740
+			if (g_titles[link_id] != undefined) {
741
+				title = g_titles[link_id];
742
+			}
743
+		}
744
+		else {
745
+			return whole_match;
746
+		}
747
+	}
748
+
749
+	alt_text = alt_text.replace(/"/g,"&quot;");
750
+	url = escapeCharacters(url,"*_");
751
+	var result = "<img src=\"" + url + "\" alt=\"" + alt_text + "\"";
752
+
753
+	// attacklab: Markdown.pl adds empty title attributes to images.
754
+	// Replicate this bug.
755
+
756
+	//if (title != "") {
757
+		title = title.replace(/"/g,"&quot;");
758
+		title = escapeCharacters(title,"*_");
759
+		result +=  " title=\"" + title + "\"";
760
+	//}
761
+
762
+	result += " />";
763
+
764
+	return result;
765
+}
766
+
767
+
768
+var _DoHeaders = function(text) {
769
+
770
+	// Setext-style headers:
771
+	//	Header 1
772
+	//	========
773
+	//
774
+	//	Header 2
775
+	//	--------
776
+	//
777
+	text = text.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,
778
+		function(wholeMatch,m1){return hashBlock('<h1 id="' + headerId(m1) + '">' + _RunSpanGamut(m1) + "</h1>");});
779
+
780
+	text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,
781
+		function(matchFound,m1){return hashBlock('<h2 id="' + headerId(m1) + '">' + _RunSpanGamut(m1) + "</h2>");});
782
+
783
+	// atx-style headers:
784
+	//  # Header 1
785
+	//  ## Header 2
786
+	//  ## Header 2 with closing hashes ##
787
+	//  ...
788
+	//  ###### Header 6
789
+	//
790
+
791
+	/*
792
+		text = text.replace(/
793
+			^(\#{1,6})				// $1 = string of #'s
794
+			[ \t]*
795
+			(.+?)					// $2 = Header text
796
+			[ \t]*
797
+			\#*						// optional closing #'s (not counted)
798
+			\n+
799
+		/gm, function() {...});
800
+	*/
801
+
802
+	text = text.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,
803
+		function(wholeMatch,m1,m2) {
804
+			var h_level = m1.length;
805
+			return hashBlock("<h" + h_level + ' id="' + headerId(m2) + '">' + _RunSpanGamut(m2) + "</h" + h_level + ">");
806
+		});
807
+
808
+	function headerId(m) {
809
+		return m.replace(/[^\w]/g, '').toLowerCase();
810
+	}
811
+	return text;
812
+}
813
+
814
+// This declaration keeps Dojo compressor from outputting garbage:
815
+var _ProcessListItems;
816
+
817
+var _DoLists = function(text) {
818
+//
819
+// Form HTML ordered (numbered) and unordered (bulleted) lists.
820
+//
821
+
822
+	// attacklab: add sentinel to hack around khtml/safari bug:
823
+	// http://bugs.webkit.org/show_bug.cgi?id=11231
824
+	text += "~0";
825
+
826
+	// Re-usable pattern to match any entirel ul or ol list:
827
+
828
+	/*
829
+		var whole_list = /
830
+		(									// $1 = whole list
831
+			(								// $2
832
+				[ ]{0,3}					// attacklab: g_tab_width - 1
833
+				([*+-]|\d+[.])				// $3 = first list item marker
834
+				[ \t]+
835
+			)
836
+			[^\r]+?
837
+			(								// $4
838
+				~0							// sentinel for workaround; should be $
839
+			|
840
+				\n{2,}
841
+				(?=\S)
842
+				(?!							// Negative lookahead for another list item marker
843
+					[ \t]*
844
+					(?:[*+-]|\d+[.])[ \t]+
845
+				)
846
+			)
847
+		)/g
848
+	*/
849
+	var whole_list = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
850
+
851
+	if (g_list_level) {
852
+		text = text.replace(whole_list,function(wholeMatch,m1,m2) {
853
+			var list = m1;
854
+			var list_type = (m2.search(/[*+-]/g)>-1) ? "ul" : "ol";
855
+
856
+			// Turn double returns into triple returns, so that we can make a
857
+			// paragraph for the last item in a list, if necessary:
858
+			list = list.replace(/\n{2,}/g,"\n\n\n");;
859
+			var result = _ProcessListItems(list);
860
+
861
+			// Trim any trailing whitespace, to put the closing `</$list_type>`
862
+			// up on the preceding line, to get it past the current stupid
863
+			// HTML block parser. This is a hack to work around the terrible
864
+			// hack that is the HTML block parser.
865
+			result = result.replace(/\s+$/,"");
866
+			result = "<"+list_type+">" + result + "</"+list_type+">\n";
867
+			return result;
868
+		});
869
+	} else {
870
+		whole_list = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;
871
+		text = text.replace(whole_list,function(wholeMatch,m1,m2,m3) {
872
+			var runup = m1;
873
+			var list = m2;
874
+
875
+			var list_type = (m3.search(/[*+-]/g)>-1) ? "ul" : "ol";
876
+			// Turn double returns into triple returns, so that we can make a
877
+			// paragraph for the last item in a list, if necessary:
878
+			var list = list.replace(/\n{2,}/g,"\n\n\n");;
879
+			var result = _ProcessListItems(list);
880
+			result = runup + "<"+list_type+">\n" + result + "</"+list_type+">\n";
881
+			return result;
882
+		});
883
+	}
884
+
885
+	// attacklab: strip sentinel
886
+	text = text.replace(/~0/,"");
887
+
888
+	return text;
889
+}
890
+
891
+_ProcessListItems = function(list_str) {
892
+//
893
+//  Process the contents of a single ordered or unordered list, splitting it
894
+//  into individual list items.
895
+//
896
+	// The $g_list_level global keeps track of when we're inside a list.
897
+	// Each time we enter a list, we increment it; when we leave a list,
898
+	// we decrement. If it's zero, we're not in a list anymore.
899
+	//
900
+	// We do this because when we're not inside a list, we want to treat
901
+	// something like this:
902
+	//
903
+	//    I recommend upgrading to version
904
+	//    8. Oops, now this line is treated
905
+	//    as a sub-list.
906
+	//
907
+	// As a single paragraph, despite the fact that the second line starts
908
+	// with a digit-period-space sequence.
909
+	//
910
+	// Whereas when we're inside a list (or sub-list), that line will be
911
+	// treated as the start of a sub-list. What a kludge, huh? This is
912
+	// an aspect of Markdown's syntax that's hard to parse perfectly
913
+	// without resorting to mind-reading. Perhaps the solution is to
914
+	// change the syntax rules such that sub-lists must start with a
915
+	// starting cardinal number; e.g. "1." or "a.".
916
+
917
+	g_list_level++;
918
+
919
+	// trim trailing blank lines:
920
+	list_str = list_str.replace(/\n{2,}$/,"\n");
921
+
922
+	// attacklab: add sentinel to emulate \z
923
+	list_str += "~0";
924
+
925
+	/*
926
+		list_str = list_str.replace(/
927
+			(\n)?							// leading line = $1
928
+			(^[ \t]*)						// leading whitespace = $2
929
+			([*+-]|\d+[.]) [ \t]+			// list marker = $3
930
+			([^\r]+?						// list item text   = $4
931
+			(\n{1,2}))
932
+			(?= \n* (~0 | \2 ([*+-]|\d+[.]) [ \t]+))
933
+		/gm, function(){...});
934
+	*/
935
+	list_str = list_str.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,
936
+		function(wholeMatch,m1,m2,m3,m4){
937
+			var item = m4;
938
+			var leading_line = m1;
939
+			var leading_space = m2;
940
+
941
+			if (leading_line || (item.search(/\n{2,}/)>-1)) {
942
+				item = _RunBlockGamut(_Outdent(item));
943
+			}
944
+			else {
945
+				// Recursion for sub-lists:
946
+				item = _DoLists(_Outdent(item));
947
+				item = item.replace(/\n$/,""); // chomp(item)
948
+				item = _RunSpanGamut(item);
949
+			}
950
+
951
+			return  "<li>" + item + "</li>\n";
952
+		}
953
+	);
954
+
955
+	// attacklab: strip sentinel
956
+	list_str = list_str.replace(/~0/g,"");
957
+
958
+	g_list_level--;
959
+	return list_str;
960
+}
961
+
962
+
963
+var _DoCodeBlocks = function(text) {
964
+//
965
+//  Process Markdown `<pre><code>` blocks.
966
+//
967
+
968
+	/*
969
+		text = text.replace(text,
970
+			/(?:\n\n|^)
971
+			(								// $1 = the code block -- one or more lines, starting with a space/tab
972
+				(?:
973
+					(?:[ ]{4}|\t)			// Lines must start with a tab or a tab-width of spaces - attacklab: g_tab_width
974
+					.*\n+
975
+				)+
976
+			)
977
+			(\n*[ ]{0,3}[^ \t\n]|(?=~0))	// attacklab: g_tab_width
978
+		/g,function(){...});
979
+	*/
980
+
981
+	// attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
982
+	text += "~0";
983
+
984
+	text = text.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,
985
+		function(wholeMatch,m1,m2) {
986
+			var codeblock = m1;
987
+			var nextChar = m2;
988
+
989
+			codeblock = _EncodeCode( _Outdent(codeblock));
990
+			codeblock = _Detab(codeblock);
991
+			codeblock = codeblock.replace(/^\n+/g,""); // trim leading newlines
992
+			codeblock = codeblock.replace(/\n+$/g,""); // trim trailing whitespace
993
+
994
+			codeblock = "<pre><code>" + codeblock + "\n</code></pre>";
995
+
996
+			return hashBlock(codeblock) + nextChar;
997
+		}
998
+	);
999
+
1000
+	// attacklab: strip sentinel
1001
+	text = text.replace(/~0/,"");
1002
+
1003
+	return text;
1004
+};
1005
+
1006
+var _DoGithubCodeBlocks = function(text) {
1007
+//
1008
+//  Process Github-style code blocks
1009
+//  Example:
1010
+//  ```ruby
1011
+//  def hello_world(x)
1012
+//    puts "Hello, #{x}"
1013
+//  end
1014
+//  ```
1015
+//
1016
+
1017
+
1018
+	// attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
1019
+	text += "~0";
1020
+
1021
+	text = text.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,
1022
+		function(wholeMatch,m1,m2) {
1023
+			var language = m1;
1024
+			var codeblock = m2;
1025
+
1026
+			codeblock = _EncodeCode(codeblock);
1027
+			codeblock = _Detab(codeblock);
1028
+			codeblock = codeblock.replace(/^\n+/g,""); // trim leading newlines
1029
+			codeblock = codeblock.replace(/\n+$/g,""); // trim trailing whitespace
1030
+
1031
+			codeblock = "<pre><code" + (language ? " class=\"" + language + '"' : "") + ">" + codeblock + "\n</code></pre>";
1032
+
1033
+			return hashBlock(codeblock);
1034
+		}
1035
+	);
1036
+
1037
+	// attacklab: strip sentinel
1038
+	text = text.replace(/~0/,"");
1039
+
1040
+	return text;
1041
+}
1042
+
1043
+var hashBlock = function(text) {
1044
+	text = text.replace(/(^\n+|\n+$)/g,"");
1045
+	return "\n\n~K" + (g_html_blocks.push(text)-1) + "K\n\n";
1046
+}
1047
+
1048
+var _DoCodeSpans = function(text) {
1049
+//
1050
+//   *  Backtick quotes are used for <code></code> spans.
1051
+//
1052
+//   *  You can use multiple backticks as the delimiters if you want to
1053
+//	 include literal backticks in the code span. So, this input:
1054
+//
1055
+//		 Just type ``foo `bar` baz`` at the prompt.
1056
+//
1057
+//	   Will translate to:
1058
+//
1059
+//		 <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
1060
+//
1061
+//	There's no arbitrary limit to the number of backticks you
1062
+//	can use as delimters. If you need three consecutive backticks
1063
+//	in your code, use four for delimiters, etc.
1064
+//
1065
+//  *  You can use spaces to get literal backticks at the edges:
1066
+//
1067
+//		 ... type `` `bar` `` ...
1068
+//
1069
+//	   Turns to:
1070
+//
1071
+//		 ... type <code>`bar`</code> ...
1072
+//
1073
+
1074
+	/*
1075
+		text = text.replace(/
1076
+			(^|[^\\])					// Character before opening ` can't be a backslash
1077
+			(`+)						// $2 = Opening run of `
1078
+			(							// $3 = The code block
1079
+				[^\r]*?
1080
+				[^`]					// attacklab: work around lack of lookbehind
1081
+			)
1082
+			\2							// Matching closer
1083
+			(?!`)
1084
+		/gm, function(){...});
1085
+	*/
1086
+
1087
+	text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
1088
+		function(wholeMatch,m1,m2,m3,m4) {
1089
+			var c = m3;
1090
+			c = c.replace(/^([ \t]*)/g,"");	// leading whitespace
1091
+			c = c.replace(/[ \t]*$/g,"");	// trailing whitespace
1092
+			c = _EncodeCode(c);
1093
+			return m1+"<code>"+c+"</code>";
1094
+		});
1095
+
1096
+	return text;
1097
+}
1098
+
1099
+var _EncodeCode = function(text) {
1100
+//
1101
+// Encode/escape certain characters inside Markdown code runs.
1102
+// The point is that in code, these characters are literals,
1103
+// and lose their special Markdown meanings.
1104
+//
1105
+	// Encode all ampersands; HTML entities are not
1106
+	// entities within a Markdown code span.
1107
+	text = text.replace(/&/g,"&amp;");
1108
+
1109
+	// Do the angle bracket song and dance:
1110
+	text = text.replace(/</g,"&lt;");
1111
+	text = text.replace(/>/g,"&gt;");
1112
+
1113
+	// Now, escape characters that are magic in Markdown:
1114
+	text = escapeCharacters(text,"\*_{}[]\\",false);
1115
+
1116
+// jj the line above breaks this:
1117
+//---
1118
+
1119
+//* Item
1120
+
1121
+//   1. Subitem
1122
+
1123
+//            special char: *
1124
+//---
1125
+
1126
+	return text;
1127
+}
1128
+
1129
+
1130
+var _DoItalicsAndBold = function(text) {
1131
+
1132
+	// <strong> must go first:
1133
+	text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,
1134
+		"<strong>$2</strong>");
1135
+
1136
+	text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,
1137
+		"<em>$2</em>");
1138
+
1139
+	return text;
1140
+}
1141
+
1142
+
1143
+var _DoBlockQuotes = function(text) {
1144
+
1145
+	/*
1146
+		text = text.replace(/
1147
+		(								// Wrap whole match in $1
1148
+			(
1149
+				^[ \t]*>[ \t]?			// '>' at the start of a line
1150
+				.+\n					// rest of the first line
1151
+				(.+\n)*					// subsequent consecutive lines
1152
+				\n*						// blanks
1153
+			)+
1154
+		)
1155
+		/gm, function(){...});
1156
+	*/
1157
+
1158
+	text = text.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,
1159
+		function(wholeMatch,m1) {
1160
+			var bq = m1;
1161
+
1162
+			// attacklab: hack around Konqueror 3.5.4 bug:
1163
+			// "----------bug".replace(/^-/g,"") == "bug"
1164
+
1165
+			bq = bq.replace(/^[ \t]*>[ \t]?/gm,"~0");	// trim one level of quoting
1166
+
1167
+			// attacklab: clean up hack
1168
+			bq = bq.replace(/~0/g,"");
1169
+
1170
+			bq = bq.replace(/^[ \t]+$/gm,"");		// trim whitespace-only lines
1171
+			bq = _RunBlockGamut(bq);				// recurse
1172
+
1173
+			bq = bq.replace(/(^|\n)/g,"$1  ");
1174
+			// These leading spaces screw with <pre> content, so we need to fix that:
1175
+			bq = bq.replace(
1176
+					/(\s*<pre>[^\r]+?<\/pre>)/gm,
1177
+				function(wholeMatch,m1) {
1178
+					var pre = m1;
1179
+					// attacklab: hack around Konqueror 3.5.4 bug:
1180
+					pre = pre.replace(/^  /mg,"~0");
1181
+					pre = pre.replace(/~0/g,"");
1182
+					return pre;
1183
+				});
1184
+
1185
+			return hashBlock("<blockquote>\n" + bq + "\n</blockquote>");
1186
+		});
1187
+	return text;
1188
+}
1189
+
1190
+
1191
+var _FormParagraphs = function(text) {
1192
+//
1193
+//  Params:
1194
+//    $text - string to process with html <p> tags
1195
+//
1196
+
1197
+	// Strip leading and trailing lines:
1198
+	text = text.replace(/^\n+/g,"");
1199
+	text = text.replace(/\n+$/g,"");
1200
+
1201
+	var grafs = text.split(/\n{2,}/g);
1202
+	var grafsOut = [];
1203
+
1204
+	//
1205
+	// Wrap <p> tags.
1206
+	//
1207
+	var end = grafs.length;
1208
+	for (var i=0; i<end; i++) {
1209
+		var str = grafs[i];
1210
+
1211
+		// if this is an HTML marker, copy it
1212
+		if (str.search(/~K(\d+)K/g) >= 0) {
1213
+			grafsOut.push(str);
1214
+		}
1215
+		else if (str.search(/\S/) >= 0) {
1216
+			str = _RunSpanGamut(str);
1217
+			str = str.replace(/^([ \t]*)/g,"<p>");
1218
+			str += "</p>"
1219
+			grafsOut.push(str);
1220
+		}
1221
+
1222
+	}
1223
+
1224
+	//
1225
+	// Unhashify HTML blocks
1226
+	//
1227
+	end = grafsOut.length;
1228
+	for (var i=0; i<end; i++) {
1229
+		// if this is a marker for an html block...
1230
+		while (grafsOut[i].search(/~K(\d+)K/) >= 0) {
1231
+			var blockText = g_html_blocks[RegExp.$1];
1232
+			blockText = blockText.replace(/\$/g,"$$$$"); // Escape any dollar signs
1233
+			grafsOut[i] = grafsOut[i].replace(/~K\d+K/,blockText);
1234
+		}
1235
+	}
1236
+
1237
+	return grafsOut.join("\n\n");
1238
+}
1239
+
1240
+
1241
+var _EncodeAmpsAndAngles = function(text) {
1242
+// Smart processing for ampersands and angle brackets that need to be encoded.
1243
+
1244
+	// Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
1245
+	//   http://bumppo.net/projects/amputator/
1246
+	text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;");
1247
+
1248
+	// Encode naked <'s
1249
+	text = text.replace(/<(?![a-z\/?\$!])/gi,"&lt;");
1250
+
1251
+	return text;
1252
+}
1253
+
1254
+
1255
+var _EncodeBackslashEscapes = function(text) {
1256
+//
1257
+//   Parameter:  String.
1258
+//   Returns:	The string, with after processing the following backslash
1259
+//			   escape sequences.
1260
+//
1261
+
1262
+	// attacklab: The polite way to do this is with the new
1263
+	// escapeCharacters() function:
1264
+	//
1265
+	// 	text = escapeCharacters(text,"\\",true);
1266
+	// 	text = escapeCharacters(text,"`*_{}[]()>#+-.!",true);
1267
+	//
1268
+	// ...but we're sidestepping its use of the (slow) RegExp constructor
1269
+	// as an optimization for Firefox.  This function gets called a LOT.
1270
+
1271
+	text = text.replace(/\\(\\)/g,escapeCharacters_callback);
1272
+	text = text.replace(/\\([`*_{}\[\]()>#+-.!])/g,escapeCharacters_callback);
1273
+	return text;
1274
+}
1275
+
1276
+
1277
+var _DoAutoLinks = function(text) {
1278
+
1279
+	text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");
1280
+
1281
+	// Email addresses: <address@domain.foo>
1282
+
1283
+	/*
1284
+		text = text.replace(/
1285
+			<
1286
+			(?:mailto:)?
1287
+			(
1288
+				[-.\w]+
1289
+				\@
1290
+				[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+
1291
+			)
1292
+			>
1293
+		/gi, _DoAutoLinks_callback());
1294
+	*/
1295
+	text = text.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,
1296
+		function(wholeMatch,m1) {
1297
+			return _EncodeEmailAddress( _UnescapeSpecialChars(m1) );
1298
+		}
1299
+	);
1300
+
1301
+	return text;
1302
+}
1303
+
1304
+
1305
+var _EncodeEmailAddress = function(addr) {
1306
+//
1307
+//  Input: an email address, e.g. "foo@example.com"
1308
+//
1309
+//  Output: the email address as a mailto link, with each character
1310
+//	of the address encoded as either a decimal or hex entity, in
1311
+//	the hopes of foiling most address harvesting spam bots. E.g.:
1312
+//
1313
+//	<a href="&#x6D;&#97;&#105;&#108;&#x74;&#111;:&#102;&#111;&#111;&#64;&#101;
1314
+//	   x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;">&#102;&#111;&#111;
1315
+//	   &#64;&#101;x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;</a>
1316
+//
1317
+//  Based on a filter by Matthew Wickline, posted to the BBEdit-Talk
1318
+//  mailing list: <http://tinyurl.com/yu7ue>
1319
+//
1320
+
1321
+	var encode = [
1322
+		function(ch){return "&#"+ch.charCodeAt(0)+";";},
1323
+		function(ch){return "&#x"+ch.charCodeAt(0).toString(16)+";";},
1324
+		function(ch){return ch;}
1325
+	];
1326
+
1327
+	addr = "mailto:" + addr;
1328
+
1329
+	addr = addr.replace(/./g, function(ch) {
1330
+		if (ch == "@") {
1331
+		   	// this *must* be encoded. I insist.
1332
+			ch = encode[Math.floor(Math.random()*2)](ch);
1333
+		} else if (ch !=":") {
1334
+			// leave ':' alone (to spot mailto: later)
1335
+			var r = Math.random();
1336
+			// roughly 10% raw, 45% hex, 45% dec
1337
+			ch =  (
1338
+					r > .9  ?	encode[2](ch)   :
1339
+					r > .45 ?	encode[1](ch)   :
1340
+								encode[0](ch)
1341
+				);
1342
+		}
1343
+		return ch;
1344
+	});
1345
+
1346
+	addr = "<a href=\"" + addr + "\">" + addr + "</a>";
1347
+	addr = addr.replace(/">.+:/g,"\">"); // strip the mailto: from the visible part
1348
+
1349
+	return addr;
1350
+}
1351
+
1352
+
1353
+var _UnescapeSpecialChars = function(text) {
1354
+//
1355
+// Swap back in all the special characters we've hidden.
1356
+//
1357
+	text = text.replace(/~E(\d+)E/g,
1358
+		function(wholeMatch,m1) {
1359
+			var charCodeToReplace = parseInt(m1);
1360
+			return String.fromCharCode(charCodeToReplace);
1361
+		}
1362
+	);
1363
+	return text;
1364
+}
1365
+
1366
+
1367
+var _Outdent = function(text) {
1368
+//
1369
+// Remove one level of line-leading tabs or spaces
1370
+//
1371
+
1372
+	// attacklab: hack around Konqueror 3.5.4 bug:
1373
+	// "----------bug".replace(/^-/g,"") == "bug"
1374
+
1375
+	text = text.replace(/^(\t|[ ]{1,4})/gm,"~0"); // attacklab: g_tab_width
1376
+
1377
+	// attacklab: clean up hack
1378
+	text = text.replace(/~0/g,"")
1379
+
1380
+	return text;
1381
+}
1382
+
1383
+var _Detab = function(text) {
1384
+// attacklab: Detab's completely rewritten for speed.
1385
+// In perl we could fix it by anchoring the regexp with \G.
1386
+// In javascript we're less fortunate.
1387
+
1388
+	// expand first n-1 tabs
1389
+	text = text.replace(/\t(?=\t)/g,"    "); // attacklab: g_tab_width
1390
+
1391
+	// replace the nth with two sentinels
1392
+	text = text.replace(/\t/g,"~A~B");
1393
+
1394
+	// use the sentinel to anchor our regex so it doesn't explode
1395
+	text = text.replace(/~B(.+?)~A/g,
1396
+		function(wholeMatch,m1,m2) {
1397
+			var leadingText = m1;
1398
+			var numSpaces = 4 - leadingText.length % 4;  // attacklab: g_tab_width
1399
+
1400
+			// there *must* be a better way to do this:
1401
+			for (var i=0; i<numSpaces; i++) leadingText+=" ";
1402
+
1403
+			return leadingText;
1404
+		}
1405
+	);
1406
+
1407
+	// clean up sentinels
1408
+	text = text.replace(/~A/g,"    ");  // attacklab: g_tab_width
1409
+	text = text.replace(/~B/g,"");
1410
+
1411
+	return text;
1412
+}
1413
+
1414
+
1415
+//
1416
+//  attacklab: Utility functions
1417
+//
1418
+
1419
+
1420
+var escapeCharacters = function(text, charsToEscape, afterBackslash) {
1421
+	// First we have to escape the escape characters so that
1422
+	// we can build a character class out of them
1423
+	var regexString = "([" + charsToEscape.replace(/([\[\]\\])/g,"\\$1") + "])";
1424
+
1425
+	if (afterBackslash) {
1426
+		regexString = "\\\\" + regexString;
1427
+	}
1428
+
1429
+	var regex = new RegExp(regexString,"g");
1430
+	text = text.replace(regex,escapeCharacters_callback);
1431
+
1432
+	return text;
1433
+}
1434
+
1435
+
1436
+var escapeCharacters_callback = function(wholeMatch,m1) {
1437
+	var charCodeToEscape = m1.charCodeAt(0);
1438
+	return "~E"+charCodeToEscape+"E";
1439
+}
1440
+
1441
+} // end of Showdown.converter
1442
+
1443
+
1444
+// export
1445
+if (typeof module !== 'undefined') module.exports = Showdown;
1446
+
1447
+// stolen from AMD branch of underscore
1448
+// AMD define happens at the end for compatibility with AMD loaders
1449
+// that don't enforce next-turn semantics on modules.
1450
+if (typeof define === 'function' && define.amd) {
1451
+    define('showdown', function() {
1452
+        return Showdown;
1453
+    });
1454
+}
0 1455
new file mode 100644
... ...
@@ -0,0 +1,106 @@
1
+/*global module:true*/
2
+/*
3
+ * Basic table support with re-entrant parsing, where cell content
4
+ * can also specify markdown.
5
+ *
6
+ * Tables
7
+ * ======
8
+ *
9
+ * | Col 1   | Col 2                                              |
10
+ * |======== |====================================================|
11
+ * |**bold** | ![Valid XHTML] (http://w3.org/Icons/valid-xhtml10) |
12
+ * | Plain   | Value                                              |
13
+ *
14
+ */
15
+
16
+(function(){
17
+  var table = function(converter) {
18
+    var tables = {}, style = 'text-align:left;', filter; 
19
+    tables.th = function(header){
20
+      if (header.trim() === "") { return "";}
21
+      var id = header.trim().replace(/ /g, '_').toLowerCase();
22
+      return '<th id="' + id + '" style="'+style+'">' + header + '</th>';
23
+    };
24
+    tables.td = function(cell) {
25
+      return '<td style="'+style+'">' + converter.makeHtml(cell) + '</td>';
26
+    };
27
+    tables.ths = function(){
28
+      var out = "", i = 0, hs = [].slice.apply(arguments);
29
+      for (i;i<hs.length;i+=1) {
30
+        out += tables.th(hs[i]) + '\n';
31
+      }
32
+      return out;
33
+    };
34
+    tables.tds = function(){
35
+      var out = "", i = 0, ds = [].slice.apply(arguments);
36
+      for (i;i<ds.length;i+=1) {
37
+        out += tables.td(ds[i]) + '\n';
38
+      }
39
+      return out;
40
+    };
41
+    tables.thead = function() {
42
+      var out, i = 0, hs = [].slice.apply(arguments);
43
+      out = "<thead>\n";
44
+      out += "<tr>\n";
45
+      out += tables.ths.apply(this, hs);
46
+      out += "</tr>\n";
47
+      out += "</thead>\n";
48
+      return out;
49
+    };
50
+    tables.tr = function() {
51
+      var out, i = 0, cs = [].slice.apply(arguments);
52
+      out = "<tr>\n";
53
+      out += tables.tds.apply(this, cs);
54
+      out += "</tr>\n";
55
+      return out;
56
+    };
57
+    filter = function(text) { 
58
+      var i=0, lines = text.split('\n'), tbl = [], line, hs, rows, out = [];
59
+      for (i; i<lines.length;i+=1) {
60
+        line = lines[i];
61
+        // looks like a table heading
62
+        if (line.trim().match(/^[|]{1}.*[|]{1}$/)) {
63
+          line = line.trim();
64
+          tbl.push('<table>');
65
+          hs = line.substring(1, line.length -1).split('|');
66
+          tbl.push(tables.thead.apply(this, hs));
67
+          line = lines[++i];
68
+          if (!line.trim().match(/^[|]{1}[-=| ]+[|]{1}$/)) {
69
+            // not a table rolling back
70
+            line = lines[--i];
71
+          }
72
+          else {
73
+            line = lines[++i];
74
+            tbl.push('<tbody>');
75
+            while (line.trim().match(/^[|]{1}.*[|]{1}$/)) {
76
+              line = line.trim();
77
+              tbl.push(tables.tr.apply(this, line.substring(1, line.length -1).split('|')));
78
+              line = lines[++i];
79
+            }
80
+            tbl.push('</tbody>');
81
+            tbl.push('</table>');
82
+            // we are done with this table and we move along
83
+            out.push(tbl.join('\n'));
84
+            tbl = [];
85
+            continue;
86
+          }
87
+        }
88
+        out.push(line);
89
+      }             
90
+      return out.join('\n');
91
+    };
92
+    return [
93
+    { 
94
+      type: 'lang', 
95
+      filter: filter
96
+    }
97
+    ];
98
+  };
99
+
100
+  // Client-side export
101
+  if (typeof window !== 'undefined' && window.Showdown && window.Showdown.extensions) { window.Showdown.extensions.table = table; }
102
+  // Server-side export
103
+  if (typeof module !== 'undefined') {
104
+    module.exports = table;
105
+  }
106
+}());
0 107
new file mode 100644
1 108
Binary files /dev/null and b/less/.files.less.swp differ
2 109
new file mode 100644
... ...
@@ -0,0 +1,33 @@
1
+// ACCORDION
2
+// ---------
3
+
4
+
5
+// Parent container
6
+.accordion {
7
+  margin-bottom: @baseLineHeight;
8
+}
9
+
10
+// Group == heading + body
11
+.accordion-group {
12
+  margin-bottom: 2pt;
13
+  border: 1pt solid #e5e5e5;
14
+  .border-radius(4pt);
15
+}
16
+.accordion-heading {
17
+  border-bottom: 0;
18
+}
19
+.accordion-heading .accordion-toggle {
20
+  display: block;
21
+  padding: 8pt 15pt;
22
+}
23
+
24
+// General toggle styles
25
+.accordion-toggle {
26
+  cursor: pointer;
27
+}
28
+
29
+// Inner needs the styles because you can't animate properly with any styles on the element
30
+.accordion-inner {
31
+  padding: 9pt 15pt;
32
+  border-top: 1pt solid #e5e5e5;
33
+}
0 34
new file mode 100644
... ...
@@ -0,0 +1,58 @@
1
+// ALERT STYLES
2
+// ------------
3
+
4
+// Base alert styles
5
+.alert {
6
+  padding: 8pt 35pt 8pt 14pt;
7
+  margin-bottom: @baseLineHeight;
8
+  text-shadow: 0 1pt 0 rgba(255,255,255,.5);
9
+  background-color: @warningBackground;
10
+  border: 1pt solid @warningBorder;
11
+  .border-radius(4pt);
12
+  color: @warningText;
13
+}
14
+.alert-heading {
15
+  color: inherit;
16
+}
17
+
18
+// Adjust close link position
19
+.alert .close {
20
+  position: relative;
21
+  top: -2pt;
22
+  right: -21pt;
23
+  line-height: 18pt;
24
+}
25
+
26
+// Alternate styles
27
+// ----------------
28
+
29
+.alert-success {
30
+  background-color: @successBackground;
31
+  border-color: @successBorder;  
32
+  color: @successText;
33
+}
34
+.alert-danger,
35
+.alert-error {
36
+  background-color: @errorBackground;
37
+  border-color: @errorBorder;
38
+  color: @errorText;
39
+}
40
+.alert-info {
41
+  background-color: @infoBackground;
42
+  border-color: @infoBorder;
43
+  color: @infoText;
44
+}
45
+
46
+// Block alerts
47
+// ------------------------
48
+.alert-block {
49
+  padding-top: 14pt;
50
+  padding-bottom: 14pt;
51
+}
52
+.alert-block > p,
53
+.alert-block > ul {
54
+  margin-bottom: 0;
55
+}
56
+.alert-block p + p {
57
+  margin-top: 5pt;
58
+}
0 59
new file mode 100644
... ...
@@ -0,0 +1,65 @@
1
+/*!
2
+ * Bootstrap v2.0.3
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+
11
+// CSS Reset
12
+@import "reset.less";
13
+
14
+// Core variables and mixins
15
+@import "variables.less"; // Modify this for custom colors, font-sizes, etc
16
+@import "mixins.less";
17
+
18
+// Grid system and page structure
19
+@import "scaffolding.less";
20
+@import "grid.less";
21
+@import "layouts.less";
22
+
23
+// Base CSS
24
+@import "type.less";
25
+@import "code.less";
26
+@import "forms.less";
27
+@import "tables.less";
28
+@import "files.less";
29
+@import "network.less";
30
+
31
+// Components: common
32
+@import "sprites.less";
33
+@import "dropdowns.less";
34
+@import "wells.less";
35
+@import "component-animations.less";
36
+@import "close.less";
37
+
38
+// Components: Buttons & Alerts
39
+@import "buttons.less";
40
+@import "button-groups.less";
41
+@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
42
+
43
+// Components: Nav
44
+@import "navs.less";
45
+@import "navbar.less";
46
+@import "breadcrumbs.less";
47
+@import "pagination.less";
48
+@import "pager.less";
49
+
50
+// Components: Popovers
51
+@import "modals.less";
52
+@import "tooltip.less";
53
+@import "popovers.less";
54
+
55
+// Components: Misc
56
+@import "thumbnails.less";
57
+@import "labels-badges.less";
58
+@import "progress-bars.less";
59
+@import "accordion.less";
60
+@import "carousel.less";
61
+@import "hero-unit.less";
62
+
63
+// Utility classes
64
+@import "utilities.less"; // Has to be last to override when necessary
65
+@import "codemirror.less";
0 66
new file mode 100644
... ...
@@ -0,0 +1,35 @@
1
+// BREADCRUMBS
2
+// -----------
3
+
4
+.breadcrumb {
5
+  padding: 7pt 14pt;
6
+  margin: 0 0 @baseLineHeight;
7
+  list-style: none;
8
+  #gradient > .vertical(black, @grayDarker);
9
+  border: 1pt solid darken(@grayDarker, 5%);
10
+  font-weight: 700;
11
+  .border-radius(3pt);
12
+  .box-shadow(inset 0 1pt 0 @grayDark);
13
+  li {
14
+    display: inline-block;
15
+    .ie7-inline-block();
16
+    text-shadow: 0 1pt 0 @black;
17
+  }
18
+  .divider {
19
+    padding: 0 5pt;
20
+    color: @grayLight;
21
+  }
22
+  .active a {
23
+    color: @grayDark;
24
+  }
25
+}
26
+
27
+.download-buttons {
28
+  padding: 0 8pt 0 0;
29
+  display: inline-block;
30
+}
31
+
32
+.rss-icon {
33
+  clear: both;
34
+  display: inline-table;
35
+}
0 36
new file mode 100644
... ...
@@ -0,0 +1,191 @@
1
+// BUTTON GROUPS
2
+// -------------
3
+
4
+
5
+// Make the div behave like a button
6
+.btn-group {
7
+  position: relative;
8
+  .clearfix(); // clears the floated buttons
9
+  .ie7-restore-left-whitespace();
10
+}
11
+
12
+// Space out series of button groups
13
+.btn-group + .btn-group {
14
+  margin-left: 5pt;
15
+}
16
+
17
+// Optional: Group multiple button groups together for a toolbar
18
+.btn-toolbar {
19
+  margin-top: @baseLineHeight / 2;
20
+  margin-bottom: @baseLineHeight / 2;
21
+  .btn-group {
22
+    display: inline-block;
23
+    .ie7-inline-block();
24
+  }
25
+}
26
+
27
+// Float them, remove border radius, then re-add to first and last elements
28
+.btn-group > .btn {
29
+  position: relative;
30
+  float: left;
31
+  margin-left: -1pt;
32
+  .border-radius(0);
33
+}
34
+// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
35
+.btn-group > .btn:first-child {
36
+  margin-left: 0;
37
+     -webkit-border-top-left-radius: 4pt;
38
+         -moz-border-radius-topleft: 4pt;
39
+             border-top-left-radius: 4pt;
40
+  -webkit-border-bottom-left-radius: 4pt;
41
+      -moz-border-radius-bottomleft: 4pt;
42
+          border-bottom-left-radius: 4pt;
43
+}
44
+// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
45
+.btn-group > .btn:last-child,
46
+.btn-group > .dropdown-toggle {
47
+     -webkit-border-top-right-radius: 4pt;
48
+         -moz-border-radius-topright: 4pt;
49
+             border-top-right-radius: 4pt;
50
+  -webkit-border-bottom-right-radius: 4pt;
51
+      -moz-border-radius-bottomright: 4pt;
52
+          border-bottom-right-radius: 4pt;
53
+}
54
+// Reset corners for large buttons
55
+.btn-group > .btn.large:first-child {
56
+  margin-left: 0;
57
+     -webkit-border-top-left-radius: 6pt;
58
+         -moz-border-radius-topleft: 6pt;
59
+             border-top-left-radius: 6pt;
60
+  -webkit-border-bottom-left-radius: 6pt;
61
+      -moz-border-radius-bottomleft: 6pt;
62
+          border-bottom-left-radius: 6pt;
63
+}
64
+.btn-group > .btn.large:last-child,
65
+.btn-group > .large.dropdown-toggle {
66
+     -webkit-border-top-right-radius: 6pt;
67
+         -moz-border-radius-topright: 6pt;
68
+             border-top-right-radius: 6pt;
69
+  -webkit-border-bottom-right-radius: 6pt;
70
+      -moz-border-radius-bottomright: 6pt;
71
+          border-bottom-right-radius: 6pt;
72
+}
73
+
74
+// On hover/focus/active, bring the proper btn to front
75
+.btn-group > .btn:hover,
76
+.btn-group > .btn:focus,
77
+.btn-group > .btn:active,
78
+.btn-group > .btn.active {
79
+  z-index: 2;
80
+}
81
+
82
+// On active and open, don't show outline
83
+.btn-group .dropdown-toggle:active,
84
+.btn-group.open .dropdown-toggle {
85
+  outline: 0;
86
+}
87
+
88
+
89
+
90
+// Split button dropdowns
91
+// ----------------------
92
+
93
+// Give the line between buttons some depth
94
+.btn-group > .dropdown-toggle {
95
+  padding-left: 8pt;
96
+  padding-right: 8pt;
97
+  .box-shadow(~"inset 1pt 0 0 rgba(255,255,255,.125), inset 0 1pt 0 rgba(255,255,255,.2), 0 1pt 2pt rgba(0,0,0,.05)");
98
+  *padding-top: 4pt;
99
+  *padding-bottom: 4pt;
100
+}
101
+.btn-group > .btn-mini.dropdown-toggle {
102
+  padding-left: 5pt;
103
+  padding-right: 5pt;
104
+}
105
+.btn-group > .btn-small.dropdown-toggle {
106
+  *padding-top: 4pt;
107
+  *padding-bottom: 4pt;
108
+}
109
+.btn-group > .btn-large.dropdown-toggle {
110
+  padding-left: 12pt;
111
+  padding-right: 12pt;
112
+}
113
+
114
+.btn-group.open {
115
+
116
+  // The clickable button for toggling the menu
117
+  // Remove the gradient and set the same inset shadow as the :active state
118
+  .dropdown-toggle {
119
+    background-image: none;
120
+    .box-shadow(~"inset 0 2pt 4pt rgba(0,0,0,.15), 0 1pt 2pt rgba(0,0,0,.05)");
121
+  }
122
+
123
+  // Keep the hover's background when dropdown is open
124
+  .btn.dropdown-toggle {
125
+    background-color: @btnBackgroundHighlight;
126
+  }
127
+  .btn-primary.dropdown-toggle {
128
+    background-color: @btnPrimaryBackgroundHighlight;
129
+  }
130
+  .btn-warning.dropdown-toggle {
131
+    background-color: @btnWarningBackgroundHighlight;
132
+  }
133
+  .btn-danger.dropdown-toggle {
134
+    background-color: @btnDangerBackgroundHighlight;
135
+  }
136
+  .btn-success.dropdown-toggle {
137
+    background-color: @btnSuccessBackgroundHighlight;
138
+  }
139
+  .btn-info.dropdown-toggle {
140
+    background-color: @btnInfoBackgroundHighlight;
141
+  }
142
+  .btn-inverse.dropdown-toggle {
143
+    background-color: @btnInverseBackgroundHighlight;
144
+  }
145
+}
146
+
147
+
148
+// Reposition the caret
149
+.btn .caret {
150
+  margin-top: 7pt;
151
+  margin-left: 0;
152
+}
153
+.btn:hover .caret,
154
+.open.btn-group .caret {
155
+  .opacity(100);
156
+}
157
+// Carets in other button sizes
158
+.btn-mini .caret {
159
+  margin-top: 5pt;
160
+}
161
+.btn-small .caret {
162
+  margin-top: 6pt;
163
+}
164
+.btn-large .caret {
165
+  margin-top: 6pt;
166
+  border-left-width:  5pt;
167
+  border-right-width: 5pt;
168
+  border-top-width:   5pt;
169
+}
170
+// Upside down carets for .dropup
171
+.dropup .btn-large .caret {
172
+  border-bottom: 5pt solid @black;
173
+  border-top: 0;
174
+}
175
+
176
+
177
+
178
+// Account for other colors
179
+.btn-primary,
180
+.btn-warning,
181
+.btn-danger,
182
+.btn-info,
183
+.btn-success,
184
+.btn-inverse {
185
+  .caret {
186
+    border-top-color: @white;
187
+    border-bottom-color: @white;
188
+    .opacity(75);
189
+  }
190
+}
191
+
0 192
new file mode 100644
... ...
@@ -0,0 +1,191 @@
1
+// BUTTON STYLES
2
+// -------------
3
+
4
+
5
+// Base styles
6
+// --------------------------------------------------
7
+
8
+// Core
9
+.btn {
10
+  display: inline-block;
11
+  .ie7-inline-block();
12
+  padding: 4pt 10pt 4pt;
13
+  margin-bottom: 0; // For input.btn
14
+  font-size: @baseFontSize;
15
+  line-height: @baseLineHeight;
16
+  *line-height: 20pt;
17
+  color: @grayLight;
18
+  text-align: center;
19
+  text-shadow: 0 1pt 1pt hsla(0,0%,0%, 0.75);
20
+  vertical-align: middle;
21
+  cursor: pointer;
22
+  .buttonBackground(@btnBackground, @btnBackgroundHighlight);
23
+  border: 1pt solid @btnBorder;
24
+  *border: 0; // Remove the border to prevent IE7's black border on input:focus
25
+  border-bottom-color: darken(@btnBorder, 10%);
26
+  .border-radius(4pt);
27
+  .ie7-restore-left-whitespace(); // Give IE7 some love
28
+  .box-shadow(~"inset 0 1pt 0 rgba(0,0,0,.2), 0 1pt 2pt rgba(255,255,255,.05)");
29
+}
30
+
31
+// Hover state
32
+.btn:hover {
33
+  color: @grayLighter;
34
+  text-decoration: none;
35
+  background-color: lighten(@black, 10%);
36
+  *background-color: lighten(@black, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
37
+  background-position: 0 -15pt;
38
+
39
+  // transition is only when going to hover, otherwise the background
40
+  // behind the gradient (there for IE<=9 fallback) gets mismatched
41
+  .transition(background-position .1s linear);
42
+}
43
+
44
+// Focus state for keyboard and accessibility
45
+.btn:focus {
46
+  .tab-focus();
47
+}
48
+
49
+// Active state
50
+.btn.active,
51
+.btn:active {
52
+  background-color: darken(@white, 10%);
53
+  background-color: darken(@white, 15%) e("\9");
54
+  background-image: none;
55
+  outline: 0;
56
+  .box-shadow(~"inset 0 2pt 4pt rgba(0,0,0,.15), 0 1pt 2pt rgba(0,0,0,.05)");
57
+}
58
+
59
+// Disabled state
60
+.btn.disabled,
61
+.btn[disabled] {
62
+  cursor: default;
63
+  background-color: darken(@white, 10%);
64
+  background-image: none;
65
+  .opacity(65);
66
+  .box-shadow(none);
67
+}
68
+
69
+
70
+// Button Sizes
71
+// --------------------------------------------------
72
+
73
+// Large
74
+.btn-large {
75
+  padding: 9pt 14pt;
76
+  font-size: @baseFontSize + 2pt;
77
+  line-height: normal;
78
+  .border-radius(5pt);
79
+}
80
+.btn-large [class^="icon-"] {
81
+  margin-top: 1pt;
82
+}
83
+
84
+// Small
85
+.btn-small {
86
+  padding: 5pt 9pt;
87
+  font-size: @baseFontSize - 2pt;
88
+  line-height: @baseLineHeight - 2pt;
89
+}
90
+.btn-small [class^="icon-"] {
91
+  margin-top: -1pt;
92
+}
93
+
94
+// Mini
95
+.btn-mini {
96
+  padding: 2pt 6pt;
97
+  font-size: @baseFontSize - 2pt;
98
+  line-height: @baseLineHeight - 4pt;
99
+}
100
+
101
+
102
+// Alternate buttons
103
+// --------------------------------------------------
104
+
105
+// Set text color
106
+// -------------------------
107
+.btn-primary,
108
+.btn-primary:hover,
109
+.btn-warning,
110
+.btn-warning:hover,
111
+.btn-danger,
112
+.btn-danger:hover,
113
+.btn-success,
114
+.btn-success:hover,
115
+.btn-info,
116
+.btn-info:hover,
117
+.btn-inverse,
118
+.btn-inverse:hover {
119
+  color: @white;
120
+  text-shadow: 0 -1pt 0 rgba(0,0,0,.25);
121
+}
122
+// Provide *some* extra contrast for those who can get it
123
+.btn-primary.active,
124
+.btn-warning.active,
125
+.btn-danger.active,
126
+.btn-success.active,
127
+.btn-info.active,
128
+.btn-inverse.active {
129
+  color: rgba(255,255,255,.75);
130
+}
131
+
132
+// Set the backgrounds
133
+// -------------------------
134
+.btn {
135
+  // reset here as of 2.0.3 due to Recess property order
136
+  border-color: #ccc;
137
+  border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
138
+}
139
+.btn-primary {
140
+  .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
141
+}
142
+// Warning appears are orange
143
+.btn-warning {
144
+  .buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight);
145
+}
146
+// Danger and error appear as red
147
+.btn-danger {
148
+  .buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
149
+}
150
+// Success appears as green
151
+.btn-success {
152
+  .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight);
153
+}
154
+// Info appears as a neutral blue
155
+.btn-info {
156
+  .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight);
157
+}
158
+// Inverse appears as dark gray
159
+.btn-inverse {
160
+  .buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight);
161
+}
162
+
163
+
164
+// Cross-browser Jank
165
+// --------------------------------------------------
166
+
167
+button.btn,
168
+input[type="submit"].btn {
169
+
170
+  // Firefox 3.6 only I believe
171
+  &::-moz-focus-inner {
172
+    padding: 0;
173
+    border: 0;
174
+  }
175
+
176
+  // IE7 has some default padding on button controls
177
+  *padding-top: 2pt;
178
+  *padding-bottom: 2pt;
179
+  &.btn-large {
180
+    *padding-top: 7pt;
181
+    *padding-bottom: 7pt;
182
+  }
183
+  &.btn-small {
184
+    *padding-top: 3pt;
185
+    *padding-bottom: 3pt;
186
+  }
187
+  &.btn-mini {
188
+    *padding-top: 1pt;
189
+    *padding-bottom: 1pt;
190
+  }
191
+}
0 192
new file mode 100644
... ...
@@ -0,0 +1,121 @@
1
+// CAROUSEL
2
+// --------
3
+
4
+.carousel {
5
+  position: relative;
6
+  margin-bottom: @baseLineHeight;
7
+  line-height: 1;
8
+}
9
+
10
+.carousel-inner {
11
+  overflow: hidden;
12
+  width: 100%;
13
+  position: relative;
14
+}
15
+
16
+.carousel {
17
+
18
+  .item {
19
+    display: none;
20
+    position: relative;
21
+    .transition(.6s ease-in-out left);
22
+  }
23
+
24
+  // Account for jankitude on images
25
+  .item > img {
26
+    display: block;
27
+    line-height: 1;
28
+  }
29
+
30
+  .active,
31
+  .next,
32
+  .prev { display: block; }
33
+
34
+  .active {
35
+    left: 0;
36
+  }
37
+
38
+  .next,
39
+  .prev {
40
+    position: absolute;
41
+    top: 0;
42
+    width: 100%;
43
+  }
44
+
45
+  .next {
46
+    left: 100%;
47
+  }
48
+  .prev {
49
+    left: -100%;
50
+  }
51
+  .next.left,
52
+  .prev.right {
53
+    left: 0;
54
+  }
55
+
56
+  .active.left {
57
+    left: -100%;
58
+  }
59
+  .active.right {
60
+    left: 100%;
61
+  }
62
+
63
+}
64
+
65
+// Left/right controls for nav
66
+// ---------------------------
67
+
68
+.carousel-control {
69
+  position: absolute;
70
+  top: 40%;
71
+  left: 15pt;
72
+  width: 40pt;
73
+  height: 40pt;
74
+  margin-top: -20pt;
75
+  font-size: 60pt;
76
+  font-weight: 100;
77
+  line-height: 30pt;
78
+  color: @white;
79
+  text-align: center;
80
+  background: @grayDarker;
81
+  border: 3pt solid @white;
82
+  .border-radius(23pt);
83
+  .opacity(50);
84
+
85
+  // we can't have this transition here
86
+  // because webkit cancels the carousel
87
+  // animation if you trip this while
88
+  // in the middle of another animation
89
+  // ;_;
90
+  // .transition(opacity .2s linear);
91
+
92
+  // Reposition the right one
93
+  &.right {
94
+    left: auto;
95
+    right: 15pt;
96
+  }
97
+
98
+  // Hover state
99
+  &:hover {
100
+    color: @white;
101
+    text-decoration: none;
102
+    .opacity(90);
103
+  }
104
+}
105
+
106
+// Caption for text below images
107
+// -----------------------------
108
+
109
+.carousel-caption {
110
+  position: absolute;
111
+  left: 0;
112
+  right: 0;
113
+  bottom: 0;
114
+  padding: 10pt 15pt 5pt;
115
+  background: @grayDark;
116
+  background: rgba(0,0,0,.75);
117
+}
118
+.carousel-caption h4,
119
+.carousel-caption p {
120
+  color: @white;
121
+}
0 122
new file mode 100644
... ...
@@ -0,0 +1,29 @@
1
+// CLOSE ICONS
2
+// -----------
3
+
4
+.close {
5
+  float: right;
6
+  font-size: 20pt;
7
+  font-weight: bold;
8
+  line-height: @baseLineHeight;
9
+  color: @black;
10
+  text-shadow: 0 1pt 0 rgba(255,255,255,1);
11
+  .opacity(20);
12
+  &:hover {
13
+    color: @black;
14
+    text-decoration: none;
15
+    cursor: pointer;
16
+    .opacity(40);
17
+  }
18
+}
19
+
20
+// Additional properties for button version
21
+// iOS requires the button element instead of an anchor tag.
22
+// If you want the anchor version, it requires `href="#"`.
23
+button.close {
24
+  padding: 0;
25
+  cursor: pointer;
26
+  background: transparent;
27
+  border: 0;
28
+  -webkit-appearance: none;
29
+}
0 30
\ No newline at end of file
1 31
new file mode 100644
... ...
@@ -0,0 +1,57 @@
1
+// Code.less
2
+// Code typography styles for the <code> and <pre> elements
3
+// --------------------------------------------------------
4
+
5
+// Inline and block code styles
6
+code,
7
+pre {
8
+  padding: 0 3pt 2pt;
9
+  #font > #family > .monospace;
10
+  font-size: @baseFontSize - 1;
11
+  color: @grayLight;
12
+  .border-radius(3pt);
13
+}
14
+
15
+// Inline code
16
+code {
17
+  padding: 2pt 4pt;
18
+  color: #d14;
19
+  background-color: #f7f7f9;
20
+  border: 1pt solid #e1e1e8;
21
+}
22
+
23
+// Blocks of code
24
+pre {
25
+  display: block;
26
+  padding: (@baseLineHeight - 1) / 2;
27
+  margin: 0 0 @baseLineHeight / 2;
28
+  font-size: @baseFontSize * .925; // 13pt to 12pt
29
+  line-height: @baseLineHeight;
30
+  word-break: break-all;
31
+  word-wrap: break-word;
32
+  white-space: pre;
33
+  white-space: pre-wrap;
34
+  background-color: lighten(@bodyBackground, 5%);
35
+  border: 1pt solid #ccc; // fallback for IE7-8
36
+  border: 1pt solid rgba(0,0,0,.15);
37
+  .border-radius(4pt);
38
+
39
+  // Make prettyprint styles more spaced out for readability
40
+  &.prettyprint {
41
+    margin-bottom: @baseLineHeight;
42
+  }
43
+
44
+  // Account for some code outputs that place code tags in pre tags
45
+  code {
46
+    padding: 0;
47
+    color: inherit;
48
+    background-color: transparent;
49
+    border: 0;
50
+  }
51
+}
52
+
53
+// Enable scrollable blocks of code
54
+.pre-scrollable {
55
+  max-height: 340pt;
56
+  overflow-y: scroll;
57
+}
0 58
new file mode 100644
... ...
@@ -0,0 +1,309 @@
1
+.CodeMirror {
2
+  line-height: 16pt;
3
+  font-family: @monoFontFamily;
4
+  font-size: 12pt;
5
+  /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
6
+  position: relative;
7
+  /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
8
+  overflow: hidden;
9
+}
10
+
11
+.CodeMirror-scroll {
12
+  overflow-x: auto;
13
+  overflow-y: hidden;
14
+  height: auto;
15
+  /* This is needed to prevent an IE[67] bug where the scrolled content
16
+     is visible outside of the scrolling box. */
17
+  position: relative;
18
+  outline: none;
19
+}
20
+
21
+/* Vertical scrollbar */
22
+.CodeMirror-scrollbar {
23
+  float: right;
24
+  overflow-x: hidden;
25
+  overflow-y: scroll;
26
+
27
+  /* This corrects for the 1pt gap introduced to the left of the scrollbar
28
+     by the rule for .CodeMirror-scrollbar-inner. */
29
+  margin-left: -1pt;
30
+}
31
+.CodeMirror-scrollbar-inner {
32
+  /* This needs to have a nonzero width in order for the scrollbar to appear
33
+     in Firefox and IE9. */
34
+  width: 1pt;
35
+}
36
+.CodeMirror-scrollbar.cm-sb-overlap {
37
+  /* Ensure that the scrollbar appears in Lion, and that it overlaps the content
38
+     rather than sitting to the right of it. */
39
+  position: absolute;
40
+  z-index: 1;
41
+  float: none;
42
+  right: 0;
43
+  min-width: 12pt;
44
+}
45
+.CodeMirror-scrollbar.cm-sb-nonoverlap {
46
+  min-width: 12pt;
47
+}
48
+.CodeMirror-scrollbar.cm-sb-ie7 {
49
+  min-width: 18pt;
50
+}
51
+
52
+.CodeMirror-gutter {
53
+  position: absolute; left: 0; top: 0;
54
+  z-index: 10;
55
+  background-color: lighten(@bodyBackground, 10%);
56
+  border-right: 1pt solid #eee;
57
+  min-width: 2em;
58
+  height: 100%;
59
+  padding-right:3pt;
60
+}
61
+.CodeMirror-gutter-text {
62
+  color: #aaa;
63
+  text-align: right;
64
+  padding: .4em .2em .4em .4em;
65
+  white-space: pre !important;
66
+}
67
+.CodeMirror-lines {
68
+  padding: .4em;
69
+  white-space: pre;
70
+  cursor: text;
71
+  margin-left:5pt;
72
+}
73
+.CodeMirror-lines * {
74
+  /* Necessary for throw-scrolling to decelerate properly on Safari. */
75
+  pointer-events: none;
76
+}
77
+
78
+.CodeMirror pre {
79
+  -moz-border-radius: 0;
80
+  -webkit-border-radius: 0;
81
+  -o-border-radius: 0;
82
+  border-radius: 0;
83
+  border-width: 0; margin: 0; padding: 0; background: transparent;
84
+  font-family: inherit;
85
+  font-size: inherit;
86
+  padding: 0; margin: 0;
87
+  white-space: pre;
88
+  word-wrap: normal;
89
+  line-height: inherit;
90
+  color: inherit;
91
+}
92
+
93
+.CodeMirror-wrap pre {
94
+  word-wrap: break-word;
95
+  white-space: pre-wrap;
96
+  word-break: normal;
97
+}
98
+.CodeMirror-wrap .CodeMirror-scroll {
99
+  overflow-x: hidden;
100
+}
101
+
102
+.CodeMirror textarea {
103
+  outline: none !important;
104
+}
105
+
106
+.CodeMirror pre.CodeMirror-cursor {
107
+  z-index: 10;
108
+  position: absolute;
109
+  visibility: hidden;
110
+  border-left: 1pt solid black;
111
+  border-right: none;
112
+  width: 0;
113
+}
114
+.cm-keymap-fat-cursor pre.CodeMirror-cursor {
115
+  width: auto;
116
+  border: 0;
117
+  background: transparent;
118
+  background: rgba(0, 200, 0, .4);
119
+}
120
+/* Kludge to turn off filter in ie9+, which also accepts rgba */
121
+.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
122
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
123
+}
124
+.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
125
+.CodeMirror-focused pre.CodeMirror-cursor {
126
+  visibility: visible;
127
+}
128
+
129
+div.CodeMirror-selected { background: #d9d9d9; }
130
+.CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
131
+
132
+.CodeMirror-searching {
133
+  background: #ffa;
134
+  background: rgba(255, 255, 0, .4);
135
+}
136
+
137
+/* Solarized dark theme */
138
+
139
+/*
140
+Solarized theme for code-mirror
141
+http://ethanschoonover.com/solarized
142
+*/
143
+
144
+/*
145
+Solarized color pallet
146
+http://ethanschoonover.com/solarized/img/solarized-palette.png
147
+*/
148
+
149
+.solarized.base03 { color: #002b36; }
150
+.solarized.base02 { color: #073642; }
151
+.solarized.base01 { color: #586e75; }
152
+.solarized.base00 { color: #657b83; }
153
+.solarized.base0 { color: #839496; }
154
+.solarized.base1 { color: #93a1a1; }
155
+.solarized.base2 { color: #eee8d5; }
156
+.solarized.base3  { color: #fdf6e3; }
157
+.solarized.solar-yellow  { color: #b58900; }
158
+.solarized.solar-orange  { color: #cb4b16; }
159
+.solarized.solar-red { color: #dc322f; }
160
+.solarized.solar-magenta { color: #d33682; }
161
+.solarized.solar-violet  { color: #6c71c4; }
162
+.solarized.solar-blue { color: #268bd2; }
163
+.solarized.solar-cyan { color: #2aa198; }
164
+.solarized.solar-green { color: #859900; }
165
+
166
+/* Color scheme for code-mirror */
167
+
168
+.cm-s-solarized {
169
+  line-height: 1.45em;
170
+  color-profile: sRGB;
171
+  rendering-intent: auto;
172
+}
173
+.cm-s-solarized.cm-s-dark {
174
+  color: #839496;
175
+  background-color:  #002b36;
176
+  text-shadow: #002b36 0 1px;
177
+}
178
+.cm-s-solarized.cm-s-light {
179
+  background-color: #fdf6e3;
180
+  color: #657b83;
181
+  text-shadow: #eee8d5 0 1px;
182
+}
183
+
184
+.cm-s-solarized .CodeMirror-widget {
185
+  text-shadow: none;
186
+}
187
+
188
+
189
+.cm-s-solarized .cm-keyword { color: #cb4b16 }
190
+.cm-s-solarized .cm-atom { color: #d33682; }
191
+.cm-s-solarized .cm-number { color: #d33682; }
192
+.cm-s-solarized .cm-def { color: #2aa198; }
193
+
194
+.cm-s-solarized .cm-variable { color: #268bd2; }
195
+.cm-s-solarized .cm-variable-2 { color: #b58900; }
196
+.cm-s-solarized .cm-variable-3 { color: #6c71c4; }
197
+
198
+.cm-s-solarized .cm-property { color: #2aa198; }
199
+.cm-s-solarized .cm-operator {color: #6c71c4;}
200
+
201
+.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; }
202
+
203
+.cm-s-solarized .cm-string { color: #859900; }
204
+.cm-s-solarized .cm-string-2 { color: #b58900; }
205
+
206
+.cm-s-solarized .cm-meta { color: #859900; }
207
+.cm-s-solarized .cm-qualifier { color: #b58900; }
208
+.cm-s-solarized .cm-builtin { color: #d33682; }
209
+.cm-s-solarized .cm-bracket { color: #cb4b16; }
210
+.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; }
211
+.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; }
212
+.cm-s-solarized .cm-tag { color: #93a1a1 }
213
+.cm-s-solarized .cm-attribute {  color: #2aa198; }
214
+.cm-s-solarized .cm-header { color: #586e75; }
215
+.cm-s-solarized .cm-quote { color: #93a1a1; }
216
+.cm-s-solarized .cm-hr {
217
+  color: transparent;
218
+  border-top: 1px solid #586e75;
219
+  display: block;
220
+}
221
+.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; }
222
+.cm-s-solarized .cm-special { color: #6c71c4; }
223
+.cm-s-solarized .cm-em {
224
+  color: #999;
225
+  text-decoration: underline;
226
+  text-decoration-style: dotted;
227
+}
228
+.cm-s-solarized .cm-strong { color: #eee; }
229
+.cm-s-solarized .cm-tab:before {
230
+  content: "➤";   /*visualize tab character*/
231
+  color: #586e75;
232
+  position:absolute;
233
+}
234
+.cm-s-solarized .cm-error,
235
+.cm-s-solarized .cm-invalidchar {
236
+  color: #586e75;
237
+  border-bottom: 1px dotted #dc322f;
238
+}
239
+
240
+.cm-s-solarized.cm-s-dark .CodeMirror-selected {
241
+  background: #073642;
242
+}
243
+
244
+.cm-s-solarized.cm-s-light .CodeMirror-selected {
245
+  background: #eee8d5;
246
+}
247
+
248
+/* Editor styling */
249
+
250
+
251
+
252
+/* Little shadow on the view-port of the buffer view */
253
+.cm-s-solarized.CodeMirror {
254
+  -moz-box-shadow: inset 7px 0 12px -6px #000;
255
+  -webkit-box-shadow: inset 7px 0 12px -6px #000;
256
+  box-shadow: inset 7px 0 12px -6px #000;
257
+}
258
+
259
+/* Gutter border and some shadow from it  */
260
+.cm-s-solarized .CodeMirror-gutters {
261
+  border-right: 1px solid;
262
+}
263
+
264
+/* Gutter colors and line number styling based of color scheme (dark / light) */
265
+
266
+/* Dark */
267
+.cm-s-solarized.cm-s-dark .CodeMirror-gutters {
268
+  background-color:  #002b36;
269
+  border-color: #00232c;
270
+}
271
+
272
+.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
273
+  text-shadow: #021014 0 -1px;
274
+}
275
+
276
+/* Light */
277
+.cm-s-solarized.cm-s-light .CodeMirror-gutters {
278
+  background-color: #fdf6e3;
279
+  border-color: #eee8d5;
280
+}
281
+
282
+/* Common */
283
+.cm-s-solarized .CodeMirror-linenumber {
284
+  color: #586e75;
285
+  padding: 0 5px;
286
+}
287
+.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }
288
+.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }
289
+.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }
290
+
291
+.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {
292
+  color: #586e75;
293
+}
294
+
295
+.cm-s-solarized .CodeMirror-lines .CodeMirror-cursor {
296
+  border-left: 1px solid #819090;
297
+}
298
+
299
+/*
300
+Active line. Negative margin compensates left padding of the text in the
301
+view-port
302
+*/
303
+.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
304
+  background: rgba(255, 255, 255, 0.10);
305
+}
306
+.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
307
+  background: rgba(0, 0, 0, 0.10);
308
+}
309
+
0 310
new file mode 100644
... ...
@@ -0,0 +1,20 @@
1
+// COMPONENT ANIMATIONS
2
+// --------------------
3
+
4
+.fade {
5
+  .opacity(0);
6
+  .transition(opacity .15s linear);
7
+  &.in {
8
+    .opacity(100);
9
+  }
10
+}
11
+
12
+.collapse {
13
+  position: relative;
14
+  height: 0;
15
+  overflow: hidden;
16
+  .transition(height .35s ease);
17
+  &.in {
18
+    height: auto;
19
+  }
20
+}
0 21
\ No newline at end of file
1 22
new file mode 100644
... ...
@@ -0,0 +1,154 @@
1
+// DROPDOWN MENUS
2
+// --------------
3
+
4
+// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
5
+.dropup,
6
+.dropdown {
7
+  position: relative;
8
+}
9
+.dropdown-toggle {
10
+  // The caret makes the toggle a bit too tall in IE7
11
+  *margin-bottom: -3pt;
12
+}
13
+.dropdown-toggle:active,
14
+.open .dropdown-toggle {
15
+  outline: 0;
16
+}
17
+
18
+// Dropdown arrow/caret
19
+// --------------------
20
+.caret {
21
+  display: inline-block;
22
+  width: 0;
23
+  height: 0;
24
+  vertical-align: top;
25
+  border-top:   4pt solid @black;
26
+  border-right: 4pt solid transparent;
27
+  border-left:  4pt solid transparent;
28
+  content: "";
29
+  .opacity(30);
30
+}
31
+
32
+// Place the caret
33
+.dropdown .caret {
34
+  margin-top: 8pt;
35
+  margin-left: 2pt;
36
+}
37
+.dropdown:hover .caret,
38
+.open .caret {
39
+  .opacity(100);
40
+}
41
+
42
+// The dropdown menu (ul)
43
+// ----------------------
44
+.dropdown-menu {
45
+  position: absolute;
46
+  top: 100%;
47
+  left: 0;
48
+  z-index: @zindexDropdown;
49
+  display: none; // none by default, but block on "open" of the menu
50
+  float: left;
51
+  min-width: 160pt;
52
+  padding: 4pt 0;
53
+  margin: 1pt 0 0; // override default ul
54
+  list-style: none;
55
+  background-color: @dropdownBackground;
56
+  border: 1pt solid #ccc;
57
+  border: 1pt solid rgba(0,0,0,.2);
58
+  *border-right-width: 2pt;
59
+  *border-bottom-width: 2pt;
60
+  .border-radius(5pt);
61
+  .box-shadow(0 5pt 10pt rgba(0,0,0,.2));
62
+  -webkit-background-clip: padding-box;
63
+     -moz-background-clip: padding;
64
+          background-clip: padding-box;
65
+
66
+  // Aligns the dropdown menu to right
67
+  &.pull-right {
68
+    right: 0;
69
+    left: auto;
70
+  }
71
+
72
+  // Dividers (basically an hr) within the dropdown
73
+  .divider {
74
+    .nav-divider();
75
+  }
76
+
77
+  // Links within the dropdown menu
78
+  a {
79
+    display: block;
80
+    padding: 3pt 15pt;
81
+    clear: both;
82
+    font-weight: normal;
83
+    line-height: @baseLineHeight;
84
+    color: @dropdownLinkColor;
85
+    white-space: nowrap;
86
+  }
87
+
88
+  .dropdown-header {
89
+      display: block;
90
+      padding: 3pt 15pt;
91
+      font-size: 11pt;
92
+      font-weight: bold;
93
+      line-height: @baseLineHeight;
94
+      color: @grayLight;
95
+      text-shadow: 0 1pt 0 rgba(255,255,255,.5);
96
+      text-transform: uppercase;
97
+    }
98
+}
99
+
100
+// Hover state
101
+// -----------
102
+.dropdown-menu li > a:hover,
103
+.dropdown-menu .active > a,
104
+.dropdown-menu .active > a:hover {
105
+  color: @dropdownLinkColorHover;
106
+  text-decoration: none;
107
+  background-color: @dropdownLinkBackgroundHover;
108
+}
109
+
110
+// Open state for the dropdown
111
+// ---------------------------
112
+.open {
113
+  // IE7's z-index only goes to the nearest positioned ancestor, which would
114
+  // make the menu appear below buttons that appeared later on the page
115
+  *z-index: @zindexDropdown;
116
+
117
+  .dropdown-menu {
118
+    display: block;
119
+  }
120
+}
121
+
122
+// Right aligned dropdowns
123
+// ---------------------------
124
+.pull-right .dropdown-menu {
125
+  right: 0;
126
+  left: auto;
127
+}
128
+
129
+// Allow for dropdowns to go bottom up (aka, dropup-menu)
130
+// ------------------------------------------------------
131
+// Just add .dropup after the standard .dropdown class and you're set, bro.
132
+// TODO: abstract this so that the navbar fixed styles are not placed here?
133
+.dropup,
134
+.navbar-fixed-bottom .dropdown {
135
+  // Reverse the caret
136
+  .caret {
137
+    border-top: 0;
138
+    border-bottom: 4pt solid @black;
139
+    content: "\2191";
140
+  }
141
+  // Different positioning for bottom up menu
142
+  .dropdown-menu {
143
+    top: auto;
144
+    bottom: 100%;
145
+    margin-bottom: 1pt;
146
+  }
147
+}
148
+
149
+// Typeahead
150
+// ---------
151
+.typeahead {
152
+  margin-top: 2pt; // give it some space to breathe
153
+  .border-radius(4pt);
154
+}
0 155
new file mode 100644
... ...
@@ -0,0 +1,216 @@
1
+.source-view {
2
+  width: 100%;
3
+  margin-bottom: @baseLineHeight;
4
+  border: 1pt solid @treeHeaderBorder;
5
+
6
+  .source-header {
7
+    padding: 8pt;
8
+    line-height: @baseLineHeight;
9
+    text-align: left;
10
+    vertical-align: bottom;
11
+    #gradient > .vertical(@treeHeaderHighlight, @treeHeader);
12
+    border-bottom: 1pt solid lighten(@treeHeaderBorder, 5%);
13
+    font-weight: bold;
14
+    color: @white;
15
+    text-shadow: 1pt 1pt 1pt hsla(0,0%,0%,1);
16
+    height:28pt;
17
+    .meta {
18
+      float: left;
19
+      padding: 4pt 0;
20
+      font-size: 14pt;
21
+    }
22
+  }
23
+  pre {
24
+    margin: 0;
25
+    padding: 12pt;
26
+    border: none;
27
+  }
28
+  #sourcecode {
29
+    margin: 0;
30
+    padding: 0;
31
+    border: none;
32
+    width:100%;
33
+    height:600pt;
34
+  }
35
+  .source-diff {
36
+    background-color: lighten(@bodyBackground, 10%);
37
+    pre {
38
+      margin: 0;
39
+      padding: 0 0 0 6pt;
40
+      border: none;
41
+      .border-radius(0);
42
+
43
+      &:hover {
44
+        background-color: lighten(@bodyBackground, 10%);
45
+      }
46
+    }
47
+    table td {
48
+      padding: 0pt;
49
+    }
50
+    .new {
51
+      background-color: hsl(127, 50%, 10%);
52
+    }
53
+    .old {
54
+      background-color: hsl(0, 50%, 10%);
55
+    }
56
+    .chunk {
57
+      background-color:lighten(@bodyBackground, 5%);
58
+      color:@grayLighter;
59
+    }
60
+    .lineNo {
61
+      color: #aaa;
62
+      background-color: lighten(@bodyBackground, 15%);
63
+      padding: 0 6pt;
64
+      text-align: right;
65
+      border-right: 1pt solid #ddd;
66
+      font-family: monospace;
67
+    }
68
+  }
69
+  .image-blob {
70
+    padding:10pt;
71
+    max-width: 600pt;
72
+  }
73
+}
74
+
75
+.blame-view {
76
+  width: 100%;
77
+  background-color: lighten(@bodyBackground, 10%);
78
+  td {
79
+  vertical-align:top;
80
+  padding:8pt;
81
+  }
82
+  tr {
83
+  border-bottom:1pt solid lighten(@grayLight, 20%);
84
+  }
85
+  tr:last-child {border-bottom:0}
86
+  .line {
87
+  font-weight:700;
88
+  border-right:1pt solid lighten(@grayLight, 20%);
89
+  }
90
+  .commit {
91
+  font-weight:700;
92
+  border-right:1pt solid lighten(@grayLight, 20%);
93
+  }
94
+  pre {
95
+    margin:0;
96
+    padding:0;
97
+    border:none;
98
+    .border-radius(0);
99
+  }
100
+}
101
+
102
+.commit-view {
103
+  width: 100%;
104
+  margin-bottom: @baseLineHeight;
105
+  border: 1pt solid @treeHeaderBorder;
106
+  .border-radius(4pt);
107
+  .commit-header {
108
+    padding: 8pt;
109
+    line-height: @baseLineHeight;
110
+    text-align: left;
111
+    vertical-align: bottom;
112
+    #gradient > .vertical(@treeHeaderHighlight, @treeHeader);
113
+    border-bottom: 1pt solid lighten(@treeHeaderBorder, 5%);
114
+    font-weight: bold;
115
+    text-shadow: 1pt 1pt 1pt hsla(0,0%,0%,1);
116
+    h4 {
117
+    padding: 4pt 0;
118
+    }
119
+  }
120
+  .commit-body {
121
+    padding: 8pt;
122
+  }
123
+}
124
+
125
+.commit-list {
126
+  list-style-type:none;
127
+  li {
128
+    padding:8pt 5pt 8pt 5pt;
129
+    font-size:14pt;
130
+    font-weight: 700;
131
+    border-bottom: 1pt solid lighten(@treeHeaderBorder, 5%);
132
+    overflow: hidden;
133
+    .meta {
134
+      font-weight: normal;
135
+      font-size: 14pt;
136
+      color: @grayLight;
137
+    }
138
+  }
139
+  li:last-child {border-bottom:0;margin-bottom:25pt;}
140
+}
141
+
142
+.repository {
143
+  margin-bottom: @baseLineHeight;
144
+  /*border: 1pt solid lighten(@treeHeaderBorder, 5%);*/
145
+  /*.border-radius(4pt);*/
146
+
147
+  .ltr-border {
148
+     border-left: 2pt solid lighten(@treeHeaderBorder, 5%);
149
+     border-top: 2pt solid lighten(@treeHeaderBorder, 5%);
150
+     border-right: 2pt solid lighten(@treeHeaderBorder, 5%);
151
+     border-bottom: none;
152
+     background: @bodyBackground;
153
+     position: relative;
154
+     top: 2pt;
155
+     padding-top: 8pt;
156
+     padding-right: 12pt;
157
+     padding-bottom: 5.75pt;
158
+     padding-left: 4pt;
159
+     margin-left: -4pt;
160
+     margin-bottom: -6pt;
161
+     z-index: 999;
162
+  }
163
+
164
+  .repository-header {
165
+    border-bottom: 2pt solid lighten(@treeHeaderBorder, 5%);
166
+    text-shadow: 1pt 1pt 1pt hsl(0,0%,23%,1);
167
+    padding: 4pt;
168
+    font-weight: 700;
169
+    font-size:12pt;
170
+  }
171
+
172
+  .repository-body {
173
+    font-size: 10pt;
174
+    font-weight: 300;
175
+    padding: 4pt;
176
+    padding-left: 16pt;
177
+    border: 2pt solid lighten(@treeHeaderBorder, 5%);
178
+    border-top: none;
179
+    p {
180
+      font-size: 10pt;
181
+      margin: 0;
182
+    }
183
+  }
184
+}
185
+
186
+.readme-view {
187
+  border: 1pt solid @treeHeaderBorder;
188
+}
189
+
190
+.md-view {
191
+  width: 100%;
192
+  margin-bottom: @baseLineHeight;
193
+}
194
+
195
+.md-header {
196
+  padding: 8pt;
197
+  line-height: @baseLineHeight;
198
+  text-align: left;
199
+  vertical-align: bottom;
200
+  #gradient > .vertical(@treeHeaderHighlight, @treeHeader);
201
+  border-bottom: 1pt solid lighten(@treeHeaderBorder, 5%);
202
+  font-weight: bold;
203
+  color: @white;
204
+  text-shadow: 1pt 1pt 1pt hsla(0,0%,0%,1);
205
+  height:28pt;
206
+  .meta {
207
+    float: left;
208
+    padding: 4pt 0;
209
+    font-size: 14pt;
210
+  }
211
+}
212
+
213
+#md-content {
214
+  padding: 30pt;
215
+  color: @black;
216
+}
0 217
new file mode 100644
... ...
@@ -0,0 +1,587 @@
1
+// Forms.less
2
+// Base styles for various input types, form layouts, and states
3
+// -------------------------------------------------------------
4
+
5
+
6
+// GENERAL STYLES
7
+// --------------
8
+
9
+// Make all forms have space below them
10
+form {
11
+  margin: 0 0 @baseLineHeight;
12
+}
13
+
14
+fieldset {
15
+  padding: 0;
16
+  margin: 0;
17
+  border: 0;
18
+}
19
+
20
+// Groups of fields with labels on top (legends)
21
+legend {
22
+  display: block;
23
+  width: 100%;
24
+  padding: 0;
25
+  margin-bottom: @baseLineHeight * 1.5;
26
+  font-size: @baseFontSize * 1.5;
27
+  line-height: @baseLineHeight * 2;
28
+  color: @grayDark;
29
+  border: 0;
30
+  border-bottom: 1pt solid #eee;
31
+
32
+  // Small
33
+  small {
34
+    font-size: @baseLineHeight * .75;
35
+    color: @grayLight;
36
+  }
37
+}
38
+
39
+// Set font for forms
40
+label,
41
+input,
42
+button,
43
+select,
44
+textarea {
45
+  #font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
46
+}
47
+input,
48
+button,
49
+select,
50
+textarea {
51
+  font-family: @baseFontFamily; // And only set font-family here for those that need it (note the missing label element)
52
+}
53
+
54
+// Identify controls by their labels
55
+label {
56
+  display: block;
57
+  margin-bottom: 5pt;
58
+  color: @grayDark;
59
+}
60
+
61
+// Inputs, Textareas, Selects
62
+input,
63
+textarea,
64
+select,
65
+.uneditable-input {
66
+  display: inline-block;
67
+  width: 210pt;
68
+  height: @baseLineHeight;
69
+  padding: 4pt;
70
+  margin-bottom: 9pt;
71
+  font-size: @baseFontSize;
72
+  line-height: @baseLineHeight;
73
+  color: @gray;
74
+  background-color: @inputBackground;
75
+  border: 1pt solid @inputBorder;
76
+  .border-radius(@inputBorderRadius);
77
+}
78
+.uneditable-textarea {
79
+  width: auto;
80
+  height: auto;
81
+}
82
+
83
+// Inputs within a label
84
+label input,
85
+label textarea,
86
+label select {
87
+  display: block;
88
+}
89
+
90
+// Mini reset for unique input types
91
+input[type="image"],
92
+input[type="checkbox"],
93
+input[type="radio"] {
94
+  width: auto;
95
+  height: auto;
96
+  padding: 0;
97
+  margin: 3pt 0;
98
+  *margin-top: 0; /* IE7 */
99
+  line-height: normal;
100
+  cursor: pointer;
101
+  background-color: transparent;
102
+  border: 0 \9; /* IE9 and down */
103
+  .border-radius(0);
104
+}
105
+input[type="image"] {
106
+  border: 0;
107
+}
108
+
109
+// Reset the file input to browser defaults
110
+input[type="file"] {
111
+  width: auto;
112
+  padding: initial;
113
+  line-height: initial;
114
+  background-color: @inputBackground;
115
+  background-color: initial;
116
+  border: initial;
117
+  .box-shadow(none);
118
+}
119
+
120
+// Help out input buttons
121
+input[type="button"],
122
+input[type="reset"],
123
+input[type="submit"] {
124
+  width: auto;
125
+  height: auto;
126
+}
127
+
128
+// Set the height of select and file controls to match text inputs
129
+select,
130
+input[type="file"] {
131
+  height: 28pt; /* In IE7, the height of the select element cannot be changed by height, only font-size */
132
+  *margin-top: 4pt; /* For IE7, add top margin to align select with labels */
133
+  line-height: 28pt;
134
+}
135
+
136
+// Reset line-height for IE
137
+input[type="file"] {
138
+  line-height: 18pt \9;
139
+}
140
+
141
+// Chrome on Linux and Mobile Safari need background-color
142
+select {
143
+  width: 220pt; // default input width + 10pt of padding that doesn't get applied
144
+  background-color: @inputBackground;
145
+}
146
+
147
+// Make multiple select elements height not fixed
148
+select[multiple],
149
+select[size] {
150
+  height: auto;
151
+}
152
+
153
+// Remove shadow from image inputs
154
+input[type="image"] {
155
+  .box-shadow(none);
156
+}
157
+
158
+// Make textarea height behave
159
+textarea {
160
+  height: auto;
161
+}
162
+
163
+// Hidden inputs
164
+input[type="hidden"] {
165
+  display: none;
166
+}
167
+
168
+
169
+
170
+// CHECKBOXES & RADIOS
171
+// -------------------
172
+
173
+// Indent the labels to position radios/checkboxes as hanging
174
+.radio,
175
+.checkbox {
176
+  min-height: 18pt; // clear the floating input if there is no label text
177
+  padding-left: 18pt;
178
+}
179
+.radio input[type="radio"],
180
+.checkbox input[type="checkbox"] {
181
+  float: left;
182
+  margin-left: -18pt;
183
+}
184
+
185
+// Move the options list down to align with labels
186
+.controls > .radio:first-child,
187
+.controls > .checkbox:first-child {
188
+  padding-top: 5pt; // has to be padding because margin collaspes
189
+}
190
+
191
+// Radios and checkboxes on same line
192
+// TODO v3: Convert .inline to .control-inline
193
+.radio.inline,
194
+.checkbox.inline {
195
+  display: inline-block;
196
+  padding-top: 5pt;
197
+  margin-bottom: 0;
198
+  vertical-align: middle;
199
+}
200
+.radio.inline + .radio.inline,
201
+.checkbox.inline + .checkbox.inline {
202
+  margin-left: 10pt; // space out consecutive inline controls
203
+}
204
+
205
+
206
+
207
+// FOCUS STATE
208
+// -----------
209
+
210
+input,
211
+textarea {
212
+  .box-shadow(inset 0 1pt 1pt rgba(0,0,0,.075));
213
+  @transition: border linear .2s, box-shadow linear .2s;
214
+  .transition(@transition);
215
+}
216
+input:focus,
217
+textarea:focus {
218
+  border-color: rgba(82,168,236,.8);
219
+  outline: 0;
220
+  outline: thin dotted \9; /* IE6-9 */
221
+  .box-shadow(~"inset 0 1pt 1pt rgba(0,0,0,.075), 0 0 8pt rgba(82,168,236,.6)");
222
+}
223
+input[type="file"]:focus,
224
+input[type="radio"]:focus,
225
+input[type="checkbox"]:focus,
226
+select:focus {
227
+  .tab-focus();
228
+  .box-shadow(none); // override for file inputs
229
+}
230
+
231
+
232
+
233
+// INPUT SIZES
234
+// -----------
235
+
236
+// General classes for quick sizes
237
+.input-mini       { width: 60pt; }
238
+.input-small      { width: 90pt; }
239
+.input-medium     { width: 150pt; }
240
+.input-large      { width: 210pt; }
241
+.input-xlarge     { width: 270pt; }
242
+.input-xxlarge    { width: 530pt; }
243
+
244
+// Grid style input sizes
245
+input[class*="span"],
246
+select[class*="span"],
247
+textarea[class*="span"],
248
+.uneditable-input[class*="span"],
249
+// Redeclare since the fluid row class is more specific
250
+.row-fluid input[class*="span"],
251
+.row-fluid select[class*="span"],
252
+.row-fluid textarea[class*="span"],
253
+.row-fluid .uneditable-input[class*="span"] {
254
+  float: none;
255
+  margin-left: 0;
256
+}
257
+
258
+
259
+
260
+// GRID SIZING FOR INPUTS
261
+// ----------------------
262
+
263
+#grid > .input (@gridColumnWidth, @gridGutterWidth);
264
+
265
+
266
+
267
+
268
+// DISABLED STATE
269
+// --------------
270
+
271
+// Disabled and read-only inputs
272
+input[disabled],
273
+select[disabled],
274
+textarea[disabled],
275
+input[readonly],
276
+select[readonly],
277
+textarea[readonly] {
278
+  cursor: not-allowed;
279
+  background-color: @inputDisabledBackground;
280
+  border-color: #ddd;
281
+}
282
+// Explicitly reset the colors here
283
+input[type="radio"][disabled],
284
+input[type="checkbox"][disabled],
285
+input[type="radio"][readonly],
286
+input[type="checkbox"][readonly] {
287
+  background-color: transparent;
288
+}
289
+
290
+
291
+
292
+
293
+// FORM FIELD FEEDBACK STATES
294
+// --------------------------
295
+
296
+// Warning
297
+.control-group.warning {
298
+  .formFieldState(@warningText, @warningText, @warningBackground);
299
+}
300
+// Error
301
+.control-group.error {
302
+  .formFieldState(@errorText, @errorText, @errorBackground);
303
+}
304
+// Success
305
+.control-group.success {
306
+  .formFieldState(@successText, @successText, @successBackground);
307
+}
308
+
309
+// HTML5 invalid states
310
+// Shares styles with the .control-group.error above
311
+input:focus:required:invalid,
312
+textarea:focus:required:invalid,
313
+select:focus:required:invalid {
314
+  color: #b94a48;
315
+  border-color: #ee5f5b;
316
+  &:focus {
317
+    border-color: darken(#ee5f5b, 10%);
318
+    .box-shadow(0 0 6pt lighten(#ee5f5b, 20%));
319
+  }
320
+}
321
+
322
+
323
+
324
+// FORM ACTIONS
325
+// ------------
326
+
327
+.form-actions {
328
+  padding: (@baseLineHeight - 1) 20pt @baseLineHeight;
329
+  margin-top: @baseLineHeight;
330
+  margin-bottom: @baseLineHeight;
331
+  background-color: @formActionsBackground;
332
+  border-top: 1pt solid #ddd;
333
+  .clearfix(); // Adding clearfix to allow for .pull-right button containers
334
+}
335
+
336
+// For text that needs to appear as an input but should not be an input
337
+.uneditable-input {
338
+  overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
339
+  white-space: nowrap;
340
+  cursor: not-allowed;
341
+  background-color: @inputBackground;
342
+  border-color: #eee;
343
+  .box-shadow(inset 0 1pt 2pt rgba(0,0,0,.025));
344
+}
345
+
346
+// Placeholder text gets special styles; can't be bundled together though for some reason
347
+.placeholder(@grayLight);
348
+
349
+
350
+
351
+// HELP TEXT
352
+// ---------
353
+
354
+.help-block,
355
+.help-inline {
356
+  color: @gray; // lighten the text some for contrast
357
+}
358
+
359
+.help-block {
360
+  display: block; // account for any element using help-block
361
+  margin-bottom: @baseLineHeight / 2;
362
+}
363
+
364
+.help-inline {
365
+  display: inline-block;
366
+  .ie7-inline-block();
367
+  vertical-align: middle;
368
+  padding-left: 5pt;
369
+}
370
+
371
+
372
+
373
+// INPUT GROUPS
374
+// ------------
375
+
376
+// Allow us to put symbols and text within the input field for a cleaner look
377
+.input-prepend,
378
+.input-append {
379
+  margin-bottom: 5pt;
380
+  input,
381
+  select,
382
+  .uneditable-input {
383
+    position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
384
+    margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
385
+    *margin-left: 0;
386
+    vertical-align: middle;
387
+    .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
388
+    // Make input on top when focused so blue border and shadow always show
389
+    &:focus {
390
+      z-index: 2;
391
+    }
392
+  }
393
+  .uneditable-input {
394
+    border-left-color: #ccc;
395
+  }
396
+  .add-on {
397
+    display: inline-block;
398
+    width: auto;
399
+    height: @baseLineHeight;
400
+    min-width: 16pt;
401
+    padding: 4pt 5pt;
402
+    font-weight: normal;
403
+    line-height: @baseLineHeight;
404
+    text-align: center;
405
+    text-shadow: 0 1pt 0 @white;
406
+    vertical-align: middle;
407
+    background-color: @grayLighter;
408
+    border: 1pt solid #ccc;
409
+  }
410
+  .add-on,
411
+  .btn {
412
+    margin-left: -1pt;
413
+    .border-radius(0);
414
+  }
415
+  .active {
416
+    background-color: lighten(@green, 30);
417
+    border-color: @green;
418
+  }
419
+}
420
+.input-prepend {
421
+  .add-on,
422
+  .btn {
423
+    margin-right: -1pt;
424
+  }
425
+  .add-on:first-child,
426
+  .btn:first-child {
427
+    .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
428
+  }
429
+}
430
+.input-append {
431
+  input,
432
+  select,
433
+  .uneditable-input {
434
+    .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
435
+  }
436
+  .uneditable-input {
437
+    border-right-color: #ccc;
438
+    border-left-color: #eee;
439
+  }
440
+  .add-on:last-child,
441
+  .btn:last-child {
442
+    .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
443
+  }
444
+}
445
+// Remove all border-radius for inputs with both prepend and append
446
+.input-prepend.input-append {
447
+  input,
448
+  select,
449
+  .uneditable-input {
450
+    .border-radius(0);
451
+  }
452
+  .add-on:first-child,
453
+  .btn:first-child {
454
+    margin-right: -1pt;
455
+    .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
456
+  }
457
+  .add-on:last-child,
458
+  .btn:last-child {
459
+    margin-left: -1pt;
460
+    .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
461
+  }
462
+}
463
+
464
+
465
+
466
+// SEARCH FORM
467
+// -----------
468
+
469
+.form-search {
470
+  margin: 3pt 0 0 0;
471
+  padding: 0;
472
+}
473
+
474
+.search-query {
475
+  padding: 3pt;
476
+  margin-bottom: 0; // remove the default margin on all inputs
477
+  .border-radius(4pt);
478
+  font-size: 11pt;
479
+}
480
+
481
+
482
+
483
+// HORIZONTAL & VERTICAL FORMS
484
+// ---------------------------
485
+
486
+// Common properties
487
+// -----------------
488
+
489
+.form-search,
490
+.form-inline,
491
+.form-horizontal {
492
+  input,
493
+  textarea,
494
+  select,
495
+  .help-inline,
496
+  .uneditable-input,
497
+  .input-prepend,
498
+  .input-append {
499
+    display: inline-block;
500
+    .ie7-inline-block();
501
+    margin-bottom: 0;
502
+  }
503
+  // Re-hide hidden elements due to specifity
504
+  .hide {
505
+    display: none;
506
+  }
507
+}
508
+.form-search label,
509
+.form-inline label {
510
+  display: inline-block;
511
+}
512
+// Remove margin for input-prepend/-append
513
+.form-search .input-append,
514
+.form-inline .input-append,
515
+.form-search .input-prepend,
516
+.form-inline .input-prepend {
517
+  margin-bottom: 0;
518
+}
519
+// Inline checkbox/radio labels (remove padding on left)
520
+.form-search .radio,
521
+.form-search .checkbox,
522
+.form-inline .radio,
523
+.form-inline .checkbox {
524
+  padding-left: 0;
525
+  margin-bottom: 0;
526
+  vertical-align: middle;
527
+}
528
+// Remove float and margin, set to inline-block
529
+.form-search .radio input[type="radio"],
530
+.form-search .checkbox input[type="checkbox"],
531
+.form-inline .radio input[type="radio"],
532
+.form-inline .checkbox input[type="checkbox"] {
533
+  float: left;
534
+  margin-right: 3pt;
535
+  margin-left: 0;
536
+}
537
+
538
+
539
+// Margin to space out fieldsets
540
+.control-group {
541
+  margin-bottom: @baseLineHeight / 2;
542
+}
543
+
544
+// Legend collapses margin, so next element is responsible for spacing
545
+legend + .control-group {
546
+  margin-top: @baseLineHeight;
547
+  -webkit-margin-top-collapse: separate;
548
+}
549
+
550
+// Horizontal-specific styles
551
+// --------------------------
552
+
553
+.form-horizontal {
554
+  // Increase spacing between groups
555
+  .control-group {
556
+    margin-bottom: @baseLineHeight;
557
+    .clearfix();
558
+  }
559
+  // Float the labels left
560
+  .control-label {
561
+    float: left;
562
+    width: 140pt;
563
+    padding-top: 5pt;
564
+    text-align: right;
565
+  }
566
+  // Move over all input controls and content
567
+  .controls {
568
+    // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
569
+    // don't inherit the margin of the parent, in this case .controls
570
+    *display: inline-block;
571
+    *padding-left: 20pt;
572
+    margin-left: 160pt;
573
+    *margin-left: 0;
574
+    &:first-child {
575
+      *padding-left: 160pt;
576
+    }
577
+  }
578
+  // Remove bottom margin on block level help text since that's accounted for on .control-group
579
+  .help-block {
580
+    margin-top: @baseLineHeight / 2;
581
+    margin-bottom: 0;
582
+  }
583
+  // Move over buttons in .form-actions to align with .controls
584
+  .form-actions {
585
+    padding-left: 160pt;
586
+  }
587
+}
0 588
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+// Fixed (940pt)
2
+#grid > .core(@gridColumnWidth, @gridGutterWidth);
3
+
4
+// Fluid (940pt)
5
+#grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);
0 6
\ No newline at end of file
1 7
new file mode 100644
... ...
@@ -0,0 +1,22 @@
1
+// HERO UNIT
2
+// ---------
3
+
4
+.hero-unit {
5
+  padding: 60pt;
6
+  margin-bottom: 30pt;
7
+  background-color: @heroUnitBackground;
8
+  .border-radius(6pt);
9
+  h1 {
10
+    margin-bottom: 0;
11
+    font-size: 60pt;
12
+    line-height: 1;
13
+    color: @heroUnitHeadingColor;
14
+    letter-spacing: -1pt;
15
+  }
16
+  p {
17
+    font-size: 18pt;
18
+    font-weight: 200;
19
+    line-height: @baseLineHeight * 1.5;
20
+    color: @heroUnitLeadColor;
21
+  }
22
+}
0 23
new file mode 100644
... ...
@@ -0,0 +1,55 @@
1
+// LABELS & BADGES
2
+// ---------------
3
+
4
+// Base classes
5
+.label,
6
+.badge {
7
+  font-size: @baseFontSize * .846;
8
+  font-weight: bold;
9
+  line-height: 14pt; // ensure proper line-height if floated
10
+  color: @white;
11
+  vertical-align: baseline;
12
+  white-space: nowrap;
13
+  text-shadow: 0 -1pt 0 rgba(0,0,0,.25);
14
+  background-color: @grayLight;
15
+}
16
+// Set unique padding and border-radii
17
+.label {
18
+  padding: 1pt 4pt 2pt;
19
+  .border-radius(3pt);
20
+}
21
+.badge {
22
+  padding: 1pt 9pt 2pt;
23
+  .border-radius(9pt);
24
+}
25
+
26
+// Hover state, but only for links
27
+a {
28
+  &.label:hover,
29
+  &.badge:hover {
30
+    color: @white;
31
+    text-decoration: none;
32
+    cursor: pointer;
33
+  }
34
+}
35
+
36
+// Colors
37
+// Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute)
38
+.label,
39
+.badge {
40
+  // Important (red)
41
+  &-important         { background-color: @errorText; }
42
+  &-important[href]   { background-color: darken(@errorText, 10%); }
43
+  // Warnings (orange)
44
+  &-warning           { background-color: @orange; }
45
+  &-warning[href]     { background-color: darken(@orange, 10%); }
46
+  // Success (green)
47
+  &-success           { background-color: @successText; }
48
+  &-success[href]     { background-color: darken(@successText, 10%); }
49
+  // Info (turquoise)
50
+  &-info              { background-color: @infoText; }
51
+  &-info[href]        { background-color: darken(@infoText, 10%); }
52
+  // Inverse (black)
53
+  &-inverse           { background-color: @grayDark; }
54
+  &-inverse[href]     { background-color: darken(@grayDark, 10%); }
55
+}
0 56
new file mode 100644
... ...
@@ -0,0 +1,17 @@
1
+//
2
+// Layouts
3
+// Fixed-width and fluid (with sidebar) layouts
4
+// --------------------------------------------
5
+
6
+
7
+// Container (centered, fixed-width layouts)
8
+.container {
9
+  .container-fixed();
10
+}
11
+
12
+// Fluid layouts (left aligned, with sidebar, min- & max-width content)
13
+.container-fluid {
14
+  padding-right: @gridGutterWidth;
15
+  padding-left: @gridGutterWidth;
16
+  .clearfix();
17
+}
0 18
\ No newline at end of file
1 19
new file mode 100644
... ...
@@ -0,0 +1,674 @@
1
+// Mixins.less
2
+// Snippets of reusable CSS to develop faster and keep code readable
3
+// -----------------------------------------------------------------
4
+
5
+
6
+// UTILITY MIXINS
7
+// --------------------------------------------------
8
+
9
+// Clearfix
10
+// --------
11
+// For clearing floats like a boss h5bp.com/q
12
+.clearfix {
13
+  *zoom: 1;
14
+  &:before,
15
+  &:after {
16
+    display: table;
17
+    content: "";
18
+  }
19
+  &:after {
20
+    clear: both;
21
+  }
22
+}
23
+
24
+// Webkit-style focus
25
+// ------------------
26
+.tab-focus() {
27
+  // Default
28
+  outline: thin dotted #333;
29
+  // Webkit
30
+  outline: 5pt auto -webkit-focus-ring-color;
31
+  outline-offset: -2pt;
32
+}
33
+
34
+// Center-align a block level element
35
+// ----------------------------------
36
+.center-block() {
37
+  display: block;
38
+  margin-left: auto;
39
+  margin-right: auto;
40
+}
41
+
42
+// IE7 inline-block
43
+// ----------------
44
+.ie7-inline-block() {
45
+  *display: inline; /* IE7 inline-block hack */
46
+  *zoom: 1;
47
+}
48
+
49
+// IE7 likes to collapse whitespace on either side of the inline-block elements.
50
+// Ems because we're attempting to match the width of a space character. Left
51
+// version is for form buttons, which typically come after other elements, and
52
+// right version is for icons, which come before. Applying both is ok, but it will
53
+// mean that space between those elements will be .6em (~2 space characters) in IE7,
54
+// instead of the 1 space in other browsers.
55
+.ie7-restore-left-whitespace() {
56
+  *margin-left: .3em;
57
+
58
+  &:first-child {
59
+    *margin-left: 0;
60
+  }
61
+}
62
+
63
+.ie7-restore-right-whitespace() {
64
+  *margin-right: .3em;
65
+
66
+  &:last-child {
67
+    *margin-left: 0;
68
+  }
69
+}
70
+
71
+// Sizing shortcuts
72
+// -------------------------
73
+.size(@height, @width) {
74
+  width: @width;
75
+  height: @height;
76
+}
77
+.square(@size) {
78
+  .size(@size, @size);
79
+}
80
+
81
+// Placeholder text
82
+// -------------------------
83
+.placeholder(@color: @placeholderText) {
84
+  :-moz-placeholder {
85
+    color: @color;
86
+  }
87
+  ::-webkit-input-placeholder {
88
+    color: @color;
89
+  }
90
+}
91
+
92
+// Text overflow
93
+// -------------------------
94
+// Requires inline-block or block for proper styling
95
+.text-overflow() {
96
+  overflow: hidden;
97
+  text-overflow: ellipsis;
98
+  white-space: nowrap;
99
+}
100
+
101
+// CSS image replacement
102
+// -------------------------
103
+// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
104
+.hide-text {
105
+  font: 0/0 a;
106
+  color: transparent;
107
+  text-shadow: none;
108
+  background-color: transparent;
109
+  border: 0;
110
+}
111
+
112
+
113
+// FONTS
114
+// --------------------------------------------------
115
+
116
+#font {
117
+  #family {
118
+    .serif() {
119
+      font-family: @serifFontFamily;
120
+    }
121
+    .sans-serif() {
122
+      font-family: @sansFontFamily;
123
+    }
124
+    .monospace() {
125
+      font-family: @monoFontFamily;
126
+    }
127
+  }
128
+  .shorthand(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
129
+    font-size: @size;
130
+    font-weight: @weight;
131
+    line-height: @lineHeight;
132
+  }
133
+  .serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
134
+    #font > #family > .serif;
135
+    #font > .shorthand(@size, @weight, @lineHeight);
136
+  }
137
+  .sans-serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
138
+    #font > #family > .sans-serif;
139
+    #font > .shorthand(@size, @weight, @lineHeight);
140
+  }
141
+  .monospace(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
142
+    #font > #family > .monospace;
143
+    #font > .shorthand(@size, @weight, @lineHeight);
144
+  }
145
+}
146
+
147
+
148
+// FORMS
149
+// --------------------------------------------------
150
+
151
+// Block level inputs
152
+.input-block-level {
153
+  display: block;
154
+  width: 100%;
155
+  min-height: 28pt;        // Make inputs at least the height of their button counterpart
156
+  .box-sizing(border-box); // Makes inputs behave like true block-level elements
157
+}
158
+
159
+
160
+// Mixin for form field states
161
+.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
162
+  // Set the text color
163
+  > label,
164
+  .help-block,
165
+  .help-inline {
166
+    color: @textColor;
167
+  }
168
+  // Style inputs accordingly
169
+  input,
170
+  select,
171
+  textarea {
172
+    color: @textColor;
173
+    border-color: @borderColor;
174
+    &:focus {
175
+      border-color: darken(@borderColor, 10%);
176
+      .box-shadow(0 0 6pt lighten(@borderColor, 20%));
177
+    }
178
+  }
179
+  // Give a small background color for input-prepend/-append
180
+  .input-prepend .add-on,
181
+  .input-append .add-on {
182
+    color: @textColor;
183
+    background-color: @backgroundColor;
184
+    border-color: @textColor;
185
+  }
186
+}
187
+
188
+
189
+
190
+// CSS3 PROPERTIES
191
+// --------------------------------------------------
192
+
193
+// Border Radius
194
+.border-radius(@radius) {
195
+  -webkit-border-radius: @radius;
196
+     -moz-border-radius: @radius;
197
+          border-radius: @radius;
198
+}
199
+
200
+// Drop shadows
201
+.box-shadow(@shadow) {
202
+  -webkit-box-shadow: @shadow;
203
+     -moz-box-shadow: @shadow;
204
+          box-shadow: @shadow;
205
+}
206
+
207
+// Transitions
208
+.transition(@transition) {
209
+  -webkit-transition: @transition;
210
+     -moz-transition: @transition;
211
+      -ms-transition: @transition;
212
+       -o-transition: @transition;
213
+          transition: @transition;
214
+}
215
+
216
+// Transformations
217
+.rotate(@degrees) {
218
+  -webkit-transform: rotate(@degrees);
219
+     -moz-transform: rotate(@degrees);
220
+      -ms-transform: rotate(@degrees);
221
+       -o-transform: rotate(@degrees);
222
+          transform: rotate(@degrees);
223
+}
224
+.scale(@ratio) {
225
+  -webkit-transform: scale(@ratio);
226
+     -moz-transform: scale(@ratio);
227
+      -ms-transform: scale(@ratio);
228
+       -o-transform: scale(@ratio);
229
+          transform: scale(@ratio);
230
+}
231
+.translate(@x, @y) {
232
+  -webkit-transform: translate(@x, @y);
233
+     -moz-transform: translate(@x, @y);
234
+      -ms-transform: translate(@x, @y);
235
+       -o-transform: translate(@x, @y);
236
+          transform: translate(@x, @y);
237
+}
238
+.skew(@x, @y) {
239
+  -webkit-transform: skew(@x, @y);
240
+     -moz-transform: skew(@x, @y);
241
+      -ms-transform: skew(@x, @y);
242
+       -o-transform: skew(@x, @y);
243
+          transform: skew(@x, @y);
244
+}
245
+.translate3d(@x, @y, @z) {
246
+  -webkit-transform: translate(@x, @y, @z);
247
+     -moz-transform: translate(@x, @y, @z);
248
+      -ms-transform: translate(@x, @y, @z);
249
+       -o-transform: translate(@x, @y, @z);
250
+          transform: translate(@x, @y, @z);
251
+}
252
+
253
+// Backface visibility
254
+// Prevent browsers from flickering when using CSS 3D transforms.
255
+// Default value is `visible`, but can be changed to `hidden
256
+// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
257
+.backface-visibility(@visibility){
258
+    -webkit-backface-visibility: @visibility;
259
+       -moz-backface-visibility: @visibility;
260
+        -ms-backface-visibility: @visibility;
261
+            backface-visibility: @visibility;
262
+}
263
+
264
+// Background clipping
265
+// Heads up: FF 3.6 and under need "padding" instead of "padding-box"
266
+.background-clip(@clip) {
267
+  -webkit-background-clip: @clip;
268
+     -moz-background-clip: @clip;
269
+          background-clip: @clip;
270
+}
271
+
272
+// Background sizing
273
+.background-size(@size){
274
+  -webkit-background-size: @size;
275
+     -moz-background-size: @size;
276
+       -o-background-size: @size;
277
+          background-size: @size;
278
+}
279
+
280
+
281
+// Box sizing
282
+.box-sizing(@boxmodel) {
283
+  -webkit-box-sizing: @boxmodel;
284
+     -moz-box-sizing: @boxmodel;
285
+      -ms-box-sizing: @boxmodel;
286
+          box-sizing: @boxmodel;
287
+}
288
+
289
+// User select
290
+// For selecting text on the page
291
+.user-select(@select) {
292
+  -webkit-user-select: @select;
293
+     -moz-user-select: @select;
294
+      -ms-user-select: @select;
295
+       -o-user-select: @select;
296
+          user-select: @select;
297
+}
298
+
299
+// Resize anything
300
+.resizable(@direction) {
301
+  resize: @direction; // Options: horizontal, vertical, both
302
+  overflow: auto; // Safari fix
303
+}
304
+
305
+// CSS3 Content Columns
306
+.content-columns(@columnCount, @columnGap: @gridGutterWidth) {
307
+  -webkit-column-count: @columnCount;
308
+     -moz-column-count: @columnCount;
309
+          column-count: @columnCount;
310
+  -webkit-column-gap: @columnGap;
311
+     -moz-column-gap: @columnGap;
312
+          column-gap: @columnGap;
313
+}
314
+
315
+// Opacity
316
+.opacity(@opacity) {
317
+  opacity: @opacity / 100;
318
+  filter: ~"alpha(opacity=@{opacity})";
319
+}
320
+
321
+
322
+
323
+// BACKGROUNDS
324
+// --------------------------------------------------
325
+
326
+// Add an alphatransparency value to any background or border color (via Elyse Holladay)
327
+#translucent {
328
+  .background(@color: @white, @alpha: 1) {
329
+    background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
330
+  }
331
+  .border(@color: @white, @alpha: 1) {
332
+    border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
333
+    .background-clip(padding-box);
334
+  }
335
+}
336
+
337
+// Gradient Bar Colors for buttons and alerts
338
+.gradientBar(@primaryColor, @secondaryColor) {
339
+  #gradient > .vertical(@primaryColor, @secondaryColor);
340
+  border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%);
341
+  border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
342
+}
343
+
344
+// Gradients
345
+#gradient {
346
+  .horizontal(@startColor: #555, @endColor: #333) {
347
+    background-color: @endColor;
348
+    background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
349
+    background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10
350
+    background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
351
+    background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
352
+    background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
353
+    background-image: linear-gradient(left, @startColor, @endColor); // Le standard
354
+    background-repeat: repeat-x;
355
+    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down
356
+  }
357
+  .vertical(@startColor: #555, @endColor: #333) {
358
+    background-color: mix(@startColor, @endColor, 60%);
359
+    background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
360
+    background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10
361
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
362
+    background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
363
+    background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
364
+    background-image: linear-gradient(top, @startColor, @endColor); // The standard
365
+    background-repeat: repeat-x;
366
+    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
367
+  }
368
+  .directional(@startColor: #555, @endColor: #333, @deg: 45deg) {
369
+    background-color: @endColor;
370
+    background-repeat: repeat-x;
371
+    background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+
372
+    background-image: -ms-linear-gradient(@deg, @startColor, @endColor); // IE10
373
+    background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+
374
+    background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10
375
+    background-image: linear-gradient(@deg, @startColor, @endColor); // The standard
376
+  }
377
+  .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
378
+    background-color: mix(@midColor, @endColor, 80%);
379
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
380
+    background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
381
+    background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
382
+    background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor);
383
+    background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor);
384
+    background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
385
+    background-repeat: no-repeat;
386
+    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down, gets no color-stop at all for proper fallback
387
+  }
388
+  .radial(@innerColor: #555, @outerColor: #333)  {
389
+    background-color: @outerColor;
390
+    background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
391
+    background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
392
+    background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
393
+    background-image: -ms-radial-gradient(circle, @innerColor, @outerColor);
394
+    background-image: -o-radial-gradient(circle, @innerColor, @outerColor);
395
+    background-repeat: no-repeat;
396
+  }
397
+  .striped(@color, @angle: -45deg) {
398
+    background-color: @color;
399
+    background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
400
+    background-image: -webkit-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
401
+    background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
402
+    background-image: -ms-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
403
+    background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
404
+    background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
405
+  }
406
+}
407
+// Reset filters for IE
408
+.reset-filter() {
409
+  filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
410
+}
411
+
412
+
413
+
414
+// COMPONENT MIXINS
415
+// --------------------------------------------------
416
+
417
+// Horizontal dividers
418
+// -------------------------
419
+// Dividers (basically an hr) within dropdowns and nav lists
420
+.nav-divider() {
421
+  // IE7 needs a set width since we gave a height. Restricting just
422
+  // to IE7 to keep the 1pt left/right space in other browsers.
423
+  // It is unclear where IE is getting the extra space that we need
424
+  // to negative-margin away, but so it goes.
425
+  *width: 100%;
426
+  height: 1pt;
427
+  margin: ((@baseLineHeight / 2) - 1) 1pt; // 8pt 1pt
428
+  *margin: -5pt 0 5pt;
429
+  overflow: hidden;
430
+  background-color: #e5e5e5;
431
+  border-bottom: 1pt solid @white;
432
+}
433
+
434
+// Button backgrounds
435
+// ------------------
436
+.buttonBackground(@startColor, @endColor) {
437
+  // gradientBar will set the background to a pleasing blend of these, to support IE<=9
438
+  .gradientBar(@startColor, @endColor);
439
+  *background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */
440
+  .reset-filter();
441
+
442
+  // in these cases the gradient won't cover the background, so we override
443
+  &:hover, &:active, &.active, &.disabled, &[disabled] {
444
+    background-color: @endColor;
445
+    *background-color: darken(@endColor, 5%);
446
+  }
447
+
448
+  // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
449
+  &:active,
450
+  &.active {
451
+    background-color: darken(@endColor, 10%) e("\9");
452
+  }
453
+}
454
+
455
+// Navbar vertical align
456
+// -------------------------
457
+// Vertically center elements in the navbar.
458
+// Example: an element has a height of 30pt, so write out `.navbarVerticalAlign(30pt);` to calculate the appropriate top margin.
459
+.navbarVerticalAlign(@elementHeight) {
460
+  margin-top: (@navbarHeight - @elementHeight) / 2;
461
+}
462
+
463
+// Popover arrows
464
+// -------------------------
465
+// For tipsies and popovers
466
+#popoverArrow {
467
+  .top(@arrowWidth: 5pt, @color: @black) {
468
+    bottom: 0;
469
+    left: 50%;
470
+    margin-left: -@arrowWidth;
471
+    border-left: @arrowWidth solid transparent;
472
+    border-right: @arrowWidth solid transparent;
473
+    border-top: @arrowWidth solid @color;
474
+  }
475
+  .left(@arrowWidth: 5pt, @color: @black) {
476
+    top: 50%;
477
+    right: 0;
478
+    margin-top: -@arrowWidth;
479
+    border-top: @arrowWidth solid transparent;
480
+    border-bottom: @arrowWidth solid transparent;
481
+    border-left: @arrowWidth solid @color;
482
+  }
483
+  .bottom(@arrowWidth: 5pt, @color: @black) {
484
+    top: 0;
485
+    left: 50%;
486
+    margin-left: -@arrowWidth;
487
+    border-left: @arrowWidth solid transparent;
488
+    border-right: @arrowWidth solid transparent;
489
+    border-bottom: @arrowWidth solid @color;
490
+  }
491
+  .right(@arrowWidth: 5pt, @color: @black) {
492
+    top: 50%;
493
+    left: 0;
494
+    margin-top: -@arrowWidth;
495
+    border-top: @arrowWidth solid transparent;
496
+    border-bottom: @arrowWidth solid transparent;
497
+    border-right: @arrowWidth solid @color;
498
+  }
499
+}
500
+
501
+// Grid System
502
+// -----------
503
+
504
+// Centered container element
505
+.container-fixed() {
506
+  margin-right: auto;
507
+  margin-left: auto;
508
+  .clearfix();
509
+}
510
+
511
+// Table columns
512
+.tableColumns(@columnSpan: 1) {
513
+  float: none; // undo default grid column styles
514
+  width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells
515
+  margin-left: 0; // undo default grid column styles
516
+}
517
+
518
+// Make a Grid
519
+// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
520
+.makeRow() {
521
+  margin-left: @gridGutterWidth * -1;
522
+  .clearfix();
523
+}
524
+.makeColumn(@columns: 1, @offset: 0) {
525
+  float: left;
526
+  margin-left: (@gridColumnWidth * @offset) + (@gridGutterWidth * (@offset - 1)) + (@gridGutterWidth * 2);
527
+  width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
528
+}
529
+
530
+// The Grid
531
+#grid {
532
+
533
+  .wide (@wideGridColumnWidth, @wideGridGutterWidth) {
534
+
535
+    .spanX (@index) when (@index > 0) {
536
+      .span@{index} { .span(@index); }
537
+      .spanX(@index - 1);
538
+    }
539
+    .spanX (0) {}
540
+
541
+    .offsetX (@index) when (@index > 0) {
542
+      .offset@{index} { .offset(@index); }
543
+      .offsetX(@index - 1);
544
+    }
545
+    .offsetX (0) {}
546
+
547
+    .offset (@columns) {
548
+      margin-left: (@wideGridColumnWidth * @columns) + (@wideGridGutterWidth * (@columns + 1));
549
+    }
550
+
551
+    .span (@columns) {
552
+      width: (@wideGridColumnWidth * @columns) + (@wideGridGutterWidth * (@columns - 1));
553
+    }
554
+
555
+    .row {
556
+      margin-left: @wideGridGutterWidth * -1;
557
+      .clearfix();
558
+    }
559
+
560
+    [class*="span"] {
561
+      float: left;
562
+      margin-left: @wideGridGutterWidth;
563
+    }
564
+
565
+    // Set the container width, and override it for fixed navbars in media queries
566
+    .container,
567
+    .navbar-fixed-top .container,
568
+    .navbar-fixed-bottom .container { .span(@wideGridColumns); }
569
+
570
+    // generate .spanX and .offsetX
571
+    .spanX (@wideGridColumns);
572
+    .offsetX (@wideGridColumns);
573
+
574
+  }
575
+
576
+  .core (@gridColumnWidth, @gridGutterWidth) {
577
+
578
+    .spanX (@index) when (@index > 0) {
579
+      .span@{index} { .span(@index); }
580
+      .spanX(@index - 1);
581
+    }
582
+    .spanX (0) {}
583
+
584
+    .offsetX (@index) when (@index > 0) {
585
+      .offset@{index} { .offset(@index); }
586
+      .offsetX(@index - 1);
587
+    }
588
+    .offsetX (0) {}
589
+
590
+    .offset (@columns) {
591
+      margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns + 1));
592
+    }
593
+
594
+    .span (@columns) {
595
+      width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
596
+    }
597
+
598
+    .row {
599
+      margin-left: @gridGutterWidth * -1;
600
+      .clearfix();
601
+    }
602
+
603
+    [class*="span"] {
604
+      float: left;
605
+      margin-left: @gridGutterWidth;
606
+    }
607
+
608
+    // Set the container width, and override it for fixed navbars in media queries
609
+    .container,
610
+    .navbar-fixed-top .container,
611
+    .navbar-fixed-bottom .container { .span(@gridColumns); }
612
+
613
+    // generate .spanX and .offsetX
614
+    .spanX (@gridColumns);
615
+    .offsetX (@gridColumns);
616
+
617
+  }
618
+
619
+  .fluid (@fluidGridColumnWidth, @fluidGridGutterWidth) {
620
+
621
+    .spanX (@index) when (@index > 0) {
622
+      .span@{index} { .span(@index); }
623
+      .spanX(@index - 1);
624
+    }
625
+    .spanX (0) {}
626
+
627
+    .span (@columns) {
628
+      width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
629
+      *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
630
+    }
631
+
632
+    .row-fluid {
633
+      width: 100%;
634
+      .clearfix();
635
+      [class*="span"] {
636
+        .input-block-level();
637
+        float: left;
638
+        margin-left: @fluidGridGutterWidth;
639
+        *margin-left: @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%);
640
+      }
641
+      [class*="span"]:first-child {
642
+        margin-left: 0;
643
+      }
644
+
645
+      // generate .spanX
646
+      .spanX (@gridColumns);
647
+    }
648
+
649
+  }
650
+
651
+  .input(@gridColumnWidth, @gridGutterWidth) {
652
+
653
+    .spanX (@index) when (@index > 0) {
654
+      input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index} { .span(@index); }
655
+      .spanX(@index - 1);
656
+    }
657
+    .spanX (0) {}
658
+
659
+    .span(@columns) {
660
+      width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10;
661
+    }
662
+
663
+    input,
664
+    textarea,
665
+    .uneditable-input {
666
+      margin-left: 0; // override margin-left from core grid system
667
+    }
668
+
669
+    // generate .spanX
670
+    .spanX (@gridColumns);
671
+
672
+  }
673
+
674
+}
0 675
new file mode 100644
... ...
@@ -0,0 +1,90 @@
1
+// MODALS
2
+// ------
3
+
4
+// Recalculate z-index where appropriate
5
+.modal-open {
6
+  .dropdown-menu {  z-index: @zindexDropdown + @zindexModal; }
7
+  .dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
8
+  .popover       {  z-index: @zindexPopover  + @zindexModal; }
9
+  .tooltip       {  z-index: @zindexTooltip  + @zindexModal; }
10
+}
11
+
12
+// Background
13
+.modal-backdrop {
14
+  position: fixed;
15
+  top: 0;
16
+  right: 0;
17
+  bottom: 0;
18
+  left: 0;
19
+  z-index: @zindexModalBackdrop;
20
+  background-color: @black;
21
+  // Fade for backdrop
22
+  &.fade { opacity: 0; }
23
+}
24
+
25
+.modal-backdrop,
26
+.modal-backdrop.fade.in {
27
+  .opacity(80);
28
+}
29
+
30
+// Base modal
31
+.modal {
32
+  position: fixed;
33
+  top: 50%;
34
+  left: 50%;
35
+  z-index: @zindexModal;
36
+  overflow: auto;
37
+  width: 560pt;
38
+  margin: -250pt 0 0 -280pt;
39
+  background-color: @white;
40
+  border: 1pt solid #999;
41
+  border: 1pt solid rgba(0,0,0,.3);
42
+  *border: 1pt solid #999; /* IE6-7 */
43
+  .border-radius(6pt);
44
+  .box-shadow(0 3pt 7pt rgba(0,0,0,0.3));
45
+  .background-clip(padding-box);
46
+  &.fade {
47
+    .transition(e('opacity .3s linear, top .3s ease-out'));
48
+    top: -25%;
49
+  }
50
+  &.fade.in { top: 50%; }
51
+}
52
+.modal-header {
53
+  padding: 9pt 15pt;
54
+  border-bottom: 1pt solid #eee;
55
+  // Close icon
56
+  .close { margin-top: 2pt; }
57
+}
58
+
59
+// Body (where all modal content resides)
60
+.modal-body {
61
+  overflow-y: auto;
62
+  max-height: 400pt;
63
+  padding: 15pt;
64
+}
65
+// Remove bottom margin if need be
66
+.modal-form {
67
+  margin-bottom: 0;
68
+}
69
+
70
+// Footer (for actions)
71
+.modal-footer {
72
+  padding: 14pt 15pt 15pt;
73
+  margin-bottom: 0;
74
+  text-align: right; // right align buttons
75
+  background-color: #f5f5f5;
76
+  border-top: 1pt solid #ddd;
77
+  .border-radius(0 0 6pt 6pt);
78
+  .box-shadow(inset 0 1pt 0 @white);
79
+  .clearfix(); // clear it in case folks use .pull-* classes on buttons
80
+
81
+  // Properly space out buttons
82
+  .btn + .btn {
83
+    margin-left: 5pt;
84
+    margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
85
+  }
86
+  // but override that for button groups
87
+  .btn-group .btn + .btn {
88
+    margin-left: -1pt;
89
+  }
90
+}
0 91
new file mode 100644
... ...
@@ -0,0 +1,366 @@
1
+// NAVBAR (FIXED AND STATIC)
2
+// -------------------------
3
+
4
+
5
+// COMMON STYLES
6
+// -------------
7
+
8
+.navbar {
9
+  // Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar
10
+  *position: relative;
11
+  *z-index: 2;
12
+
13
+  overflow: visible;
14
+  margin-bottom: @baseLineHeight;
15
+}
16
+
17
+// Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
18
+.navbar-inner {
19
+  min-height: @navbarHeight;
20
+  padding-left:  20pt;
21
+  padding-right: 20pt;
22
+  border-bottom: 1pt solid @navbarBorderColor;
23
+  #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground);
24
+  .box-shadow(~"0 1pt 0 rgba(255,255,255,0.4), 0 0 10pt rgba(0,0,0,0.1)");
25
+}
26
+
27
+// Set width to auto for default container
28
+// We then reset it for fixed navbars in the #gridSystem mixin
29
+.navbar .container {
30
+  width: auto;
31
+}
32
+
33
+// Override the default collapsed state
34
+.nav-collapse.collapse {
35
+  height: auto;
36
+}
37
+
38
+
39
+// Brand, links, text, and buttons
40
+.navbar {
41
+  color: @navbarText;
42
+  // Hover and active states
43
+  .brand:hover {
44
+    text-decoration: none;
45
+  }
46
+  // Website or project name
47
+  .brand {
48
+    float: left;
49
+    display: block;
50
+    // Vertically center the text given @navbarHeight
51
+    @elementHeight: 20pt;
52
+    padding: ((@navbarHeight - @elementHeight) / 2) 20pt ((@navbarHeight - @elementHeight) / 2 + 2);
53
+    margin-left: -20pt; // negative indent to left-align the text down the page
54
+    font-size: 20pt;
55
+    font-weight: 200;
56
+    line-height: 1;
57
+    color: lighten(@navbarBrandColor, 35%);
58
+    text-shadow: 1pt 1pt 1pt hsla(0,0%,0%,1);
59
+    font-weight: 700;
60
+    letter-spacing: 1pt;
61
+  }
62
+  // Plain text in topbar
63
+  .navbar-text {
64
+    margin-bottom: 0;
65
+    line-height: @navbarHeight;
66
+  }
67
+  // Janky solution for now to account for links outside the .nav
68
+  .navbar-link {
69
+    color: @navbarLinkColor;
70
+    &:hover {
71
+      color: @navbarLinkColorHover;
72
+    }
73
+  }
74
+  // Buttons in navbar
75
+  .btn,
76
+  .btn-group {
77
+    .navbarVerticalAlign(30pt); // Vertically center in navbar
78
+  }
79
+  .btn-group .btn {
80
+    margin: 0; // then undo the margin here so we don't accidentally double it
81
+  }
82
+}
83
+
84
+// Navbar forms
85
+.navbar-form {
86
+  margin-bottom: 0; // remove default bottom margin
87
+  .clearfix();
88
+  input,
89
+  select,
90
+  .radio,
91
+  .checkbox {
92
+    .navbarVerticalAlign(30pt); // Vertically center in navbar
93
+  }
94
+  input,
95
+  select {
96
+    display: inline-block;
97
+    margin-bottom: 0;
98
+  }
99
+  input[type="image"],
100
+  input[type="checkbox"],
101
+  input[type="radio"] {
102
+    margin-top: 3pt;
103
+  }
104
+  .input-append,
105
+  .input-prepend {
106
+    margin-top: 6pt;
107
+    white-space: nowrap; // preven two  items from separating within a .navbar-form that has .pull-left
108
+    input {
109
+      margin-top: 0; // remove the margin on top since it's on the parent
110
+    }
111
+  }
112
+}
113
+
114
+// Navbar search
115
+.navbar-search {
116
+  position: relative;
117
+  float: left;
118
+  .navbarVerticalAlign(28pt); // Vertically center in navbar
119
+  margin-bottom: 0;
120
+  .search-query {
121
+    padding: 4pt 9pt;
122
+    #font > .sans-serif(13pt, normal, 1);
123
+    color: @white;
124
+    background-color: @navbarSearchBackground;
125
+    border: 1pt solid @navbarSearchBorder;
126
+    .box-shadow(~"inset 0 1pt 2pt rgba(0,0,0,.1), 0 1pt 0pt rgba(255,255,255,.15)");
127
+    .transition(none);
128
+
129
+    // Placeholder text gets special styles; can't be a grouped selector
130
+    &:-moz-placeholder {
131
+      color: @navbarSearchPlaceholderColor;
132
+    }
133
+    &::-webkit-input-placeholder {
134
+      color: @navbarSearchPlaceholderColor;
135
+    }
136
+
137
+    // Focus states (we use .focused since IE7-8 and down doesn't support :focus)
138
+    &:focus,
139
+    &.focused {
140
+      padding: 5pt 10pt;
141
+      color: @grayDark;
142
+      text-shadow: 0 1pt 0 @white;
143
+      background-color: @navbarSearchBackgroundFocus;
144
+      border: 0;
145
+      .box-shadow(0 0 3pt rgba(0,0,0,.15));
146
+      outline: 0;
147
+    }
148
+  }
149
+}
150
+
151
+
152
+
153
+// FIXED NAVBAR
154
+// ------------
155
+
156
+// Shared (top/bottom) styles
157
+.navbar-fixed-top,
158
+.navbar-fixed-bottom {
159
+  position: fixed;
160
+  right: 0;
161
+  left: 0;
162
+  z-index: @zindexFixedNavbar;
163
+  margin-bottom: 0; // remove 18pt margin for static navbar
164
+}
165
+.navbar-fixed-top .navbar-inner,
166
+.navbar-fixed-bottom .navbar-inner {
167
+  padding-left:  0;
168
+  padding-right: 0;
169
+  .border-radius(0);
170
+}
171
+
172
+.navbar-fixed-top .container,
173
+.navbar-fixed-bottom .container {
174
+  #grid > .core > .span(@gridColumns);
175
+}
176
+
177
+// Fixed to top
178
+.navbar-fixed-top {
179
+  top: 0;
180
+}
181
+
182
+// Fixed to bottom
183
+.navbar-fixed-bottom {
184
+  bottom: 0;
185
+}
186
+
187
+
188
+
189
+// NAVIGATION
190
+// ----------
191
+
192
+.navbar .nav {
193
+  position: relative;
194
+  left: 0;
195
+  display: block;
196
+  float: left;
197
+  margin: 0 10pt 0 0;
198
+}
199
+.navbar .nav.pull-right {
200
+  float: right; // redeclare due to specificity
201
+}
202
+.navbar .nav > li {
203
+  display: block;
204
+  float: left;
205
+}
206
+
207
+// Links
208
+.navbar .nav > li > a {
209
+  float: none;
210
+  // Vertically center the text given @navbarHeight
211
+  @elementHeight: 20pt;
212
+  padding: ((@navbarHeight - @elementHeight) / 2) 10pt ((@navbarHeight - @elementHeight) / 2 + 1);
213
+  line-height: 19pt;
214
+  color: @navbarLinkColor;
215
+  text-decoration: none;
216
+  font-weight:700;
217
+}
218
+// Buttons
219
+.navbar .btn {
220
+  display: inline-block;
221
+  padding: 4pt 10pt 4pt;
222
+  // Vertically center the button given @navbarHeight
223
+  @elementHeight: 28pt;
224
+  margin: ((@navbarHeight - @elementHeight) / 2 - 1) 5pt ((@navbarHeight - @elementHeight) / 2);
225
+  line-height: @baseLineHeight;
226
+}
227
+.navbar .btn-group {
228
+  margin: 0;
229
+  // Vertically center the button given @navbarHeight
230
+  @elementHeight: 28pt;
231
+  padding: ((@navbarHeight - @elementHeight) / 2 - 1) 5pt ((@navbarHeight - @elementHeight) / 2);
232
+}
233
+// Hover
234
+.navbar .nav > li > a:hover {
235
+  color: @navbarLinkColorHover;
236
+  text-decoration: none;
237
+  background: transparent;
238
+}
239
+
240
+// Active nav items
241
+.navbar .nav .active > a,
242
+.navbar .nav .active > a:hover {
243
+  color: @navbarLinkColorActive;
244
+  text-decoration: none;
245
+}
246
+
247
+// Dividers (basically a vertical hr)
248
+.navbar .divider-vertical {
249
+  height: @navbarHeight;
250
+  width: 1pt;
251
+  margin: 0 9pt;
252
+  overflow: hidden;
253
+  background-color: @navbarBackground;
254
+  border-right: 1pt solid @navbarBackgroundHighlight;
255
+}
256
+
257
+// Secondary (floated right) nav in topbar
258
+.navbar .nav.pull-right {
259
+  margin-left: 10pt;
260
+  margin-right: 0;
261
+}
262
+
263
+// Navbar button for toggling navbar items in responsive layouts
264
+// These definitions need to come after '.navbar .btn'
265
+.navbar .btn-navbar {
266
+  display: none;
267
+  float: right;
268
+  padding: 7pt 10pt;
269
+  margin-left: 5pt;
270
+  margin-right: 5pt;
271
+  .buttonBackground(@navbarBackgroundHighlight, @navbarBackground);
272
+  .box-shadow(~"inset 0 1pt 0 rgba(255,255,255,.1), 0 1pt 0 rgba(255,255,255,.075)");
273
+}
274
+.navbar .btn-navbar .icon-bar {
275
+  display: block;
276
+  width: 18pt;
277
+  height: 2pt;
278
+  background-color: #f5f5f5;
279
+  .border-radius(1pt);
280
+  .box-shadow(0 1pt 0 rgba(0,0,0,.25));
281
+}
282
+.btn-navbar .icon-bar + .icon-bar {
283
+  margin-top: 3pt;
284
+}
285
+
286
+
287
+// Dropdown menus
288
+// --------------
289
+
290
+// Menu position and menu carets
291
+.navbar .dropdown-menu {
292
+  &:before {
293
+    content: '';
294
+    display: inline-block;
295
+    border-left:   7pt solid transparent;
296
+    border-right:  7pt solid transparent;
297
+    border-bottom: 7pt solid #ccc;
298
+    border-bottom-color: @dropdownBorder;
299
+    position: absolute;
300
+    top: -7pt;
301
+    left: 9pt;
302
+  }
303
+  &:after {
304
+    content: '';
305
+    display: inline-block;
306
+    border-left:   6pt solid transparent;
307
+    border-right:  6pt solid transparent;
308
+    border-bottom: 6pt solid @dropdownBackground;
309
+    position: absolute;
310
+    top: -6pt;
311
+    left: 10pt;
312
+  }
313
+}
314
+// Menu position and menu caret support for dropups via extra dropup class
315
+.navbar-fixed-bottom .dropdown-menu {
316
+  &:before {
317
+    border-top: 7pt solid #ccc;
318
+    border-top-color: @dropdownBorder;
319
+    border-bottom: 0;
320
+    bottom: -7pt;
321
+    top: auto;
322
+  }
323
+  &:after {
324
+    border-top: 6pt solid @dropdownBackground;
325
+    border-bottom: 0;
326
+    bottom: -6pt;
327
+    top: auto;
328
+  }
329
+}
330
+// Dropdown toggle caret
331
+.navbar .nav li.dropdown .dropdown-toggle .caret,
332
+.navbar .nav li.dropdown.open .caret {
333
+  border-top-color: @gray;
334
+  border-bottom-color: @grayLight;
335
+}
336
+.navbar .nav li.dropdown.active .caret {
337
+  .opacity(100);
338
+}
339
+
340
+// Remove background color from open dropdown
341
+.navbar .nav li.dropdown.open > .dropdown-toggle,
342
+.navbar .nav li.dropdown.active > .dropdown-toggle,
343
+.navbar .nav li.dropdown.open.active > .dropdown-toggle {
344
+  background-color: transparent;
345
+}
346
+
347
+// Dropdown link on hover
348
+.navbar .nav li.dropdown.active > .dropdown-toggle:hover {
349
+  color: @white;
350
+}
351
+
352
+// Right aligned menus need alt position
353
+// TODO: rejigger this at some point to simplify the selectors
354
+.navbar .pull-right .dropdown-menu,
355
+.navbar .dropdown-menu.pull-right {
356
+  left: auto;
357
+  right: 0;
358
+  &:before {
359
+    left: auto;
360
+    right: 12pt;
361
+  }
362
+  &:after {
363
+    left: auto;
364
+    right: 13pt;
365
+  }
366
+}
0 367
new file mode 100644
... ...
@@ -0,0 +1,363 @@
1
+// NAVIGATIONS
2
+// -----------
3
+
4
+
5
+
6
+// BASE CLASS
7
+// ----------
8
+
9
+.nav {
10
+  margin-left: 0;
11
+  margin-bottom: @baseLineHeight;
12
+  list-style: none;
13
+}
14
+
15
+// Make links block level
16
+.nav > li > a {
17
+  display: block;
18
+}
19
+.nav > li > a:hover {
20
+  text-decoration: none;
21
+  background-color: @grayDarker;
22
+}
23
+
24
+// Redeclare pull classes because of specifity
25
+.nav > .pull-right {
26
+  float: right;
27
+}
28
+
29
+// Nav headers (for dropdowns and lists)
30
+.nav .nav-header {
31
+  display: block;
32
+  padding: 3pt 15pt;
33
+  font-size: 11pt;
34
+  font-weight: bold;
35
+  line-height: @baseLineHeight;
36
+  color: @grayLight;
37
+  text-shadow: 0 1pt 0 hsla(0,0,0,.5);
38
+  text-transform: uppercase;
39
+}
40
+// Space them out when they follow another list item (link)
41
+.nav li + .nav-header {
42
+  margin-top: 9pt;
43
+}
44
+
45
+
46
+// NAV LIST
47
+// --------
48
+
49
+.nav-list {
50
+  padding-left: 15pt;
51
+  padding-right: 15pt;
52
+  margin-bottom: 0;
53
+}
54
+.nav-list > li > a,
55
+.nav-list .nav-header {
56
+  margin-left:  -15pt;
57
+  margin-right: -15pt;
58
+  text-shadow: 0 1pt 0 rgba(255,255,255,.5);
59
+}
60
+.nav-list > li > a {
61
+  padding: 3pt 15pt;
62
+}
63
+.nav-list > .active > a,
64
+.nav-list > .active > a:hover {
65
+  color: @white;
66
+  text-shadow: 0 -1pt 0 rgba(0,0,0,.2);
67
+  background-color: @linkColor;
68
+}
69
+.nav-list [class^="icon-"] {
70
+  margin-right: 2pt;
71
+}
72
+// Dividers (basically an hr) within the dropdown
73
+.nav-list .divider {
74
+  .nav-divider();
75
+}
76
+
77
+
78
+
79
+// TABS AND PILLS
80
+// -------------
81
+
82
+// Common styles
83
+.nav-tabs,
84
+.nav-pills {
85
+  .clearfix();
86
+}
87
+.nav-tabs > li,
88
+.nav-pills > li {
89
+  float: left;
90
+}
91
+.nav-tabs > li > a,
92
+.nav-pills > li > a {
93
+  padding-right: 12pt;
94
+  padding-left: 12pt;
95
+  margin-right: 2pt;
96
+  line-height: 14pt; // keeps the overall height an even number
97
+}
98
+
99
+// TABS
100
+// ----
101
+
102
+// Give the tabs something to sit on
103
+.nav-tabs {
104
+  border-bottom: 1pt solid #ddd;
105
+}
106
+// Make the list-items overlay the bottom border
107
+.nav-tabs > li {
108
+  margin-bottom: -1pt;
109
+}
110
+// Actual tabs (as links)
111
+.nav-tabs > li > a {
112
+  padding-top: 8pt;
113
+  padding-bottom: 8pt;
114
+  line-height: @baseLineHeight;
115
+  border: 1px solid transparent;
116
+  .border-radius(4pt 4pt 0 0);
117
+  &:hover {
118
+    border-color: @grayLighter @grayLighter #ddd;
119
+  }
120
+}
121
+// Active state, and it's :hover to override normal :hover
122
+.nav-tabs > .active > a,
123
+.nav-tabs > .active > a:hover {
124
+  color: @gray;
125
+  background-color: @black;
126
+  border: 1pt solid #ddd;
127
+  border-bottom-color: transparent;
128
+  cursor: default;
129
+}
130
+
131
+
132
+// PILLS
133
+// -----
134
+
135
+// Links rendered as pills
136
+.nav-pills > li > a {
137
+  padding-top: 8pt;
138
+  padding-bottom: 8pt;
139
+  margin-top: 2pt;
140
+  margin-bottom: 2pt;
141
+  .border-radius(5pt);
142
+}
143
+
144
+// Active state
145
+.nav-pills > .active > a,
146
+.nav-pills > .active > a:hover {
147
+  color: @white;
148
+  background-color: @linkColor;
149
+}
150
+
151
+
152
+
153
+// STACKED NAV
154
+// -----------
155
+
156
+// Stacked tabs and pills
157
+.nav-stacked > li {
158
+  float: none;
159
+}
160
+.nav-stacked > li > a {
161
+  margin-right: 0; // no need for the gap between nav items
162
+}
163
+
164
+// Tabs
165
+.nav-tabs.nav-stacked {
166
+  border-bottom: 0;
167
+}
168
+.nav-tabs.nav-stacked > li > a {
169
+  border: 1pt solid #ddd;
170
+  .border-radius(0);
171
+}
172
+.nav-tabs.nav-stacked > li:first-child > a {
173
+  .border-radius(4pt 4pt 0 0);
174
+}
175
+.nav-tabs.nav-stacked > li:last-child > a {
176
+  .border-radius(0 0 4pt 4pt);
177
+}
178
+.nav-tabs.nav-stacked > li > a:hover {
179
+  border-color: #ddd;
180
+  z-index: 2;
181
+}
182
+
183
+// Pills
184
+.nav-pills.nav-stacked > li > a {
185
+  margin-bottom: 3pt;
186
+}
187
+.nav-pills.nav-stacked > li:last-child > a {
188
+  margin-bottom: 1pt; // decrease margin to match sizing of stacked tabs
189
+}
190
+
191
+
192
+
193
+// DROPDOWNS
194
+// ---------
195
+
196
+.nav-tabs .dropdown-menu {
197
+  .border-radius(0 0 5pt 5pt); // remove the top rounded corners here since there is a hard edge above the menu
198
+}
199
+.nav-pills .dropdown-menu {
200
+  .border-radius(4pt); // make rounded corners match the pills
201
+}
202
+
203
+// Default dropdown links
204
+// -------------------------
205
+// Make carets use linkColor to start
206
+.nav-tabs .dropdown-toggle .caret,
207
+.nav-pills .dropdown-toggle .caret {
208
+  border-top-color: @linkColor;
209
+  border-bottom-color: @linkColor;
210
+  margin-top: 6pt;
211
+}
212
+.nav-tabs .dropdown-toggle:hover .caret,
213
+.nav-pills .dropdown-toggle:hover .caret {
214
+  border-top-color: @linkColorHover;
215
+  border-bottom-color: @linkColorHover;
216
+}
217
+
218
+// Active dropdown links
219
+// -------------------------
220
+.nav-tabs .active .dropdown-toggle .caret,
221
+.nav-pills .active .dropdown-toggle .caret {
222
+  border-top-color: @grayDark;
223
+  border-bottom-color: @grayDark;
224
+}
225
+
226
+// Active:hover dropdown links
227
+// -------------------------
228
+.nav > .dropdown.active > a:hover {
229
+  color: @black;
230
+  cursor: pointer;
231
+}
232
+
233
+// Open dropdowns
234
+// -------------------------
235
+.nav-tabs .open .dropdown-toggle,
236
+.nav-pills .open .dropdown-toggle,
237
+.nav > li.dropdown.open.active > a:hover {
238
+  color: @white;
239
+  background-color: @grayLight;
240
+  border-color: @grayLight;
241
+}
242
+.nav li.dropdown.open .caret,
243
+.nav li.dropdown.open.active .caret,
244
+.nav li.dropdown.open a:hover .caret {
245
+  border-top-color: @white;
246
+  border-bottom-color: @white;
247
+  .opacity(100);
248
+}
249
+
250
+// Dropdowns in stacked tabs
251
+.tabs-stacked .open > a:hover {
252
+  border-color: @grayLight;
253
+}
254
+
255
+
256
+
257
+// TABBABLE
258
+// --------
259
+
260
+
261
+// COMMON STYLES
262
+// -------------
263
+
264
+// Clear any floats
265
+.tabbable {
266
+  .clearfix();
267
+}
268
+.tab-content {
269
+  overflow: auto; // prevent content from running below tabs
270
+}
271
+
272
+// Remove border on bottom, left, right
273
+.tabs-below > .nav-tabs,
274
+.tabs-right > .nav-tabs,
275
+.tabs-left > .nav-tabs {
276
+  border-bottom: 0;
277
+}
278
+
279
+// Show/hide tabbable areas
280
+.tab-content > .tab-pane,
281
+.pill-content > .pill-pane {
282
+  display: none;
283
+}
284
+.tab-content > .active,
285
+.pill-content > .active {
286
+  display: block;
287
+}
288
+
289
+
290
+// BOTTOM
291
+// ------
292
+
293
+.tabs-below > .nav-tabs {
294
+  border-top: 1pt solid #ddd;
295
+}
296
+.tabs-below > .nav-tabs > li {
297
+  margin-top: -1pt;
298
+  margin-bottom: 0;
299
+}
300
+.tabs-below > .nav-tabs > li > a {
301
+  .border-radius(0 0 4pt 4pt);
302
+  &:hover {
303
+    border-bottom-color: transparent;
304
+    border-top-color: #ddd;
305
+  }
306
+}
307
+.tabs-below > .nav-tabs > .active > a,
308
+.tabs-below > .nav-tabs > .active > a:hover {
309
+  border-color: transparent #ddd #ddd #ddd;
310
+}
311
+
312
+// LEFT & RIGHT
313
+// ------------
314
+
315
+// Common styles
316
+.tabs-left > .nav-tabs > li,
317
+.tabs-right > .nav-tabs > li {
318
+  float: none;
319
+}
320
+.tabs-left > .nav-tabs > li > a,
321
+.tabs-right > .nav-tabs > li > a {
322
+  min-width: 74pt;
323
+  margin-right: 0;
324
+  margin-bottom: 3pt;
325
+}
326
+
327
+// Tabs on the left
328
+.tabs-left > .nav-tabs {
329
+  float: left;
330
+  margin-right: 19pt;
331
+  border-right: 1pt solid #ddd;
332
+}
333
+.tabs-left > .nav-tabs > li > a {
334
+  margin-right: -1pt;
335
+  .border-radius(4pt 0 0 4pt);
336
+}
337
+.tabs-left > .nav-tabs > li > a:hover {
338
+  border-color: @grayLighter #ddd @grayLighter @grayLighter;
339
+}
340
+.tabs-left > .nav-tabs .active > a,
341
+.tabs-left > .nav-tabs .active > a:hover {
342
+  border-color: #ddd transparent #ddd #ddd;
343
+  *border-right-color: @white;
344
+}
345
+
346
+// Tabs on the right
347
+.tabs-right > .nav-tabs {
348
+  float: right;
349
+  margin-left: 19pt;
350
+  border-left: 1pt solid #ddd;
351
+}
352
+.tabs-right > .nav-tabs > li > a {
353
+  margin-left: -1pt;
354
+  .border-radius(0 4pt 4pt 0);
355
+}
356
+.tabs-right > .nav-tabs > li > a:hover {
357
+  border-color: @grayLighter @grayLighter @grayLighter #ddd;
358
+}
359
+.tabs-right > .nav-tabs .active > a,
360
+.tabs-right > .nav-tabs .active > a:hover {
361
+  border-color: #ddd #ddd #ddd transparent;
362
+  *border-left-color: @white;
363
+}
0 364
new file mode 100644
... ...
@@ -0,0 +1,94 @@
1
+.network-view {
2
+	width: 100%;
3
+	margin-bottom: @baseLineHeight;
4
+	border: 1pt solid @treeHeaderBorder;
5
+	position: relative;
6
+
7
+	&.loading-commits {
8
+
9
+		&:before {
10
+			content: "";
11
+			display: block;
12
+			height: 100pt;
13
+			width: 200pt;
14
+			box-sizing: border-box;
15
+			padding: 10pt;
16
+			font-weight: bold;
17
+			position: absolute;
18
+
19
+			left: 50%;
20
+			top: 50%;
21
+			margin-left: -100pt;
22
+			margin-top: -50pt;
23
+
24
+			color: #555;
25
+			background: rgba(255,255,255,.8) url("@{ajaxLoaderPath}") no-repeat center;
26
+			z-index: 2000;
27
+			border: 1pt solid #eee;
28
+			border-radius: 8pt;
29
+			box-shadow: 2pt 2pt 2pt #eee;
30
+		}
31
+
32
+		.network-header .meta:after {
33
+			content: " - Loading";
34
+		}
35
+	}
36
+
37
+	.network-header {
38
+		padding: 8pt;
39
+		line-height: @baseLineHeight;
40
+		text-align: left;
41
+		vertical-align: bottom;
42
+		#gradient > .vertical(@treeHeaderHighlight, @treeHeader);
43
+		border-bottom: 1pt solid lighten(@treeHeaderBorder, 5%);
44
+		font-weight: bold;
45
+		color: @white;
46
+		text-shadow: 1pt 1pt 1pt @bodyBackground;
47
+		height: 28pt;
48
+
49
+		.meta {
50
+			float: left;
51
+			padding: 4pt 0;
52
+			font-size: 14pt;
53
+		}
54
+
55
+	}
56
+	pre {
57
+		margin: 0;
58
+		padding: 12pt;
59
+		border: none;
60
+	}
61
+	.network-graph {
62
+		background-color: lighten(@bodyBackground, 50%);
63
+		height: 400pt;
64
+		overflow: hidden;
65
+		cursor: move;
66
+		position: relative;
67
+
68
+		.network-commit-overlay {
69
+			position: absolute;
70
+			width: 400pt;
71
+			top: 0;
72
+			left: 0;
73
+			padding: 8pt;
74
+			margin: 0 0 @baseLineHeight;
75
+			list-style: none;
76
+			#gradient > .vertical(@white, #f5f5f5);
77
+			border: 1pt solid #ddd;
78
+
79
+			.border-radius(3pt);
80
+			.box-shadow(~"0 1pt 0 rgba(255,255,255,0.4), 0 0 10pt rgba(0,0,0,0.1)");
81
+
82
+			img {
83
+				float: left;
84
+				margin-right: 8pt;
85
+			}
86
+
87
+			&>h4,
88
+			&>p {
89
+				padding-left: 48pt;
90
+			}
91
+		}
92
+
93
+	}
94
+}
0 95
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+.ltr-border {
2
+   border-left: 2pt solid lighten(@treeHeaderBorder, 5%);
3
+   border-top: 2pt solid lighten(@treeHeaderBorder, 5%);
4
+   border-right: 2pt solid lighten(@treeHeaderBorder, 5%);
5
+}
0 6
new file mode 100644
... ...
@@ -0,0 +1,36 @@
1
+// PAGER
2
+// -----
3
+
4
+.pager {
5
+  margin-left: 0;
6
+  margin-bottom: @baseLineHeight;
7
+  list-style: none;
8
+  text-align: center;
9
+  .clearfix();
10
+}
11
+.pager li {
12
+  display: inline;
13
+}
14
+.pager a {
15
+  display: inline-block;
16
+  padding: 5pt 14pt;
17
+  background-color: #fff;
18
+  border: 1pt solid #ddd;
19
+  .border-radius(15pt);
20
+}
21
+.pager a:hover {
22
+  text-decoration: none;
23
+  background-color: #f5f5f5;
24
+}
25
+.pager .next a {
26
+  float: right;
27
+}
28
+.pager .previous a {
29
+  float: left;
30
+}
31
+.pager .disabled a,
32
+.pager .disabled a:hover {
33
+  color: @grayLight;
34
+  background-color: #fff;
35
+  cursor: default;
36
+}
0 37
\ No newline at end of file
1 38
new file mode 100644
... ...
@@ -0,0 +1,56 @@
1
+// PAGINATION
2
+// ----------
3
+
4
+.pagination {
5
+  height: @baseLineHeight * 2;
6
+  margin: @baseLineHeight 0;
7
+ }
8
+.pagination ul {
9
+  display: inline-block;
10
+  .ie7-inline-block();
11
+  margin-left: 0;
12
+  margin-bottom: 0;
13
+  .border-radius(3pt);
14
+  .box-shadow(0 1pt 2pt rgba(0,0,0,.05));
15
+}
16
+.pagination li {
17
+    display: inline;
18
+  }
19
+.pagination a {
20
+  float: left;
21
+  padding: 0 14pt;
22
+  line-height: (@baseLineHeight * 2) - 2;
23
+  text-decoration: none;
24
+  border: 1pt solid #ddd;
25
+  border-left-width: 0;
26
+}
27
+.pagination a:hover,
28
+.pagination .active a {
29
+  background-color: #f5f5f5;
30
+}
31
+.pagination .active a {
32
+  color: @grayLight;
33
+  cursor: default;
34
+}
35
+.pagination .disabled span,
36
+.pagination .disabled a,
37
+.pagination .disabled a:hover {
38
+  color: @grayLight;
39
+  background-color: transparent;
40
+  cursor: default;
41
+}
42
+.pagination li:first-child a {
43
+  border-left-width: 1pt;
44
+  .border-radius(3pt 0 0 3pt);
45
+}
46
+.pagination li:last-child a {
47
+  .border-radius(0 3pt 3pt 0);
48
+}
49
+
50
+// Centered
51
+.pagination-centered {
52
+  text-align: center;
53
+}
54
+.pagination-right {
55
+  text-align: right;
56
+}
0 57
new file mode 100644
... ...
@@ -0,0 +1,49 @@
1
+// POPOVERS
2
+// --------
3
+
4
+.popover {
5
+  position: absolute;
6
+  top: 0;
7
+  left: 0;
8
+  z-index: @zindexPopover;
9
+  display: none;
10
+  padding: 5pt;
11
+  &.top    { margin-top:  -5pt; }
12
+  &.right  { margin-left:  5pt; }
13
+  &.bottom { margin-top:   5pt; }
14
+  &.left   { margin-left: -5pt; }
15
+  &.top .arrow    { #popoverArrow > .top(); }
16
+  &.right .arrow  { #popoverArrow > .right(); }
17
+  &.bottom .arrow { #popoverArrow > .bottom(); }
18
+  &.left .arrow   { #popoverArrow > .left();  }
19
+  .arrow {
20
+    position: absolute;
21
+    width: 0;
22
+    height: 0;
23
+  }
24
+}
25
+.popover-inner {
26
+  padding: 3pt;
27
+  width: 280pt;
28
+  overflow: hidden;
29
+  background: @black; // has to be full background declaration for IE fallback
30
+  background: rgba(0,0,0,.8);
31
+  .border-radius(6pt);
32
+  .box-shadow(0 3pt 7pt rgba(0,0,0,0.3));
33
+}
34
+.popover-title {
35
+  padding: 9pt 15pt;
36
+  line-height: 1;
37
+  background-color: #f5f5f5;
38
+  border-bottom:1pt solid #eee;
39
+  .border-radius(3pt 3pt 0 0);
40
+}
41
+.popover-content {
42
+  padding: 14pt;
43
+  background-color: @white;
44
+  .border-radius(0 0 3pt 3pt);
45
+  .background-clip(padding-box);
46
+  p, ul, ol {
47
+    margin-bottom: 0;
48
+  }
49
+}
0 50
new file mode 100644
... ...
@@ -0,0 +1,117 @@
1
+// PROGRESS BARS
2
+// -------------
3
+
4
+
5
+// ANIMATIONS
6
+// ----------
7
+
8
+// Webkit
9
+@-webkit-keyframes progress-bar-stripes {
10
+  from  { background-position: 40pt 0; }
11
+  to    { background-position: 0 0; }
12
+}
13
+
14
+// Firefox
15
+@-moz-keyframes progress-bar-stripes {
16
+  from  { background-position: 40pt 0; }
17
+  to    { background-position: 0 0; }
18
+}
19
+
20
+// IE9
21
+@-ms-keyframes progress-bar-stripes {
22
+  from  { background-position: 40pt 0; }
23
+  to    { background-position: 0 0; }
24
+}
25
+
26
+// Opera
27
+@-o-keyframes progress-bar-stripes {
28
+  from  { background-position: 0 0; }
29
+  to    { background-position: 40pt 0; }
30
+}
31
+
32
+// Spec
33
+@keyframes progress-bar-stripes {
34
+  from  { background-position: 40pt 0; }
35
+  to    { background-position: 0 0; }
36
+}
37
+
38
+
39
+
40
+// THE BARS
41
+// --------
42
+
43
+// Outer container
44
+.progress {
45
+  overflow: hidden;
46
+  height: 18pt;
47
+  margin-bottom: 18pt;
48
+  #gradient > .vertical(#f5f5f5, #f9f9f9);
49
+  .box-shadow(inset 0 1pt 2pt rgba(0,0,0,.1));
50
+  .border-radius(4pt);
51
+}
52
+
53
+// Bar of progress
54
+.progress .bar {
55
+  width: 0%;
56
+  height: 18pt;
57
+  color: @white;
58
+  font-size: 12pt;
59
+  text-align: center;
60
+  text-shadow: 0 -1pt 0 rgba(0,0,0,.25);
61
+  #gradient > .vertical(#149bdf, #0480be);
62
+  .box-shadow(inset 0 -1pt 0 rgba(0,0,0,.15));
63
+  .box-sizing(border-box);
64
+  .transition(width .6s ease);
65
+}
66
+
67
+// Striped bars
68
+.progress-striped .bar {
69
+  #gradient > .striped(#149bdf);
70
+  .background-size(40pt 40pt);
71
+}
72
+
73
+// Call animation for the active one
74
+.progress.active .bar {
75
+  -webkit-animation: progress-bar-stripes 2s linear infinite;
76
+     -moz-animation: progress-bar-stripes 2s linear infinite;
77
+      -ms-animation: progress-bar-stripes 2s linear infinite;
78
+       -o-animation: progress-bar-stripes 2s linear infinite;
79
+          animation: progress-bar-stripes 2s linear infinite;
80
+}
81
+
82
+
83
+
84
+// COLORS
85
+// ------
86
+
87
+// Danger (red)
88
+.progress-danger .bar {
89
+  #gradient > .vertical(#ee5f5b, #c43c35);
90
+}
91
+.progress-danger.progress-striped .bar {
92
+  #gradient > .striped(#ee5f5b);
93
+}
94
+
95
+// Success (green)
96
+.progress-success .bar {
97
+  #gradient > .vertical(#62c462, #57a957);
98
+}
99
+.progress-success.progress-striped .bar {
100
+  #gradient > .striped(#62c462);
101
+}
102
+
103
+// Info (teal)
104
+.progress-info .bar {
105
+  #gradient > .vertical(#5bc0de, #339bb9);
106
+}
107
+.progress-info.progress-striped .bar {
108
+  #gradient > .striped(#5bc0de);
109
+}
110
+
111
+// Warning (orange)
112
+.progress-warning .bar {
113
+  #gradient > .vertical(lighten(@orange, 15%), @orange);
114
+}
115
+.progress-warning.progress-striped .bar {
116
+  #gradient > .striped(lighten(@orange, 15%));
117
+}
0 118
new file mode 100644
... ...
@@ -0,0 +1,129 @@
1
+// Reset.less
2
+// Adapted from Normalize.css http://github.com/necolas/normalize.css
3
+// ------------------------------------------------------------------------
4
+
5
+// Display in IE6-9 and FF3
6
+// -------------------------
7
+
8
+article,
9
+aside,
10
+details,
11
+figcaption,
12
+figure,
13
+footer,
14
+header,
15
+hgroup,
16
+nav,
17
+section {
18
+  display: block;
19
+}
20
+
21
+// Display block in IE6-9 and FF3
22
+// -------------------------
23
+
24
+audio,
25
+canvas,
26
+video {
27
+  display: inline-block;
28
+  *display: inline;
29
+  *zoom: 1;
30
+}
31
+
32
+// Prevents modern browsers from displaying 'audio' without controls
33
+// -------------------------
34
+
35
+audio:not([controls]) {
36
+    display: none;
37
+}
38
+
39
+// Base settings
40
+// -------------------------
41
+
42
+html {
43
+  font-size: 100%;
44
+  -webkit-text-size-adjust: 100%;
45
+      -ms-text-size-adjust: 100%;
46
+  overflow-y: scroll;
47
+  overflow: -moz-scrollbars-vertical;
48
+  -ms-overflow-y: scroll;
49
+}
50
+// Focus states
51
+a:focus {
52
+  .tab-focus();
53
+}
54
+// Hover & Active
55
+a:hover,
56
+a:active {
57
+  outline: 0;
58
+}
59
+
60
+// Prevents sub and sup affecting line-height in all browsers
61
+// -------------------------
62
+
63
+sub,
64
+sup {
65
+  position: relative;
66
+  font-size: 75%;
67
+  line-height: 0;
68
+  vertical-align: baseline;
69
+}
70
+sup {
71
+  top: -0.5em;
72
+}
73
+sub {
74
+  bottom: -0.25em;
75
+}
76
+
77
+// Img border in a's and image quality
78
+// -------------------------
79
+
80
+img {
81
+  max-width: 100%; // Make images inherently responsive
82
+  vertical-align: middle;
83
+  border: 0;
84
+  -ms-interpolation-mode: bicubic;
85
+}
86
+
87
+// Forms
88
+// -------------------------
89
+
90
+// Font size in all browsers, margin changes, misc consistency
91
+button,
92
+input,
93
+select,
94
+textarea {
95
+  margin: 0;
96
+  font-size: 100%;
97
+  vertical-align: middle;
98
+}
99
+button,
100
+input {
101
+  *overflow: visible; // Inner spacing ie IE6/7
102
+  line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
103
+}
104
+button::-moz-focus-inner,
105
+input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
106
+  padding: 0;
107
+  border: 0;
108
+}
109
+button,
110
+input[type="button"],
111
+input[type="reset"],
112
+input[type="submit"] {
113
+  cursor: pointer; // Cursors on all buttons applied consistently
114
+  -webkit-appearance: button; // Style clickable inputs in iOS
115
+}
116
+input[type="search"] { // Appearance in Safari/Chrome
117
+  -webkit-box-sizing: content-box;
118
+     -moz-box-sizing: content-box;
119
+          box-sizing: content-box;
120
+  -webkit-appearance: textfield;
121
+}
122
+input[type="search"]::-webkit-search-decoration,
123
+input[type="search"]::-webkit-search-cancel-button {
124
+  -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
125
+}
126
+textarea {
127
+  overflow: auto; // Remove vertical scrollbar in IE6-9
128
+  vertical-align: top; // Readability and alignment cross-browser
129
+}
0 130
new file mode 100644
... ...
@@ -0,0 +1,26 @@
1
+// LARGE DESKTOP & UP
2
+// ------------------
3
+
4
+@media (min-width: 1200pt) {
5
+
6
+  // Fixed grid
7
+  #grid > .core(70pt, 30pt);
8
+
9
+  // Fluid grid
10
+  #grid > .fluid(5.982905983%, 2.564102564%);
11
+
12
+  // Input grid
13
+  #grid > .input(70pt, 30pt);
14
+
15
+  // Thumbnails
16
+  .thumbnails {
17
+    margin-left: -30pt;
18
+  }
19
+  .thumbnails > li {
20
+    margin-left: 30pt;
21
+  }
22
+  .row-fluid .thumbnails {
23
+    margin-left: 0;
24
+  }
25
+
26
+}
0 27
new file mode 100644
... ...
@@ -0,0 +1,149 @@
1
+// UP TO LANDSCAPE PHONE
2
+// ---------------------
3
+
4
+@media (max-width: 480pt) {
5
+
6
+  // Smooth out the collapsing/expanding nav
7
+  .nav-collapse {
8
+    -webkit-transform: translate3d(0, 0, 0); // activate the GPU
9
+  }
10
+
11
+  // Block level the page header small tag for readability
12
+  .page-header h1 small {
13
+    display: block;
14
+    line-height: @baseLineHeight;
15
+  }
16
+
17
+  // Update checkboxes for iOS
18
+  input[type="checkbox"],
19
+  input[type="radio"] {
20
+    border: 1pt solid #ccc;
21
+  }
22
+
23
+  // Remove the horizontal form styles
24
+  .form-horizontal .control-group > label {
25
+    float: none;
26
+    width: auto;
27
+    padding-top: 0;
28
+    text-align: left;
29
+  }
30
+  // Move over all input controls and content
31
+  .form-horizontal .controls {
32
+    margin-left: 0;
33
+  }
34
+  // Move the options list down to align with labels
35
+  .form-horizontal .control-list {
36
+    padding-top: 0; // has to be padding because margin collaspes
37
+  }
38
+  // Move over buttons in .form-actions to align with .controls
39
+  .form-horizontal .form-actions {
40
+    padding-left: 10pt;
41
+    padding-right: 10pt;
42
+  }
43
+
44
+  // Modals
45
+  .modal {
46
+    position: absolute;
47
+    top:   10pt;
48
+    left:  10pt;
49
+    right: 10pt;
50
+    width: auto;
51
+    margin: 0;
52
+    &.fade.in { top: auto; }
53
+  }
54
+  .modal-header .close {
55
+    padding: 10pt;
56
+    margin: -10pt;
57
+  }
58
+
59
+  // Carousel
60
+  .carousel-caption {
61
+    position: static;
62
+  }
63
+
64
+}
65
+
66
+
67
+
68
+// LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
69
+// --------------------------------------------------
70
+
71
+@media (max-width: 767pt) {
72
+
73
+  // Padding to set content in a bit
74
+  body {
75
+    padding-left: 20pt;
76
+    padding-right: 20pt;
77
+  }
78
+  // Negative indent the now static "fixed" navbar
79
+  .navbar-fixed-top,
80
+  .navbar-fixed-bottom {
81
+    margin-left: -20pt;
82
+    margin-right: -20pt;
83
+  }
84
+  // Remove padding on container given explicit padding set on body
85
+  .container-fluid {
86
+    padding: 0;
87
+  }
88
+
89
+  // TYPOGRAPHY
90
+  // ----------
91
+  // Reset horizontal dl
92
+  .dl-horizontal {
93
+    dt {
94
+      float: none;
95
+      clear: none;
96
+      width: auto;
97
+      text-align: left;
98
+    }
99
+    dd {
100
+      margin-left: 0;
101
+    }
102
+  }
103
+
104
+  // GRID & CONTAINERS
105
+  // -----------------
106
+  // Remove width from containers
107
+  .container {
108
+    width: auto;
109
+  }
110
+  // Fluid rows
111
+  .row-fluid {
112
+    width: 100%;
113
+  }
114
+  // Undo negative margin on rows and thumbnails
115
+  .row,
116
+  .thumbnails {
117
+    margin-left: 0;
118
+  }
119
+  // Make all grid-sized elements block level again
120
+  [class*="span"],
121
+  .row-fluid [class*="span"] {
122
+    float: none;
123
+    display: block;
124
+    width: auto;
125
+    margin-left: 0;
126
+  }
127
+
128
+  // FORM FIELDS
129
+  // -----------
130
+  // Make span* classes full width
131
+  .input-large,
132
+  .input-xlarge,
133
+  .input-xxlarge,
134
+  input[class*="span"],
135
+  select[class*="span"],
136
+  textarea[class*="span"],
137
+  .uneditable-input {
138
+    .input-block-level();
139
+  }
140
+  // But don't let it screw up prepend/append inputs
141
+  .input-prepend input,
142
+  .input-append input,
143
+  .input-prepend input[class*="span"],
144
+  .input-append input[class*="span"] {
145
+    display: inline-block; // redeclare so they don't wrap to new lines
146
+    width: auto;
147
+  }
148
+
149
+}
0 150
new file mode 100644
... ...
@@ -0,0 +1,17 @@
1
+// PORTRAIT TABLET TO DEFAULT DESKTOP
2
+// ----------------------------------
3
+
4
+@media (min-width: 768pt) and (max-width: 979pt) {
5
+
6
+  // Fixed grid
7
+  #grid > .core(42pt, 20pt);
8
+
9
+  // Fluid grid
10
+  #grid > .fluid(5.801104972%, 2.762430939%);
11
+
12
+  // Input grid
13
+  #grid > .input(42pt, 20pt);
14
+
15
+  // No need to reset .thumbnails here since it's the same @gridGutterWidth
16
+
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,146 @@
1
+// TABLETS AND BELOW
2
+// -----------------
3
+@media (max-width: 979pt) {
4
+
5
+  // UNFIX THE TOPBAR
6
+  // ----------------
7
+  // Remove any padding from the body
8
+  body {
9
+    padding-top: 0;
10
+  }
11
+  // Unfix the navbar
12
+  .navbar-fixed-top {
13
+    position: static;
14
+    margin-bottom: @baseLineHeight;
15
+  }
16
+  .navbar-fixed-top .navbar-inner {
17
+    padding: 5pt;
18
+  }
19
+  .navbar .container {
20
+    width: auto;
21
+    padding: 0;
22
+  }
23
+  // Account for brand name
24
+  .navbar .brand {
25
+    padding-left: 10pt;
26
+    padding-right: 10pt;
27
+    margin: 0 0 0 -5pt;
28
+  }
29
+
30
+  // COLLAPSIBLE NAVBAR
31
+  // ------------------
32
+  // Nav collapse clears brand
33
+  .nav-collapse {
34
+    clear: both;
35
+  }
36
+  // Block-level the nav
37
+  .nav-collapse .nav {
38
+    float: none;
39
+    margin: 0 0 (@baseLineHeight / 2);
40
+  }
41
+  .nav-collapse .nav > li {
42
+    float: none;
43
+  }
44
+  .nav-collapse .nav > li > a {
45
+    margin-bottom: 2pt;
46
+  }
47
+  .nav-collapse .nav > .divider-vertical {
48
+    display: none;
49
+  }
50
+  .nav-collapse .nav .nav-header {
51
+    color: @navbarText;
52
+    text-shadow: none;
53
+  }
54
+  // Nav and dropdown links in navbar
55
+  .nav-collapse .nav > li > a,
56
+  .nav-collapse .dropdown-menu a {
57
+    padding: 6pt 15pt;
58
+    font-weight: bold;
59
+    color: @navbarLinkColor;
60
+    .border-radius(3pt);
61
+  }
62
+  // Buttons
63
+  .nav-collapse .btn {
64
+    padding: 4pt 10pt 4pt;
65
+    font-weight: normal;
66
+    .border-radius(4pt);
67
+  }
68
+  .nav-collapse .dropdown-menu li + li a {
69
+    margin-bottom: 2pt;
70
+  }
71
+  .nav-collapse .nav > li > a:hover,
72
+  .nav-collapse .dropdown-menu a:hover {
73
+    background-color: @navbarBackground;
74
+  }
75
+  // Buttons in the navbar
76
+  .nav-collapse.in .btn-group {
77
+    margin-top: 5pt;
78
+    padding: 0;
79
+  }
80
+  // Dropdowns in the navbar
81
+  .nav-collapse .dropdown-menu {
82
+    position: static;
83
+    top: auto;
84
+    left: auto;
85
+    float: none;
86
+    display: block;
87
+    max-width: none;
88
+    margin: 0 15pt;
89
+    padding: 0;
90
+    background-color: transparent;
91
+    border: none;
92
+    .border-radius(0);
93
+    .box-shadow(none);
94
+  }
95
+  .nav-collapse .dropdown-menu:before,
96
+  .nav-collapse .dropdown-menu:after {
97
+    display: none;
98
+  }
99
+  .nav-collapse .dropdown-menu .divider {
100
+    display: none;
101
+  }
102
+  // Forms in navbar
103
+  .nav-collapse .navbar-form,
104
+  .nav-collapse .navbar-search {
105
+    float: none;
106
+    padding: (@baseLineHeight / 2) 15pt;
107
+    margin: (@baseLineHeight / 2) 0;
108
+    border-top: 1pt solid @navbarBackground;
109
+    border-bottom: 1pt solid @navbarBackground;
110
+    .box-shadow(~"inset 0 1pt 0 rgba(255,255,255,.1), 0 1pt 0 rgba(255,255,255,.1)");
111
+  }
112
+  // Pull right (secondary) nav content
113
+  .navbar .nav-collapse .nav.pull-right {
114
+    float: none;
115
+    margin-left: 0;
116
+  }
117
+  // Hide everything in the navbar save .brand and toggle button */
118
+  .nav-collapse,
119
+  .nav-collapse.collapse {
120
+    overflow: hidden;
121
+    height: 0;
122
+  }
123
+  // Navbar button
124
+  .navbar .btn-navbar {
125
+    display: block;
126
+  }
127
+
128
+  // STATIC NAVBAR
129
+  // -------------
130
+  .navbar-static .navbar-inner {
131
+    padding-left:  10pt;
132
+    padding-right: 10pt;
133
+  }
134
+}
135
+
136
+
137
+// DEFAULT DESKTOP
138
+// ---------------
139
+
140
+// Required to make the collapsing navbar work on regular desktops
141
+@media (min-width: 980pt) {
142
+  .nav-collapse.collapse {
143
+    height: auto !important;
144
+    overflow: visible !important;
145
+  }
146
+}
0 147
\ No newline at end of file
1 148
new file mode 100644
... ...
@@ -0,0 +1,41 @@
1
+// RESPONSIVE CLASSES
2
+// ------------------
3
+
4
+// Hide from screenreaders and browsers
5
+// Credit: HTML5 Boilerplate
6
+.hidden {
7
+  display: none;
8
+  visibility: hidden;
9
+}
10
+
11
+// Visibility utilities
12
+
13
+// For desktops
14
+.visible-phone     { display: none !important; }
15
+.visible-tablet    { display: none !important; }
16
+.visible-desktop   { } // Don't set initially
17
+.hidden-phone      { }
18
+.hidden-tablet     { }
19
+.hidden-desktop    { display: none !important; }
20
+
21
+// Phones only
22
+@media (max-width: 767pt) {
23
+  // Show
24
+  .visible-phone     { display: inherit !important; } // Use inherit to restore previous behavior
25
+  // Hide
26
+  .hidden-phone      { display: none !important; }
27
+  // Hide everything else
28
+  .hidden-desktop    { display: inherit !important; }
29
+  .visible-desktop   { display: none !important; }
30
+}
31
+
32
+// Tablets & small desktops only
33
+@media (min-width: 768pt) and (max-width: 979pt) {
34
+  // Show
35
+  .visible-tablet    { display: inherit !important; }
36
+  // Hide
37
+  .hidden-tablet     { display: none !important; }
38
+  // Hide everything else
39
+  .hidden-desktop    { display: inherit !important; }
40
+  .visible-desktop   { display: none !important ; }
41
+}
0 42
new file mode 100644
... ...
@@ -0,0 +1,48 @@
1
+/*!
2
+ * Bootstrap Responsive v2.0.3
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+
11
+
12
+// Responsive.less
13
+// For phone and tablet devices
14
+// -------------------------------------------------------------
15
+
16
+
17
+// REPEAT VARIABLES & MIXINS
18
+// -------------------------
19
+// Required since we compile the responsive stuff separately
20
+
21
+@import "variables.less"; // Modify this for custom colors, font-sizes, etc
22
+@import "mixins.less";
23
+
24
+
25
+// RESPONSIVE CLASSES
26
+// ------------------
27
+
28
+@import "responsive-utilities.less";
29
+
30
+
31
+// MEDIA QUERIES
32
+// ------------------
33
+
34
+// Phones to portrait tablets and narrow desktops
35
+@import "responsive-767pt-max.less";
36
+
37
+// Tablets to regular desktops
38
+@import "responsive-768pt-979pt.less";
39
+
40
+// Large desktops
41
+@import "responsive-1200pt-min.less";
42
+
43
+
44
+// RESPONSIVE NAVBAR
45
+// ------------------
46
+
47
+// From 979pt and below, show a button to toggle navbar contents
48
+@import "responsive-navbar.less";
0 49
new file mode 100644
... ...
@@ -0,0 +1,30 @@
1
+// Scaffolding
2
+// Basic and global styles for generating a grid system, structural layout, and page templates
3
+// -------------------------------------------------------------------------------------------
4
+
5
+
6
+// Body reset
7
+// ----------
8
+
9
+body {
10
+  margin: 0;
11
+  font-family: @baseFontFamily;
12
+  font-size: @baseFontSize;
13
+  line-height: @baseLineHeight;
14
+  color: @textColor;
15
+  background-color: @bodyBackground;
16
+  padding-bottom: 40pt;
17
+}
18
+
19
+
20
+// Links
21
+// -----
22
+
23
+a {
24
+  color: @linkColor;
25
+  text-decoration: none;
26
+}
27
+a:hover {
28
+  color: @linkColorHover;
29
+  text-decoration: underline;
30
+}
0 31
new file mode 100644
... ...
@@ -0,0 +1,205 @@
1
+// SPRITES
2
+// Glyphs and icons for buttons, nav, and more
3
+// -------------------------------------------
4
+
5
+.rss {
6
+  display: inline-block;
7
+  width: 16px;
8
+  height: 16px;
9
+  .ie7-restore-right-whitespace();
10
+  line-height: 16px;
11
+  vertical-align: text-top;
12
+  background-image: url("@{rssIconPath}");
13
+  background-position: 0 0;
14
+  background-repeat: no-repeat;
15
+}
16
+
17
+// ICONS
18
+// -----
19
+
20
+// All icons receive the styles of the <i> tag with a base class
21
+// of .i and are then given a unique class to add width, height,
22
+// and background-position. Your resulting HTML will look like
23
+// <i class="icon-inbox"></i>.
24
+
25
+// For the white version of the icons, just add the .icon-white class:
26
+// <i class="icon-inbox icon-white"></i>
27
+
28
+[class^="icon-"],
29
+[class*=" icon-"] {
30
+  display: inline-block;
31
+  width: 14px;
32
+  height: 14px;
33
+  .ie7-restore-right-whitespace();
34
+  line-height: 14px;
35
+  vertical-align: text-top;
36
+  background-image: url("@{iconSpritePath}");
37
+  background-position: 14px 14px;
38
+  background-repeat: no-repeat;
39
+
40
+}
41
+.icon-white {
42
+  background-image: url("@{iconWhiteSpritePath}");
43
+}
44
+.icon-spaced {
45
+  padding:0 3px 0 3px;
46
+}
47
+
48
+.icon-glass              { background-position: 0      0; }
49
+.icon-music              { background-position: -24px  0; }
50
+.icon-search             { background-position: -48px  0; }
51
+.icon-envelope           { background-position: -72px  0; }
52
+.icon-heart              { background-position: -96px  0; }
53
+.icon-star               { background-position: -120px 0; }
54
+.icon-star-empty         { background-position: -144px 0; }
55
+.icon-user               { background-position: -168px 0; }
56
+.icon-film               { background-position: -192px 0; }
57
+.icon-th-large           { background-position: -216px 0; }
58
+.icon-th                 { background-position: -240px 0; }
59
+.icon-th-list            { background-position: -264px 0; }
60
+.icon-ok                 { background-position: -288px 0; }
61
+.icon-remove             { background-position: -312px 0; }
62
+.icon-zoom-in            { background-position: -336px 0; }
63
+.icon-zoom-out           { background-position: -360px 0; }
64
+.icon-off                { background-position: -384px 0; }
65
+.icon-signal             { background-position: -408px 0; }
66
+.icon-cog                { background-position: -432px 0; }
67
+.icon-trash              { background-position: -456px 0; }
68
+
69
+.icon-home               { background-position: 0      -24px; }
70
+.icon-file               { background-position: -24px  -24px; }
71
+.icon-time               { background-position: -48px  -24px; }
72
+.icon-road               { background-position: -72px  -24px; }
73
+.icon-download-alt       { background-position: -96px  -24px; }
74
+.icon-download           { background-position: -120px -24px; }
75
+.icon-upload             { background-position: -144px -24px; }
76
+.icon-inbox              { background-position: -168px -24px; }
77
+.icon-play-circle        { background-position: -192px -24px; }
78
+.icon-repeat             { background-position: -216px -24px; }
79
+.icon-refresh            { background-position: -240px -24px; }
80
+.icon-list-alt           { background-position: -264px -24px; }
81
+.icon-lock               { background-position: -287px -24px; } // 1px off
82
+.icon-flag               { background-position: -312px -24px; }
83
+.icon-headphones         { background-position: -336px -24px; }
84
+.icon-volume-off         { background-position: -360px -24px; }
85
+.icon-volume-down        { background-position: -384px -24px; }
86
+.icon-volume-up          { background-position: -408px -24px; }
87
+.icon-qrcode             { background-position: -432px -24px; }
88
+.icon-barcode            { background-position: -456px -24px; }
89
+
90
+.icon-tag                { background-position: 0      -48px; }
91
+.icon-tags               { background-position: -25px  -48px; } // 1px off
92
+.icon-book               { background-position: -48px  -48px; }
93
+.icon-bookmark           { background-position: -72px  -48px; }
94
+.icon-print              { background-position: -96px  -48px; }
95
+.icon-camera             { background-position: -120px -48px; }
96
+.icon-font               { background-position: -144px -48px; }
97
+.icon-bold               { background-position: -167px -48px; } // 1px off
98
+.icon-italic             { background-position: -192px -48px; }
99
+.icon-text-height        { background-position: -216px -48px; }
100
+.icon-text-width         { background-position: -240px -48px; }
101
+.icon-align-left         { background-position: -264px -48px; }
102
+.icon-align-center       { background-position: -288px -48px; }
103
+.icon-align-right        { background-position: -312px -48px; }
104
+.icon-align-justify      { background-position: -336px -48px; }
105
+.icon-list               { background-position: -360px -48px; }
106
+.icon-indent-left        { background-position: -384px -48px; }
107
+.icon-indent-right       { background-position: -408px -48px; }
108
+.icon-facetime-video     { background-position: -432px -48px; }
109
+.icon-picture            { background-position: -456px -48px; }
110
+
111
+.icon-pencil             { background-position: 0      -72px; }
112
+.icon-map-marker         { background-position: -24px  -72px; }
113
+.icon-adjust             { background-position: -48px  -72px; }
114
+.icon-tint               { background-position: -72px  -72px; }
115
+.icon-edit               { background-position: -96px  -72px; }
116
+.icon-share              { background-position: -120px -72px; }
117
+.icon-check              { background-position: -144px -72px; }
118
+.icon-move               { background-position: -168px -72px; }
119
+.icon-step-backward      { background-position: -192px -72px; }
120
+.icon-fast-backward      { background-position: -216px -72px; }
121
+.icon-backward           { background-position: -240px -72px; }
122
+.icon-play               { background-position: -264px -72px; }
123
+.icon-pause              { background-position: -288px -72px; }
124
+.icon-stop               { background-position: -312px -72px; }
125
+.icon-forward            { background-position: -336px -72px; }
126
+.icon-fast-forward       { background-position: -360px -72px; }
127
+.icon-step-forward       { background-position: -384px -72px; }
128
+.icon-eject              { background-position: -408px -72px; }
129
+.icon-chevron-left       { background-position: -432px -72px; }
130
+.icon-chevron-right      { background-position: -456px -72px; }
131
+
132
+.icon-plus-sign          { background-position: 0      -96px; }
133
+.icon-minus-sign         { background-position: -24px  -96px; }
134
+.icon-remove-sign        { background-position: -48px  -96px; }
135
+.icon-ok-sign            { background-position: -72px  -96px; }
136
+.icon-question-sign      { background-position: -96px  -96px; }
137
+.icon-info-sign          { background-position: -120px -96px; }
138
+.icon-screenshot         { background-position: -144px -96px; }
139
+.icon-remove-circle      { background-position: -168px -96px; }
140
+.icon-ok-circle          { background-position: -192px -96px; }
141
+.icon-ban-circle         { background-position: -216px -96px; }
142
+.icon-arrow-left         { background-position: -240px -96px; }
143
+.icon-arrow-right        { background-position: -264px -96px; }
144
+.icon-arrow-up           { background-position: -289px -96px; } // 1px off
145
+.icon-arrow-down         { background-position: -312px -96px; }
146
+.icon-share-alt          { background-position: -336px -96px; }
147
+.icon-resize-full        { background-position: -360px -96px; }
148
+.icon-resize-small       { background-position: -384px -96px; }
149
+.icon-plus               { background-position: -408px -96px; }
150
+.icon-minus              { background-position: -433px -96px; }
151
+.icon-asterisk           { background-position: -456px -96px; }
152
+
153
+.icon-exclamation-sign   { background-position: 0      -120px; }
154
+.icon-gift               { background-position: -24px  -120px; }
155
+.icon-leaf               { background-position: -48px  -120px; }
156
+.icon-fire               { background-position: -72px  -120px; }
157
+.icon-eye-open           { background-position: -96px  -120px; }
158
+.icon-eye-close          { background-position: -120px -120px; }
159
+.icon-warning-sign       { background-position: -144px -120px; }
160
+.icon-plane              { background-position: -168px -120px; }
161
+.icon-calendar           { background-position: -192px -120px; }
162
+.icon-random             { background-position: -216px -120px; }
163
+.icon-comment            { background-position: -240px -120px; }
164
+.icon-magnet             { background-position: -264px -120px; }
165
+.icon-chevron-up         { background-position: -288px -120px; }
166
+.icon-chevron-down       { background-position: -313px -119px; } // 1px, 1px off
167
+.icon-retweet            { background-position: -336px -120px; }
168
+.icon-shopping-cart      { background-position: -360px -120px; }
169
+.icon-folder-close       { background-position: -384px -120px; }
170
+.icon-folder-open        { background-position: -408px -120px; }
171
+.icon-resize-vertical    { background-position: -432px -119px; } // 1px, 1px off
172
+.icon-resize-horizontal  { background-position: -456px -118px; } // 1px, 2px off
173
+
174
+.icon-hdd                     { background-position: 0      -144px; }
175
+.icon-bullhorn                { background-position: -24px  -144px; }
176
+.icon-bell                    { background-position: -48px  -144px; }
177
+.icon-certificate             { background-position: -72px  -144px; }
178
+.icon-thumbs-up               { background-position: -96px  -144px; }
179
+.icon-thumbs-down             { background-position: -120px -144px; }
180
+.icon-hand-right              { background-position: -144px -144px; }
181
+.icon-hand-left               { background-position: -168px -144px; }
182
+.icon-hand-up                 { background-position: -192px -144px; }
183
+.icon-hand-down               { background-position: -216px -144px; }
184
+.icon-circle-arrow-right      { background-position: -240px -144px; }
185
+.icon-circle-arrow-left       { background-position: -264px -144px; }
186
+.icon-circle-arrow-up         { background-position: -288px -144px; }
187
+.icon-circle-arrow-down       { background-position: -312px -144px; }
188
+.icon-globe                   { background-position: -336px -144px; }
189
+.icon-wrench                  { background-position: -360px -144px; }
190
+.icon-tasks                   { background-position: -384px -144px; }
191
+.icon-filter                  { background-position: -408px -144px; }
192
+.icon-briefcase               { background-position: -432px -144px; }
193
+.icon-fullscreen              { background-position: -456px -144px; }
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
0 206
new file mode 100644
... ...
@@ -0,0 +1,210 @@
1
+//
2
+// Tables.less
3
+// Tables for, you guessed it, tabular data
4
+// ----------------------------------------
5
+
6
+
7
+// BASE TABLES
8
+// -----------------
9
+
10
+table {
11
+  max-width: 100%;
12
+  background-color: @tableBackground;
13
+  border-collapse: collapse;
14
+  border-spacing: 0;
15
+}
16
+
17
+// BASELINE STYLES
18
+// ---------------
19
+
20
+.table {
21
+  width: 100%;
22
+  margin-bottom: @baseLineHeight;
23
+  // Cells
24
+  th,
25
+  td {
26
+    padding: 8pt;
27
+    line-height: @baseLineHeight;
28
+    text-align: left;
29
+    vertical-align: top;
30
+    border-top: 1pt solid @tableBorder;
31
+  }
32
+  th {
33
+    font-weight: bold;
34
+  }
35
+  // Bottom align for column headings
36
+  thead th {
37
+    vertical-align: bottom;
38
+  }
39
+  // Remove top border from thead by default
40
+  caption + thead tr:first-child th,
41
+  caption + thead tr:first-child td,
42
+  colgroup + thead tr:first-child th,
43
+  colgroup + thead tr:first-child td,
44
+  thead:first-child tr:first-child th,
45
+  thead:first-child tr:first-child td {
46
+    border-top: 0;
47
+  }
48
+  // Account for multiple tbody instances
49
+  tbody + tbody {
50
+    border-top: 2pt solid @tableBorder;
51
+  }
52
+}
53
+
54
+
55
+
56
+// CONDENSED TABLE W/ HALF PADDING
57
+// -------------------------------
58
+
59
+.table-condensed {
60
+  th,
61
+  td {
62
+    padding: 4pt 5pt;
63
+  }
64
+}
65
+
66
+
67
+// BORDERED VERSION
68
+// ----------------
69
+
70
+.table-bordered {
71
+  border: 1pt solid @tableBorder;
72
+  border-collapse: separate; // Done so we can round those corners!
73
+  *border-collapse: collapsed; // IE7 can't round corners anyway
74
+  border-left: 0;
75
+  .border-radius(4pt);
76
+  th,
77
+  td {
78
+    border-left: 1pt solid @tableBorder;
79
+  }
80
+  // Prevent a double border
81
+  caption + thead tr:first-child th,
82
+  caption + tbody tr:first-child th,
83
+  caption + tbody tr:first-child td,
84
+  colgroup + thead tr:first-child th,
85
+  colgroup + tbody tr:first-child th,
86
+  colgroup + tbody tr:first-child td,
87
+  thead:first-child tr:first-child th,
88
+  tbody:first-child tr:first-child th,
89
+  tbody:first-child tr:first-child td {
90
+    border-top: 0;
91
+  }
92
+  // For first th or td in the first row in the first thead or tbody
93
+  thead:first-child tr:first-child th:first-child,
94
+  tbody:first-child tr:first-child td:first-child {
95
+    -webkit-border-top-left-radius: 4pt;
96
+            border-top-left-radius: 4pt;
97
+        -moz-border-radius-topleft: 4pt;
98
+  }
99
+  thead:first-child tr:first-child th:last-child,
100
+  tbody:first-child tr:first-child td:last-child {
101
+    -webkit-border-top-right-radius: 4pt;
102
+            border-top-right-radius: 4pt;
103
+        -moz-border-radius-topright: 4pt;
104
+  }
105
+  // For first th or td in the first row in the first thead or tbody
106
+  thead:last-child tr:last-child th:first-child,
107
+  tbody:last-child tr:last-child td:first-child {
108
+    .border-radius(0 0 0 4pt);
109
+    -webkit-border-bottom-left-radius: 4pt;
110
+            border-bottom-left-radius: 4pt;
111
+        -moz-border-radius-bottomleft: 4pt;
112
+  }
113
+  thead:last-child tr:last-child th:last-child,
114
+  tbody:last-child tr:last-child td:last-child {
115
+    -webkit-border-bottom-right-radius: 4pt;
116
+            border-bottom-right-radius: 4pt;
117
+        -moz-border-radius-bottomright: 4pt;
118
+  }
119
+}
120
+
121
+
122
+// ZEBRA-STRIPING
123
+// --------------
124
+
125
+// Default zebra-stripe styles (alternating gray and transparent backgrounds)
126
+.table-striped {
127
+  tbody {
128
+    tr:nth-child(odd) td,
129
+    tr:nth-child(odd) th {
130
+      background-color: @tableBackgroundAccent;
131
+    }
132
+  }
133
+}
134
+
135
+
136
+// HOVER EFFECT
137
+// ------------
138
+// Placed here since it has to come after the potential zebra striping
139
+.table {
140
+  tbody tr:hover td,
141
+  tbody tr:hover th {
142
+    background-color: @tableBackgroundHover;
143
+  }
144
+}
145
+
146
+
147
+// TABLE CELL SIZING
148
+// -----------------
149
+
150
+// Change the columns
151
+table {
152
+  .span1     { .tableColumns(1); }
153
+  .span2     { .tableColumns(2); }
154
+  .span3     { .tableColumns(3); }
155
+  .span4     { .tableColumns(4); }
156
+  .span5     { .tableColumns(5); }
157
+  .span6     { .tableColumns(6); }
158
+  .span7     { .tableColumns(7); }
159
+  .span8     { .tableColumns(8); }
160
+  .span9     { .tableColumns(9); }
161
+  .span10    { .tableColumns(10); }
162
+  .span11    { .tableColumns(11); }
163
+  .span12    { .tableColumns(12); }
164
+  .span13    { .tableColumns(13); }
165
+  .span14    { .tableColumns(14); }
166
+  .span15    { .tableColumns(15); }
167
+  .span16    { .tableColumns(16); }
168
+  .span17    { .tableColumns(17); }
169
+  .span18    { .tableColumns(18); }
170
+  .span19    { .tableColumns(19); }
171
+  .span20    { .tableColumns(20); }
172
+  .span21    { .tableColumns(21); }
173
+  .span22    { .tableColumns(22); }
174
+  .span23    { .tableColumns(23); }
175
+  .span24    { .tableColumns(24); }
176
+}
177
+
178
+.tree {
179
+  width: 100%;
180
+  margin-bottom: @baseLineHeight;
181
+  border: 1pt solid @treeHeaderBorder;
182
+  thead th {
183
+    padding: 8pt;
184
+    line-height: @baseLineHeight;
185
+    text-align: left;
186
+    vertical-align: bottom;
187
+    #gradient > .vertical(@treeHeaderHighlight, @treeHeader);
188
+    border-bottom: 1pt solid lighten(@treeHeaderBorder, 5%);
189
+    font-weight: bold;
190
+    color: @white;
191
+    text-shadow: 1pt 1pt 1pt hsla(0,0%,0%,0.5);
192
+  }
193
+  tbody td {
194
+    padding: 8pt;
195
+    line-height: @baseLineHeight;
196
+    text-align: left;
197
+    vertical-align: top;
198
+    border-bottom: 1pt solid #EEE;
199
+    background-color: lighten(@bodyBackground, 15%);
200
+  }
201
+  caption + thead tr:first-child th,
202
+  caption + thead tr:first-child td,
203
+  colgroup + thead tr:first-child th,
204
+  colgroup + thead tr:first-child td,
205
+  thead:first-child tr:first-child th,
206
+  thead:first-child tr:first-child td {
207
+    border-top: 0;
208
+  }
209
+  tbody tr:last-child td{border-bottom:0;}
210
+}
0 211
new file mode 100644
... ...
@@ -0,0 +1,47 @@
1
+// THUMBNAILS
2
+// ----------
3
+// Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files
4
+
5
+// Make wrapper ul behave like the grid
6
+.thumbnails {
7
+  margin-left: -@gridGutterWidth;
8
+  list-style: none;
9
+  .clearfix();
10
+}
11
+// Fluid rows have no left margin
12
+.row-fluid .thumbnails {
13
+  margin-left: 0;
14
+}
15
+
16
+// Float li to make thumbnails appear in a row
17
+.thumbnails > li {
18
+  float: left; // Explicity set the float since we don't require .span* classes
19
+  margin-bottom: @baseLineHeight;
20
+  margin-left: @gridGutterWidth;
21
+}
22
+
23
+// The actual thumbnail (can be `a` or `div`)
24
+.thumbnail {
25
+  display: block;
26
+  padding: 4pt;
27
+  line-height: 1;
28
+  border: 1pt solid #ddd;
29
+  .border-radius(4pt);
30
+  .box-shadow(0 1pt 1pt rgba(0,0,0,.075));
31
+}
32
+// Add a hover state for linked versions only
33
+a.thumbnail:hover {
34
+  border-color: @linkColor;
35
+  .box-shadow(0 1pt 4pt rgba(0,105,214,.25));
36
+}
37
+
38
+// Images and captions
39
+.thumbnail > img {
40
+  display: block;
41
+  max-width: 100%;
42
+  margin-left: auto;
43
+  margin-right: auto;
44
+}
45
+.thumbnail .caption {
46
+  padding: 9pt;
47
+}
0 48
new file mode 100644
... ...
@@ -0,0 +1,35 @@
1
+// TOOLTIP
2
+// ------=
3
+
4
+.tooltip {
5
+  position: absolute;
6
+  z-index: @zindexTooltip;
7
+  display: block;
8
+  visibility: visible;
9
+  padding: 5pt;
10
+  font-size: 11pt;
11
+  .opacity(0);
12
+  &.in     { .opacity(80); }
13
+  &.top    { margin-top:  -2pt; }
14
+  &.right  { margin-left:  2pt; }
15
+  &.bottom { margin-top:   2pt; }
16
+  &.left   { margin-left: -2pt; }
17
+  &.top .tooltip-arrow    { #popoverArrow > .top(); }
18
+  &.left .tooltip-arrow   { #popoverArrow > .left(); }
19
+  &.bottom .tooltip-arrow { #popoverArrow > .bottom(); }
20
+  &.right .tooltip-arrow  { #popoverArrow > .right(); }
21
+}
22
+.tooltip-inner {
23
+  max-width: 200pt;
24
+  padding: 3pt 8pt;
25
+  color: @white;
26
+  text-align: center;
27
+  text-decoration: none;
28
+  background-color: @black;
29
+  .border-radius(4pt);
30
+}
31
+.tooltip-arrow {
32
+  position: absolute;
33
+  width: 0;
34
+  height: 0;
35
+}
0 36
new file mode 100644
... ...
@@ -0,0 +1,235 @@
1
+// Typography.less
2
+// Headings, body text, lists, code, and more for a versatile and durable typography system
3
+// ----------------------------------------------------------------------------------------
4
+
5
+
6
+// BODY TEXT
7
+// ---------
8
+
9
+p {
10
+  margin: 0 0 @baseLineHeight / 2;
11
+  font-family: @baseFontFamily;
12
+  font-size: @baseFontSize;
13
+  line-height: @baseLineHeight;
14
+  small {
15
+    font-size: @baseFontSize - 2;
16
+    color: @grayLight;
17
+  }
18
+}
19
+.lead {
20
+  margin-bottom: @baseLineHeight;
21
+  font-size: 20pt;
22
+  font-weight: 200;
23
+  line-height: @baseLineHeight * 1.5;
24
+}
25
+
26
+// HEADINGS
27
+// --------
28
+
29
+h1, h2, h3, h4, h5, h6 {
30
+  margin: 0;
31
+  font-family: @headingsFontFamily;
32
+  font-weight: @headingsFontWeight;
33
+  color: @headingsColor;
34
+  text-rendering: optimizelegibility; // Fix the character spacing for headings
35
+  small {
36
+    font-weight: normal;
37
+    color: @grayLight;
38
+  }
39
+}
40
+h1 {
41
+  font-size: 30pt;
42
+  line-height: @baseLineHeight * 2;
43
+  small {
44
+    font-size: 18pt;
45
+  }
46
+}
47
+h2 {
48
+  font-size: 24pt;
49
+  line-height: @baseLineHeight * 2;
50
+  small {
51
+    font-size: 18pt;
52
+  }
53
+}
54
+h3 {
55
+  font-size: 18pt;
56
+  line-height: @baseLineHeight * 1.5;
57
+  small {
58
+    font-size: 14pt;
59
+  }
60
+}
61
+h4, h5, h6 {
62
+  line-height: @baseLineHeight;
63
+}
64
+h4 {
65
+  font-size: 14pt;
66
+  small {
67
+    font-size: 12pt;
68
+  }
69
+}
70
+h5 {
71
+  font-size: 12pt;
72
+}
73
+h6 {
74
+  font-size: 11pt;
75
+  color: @grayLight;
76
+  text-transform: uppercase;
77
+}
78
+
79
+// Page header
80
+.page-header {
81
+  padding-bottom: @baseLineHeight - 1;
82
+  margin: @baseLineHeight 0;
83
+  border-bottom: 1pt solid @grayLighter;
84
+}
85
+.page-header h1 {
86
+  line-height: 1;
87
+}
88
+
89
+
90
+
91
+// LISTS
92
+// -----
93
+
94
+// Unordered and Ordered lists
95
+ul, ol {
96
+  padding: 0;
97
+  margin: 0 0 @baseLineHeight / 2 25pt;
98
+}
99
+ul ul,
100
+ul ol,
101
+ol ol,
102
+ol ul {
103
+  margin-bottom: 0;
104
+}
105
+ul {
106
+  list-style: disc;
107
+}
108
+ol {
109
+  list-style: decimal;
110
+}
111
+li {
112
+  line-height: @baseLineHeight;
113
+}
114
+ul.unstyled,
115
+ol.unstyled {
116
+  margin-left: 0;
117
+  list-style: none;
118
+}
119
+
120
+// Description Lists
121
+dl {
122
+  margin-bottom: @baseLineHeight;
123
+}
124
+dt,
125
+dd {
126
+  line-height: @baseLineHeight;
127
+}
128
+dt {
129
+  font-weight: bold;
130
+  line-height: @baseLineHeight - 1; // fix jank Helvetica Neue font bug
131
+}
132
+dd {
133
+  margin-left: @baseLineHeight / 2;
134
+}
135
+// Horizontal layout (like forms)
136
+.dl-horizontal {
137
+  dt {
138
+    float: left;
139
+    width: 120pt;
140
+    clear: left;
141
+    text-align: right;
142
+    .text-overflow();
143
+  }
144
+  dd {
145
+    margin-left: 130pt;
146
+  }
147
+}
148
+
149
+// MISC
150
+// ----
151
+
152
+// Horizontal rules
153
+hr {
154
+  margin: @baseLineHeight 0;
155
+  border: 0;
156
+  border-top: 1pt solid @hrBorder;
157
+  border-bottom: 1pt solid @white;
158
+}
159
+
160
+// Emphasis
161
+strong {
162
+  font-weight: bold;
163
+}
164
+em {
165
+  font-style: italic;
166
+}
167
+.muted {
168
+  color: @grayLight;
169
+}
170
+
171
+// Abbreviations and acronyms
172
+abbr[title] {
173
+  cursor: help;
174
+  border-bottom: 1pt dotted #ddd;
175
+}
176
+abbr.initialism {
177
+  font-size: 90%;
178
+  text-transform: uppercase;
179
+}
180
+
181
+// Blockquotes
182
+blockquote {
183
+  padding: 0 0 0 15pt;
184
+  margin: 0 0 @baseLineHeight;
185
+  border-left: 5pt solid @grayLighter;
186
+  p {
187
+    margin-bottom: 0;
188
+    #font > .shorthand(16pt,300,@baseLineHeight * 1.25);
189
+  }
190
+  small {
191
+    display: block;
192
+    line-height: @baseLineHeight;
193
+    color: @grayLight;
194
+    &:before {
195
+      content: '\2014 \00A0';
196
+    }
197
+  }
198
+
199
+  // Float right with text-align: right
200
+  &.pull-right {
201
+    float: right;
202
+    padding-right: 15pt;
203
+    padding-left: 0;
204
+    border-right: 5pt solid @grayLighter;
205
+    border-left: 0;
206
+    p,
207
+    small {
208
+      text-align: right;
209
+    }
210
+  }
211
+}
212
+
213
+// Quotes
214
+q:before,
215
+q:after,
216
+blockquote:before,
217
+blockquote:after {
218
+  content: "";
219
+}
220
+
221
+// Addresses
222
+address {
223
+  display: block;
224
+  margin-bottom: @baseLineHeight;
225
+  font-style: normal;
226
+  line-height: @baseLineHeight;
227
+}
228
+
229
+// Misc
230
+small {
231
+  font-size: 100%;
232
+}
233
+cite {
234
+  font-style: normal;
235
+}
0 236
new file mode 100644
... ...
@@ -0,0 +1,31 @@
1
+// UTILITY CLASSES
2
+// ---------------
3
+
4
+// Quick floats
5
+.pull-right {
6
+  float: right;
7
+}
8
+.pull-left {
9
+  float: left;
10
+}
11
+
12
+// Toggling content
13
+.hide {
14
+  display: none;
15
+}
16
+.show {
17
+  display: block;
18
+}
19
+
20
+// Visibility
21
+.invisible {
22
+  visibility: hidden;
23
+}
24
+
25
+.space-right {
26
+  padding: 0 8pt 0 0;
27
+}
28
+
29
+.space-left {
30
+  padding: 0 0 0 8pt;
31
+}
0 32
\ No newline at end of file
1 33
new file mode 100644
... ...
@@ -0,0 +1,219 @@
1
+// Variables.less
2
+// Variables to customize the look and feel of Bootstrap
3
+// -----------------------------------------------------
4
+
5
+
6
+
7
+// GLOBAL VALUES
8
+// --------------------------------------------------
9
+
10
+
11
+// Grays
12
+// -------------------------
13
+@black:                 #000;
14
+@grayDarker:            #222;
15
+@grayDark:              #333;
16
+@gray:                  #555;
17
+@grayLight:             #999;
18
+@grayLighter:           #eee;
19
+@white:                 #fff;
20
+
21
+
22
+// Accent colors
23
+// -------------------------
24
+@blue:                  #049cdb;
25
+@blueDark:              #0064cd;
26
+@green:                 #46a546;
27
+@red:                   #9d261d;
28
+@yellow:                #ffc40d;
29
+@orange:                #f89406;
30
+@pink:                  #c3325f;
31
+@purple:                #7a43b6;
32
+
33
+
34
+// Scaffolding
35
+// -------------------------
36
+@bodyBackground:        @black;
37
+@textColor:             @white;
38
+
39
+
40
+// Links
41
+// -------------------------
42
+@linkColor:             #4183c4;
43
+@linkColorHover:        darken(@linkColor, 15%);
44
+
45
+
46
+// Typography
47
+// -------------------------
48
+@import url(http://fonts.googleapis.com/css?family=Lato:300,400,700,900,400italic|Source+Code+Pro:200,300,400,500,600,700,900);
49
+@sansFontFamily:        "Lato", Helvetica, Arial, sans-serif;
50
+@serifFontFamily:       Georgia, "Times New Roman", Times, serif;
51
+@monoFontFamily:        "Source Code Pro", Menlo, Monaco, Consolas, "Courier New", monospace;
52
+
53
+@baseFontSize:          13pt;
54
+@baseFontFamily:        @sansFontFamily;
55
+@baseLineHeight:        18pt;
56
+@altFontFamily:         @serifFontFamily;
57
+
58
+@headingsFontFamily:    inherit; // empty to use BS default, @baseFontFamily
59
+@headingsFontWeight:    bold;    // instead of browser default, bold
60
+@headingsColor:         inherit; // empty to use BS default, @textColor
61
+
62
+
63
+// Tables
64
+// -------------------------
65
+@tableBackground:                   transparent; // overall background-color
66
+@tableBackgroundAccent:             lighten(@bodyBackground, 10%); // for striping
67
+@tableBackgroundHover:              lighten(@bodyBackground, 5%); // for hover
68
+@tableBorder:                       lighten(@bodyBackground, 20%); // table and cell border
69
+
70
+
71
+// Buttons
72
+// -------------------------
73
+@btnBackground:                     @black;
74
+@btnBackgroundHighlight:            lighten(@black, 10%);
75
+@btnBorder:                         #ccc;
76
+
77
+@btnPrimaryBackground:              @linkColor;
78
+@btnPrimaryBackgroundHighlight:     spin(@btnPrimaryBackground, 10%);
79
+
80
+@btnInfoBackground:                 #5bc0de;
81
+@btnInfoBackgroundHighlight:        #2f96b4;
82
+
83
+@btnSuccessBackground:              #62c462;
84
+@btnSuccessBackgroundHighlight:     #51a351;
85
+
86
+@btnWarningBackground:              lighten(@orange, 15%);
87
+@btnWarningBackgroundHighlight:     @orange;
88
+
89
+@btnDangerBackground:               #ee5f5b;
90
+@btnDangerBackgroundHighlight:      #bd362f;
91
+
92
+@btnInverseBackground:              @gray;
93
+@btnInverseBackgroundHighlight:     @grayDarker;
94
+
95
+
96
+// Forms
97
+// -------------------------
98
+@inputBackground:               @black;
99
+@inputBorder:                   #ccc;
100
+@inputBorderRadius:             3pt;
101
+@inputDisabledBackground:       @grayLighter;
102
+@formActionsBackground:         #f5f5f5;
103
+
104
+// Dropdowns
105
+// -------------------------
106
+@dropdownBackground:            @grayDark;
107
+@dropdownBorder:                rgba(0,0,0,.2);
108
+@dropdownLinkColor:             @gray;
109
+@dropdownLinkColorHover:        @white;
110
+@dropdownLinkBackgroundHover:   @linkColor;
111
+
112
+
113
+
114
+
115
+// COMPONENT VARIABLES
116
+// --------------------------------------------------
117
+
118
+// Z-index master list
119
+// -------------------------
120
+// Used for a bird's eye view of components dependent on the z-axis
121
+// Try to avoid customizing these :)
122
+@zindexDropdown:          1000;
123
+@zindexPopover:           1010;
124
+@zindexTooltip:           1020;
125
+@zindexFixedNavbar:       1030;
126
+@zindexModalBackdrop:     1040;
127
+@zindexModal:             1050;
128
+
129
+
130
+// Sprite icons path
131
+// -------------------------
132
+@iconSpritePath:          "../img/glyphicons-halflings.png";
133
+@iconWhiteSpritePath:     "../img/glyphicons-halflings-white.png";
134
+@rssIconPath:             "../img/feed.png";
135
+@ajaxLoaderPath:             "../img/ajax-loader.gif";
136
+
137
+// Input placeholder text color
138
+// -------------------------
139
+@placeholderText:         @grayLight;
140
+
141
+
142
+// Hr border color
143
+// -------------------------
144
+@hrBorder:                @grayLighter;
145
+
146
+
147
+// Navbar
148
+// -------------------------
149
+@navbarHeight:                    40pt;
150
+@navbarBackground:                lighten(@bodyBackground, 10%);
151
+@navbarBackgroundHighlight:       lighten(@bodyBackground, 40%);
152
+@navbarBorderColor:               lighten(@bodyBackground, 50%);
153
+
154
+@navbarText:                      @grayDark;
155
+@navbarLinkColor:                 @grayLight;
156
+@navbarLinkColorHover:            @linkColor;
157
+@navbarLinkColorActive:           @navbarLinkColorHover;
158
+
159
+@navbarSearchBackground:          lighten(@navbarBackground, 25%);
160
+@navbarSearchBackgroundFocus:     @white;
161
+@navbarSearchBorder:              darken(@navbarSearchBackground, 30%);
162
+@navbarSearchPlaceholderColor:    #ccc;
163
+@navbarBrandColor:                @navbarLinkColor;
164
+
165
+
166
+// Hero unit
167
+// -------------------------
168
+@heroUnitBackground:              @grayLighter;
169
+@heroUnitHeadingColor:            inherit;
170
+@heroUnitLeadColor:               inherit;
171
+
172
+
173
+// Form states and alerts
174
+// -------------------------
175
+@warningText:             #c09853;
176
+@warningBackground:       #fcf8e3;
177
+@warningBorder:           darken(spin(@warningBackground, -10), 3%);
178
+
179
+@errorText:               #b94a48;
180
+@errorBackground:         #f2dede;
181
+@errorBorder:             darken(spin(@errorBackground, -10), 3%);
182
+
183
+@successText:             #468847;
184
+@successBackground:       #dff0d8;
185
+@successBorder:           darken(spin(@successBackground, -10), 5%);
186
+
187
+@infoText:                #3a87ad;
188
+@infoBackground:          #d9edf7;
189
+@infoBorder:              darken(spin(@infoBackground, -10), 7%);
190
+
191
+
192
+
193
+// GRID
194
+// --------------------------------------------------
195
+
196
+// Wide 720pt grid
197
+// -------------------------
198
+@wideGridColumns:             12;
199
+@wideGridColumnWidth:         60pt;
200
+@wideGridGutterWidth:         20pt;
201
+@wideGridRowWidth:            (@wideGridColumns * @wideGridColumnWidth) + (@wideGridGutterWidth * (@wideGridColumns - 1));
202
+
203
+
204
+// Default 480pt grid
205
+// -------------------------
206
+@gridColumns:             12;
207
+@gridColumnWidth:         40pt;
208
+@gridGutterWidth:         20pt;
209
+@gridRowWidth:            (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
210
+
211
+// Fluid grid
212
+// -------------------------
213
+@fluidGridColumnWidth:    6.382978723%;
214
+@fluidGridGutterWidth:    2.127659574%;
215
+
216
+// Tree
217
+@treeHeader:                   @navbarBackground;
218
+@treeHeaderHighlight:          @navbarBackgroundHighlight;
219
+@treeHeaderBorder:             @navbarBorderColor;
0 220
new file mode 100644
... ...
@@ -0,0 +1,27 @@
1
+// WELLS
2
+// -----
3
+
4
+.well {
5
+  min-height: 20pt;
6
+  padding: 19pt;
7
+  margin-bottom: 20pt;
8
+  background-color: #f5f5f5;
9
+  border: 1pt solid #eee;
10
+  border: 1pt solid rgba(0,0,0,.05);
11
+  .border-radius(4pt);
12
+  .box-shadow(inset 0 1pt 1pt rgba(0,0,0,.05));
13
+  blockquote {
14
+    border-color: #ddd;
15
+    border-color: rgba(0,0,0,.15);
16
+  }
17
+}
18
+
19
+// Sizes
20
+.well-large {
21
+  padding: 24pt;
22
+  .border-radius(6pt);
23
+}
24
+.well-small {
25
+  padding: 9pt;
26
+  .border-radius(3pt);
27
+}
0 28
new file mode 100644
... ...
@@ -0,0 +1,25 @@
1
+{% extends 'layout_page.twig' %}
2
+
3
+{% set page = 'commits' %}
4
+
5
+{% block title %}GitList{% endblock %}
6
+
7
+{% block content %}
8
+    {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Blame', path:''}]} %}
9
+
10
+    <div class="source-view">
11
+        <div class="source-header">
12
+            <div class="meta">{{ file }}</div>
13
+        </div>
14
+        <table class="blame-view">
15
+        {% for blame in blames %}
16
+            <tr>
17
+                <td class="commit"><a href="{{ path('commit', {repo: repo, commit: blame.commit}) }}">{{ blame.commitShort }}</a></td>
18
+                <td><pre>{{ blame.line }}</pre></td>
19
+            </tr>
20
+        {% endfor %}
21
+        </table>
22
+    </div>
23
+
24
+    <hr />
25
+{% endblock %}
0 26
new file mode 100644
... ...
@@ -0,0 +1,21 @@
1
+<div class="btn-group pull-left space-right" id="branchList">
2
+    <button class="btn dropdown-toggle" data-toggle="dropdown">browsing: <strong>{{ branch }}</strong> <span class="caret"></span></button>
3
+
4
+    <div class="dropdown-menu">
5
+        <div class="search">
6
+            <input class="search" placeholder="Filter branch/tags" autofocus>
7
+        </div>
8
+    <ul class="unstyled list">
9
+    <li class="dropdown-header">Branches</li>
10
+    {% for item in branches %}
11
+        <li><a href="{{ path('branch', {repo: repo, branch: item}) }}"><span class="item">{{ item }}</span></a></li>
12
+    {% endfor %}
13
+    {% if tags %}
14
+    <li class="dropdown-header">Tags</li>
15
+    {% for item in tags %}
16
+        <li><a href="{{ path('branch', {repo: repo, branch: item}) }}"><span class="item">{{ item }}</span></a></li>
17
+    {% endfor %}
18
+    {% endif %}
19
+    </ul>
20
+    </div>
21
+</div>
0 22
\ No newline at end of file
1 23
new file mode 100644
... ...
@@ -0,0 +1,9 @@
1
+<ul class="breadcrumb">
2
+    <li><a href="{{ path('tree', {repo: repo, commitishPath: branch}) }}">{{ repo }}</a></li>
3
+    {% for breadcrumb in breadcrumbs %}
4
+        <span class="divider">/</span>
5
+        <li{% if loop.last %} class="active"{% endif %}>{% if not loop.last %}<a href="{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ breadcrumb.path}) }}">{{ breadcrumb.dir }}</a>{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %}</li>
6
+    {% endfor %}
7
+
8
+    {% block extra %}{% endblock %}
9
+</ul>
0 10
new file mode 100644
... ...
@@ -0,0 +1,76 @@
1
+{% extends 'layout_page.twig' %}
2
+
3
+{% set page = 'commits' %}
4
+
5
+{% block title %}GitList{% endblock %}
6
+
7
+{% block content %}
8
+    {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: "Commit #{commit.hash}", path:''}]} %}
9
+
10
+    <div class="commit-view">
11
+        <div class="commit-header">
12
+            <span class="pull-right"><a class="btn btn-small" href="{{ path('branch', {repo: repo, branch: commit.hash}) }}" title="Browse code at this point in history"><i class="icon-list-alt"></i> Browse code</a></span>
13
+            <h4>{{ commit.message }}</h4>
14
+        </div>
15
+        <div class="commit-body">
16
+            {% if commit.body is not empty %}
17
+            <p>{{ commit.body | nl2br }}</p>
18
+            {% endif %}
19
+            <img src="https://gravatar.com/avatar/{{ commit.author.email | lower | md5 }}?s=32" class="pull-left space-right" />
20
+            <span><a href="mailto:{{ commit.author.email }}">{{ commit.author.name }}</a> authored on {{ commit.date | format_date }}<br />Showing {{ commit.changedFiles }} changed files</span>
21
+        </div>
22
+    </div>
23
+
24
+    <ul class="commit-list">
25
+        {% for diff in commit.diffs %}
26
+            <li><i class="icon-file"></i> <a href="#{{ loop.index }}">{{ diff.file }}</a> <span class="meta pull-right">{{ diff.index }}</span></li>
27
+        {% endfor %}
28
+    </ul>
29
+
30
+    {% for diff in commit.diffs %}
31
+    <div class="source-view">
32
+        <div class="source-header">
33
+            <div class="meta"><a name="{{ loop.index }}">{{ diff.file }}</div>
34
+
35
+            <div class="btn-group pull-right">
36
+                <a href="{{ path('commits', {repo: repo, commitishPath: commit.hash ~ '/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
37
+                <a href="{{ path('blob', {repo: repo, commitishPath: commit.hash ~'/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-file"></i> View file @ {{ commit.shortHash }}</a>
38
+            </div>
39
+        </div>
40
+
41
+        <div class="source-diff">
42
+        <table>
43
+        {% for line in diff.getLines %}
44
+            <tr>
45
+                <td class="lineNo">
46
+                    {% if line.getType != 'chunk' %}
47
+                        <a name="L{{ loop.index }}R{{ line.getNumOld }}"></a>
48
+                        <a href="#L{{ loop.index }}L{{ line.getNumOld }}">
49
+                    {% endif %}
50
+                    {{ line.getNumOld }}
51
+                    {% if line.getType != 'chunk' %}
52
+                        </a>
53
+                    {% endif %}
54
+                </td>
55
+                <td class="lineNo">
56
+                    {% if line.getType != 'chunk' %}
57
+                        <a name="L{{ loop.index }}L{{ line.getNumNew }}"></a>
58
+                        <a href="#L{{ loop.index }}L{{ line.getNumNew }}">
59
+                    {% endif %}
60
+                    {{ line.getNumNew }}
61
+                    {% if line.getType != 'chunk' %}
62
+                        </a>
63
+                    {% endif %}
64
+                </td>
65
+                <td style="width: 100%">
66
+                    <pre{% if line.getType %} class="{{ line.getType }}"{% endif %}>{{ line.getLine }}</pre>
67
+                </td>
68
+            </tr>
69
+        {% endfor %}
70
+        </table>
71
+        </div>
72
+    </div>
73
+    {% endfor %}
74
+
75
+    <hr />
76
+{% endblock %}
0 77
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+{% extends 'layout_page.twig' %}
2
+
3
+{% set page = 'commits' %}
4
+
5
+{% block title %}GitList{% endblock %}
6
+
7
+{% block content %}
8
+    {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Commit history', path:''}]} %}
9
+
10
+    {% include 'commits_list.twig' %}
11
+
12
+    <hr />
13
+{% endblock %}
0 14
new file mode 100644
... ...
@@ -0,0 +1,40 @@
1
+{% if commits %}
2
+{% for date, commit in commits %}
3
+<table class="table table-striped table-bordered">
4
+    <thead>
5
+        <tr>
6
+            <th colspan="3">{{ date | date("F j, Y") }}</th>
7
+        </tr>
8
+    </thead>
9
+    <tbody>
10
+        {% for item in commit %}
11
+        <tr>
12
+            <td width="5%"><img src="https://gravatar.com/avatar/{{ item.author.email | lower | md5 }}?s=40" /></td>
13
+            <td width="95%">
14
+                <span class="pull-right"><a class="btn btn-small" href="{{ path('commit', {repo: repo, commit: item.hash}) }}"><i class="icon-list-alt"></i> View {{ item.shortHash }}</a></span>
15
+                <h4>{{ item.message }}</h4>
16
+                <span><a href="mailto:{{ item.author.email }}">{{ item.author.name }}</a> authored on {{ item.date | format_date }}</span>
17
+            </td>
18
+        </tr>
19
+        {% endfor %}
20
+    </tbody>
21
+</table>
22
+{% endfor %}
23
+{% else %}
24
+<p>No results found.</p>
25
+{% endif %}
26
+
27
+{% if page != 'searchcommits' %}
28
+<ul class="pager">
29
+    {% if pager.current != 0 %}
30
+    <li class="previous">
31
+        <a href="?page={{ pager.previous }}">&larr; Newer</a>
32
+    </li>
33
+    {% endif %}
34
+    {% if pager.current != pager.last %}
35
+    <li class="next">
36
+        <a href="?page={{ pager.next }}">Older &rarr;</a>
37
+    </li>
38
+    {% endif %}
39
+</ul>
40
+{% endif %}
0 41
new file mode 100644
... ...
@@ -0,0 +1,17 @@
1
+{% extends 'layout.twig' %}
2
+{% block title %}GitList{% endblock %}
3
+
4
+{% block body %}
5
+{% include 'navigation.twig' %}
6
+
7
+<div class="container">
8
+
9
+    <div class="alert alert-error">
10
+        <strong>Oops!</strong> {{ message }}
11
+    </div>
12
+
13
+    <hr />
14
+
15
+    {% include 'footer.twig' %}
16
+</div>
17
+{% endblock %}
0 18
new file mode 100644
... ...
@@ -0,0 +1,32 @@
1
+{% extends 'layout_page.twig' %}
2
+
3
+{% set page = 'files' %}
4
+
5
+{% block title %}GitList{% endblock %}
6
+
7
+{% block content %}
8
+    {% include 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %}
9
+
10
+    <div class="source-view">
11
+        <div class="source-header">
12
+            <div class="meta"></div>
13
+
14
+            <div class="btn-group pull-right">
15
+                <a href="{{ path('blob_raw', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-file"></i> Raw</a>
16
+                <a href="{{ path('blame', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-bullhorn"></i> Blame</a>
17
+                <a href="{{ path('commits', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
18
+            </div>
19
+        </div>
20
+        {% if fileType == 'image' %}
21
+        <center><img src="{{ path('blob_raw', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" alt="{{ file }}" class="image-blob" /></center>
22
+
23
+        {% elseif fileType == 'markdown' %}
24
+        <div class="md-view"><div id="md-content">{{ blob }}</div></div>
25
+
26
+        {% else %}
27
+        <pre id="sourcecode" language="{{ fileType }}">{{ blob|htmlentities|raw }}</pre>
28
+        {% endif %}
29
+    </div>
30
+
31
+    <hr />
32
+{% endblock %}
0 33
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+<footer>
2
+    <p>Powered by <a href="https://github.com/klaussilveira/gitlist">GitList 0.4.0</a></p>
3
+</footer>
0 4
new file mode 100644
... ...
@@ -0,0 +1,37 @@
1
+{% extends 'layout.twig' %}
2
+{% block title %}git.elangley.org{% endblock %}
3
+
4
+{% block body %}
5
+{% include 'navigation.twig' %}
6
+
7
+<div class="container" id="repositories">
8
+    <div class="search">
9
+        <input class="search" placeholder="search" autofocus>
10
+    </div>
11
+
12
+    <div class="list">
13
+        {% for repository in repositories %}
14
+        <div class="repository">
15
+            {% if repository.description %}
16
+               <div class="repository-header">
17
+                  <span class="ltr-border"><i class="icon-folder-open icon-spaced"></i> <a href="{{ path('repository', {repo: repository.name}) }}"><span class="name">{{ repository.name }}</span></a></span>
18
+                   <a href="{{ path('rss', {repo: repository.name, branch: 'master'}) }}"><i class="rss pull-right"></i></a>
19
+               </div>
20
+               <div class="repository-body">
21
+                  <p>{{ repository.description }}</p>
22
+               </div>
23
+            {% else %}
24
+               <div class="repository-header">
25
+                 <i class="icon-folder-open icon-spaced"></i> <a href="{{ path('repository', {repo: repository.name}) }}"><span class="name">{{ repository.name }}</span></a>
26
+                 <a href="{{ path('rss', {repo: repository.name, branch: 'master'}) }}"><i class="rss pull-right"></i></a>
27
+               </div>
28
+            {% endif %}
29
+        </div>
30
+        {% endfor %}
31
+    </div>
32
+
33
+    <hr />
34
+
35
+    {% include 'footer.twig' %}
36
+</div>
37
+{% endblock %}
0 38
new file mode 100644
... ...
@@ -0,0 +1,54 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+    <head>
4
+        <meta charset="UTF-8" />
5
+        <title>{% block title %}Welcome!{% endblock %}</title>
6
+        <link rel="stylesheet" type="text/css" href="{{ app.request.basepath }}/themes/{{ app.theme }}/css/style.css">
7
+        <link rel="apple-touch-icon" sizes="57x57" href="/themes/ed/img/apple-touch-icon-57x57.png">
8
+        <link rel="apple-touch-icon" sizes="114x114" href="/themes/ed/img/apple-touch-icon-114x114.png">
9
+        <link rel="apple-touch-icon" sizes="72x72" href="/themes/ed/img/apple-touch-icon-72x72.png">
10
+        <link rel="apple-touch-icon" sizes="144x144" href="/themes/ed/img/apple-touch-icon-144x144.png">
11
+        <link rel="apple-touch-icon" sizes="60x60" href="/themes/ed/img/apple-touch-icon-60x60.png">
12
+        <link rel="apple-touch-icon" sizes="120x120" href="/themes/ed/img/apple-touch-icon-120x120.png">
13
+        <link rel="apple-touch-icon" sizes="76x76" href="/themes/ed/img/apple-touch-icon-76x76.png">
14
+        <link rel="apple-touch-icon" sizes="152x152" href="/themes/ed/img/apple-touch-icon-152x152.png">
15
+        <link rel="apple-touch-icon" sizes="180x180" href="/themes/ed/img/apple-touch-icon-180x180.png">
16
+        <link rel="icon" type="image/png" href="/themes/ed/img/favicon-192x192.png" sizes="192x192">
17
+        <link rel="icon" type="image/png" href="/themes/ed/img/favicon-160x160.png" sizes="160x160">
18
+        <link rel="icon" type="image/png" href="/themes/ed/img/favicon-96x96.png" sizes="96x96">
19
+        <link rel="icon" type="image/png" href="/themes/ed/img/favicon-16x16.png" sizes="16x16">
20
+        <link rel="icon" type="image/png" href="/themes/ed/img/favicon-32x32.png" sizes="32x32">
21
+        <link rel="icon" type="image/png" href="/themes/ed/img/favicon-48x48.png" sizes="48x48">
22
+        <link rel="shortcut icon" href="/themes/ed/img/favicon.ico">
23
+        <meta name="msapplication-TileColor" content="#6fc8d4">
24
+        <meta name="msapplication-TileImage" content="/themes/ed/img/mstile-144x144.png">
25
+        <meta name="msapplication-config" content="/themes/ed/img/browserconfig.xml">
26
+        <!--[if lt IE 9]>
27
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/html5.js"></script>
28
+        <![endif]-->
29
+        <script>
30
+           (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
31
+           (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
32
+           m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
33
+           })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
34
+
35
+           ga('create', 'UA-55883111-1', 'auto');
36
+           ga('send', 'pageview');
37
+
38
+        </script>
39
+    </head>
40
+
41
+    <body>
42
+        {% block body %}{% endblock %}
43
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/jquery.js"></script>
44
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/raphael.js"></script>
45
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/bootstrap.js"></script>
46
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/codemirror.js"></script>
47
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/commonlisp.js"></script>
48
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/showdown.js"></script>
49
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/table.js"></script>
50
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/list.min.js"></script>
51
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/main.js"></script>
52
+        <script src="{{ app.request.basepath }}/themes/{{ app.theme }}/js/networkGraph.js"></script>
53
+    </body>
54
+</html>
0 55
new file mode 100644
... ...
@@ -0,0 +1,31 @@
1
+{% extends 'layout.twig' %}
2
+
3
+{% block body %}
4
+    {% include 'navigation.twig' %}
5
+
6
+    <div class="container">
7
+        <div class="row">
8
+            <div class="span12">
9
+                {% if page in ['commits', 'searchcommits'] %}
10
+                <form class="form-search pull-right" action="{{ app.request.basepath }}/{{repo}}/commits/{{branch}}/search" method="POST">
11
+                    <input type="text" name="query" class="input-medium search-query" placeholder="Search commits..." value="{{ query | default("") }}">
12
+                </form>
13
+                {% else %}
14
+                <form class="form-search pull-right" action="{{ app.request.basepath }}/{{repo}}/tree/{{branch}}/search" method="POST">
15
+                    <input type="text" name="query" class="input-medium search-query" placeholder="Search tree..." value="{{ query | default("") }}">
16
+                </form>
17
+                {% endif %}
18
+
19
+                {% if branches is defined %}
20
+                    {% include 'branch_menu.twig' %}
21
+                {% endif %}
22
+
23
+                {% include 'menu.twig' %}
24
+            </div>
25
+        </div>
26
+
27
+        {% block content %}{% endblock %}
28
+
29
+        {% include 'footer.twig' %}
30
+    </div>
31
+{% endblock %}
0 32
new file mode 100644
... ...
@@ -0,0 +1,6 @@
1
+<ul class="nav nav-tabs">
2
+    <li{% if page == 'files' %} class="active"{% endif %}><a href="{{ path('branch', {repo: repo, branch: branch}) }}">Files</a></li>
3
+    <li{% if page in ['commits', 'searchcommits'] %} class="active"{% endif %}><a href="{{ path('commits', {repo: repo, commitishPath: branch}) }}">Commits</a></li>
4
+    <li{% if page == 'stats' %} class="active"{% endif %}><a href="{{ path('stats', {repo: repo, branch: branch}) }}">Stats</a></li>
5
+  	<li{% if page == 'network' %} class="active"{% endif %}><a href="{{ path('network', {repo: repo, branch: branch}) }}">Network</a></li>
6
+</ul>
0 7
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+<div class="navbar navbar-scroll-top">
2
+    <div class="navbar-inner">
3
+        <div class="container">
4
+            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
5
+                <span class="icon-bar"></span>
6
+                <span class="icon-bar"></span>
7
+                <span class="icon-bar"></span>
8
+            </a>
9
+            <a class="brand" href="{{ path('homepage') }}">git.elangley.org</a>
10
+            <nav class="nav-collapse">
11
+                <ul class="nav pull-right">
12
+                    <li><a href="//elangley.org">Homepage</a></li>
13
+                    <li><a href="http://gitlist.org/">About</a></li>
14
+                    <li><a href="{{ path('homepage') }}refresh">Refresh</a></li>
15
+                </ul>
16
+            </nav>
17
+        </div>
18
+    </div>
19
+</div>
0 20
new file mode 100644
... ...
@@ -0,0 +1,23 @@
1
+{% extends 'layout_page.twig' %}
2
+
3
+{% set page = 'network' %}
4
+
5
+{% block title %}GitList{% endblock %}
6
+
7
+{% block content %}
8
+    {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Network', path:''}]} %}
9
+	<div class="network-view">
10
+		<div class="network-header">
11
+			<div class="meta">Network Graph of {{ repo }} / {{ commitishPath }}</div>
12
+		</div>
13
+
14
+		<div class="network-graph" data-source="{{ path('networkData', {repo: repo, commitishPath: commitishPath}) }}">
15
+		{#<div class="network-graph" data-source="/dummynetwork.json">#}
16
+
17
+		</div>
18
+	</div>
19
+
20
+	
21
+
22
+    <hr />
23
+{% endblock %}
0 24
new file mode 100644
... ...
@@ -0,0 +1,17 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<rss version="2.0">
3
+    <channel>
4
+        <title>Latest commits in {{ repo }}:{{ branch }}</title>
5
+        <description>RSS provided by GitList</description>
6
+        <link>{{ url('homepage') }}</link>
7
+
8
+        {% for commit in commits %}
9
+        <item>
10
+            <title>{{ commit.message }}</title>
11
+            <description>{{ commit.author.name }} authored {{ commit.shortHash }} in {{ commit.date | format_date }}</description>
12
+            <link>{{ url('commit', {repo: repo, commit: commit.hash}) }}</link>
13
+            <pubDate>{{ commit.date | date('r') }}</pubDate>
14
+        </item>
15
+        {% endfor %}
16
+    </channel>
17
+</rss>
0 18
new file mode 100644
... ...
@@ -0,0 +1,42 @@
1
+{% extends 'layout_page.twig' %}
2
+
3
+{% set page = 'files' %}
4
+
5
+{% block title %}GitList{% endblock %}
6
+
7
+{% block content %}
8
+    {% embed 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %}
9
+        {% block extra %}
10
+            <div class="pull-right">
11
+                <div class="btn-group download-buttons">
12
+                    <a href="{{ path('archive', {repo: repo, branch: branch, format: 'zip'}) }}" class="btn btn-mini" title="Download '{{ branch }}' as a ZIP archive">ZIP</a>
13
+                    <a href="{{ path('archive', {repo: repo, branch: branch, format: 'tar'}) }}" class="btn btn-mini" title="Download '{{ branch }}' as a TAR archive">TAR</a>
14
+                </div>
15
+                <a href="{{ path('rss', {repo: repo, branch: branch}) }}" class="rss-icon"><i class="rss"></i></a>
16
+            </div>
17
+        {% endblock %}
18
+    {% endembed %}
19
+
20
+    {% if results %}
21
+    <table class="tree">
22
+        <thead>
23
+            <tr>
24
+                <th width="20%">name</th>
25
+                <th width="80%">match</th>
26
+            </tr>
27
+        </thead>
28
+        <tbody>
29
+            {% for result in results %}
30
+            <tr>
31
+                <td><i class="icon-file icon-spaced"></i> <a href="{{ path('blob', {repo: repo, branch: branch, file: result.file, commitishPath: branch ~ '/' ~ result.file}) }}#L{{ result.line }}">{{ result.file }}</a></td>
32
+                <td>{{ result.match }}</td>
33
+            </tr>
34
+            {% endfor %}
35
+        </tbody>
36
+    </table>
37
+    {% else %}
38
+    <p>No results found.</p>
39
+    {% endif %}
40
+
41
+    <hr />
42
+{% endblock %}
0 43
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+{% extends 'layout_page.twig' %}
2
+
3
+{% set page = 'searchcommits' %}
4
+
5
+{% block title %}GitList{% endblock %}
6
+
7
+{% block content %}
8
+    {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Commits search results for: ' ~ query, path:''}]} %}
9
+
10
+    {% include 'commits_list.twig' %}
11
+
12
+    <hr />
13
+{% endblock %}
0 14
new file mode 100644
... ...
@@ -0,0 +1,48 @@
1
+{% extends 'layout_page.twig' %}
2
+
3
+{% set page = 'stats' %}
4
+
5
+{% block title %}GitList{% endblock %}
6
+
7
+{% block content %}
8
+    {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Statistics', path:''}]} %}
9
+
10
+    <table class="table table-striped table-bordered">
11
+        <thead>
12
+            <tr>
13
+                <th width="30%">File extensions ({{ stats.extensions|length }})</th>
14
+                <th width="40%">Authors ({{ authors|length }})</th>
15
+                <th width="30%">Other</th>
16
+            </tr>
17
+        </thead>
18
+        <tbody>
19
+            <tr>
20
+                <td>
21
+                    <ul>
22
+                    {% for ext, amount in stats.extensions %}
23
+                        <li><strong>{{ ext }}</strong>: {{ amount }} files</li>
24
+                    {% endfor %}
25
+                    </ul>
26
+                </td>
27
+                <td>
28
+                    <ul>
29
+                    {% for author in authors %}
30
+                        <li><strong><a href="mailto:{{ author.email }}">{{ author.name }}</a></strong>: {{ author.commits }} commits</li>
31
+                    {% endfor %}
32
+                    </ul>
33
+                </td>
34
+                <td>
35
+                    <p>
36
+                        <strong>Total files:</strong> {{ stats.files }}
37
+                    </p>
38
+
39
+                    <p>
40
+                        <strong>Total bytes:</strong> {{ stats.size }} bytes ({{ ((stats.size / 1024) / 1024) | number_format }} MB)
41
+                    </p>
42
+                </td>
43
+            </tr>
44
+        </tbody>
45
+    </table>
46
+
47
+    <hr />
48
+{% endblock %}
0 49
new file mode 100644
... ...
@@ -0,0 +1,71 @@
1
+{% extends 'layout_page.twig' %}
2
+
3
+{% set page = 'files' %}
4
+
5
+{% block title %}GitList{% endblock %}
6
+
7
+{% block content %}
8
+    {% embed 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %}
9
+        {% block extra %}
10
+            <div class="pull-right">
11
+                <div class="btn-group download-buttons">
12
+                    <a href="{{ path('archive', {repo: repo, branch: branch, format: 'zip'}) }}" class="btn btn-mini" title="Download '{{ branch }}' as a ZIP archive">ZIP</a>
13
+                    <a href="{{ path('archive', {repo: repo, branch: branch, format: 'tar'}) }}" class="btn btn-mini" title="Download '{{ branch }}' as a TAR archive">TAR</a>
14
+                </div>
15
+                <a href="{{ path('rss', {repo: repo, branch: branch}) }}" class="rss-icon"><i class="rss"></i></a>
16
+            </div>
17
+        {% endblock %}
18
+    {% endembed %}
19
+
20
+    {% if files is not empty %}
21
+    <table class="tree">
22
+        <thead>
23
+            <tr>
24
+                <th width="80%">name</th>
25
+                <th width="10%">mode</th>
26
+                <th width="10%">size</th>
27
+            </tr>
28
+        </thead>
29
+        <tbody>
30
+            {% if parent is not null %}
31
+            <tr>
32
+                <td><i class="icon-spaced"></i>
33
+                    {% if not parent %}
34
+                        <a href="{{ path('branch', {repo: repo, branch: branch}) }}">..</a>
35
+                    {% else %}
36
+                        <a href="{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ parent}) }}">..</a>
37
+                    {% endif %}
38
+                </td>
39
+                <td></td>
40
+                <td></td>
41
+            </tr>
42
+            {% endif %}
43
+            {% for file in files %}
44
+            <tr>
45
+                <td><i class="{{ file.type == "folder" or file.type == "symlink" ? "icon-folder-open" : "icon-file" }} icon-spaced"></i> <a href="
46
+                    {%- if file.type == "folder" or file.type == "symlink" -%}
47
+                        {{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
48
+                    {%- else -%}
49
+                        {{ path('blob', {repo: repo, commitishPath: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
50
+                    {%- endif -%}
51
+                ">{{ file.name }}</a></td>
52
+                <td>{{ file.mode }}</td>
53
+                <td>{% if file.size %}{{ (file.size / 1024) | number_format }} kb{% endif %}</td>
54
+            </tr>
55
+            {% endfor %}
56
+        </tbody>
57
+    </table>
58
+    {% else %}
59
+        <p>This repository is empty.</p>
60
+    {% endif %}
61
+    {% if readme is defined and readme is not empty %}
62
+        <div class="readme-view">
63
+            <div class="md-header">
64
+                <div class="meta">{{ readme.filename }}</div>
65
+            </div>
66
+            <div id="md-content">{{ readme.content }}</div>
67
+        </div>
68
+    {% endif %}
69
+
70
+    <hr />
71
+{% endblock %}