diff options
author | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2013-05-08 16:39:57 +0200 |
---|---|---|
committer | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2013-05-08 16:39:57 +0200 |
commit | 21b322cc64118f8a3acc6b924eba0bea8190aca3 (patch) | |
tree | a0e4e52259bdb1113b41e72fbd21521cf9ab48e0 /js | |
download | www-21b322cc64118f8a3acc6b924eba0bea8190aca3.tar.gz www-21b322cc64118f8a3acc6b924eba0bea8190aca3.tar.bz2 www-21b322cc64118f8a3acc6b924eba0bea8190aca3.zip |
initial commit
Diffstat (limited to 'js')
-rw-r--r-- | js/bootstrap.min.js | 6 | ||||
-rw-r--r-- | js/jquery-2.0.0.min.js | 6 | ||||
-rw-r--r-- | js/jquery.mustache.js | 213 | ||||
-rw-r--r-- | js/js-yaml.min.js | 6 | ||||
-rw-r--r-- | js/mustache.js | 536 |
5 files changed, 767 insertions, 0 deletions
diff --git a/js/bootstrap.min.js b/js/bootstrap.min.js new file mode 100644 index 0000000..95c5ac5 --- /dev/null +++ b/js/bootstrap.min.js @@ -0,0 +1,6 @@ +/*! +* Bootstrap.js by @fat & @mdo +* Copyright 2012 Twitter, Inc. +* http://www.apache.org/licenses/LICENSE-2.0.txt +*/ +!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||s.toggleClass("open"),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},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(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
\ No newline at end of file diff --git a/js/jquery-2.0.0.min.js b/js/jquery-2.0.0.min.js new file mode 100644 index 0000000..b18e05a --- /dev/null +++ b/js/jquery-2.0.0.min.js @@ -0,0 +1,6 @@ +/*! jQuery v2.0.0 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/ +(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],f="2.0.0",p=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=f.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return p.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,f,p,h,d,g,m,y="sizzle"+-new Date,v=e.document,b={},w=0,T=0,C=ot(),k=ot(),N=ot(),E=!1,S=function(){return 0},j=typeof undefined,D=1<<31,A=[],L=A.pop,q=A.push,H=A.push,O=A.slice,F=A.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=M.replace("w","w#"),$="\\["+R+"*("+M+")"+R+"*(?:([*^$|!~]?=)"+R+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+R+"*\\]",B=":("+M+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",I=RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),z=RegExp("^"+R+"*,"+R+"*"),_=RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),X=RegExp(R+"*[+~]"),U=RegExp("="+R+"*([^\\]'\"]*)"+R+"*\\]","g"),Y=RegExp(B),V=RegExp("^"+W+"$"),G={ID:RegExp("^#("+M+")"),CLASS:RegExp("^\\.("+M+")"),TAG:RegExp("^("+M.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+B),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),"boolean":RegExp("^(?:"+P+")$","i"),needsContext:RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},J=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,et=/'|\\/g,tt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,nt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{H.apply(A=O.call(v.childNodes),v.childNodes),A[v.childNodes.length].nodeType}catch(rt){H={apply:A.length?function(e,t){q.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function it(e){return J.test(e+"")}function ot(){var e,t=[];return e=function(n,i){return t.push(n+=" ")>r.cacheLength&&delete e[t.shift()],e[n]=i}}function st(e){return e[y]=!0,e}function at(e){var t=c.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ut(e,t,n,r){var i,o,s,a,u,f,d,g,x,w;if((t?t.ownerDocument||t:v)!==c&&l(t),t=t||c,n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=t.nodeType)&&9!==a)return[];if(p&&!r){if(i=Q.exec(e))if(s=i[1]){if(9===a){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&m(t,o)&&o.id===s)return n.push(o),n}else{if(i[2])return H.apply(n,t.getElementsByTagName(e)),n;if((s=i[3])&&b.getElementsByClassName&&t.getElementsByClassName)return H.apply(n,t.getElementsByClassName(s)),n}if(b.qsa&&(!h||!h.test(e))){if(g=d=y,x=t,w=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(d=t.getAttribute("id"))?g=d.replace(et,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=f.length;while(u--)f[u]=g+mt(f[u]);x=X.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return H.apply(n,x.querySelectorAll(w)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(I,"$1"),t,n,r)}o=ut.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},l=ut.setDocument=function(e){var t=e?e.ownerDocument||e:v;return t!==c&&9===t.nodeType&&t.documentElement?(c=t,f=t.documentElement,p=!o(t),b.getElementsByTagName=at(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),b.attributes=at(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByClassName=at(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),b.sortDetached=at(function(e){return 1&e.compareDocumentPosition(c.createElement("div"))}),b.getById=at(function(e){return f.appendChild(e).id=y,!t.getElementsByName||!t.getElementsByName(y).length}),b.getById?(r.find.ID=function(e,t){if(typeof t.getElementById!==j&&p){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(tt,nt);return function(e){return e.getAttribute("id")===t}}):(r.find.ID=function(e,t){if(typeof t.getElementById!==j&&p){var n=t.getElementById(e);return n?n.id===e||typeof n.getAttributeNode!==j&&n.getAttributeNode("id").value===e?[n]:undefined:[]}},r.filter.ID=function(e){var t=e.replace(tt,nt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=b.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=b.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&p?t.getElementsByClassName(e):undefined},d=[],h=[],(b.qsa=it(t.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+R+"*(?:value|"+P+")"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){var t=c.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&h.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(b.matchesSelector=it(g=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){b.disconnectedMatch=g.call(e,"div"),g.call(e,"[s!='']:x"),d.push("!=",B)}),h=h.length&&RegExp(h.join("|")),d=d.length&&RegExp(d.join("|")),m=it(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,n){if(e===n)return E=!0,0;var r=n.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(n);return r?1&r||!b.sortDetached&&n.compareDocumentPosition(e)===r?e===t||m(v,e)?-1:n===t||m(v,n)?1:u?F.call(u,e)-F.call(u,n):0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],l=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:u?F.call(u,e)-F.call(u,n):0;if(o===s)return lt(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)l.unshift(r);while(a[i]===l[i])i++;return i?lt(a[i],l[i]):a[i]===v?-1:l[i]===v?1:0},c):c},ut.matches=function(e,t){return ut(e,null,null,t)},ut.matchesSelector=function(e,t){if((e.ownerDocument||e)!==c&&l(e),t=t.replace(U,"='$1']"),!(!b.matchesSelector||!p||d&&d.test(t)||h&&h.test(t)))try{var n=g.call(e,t);if(n||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return ut(t,c,null,[e]).length>0},ut.contains=function(e,t){return(e.ownerDocument||e)!==c&&l(e),m(e,t)},ut.attr=function(e,t){(e.ownerDocument||e)!==c&&l(e);var n=r.attrHandle[t.toLowerCase()],i=n&&n(e,t,!p);return i===undefined?b.attributes||!p?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null:i},ut.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ut.uniqueSort=function(e){var t,n=[],r=0,i=0;if(E=!b.detectDuplicates,u=!b.sortStable&&e.slice(0),e.sort(S),E){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return e};function lt(e,t){var n=t&&e,r=n&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ct(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}function ft(e,t,n){var r;return n?undefined:r=e.getAttribute(t,"type"===t.toLowerCase()?1:2)}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function dt(e){return st(function(t){return t=+t,st(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}i=ut.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r];r++)n+=i(t);return n},r=ut.selectors={cacheLength:50,createPseudo:st,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(tt,nt),e[3]=(e[4]||e[5]||"").replace(tt,nt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ut.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ut.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return G.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&Y.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(tt,nt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ut.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){f=t;while(f=f[g])if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[y]||(m[y]={}),l=c[e]||[],h=l[0]===w&&l[1],p=l[0]===w&&l[2],f=h&&m.childNodes[h];while(f=++h&&f&&f[g]||(p=h=0)||d.pop())if(1===f.nodeType&&++p&&f===t){c[e]=[w,h,p];break}}else if(x&&(l=(t[y]||(t[y]={}))[e])&&l[0]===w)p=l[1];else while(f=++h&&f&&f[g]||(p=h=0)||d.pop())if((a?f.nodeName.toLowerCase()===v:1===f.nodeType)&&++p&&(x&&((f[y]||(f[y]={}))[e]=[w,p]),f===t))break;return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ut.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?st(function(e,n){var r,o=i(e,t),s=o.length;while(s--)r=F.call(e,o[s]),e[r]=!(n[r]=o[s])}):function(e){return i(e,0,n)}):i}},pseudos:{not:st(function(e){var t=[],n=[],r=s(e.replace(I,"$1"));return r[y]?st(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:st(function(e){return function(t){return ut(e,t).length>0}}),contains:st(function(e){return function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:st(function(e){return V.test(e||"")||ut.error("unsupported lang: "+e),e=e.replace(tt,nt).toLowerCase(),function(t){var n;do if(n=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===c.activeElement&&(!c.hasFocus||c.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[0>n?n+t:n]}),even:dt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:dt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:dt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:dt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=ht(t);function gt(e,t){var n,i,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=r.preFilter;while(a){(!n||(i=z.exec(a)))&&(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),n=!1,(i=_.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(I," ")}),a=a.slice(n.length));for(s in r.filter)!(i=G[s].exec(a))||l[s]&&!(i=l[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ut.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,r){var i=t.dir,o=r&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,r,a){var u,l,c,f=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,r,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[y]||(t[y]={}),(l=c[i])&&l[0]===f){if((u=l[1])===!0||u===n)return u===!0}else if(l=c[i]=[f],l[1]=e(t,r,a)||n,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[y]&&(r=bt(r)),i&&!i[y]&&(i=bt(i,o)),st(function(o,s,a,u){var l,c,f,p=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,p,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(f=l[c])&&(y[h[c]]=!(m[h[c]]=f))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(f=y[c])&&l.push(m[c]=f);i(null,y=[],l,u)}c=y.length;while(c--)(f=y[c])&&(l=i?F.call(o,f):p[c])>-1&&(o[l]=!(s[l]=f))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):H.apply(s,y)})}function wt(e){var t,n,i,o=e.length,s=r.relative[e[0].type],u=s||r.relative[" "],l=s?1:0,c=yt(function(e){return e===t},u,!0),f=yt(function(e){return F.call(t,e)>-1},u,!0),p=[function(e,n,r){return!s&&(r||n!==a)||((t=n).nodeType?c(e,n,r):f(e,n,r))}];for(;o>l;l++)if(n=r.relative[e[l].type])p=[yt(vt(p),n)];else{if(n=r.filter[e[l].type].apply(null,e[l].matches),n[y]){for(i=++l;o>i;i++)if(r.relative[e[i].type])break;return bt(l>1&&vt(p),l>1&&mt(e.slice(0,l-1)).replace(I,"$1"),n,i>l&&wt(e.slice(l,i)),o>i&&wt(e=e.slice(i)),o>i&&mt(e))}p.push(n)}return vt(p)}function Tt(e,t){var i=0,o=t.length>0,s=e.length>0,u=function(u,l,f,p,h){var d,g,m,y=[],v=0,x="0",b=u&&[],T=null!=h,C=a,k=u||s&&r.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(a=l!==c&&l,n=i);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,f)){p.push(d);break}T&&(w=N,n=++i)}o&&((d=!m&&d)&&v--,u&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,f);if(u){if(v>0)while(x--)b[x]||y[x]||(y[x]=L.call(p));y=xt(y)}H.apply(p,y),T&&!u&&y.length>0&&v+t.length>1&&ut.uniqueSort(p)}return T&&(w=N,a=C),b};return o?st(u):u}s=ut.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[y]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ut(e,t[r],n);return n}function kt(e,t,n,i){var o,a,u,l,c,f=gt(e);if(!i&&1===f.length){if(a=f[0]=f[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&p&&r.relative[a[1].type]){if(t=(r.find.ID(u.matches[0].replace(tt,nt),t)||[])[0],!t)return n;e=e.slice(a.shift().value.length)}o=G.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],r.relative[l=u.type])break;if((c=r.find[l])&&(i=c(u.matches[0].replace(tt,nt),X.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=i.length&&mt(a),!e)return H.apply(n,i),n;break}}}return s(e,f)(i,t,!p,n,X.test(e)),n}r.pseudos.nth=r.pseudos.eq;function Nt(){}Nt.prototype=r.filters=r.pseudos,r.setFilters=new Nt,b.sortStable=y.split("").sort(S).join("")===y,l(),[0,0].sort(S),b.detectDuplicates=E,at(function(e){if(e.innerHTML="<a href='#'></a>","#"!==e.firstChild.getAttribute("href")){var t="type|href|height|width".split("|"),n=t.length;while(n--)r.attrHandle[t[n]]=ft}}),at(function(e){if(null!=e.getAttribute("disabled")){var t=P.split("|"),n=t.length;while(n--)r.attrHandle[t[n]]=ct}}),x.find=ut,x.expr=ut.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ut.uniqueSort,x.text=ut.getText,x.isXMLDoc=ut.isXML,x.contains=ut.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(f){for(t=e.memory&&f,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(f[0],f[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!a||n&&!u||(r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))this.cache[i]=t;else for(r in t)o[r]=t[r]},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){return t===undefined||t&&"string"==typeof t&&n===undefined?this.get(e,t):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i=this.key(e),o=this.cache[i];if(t===undefined)this.cache[i]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):t in o?r=[t]:(r=x.camelCase(t),r=r in o?[r]:r.match(w)||[]),n=r.length;while(n--)delete o[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){delete this.cache[this.key(e)]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.substring(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t); +x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,i="boolean"==typeof t;return x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,s=0,a=x(this),u=t,l=e.match(w)||[];while(o=l[s++])u=i?u:!a.hasClass(o),a[u?"addClass":"removeClass"](o)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i,o=x(this);1===this.nodeType&&(i=r?e.call(this,n,o.val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.boolean.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.boolean.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.boolean.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,f,p,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(p=x.event.special[d]||{},d=(o?p.delegateType:p.bindType)||d,p=x.event.special[d]||{},f=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,p.setup&&p.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),p.add&&(p.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,f):h.push(f),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){f=x.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,p=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&f.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,f,p,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),p=x.event.special[d]||{},i||!p.trigger||p.trigger.apply(r,n)!==!1)){if(!i&&!p.noBubble&&!x.isWindow(r)){for(l=p.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:p.bindType||d,f=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),f&&f.apply(a,n),f=c&&a[c],f&&x.acceptData(a)&&f.apply&&f.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||p._default&&p._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return 3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=x.expr.match.needsContext,Q={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return t=this,this.pushStack(x(e).filter(function(){for(r=0;i>r;r++)if(x.contains(t[r],this))return!0}));for(n=[],r=0;i>r;r++)x.find(e,this[r],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(Z(this,e||[],!0))},filter:function(e){return this.pushStack(Z(this,e||[],!1))},is:function(e){return!!e&&("string"==typeof e?J.test(e)?x(e,this.context).index(this[0])>=0:x.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],s=J.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function K(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return K(e,"nextSibling")},prev:function(e){return K(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(Q[e]||x.unique(i),"p"===e[0]&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function Z(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var et=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,tt=/<([\w:]+)/,nt=/<|&#?\w+;/,rt=/<(?:script|style|link)/i,it=/^(?:checkbox|radio)$/i,ot=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^$|\/(?:java|ecma)script/i,at=/^true\/(.*)/,ut=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,lt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};lt.optgroup=lt.option,lt.tbody=lt.tfoot=lt.colgroup=lt.caption=lt.col=lt.thead,lt.th=lt.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ct(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ct(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(gt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&ht(gt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(gt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!rt.test(e)&&!lt[(tt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(et,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(gt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=p.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,f=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&ot.test(d))return this.each(function(r){var i=f.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(gt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,gt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,pt),l=0;s>l;l++)a=o[l],st.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(ut,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=gt(a),o=gt(e),r=0,i=o.length;i>r;r++)mt(o[r],s[r]);if(t)if(n)for(o=o||gt(e),s=s||gt(a),r=0,i=o.length;i>r;r++)dt(o[r],s[r]);else dt(e,a);return s=gt(a,"script"),s.length>0&&ht(s,!u&>(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,f=e.length,p=t.createDocumentFragment(),h=[];for(;f>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(nt.test(i)){o=o||p.appendChild(t.createElement("div")),s=(tt.exec(i)||["",""])[1].toLowerCase(),a=lt[s]||lt._default,o.innerHTML=a[1]+i.replace(et,"<$1></$2>")+a[2],l=a[0];while(l--)o=o.firstChild;x.merge(h,o.childNodes),o=p.firstChild,o.textContent=""}else h.push(t.createTextNode(i));p.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=gt(p.appendChild(i),"script"),u&&ht(o),n)){l=0;while(i=o[l++])st.test(i.type||"")&&n.push(i)}return p},cleanData:function(e){var t,n,r,i=e.length,o=0,s=x.event.special;for(;i>o;o++){if(n=e[o],x.acceptData(n)&&(t=q.access(n)))for(r in t.events)s[r]?x.event.remove(n,r):x.removeEvent(n,r,t.handle);L.discard(n),q.discard(n)}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"text",async:!1,global:!1,success:x.globalEval})}});function ct(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function pt(e){var t=at.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ht(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function dt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=x.extend({},o),l=o.events,q.set(t,s),l)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function gt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function mt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&it.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var yt,vt,xt=/^(none|table(?!-c[ea]).+)/,bt=/^margin/,wt=RegExp("^("+b+")(.*)$","i"),Tt=RegExp("^("+b+")(?!px)[a-z%]+$","i"),Ct=RegExp("^([+-])=("+b+")","i"),kt={BODY:"block"},Nt={position:"absolute",visibility:"hidden",display:"block"},Et={letterSpacing:0,fontWeight:400},St=["Top","Right","Bottom","Left"],jt=["Webkit","O","Moz","ms"];function Dt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=jt.length;while(i--)if(t=jt[i]+n,t in e)return t;return r}function At(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function Lt(t){return e.getComputedStyle(t,null)}function qt(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&At(r)&&(o[s]=q.access(r,"olddisplay",Pt(r.nodeName)))):o[s]||(i=At(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=Lt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return qt(this,!0)},hide:function(){return qt(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:At(this))?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=yt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=Dt(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=Ct.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=Dt(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=yt(e,t,r)),"normal"===i&&t in Et&&(i=Et[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),yt=function(e,t,n){var r,i,o,s=n||Lt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Tt.test(a)&&bt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ht(e,t,n){var r=wt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ot(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+St[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+St[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+St[o]+"Width",!0,i))):(s+=x.css(e,"padding"+St[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+St[o]+"Width",!0,i)));return s}function Ft(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Lt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=yt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Tt.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ot(e,t,n||(s?"border":"content"),r,o)+"px"}function Pt(e){var t=o,n=kt[e];return n||(n=Rt(e,t),"none"!==n&&n||(vt=(vt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(vt[0].contentWindow||vt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=Rt(e,t),vt.detach()),kt[e]=n),n}function Rt(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,t){x.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&xt.test(x.css(e,"display"))?x.swap(e,Nt,function(){return Ft(e,t,r)}):Ft(e,t,r):undefined},set:function(e,n,r){var i=r&&Lt(e);return Ht(e,n,r?Ot(e,t,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,t){return t?x.swap(e,{display:"inline-block"},yt,[e,"marginRight"]):undefined}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,t){x.cssHooks[t]={get:function(e,n){return n?(n=yt(e,t),Tt.test(n)?x(e).position()[t]+"px":n):undefined}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+St[r]+t]=o[r]||o[r-2]||o[0];return i}},bt.test(e)||(x.cssHooks[e+t].set=Ht)});var Mt=/%20/g,Wt=/\[\]$/,$t=/\r?\n/g,Bt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&It.test(this.nodeName)&&!Bt.test(e)&&(this.checked||!it.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace($t,"\r\n")}}):{name:t.name,value:n.replace($t,"\r\n")}}).get()}}),x.param=function(e,t){var n,r=[],i=function(e,t){t=x.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){i(this.name,this.value)});else for(n in e)zt(n,e[n],t,i);return r.join("&").replace(Mt,"+")};function zt(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||Wt.test(e)?r(e,i):zt(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)zt(e+"["+i+"]",t[i],n,r)}x.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(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var _t,Xt,Ut=x.now(),Yt=/\?/,Vt=/#.*$/,Gt=/([?&])_=[^&]*/,Jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Qt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Kt=/^(?:GET|HEAD)$/,Zt=/^\/\//,en=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,tn=x.fn.load,nn={},rn={},on="*/".concat("*");try{Xt=i.href}catch(sn){Xt=o.createElement("a"),Xt.href="",Xt=Xt.href}_t=en.exec(Xt.toLowerCase())||[];function an(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[]; +if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function un(e,t,n,r){var i={},o=e===rn;function s(a){var u;return i[a]=!0,x.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):undefined:(t.dataTypes.unshift(l),s(l),!1)}),u}return s(t.dataTypes[0])||!i["*"]&&s("*")}function ln(e,t){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,t,n){if("string"!=typeof e&&tn)return tn.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return a>=0&&(r=e.slice(a),e=e.slice(0,a)),x.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(i="POST"),s.length>0&&x.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?x("<div>").append(x.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Xt,type:"GET",isLocal:Qt.test(_t[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":on,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ln(ln(e,x.ajaxSettings),t):ln(x.ajaxSettings,e)},ajaxPrefilter:an(nn),ajaxTransport:an(rn),ajax:function(e,t){"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,r,i,o,s,a,u,l,c=x.ajaxSetup({},t),f=c.context||c,p=c.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),d=x.Callbacks("once memory"),g=c.statusCode||{},m={},y={},v=0,b="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===v){if(!o){o={};while(t=Jt.exec(i))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===v?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return v||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return v||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>v)for(t in e)g[t]=[g[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),k(0,t),this}};if(h.promise(T).complete=d.add,T.success=T.done,T.error=T.fail,c.url=((e||c.url||Xt)+"").replace(Vt,"").replace(Zt,_t[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=x.trim(c.dataType||"*").toLowerCase().match(w)||[""],null==c.crossDomain&&(a=en.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===_t[1]&&a[2]===_t[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(_t[3]||("http:"===_t[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=x.param(c.data,c.traditional)),un(nn,c,t,T),2===v)return T;u=c.global,u&&0===x.active++&&x.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Kt.test(c.type),r=c.url,c.hasContent||(c.data&&(r=c.url+=(Yt.test(r)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=Gt.test(r)?r.replace(Gt,"$1_="+Ut++):r+(Yt.test(r)?"&":"?")+"_="+Ut++)),c.ifModified&&(x.lastModified[r]&&T.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&T.setRequestHeader("If-None-Match",x.etag[r])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&T.setRequestHeader("Content-Type",c.contentType),T.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+on+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)T.setRequestHeader(l,c.headers[l]);if(c.beforeSend&&(c.beforeSend.call(f,T,c)===!1||2===v))return T.abort();b="abort";for(l in{success:1,error:1,complete:1})T[l](c[l]);if(n=un(rn,c,t,T)){T.readyState=1,u&&p.trigger("ajaxSend",[T,c]),c.async&&c.timeout>0&&(s=setTimeout(function(){T.abort("timeout")},c.timeout));try{v=1,n.send(m,k)}catch(C){if(!(2>v))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,t,o,a){var l,m,y,b,w,C=t;2!==v&&(v=2,s&&clearTimeout(s),n=undefined,i=a||"",T.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(b=cn(c,T,o)),b=fn(c,b,T,l),l?(c.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(x.lastModified[r]=w),w=T.getResponseHeader("etag"),w&&(x.etag[r]=w)),204===e?C="nocontent":304===e?C="notmodified":(C=b.state,m=b.data,y=b.error,l=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(t||C)+"",l?h.resolveWith(f,[m,C,T]):h.rejectWith(f,[T,C,y]),T.statusCode(g),g=undefined,u&&p.trigger(l?"ajaxSuccess":"ajaxError",[T,c,l?m:y]),d.fireWith(f,[T,C]),u&&(p.trigger("ajaxComplete",[T,c]),--x.active||x.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,undefined,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,i){return x.isFunction(n)&&(i=i||r,r=n,n=undefined),x.ajax({url:e,type:t,dataType:i,data:n,success:r})}});function cn(e,t,n){var r,i,o,s,a=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):undefined}function fn(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(f){return{state:"parsererror",error:s?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=x("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),o.head.appendChild(t[0])},abort:function(){n&&n()}}}});var pn=[],hn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=pn.pop()||x.expando+"_"+Ut++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,s,a=t.jsonp!==!1&&(hn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&hn.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=x.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(hn,"$1"+i):t.jsonp!==!1&&(t.url+=(Yt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||x.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,pn.push(i)),s&&x.isFunction(o)&&o(s[0]),s=o=undefined}),"script"):undefined}),x.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var dn=x.ajaxSettings.xhr(),gn={0:200,1223:204},mn=0,yn={};e.ActiveXObject&&x(e).on("unload",function(){for(var e in yn)yn[e]();yn=undefined}),x.support.cors=!!dn&&"withCredentials"in dn,x.support.ajax=dn=!!dn,x.ajaxTransport(function(e){var t;return x.support.cors||dn&&!e.crossDomain?{send:function(n,r){var i,o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete yn[o],t=s.onload=s.onerror=null,"abort"===e?s.abort():"error"===e?r(s.status||404,s.statusText):r(gn[s.status]||s.status,s.statusText,"string"==typeof s.responseText?{text:s.responseText}:undefined,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=yn[o=mn++]=t("abort"),s.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:undefined});var vn,xn,bn=/^(?:toggle|show|hide)$/,wn=RegExp("^(?:([+-])=|)("+b+")([a-z%]*)$","i"),Tn=/queueHooks$/,Cn=[Dn],kn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=wn.exec(t),s=i.cur(),a=+s||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(x.cssNumber[e]?"":"px"),"px"!==r&&a){a=x.css(i.elem,e,!0)||n||1;do u=u||".5",a/=u,x.style(i.elem,e,a+r);while(u!==(u=i.cur()/s)&&1!==u&&--l)}i.unit=r,i.start=a,i.end=o[1]?a+(o[1]+1)*n:n}return i}]};function Nn(){return setTimeout(function(){vn=undefined}),vn=x.now()}function En(e,t){x.each(t,function(t,n){var r=(kn[t]||[]).concat(kn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function Sn(e,t,n){var r,i,o=0,s=Cn.length,a=x.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=vn||Nn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,s=0,u=l.tweens.length;for(;u>s;s++)l.tweens[s].run(o);return a.notifyWith(e,[l,o,n]),1>o&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:vn||Nn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(jn(c,l.opts.specialEasing);s>o;o++)if(r=Cn[o].call(l,e,c,l.opts))return r;return En(l,c),x.isFunction(l.opts.start)&&l.opts.start.call(e,l),x.fx.timer(x.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function jn(e,t){var n,r,i,o,s;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),s=x.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(Sn,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],kn[n]=kn[n]||[],kn[n].unshift(t)},prefilter:function(e,t){t?Cn.unshift(e):Cn.push(e)}});function Dn(e,t,n){var r,i,o,s,a,u,l,c,f,p=this,h=e.style,d={},g=[],m=e.nodeType&&At(e);n.queue||(c=x._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,f=c.empty.fire,c.empty.fire=function(){c.unqueued||f()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,x.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),a=q.get(e,"fxshow");for(r in t)if(o=t[r],bn.exec(o)){if(delete t[r],u=u||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||a===undefined||a[r]===undefined)continue;m=!0}g.push(r)}if(s=g.length){a=q.get(e,"fxshow")||q.access(e,"fxshow",{}),"hidden"in a&&(m=a.hidden),u&&(a.hidden=!m),m?x(e).show():p.done(function(){x(e).hide()}),p.done(function(){var t;q.remove(e,"fxshow");for(t in d)x.style(e,t,d[t])});for(r=0;s>r;r++)i=g[r],l=p.createTween(i,m?a[i]:0),d[i]=a[i]||x.style(e,i),i in a||(a[i]=l.start,m&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}}function An(e,t,n,r,i){return new An.prototype.init(e,t,n,r,i)}x.Tween=An,An.prototype={constructor:An,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=An.propHooks[this.prop];return e&&e.get?e.get(this):An.propHooks._default.get(this)},run:function(e){var t,n=An.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):An.propHooks._default.set(this),this}},An.prototype.init.prototype=An.prototype,An.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},An.propHooks.scrollTop=An.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(Ln(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(At).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),s=function(){var t=Sn(this,x.extend({},e),o);s.finish=function(){t.stop(!0)},(i||q.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=undefined),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=x.timers,s=q.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&Tn.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=q.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,s=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function Ln(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=St[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:Ln("show"),slideUp:Ln("hide"),slideToggle:Ln("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=An.prototype.init,x.fx.tick=function(){var e,t=x.timers,n=0;for(vn=x.now();t.length>n;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||x.fx.stop(),vn=undefined},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){xn||(xn=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(xn),xn=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===undefined?this:this.each(function(t){x.offset.setOffset(this,e,t)});var t,n,i=this[0],o={top:0,left:0},s=i&&i.ownerDocument;if(s)return t=s.documentElement,x.contains(t,i)?(typeof i.getBoundingClientRect!==r&&(o=i.getBoundingClientRect()),n=qn(s),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o},x.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l,c=x.css(e,"position"),f=x(e),p={};"static"===c&&(e.style.position="relative"),a=f.offset(),o=x.css(e,"top"),u=x.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),x.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(p.top=t.top-a.top+s),null!=t.left&&(p.left=t.left-a.left+i),"using"in t?t.using.call(e,p):f.css(p)}},x.fn.extend({position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===x.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(r=e.offset()),r.top+=x.css(e[0],"borderTopWidth",!0),r.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-x.css(n,"marginTop",!0),left:t.left-r.left-x.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;x.fn[t]=function(i){return x.access(this,function(t,i,o){var s=qn(t);return o===undefined?s?s[n]:t[i]:(s?s.scrollTo(r?e.pageXOffset:o,r?o:e.pageYOffset):t[i]=o,undefined)},t,i,arguments.length,null)}});function qn(e){return x.isWindow(e)?e:9===e.nodeType&&e.defaultView}x.each({Height:"height",Width:"width"},function(e,t){x.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){x.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||i===!0?"margin":"border");return x.access(this,function(t,n,r){var i;return x.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===undefined?x.css(t,n,s):x.style(t,n,r,s)},t,o?r:undefined,o,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&"object"==typeof module.exports?module.exports=x:"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}),"object"==typeof e&&"object"==typeof e.document&&(e.jQuery=e.$=x)})(window);
\ No newline at end of file diff --git a/js/jquery.mustache.js b/js/jquery.mustache.js new file mode 100644 index 0000000..fcc47d1 --- /dev/null +++ b/js/jquery.mustache.js @@ -0,0 +1,213 @@ +/*! jQuery Mustache - v0.2.7 - 2013-01-30 +* https://github.com/jonnyreeves/jquery-Mustache +* Copyright (c) 2013 Jonny Reeves; Licensed MIT */ + +/*global jQuery, window */ +(function ($, window) { + 'use strict'; + + var templateMap = {}, + instance = null, + options = { + // Should an error be thrown if an attempt is made to render a non-existent template. If false, the + // operation will fail silently. + warnOnMissingTemplates: false, + + // Should an error be thrown if an attempt is made to overwrite a template which has already been added. + // If true the original template will be overwritten with the new value. + allowOverwrite: true, + + // The 'type' attribute which you use to denoate a Mustache Template in the DOM; eg: + // `<script type="text/html" id="my-template"></script>` + domTemplateType: 'text/html', + + // Specifies the `dataType` attribute used when external templates are loaded. + externalTemplateDataType: 'text' + }; + + function getMustache() { + // Lazily retrieve Mustache from the window global if it hasn't been defined by + // the User. + if (instance === null) { + instance = window.Mustache; + if (instance === void 0) { + $.error("Failed to locate Mustache instance, are you sure it has been loaded?"); + } + } + return instance; + } + + /** + * Returns true if the supplied templateName has been added. + */ + function has(templateName) { + return templateMap[templateName] !== void 0; + } + + /** + * Registers a template so that it can be used by $.Mustache. + * + * @param templateName A name which uniquely identifies this template. + * @param templateHtml The HTML which makes us the template; this will be rendered by Mustache when render() + * is invoked. + * @throws If options.allowOverwrite is false and the templateName has already been registered. + */ + function add(templateName, templateHtml) { + if (!options.allowOverwrite && has(templateName)) { + $.error('TemplateName: ' + templateName + ' is already mapped.'); + return; + } + templateMap[templateName] = $.trim(templateHtml); + } + + /** + * Adds one or more tempaltes from the DOM using either the supplied templateElementIds or by retrieving all script + * tags of the 'domTemplateType'. Templates added in this fashion will be registered with their elementId value. + * + * @param [...templateElementIds] List of element id's present on the DOM which contain templates to be added; + * if none are supplied all script tags that are of the same type as the + * `options.domTemplateType` configuration value will be added. + */ + function addFromDom() { + var templateElementIds; + + // If no args are supplied, all script blocks will be read from the document. + if (arguments.length === 0) { + templateElementIds = $('script[type="' + options.domTemplateType + '"]').map(function () { + return this.id; + }); + } + else { + templateElementIds = $.makeArray(arguments); + } + + $.each(templateElementIds, function() { + var templateElement = document.getElementById(this); + + if (templateElement === null) { + $.error('No such elementId: #' + this); + } + else { + add(this, $(templateElement).html()); + } + }); + } + + /** + * Removes a template, the contents of the removed Template will be returned. + * + * @param templateName The name of the previously registered Mustache template that you wish to remove. + * @returns String which represents the raw content of the template. + */ + function remove(templateName) { + var result = templateMap[templateName]; + delete templateMap[templateName]; + return result; + } + + /** + * Removes all templates and tells Mustache to flush its cache. + */ + function clear() { + templateMap = {}; + getMustache().clearCache(); + } + + /** + * Renders a previously added Mustache template using the supplied templateData object. Note if the supplied + * templateName doesn't exist an empty String will be returned. + */ + function render(templateName, templateData) { + if (!has(templateName)) { + if (options.warnOnMissingTemplates) { + $.error('No template registered for: ' + templateName); + } + return ''; + } + return getMustache().to_html(templateMap[templateName], templateData, templateMap); + } + + /** + * Loads the external Mustache templates located at the supplied URL and registers them for later use. This method + * returns a jQuery Promise and also support an `onComplete` callback. + * + * @param url URL of the external Mustache template file to load. + * @param onComplete Optional callback function which will be invoked when the templates from the supplied URL + * have been loaded and are ready for use. + * @returns jQuery deferred promise which will complete when the templates have been loaded and are + * ready for use. + */ + function load(url, onComplete) { + return $.ajax({ + url: url, + dataType: options.externalTemplateDataType + }).done(function (templates) { + $(templates).filter('script').each(function (i, el) { + add(el.id, $(el).html()); + }); + + if ($.isFunction(onComplete)) { + onComplete(); + } + }); + } + + /** + * Returns an Array of templateNames which have been registered and can be retrieved via + * $.Mustache.render() or $(element).mustache(). + */ + function templates() { + return $.map(templateMap, function (value, key) { + return key; + }); + } + + // Expose the public methods on jQuery.Mustache + $.Mustache = { + options: options, + load: load, + add: add, + addFromDom: addFromDom, + remove: remove, + clear: clear, + render: render, + templates: templates, + instance: instance + }; + + /** + * Renders one or more viewModels into the current jQuery element. + * + * @param templateName The name of the Mustache template you wish to render, Note that the + * template must have been previously loaded and / or added. + * @param templateData One or more JavaScript objects which will be used to render the Mustache + * template. + * @param options.method jQuery method to use when rendering, defaults to 'append'. + */ + $.fn.mustache = function (templateName, templateData, options) { + var settings = $.extend({ + method: 'append' + }, options); + + var renderTemplate = function (obj, viewModel) { + $(obj)[settings.method](render(templateName, viewModel)); + }; + + return this.each(function () { + var element = this; + + // Render a collection of viewModels. + if ($.isArray(templateData)) { + $.each(templateData, function () { + renderTemplate(element, this); + }); + } + + // Render a single viewModel. + else { + renderTemplate(element, templateData); + } + }); + }; + +}(jQuery, window));
\ No newline at end of file diff --git a/js/js-yaml.min.js b/js/js-yaml.min.js new file mode 100644 index 0000000..3cb1799 --- /dev/null +++ b/js/js-yaml.min.js @@ -0,0 +1,6 @@ +var jsyaml=window.jsyaml=function(){require=function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i}({"./index":[function(require,module,exports){module.exports=require("jPUIy0")},{}],jPUIy0:[function(require,module,exports){module.exports=require("./lib/js-yaml.js")},{"./lib/js-yaml.js":1}],1:[function(require,module,exports){"use strict";var loader=require("./js-yaml/loader");var dumper=require("./js-yaml/dumper");function deprecated(name){return function(){throw new Error("Function "+name+" is deprecated and cannot be used.")}}module.exports.Type=require("./js-yaml/type");module.exports.Schema=require("./js-yaml/schema");module.exports.MINIMAL_SCHEMA=require("./js-yaml/schema/minimal");module.exports.SAFE_SCHEMA=require("./js-yaml/schema/safe");module.exports.DEFAULT_SCHEMA=require("./js-yaml/schema/default");module.exports.load=loader.load;module.exports.loadAll=loader.loadAll;module.exports.safeLoad=loader.safeLoad;module.exports.safeLoadAll=loader.safeLoadAll;module.exports.dump=dumper.dump;module.exports.safeDump=dumper.safeDump;module.exports.YAMLException=require("./js-yaml/exception");module.exports.scan=deprecated("scan");module.exports.parse=deprecated("parse");module.exports.compose=deprecated("compose");module.exports.addConstructor=deprecated("addConstructor");require("./js-yaml/require")},{"./js-yaml/loader":2,"./js-yaml/dumper":3,"./js-yaml/type":4,"./js-yaml/schema":5,"./js-yaml/schema/minimal":6,"./js-yaml/schema/safe":7,"./js-yaml/schema/default":8,"./js-yaml/exception":9,"./js-yaml/require":10}],9:[function(require,module,exports){"use strict";function YAMLException(reason,mark){this.name="YAMLException";this.reason=reason;this.mark=mark;this.message=this.toString(false)}YAMLException.prototype.toString=function toString(compact){var result;result="JS-YAML: "+(this.reason||"(unknown reason)");if(!compact&&this.mark){result+=" "+this.mark.toString()}return result};module.exports=YAMLException},{}],11:[function(require,module,exports){},{}],2:[function(require,module,exports){"use strict";var common=require("./common");var YAMLException=require("./exception");var Mark=require("./mark");var NIL=common.NIL;var SAFE_SCHEMA=require("./schema/safe");var DEFAULT_SCHEMA=require("./schema/default");var _hasOwnProperty=Object.prototype.hasOwnProperty;var KIND_STRING="string";var KIND_ARRAY="array";var KIND_OBJECT="object";var CONTEXT_FLOW_IN=1;var CONTEXT_FLOW_OUT=2;var CONTEXT_BLOCK_IN=3;var CONTEXT_BLOCK_OUT=4;var CHOMPING_CLIP=1;var CHOMPING_STRIP=2;var CHOMPING_KEEP=3;var CHAR_TAB=9;var CHAR_LINE_FEED=10;var CHAR_CARRIAGE_RETURN=13;var CHAR_SPACE=32;var CHAR_EXCLAMATION=33;var CHAR_DOUBLE_QUOTE=34;var CHAR_SHARP=35;var CHAR_PERCENT=37;var CHAR_AMPERSAND=38;var CHAR_SINGLE_QUOTE=39;var CHAR_ASTERISK=42;var CHAR_PLUS=43;var CHAR_COMMA=44;var CHAR_MINUS=45;var CHAR_DOT=46;var CHAR_SLASH=47;var CHAR_DIGIT_ZERO=48;var CHAR_DIGIT_ONE=49;var CHAR_DIGIT_NINE=57;var CHAR_COLON=58;var CHAR_LESS_THAN=60;var CHAR_GREATER_THAN=62;var CHAR_QUESTION=63;var CHAR_COMMERCIAL_AT=64;var CHAR_CAPITAL_A=65;var CHAR_CAPITAL_F=70;var CHAR_CAPITAL_L=76;var CHAR_CAPITAL_N=78;var CHAR_CAPITAL_P=80;var CHAR_CAPITAL_U=85;var CHAR_LEFT_SQUARE_BRACKET=91;var CHAR_BACKSLASH=92;var CHAR_RIGHT_SQUARE_BRACKET=93;var CHAR_UNDERSCORE=95;var CHAR_GRAVE_ACCENT=96;var CHAR_SMALL_A=97;var CHAR_SMALL_B=98;var CHAR_SMALL_E=101;var CHAR_SMALL_F=102;var CHAR_SMALL_N=110;var CHAR_SMALL_R=114;var CHAR_SMALL_T=116;var CHAR_SMALL_U=117;var CHAR_SMALL_V=118;var CHAR_SMALL_X=120;var CHAR_LEFT_CURLY_BRACKET=123;var CHAR_VERTICAL_LINE=124;var CHAR_RIGHT_CURLY_BRACKET=125;var SIMPLE_ESCAPE_SEQUENCES={};SIMPLE_ESCAPE_SEQUENCES[CHAR_DIGIT_ZERO]="\0";SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_A]="";SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_B]="\b";SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_T]=" ";SIMPLE_ESCAPE_SEQUENCES[CHAR_TAB]=" ";SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_N]="\n";SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_V]="";SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_F]="\f";SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_R]="\r";SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_E]="";SIMPLE_ESCAPE_SEQUENCES[CHAR_SPACE]=" ";SIMPLE_ESCAPE_SEQUENCES[CHAR_DOUBLE_QUOTE]='"';SIMPLE_ESCAPE_SEQUENCES[CHAR_SLASH]="/";SIMPLE_ESCAPE_SEQUENCES[CHAR_BACKSLASH]="\\";SIMPLE_ESCAPE_SEQUENCES[CHAR_CAPITAL_N]="
";SIMPLE_ESCAPE_SEQUENCES[CHAR_UNDERSCORE]=" ";SIMPLE_ESCAPE_SEQUENCES[CHAR_CAPITAL_L]="\u2028";SIMPLE_ESCAPE_SEQUENCES[CHAR_CAPITAL_P]="\u2029";var HEXADECIMAL_ESCAPE_SEQUENCES={};HEXADECIMAL_ESCAPE_SEQUENCES[CHAR_SMALL_X]=2;HEXADECIMAL_ESCAPE_SEQUENCES[CHAR_SMALL_U]=4;HEXADECIMAL_ESCAPE_SEQUENCES[CHAR_CAPITAL_U]=8;var PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uD800-\uDFFF\uFFFE\uFFFF]/;var PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/;var PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/;var PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i;var PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function loadAll(input,output,options){options=options||{};var filename=options["filename"]||null,schema=options["schema"]||DEFAULT_SCHEMA,resolve=options["resolve"]||true,validate=options["validate"]||true,strict=options["strict"]||false,legacy=options["legacy"]||false,directiveHandlers={},implicitTypes=schema.compiledImplicit,typeMap=schema.compiledTypeMap,length=input.length,position=0,line=0,lineStart=0,lineIndent=0,character=input.charCodeAt(position),version,checkLineBreaks,tagMap,anchorMap,tag,anchor,kind,result;function generateError(message){return new YAMLException(message,new Mark(filename,input,position,line,position-lineStart))}function throwError(message){throw generateError(message)}function throwWarning(message){var error=generateError(message);if(strict){throw error}else{console.warn(error.toString())}}directiveHandlers["YAML"]=function handleYamlDirective(name,args){var match,major,minor;if(null!==version){throwError("duplication of %YAML directive")}if(1!==args.length){throwError("YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(null===match){throwError("ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(1!==major){throwError("unacceptable YAML version of the document")}version=args[0];checkLineBreaks=minor<2;if(1!==minor&&2!==minor){throwWarning("unsupported YAML version of the document")}};directiveHandlers["TAG"]=function handleTagDirective(name,args){var handle,prefix;if(2!==args.length){throwError("TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError("ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(tagMap,handle)){throwError('there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError("ill-formed tag prefix (second argument) of the TAG directive")}tagMap[handle]=prefix};function captureSegment(start,end,checkJson){var _position,_length,_character,_result;if(start<end){_result=input.slice(start,end);if(checkJson&&validate){for(_position=0,_length=_result.length;_position<_length;_position+=1){_character=_result.charCodeAt(_position);if(!(9===_character||32<=_character&&_character<=1114111)){throwError("expected valid JSON character")}}}result+=_result}}function mergeMappings(destination,source){var sourceKeys,key,index,quantity;if(!common.isObject(source)){throwError("cannot merge mappings; the provided source object is unacceptable")}sourceKeys=Object.keys(source);for(index=0,quantity=sourceKeys.length;index<quantity;index+=1){key=sourceKeys[index];if(!_hasOwnProperty.call(destination,key)){destination[key]=source[key]}}}function storeMappingPair(_result,keyTag,keyNode,valueNode){var index,quantity;keyNode=String(keyNode);if(null===_result){_result={}}if("tag:yaml.org,2002:merge"===keyTag){if(Array.isArray(valueNode)){for(index=0,quantity=valueNode.length;index<quantity;index+=1){mergeMappings(_result,valueNode[index])}}else{mergeMappings(_result,valueNode)}}else{_result[keyNode]=valueNode}return _result}function readLineBreak(){if(CHAR_LINE_FEED===character){position+=1}else if(CHAR_CARRIAGE_RETURN===character){if(CHAR_LINE_FEED===input.charCodeAt(position+1)){position+=2}else{position+=1}}else{throwError("a line break is expected")}line+=1;lineStart=position;character=input.charCodeAt(position)}function skipSeparationSpace(allowComments,checkIndent){var lineBreaks=0;while(position<length){while(CHAR_SPACE===character||CHAR_TAB===character){character=input.charCodeAt(++position)}if(allowComments&&CHAR_SHARP===character){do{character=input.charCodeAt(++position)}while(position<length&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character)}if(CHAR_LINE_FEED===character||CHAR_CARRIAGE_RETURN===character){readLineBreak();lineBreaks+=1;lineIndent=0;while(CHAR_SPACE===character){lineIndent+=1;character=input.charCodeAt(++position)}if(lineIndent<checkIndent){throwWarning("deficient indentation")}}else{break}}return lineBreaks}function testDocumentSeparator(){var _position,_character;if(position===lineStart&&(CHAR_MINUS===character||CHAR_DOT===character)&&input.charCodeAt(position+1)===character&&input.charCodeAt(position+2)===character){_position=position+3;_character=input.charCodeAt(_position);if(_position>=length||CHAR_SPACE===_character||CHAR_TAB===_character||CHAR_LINE_FEED===_character||CHAR_CARRIAGE_RETURN===_character){return true}}return false}function writeFoldedLines(count){if(1===count){result+=" "}else if(count>1){result+=common.repeat("\n",count-1)}}function readPlainScalar(nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=kind,_result=result;if(CHAR_SPACE===character||CHAR_TAB===character||CHAR_LINE_FEED===character||CHAR_CARRIAGE_RETURN===character||CHAR_COMMA===character||CHAR_LEFT_SQUARE_BRACKET===character||CHAR_RIGHT_SQUARE_BRACKET===character||CHAR_LEFT_CURLY_BRACKET===character||CHAR_RIGHT_CURLY_BRACKET===character||CHAR_SHARP===character||CHAR_AMPERSAND===character||CHAR_ASTERISK===character||CHAR_EXCLAMATION===character||CHAR_VERTICAL_LINE===character||CHAR_GREATER_THAN===character||CHAR_SINGLE_QUOTE===character||CHAR_DOUBLE_QUOTE===character||CHAR_PERCENT===character||CHAR_COMMERCIAL_AT===character||CHAR_GRAVE_ACCENT===character){return false}if(CHAR_QUESTION===character||CHAR_MINUS===character){following=input.charCodeAt(position+1);if(CHAR_SPACE===following||CHAR_TAB===following||CHAR_LINE_FEED===following||CHAR_CARRIAGE_RETURN===following||withinFlowCollection&&(CHAR_COMMA===following||CHAR_LEFT_SQUARE_BRACKET===following||CHAR_RIGHT_SQUARE_BRACKET===following||CHAR_LEFT_CURLY_BRACKET===following||CHAR_RIGHT_CURLY_BRACKET===following)){return false}}kind=KIND_STRING;result="";captureStart=captureEnd=position;hasPendingContent=false;while(position<length){if(CHAR_COLON===character){following=input.charCodeAt(position+1);if(CHAR_SPACE===following||CHAR_TAB===following||CHAR_LINE_FEED===following||CHAR_CARRIAGE_RETURN===following||withinFlowCollection&&(CHAR_COMMA===following||CHAR_LEFT_SQUARE_BRACKET===following||CHAR_RIGHT_SQUARE_BRACKET===following||CHAR_LEFT_CURLY_BRACKET===following||CHAR_RIGHT_CURLY_BRACKET===following)){break}}else if(CHAR_SHARP===character){preceding=input.charCodeAt(position-1);if(CHAR_SPACE===preceding||CHAR_TAB===preceding||CHAR_LINE_FEED===preceding||CHAR_CARRIAGE_RETURN===preceding){break}}else if(position===lineStart&&testDocumentSeparator()||withinFlowCollection&&(CHAR_COMMA===character||CHAR_LEFT_SQUARE_BRACKET===character||CHAR_RIGHT_SQUARE_BRACKET===character||CHAR_LEFT_CURLY_BRACKET===character||CHAR_RIGHT_CURLY_BRACKET===character)){break}else if(CHAR_LINE_FEED===character||CHAR_CARRIAGE_RETURN===character){_line=line;_lineStart=lineStart;_lineIndent=lineIndent;skipSeparationSpace(false,-1);if(lineIndent>=nodeIndent){hasPendingContent=true;continue}else{position=captureEnd;line=_line;lineStart=_lineStart;lineIndent=_lineIndent;character=input.charCodeAt(position);break}}if(hasPendingContent){captureSegment(captureStart,captureEnd,false);writeFoldedLines(line-_line);captureStart=captureEnd=position;hasPendingContent=false}if(CHAR_SPACE!==character&&CHAR_TAB!==character){captureEnd=position+1}character=input.charCodeAt(++position)}captureSegment(captureStart,captureEnd,false);if(result){return true}else{kind=_kind;result=_result;return false}}function readSingleQuotedScalar(nodeIndent){var captureStart,captureEnd;if(CHAR_SINGLE_QUOTE!==character){return false}kind=KIND_STRING;result="";character=input.charCodeAt(++position);captureStart=captureEnd=position;while(position<length){if(CHAR_SINGLE_QUOTE===character){captureSegment(captureStart,position,true);character=input.charCodeAt(++position);if(CHAR_SINGLE_QUOTE===character){captureStart=captureEnd=position;character=input.charCodeAt(++position)}else{return true}}else if(CHAR_LINE_FEED===character||CHAR_CARRIAGE_RETURN===character){captureSegment(captureStart,captureEnd,true);writeFoldedLines(skipSeparationSpace(false,nodeIndent));captureStart=captureEnd=position;character=input.charCodeAt(position)}else if(position===lineStart&&testDocumentSeparator()){throwError("unexpected end of the document within a single quoted scalar")}else{character=input.charCodeAt(++position);captureEnd=position}}throwError("unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(nodeIndent){var captureStart,captureEnd,hexLength,hexIndex,hexOffset,hexResult;if(CHAR_DOUBLE_QUOTE!==character){return false}kind=KIND_STRING;result="";character=input.charCodeAt(++position);captureStart=captureEnd=position;while(position<length){if(CHAR_DOUBLE_QUOTE===character){captureSegment(captureStart,position,true);character=input.charCodeAt(++position);return true}else if(CHAR_BACKSLASH===character){captureSegment(captureStart,position,true);character=input.charCodeAt(++position);if(CHAR_LINE_FEED===character||CHAR_CARRIAGE_RETURN===character){skipSeparationSpace(false,nodeIndent)}else if(SIMPLE_ESCAPE_SEQUENCES[character]){result+=SIMPLE_ESCAPE_SEQUENCES[character];character=input.charCodeAt(++position)}else if(HEXADECIMAL_ESCAPE_SEQUENCES[character]){hexLength=HEXADECIMAL_ESCAPE_SEQUENCES[character];hexResult=0;for(hexIndex=1;hexIndex<=hexLength;hexIndex+=1){hexOffset=(hexLength-hexIndex)*4;character=input.charCodeAt(++position);if(CHAR_DIGIT_ZERO<=character&&character<=CHAR_DIGIT_NINE){hexResult|=character-CHAR_DIGIT_ZERO<<hexOffset}else if(CHAR_CAPITAL_A<=character&&character<=CHAR_CAPITAL_F){hexResult|=character-CHAR_CAPITAL_A+10<<hexOffset}else if(CHAR_SMALL_A<=character&&character<=CHAR_SMALL_F){hexResult|=character-CHAR_SMALL_A+10<<hexOffset}else{throwError("expected hexadecimal character")}}result+=String.fromCharCode(hexResult);character=input.charCodeAt(++position)}else{throwError("unknown escape sequence")}captureStart=captureEnd=position}else if(CHAR_LINE_FEED===character||CHAR_CARRIAGE_RETURN===character){captureSegment(captureStart,captureEnd,true);writeFoldedLines(skipSeparationSpace(false,nodeIndent));captureStart=captureEnd=position;character=input.charCodeAt(position)}else if(position===lineStart&&testDocumentSeparator()){throwError("unexpected end of the document within a double quoted scalar")}else{character=input.charCodeAt(++position);captureEnd=position}}throwError("unexpected end of the stream within a double quoted scalar")}function readFlowCollection(nodeIndent){var readNext=true,_line,_tag=tag,_result,following,terminator,isPair,isExplicitPair,isMapping,keyNode,keyTag,valueNode;switch(character){case CHAR_LEFT_SQUARE_BRACKET:terminator=CHAR_RIGHT_SQUARE_BRACKET;isMapping=false;_result=[];break;case CHAR_LEFT_CURLY_BRACKET:terminator=CHAR_RIGHT_CURLY_BRACKET;isMapping=true;_result={};break;default:return false}if(null!==anchor){anchorMap[anchor]=_result}character=input.charCodeAt(++position);while(position<length){skipSeparationSpace(true,nodeIndent);if(character===terminator){character=input.charCodeAt(++position);tag=_tag;kind=isMapping?KIND_OBJECT:KIND_ARRAY;result=_result;return true}else if(!readNext){throwError("missed comma between flow collection entries")}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(CHAR_QUESTION===character){following=input.charCodeAt(position+1);if(CHAR_SPACE===following||CHAR_TAB===following||CHAR_LINE_FEED===following||CHAR_CARRIAGE_RETURN===following){isPair=isExplicitPair=true;position+=1;character=following;skipSeparationSpace(true,nodeIndent)}}_line=line;composeNode(nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=tag;keyNode=result;if((isExplicitPair||line===_line)&&CHAR_COLON===character){isPair=true;character=input.charCodeAt(++position);skipSeparationSpace(true,nodeIndent);composeNode(nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=result}if(isMapping){storeMappingPair(_result,keyTag,keyNode,valueNode)}else if(isPair){_result.push(storeMappingPair(null,keyTag,keyNode,valueNode))}else{_result.push(keyNode)}skipSeparationSpace(true,nodeIndent);if(CHAR_COMMA===character){readNext=true;character=input.charCodeAt(++position)}else{readNext=false}}throwError("unexpected end of the stream within a flow collection")}function readBlockScalar(nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,detectedIndent=false,textIndent=nodeIndent,emptyLines=-1;switch(character){case CHAR_VERTICAL_LINE:folding=false;break;case CHAR_GREATER_THAN:folding=true;break;default:return false}kind=KIND_STRING;result="";while(position<length){character=input.charCodeAt(++position);if(CHAR_PLUS===character||CHAR_MINUS===character){if(CHOMPING_CLIP===chomping){chomping=CHAR_PLUS===character?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError("repeat of a chomping mode identifier")}}else if(CHAR_DIGIT_ZERO<=character&&character<=CHAR_DIGIT_NINE){if(CHAR_DIGIT_ZERO===character){throwError("bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+(character-CHAR_DIGIT_ONE);detectedIndent=true}else{throwError("repeat of an indentation width identifier")}}else{break}}if(CHAR_SPACE===character||CHAR_TAB===character){do{character=input.charCodeAt(++position)}while(CHAR_SPACE===character||CHAR_TAB===character);if(CHAR_SHARP===character){do{character=input.charCodeAt(++position)}while(position<length&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character)}}while(position<length){readLineBreak();lineIndent=0;while((!detectedIndent||lineIndent<textIndent)&&CHAR_SPACE===character){lineIndent+=1;character=input.charCodeAt(++position)}if(!detectedIndent&&lineIndent>textIndent){textIndent=lineIndent}if(CHAR_LINE_FEED===character||CHAR_CARRIAGE_RETURN===character){emptyLines+=1;continue}if(lineIndent<textIndent){if(CHOMPING_KEEP===chomping){result+=common.repeat("\n",emptyLines+1)}else if(CHOMPING_CLIP===chomping){result+="\n"}break}detectedIndent=true;if(folding){if(CHAR_SPACE===character||CHAR_TAB===character){result+=common.repeat("\n",emptyLines+1);emptyLines=1}else if(0===emptyLines){result+=" ";emptyLines=0}else{result+=common.repeat("\n",emptyLines);emptyLines=0}}else{result+=common.repeat("\n",emptyLines+1);emptyLines=0}captureStart=position;do{character=input.charCodeAt(++position)}while(position<length&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character);captureSegment(captureStart,position,false)}return true}function readBlockSequence(nodeIndent){var _line,_tag=tag,_result=[],following,detected=false;if(null!==anchor){anchorMap[anchor]=_result}while(position<length){if(CHAR_MINUS!==character){break}following=input.charCodeAt(position+1);if(CHAR_SPACE!==following&&CHAR_TAB!==following&&CHAR_LINE_FEED!==following&&CHAR_CARRIAGE_RETURN!==following){break}detected=true;position+=1;character=following;if(skipSeparationSpace(true,-1)){if(lineIndent<=nodeIndent){_result.push(null);continue}}_line=line;composeNode(nodeIndent,CONTEXT_BLOCK_IN,false,true);_result.push(result);skipSeparationSpace(true,-1);if((line===_line||lineIndent>nodeIndent)&&position<length){throwError("bad indentation of a sequence entry")}else if(lineIndent<nodeIndent){break}}if(detected){tag=_tag;kind=KIND_ARRAY;result=_result;return true}else{return false}}function readBlockMapping(nodeIndent){var following,allowCompact,_line,_tag=tag,_result={},keyTag=null,keyNode=null,valueNode=null,atExplicitKey=false,detected=false;if(null!==anchor){anchorMap[anchor]=_result}while(position<length){following=input.charCodeAt(position+1);_line=line;if((CHAR_QUESTION===character||CHAR_COLON===character)&&(CHAR_SPACE===following||CHAR_TAB===following||CHAR_LINE_FEED===following||CHAR_CARRIAGE_RETURN===following)){if(CHAR_QUESTION===character){if(atExplicitKey){storeMappingPair(_result,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=true;allowCompact=true}else if(atExplicitKey){atExplicitKey=false;allowCompact=true}else{throwError("incomplete explicit mapping pair; a key node is missed")}position+=1;character=following}else if(composeNode(nodeIndent,CONTEXT_FLOW_OUT,false,true)){if(line===_line){while(CHAR_SPACE===character||CHAR_TAB===character){character=input.charCodeAt(++position)}if(CHAR_COLON===character){character=input.charCodeAt(++position);if(CHAR_SPACE!==character&&CHAR_TAB!==character&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character){throwError("a whitespace character is expected after the key-value separator within a block mapping")}if(atExplicitKey){storeMappingPair(_result,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=false;allowCompact=false;keyTag=tag;keyNode=result}else if(detected){throwError("can not read an implicit mapping pair; a colon is missed")}else{tag=_tag;return true}}else if(detected){throwError("can not read a block mapping entry; a multiline key may not be an implicit key")}else{tag=_tag;return true}}else{break}if(line===_line||lineIndent>nodeIndent){if(composeNode(nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=result}else{valueNode=result}}if(!atExplicitKey){storeMappingPair(_result,keyTag,keyNode,valueNode);keyTag=keyNode=valueNode=null}skipSeparationSpace(true,-1)}if(lineIndent>nodeIndent&&position<length){throwError("bad indentation of a mapping entry")}else if(lineIndent<nodeIndent){break}}if(atExplicitKey){storeMappingPair(_result,keyTag,keyNode,null)}if(detected){tag=_tag;kind=KIND_OBJECT;result=_result}return detected}function readTagProperty(){var _position,isVerbatim=false,isNamed=false,tagHandle,tagName;if(CHAR_EXCLAMATION!==character){return false}if(null!==tag){throwError("duplication of a tag property")}character=input.charCodeAt(++position);if(CHAR_LESS_THAN===character){isVerbatim=true;character=input.charCodeAt(++position)}else if(CHAR_EXCLAMATION===character){isNamed=true;tagHandle="!!";character=input.charCodeAt(++position)}else{tagHandle="!"}_position=position;if(isVerbatim){do{character=input.charCodeAt(++position)}while(position<length&&CHAR_GREATER_THAN!==character);if(position<length){tagName=input.slice(_position,position);character=input.charCodeAt(++position)}else{throwError("unexpected end of the stream within a verbatim tag")}}else{while(position<length&&CHAR_SPACE!==character&&CHAR_TAB!==character&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character){if(CHAR_EXCLAMATION===character){if(!isNamed){tagHandle=input.slice(_position-1,position+1);if(validate&&!PATTERN_TAG_HANDLE.test(tagHandle)){throwError("named tag handle cannot contain such characters")}isNamed=true;_position=position+1}else{throwError("tag suffix cannot contain exclamation marks")}}character=input.charCodeAt(++position)}tagName=input.slice(_position,position);if(validate&&PATTERN_FLOW_INDICATORS.test(tagName)){throwError("tag suffix cannot contain flow indicator characters")}}if(validate&&tagName&&!PATTERN_TAG_URI.test(tagName)){throwError("tag name cannot contain such characters: "+tagName)}if(isVerbatim){tag=tagName}else if(_hasOwnProperty.call(tagMap,tagHandle)){tag=tagMap[tagHandle]+tagName}else if("!"===tagHandle){tag="!"+tagName}else if("!!"===tagHandle){tag="tag:yaml.org,2002:"+tagName}else{throwError('undeclared tag handle "'+tagHandle+'"')}return true}function readAnchorProperty(){var _position;if(CHAR_AMPERSAND!==character){return false}if(null!==anchor){throwError("duplication of an anchor property")}character=input.charCodeAt(++position);_position=position;while(position<length&&CHAR_SPACE!==character&&CHAR_TAB!==character&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character&&CHAR_COMMA!==character&&CHAR_LEFT_SQUARE_BRACKET!==character&&CHAR_RIGHT_SQUARE_BRACKET!==character&&CHAR_LEFT_CURLY_BRACKET!==character&&CHAR_RIGHT_CURLY_BRACKET!==character){character=input.charCodeAt(++position)}if(position===_position){throwError("name of an anchor node must contain at least one character")}anchor=input.slice(_position,position);return true}function readAlias(){var _position,alias;if(CHAR_ASTERISK!==character){return false}character=input.charCodeAt(++position);_position=position;while(position<length&&CHAR_SPACE!==character&&CHAR_TAB!==character&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character&&CHAR_COMMA!==character&&CHAR_LEFT_SQUARE_BRACKET!==character&&CHAR_RIGHT_SQUARE_BRACKET!==character&&CHAR_LEFT_CURLY_BRACKET!==character&&CHAR_RIGHT_CURLY_BRACKET!==character){character=input.charCodeAt(++position)}if(position===_position){throwError("name of an alias node must contain at least one character")}alias=input.slice(_position,position);if(!anchorMap.hasOwnProperty(alias)){throwError('unidentified alias "'+alias+'"')}result=anchorMap[alias];skipSeparationSpace(true,-1);return true}function composeNode(parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,atNewLine=false,isIndented=true,hasContent=false,typeIndex,typeQuantity,type,typeLoader,flowIndent,blockIndent,_result;tag=null;anchor=null;kind=null;result=null;allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext;if(allowToSeek){if(skipSeparationSpace(true,-1)){atNewLine=true;if(lineIndent===parentIndent){isIndented=false}else if(lineIndent>parentIndent){isIndented=true}else{return false}}}if(isIndented){while(readTagProperty()||readAnchorProperty()){if(skipSeparationSpace(true,-1)){atNewLine=true;if(lineIndent>parentIndent){isIndented=true;allowBlockCollections=allowBlockStyles}else if(lineIndent===parentIndent){isIndented=false;allowBlockCollections=allowBlockStyles}else{return true}}else{allowBlockCollections=false}}}if(allowBlockCollections){allowBlockCollections=atNewLine||allowCompact}if(isIndented||CONTEXT_BLOCK_OUT===nodeContext){if(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext){flowIndent=parentIndent}else{flowIndent=parentIndent+1}blockIndent=position-lineStart;if(isIndented){if(allowBlockCollections&&(readBlockSequence(blockIndent)||readBlockMapping(blockIndent))||readFlowCollection(flowIndent)){hasContent=true}else{if(allowBlockScalars&&readBlockScalar(flowIndent)||readSingleQuotedScalar(flowIndent)||readDoubleQuotedScalar(flowIndent)){hasContent=true}else if(readAlias()){hasContent=true;if(null!==tag||null!==anchor){throwError("alias node should not have any properties")}}else if(readPlainScalar(flowIndent,CONTEXT_FLOW_IN===nodeContext)){hasContent=true;if(null===tag){tag="?"}}if(null!==anchor){anchorMap[anchor]=result}}}else{hasContent=allowBlockCollections&&readBlockSequence(blockIndent)}}if(null!==tag&&"!"!==tag){if("?"===tag){if(resolve){for(typeIndex=0,typeQuantity=implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1){type=implicitTypes[typeIndex];_result=type.loader.resolver(result,false);if(NIL!==_result){tag=type.tag;result=_result;break}}}}else if(_hasOwnProperty.call(typeMap,tag)){typeLoader=typeMap[tag].loader;if(null!==result&&typeLoader.kind!==kind){throwError("unacceptable node kind for !<"+tag+'> tag; it should be "'+typeLoader.kind+'", not "'+kind+'"')}if(typeLoader.resolver){_result=typeLoader.resolver(result,true);if(NIL!==_result){result=_result}else{throwError("cannot resolve a node with !<"+tag+"> explicit tag")}}}else{throwWarning("unknown tag !<"+tag+">")}}return null!==tag||null!==anchor||hasContent}function readDocument(){var documentStart=position,_position,directiveName,directiveArgs,hasDirectives=false;version=null;checkLineBreaks=legacy;tagMap={};anchorMap={};while(position<length){skipSeparationSpace(true,-1);if(lineIndent>0||CHAR_PERCENT!==character){break}hasDirectives=true;character=input.charCodeAt(++position);_position=position;while(position<length&&CHAR_SPACE!==character&&CHAR_TAB!==character&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character){character=input.charCodeAt(++position)}directiveName=input.slice(_position,position);directiveArgs=[];if(directiveName.length<1){throwError("directive name must not be less than one character in length")}while(position<length){while(CHAR_SPACE===character||CHAR_TAB===character){character=input.charCodeAt(++position)}if(CHAR_SHARP===character){do{character=input.charCodeAt(++position)}while(position<length&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character);break}if(CHAR_LINE_FEED===character||CHAR_CARRIAGE_RETURN===character){break}_position=position;while(position<length&&CHAR_SPACE!==character&&CHAR_TAB!==character&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character){character=input.charCodeAt(++position)}directiveArgs.push(input.slice(_position,position))}if(position<length){readLineBreak()}if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](directiveName,directiveArgs)}else{throwWarning('unknown document directive "'+directiveName+'"')}}skipSeparationSpace(true,-1);if(0===lineIndent&&CHAR_MINUS===character&&CHAR_MINUS===input.charCodeAt(position+1)&&CHAR_MINUS===input.charCodeAt(position+2)){position+=3;character=input.charCodeAt(position);skipSeparationSpace(true,-1)}else if(hasDirectives){throwError("directives end mark is expected")}composeNode(lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(true,-1);if(validate&&checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(input.slice(documentStart,position))){throwWarning("non-ASCII line breaks are interpreted as content")}output(result);if(position===lineStart&&testDocumentSeparator()){if(CHAR_DOT===character){position+=3;character=input.charCodeAt(position);skipSeparationSpace(true,-1)}return}if(position<length){throwError("end of the stream or a document separator is expected")}else{return}}if(validate&&PATTERN_NON_PRINTABLE.test(input)){throwError("the stream contains non-printable characters")}while(CHAR_SPACE===character){lineIndent+=1;character=input.charCodeAt(++position)}while(position<length){readDocument()}}function load(input,options){var result=null,received=false;function callback(data){if(!received){result=data;received=true}else{throw new YAMLException("expected a single document in the stream, but found more")}}loadAll(input,callback,options);return result}function safeLoadAll(input,output,options){loadAll(input,output,common.extend({schema:SAFE_SCHEMA},options))}function safeLoad(input,options){return load(input,common.extend({schema:SAFE_SCHEMA},options))}module.exports.loadAll=loadAll;module.exports.load=load;module.exports.safeLoadAll=safeLoadAll;module.exports.safeLoad=safeLoad},{"./common":12,"./exception":9,"./mark":13,"./schema/safe":7,"./schema/default":8}],3:[function(require,module,exports){"use strict";var common=require("./common");var NIL=common.NIL;var YAMLException=require("./exception"); +var DEFAULT_SCHEMA=require("./schema/default");var SAFE_SCHEMA=require("./schema/safe");var _hasOwnProperty=Object.prototype.hasOwnProperty;var CHAR_TAB=9;var CHAR_LINE_FEED=10;var CHAR_CARRIAGE_RETURN=13;var CHAR_SPACE=32;var CHAR_EXCLAMATION=33;var CHAR_DOUBLE_QUOTE=34;var CHAR_SHARP=35;var CHAR_PERCENT=37;var CHAR_AMPERSAND=38;var CHAR_SINGLE_QUOTE=39;var CHAR_ASTERISK=42;var CHAR_COMMA=44;var CHAR_MINUS=45;var CHAR_COLON=58;var CHAR_GREATER_THAN=62;var CHAR_QUESTION=63;var CHAR_COMMERCIAL_AT=64;var CHAR_LEFT_SQUARE_BRACKET=91;var CHAR_RIGHT_SQUARE_BRACKET=93;var CHAR_GRAVE_ACCENT=96;var CHAR_LEFT_CURLY_BRACKET=123;var CHAR_VERTICAL_LINE=124;var CHAR_RIGHT_CURLY_BRACKET=125;var ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]="\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";function kindOf(object){var kind=typeof object;if(null===object){return"null"}else if("number"===kind){return 0===object%1?"integer":"float"}else if("object"===kind&&Array.isArray(object)){return"array"}else{return kind}}function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(null===map){return{}}result={};keys=Object.keys(map);for(index=0,length=keys.length;index<length;index+=1){tag=keys[index];style=String(map[tag]);if("!!"===tag.slice(0,2)){tag="tag:yaml.org,2002:"+tag.slice(2)}type=schema.compiledTypeMap[tag];if(type&&type.dumper){if(_hasOwnProperty.call(type.dumper.styleAliases,style)){style=type.dumper.styleAliases[style]}}result[tag]=style}return result}function encodeHex(character){var string,handle,length;string=character.toString(16).toUpperCase();if(character<=255){handle="x";length=2}else if(character<=65535){handle="u";length=4}else if(character<=4294967295){handle="U";length=8}else{throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+handle+common.repeat("0",length-string.length)+string}function dump(input,options){options=options||{};var schema=options["schema"]||DEFAULT_SCHEMA,indent=Math.max(1,options["indent"]||2),flowLevel=common.isNothing(options["flowLevel"])?-1:options["flowLevel"],styleMap=compileStyleMap(schema,options["styles"]||null),implicitTypes=schema.compiledImplicit,explicitTypes=schema.compiledExplicit,kind,tag,result;function generateNextLine(level){return"\n"+common.repeat(" ",indent*level)}function testImplicitResolving(object){var index,length,type;for(index=0,length=implicitTypes.length;index<length;index+=1){type=implicitTypes[index];if(null!==type.loader&&NIL!==type.loader.resolver(object,false)){return true}}return false}function writeScalar(object){var isQuoted,checkpoint,position,length,character;result="";isQuoted=false;checkpoint=0;if(0===object.length||CHAR_SPACE===object.charCodeAt(0)||CHAR_SPACE===object.charCodeAt(object.length-1)){isQuoted=true}for(position=0,length=object.length;position<length;position+=1){character=object.charCodeAt(position);if(!isQuoted){if(CHAR_TAB===character||CHAR_LINE_FEED===character||CHAR_CARRIAGE_RETURN===character||CHAR_COMMA===character||CHAR_LEFT_SQUARE_BRACKET===character||CHAR_RIGHT_SQUARE_BRACKET===character||CHAR_LEFT_CURLY_BRACKET===character||CHAR_RIGHT_CURLY_BRACKET===character||CHAR_SHARP===character||CHAR_AMPERSAND===character||CHAR_ASTERISK===character||CHAR_EXCLAMATION===character||CHAR_VERTICAL_LINE===character||CHAR_GREATER_THAN===character||CHAR_SINGLE_QUOTE===character||CHAR_DOUBLE_QUOTE===character||CHAR_PERCENT===character||CHAR_COMMERCIAL_AT===character||CHAR_GRAVE_ACCENT===character||CHAR_QUESTION===character||CHAR_COLON===character||CHAR_MINUS===character){isQuoted=true}}if(ESCAPE_SEQUENCES[character]||!(32<=character&&character<=126||133===character||160<=character&&character<=55295||57344<=character&&character<=65533||65536<=character&&character<=1114111)){result+=object.slice(checkpoint,position);result+=ESCAPE_SEQUENCES[character]||encodeHex(character);checkpoint=position+1;isQuoted=true}}if(checkpoint<position){result+=object.slice(checkpoint,position)}if(!isQuoted&&testImplicitResolving(result)){isQuoted=true}if(isQuoted){result='"'+result+'"'}}function writeFlowSequence(level,object){var _result="",_tag=tag,index,length;for(index=0,length=object.length;index<length;index+=1){if(0!==index){_result+=", "}writeNode(level,object[index],false,false);_result+=result}tag=_tag;result="["+_result+"]"}function writeBlockSequence(level,object,compact){var _result="",_tag=tag,index,length;for(index=0,length=object.length;index<length;index+=1){if(!compact||0!==index){_result+=generateNextLine(level)}writeNode(level+1,object[index],true,true);_result+="- "+result}tag=_tag;result=_result}function writeFlowMapping(level,object){var _result="",_tag=tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue;for(index=0,length=objectKeyList.length;index<length;index+=1){if(0!==index){_result+=", "}objectKey=objectKeyList[index];objectValue=object[objectKey];writeNode(level,objectKey,false,false);if(result.length>1024){_result+="? "}_result+=result+": ";writeNode(level,objectValue,false,false);_result+=result}tag=_tag;result="{"+_result+"}"}function writeBlockMapping(level,object,compact){var _result="",_tag=tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair;for(index=0,length=objectKeyList.length;index<length;index+=1){if(!compact||0!==index){_result+=generateNextLine(level)}objectKey=objectKeyList[index];objectValue=object[objectKey];writeNode(level+1,objectKey,true,true);explicitPair=null!==tag&&"?"!==tag&&result.length<=1024;if(explicitPair){_result+="? "}_result+=result;if(explicitPair){_result+=generateNextLine(level)}writeNode(level+1,objectValue,true,explicitPair);_result+=": "+result}tag=_tag;result=_result}function detectType(object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?explicitTypes:implicitTypes;kind=kindOf(object);for(index=0,length=typeList.length;index<length;index+=1){type=typeList[index];if(null!==type.dumper&&(null===type.dumper.kind||kind===type.dumper.kind)&&(null===type.dumper.instanceOf||object instanceof type.dumper.instanceOf)&&(null===type.dumper.predicate||type.dumper.predicate(object))){tag=explicit?type.tag:"?";if(null!==type.dumper.representer){style=styleMap[type.tag]||type.dumper.defaultStyle;if("function"===typeof type.dumper.representer){_result=type.dumper.representer(object,style)}else if(_hasOwnProperty.call(type.dumper.representer,style)){_result=type.dumper.representer[style](object,style)}else{throw new YAMLException("!<"+type.tag+'> tag resolver accepts not "'+style+'" style')}if(NIL!==_result){kind=kindOf(_result);result=_result}else{if(explicit){throw new YAMLException("cannot represent an object of !<"+type.tag+"> type")}else{continue}}}return true}}return false}function writeNode(level,object,block,compact){tag=null;result=object;if(!detectType(object,false)){detectType(object,true)}if(block){block=0>flowLevel||flowLevel>level}if(null!==tag&&"?"!==tag||2!==indent&&level>0){compact=false}if("object"===kind){if(block&&0!==Object.keys(result).length){writeBlockMapping(level,result,compact)}else{writeFlowMapping(level,result)}}else if("array"===kind){if(block&&0!==result.length){writeBlockSequence(level,result,compact)}else{writeFlowSequence(level,result)}}else if("string"===kind){if("?"!==tag){writeScalar(result)}}else{throw new YAMLException("unacceptabe kind of an object to dump ("+kind+")")}if(null!==tag&&"?"!==tag){result="!<"+tag+"> "+result}}writeNode(0,input,true,true);return result+"\n"}function safeDump(input,options){return dump(input,common.extend({schema:SAFE_SCHEMA},options))}module.exports.dump=dump;module.exports.safeDump=safeDump},{"./common":12,"./exception":9,"./schema/default":8,"./schema/safe":7}],4:[function(require,module,exports){"use strict";var YAMLException=require("./exception");function Type(tag,options){options=options||{};this.tag=tag;this.loader=options["loader"]||null;this.dumper=options["dumper"]||null;if(null===this.loader&&null===this.dumper){throw new YAMLException('Incomplete YAML type definition. "loader" or "dumper" setting must be specified.')}if(null!==this.loader){this.loader=new Type.Loader(this.loader)}if(null!==this.dumper){this.dumper=new Type.Dumper(this.dumper)}}Type.Loader=function TypeLoader(options){options=options||{};this.kind=options["kind"]||null;this.resolver=options["resolver"]||null;if("string"!==this.kind&&"array"!==this.kind&&"object"!==this.kind){throw new YAMLException('Unacceptable "kind" setting of a type loader.')}};function compileAliases(map){var result={};if(null!==map){Object.keys(map).forEach(function(style){map[style].forEach(function(alias){result[String(alias)]=style})})}return result}Type.Dumper=function TypeDumper(options){options=options||{};this.kind=options["kind"]||null;this.defaultStyle=options["defaultStyle"]||null;this.instanceOf=options["instanceOf"]||null;this.predicate=options["predicate"]||null;this.representer=options["representer"]||null;this.styleAliases=compileAliases(options["styleAliases"]||null);if("undefined"!==this.kind&&"null"!==this.kind&&"boolean"!==this.kind&&"integer"!==this.kind&&"float"!==this.kind&&"string"!==this.kind&&"array"!==this.kind&&"object"!==this.kind&&"function"!==this.kind){throw new YAMLException('Unacceptable "kind" setting of a type dumper.')}};module.exports=Type},{"./exception":9}],5:[function(require,module,exports){"use strict";var common=require("./common");var YAMLException=require("./exception");var Type=require("./type");function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag){exclude.push(previousIndex)}});result.push(currentType)});return result.filter(function(type,index){return-1===exclude.indexOf(index)})}function compileMap(){var result={},index,length;function collectType(type){result[type.tag]=type}for(index=0,length=arguments.length;index<length;index+=1){arguments[index].forEach(collectType)}return result}function Schema(definition){this.include=definition.include||[];this.implicit=definition.implicit||[];this.explicit=definition.explicit||[];this.implicit.forEach(function(type){if(null!==type.loader&&"string"!==type.loader.kind){throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}});this.compiledImplicit=compileList(this,"implicit",[]);this.compiledExplicit=compileList(this,"explicit",[]);this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit)}Schema.DEFAULT=null;Schema.create=function createSchema(){var schemas,types;switch(arguments.length){case 1:schemas=Schema.DEFAULT;types=arguments[0];break;case 2:schemas=arguments[0];types=arguments[1];break;default:throw new YAMLException("Wrong number of arguments for Schema.create function")}schemas=common.toArray(schemas);types=common.toArray(types);if(!schemas.every(function(schema){return schema instanceof Schema})){throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.")}if(!types.every(function(type){return type instanceof Type})){throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.")}return new Schema({include:schemas,explicit:types})};module.exports=Schema},{"./common":12,"./exception":9,"./type":4}],10:[function(require,module,exports){"use strict";var fs=require("fs");var loader=require("./loader");function yamlRequireHandler(module,filename){var content=fs.readFileSync(filename,"utf8");module.exports=loader.load(content,{filename:filename})}if(undefined!==require.extensions){require.extensions[".yml"]=yamlRequireHandler;require.extensions[".yaml"]=yamlRequireHandler}module.exports=require},{fs:11,"./loader":2}],6:[function(require,module,exports){"use strict";var Schema=require("../schema");module.exports=new Schema({explicit:[require("../type/str"),require("../type/seq"),require("../type/map")]})},{"../schema":5,"../type/str":14,"../type/seq":15,"../type/map":16}],7:[function(require,module,exports){"use strict";var Schema=require("../schema");module.exports=new Schema({include:[require("./minimal")],implicit:[require("../type/null"),require("../type/bool"),require("../type/int"),require("../type/float"),require("../type/timestamp"),require("../type/merge")],explicit:[require("../type/binary"),require("../type/omap"),require("../type/pairs"),require("../type/set")]})},{"../schema":5,"./minimal":6,"../type/null":17,"../type/bool":18,"../type/int":19,"../type/float":20,"../type/timestamp":21,"../type/merge":22,"../type/binary":23,"../type/omap":24,"../type/pairs":25,"../type/set":26}],8:[function(require,module,exports){"use strict";var Schema=require("../schema");module.exports=Schema.DEFAULT=new Schema({include:[require("./safe")],explicit:[require("../type/js/undefined"),require("../type/js/regexp"),require("../type/js/function")]})},{"../schema":5,"./safe":7,"../type/js/undefined":27,"../type/js/regexp":28,"../type/js/function":29}],12:[function(require,module,exports){"use strict";var NIL={};function isNothing(subject){return undefined===subject||null===subject}function isObject(subject){return"object"===typeof subject&&null!==subject}function toArray(sequence){if(Array.isArray(sequence)){return sequence}else if(isNothing(sequence)){return[]}else{return[sequence]}}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;index<length;index+=1){key=sourceKeys[index];target[key]=source[key]}}return target}function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1){result+=string}return result}module.exports.NIL=NIL;module.exports.isNothing=isNothing;module.exports.isObject=isObject;module.exports.toArray=toArray;module.exports.repeat=repeat;module.exports.extend=extend},{}],13:[function(require,module,exports){"use strict";var common=require("./common");function Mark(name,buffer,position,line,column){this.name=name;this.buffer=buffer;this.position=position;this.line=line;this.column=column}Mark.prototype.getSnippet=function getSnippet(indent,maxLength){var head,start,tail,end,snippet;if(!this.buffer){return null}indent=indent||4;maxLength=maxLength||75;head="";start=this.position;while(start>0&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(start-1))){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(end<this.buffer.length&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(end))){end+=1;if(end-this.position>maxLength/2-1){tail=" ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"};Mark.prototype.toString=function toString(compact){var snippet,where="";if(this.name){where+='in "'+this.name+'" '}where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet){where+=":\n"+snippet}}return where};module.exports=Mark},{"./common":12}],30:[function(require,module,exports){(function(){var util=require("util");var Buffer=require("buffer").Buffer;var pSlice=Array.prototype.slice;function objectKeys(object){if(Object.keys)return Object.keys(object);var result=[];for(var name in object){if(Object.prototype.hasOwnProperty.call(object,name)){result.push(name)}}return result}var assert=module.exports=ok;assert.AssertionError=function AssertionError(options){this.name="AssertionError";this.message=options.message;this.actual=options.actual;this.expected=options.expected;this.operator=options.operator;var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace){Error.captureStackTrace(this,stackStartFunction)}};util.inherits(assert.AssertionError,Error);function replacer(key,value){if(value===undefined){return""+value}if(typeof value==="number"&&(isNaN(value)||!isFinite(value))){return value.toString()}if(typeof value==="function"||value instanceof RegExp){return value.toString()}return value}function truncate(s,n){if(typeof s=="string"){return s.length<n?s:s.slice(0,n)}else{return s}}assert.AssertionError.prototype.toString=function(){if(this.message){return[this.name+":",this.message].join(" ")}else{return[this.name+":",truncate(JSON.stringify(this.actual,replacer),128),this.operator,truncate(JSON.stringify(this.expected,replacer),128)].join(" ")}};assert.AssertionError.__proto__=Error.prototype;function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction})}assert.fail=fail;function ok(value,message){if(!!!value)fail(value,true,message,"==",assert.ok)}assert.ok=ok;assert.equal=function equal(actual,expected,message){if(actual!=expected)fail(actual,expected,message,"==",assert.equal)};assert.notEqual=function notEqual(actual,expected,message){if(actual==expected){fail(actual,expected,message,"!=",assert.notEqual)}};assert.deepEqual=function deepEqual(actual,expected,message){if(!_deepEqual(actual,expected)){fail(actual,expected,message,"deepEqual",assert.deepEqual)}};function _deepEqual(actual,expected){if(actual===expected){return true}else if(Buffer.isBuffer(actual)&&Buffer.isBuffer(expected)){if(actual.length!=expected.length)return false;for(var i=0;i<actual.length;i++){if(actual[i]!==expected[i])return false}return true}else if(actual instanceof Date&&expected instanceof Date){return actual.getTime()===expected.getTime()}else if(typeof actual!="object"&&typeof expected!="object"){return actual==expected}else{return objEquiv(actual,expected)}}function isUndefinedOrNull(value){return value===null||value===undefined}function isArguments(object){return Object.prototype.toString.call(object)=="[object Arguments]"}function objEquiv(a,b){if(isUndefinedOrNull(a)||isUndefinedOrNull(b))return false;if(a.prototype!==b.prototype)return false;if(isArguments(a)){if(!isArguments(b)){return false}a=pSlice.call(a);b=pSlice.call(b);return _deepEqual(a,b)}try{var ka=objectKeys(a),kb=objectKeys(b),key,i}catch(e){return false}if(ka.length!=kb.length)return false;ka.sort();kb.sort();for(i=ka.length-1;i>=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(expected instanceof RegExp){return expected.test(actual)}else if(actual instanceof expected){return true}else if(expected.call({},actual)===true){return true}return false}function _throws(shouldThrow,block,expected,message){var actual;if(typeof expected==="string"){message=expected;expected=null}try{block()}catch(e){actual=e}message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail("Missing expected exception"+message)}if(!shouldThrow&&expectedException(actual,expected)){fail("Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,error,message){_throws.apply(this,[false].concat(pSlice.call(arguments)))};assert.ifError=function(err){if(err){throw err}}})()},{util:31,buffer:32}],14:[function(require,module,exports){"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:str",{loader:{kind:"string"}})},{"../type":4}],15:[function(require,module,exports){"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:seq",{loader:{kind:"array"}})},{"../type":4}],16:[function(require,module,exports){"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:map",{loader:{kind:"object"}})},{"../type":4}],17:[function(require,module,exports){"use strict";var NIL=require("../common").NIL;var Type=require("../type");var YAML_NULL_MAP={"~":true,"null":true,Null:true,NULL:true};function resolveYamlNull(object){return YAML_NULL_MAP[object]?null:NIL}module.exports=new Type("tag:yaml.org,2002:null",{loader:{kind:"string",resolver:resolveYamlNull},dumper:{kind:"null",defaultStyle:"lowercase",representer:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}}}})},{"../common":12,"../type":4}],18:[function(require,module,exports){"use strict";var NIL=require("../common").NIL;var Type=require("../type");var YAML_IMPLICIT_BOOLEAN_MAP={"true":true,True:true,TRUE:true,"false":false,False:false,FALSE:false};var YAML_EXPLICIT_BOOLEAN_MAP={"true":true,True:true,TRUE:true,"false":false,False:false,FALSE:false,y:true,Y:true,yes:true,Yes:true,YES:true,n:false,N:false,no:false,No:false,NO:false,on:true,On:true,ON:true,off:false,Off:false,OFF:false};function resolveYamlBoolean(object,explicit){if(explicit){if(YAML_EXPLICIT_BOOLEAN_MAP.hasOwnProperty(object)){return YAML_EXPLICIT_BOOLEAN_MAP[object]}else{return NIL}}else{if(YAML_IMPLICIT_BOOLEAN_MAP.hasOwnProperty(object)){return YAML_IMPLICIT_BOOLEAN_MAP[object]}else{return NIL}}}module.exports=new Type("tag:yaml.org,2002:bool",{loader:{kind:"string",resolver:resolveYamlBoolean},dumper:{kind:"boolean",defaultStyle:"lowercase",representer:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}}}})},{"../common":12,"../type":4}],19:[function(require,module,exports){"use strict";var NIL=require("../common").NIL;var Type=require("../type");var YAML_INTEGER_PATTERN=new RegExp("^(?:[-+]?0b[0-1_]+"+"|[-+]?0[0-7_]+"+"|[-+]?(?:0|[1-9][0-9_]*)"+"|[-+]?0x[0-9a-fA-F_]+"+"|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$");function resolveYamlInteger(object){var value,sign,base,digits;if(!YAML_INTEGER_PATTERN.test(object)){return NIL}value=object.replace(/_/g,"");sign="-"===value[0]?-1:1;digits=[];if(0<="+-".indexOf(value[0])){value=value.slice(1)}if("0"===value){return 0}else if(/^0b/.test(value)){return sign*parseInt(value.slice(2),2)}else if(/^0x/.test(value)){return sign*parseInt(value,16)}else if("0"===value[0]){return sign*parseInt(value,8)}else if(0<=value.indexOf(":")){value.split(":").forEach(function(v){digits.unshift(parseInt(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}else{return sign*parseInt(value,10)}}module.exports=new Type("tag:yaml.org,2002:int",{loader:{kind:"string",resolver:resolveYamlInteger},dumper:{kind:"integer",defaultStyle:"decimal",representer:{binary:function(object){return"0b"+object.toString(2)},octal:function(object){return"0"+object.toString(8)},decimal:function(object){return object.toString(10)},hexadecimal:function(object){return"0x"+object.toString(16).toUpperCase()}},styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}})},{"../common":12,"../type":4}],20:[function(require,module,exports){"use strict";var NIL=require("../common").NIL;var Type=require("../type");var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+][0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(object){var value,sign,base,digits;if(!YAML_FLOAT_PATTERN.test(object)){return NIL}value=object.replace(/_/g,"").toLowerCase();sign="-"===value[0]?-1:1;digits=[];if(0<="+-".indexOf(value[0])){value=value.slice(1)}if(".inf"===value){return 1===sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(".nan"===value){return NaN}else if(0<=value.indexOf(":")){value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}else{return sign*parseFloat(value,10)}}function representYamlFloat(object,style){if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else{return object.toString(10)}}module.exports=new Type("tag:yaml.org,2002:float",{loader:{kind:"string",resolver:resolveYamlFloat},dumper:{kind:"float",defaultStyle:"lowercase",representer:representYamlFloat}})},{"../common":12,"../type":4}],21:[function(require,module,exports){"use strict";var NIL=require("../common").NIL;var Type=require("../type");var YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?)?$");function resolveYamlTimestamp(object){var match,year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,data;match=YAML_TIMESTAMP_REGEXP.exec(object);if(null===match){return NIL}year=+match[1];month=+match[2]-1;day=+match[3];if(!match[4]){return new Date(Date.UTC(year,month,day))}hour=+match[4];minute=+match[5];second=+match[6];if(match[7]){fraction=match[7].slice(0,3);while(fraction.length<3){fraction+="0"}fraction=+fraction}if(match[9]){tz_hour=+match[10];tz_minute=+(match[11]||0);delta=(tz_hour*60+tz_minute)*6e4;if("-"===match[9]){delta=-delta}}data=new Date(Date.UTC(year,month,day,hour,minute,second,fraction));if(delta){data.setTime(data.getTime()-delta)}return data}function representYamlTimestamp(object){return object.toISOString()}module.exports=new Type("tag:yaml.org,2002:timestamp",{loader:{kind:"string",resolver:resolveYamlTimestamp},dumper:{kind:"object",instanceOf:Date,representer:representYamlTimestamp}})},{"../common":12,"../type":4}],22:[function(require,module,exports){"use strict";var NIL=require("../common").NIL;var Type=require("../type");function resolveYamlMerge(object){return"<<"===object?object:NIL}module.exports=new Type("tag:yaml.org,2002:merge",{loader:{kind:"string",resolver:resolveYamlMerge}})},{"../common":12,"../type":4}],23:[function(require,module,exports){(function(){"use strict";var NodeBuffer=require("buffer").Buffer;var common=require("../common");var NIL=common.NIL;var Type=require("../type");var BASE64_PADDING="=";var BASE64_BINTABLE=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];var BASE64_CHARTABLE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");function resolveYamlBinary(object){var value,code,idx=0,result=[],leftbits,leftdata;leftbits=0;leftdata=0;for(idx=0;idx<object.length;idx+=1){code=object.charCodeAt(idx);value=BASE64_BINTABLE[code&127];if(10!==code&&13!==code){if(-1===value){return NIL}leftdata=leftdata<<6|value;leftbits+=6;if(leftbits>=8){leftbits-=8;if(BASE64_PADDING!==object.charAt(idx)){result.push(leftdata>>leftbits&255)}leftdata&=(1<<leftbits)-1}}}if(leftbits){return NIL}else{return new NodeBuffer(result)}}function representYamlBinary(object){var result="",index,length,rest;for(index=0,length=object.length-2;index<length;index+=3){result+=BASE64_CHARTABLE[object[index+0]>>2];result+=BASE64_CHARTABLE[((object[index+0]&3)<<4)+(object[index+1]>>4)];result+=BASE64_CHARTABLE[((object[index+1]&15)<<2)+(object[index+2]>>6)];result+=BASE64_CHARTABLE[object[index+2]&63]}rest=object.length%3;if(0!==rest){index=object.length-rest;result+=BASE64_CHARTABLE[object[index+0]>>2];if(2===rest){result+=BASE64_CHARTABLE[((object[index+0]&3)<<4)+(object[index+1]>>4)];result+=BASE64_CHARTABLE[(object[index+1]&15)<<2];result+=BASE64_PADDING}else{result+=BASE64_CHARTABLE[(object[index+0]&3)<<4];result+=BASE64_PADDING+BASE64_PADDING}}return result}module.exports=new Type("tag:yaml.org,2002:binary",{loader:{kind:"string",resolver:resolveYamlBinary},dumper:{kind:"object",instanceOf:NodeBuffer,representer:representYamlBinary}})})()},{buffer:32,"../common":12,"../type":4}],24:[function(require,module,exports){"use strict";var NIL=require("../common").NIL;var Type=require("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(object){var objectKeys=[],index,length,pair,pairKey,pairHasKey;for(index=0,length=object.length;index<length;index+=1){pair=object[index];pairHasKey=false;if("[object Object]"!==_toString.call(pair)){return NIL}for(pairKey in pair){if(_hasOwnProperty.call(pair,pairKey)){if(!pairHasKey){pairHasKey=true}else{return NIL}}}if(!pairHasKey){return NIL}if(-1===objectKeys.indexOf(pairKey)){objectKeys.push(pairKey)}else{return NIL}}return object}module.exports=new Type("tag:yaml.org,2002:omap",{loader:{kind:"array",resolver:resolveYamlOmap}})},{"../common":12,"../type":4}],25:[function(require,module,exports){"use strict";var NIL=require("../common").NIL;var Type=require("../type");var _toString=Object.prototype.toString;function resolveYamlPairs(object){var index,length,pair,keys,result;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];if("[object Object]"!==_toString.call(pair)){return NIL}keys=Object.keys(pair);if(1!==keys.length){return NIL}result[index]=[keys[0],pair[keys[0]]]}return result}module.exports=new Type("tag:yaml.org,2002:pairs",{loader:{kind:"array",resolver:resolveYamlPairs}})},{"../common":12,"../type":4}],26:[function(require,module,exports){"use strict";var NIL=require("../common").NIL;var Type=require("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;function resolveYamlSet(object){var key;for(key in object){if(_hasOwnProperty.call(object,key)){if(null!==object[key]){return NIL}}}return object}module.exports=new Type("tag:yaml.org,2002:set",{loader:{kind:"object",resolver:resolveYamlSet}})},{"../common":12,"../type":4}],27:[function(require,module,exports){"use strict";var Type=require("../../type");function resolveJavascriptUndefined(){var undef;return undef}function representJavascriptUndefined(){return""}module.exports=new Type("tag:yaml.org,2002:js/undefined",{loader:{kind:"string",resolver:resolveJavascriptUndefined},dumper:{kind:"undefined",representer:representJavascriptUndefined}})},{"../../type":4}],28:[function(require,module,exports){(function(){"use strict";var NIL=require("../../common").NIL;var Type=require("../../type");function resolveJavascriptRegExp(object){var regexp=object,tail=/\/([gim]*)$/.exec(object),modifiers;if("/"===regexp[0]&&tail&&4>=tail[0].length){regexp=regexp.slice(1,regexp.length-tail[0].length); +modifiers=tail[1]}try{return new RegExp(regexp,modifiers)}catch(error){return NIL}}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global){result+="g"}if(object.multiline){result+="m"}if(object.ignoreCase){result+="i"}return result}module.exports=new Type("tag:yaml.org,2002:js/regexp",{loader:{kind:"string",resolver:resolveJavascriptRegExp},dumper:{kind:"object",instanceOf:RegExp,representer:representJavascriptRegExp}})})()},{"../../common":12,"../../type":4}],31:[function(require,module,exports){var events=require("events");exports.isArray=isArray;exports.isDate=function(obj){return Object.prototype.toString.call(obj)==="[object Date]"};exports.isRegExp=function(obj){return Object.prototype.toString.call(obj)==="[object RegExp]"};exports.print=function(){};exports.puts=function(){};exports.debug=function(){};exports.inspect=function(obj,showHidden,depth,colors){var seen=[];var stylize=function(str,styleType){var styles={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};var style={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[styleType];if(style){return"["+styles[style][0]+"m"+str+"["+styles[style][1]+"m"}else{return str}};if(!colors){stylize=function(str,styleType){return str}}function format(value,recurseTimes){if(value&&typeof value.inspect==="function"&&value!==exports&&!(value.constructor&&value.constructor.prototype===value)){return value.inspect(recurseTimes)}switch(typeof value){case"undefined":return stylize("undefined","undefined");case"string":var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return stylize(simple,"string");case"number":return stylize(""+value,"number");case"boolean":return stylize(""+value,"boolean")}if(value===null){return stylize("null","null")}var visible_keys=Object_keys(value);var keys=showHidden?Object_getOwnPropertyNames(value):visible_keys;if(typeof value==="function"&&keys.length===0){if(isRegExp(value)){return stylize(""+value,"regexp")}else{var name=value.name?": "+value.name:"";return stylize("[Function"+name+"]","special")}}if(isDate(value)&&keys.length===0){return stylize(value.toUTCString(),"date")}var base,type,braces;if(isArray(value)){type="Array";braces=["[","]"]}else{type="Object";braces=["{","}"]}if(typeof value==="function"){var n=value.name?": "+value.name:"";base=isRegExp(value)?" "+value:" [Function"+n+"]"}else{base=""}if(isDate(value)){base=" "+value.toUTCString()}if(keys.length===0){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return stylize(""+value,"regexp")}else{return stylize("[Object]","special")}}seen.push(value);var output=keys.map(function(key){var name,str;if(value.__lookupGetter__){if(value.__lookupGetter__(key)){if(value.__lookupSetter__(key)){str=stylize("[Getter/Setter]","special")}else{str=stylize("[Getter]","special")}}else{if(value.__lookupSetter__(key)){str=stylize("[Setter]","special")}}}if(visible_keys.indexOf(key)<0){name="["+key+"]"}if(!str){if(seen.indexOf(value[key])<0){if(recurseTimes===null){str=format(value[key])}else{str=format(value[key],recurseTimes-1)}if(str.indexOf("\n")>-1){if(isArray(value)){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=stylize("[Circular]","special")}}if(typeof name==="undefined"){if(type==="Array"&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=stylize(name,"string")}}return name+": "+str});seen.pop();var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.length+1},0);if(length>50){output=braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}else{output=braces[0]+base+" "+output.join(", ")+" "+braces[1]}return output}return format(obj,typeof depth==="undefined"?2:depth)};function isArray(ar){return ar instanceof Array||Array.isArray(ar)||ar&&ar!==Object.prototype&&isArray(ar.__proto__)}function isRegExp(re){return re instanceof RegExp||typeof re==="object"&&Object.prototype.toString.call(re)==="[object RegExp]"}function isDate(d){if(d instanceof Date)return true;if(typeof d!=="object")return false;var properties=Date.prototype&&Object_getOwnPropertyNames(Date.prototype);var proto=d.__proto__&&Object_getOwnPropertyNames(d.__proto__);return JSON.stringify(proto)===JSON.stringify(properties)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(msg){};exports.pump=null;var Object_keys=Object.keys||function(obj){var res=[];for(var key in obj)res.push(key);return res};var Object_getOwnPropertyNames=Object.getOwnPropertyNames||function(obj){var res=[];for(var key in obj){if(Object.hasOwnProperty.call(obj,key))res.push(key)}return res};var Object_create=Object.create||function(prototype,properties){var object;if(prototype===null){object={__proto__:null}}else{if(typeof prototype!=="object"){throw new TypeError("typeof prototype["+typeof prototype+"] != 'object'")}var Type=function(){};Type.prototype=prototype;object=new Type;object.__proto__=prototype}if(typeof properties!=="undefined"&&Object.defineProperties){Object.defineProperties(object,properties)}return object};exports.inherits=function(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object_create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})};var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(typeof f!=="string"){var objects=[];for(var i=0;i<arguments.length;i++){objects.push(exports.inspect(arguments[i]))}return objects.join(" ")}var i=1;var args=arguments;var len=args.length;var str=String(f).replace(formatRegExp,function(x){if(x==="%%")return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":return JSON.stringify(args[i++]);default:return x}});for(var x=args[i];i<len;x=args[++i]){if(x===null||typeof x!=="object"){str+=" "+x}else{str+=" "+exports.inspect(x)}}return str}},{events:33}],34:[function(require,module,exports){exports.readIEEE754=function(buffer,offset,isBE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isBE?0:nBytes-1,d=isBE?1:-1,s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.writeIEEE754=function(buffer,value,offset,isBE,mLen,nBytes){var e,m,c,eLen=nBytes*8-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isBE?nBytes-1:0,d=isBE?-1:1,s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],35:[function(require,module,exports){var process=module.exports={};process.nextTick=function(){var canSetImmediate=typeof window!=="undefined"&&window.setImmediate;var canPost=typeof window!=="undefined"&&window.postMessage&&window.addEventListener;if(canSetImmediate){return function(f){return window.setImmediate(f)}}if(canPost){var queue=[];window.addEventListener("message",function(ev){if(ev.source===window&&ev.data==="process-tick"){ev.stopPropagation();if(queue.length>0){var fn=queue.shift();fn()}}},true);return function nextTick(fn){queue.push(fn);window.postMessage("process-tick","*")}}return function nextTick(fn){setTimeout(fn,0)}}();process.title="browser";process.browser=true;process.env={};process.argv=[];process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")}},{}],33:[function(require,module,exports){(function(process){if(!process.EventEmitter)process.EventEmitter=function(){};var EventEmitter=exports.EventEmitter=process.EventEmitter;var isArray=typeof Array.isArray==="function"?Array.isArray:function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function indexOf(xs,x){if(xs.indexOf)return xs.indexOf(x);for(var i=0;i<xs.length;i++){if(x===xs[i])return i}return-1}var defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!this._events)this._events={};this._events.maxListeners=n};EventEmitter.prototype.emit=function(type){if(type==="error"){if(!this._events||!this._events.error||isArray(this._events.error)&&!this._events.error.length){if(arguments[1]instanceof Error){throw arguments[1]}else{throw new Error("Uncaught, unspecified 'error' event.")}return false}}if(!this._events)return false;var handler=this._events[type];if(!handler)return false;if(typeof handler=="function"){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:var args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}return true}else if(isArray(handler)){var args=Array.prototype.slice.call(arguments,1);var listeners=handler.slice();for(var i=0,l=listeners.length;i<l;i++){listeners[i].apply(this,args)}return true}else{return false}};EventEmitter.prototype.addListener=function(type,listener){if("function"!==typeof listener){throw new Error("addListener only takes instances of Function")}if(!this._events)this._events={};this.emit("newListener",type,listener);if(!this._events[type]){this._events[type]=listener}else if(isArray(this._events[type])){if(!this._events[type].warned){var m;if(this._events.maxListeners!==undefined){m=this._events.maxListeners}else{m=defaultMaxListeners}if(m&&m>0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);console.trace()}}this._events[type].push(listener)}else{this._events[type]=[this._events[type],listener]}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){var self=this;self.on(type,function g(){self.removeListener(type,g);listener.apply(this,arguments)});return this};EventEmitter.prototype.removeListener=function(type,listener){if("function"!==typeof listener){throw new Error("removeListener only takes instances of Function")}if(!this._events||!this._events[type])return this;var list=this._events[type];if(isArray(list)){var i=indexOf(list,listener);if(i<0)return this;list.splice(i,1);if(list.length==0)delete this._events[type]}else if(this._events[type]===listener){delete this._events[type]}return this};EventEmitter.prototype.removeAllListeners=function(type){if(arguments.length===0){this._events={};return this}if(type&&this._events&&this._events[type])this._events[type]=null;return this};EventEmitter.prototype.listeners=function(type){if(!this._events)this._events={};if(!this._events[type])this._events[type]=[];if(!isArray(this._events[type])){this._events[type]=[this._events[type]]}return this._events[type]}})(require("__browserify_process"))},{__browserify_process:35}],32:[function(require,module,exports){(function(){function SlowBuffer(size){this.length=size}var assert=require("assert");exports.INSPECT_MAX_BYTES=50;function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(str){var byteArray=[];for(var i=0;i<str.length;i++)if(str.charCodeAt(i)<=127)byteArray.push(str.charCodeAt(i));else{var h=encodeURIComponent(str.charAt(i)).substr(1).split("%");for(var j=0;j<h.length;j++)byteArray.push(parseInt(h[j],16))}return byteArray}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;i++)byteArray.push(str.charCodeAt(i)&255);return byteArray}function base64ToBytes(str){return require("base64-js").toByteArray(str)}SlowBuffer.byteLength=function(str,encoding){switch(encoding||"utf8"){case"hex":return str.length/2;case"utf8":case"utf-8":return utf8ToBytes(str).length;case"ascii":case"binary":return str.length;case"base64":return base64ToBytes(str).length;default:throw new Error("Unknown encoding")}};function blitBuffer(src,dst,offset,length){var pos,i=0;while(i<length){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i];i++}return i}SlowBuffer.prototype.utf8Write=function(string,offset,length){var bytes,pos;return SlowBuffer._charsWritten=blitBuffer(utf8ToBytes(string),this,offset,length)};SlowBuffer.prototype.asciiWrite=function(string,offset,length){var bytes,pos;return SlowBuffer._charsWritten=blitBuffer(asciiToBytes(string),this,offset,length)};SlowBuffer.prototype.binaryWrite=SlowBuffer.prototype.asciiWrite;SlowBuffer.prototype.base64Write=function(string,offset,length){var bytes,pos;return SlowBuffer._charsWritten=blitBuffer(base64ToBytes(string),this,offset,length)};SlowBuffer.prototype.base64Slice=function(start,end){var bytes=Array.prototype.slice.apply(this,arguments);return require("base64-js").fromByteArray(bytes)};function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}SlowBuffer.prototype.utf8Slice=function(){var bytes=Array.prototype.slice.apply(this,arguments);var res="";var tmp="";var i=0;while(i<bytes.length){if(bytes[i]<=127){res+=decodeUtf8Char(tmp)+String.fromCharCode(bytes[i]);tmp=""}else tmp+="%"+bytes[i].toString(16);i++}return res+decodeUtf8Char(tmp)};SlowBuffer.prototype.asciiSlice=function(){var bytes=Array.prototype.slice.apply(this,arguments);var ret="";for(var i=0;i<bytes.length;i++)ret+=String.fromCharCode(bytes[i]);return ret};SlowBuffer.prototype.binarySlice=SlowBuffer.prototype.asciiSlice;SlowBuffer.prototype.inspect=function(){var out=[],len=this.length;for(var i=0;i<len;i++){out[i]=toHex(this[i]);if(i==exports.INSPECT_MAX_BYTES){out[i+1]="...";break}}return"<SlowBuffer "+out.join(" ")+">"};SlowBuffer.prototype.hexSlice=function(start,end){var len=this.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out="";for(var i=start;i<end;i++){out+=toHex(this[i])}return out};SlowBuffer.prototype.toString=function(encoding,start,end){encoding=String(encoding||"utf8").toLowerCase();start=+start||0;if(typeof end=="undefined")end=this.length;if(+end==start){return""}switch(encoding){case"hex":return this.hexSlice(start,end);case"utf8":case"utf-8":return this.utf8Slice(start,end);case"ascii":return this.asciiSlice(start,end);case"binary":return this.binarySlice(start,end);case"base64":return this.base64Slice(start,end);case"ucs2":case"ucs-2":return this.ucs2Slice(start,end);default:throw new Error("Unknown encoding")}};SlowBuffer.prototype.hexWrite=function(string,offset,length){offset=+offset||0;var remaining=this.length-offset;if(!length){length=remaining}else{length=+length;if(length>remaining){length=remaining}}var strLen=string.length;if(strLen%2){throw new Error("Invalid hex string")}if(length>strLen/2){length=strLen/2}for(var i=0;i<length;i++){var byte=parseInt(string.substr(i*2,2),16);if(isNaN(byte))throw new Error("Invalid hex string");this[offset+i]=byte}SlowBuffer._charsWritten=i*2;return i};SlowBuffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset)){if(!isFinite(length)){encoding=length;length=undefined}}else{var swap=encoding;encoding=offset;offset=length;length=swap}offset=+offset||0;var remaining=this.length-offset;if(!length){length=remaining}else{length=+length;if(length>remaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();switch(encoding){case"hex":return this.hexWrite(string,offset,length);case"utf8":case"utf-8":return this.utf8Write(string,offset,length);case"ascii":return this.asciiWrite(string,offset,length);case"binary":return this.binaryWrite(string,offset,length);case"base64":return this.base64Write(string,offset,length);case"ucs2":case"ucs-2":return this.ucs2Write(string,offset,length);default:throw new Error("Unknown encoding")}};SlowBuffer.prototype.slice=function(start,end){if(end===undefined)end=this.length;if(end>this.length){throw new Error("oob")}if(start>end){throw new Error("oob")}return new Buffer(this,end-start,+start)};SlowBuffer.prototype.copy=function(target,targetstart,sourcestart,sourceend){var temp=[];for(var i=sourcestart;i<sourceend;i++){assert.ok(typeof this[i]!=="undefined","copying undefined buffer bytes!");temp.push(this[i])}for(var i=targetstart;i<targetstart+temp.length;i++){target[i]=temp[i-targetstart]}};SlowBuffer.prototype.fill=function(value,start,end){if(end>this.length){throw new Error("oob")}if(start>end){throw new Error("oob")}for(var i=start;i<end;i++){this[i]=value}};function coerce(length){length=~~Math.ceil(+length);return length<0?0:length}function Buffer(subject,encoding,offset){if(!(this instanceof Buffer)){return new Buffer(subject,encoding,offset)}var type;if(typeof offset==="number"){this.length=coerce(encoding);this.parent=subject;this.offset=offset}else{switch(type=typeof subject){case"number":this.length=coerce(subject);break;case"string":this.length=Buffer.byteLength(subject,encoding);break;case"object":this.length=coerce(subject.length);break;default:throw new Error("First argument needs to be a number, "+"array or string.")}if(this.length>Buffer.poolSize){this.parent=new SlowBuffer(this.length);this.offset=0}else{if(!pool||pool.length-pool.used<this.length)allocPool();this.parent=pool;this.offset=pool.used;pool.used+=this.length}if(isArrayIsh(subject)){for(var i=0;i<this.length;i++){if(subject instanceof Buffer){this.parent[i+this.offset]=subject.readUInt8(i)}else{this.parent[i+this.offset]=subject[i]}}}else if(type=="string"){this.length=this.write(subject,0,encoding)}}}function isArrayIsh(subject){return Array.isArray(subject)||Buffer.isBuffer(subject)||subject&&typeof subject==="object"&&typeof subject.length==="number"}exports.SlowBuffer=SlowBuffer;exports.Buffer=Buffer;Buffer.poolSize=8*1024;var pool;function allocPool(){pool=new SlowBuffer(Buffer.poolSize);pool.used=0}Buffer.isBuffer=function isBuffer(b){return b instanceof Buffer||b instanceof SlowBuffer};Buffer.concat=function(list,totalLength){if(!Array.isArray(list)){throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.")}if(list.length===0){return new Buffer(0)}else if(list.length===1){return list[0]}if(typeof totalLength!=="number"){totalLength=0;for(var i=0;i<list.length;i++){var buf=list[i];totalLength+=buf.length}}var buffer=new Buffer(totalLength);var pos=0;for(var i=0;i<list.length;i++){var buf=list[i];buf.copy(buffer,pos);pos+=buf.length}return buffer};Buffer.prototype.inspect=function inspect(){var out=[],len=this.length;for(var i=0;i<len;i++){out[i]=toHex(this.parent[i+this.offset]);if(i==exports.INSPECT_MAX_BYTES){out[i+1]="...";break}}return"<Buffer "+out.join(" ")+">"};Buffer.prototype.get=function get(i){if(i<0||i>=this.length)throw new Error("oob");return this.parent[this.offset+i]};Buffer.prototype.set=function set(i,v){if(i<0||i>=this.length)throw new Error("oob");return this.parent[this.offset+i]=v};Buffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset)){if(!isFinite(length)){encoding=length;length=undefined}}else{var swap=encoding;encoding=offset;offset=length;length=swap}offset=+offset||0;var remaining=this.length-offset;if(!length){length=remaining}else{length=+length;if(length>remaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=this.parent.hexWrite(string,this.offset+offset,length);break;case"utf8":case"utf-8":ret=this.parent.utf8Write(string,this.offset+offset,length);break;case"ascii":ret=this.parent.asciiWrite(string,this.offset+offset,length);break;case"binary":ret=this.parent.binaryWrite(string,this.offset+offset,length);break;case"base64":ret=this.parent.base64Write(string,this.offset+offset,length);break;case"ucs2":case"ucs-2":ret=this.parent.ucs2Write(string,this.offset+offset,length);break;default:throw new Error("Unknown encoding")}Buffer._charsWritten=SlowBuffer._charsWritten;return ret};Buffer.prototype.toString=function(encoding,start,end){encoding=String(encoding||"utf8").toLowerCase();if(typeof start=="undefined"||start<0){start=0}else if(start>this.length){start=this.length}if(typeof end=="undefined"||end>this.length){end=this.length}else if(end<0){end=0}start=start+this.offset;end=end+this.offset;switch(encoding){case"hex":return this.parent.hexSlice(start,end);case"utf8":case"utf-8":return this.parent.utf8Slice(start,end);case"ascii":return this.parent.asciiSlice(start,end);case"binary":return this.parent.binarySlice(start,end);case"base64":return this.parent.base64Slice(start,end);case"ucs2":case"ucs-2":return this.parent.ucs2Slice(start,end);default:throw new Error("Unknown encoding")}};Buffer.byteLength=SlowBuffer.byteLength;Buffer.prototype.fill=function fill(value,start,end){value||(value=0);start||(start=0);end||(end=this.length);if(typeof value==="string"){value=value.charCodeAt(0)}if(!(typeof value==="number")||isNaN(value)){throw new Error("value is not a number")}if(end<start)throw new Error("end < start");if(end===start)return 0;if(this.length==0)return 0;if(start<0||start>=this.length){throw new Error("start out of bounds")}if(end<0||end>this.length){throw new Error("end out of bounds")}return this.parent.fill(value,start+this.offset,end+this.offset)};Buffer.prototype.copy=function(target,target_start,start,end){var source=this;start||(start=0);end||(end=this.length);target_start||(target_start=0);if(end<start)throw new Error("sourceEnd < sourceStart");if(end===start)return 0;if(target.length==0||source.length==0)return 0;if(target_start<0||target_start>=target.length){throw new Error("targetStart out of bounds")}if(start<0||start>=source.length){throw new Error("sourceStart out of bounds")}if(end<0||end>source.length){throw new Error("sourceEnd out of bounds")}if(end>this.length){end=this.length}if(target.length-target_start<end-start){end=target.length-target_start+start}return this.parent.copy(target.parent,target_start+target.offset,start+this.offset,end+this.offset)};Buffer.prototype.slice=function(start,end){if(end===undefined)end=this.length;if(end>this.length)throw new Error("oob");if(start>end)throw new Error("oob");return new Buffer(this.parent,end-start,+start+this.offset)};Buffer.prototype.utf8Slice=function(start,end){return this.toString("utf8",start,end)};Buffer.prototype.binarySlice=function(start,end){return this.toString("binary",start,end)};Buffer.prototype.asciiSlice=function(start,end){return this.toString("ascii",start,end)};Buffer.prototype.utf8Write=function(string,offset){return this.write(string,offset,"utf8")};Buffer.prototype.binaryWrite=function(string,offset){return this.write(string,offset,"binary")};Buffer.prototype.asciiWrite=function(string,offset){return this.write(string,offset,"ascii")};Buffer.prototype.readUInt8=function(offset,noAssert){var buffer=this;if(!noAssert){assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset<buffer.length,"Trying to read beyond buffer length")}if(offset>=buffer.length)return;return buffer.parent[buffer.offset+offset]};function readUInt16(buffer,offset,isBigEndian,noAssert){var val=0;if(!noAssert){assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+1<buffer.length,"Trying to read beyond buffer length")}if(offset>=buffer.length)return 0;if(isBigEndian){val=buffer.parent[buffer.offset+offset]<<8;if(offset+1<buffer.length){val|=buffer.parent[buffer.offset+offset+1]}}else{val=buffer.parent[buffer.offset+offset];if(offset+1<buffer.length){val|=buffer.parent[buffer.offset+offset+1]<<8}}return val}Buffer.prototype.readUInt16LE=function(offset,noAssert){return readUInt16(this,offset,false,noAssert)};Buffer.prototype.readUInt16BE=function(offset,noAssert){return readUInt16(this,offset,true,noAssert)};function readUInt32(buffer,offset,isBigEndian,noAssert){var val=0;if(!noAssert){assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+3<buffer.length,"Trying to read beyond buffer length")}if(offset>=buffer.length)return 0;if(isBigEndian){if(offset+1<buffer.length)val=buffer.parent[buffer.offset+offset+1]<<16;if(offset+2<buffer.length)val|=buffer.parent[buffer.offset+offset+2]<<8;if(offset+3<buffer.length)val|=buffer.parent[buffer.offset+offset+3];val=val+(buffer.parent[buffer.offset+offset]<<24>>>0)}else{if(offset+2<buffer.length)val=buffer.parent[buffer.offset+offset+2]<<16;if(offset+1<buffer.length)val|=buffer.parent[buffer.offset+offset+1]<<8;val|=buffer.parent[buffer.offset+offset];if(offset+3<buffer.length)val=val+(buffer.parent[buffer.offset+offset+3]<<24>>>0)}return val}Buffer.prototype.readUInt32LE=function(offset,noAssert){return readUInt32(this,offset,false,noAssert)};Buffer.prototype.readUInt32BE=function(offset,noAssert){return readUInt32(this,offset,true,noAssert)};Buffer.prototype.readInt8=function(offset,noAssert){var buffer=this;var neg;if(!noAssert){assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset<buffer.length,"Trying to read beyond buffer length")}if(offset>=buffer.length)return;neg=buffer.parent[buffer.offset+offset]&128;if(!neg){return buffer.parent[buffer.offset+offset]}return(255-buffer.parent[buffer.offset+offset]+1)*-1};function readInt16(buffer,offset,isBigEndian,noAssert){var neg,val;if(!noAssert){assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+1<buffer.length,"Trying to read beyond buffer length")}val=readUInt16(buffer,offset,isBigEndian,noAssert);neg=val&32768;if(!neg){return val}return(65535-val+1)*-1}Buffer.prototype.readInt16LE=function(offset,noAssert){return readInt16(this,offset,false,noAssert)};Buffer.prototype.readInt16BE=function(offset,noAssert){return readInt16(this,offset,true,noAssert)};function readInt32(buffer,offset,isBigEndian,noAssert){var neg,val;if(!noAssert){assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+3<buffer.length,"Trying to read beyond buffer length")}val=readUInt32(buffer,offset,isBigEndian,noAssert);neg=val&2147483648;if(!neg){return val}return(4294967295-val+1)*-1}Buffer.prototype.readInt32LE=function(offset,noAssert){return readInt32(this,offset,false,noAssert)};Buffer.prototype.readInt32BE=function(offset,noAssert){return readInt32(this,offset,true,noAssert)};function readFloat(buffer,offset,isBigEndian,noAssert){if(!noAssert){assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset+3<buffer.length,"Trying to read beyond buffer length")}return require("./buffer_ieee754").readIEEE754(buffer,offset,isBigEndian,23,4)}Buffer.prototype.readFloatLE=function(offset,noAssert){return readFloat(this,offset,false,noAssert)};Buffer.prototype.readFloatBE=function(offset,noAssert){return readFloat(this,offset,true,noAssert)};function readDouble(buffer,offset,isBigEndian,noAssert){if(!noAssert){assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset+7<buffer.length,"Trying to read beyond buffer length")}return require("./buffer_ieee754").readIEEE754(buffer,offset,isBigEndian,52,8)}Buffer.prototype.readDoubleLE=function(offset,noAssert){return readDouble(this,offset,false,noAssert)};Buffer.prototype.readDoubleBE=function(offset,noAssert){return readDouble(this,offset,true,noAssert)};function verifuint(value,max){assert.ok(typeof value=="number","cannot write a non-number as a number");assert.ok(value>=0,"specified a negative value for writing an unsigned value");assert.ok(value<=max,"value is larger than maximum value for type");assert.ok(Math.floor(value)===value,"value has a fractional component")}Buffer.prototype.writeUInt8=function(value,offset,noAssert){var buffer=this;if(!noAssert){assert.ok(value!==undefined&&value!==null,"missing value");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset<buffer.length,"trying to write beyond buffer length");verifuint(value,255)}if(offset<buffer.length){buffer.parent[buffer.offset+offset]=value}};function writeUInt16(buffer,value,offset,isBigEndian,noAssert){if(!noAssert){assert.ok(value!==undefined&&value!==null,"missing value");assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+1<buffer.length,"trying to write beyond buffer length");verifuint(value,65535)}for(var i=0;i<Math.min(buffer.length-offset,2);i++){buffer.parent[buffer.offset+offset+i]=(value&255<<8*(isBigEndian?1-i:i))>>>(isBigEndian?1-i:i)*8}}Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){writeUInt16(this,value,offset,false,noAssert)};Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){writeUInt16(this,value,offset,true,noAssert)};function writeUInt32(buffer,value,offset,isBigEndian,noAssert){if(!noAssert){assert.ok(value!==undefined&&value!==null,"missing value");assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+3<buffer.length,"trying to write beyond buffer length");verifuint(value,4294967295)}for(var i=0;i<Math.min(buffer.length-offset,4);i++){buffer.parent[buffer.offset+offset+i]=value>>>(isBigEndian?3-i:i)*8&255}}Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){writeUInt32(this,value,offset,false,noAssert)};Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){writeUInt32(this,value,offset,true,noAssert)};function verifsint(value,max,min){assert.ok(typeof value=="number","cannot write a non-number as a number");assert.ok(value<=max,"value larger than maximum allowed value");assert.ok(value>=min,"value smaller than minimum allowed value");assert.ok(Math.floor(value)===value,"value has a fractional component")}function verifIEEE754(value,max,min){assert.ok(typeof value=="number","cannot write a non-number as a number");assert.ok(value<=max,"value larger than maximum allowed value");assert.ok(value>=min,"value smaller than minimum allowed value")}Buffer.prototype.writeInt8=function(value,offset,noAssert){var buffer=this;if(!noAssert){assert.ok(value!==undefined&&value!==null,"missing value");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset<buffer.length,"Trying to write beyond buffer length");verifsint(value,127,-128)}if(value>=0){buffer.writeUInt8(value,offset,noAssert)}else{buffer.writeUInt8(255+value+1,offset,noAssert)}};function writeInt16(buffer,value,offset,isBigEndian,noAssert){if(!noAssert){assert.ok(value!==undefined&&value!==null,"missing value"); +assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+1<buffer.length,"Trying to write beyond buffer length");verifsint(value,32767,-32768)}if(value>=0){writeUInt16(buffer,value,offset,isBigEndian,noAssert)}else{writeUInt16(buffer,65535+value+1,offset,isBigEndian,noAssert)}}Buffer.prototype.writeInt16LE=function(value,offset,noAssert){writeInt16(this,value,offset,false,noAssert)};Buffer.prototype.writeInt16BE=function(value,offset,noAssert){writeInt16(this,value,offset,true,noAssert)};function writeInt32(buffer,value,offset,isBigEndian,noAssert){if(!noAssert){assert.ok(value!==undefined&&value!==null,"missing value");assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+3<buffer.length,"Trying to write beyond buffer length");verifsint(value,2147483647,-2147483648)}if(value>=0){writeUInt32(buffer,value,offset,isBigEndian,noAssert)}else{writeUInt32(buffer,4294967295+value+1,offset,isBigEndian,noAssert)}}Buffer.prototype.writeInt32LE=function(value,offset,noAssert){writeInt32(this,value,offset,false,noAssert)};Buffer.prototype.writeInt32BE=function(value,offset,noAssert){writeInt32(this,value,offset,true,noAssert)};function writeFloat(buffer,value,offset,isBigEndian,noAssert){if(!noAssert){assert.ok(value!==undefined&&value!==null,"missing value");assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+3<buffer.length,"Trying to write beyond buffer length");verifIEEE754(value,3.4028234663852886e38,-3.4028234663852886e38)}require("./buffer_ieee754").writeIEEE754(buffer,value,offset,isBigEndian,23,4)}Buffer.prototype.writeFloatLE=function(value,offset,noAssert){writeFloat(this,value,offset,false,noAssert)};Buffer.prototype.writeFloatBE=function(value,offset,noAssert){writeFloat(this,value,offset,true,noAssert)};function writeDouble(buffer,value,offset,isBigEndian,noAssert){if(!noAssert){assert.ok(value!==undefined&&value!==null,"missing value");assert.ok(typeof isBigEndian==="boolean","missing or invalid endian");assert.ok(offset!==undefined&&offset!==null,"missing offset");assert.ok(offset+7<buffer.length,"Trying to write beyond buffer length");verifIEEE754(value,1.7976931348623157e308,-1.7976931348623157e308)}require("./buffer_ieee754").writeIEEE754(buffer,value,offset,isBigEndian,52,8)}Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){writeDouble(this,value,offset,true,noAssert)};SlowBuffer.prototype.readUInt8=Buffer.prototype.readUInt8;SlowBuffer.prototype.readUInt16LE=Buffer.prototype.readUInt16LE;SlowBuffer.prototype.readUInt16BE=Buffer.prototype.readUInt16BE;SlowBuffer.prototype.readUInt32LE=Buffer.prototype.readUInt32LE;SlowBuffer.prototype.readUInt32BE=Buffer.prototype.readUInt32BE;SlowBuffer.prototype.readInt8=Buffer.prototype.readInt8;SlowBuffer.prototype.readInt16LE=Buffer.prototype.readInt16LE;SlowBuffer.prototype.readInt16BE=Buffer.prototype.readInt16BE;SlowBuffer.prototype.readInt32LE=Buffer.prototype.readInt32LE;SlowBuffer.prototype.readInt32BE=Buffer.prototype.readInt32BE;SlowBuffer.prototype.readFloatLE=Buffer.prototype.readFloatLE;SlowBuffer.prototype.readFloatBE=Buffer.prototype.readFloatBE;SlowBuffer.prototype.readDoubleLE=Buffer.prototype.readDoubleLE;SlowBuffer.prototype.readDoubleBE=Buffer.prototype.readDoubleBE;SlowBuffer.prototype.writeUInt8=Buffer.prototype.writeUInt8;SlowBuffer.prototype.writeUInt16LE=Buffer.prototype.writeUInt16LE;SlowBuffer.prototype.writeUInt16BE=Buffer.prototype.writeUInt16BE;SlowBuffer.prototype.writeUInt32LE=Buffer.prototype.writeUInt32LE;SlowBuffer.prototype.writeUInt32BE=Buffer.prototype.writeUInt32BE;SlowBuffer.prototype.writeInt8=Buffer.prototype.writeInt8;SlowBuffer.prototype.writeInt16LE=Buffer.prototype.writeInt16LE;SlowBuffer.prototype.writeInt16BE=Buffer.prototype.writeInt16BE;SlowBuffer.prototype.writeInt32LE=Buffer.prototype.writeInt32LE;SlowBuffer.prototype.writeInt32BE=Buffer.prototype.writeInt32BE;SlowBuffer.prototype.writeFloatLE=Buffer.prototype.writeFloatLE;SlowBuffer.prototype.writeFloatBE=Buffer.prototype.writeFloatBE;SlowBuffer.prototype.writeDoubleLE=Buffer.prototype.writeDoubleLE;SlowBuffer.prototype.writeDoubleBE=Buffer.prototype.writeDoubleBE})()},{assert:30,"./buffer_ieee754":34,"base64-js":36}],36:[function(require,module,exports){(function(exports){"use strict";var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function b64ToByteArray(b64){var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0){throw"Invalid string. Length must be a multiple of 4"}placeHolders=b64.indexOf("=");placeHolders=placeHolders>0?b64.length-placeHolders:0;arr=[];l=placeHolders>0?b64.length-4:b64.length;for(i=0,j=0;i<l;i+=4,j+=3){tmp=lookup.indexOf(b64[i])<<18|lookup.indexOf(b64[i+1])<<12|lookup.indexOf(b64[i+2])<<6|lookup.indexOf(b64[i+3]);arr.push((tmp&16711680)>>16);arr.push((tmp&65280)>>8);arr.push(tmp&255)}if(placeHolders===2){tmp=lookup.indexOf(b64[i])<<2|lookup.indexOf(b64[i+1])>>4;arr.push(tmp&255)}else if(placeHolders===1){tmp=lookup.indexOf(b64[i])<<10|lookup.indexOf(b64[i+1])<<4|lookup.indexOf(b64[i+2])>>2;arr.push(tmp>>8&255);arr.push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}for(i=0,length=uint8.length-extraBytes;i<length;i+=3){temp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output+=tripletToBase64(temp)}switch(extraBytes){case 1:temp=uint8[uint8.length-1];output+=lookup[temp>>2];output+=lookup[temp<<4&63];output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=lookup[temp>>10];output+=lookup[temp>>4&63];output+=lookup[temp<<2&63];output+="=";break}return output}module.exports.toByteArray=b64ToByteArray;module.exports.fromByteArray=uint8ToBase64})()},{}],29:[function(require,module,exports){"use strict";var esprima=require("esprima");var NIL=require("../../common").NIL;var Type=require("../../type");function resolveJavascriptFunction(object){try{var source="("+object+")",ast=esprima.parse(source,{range:true}),params=[],body;if("Program"!==ast.type||1!==ast.body.length||"ExpressionStatement"!==ast.body[0].type||"FunctionExpression"!==ast.body[0].expression.type){return NIL}ast.body[0].expression.params.forEach(function(param){params.push(param.name)});body=ast.body[0].expression.body.range;return new Function(params,source.slice(body[0]+1,body[1]-1))}catch(err){return NIL}}function representJavascriptFunction(object){return object.toString()}module.exports=new Type("tag:yaml.org,2002:js/function",{loader:{kind:"string",resolver:resolveJavascriptFunction},dumper:{kind:"function",representer:representJavascriptFunction}})},{"../../common":12,"../../type":4,esprima:37}],37:[function(require,module,exports){(function(){(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["exports"],factory)}else if(typeof exports!=="undefined"){factory(exports)}else{factory(root.esprima={})}})(this,function(exports){"use strict";var Token,TokenName,Syntax,PropertyKind,Messages,Regex,source,strict,index,lineNumber,lineStart,length,buffer,state,extra;Token={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8};TokenName={};TokenName[Token.BooleanLiteral]="Boolean";TokenName[Token.EOF]="<end>";TokenName[Token.Identifier]="Identifier";TokenName[Token.Keyword]="Keyword";TokenName[Token.NullLiteral]="Null";TokenName[Token.NumericLiteral]="Numeric";TokenName[Token.Punctuator]="Punctuator";TokenName[Token.StringLiteral]="String";Syntax={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"};PropertyKind={Data:1,Get:2,Set:4};Messages={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"};Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function assert(condition,message){if(!condition){throw new Error("ASSERT: "+message)}}function sliceSource(from,to){return source.slice(from,to)}if(typeof"esprima"[0]==="undefined"){sliceSource=function sliceArraySource(from,to){return source.slice(from,to).join("")}}function isDecimalDigit(ch){return"0123456789".indexOf(ch)>=0}function isHexDigit(ch){return"0123456789abcdefABCDEF".indexOf(ch)>=0}function isOctalDigit(ch){return"01234567".indexOf(ch)>=0}function isWhiteSpace(ch){return ch===" "||ch===" "||ch===""||ch==="\f"||ch===" "||ch.charCodeAt(0)>=5760&&" ".indexOf(ch)>=0}function isLineTerminator(ch){return ch==="\n"||ch==="\r"||ch==="\u2028"||ch==="\u2029"}function isIdentifierStart(ch){return ch==="$"||ch==="_"||ch==="\\"||ch>="a"&&ch<="z"||ch>="A"&&ch<="Z"||ch.charCodeAt(0)>=128&&Regex.NonAsciiIdentifierStart.test(ch)}function isIdentifierPart(ch){return ch==="$"||ch==="_"||ch==="\\"||ch>="a"&&ch<="z"||ch>="A"&&ch<="Z"||ch>="0"&&ch<="9"||ch.charCodeAt(0)>=128&&Regex.NonAsciiIdentifierPart.test(ch)}function isFutureReservedWord(id){switch(id){case"class":case"enum":case"export":case"extends":case"import":case"super":return true}return false}function isStrictModeReservedWord(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return true}return false}function isRestrictedWord(id){return id==="eval"||id==="arguments"}function isKeyword(id){var keyword=false;switch(id.length){case 2:keyword=id==="if"||id==="in"||id==="do";break;case 3:keyword=id==="var"||id==="for"||id==="new"||id==="try";break;case 4:keyword=id==="this"||id==="else"||id==="case"||id==="void"||id==="with";break;case 5:keyword=id==="while"||id==="break"||id==="catch"||id==="throw";break;case 6:keyword=id==="return"||id==="typeof"||id==="delete"||id==="switch";break;case 7:keyword=id==="default"||id==="finally";break;case 8:keyword=id==="function"||id==="continue"||id==="debugger";break;case 10:keyword=id==="instanceof";break}if(keyword){return true}switch(id){case"const":return true;case"yield":case"let":return true}if(strict&&isStrictModeReservedWord(id)){return true}return isFutureReservedWord(id)}function skipComment(){var ch,blockComment,lineComment;blockComment=false;lineComment=false;while(index<length){ch=source[index];if(lineComment){ch=source[index++];if(isLineTerminator(ch)){lineComment=false;if(ch==="\r"&&source[index]==="\n"){++index}++lineNumber;lineStart=index}}else if(blockComment){if(isLineTerminator(ch)){if(ch==="\r"&&source[index+1]==="\n"){++index}++lineNumber;++index;lineStart=index;if(index>=length){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}else{ch=source[index++];if(index>=length){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(ch==="*"){ch=source[index];if(ch==="/"){++index;blockComment=false}}}}else if(ch==="/"){ch=source[index+1];if(ch==="/"){index+=2;lineComment=true}else if(ch==="*"){index+=2;blockComment=true;if(index>=length){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}else{break}}else if(isWhiteSpace(ch)){++index}else if(isLineTerminator(ch)){++index;if(ch==="\r"&&source[index]==="\n"){++index}++lineNumber;lineStart=index}else{break}}}function scanHexEscape(prefix){var i,len,ch,code=0;len=prefix==="u"?4:2;for(i=0;i<len;++i){if(index<length&&isHexDigit(source[index])){ch=source[index++];code=code*16+"0123456789abcdef".indexOf(ch.toLowerCase())}else{return""}}return String.fromCharCode(code)}function scanIdentifier(){var ch,start,id,restore;ch=source[index];if(!isIdentifierStart(ch)){return}start=index;if(ch==="\\"){++index;if(source[index]!=="u"){return}++index;restore=index;ch=scanHexEscape("u");if(ch){if(ch==="\\"||!isIdentifierStart(ch)){return}id=ch}else{index=restore;id="u"}}else{id=source[index++]}while(index<length){ch=source[index];if(!isIdentifierPart(ch)){break}if(ch==="\\"){++index;if(source[index]!=="u"){return}++index;restore=index;ch=scanHexEscape("u");if(ch){if(ch==="\\"||!isIdentifierPart(ch)){return}id+=ch}else{index=restore;id+="u"}}else{id+=source[index++]}}if(id.length===1){return{type:Token.Identifier,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(isKeyword(id)){return{type:Token.Keyword,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(id==="null"){return{type:Token.NullLiteral,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(id==="true"||id==="false"){return{type:Token.BooleanLiteral,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}return{type:Token.Identifier,value:id,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanPunctuator(){var start=index,ch1=source[index],ch2,ch3,ch4;if(ch1===";"||ch1==="{"||ch1==="}"){++index;return{type:Token.Punctuator,value:ch1,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1===","||ch1==="("||ch1===")"){++index;return{type:Token.Punctuator,value:ch1,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}ch2=source[index+1];if(ch1==="."&&!isDecimalDigit(ch2)){return{type:Token.Punctuator,value:source[index++],lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}ch3=source[index+2];ch4=source[index+3];if(ch1===">"&&ch2===">"&&ch3===">"){if(ch4==="="){index+=4;return{type:Token.Punctuator,value:">>>=",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}if(ch1==="="&&ch2==="="&&ch3==="="){index+=3;return{type:Token.Punctuator,value:"===",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1==="!"&&ch2==="="&&ch3==="="){index+=3;return{type:Token.Punctuator,value:"!==",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1===">"&&ch2===">"&&ch3===">"){index+=3;return{type:Token.Punctuator,value:">>>",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1==="<"&&ch2==="<"&&ch3==="="){index+=3;return{type:Token.Punctuator,value:"<<=",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch1===">"&&ch2===">"&&ch3==="="){index+=3;return{type:Token.Punctuator,value:">>=",lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(ch2==="="){if("<>=!+-*%&|^/".indexOf(ch1)>=0){index+=2;return{type:Token.Punctuator,value:ch1+ch2,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}if(ch1===ch2&&"+-<>&|".indexOf(ch1)>=0){if("+-<>&|".indexOf(ch2)>=0){index+=2;return{type:Token.Punctuator,value:ch1+ch2,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}if("[]<>+-*%&|^!~?:=/".indexOf(ch1)>=0){return{type:Token.Punctuator,value:source[index++],lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}}function scanNumericLiteral(){var number,start,ch;ch=source[index];assert(isDecimalDigit(ch)||ch===".","Numeric literal must start with a decimal digit or a decimal point");start=index;number="";if(ch!=="."){number=source[index++];ch=source[index];if(number==="0"){if(ch==="x"||ch==="X"){number+=source[index++];while(index<length){ch=source[index];if(!isHexDigit(ch)){break}number+=source[index++]}if(number.length<=2){throwError({},Messages.UnexpectedToken,"ILLEGAL")}if(index<length){ch=source[index];if(isIdentifierStart(ch)){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}return{type:Token.NumericLiteral,value:parseInt(number,16),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}else if(isOctalDigit(ch)){number+=source[index++];while(index<length){ch=source[index];if(!isOctalDigit(ch)){break}number+=source[index++]}if(index<length){ch=source[index];if(isIdentifierStart(ch)||isDecimalDigit(ch)){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}return{type:Token.NumericLiteral,value:parseInt(number,8),octal:true,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}if(isDecimalDigit(ch)){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}while(index<length){ch=source[index];if(!isDecimalDigit(ch)){break}number+=source[index++]}}if(ch==="."){number+=source[index++];while(index<length){ch=source[index];if(!isDecimalDigit(ch)){break}number+=source[index++]}}if(ch==="e"||ch==="E"){number+=source[index++];ch=source[index];if(ch==="+"||ch==="-"){number+=source[index++]}ch=source[index];if(isDecimalDigit(ch)){number+=source[index++];while(index<length){ch=source[index];if(!isDecimalDigit(ch)){break}number+=source[index++]}}else{ch="character "+ch;if(index>=length){ch="<end>"}throwError({},Messages.UnexpectedToken,"ILLEGAL")}}if(index<length){ch=source[index];if(isIdentifierStart(ch)){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}return{type:Token.NumericLiteral,value:parseFloat(number),lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanStringLiteral(){var str="",quote,start,ch,code,unescaped,restore,octal=false;quote=source[index];assert(quote==="'"||quote==='"',"String literal must starts with a quote");start=index;++index;while(index<length){ch=source[index++];if(ch===quote){quote="";break}else if(ch==="\\"){ch=source[index++];if(!isLineTerminator(ch)){switch(ch){case"n":str+="\n";break;case"r":str+="\r";break;case"t":str+=" ";break;case"u":case"x":restore=index;unescaped=scanHexEscape(ch);if(unescaped){str+=unescaped}else{index=restore;str+=ch}break;case"b":str+="\b";break;case"f":str+="\f";break;case"v":str+="";break;default:if(isOctalDigit(ch)){code="01234567".indexOf(ch);if(code!==0){octal=true}if(index<length&&isOctalDigit(source[index])){octal=true;code=code*8+"01234567".indexOf(source[index++]);if("0123".indexOf(ch)>=0&&index<length&&isOctalDigit(source[index])){code=code*8+"01234567".indexOf(source[index++])}}str+=String.fromCharCode(code)}else{str+=ch}break}}else{++lineNumber;if(ch==="\r"&&source[index]==="\n"){++index}}}else if(isLineTerminator(ch)){break}else{str+=ch}}if(quote!==""){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.StringLiteral,value:str,octal:octal,lineNumber:lineNumber,lineStart:lineStart,range:[start,index]}}function scanRegExp(){var str,ch,start,pattern,flags,value,classMarker=false,restore,terminated=false;buffer=null;skipComment();start=index;ch=source[index];assert(ch==="/","Regular expression literal must start with a slash");str=source[index++];while(index<length){ch=source[index++];str+=ch;if(classMarker){if(ch==="]"){classMarker=false}}else{if(ch==="\\"){ch=source[index++];if(isLineTerminator(ch)){throwError({},Messages.UnterminatedRegExp)}str+=ch}else if(ch==="/"){terminated=true;break}else if(ch==="["){classMarker=true}else if(isLineTerminator(ch)){throwError({},Messages.UnterminatedRegExp)}}}if(!terminated){throwError({},Messages.UnterminatedRegExp)}pattern=str.substr(1,str.length-2);flags="";while(index<length){ch=source[index];if(!isIdentifierPart(ch)){break}++index;if(ch==="\\"&&index<length){ch=source[index];if(ch==="u"){++index;restore=index;ch=scanHexEscape("u");if(ch){flags+=ch;str+="\\u";for(;restore<index;++restore){str+=source[restore]}}else{index=restore;flags+="u";str+="\\u"}}else{str+="\\"}}else{flags+=ch;str+=ch}}try{value=new RegExp(pattern,flags)}catch(e){throwError({},Messages.InvalidRegExp)}return{literal:str,value:value,range:[start,index]}}function isIdentifierName(token){return token.type===Token.Identifier||token.type===Token.Keyword||token.type===Token.BooleanLiteral||token.type===Token.NullLiteral}function advance(){var ch,token;skipComment();if(index>=length){return{type:Token.EOF,lineNumber:lineNumber,lineStart:lineStart,range:[index,index]}}token=scanPunctuator();if(typeof token!=="undefined"){return token}ch=source[index];if(ch==="'"||ch==='"'){return scanStringLiteral()}if(ch==="."||isDecimalDigit(ch)){return scanNumericLiteral()}token=scanIdentifier();if(typeof token!=="undefined"){return token}throwError({},Messages.UnexpectedToken,"ILLEGAL")}function lex(){var token;if(buffer){index=buffer.range[1];lineNumber=buffer.lineNumber;lineStart=buffer.lineStart;token=buffer;buffer=null;return token}buffer=null;return advance()}function lookahead(){var pos,line,start;if(buffer!==null){return buffer}pos=index;line=lineNumber;start=lineStart;buffer=advance();index=pos;lineNumber=line;lineStart=start;return buffer}function peekLineTerminator(){var pos,line,start,found;pos=index;line=lineNumber;start=lineStart;skipComment();found=lineNumber!==line;index=pos;lineNumber=line;lineStart=start;return found}function throwError(token,messageFormat){var error,args=Array.prototype.slice.call(arguments,2),msg=messageFormat.replace(/%(\d)/g,function(whole,index){return args[index]||""});if(typeof token.lineNumber==="number"){error=new Error("Line "+token.lineNumber+": "+msg);error.index=token.range[0];error.lineNumber=token.lineNumber;error.column=token.range[0]-lineStart+1}else{error=new Error("Line "+lineNumber+": "+msg);error.index=index;error.lineNumber=lineNumber;error.column=index-lineStart+1}throw error}function throwErrorTolerant(){try{throwError.apply(null,arguments)}catch(e){if(extra.errors){extra.errors.push(e)}else{throw e}}}function throwUnexpected(token){if(token.type===Token.EOF){throwError(token,Messages.UnexpectedEOS)}if(token.type===Token.NumericLiteral){throwError(token,Messages.UnexpectedNumber)}if(token.type===Token.StringLiteral){throwError(token,Messages.UnexpectedString)}if(token.type===Token.Identifier){throwError(token,Messages.UnexpectedIdentifier)}if(token.type===Token.Keyword){if(isFutureReservedWord(token.value)){throwError(token,Messages.UnexpectedReserved)}else if(strict&&isStrictModeReservedWord(token.value)){throwErrorTolerant(token,Messages.StrictReservedWord);return}throwError(token,Messages.UnexpectedToken,token.value)}throwError(token,Messages.UnexpectedToken,token.value)}function expect(value){var token=lex();if(token.type!==Token.Punctuator||token.value!==value){throwUnexpected(token)}}function expectKeyword(keyword){var token=lex();if(token.type!==Token.Keyword||token.value!==keyword){throwUnexpected(token)}}function match(value){var token=lookahead();return token.type===Token.Punctuator&&token.value===value}function matchKeyword(keyword){var token=lookahead();return token.type===Token.Keyword&&token.value===keyword}function matchAssign(){var token=lookahead(),op=token.value;if(token.type!==Token.Punctuator){return false}return op==="="||op==="*="||op==="/="||op==="%="||op==="+="||op==="-="||op==="<<="||op===">>="||op===">>>="||op==="&="||op==="^="||op==="|="}function consumeSemicolon(){var token,line;if(source[index]===";"){lex();return}line=lineNumber;skipComment();if(lineNumber!==line){return}if(match(";")){lex();return}token=lookahead();if(token.type!==Token.EOF&&!match("}")){throwUnexpected(token)}}function isLeftHandSide(expr){return expr.type===Syntax.Identifier||expr.type===Syntax.MemberExpression}function parseArrayInitialiser(){var elements=[];expect("[");while(!match("]")){if(match(",")){lex();elements.push(null)}else{elements.push(parseAssignmentExpression());if(!match("]")){expect(",")}}}expect("]");return{type:Syntax.ArrayExpression,elements:elements}}function parsePropertyFunction(param,first){var previousStrict,body;previousStrict=strict;body=parseFunctionSourceElements();if(first&&strict&&isRestrictedWord(param[0].name)){throwErrorTolerant(first,Messages.StrictParamName)}strict=previousStrict;return{type:Syntax.FunctionExpression,id:null,params:param,defaults:[],body:body,rest:null,generator:false,expression:false}}function parseObjectPropertyKey(){var token=lex();if(token.type===Token.StringLiteral||token.type===Token.NumericLiteral){if(strict&&token.octal){throwErrorTolerant(token,Messages.StrictOctalLiteral)}return createLiteral(token)}return{type:Syntax.Identifier,name:token.value}}function parseObjectProperty(){var token,key,id,param;token=lookahead();if(token.type===Token.Identifier){id=parseObjectPropertyKey();if(token.value==="get"&&!match(":")){key=parseObjectPropertyKey();expect("(");expect(")");return{type:Syntax.Property,key:key,value:parsePropertyFunction([]),kind:"get"}}else if(token.value==="set"&&!match(":")){key=parseObjectPropertyKey();expect("(");token=lookahead();if(token.type!==Token.Identifier){throwUnexpected(lex())}param=[parseVariableIdentifier()];expect(")");return{type:Syntax.Property,key:key,value:parsePropertyFunction(param,token),kind:"set"}}else{expect(":");return{type:Syntax.Property,key:id,value:parseAssignmentExpression(),kind:"init"}}}else if(token.type===Token.EOF||token.type===Token.Punctuator){throwUnexpected(token)}else{key=parseObjectPropertyKey();expect(":");return{type:Syntax.Property,key:key,value:parseAssignmentExpression(),kind:"init"}}}function parseObjectInitialiser(){var properties=[],property,name,kind,map={},toString=String;expect("{");while(!match("}")){property=parseObjectProperty();if(property.key.type===Syntax.Identifier){name=property.key.name}else{name=toString(property.key.value)}kind=property.kind==="init"?PropertyKind.Data:property.kind==="get"?PropertyKind.Get:PropertyKind.Set;if(Object.prototype.hasOwnProperty.call(map,name)){if(map[name]===PropertyKind.Data){if(strict&&kind===PropertyKind.Data){throwErrorTolerant({},Messages.StrictDuplicateProperty)}else if(kind!==PropertyKind.Data){throwErrorTolerant({},Messages.AccessorDataProperty)}}else{if(kind===PropertyKind.Data){throwErrorTolerant({},Messages.AccessorDataProperty)}else if(map[name]&kind){throwErrorTolerant({},Messages.AccessorGetSet)}}map[name]|=kind}else{map[name]=kind}properties.push(property);if(!match("}")){expect(",")}}expect("}");return{type:Syntax.ObjectExpression,properties:properties}}function parseGroupExpression(){var expr;expect("(");expr=parseExpression();expect(")");return expr}function parsePrimaryExpression(){var token=lookahead(),type=token.type;if(type===Token.Identifier){return{type:Syntax.Identifier,name:lex().value}}if(type===Token.StringLiteral||type===Token.NumericLiteral){if(strict&&token.octal){throwErrorTolerant(token,Messages.StrictOctalLiteral)}return createLiteral(lex())}if(type===Token.Keyword){if(matchKeyword("this")){lex();return{type:Syntax.ThisExpression}}if(matchKeyword("function")){return parseFunctionExpression()}}if(type===Token.BooleanLiteral){lex();token.value=token.value==="true";return createLiteral(token)}if(type===Token.NullLiteral){lex();token.value=null;return createLiteral(token)}if(match("[")){return parseArrayInitialiser()}if(match("{")){return parseObjectInitialiser()}if(match("(")){return parseGroupExpression()}if(match("/")||match("/=")){return createLiteral(scanRegExp())}return throwUnexpected(lex())}function parseArguments(){var args=[];expect("(");if(!match(")")){while(index<length){args.push(parseAssignmentExpression()); +if(match(")")){break}expect(",")}}expect(")");return args}function parseNonComputedProperty(){var token=lex();if(!isIdentifierName(token)){throwUnexpected(token)}return{type:Syntax.Identifier,name:token.value}}function parseNonComputedMember(){expect(".");return parseNonComputedProperty()}function parseComputedMember(){var expr;expect("[");expr=parseExpression();expect("]");return expr}function parseNewExpression(){var expr;expectKeyword("new");expr={type:Syntax.NewExpression,callee:parseLeftHandSideExpression(),arguments:[]};if(match("(")){expr["arguments"]=parseArguments()}return expr}function parseLeftHandSideExpressionAllowCall(){var expr;expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();while(match(".")||match("[")||match("(")){if(match("(")){expr={type:Syntax.CallExpression,callee:expr,arguments:parseArguments()}}else if(match("[")){expr={type:Syntax.MemberExpression,computed:true,object:expr,property:parseComputedMember()}}else{expr={type:Syntax.MemberExpression,computed:false,object:expr,property:parseNonComputedMember()}}}return expr}function parseLeftHandSideExpression(){var expr;expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();while(match(".")||match("[")){if(match("[")){expr={type:Syntax.MemberExpression,computed:true,object:expr,property:parseComputedMember()}}else{expr={type:Syntax.MemberExpression,computed:false,object:expr,property:parseNonComputedMember()}}}return expr}function parsePostfixExpression(){var expr=parseLeftHandSideExpressionAllowCall(),token;token=lookahead();if(token.type!==Token.Punctuator){return expr}if((match("++")||match("--"))&&!peekLineTerminator()){if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)){throwErrorTolerant({},Messages.StrictLHSPostfix)}if(!isLeftHandSide(expr)){throwError({},Messages.InvalidLHSInAssignment)}expr={type:Syntax.UpdateExpression,operator:lex().value,argument:expr,prefix:false}}return expr}function parseUnaryExpression(){var token,expr;token=lookahead();if(token.type!==Token.Punctuator&&token.type!==Token.Keyword){return parsePostfixExpression()}if(match("++")||match("--")){token=lex();expr=parseUnaryExpression();if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)){throwErrorTolerant({},Messages.StrictLHSPrefix)}if(!isLeftHandSide(expr)){throwError({},Messages.InvalidLHSInAssignment)}expr={type:Syntax.UpdateExpression,operator:token.value,argument:expr,prefix:true};return expr}if(match("+")||match("-")||match("~")||match("!")){expr={type:Syntax.UnaryExpression,operator:lex().value,argument:parseUnaryExpression()};return expr}if(matchKeyword("delete")||matchKeyword("void")||matchKeyword("typeof")){expr={type:Syntax.UnaryExpression,operator:lex().value,argument:parseUnaryExpression()};if(strict&&expr.operator==="delete"&&expr.argument.type===Syntax.Identifier){throwErrorTolerant({},Messages.StrictDelete)}return expr}return parsePostfixExpression()}function parseMultiplicativeExpression(){var expr=parseUnaryExpression();while(match("*")||match("/")||match("%")){expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseUnaryExpression()}}return expr}function parseAdditiveExpression(){var expr=parseMultiplicativeExpression();while(match("+")||match("-")){expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseMultiplicativeExpression()}}return expr}function parseShiftExpression(){var expr=parseAdditiveExpression();while(match("<<")||match(">>")||match(">>>")){expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseAdditiveExpression()}}return expr}function parseRelationalExpression(){var expr,previousAllowIn;previousAllowIn=state.allowIn;state.allowIn=true;expr=parseShiftExpression();while(match("<")||match(">")||match("<=")||match(">=")||previousAllowIn&&matchKeyword("in")||matchKeyword("instanceof")){expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseShiftExpression()}}state.allowIn=previousAllowIn;return expr}function parseEqualityExpression(){var expr=parseRelationalExpression();while(match("==")||match("!=")||match("===")||match("!==")){expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseRelationalExpression()}}return expr}function parseBitwiseANDExpression(){var expr=parseEqualityExpression();while(match("&")){lex();expr={type:Syntax.BinaryExpression,operator:"&",left:expr,right:parseEqualityExpression()}}return expr}function parseBitwiseXORExpression(){var expr=parseBitwiseANDExpression();while(match("^")){lex();expr={type:Syntax.BinaryExpression,operator:"^",left:expr,right:parseBitwiseANDExpression()}}return expr}function parseBitwiseORExpression(){var expr=parseBitwiseXORExpression();while(match("|")){lex();expr={type:Syntax.BinaryExpression,operator:"|",left:expr,right:parseBitwiseXORExpression()}}return expr}function parseLogicalANDExpression(){var expr=parseBitwiseORExpression();while(match("&&")){lex();expr={type:Syntax.LogicalExpression,operator:"&&",left:expr,right:parseBitwiseORExpression()}}return expr}function parseLogicalORExpression(){var expr=parseLogicalANDExpression();while(match("||")){lex();expr={type:Syntax.LogicalExpression,operator:"||",left:expr,right:parseLogicalANDExpression()}}return expr}function parseConditionalExpression(){var expr,previousAllowIn,consequent;expr=parseLogicalORExpression();if(match("?")){lex();previousAllowIn=state.allowIn;state.allowIn=true;consequent=parseAssignmentExpression();state.allowIn=previousAllowIn;expect(":");expr={type:Syntax.ConditionalExpression,test:expr,consequent:consequent,alternate:parseAssignmentExpression()}}return expr}function parseAssignmentExpression(){var token,expr;token=lookahead();expr=parseConditionalExpression();if(matchAssign()){if(!isLeftHandSide(expr)){throwError({},Messages.InvalidLHSInAssignment)}if(strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)){throwErrorTolerant(token,Messages.StrictLHSAssignment)}expr={type:Syntax.AssignmentExpression,operator:lex().value,left:expr,right:parseAssignmentExpression()}}return expr}function parseExpression(){var expr=parseAssignmentExpression();if(match(",")){expr={type:Syntax.SequenceExpression,expressions:[expr]};while(index<length){if(!match(",")){break}lex();expr.expressions.push(parseAssignmentExpression())}}return expr}function parseStatementList(){var list=[],statement;while(index<length){if(match("}")){break}statement=parseSourceElement();if(typeof statement==="undefined"){break}list.push(statement)}return list}function parseBlock(){var block;expect("{");block=parseStatementList();expect("}");return{type:Syntax.BlockStatement,body:block}}function parseVariableIdentifier(){var token=lex();if(token.type!==Token.Identifier){throwUnexpected(token)}return{type:Syntax.Identifier,name:token.value}}function parseVariableDeclaration(kind){var id=parseVariableIdentifier(),init=null;if(strict&&isRestrictedWord(id.name)){throwErrorTolerant({},Messages.StrictVarName)}if(kind==="const"){expect("=");init=parseAssignmentExpression()}else if(match("=")){lex();init=parseAssignmentExpression()}return{type:Syntax.VariableDeclarator,id:id,init:init}}function parseVariableDeclarationList(kind){var list=[];while(index<length){list.push(parseVariableDeclaration(kind));if(!match(",")){break}lex()}return list}function parseVariableStatement(){var declarations;expectKeyword("var");declarations=parseVariableDeclarationList();consumeSemicolon();return{type:Syntax.VariableDeclaration,declarations:declarations,kind:"var"}}function parseConstLetDeclaration(kind){var declarations;expectKeyword(kind);declarations=parseVariableDeclarationList(kind);consumeSemicolon();return{type:Syntax.VariableDeclaration,declarations:declarations,kind:kind}}function parseEmptyStatement(){expect(";");return{type:Syntax.EmptyStatement}}function parseExpressionStatement(){var expr=parseExpression();consumeSemicolon();return{type:Syntax.ExpressionStatement,expression:expr}}function parseIfStatement(){var test,consequent,alternate;expectKeyword("if");expect("(");test=parseExpression();expect(")");consequent=parseStatement();if(matchKeyword("else")){lex();alternate=parseStatement()}else{alternate=null}return{type:Syntax.IfStatement,test:test,consequent:consequent,alternate:alternate}}function parseDoWhileStatement(){var body,test,oldInIteration;expectKeyword("do");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");if(match(";")){lex()}return{type:Syntax.DoWhileStatement,body:body,test:test}}function parseWhileStatement(){var test,body,oldInIteration;expectKeyword("while");expect("(");test=parseExpression();expect(")");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;return{type:Syntax.WhileStatement,test:test,body:body}}function parseForVariableDeclaration(){var token=lex();return{type:Syntax.VariableDeclaration,declarations:parseVariableDeclarationList(),kind:token.value}}function parseForStatement(){var init,test,update,left,right,body,oldInIteration;init=test=update=null;expectKeyword("for");expect("(");if(match(";")){lex()}else{if(matchKeyword("var")||matchKeyword("let")){state.allowIn=false;init=parseForVariableDeclaration();state.allowIn=true;if(init.declarations.length===1&&matchKeyword("in")){lex();left=init;right=parseExpression();init=null}}else{state.allowIn=false;init=parseExpression();state.allowIn=true;if(matchKeyword("in")){if(!isLeftHandSide(init)){throwError({},Messages.InvalidLHSInForIn)}lex();left=init;right=parseExpression();init=null}}if(typeof left==="undefined"){expect(";")}}if(typeof left==="undefined"){if(!match(";")){test=parseExpression()}expect(";");if(!match(")")){update=parseExpression()}}expect(")");oldInIteration=state.inIteration;state.inIteration=true;body=parseStatement();state.inIteration=oldInIteration;if(typeof left==="undefined"){return{type:Syntax.ForStatement,init:init,test:test,update:update,body:body}}return{type:Syntax.ForInStatement,left:left,right:right,body:body,each:false}}function parseContinueStatement(){var token,label=null;expectKeyword("continue");if(source[index]===";"){lex();if(!state.inIteration){throwError({},Messages.IllegalContinue)}return{type:Syntax.ContinueStatement,label:null}}if(peekLineTerminator()){if(!state.inIteration){throwError({},Messages.IllegalContinue)}return{type:Syntax.ContinueStatement,label:null}}token=lookahead();if(token.type===Token.Identifier){label=parseVariableIdentifier();if(!Object.prototype.hasOwnProperty.call(state.labelSet,label.name)){throwError({},Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!state.inIteration){throwError({},Messages.IllegalContinue)}return{type:Syntax.ContinueStatement,label:label}}function parseBreakStatement(){var token,label=null;expectKeyword("break");if(source[index]===";"){lex();if(!(state.inIteration||state.inSwitch)){throwError({},Messages.IllegalBreak)}return{type:Syntax.BreakStatement,label:null}}if(peekLineTerminator()){if(!(state.inIteration||state.inSwitch)){throwError({},Messages.IllegalBreak)}return{type:Syntax.BreakStatement,label:null}}token=lookahead();if(token.type===Token.Identifier){label=parseVariableIdentifier();if(!Object.prototype.hasOwnProperty.call(state.labelSet,label.name)){throwError({},Messages.UnknownLabel,label.name)}}consumeSemicolon();if(label===null&&!(state.inIteration||state.inSwitch)){throwError({},Messages.IllegalBreak)}return{type:Syntax.BreakStatement,label:label}}function parseReturnStatement(){var token,argument=null;expectKeyword("return");if(!state.inFunctionBody){throwErrorTolerant({},Messages.IllegalReturn)}if(source[index]===" "){if(isIdentifierStart(source[index+1])){argument=parseExpression();consumeSemicolon();return{type:Syntax.ReturnStatement,argument:argument}}}if(peekLineTerminator()){return{type:Syntax.ReturnStatement,argument:null}}if(!match(";")){token=lookahead();if(!match("}")&&token.type!==Token.EOF){argument=parseExpression()}}consumeSemicolon();return{type:Syntax.ReturnStatement,argument:argument}}function parseWithStatement(){var object,body;if(strict){throwErrorTolerant({},Messages.StrictModeWith)}expectKeyword("with");expect("(");object=parseExpression();expect(")");body=parseStatement();return{type:Syntax.WithStatement,object:object,body:body}}function parseSwitchCase(){var test,consequent=[],statement;if(matchKeyword("default")){lex();test=null}else{expectKeyword("case");test=parseExpression()}expect(":");while(index<length){if(match("}")||matchKeyword("default")||matchKeyword("case")){break}statement=parseStatement();if(typeof statement==="undefined"){break}consequent.push(statement)}return{type:Syntax.SwitchCase,test:test,consequent:consequent}}function parseSwitchStatement(){var discriminant,cases,clause,oldInSwitch,defaultFound;expectKeyword("switch");expect("(");discriminant=parseExpression();expect(")");expect("{");if(match("}")){lex();return{type:Syntax.SwitchStatement,discriminant:discriminant}}cases=[];oldInSwitch=state.inSwitch;state.inSwitch=true;defaultFound=false;while(index<length){if(match("}")){break}clause=parseSwitchCase();if(clause.test===null){if(defaultFound){throwError({},Messages.MultipleDefaultsInSwitch)}defaultFound=true}cases.push(clause)}state.inSwitch=oldInSwitch;expect("}");return{type:Syntax.SwitchStatement,discriminant:discriminant,cases:cases}}function parseThrowStatement(){var argument;expectKeyword("throw");if(peekLineTerminator()){throwError({},Messages.NewlineAfterThrow)}argument=parseExpression();consumeSemicolon();return{type:Syntax.ThrowStatement,argument:argument}}function parseCatchClause(){var param;expectKeyword("catch");expect("(");if(!match(")")){param=parseExpression();if(strict&¶m.type===Syntax.Identifier&&isRestrictedWord(param.name)){throwErrorTolerant({},Messages.StrictCatchVariable)}}expect(")");return{type:Syntax.CatchClause,param:param,body:parseBlock()}}function parseTryStatement(){var block,handlers=[],finalizer=null;expectKeyword("try");block=parseBlock();if(matchKeyword("catch")){handlers.push(parseCatchClause())}if(matchKeyword("finally")){lex();finalizer=parseBlock()}if(handlers.length===0&&!finalizer){throwError({},Messages.NoCatchOrFinally)}return{type:Syntax.TryStatement,block:block,guardedHandlers:[],handlers:handlers,finalizer:finalizer}}function parseDebuggerStatement(){expectKeyword("debugger");consumeSemicolon();return{type:Syntax.DebuggerStatement}}function parseStatement(){var token=lookahead(),expr,labeledBody;if(token.type===Token.EOF){throwUnexpected(token)}if(token.type===Token.Punctuator){switch(token.value){case";":return parseEmptyStatement();case"{":return parseBlock();case"(":return parseExpressionStatement();default:break}}if(token.type===Token.Keyword){switch(token.value){case"break":return parseBreakStatement();case"continue":return parseContinueStatement();case"debugger":return parseDebuggerStatement();case"do":return parseDoWhileStatement();case"for":return parseForStatement();case"function":return parseFunctionDeclaration();case"if":return parseIfStatement();case"return":return parseReturnStatement();case"switch":return parseSwitchStatement();case"throw":return parseThrowStatement();case"try":return parseTryStatement();case"var":return parseVariableStatement();case"while":return parseWhileStatement();case"with":return parseWithStatement();default:break}}expr=parseExpression();if(expr.type===Syntax.Identifier&&match(":")){lex();if(Object.prototype.hasOwnProperty.call(state.labelSet,expr.name)){throwError({},Messages.Redeclaration,"Label",expr.name)}state.labelSet[expr.name]=true;labeledBody=parseStatement();delete state.labelSet[expr.name];return{type:Syntax.LabeledStatement,label:expr,body:labeledBody}}consumeSemicolon();return{type:Syntax.ExpressionStatement,expression:expr}}function parseFunctionSourceElements(){var sourceElement,sourceElements=[],token,directive,firstRestricted,oldLabelSet,oldInIteration,oldInSwitch,oldInFunctionBody;expect("{");while(index<length){token=lookahead();if(token.type!==Token.StringLiteral){break}sourceElement=parseSourceElement();sourceElements.push(sourceElement);if(sourceElement.expression.type!==Syntax.Literal){break}directive=sliceSource(token.range[0]+1,token.range[1]-1);if(directive==="use strict"){strict=true;if(firstRestricted){throwErrorTolerant(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}oldLabelSet=state.labelSet;oldInIteration=state.inIteration;oldInSwitch=state.inSwitch;oldInFunctionBody=state.inFunctionBody;state.labelSet={};state.inIteration=false;state.inSwitch=false;state.inFunctionBody=true;while(index<length){if(match("}")){break}sourceElement=parseSourceElement();if(typeof sourceElement==="undefined"){break}sourceElements.push(sourceElement)}expect("}");state.labelSet=oldLabelSet;state.inIteration=oldInIteration;state.inSwitch=oldInSwitch;state.inFunctionBody=oldInFunctionBody;return{type:Syntax.BlockStatement,body:sourceElements}}function parseFunctionDeclaration(){var id,param,params=[],body,token,stricted,firstRestricted,message,previousStrict,paramSet;expectKeyword("function");token=lookahead();id=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value)){throwErrorTolerant(token,Messages.StrictFunctionName)}}else{if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}}expect("(");if(!match(")")){paramSet={};while(index<length){token=lookahead();param=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value)){stricted=token;message=Messages.StrictParamName}if(Object.prototype.hasOwnProperty.call(paramSet,token.value)){stricted=token;message=Messages.StrictParamDupe}}else if(!firstRestricted){if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictParamName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}else if(Object.prototype.hasOwnProperty.call(paramSet,token.value)){firstRestricted=token;message=Messages.StrictParamDupe}}params.push(param);paramSet[param.name]=true;if(match(")")){break}expect(",")}}expect(")");previousStrict=strict;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwError(firstRestricted,message)}if(strict&&stricted){throwErrorTolerant(stricted,message)}strict=previousStrict;return{type:Syntax.FunctionDeclaration,id:id,params:params,defaults:[],body:body,rest:null,generator:false,expression:false}}function parseFunctionExpression(){var token,id=null,stricted,firstRestricted,message,param,params=[],body,previousStrict,paramSet;expectKeyword("function");if(!match("(")){token=lookahead();id=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value)){throwErrorTolerant(token,Messages.StrictFunctionName)}}else{if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictFunctionName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}}}expect("(");if(!match(")")){paramSet={};while(index<length){token=lookahead();param=parseVariableIdentifier();if(strict){if(isRestrictedWord(token.value)){stricted=token;message=Messages.StrictParamName}if(Object.prototype.hasOwnProperty.call(paramSet,token.value)){stricted=token;message=Messages.StrictParamDupe}}else if(!firstRestricted){if(isRestrictedWord(token.value)){firstRestricted=token;message=Messages.StrictParamName}else if(isStrictModeReservedWord(token.value)){firstRestricted=token;message=Messages.StrictReservedWord}else if(Object.prototype.hasOwnProperty.call(paramSet,token.value)){firstRestricted=token;message=Messages.StrictParamDupe}}params.push(param);paramSet[param.name]=true;if(match(")")){break}expect(",")}}expect(")");previousStrict=strict;body=parseFunctionSourceElements();if(strict&&firstRestricted){throwError(firstRestricted,message)}if(strict&&stricted){throwErrorTolerant(stricted,message)}strict=previousStrict;return{type:Syntax.FunctionExpression,id:id,params:params,defaults:[],body:body,rest:null,generator:false,expression:false}}function parseSourceElement(){var token=lookahead();if(token.type===Token.Keyword){switch(token.value){case"const":case"let":return parseConstLetDeclaration(token.value);case"function":return parseFunctionDeclaration();default:return parseStatement()}}if(token.type!==Token.EOF){return parseStatement()}}function parseSourceElements(){var sourceElement,sourceElements=[],token,directive,firstRestricted;while(index<length){token=lookahead();if(token.type!==Token.StringLiteral){break}sourceElement=parseSourceElement();sourceElements.push(sourceElement);if(sourceElement.expression.type!==Syntax.Literal){break}directive=sliceSource(token.range[0]+1,token.range[1]-1);if(directive==="use strict"){strict=true;if(firstRestricted){throwErrorTolerant(firstRestricted,Messages.StrictOctalLiteral)}}else{if(!firstRestricted&&token.octal){firstRestricted=token}}}while(index<length){sourceElement=parseSourceElement();if(typeof sourceElement==="undefined"){break}sourceElements.push(sourceElement)}return sourceElements}function parseProgram(){var program;strict=false;program={type:Syntax.Program,body:parseSourceElements()};return program}function addComment(type,value,start,end,loc){assert(typeof start==="number","Comment must have valid position");if(extra.comments.length>0){if(extra.comments[extra.comments.length-1].range[1]>start){return}}extra.comments.push({type:type,value:value,range:[start,end],loc:loc})}function scanComment(){var comment,ch,loc,start,blockComment,lineComment;comment="";blockComment=false;lineComment=false;while(index<length){ch=source[index];if(lineComment){ch=source[index++];if(isLineTerminator(ch)){loc.end={line:lineNumber,column:index-lineStart-1};lineComment=false;addComment("Line",comment,start,index-1,loc);if(ch==="\r"&&source[index]==="\n"){++index}++lineNumber;lineStart=index;comment=""}else if(index>=length){lineComment=false;comment+=ch;loc.end={line:lineNumber,column:length-lineStart};addComment("Line",comment,start,length,loc)}else{comment+=ch}}else if(blockComment){if(isLineTerminator(ch)){if(ch==="\r"&&source[index+1]==="\n"){++index;comment+="\r\n"}else{comment+=ch}++lineNumber;++index;lineStart=index;if(index>=length){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}else{ch=source[index++];if(index>=length){throwError({},Messages.UnexpectedToken,"ILLEGAL")}comment+=ch;if(ch==="*"){ch=source[index];if(ch==="/"){comment=comment.substr(0,comment.length-1);blockComment=false;++index;loc.end={line:lineNumber,column:index-lineStart};addComment("Block",comment,start,index,loc);comment=""}}}}else if(ch==="/"){ch=source[index+1];if(ch==="/"){loc={start:{line:lineNumber,column:index-lineStart}};start=index;index+=2;lineComment=true;if(index>=length){loc.end={line:lineNumber,column:index-lineStart};lineComment=false;addComment("Line",comment,start,index,loc)}}else if(ch==="*"){start=index;index+=2;blockComment=true;loc={start:{line:lineNumber,column:index-lineStart-2}};if(index>=length){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}else{break}}else if(isWhiteSpace(ch)){++index}else if(isLineTerminator(ch)){++index;if(ch==="\r"&&source[index]==="\n"){++index}++lineNumber;lineStart=index}else{break}}}function filterCommentLocation(){var i,entry,comment,comments=[];for(i=0;i<extra.comments.length;++i){entry=extra.comments[i];comment={type:entry.type,value:entry.value};if(extra.range){comment.range=entry.range}if(extra.loc){comment.loc=entry.loc}comments.push(comment)}extra.comments=comments}function collectToken(){var start,loc,token,range,value;skipComment();start=index;loc={start:{line:lineNumber,column:index-lineStart}};token=extra.advance();loc.end={line:lineNumber,column:index-lineStart};if(token.type!==Token.EOF){range=[token.range[0],token.range[1]];value=sliceSource(token.range[0],token.range[1]);extra.tokens.push({type:TokenName[token.type],value:value,range:range,loc:loc})}return token}function collectRegex(){var pos,loc,regex,token;skipComment();pos=index;loc={start:{line:lineNumber,column:index-lineStart}};regex=extra.scanRegExp();loc.end={line:lineNumber,column:index-lineStart};if(extra.tokens.length>0){token=extra.tokens[extra.tokens.length-1];if(token.range[0]===pos&&token.type==="Punctuator"){if(token.value==="/"||token.value==="/="){extra.tokens.pop()}}}extra.tokens.push({type:"RegularExpression",value:regex.literal,range:[pos,index],loc:loc});return regex}function filterTokenLocation(){var i,entry,token,tokens=[];for(i=0;i<extra.tokens.length;++i){entry=extra.tokens[i];token={type:entry.type,value:entry.value};if(extra.range){token.range=entry.range}if(extra.loc){token.loc=entry.loc}tokens.push(token)}extra.tokens=tokens}function createLiteral(token){return{type:Syntax.Literal,value:token.value}}function createRawLiteral(token){return{type:Syntax.Literal,value:token.value,raw:sliceSource(token.range[0],token.range[1])}}function createLocationMarker(){var marker={};marker.range=[index,index];marker.loc={start:{line:lineNumber,column:index-lineStart},end:{line:lineNumber,column:index-lineStart}};marker.end=function(){this.range[1]=index;this.loc.end.line=lineNumber;this.loc.end.column=index-lineStart};marker.applyGroup=function(node){if(extra.range){node.groupRange=[this.range[0],this.range[1]]}if(extra.loc){node.groupLoc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}}}};marker.apply=function(node){if(extra.range){node.range=[this.range[0],this.range[1]]}if(extra.loc){node.loc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}}}};return marker}function trackGroupExpression(){var marker,expr;skipComment();marker=createLocationMarker();expect("(");expr=parseExpression();expect(")");marker.end();marker.applyGroup(expr);return expr}function trackLeftHandSideExpression(){var marker,expr;skipComment();marker=createLocationMarker();expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();while(match(".")||match("[")){if(match("[")){expr={type:Syntax.MemberExpression,computed:true,object:expr,property:parseComputedMember()};marker.end();marker.apply(expr)}else{expr={type:Syntax.MemberExpression,computed:false,object:expr,property:parseNonComputedMember()};marker.end();marker.apply(expr)}}return expr}function trackLeftHandSideExpressionAllowCall(){var marker,expr;skipComment();marker=createLocationMarker();expr=matchKeyword("new")?parseNewExpression():parsePrimaryExpression();while(match(".")||match("[")||match("(")){if(match("(")){expr={type:Syntax.CallExpression,callee:expr,arguments:parseArguments()};marker.end();marker.apply(expr)}else if(match("[")){expr={type:Syntax.MemberExpression,computed:true,object:expr,property:parseComputedMember()};marker.end();marker.apply(expr)}else{expr={type:Syntax.MemberExpression,computed:false,object:expr,property:parseNonComputedMember()};marker.end();marker.apply(expr)}}return expr}function filterGroup(node){var n,i,entry;n=Object.prototype.toString.apply(node)==="[object Array]"?[]:{};for(i in node){if(node.hasOwnProperty(i)&&i!=="groupRange"&&i!=="groupLoc"){entry=node[i];if(entry===null||typeof entry!=="object"||entry instanceof RegExp){n[i]=entry}else{n[i]=filterGroup(entry)}}}return n}function wrapTrackingFunction(range,loc){return function(parseFunction){function isBinary(node){return node.type===Syntax.LogicalExpression||node.type===Syntax.BinaryExpression}function visit(node){var start,end;if(isBinary(node.left)){visit(node.left)}if(isBinary(node.right)){visit(node.right)}if(range){if(node.left.groupRange||node.right.groupRange){start=node.left.groupRange?node.left.groupRange[0]:node.left.range[0];end=node.right.groupRange?node.right.groupRange[1]:node.right.range[1];node.range=[start,end]}else if(typeof node.range==="undefined"){start=node.left.range[0];end=node.right.range[1];node.range=[start,end]}}if(loc){if(node.left.groupLoc||node.right.groupLoc){start=node.left.groupLoc?node.left.groupLoc.start:node.left.loc.start;end=node.right.groupLoc?node.right.groupLoc.end:node.right.loc.end;node.loc={start:start,end:end}}else if(typeof node.loc==="undefined"){node.loc={start:node.left.loc.start,end:node.right.loc.end}}}}return function(){var marker,node;skipComment();marker=createLocationMarker();node=parseFunction.apply(null,arguments);marker.end();if(range&&typeof node.range==="undefined"){marker.apply(node)}if(loc&&typeof node.loc==="undefined"){marker.apply(node)}if(isBinary(node)){visit(node)}return node}}}function patch(){var wrapTracking;if(extra.comments){extra.skipComment=skipComment;skipComment=scanComment}if(extra.raw){extra.createLiteral=createLiteral;createLiteral=createRawLiteral}if(extra.range||extra.loc){extra.parseGroupExpression=parseGroupExpression;extra.parseLeftHandSideExpression=parseLeftHandSideExpression;extra.parseLeftHandSideExpressionAllowCall=parseLeftHandSideExpressionAllowCall;parseGroupExpression=trackGroupExpression;parseLeftHandSideExpression=trackLeftHandSideExpression;parseLeftHandSideExpressionAllowCall=trackLeftHandSideExpressionAllowCall;wrapTracking=wrapTrackingFunction(extra.range,extra.loc);extra.parseAdditiveExpression=parseAdditiveExpression;extra.parseAssignmentExpression=parseAssignmentExpression;extra.parseBitwiseANDExpression=parseBitwiseANDExpression;extra.parseBitwiseORExpression=parseBitwiseORExpression;extra.parseBitwiseXORExpression=parseBitwiseXORExpression;extra.parseBlock=parseBlock;extra.parseFunctionSourceElements=parseFunctionSourceElements;extra.parseCatchClause=parseCatchClause;extra.parseComputedMember=parseComputedMember;extra.parseConditionalExpression=parseConditionalExpression;extra.parseConstLetDeclaration=parseConstLetDeclaration;extra.parseEqualityExpression=parseEqualityExpression;extra.parseExpression=parseExpression;extra.parseForVariableDeclaration=parseForVariableDeclaration;extra.parseFunctionDeclaration=parseFunctionDeclaration;extra.parseFunctionExpression=parseFunctionExpression;extra.parseLogicalANDExpression=parseLogicalANDExpression;extra.parseLogicalORExpression=parseLogicalORExpression;extra.parseMultiplicativeExpression=parseMultiplicativeExpression;extra.parseNewExpression=parseNewExpression;extra.parseNonComputedProperty=parseNonComputedProperty;extra.parseObjectProperty=parseObjectProperty;extra.parseObjectPropertyKey=parseObjectPropertyKey;extra.parsePostfixExpression=parsePostfixExpression;extra.parsePrimaryExpression=parsePrimaryExpression;extra.parseProgram=parseProgram;extra.parsePropertyFunction=parsePropertyFunction;extra.parseRelationalExpression=parseRelationalExpression;extra.parseStatement=parseStatement;extra.parseShiftExpression=parseShiftExpression;extra.parseSwitchCase=parseSwitchCase;extra.parseUnaryExpression=parseUnaryExpression;extra.parseVariableDeclaration=parseVariableDeclaration;extra.parseVariableIdentifier=parseVariableIdentifier;parseAdditiveExpression=wrapTracking(extra.parseAdditiveExpression);parseAssignmentExpression=wrapTracking(extra.parseAssignmentExpression);parseBitwiseANDExpression=wrapTracking(extra.parseBitwiseANDExpression);parseBitwiseORExpression=wrapTracking(extra.parseBitwiseORExpression);parseBitwiseXORExpression=wrapTracking(extra.parseBitwiseXORExpression);parseBlock=wrapTracking(extra.parseBlock);parseFunctionSourceElements=wrapTracking(extra.parseFunctionSourceElements);parseCatchClause=wrapTracking(extra.parseCatchClause);parseComputedMember=wrapTracking(extra.parseComputedMember);parseConditionalExpression=wrapTracking(extra.parseConditionalExpression);parseConstLetDeclaration=wrapTracking(extra.parseConstLetDeclaration);parseEqualityExpression=wrapTracking(extra.parseEqualityExpression);parseExpression=wrapTracking(extra.parseExpression);parseForVariableDeclaration=wrapTracking(extra.parseForVariableDeclaration); +parseFunctionDeclaration=wrapTracking(extra.parseFunctionDeclaration);parseFunctionExpression=wrapTracking(extra.parseFunctionExpression);parseLeftHandSideExpression=wrapTracking(parseLeftHandSideExpression);parseLogicalANDExpression=wrapTracking(extra.parseLogicalANDExpression);parseLogicalORExpression=wrapTracking(extra.parseLogicalORExpression);parseMultiplicativeExpression=wrapTracking(extra.parseMultiplicativeExpression);parseNewExpression=wrapTracking(extra.parseNewExpression);parseNonComputedProperty=wrapTracking(extra.parseNonComputedProperty);parseObjectProperty=wrapTracking(extra.parseObjectProperty);parseObjectPropertyKey=wrapTracking(extra.parseObjectPropertyKey);parsePostfixExpression=wrapTracking(extra.parsePostfixExpression);parsePrimaryExpression=wrapTracking(extra.parsePrimaryExpression);parseProgram=wrapTracking(extra.parseProgram);parsePropertyFunction=wrapTracking(extra.parsePropertyFunction);parseRelationalExpression=wrapTracking(extra.parseRelationalExpression);parseStatement=wrapTracking(extra.parseStatement);parseShiftExpression=wrapTracking(extra.parseShiftExpression);parseSwitchCase=wrapTracking(extra.parseSwitchCase);parseUnaryExpression=wrapTracking(extra.parseUnaryExpression);parseVariableDeclaration=wrapTracking(extra.parseVariableDeclaration);parseVariableIdentifier=wrapTracking(extra.parseVariableIdentifier)}if(typeof extra.tokens!=="undefined"){extra.advance=advance;extra.scanRegExp=scanRegExp;advance=collectToken;scanRegExp=collectRegex}}function unpatch(){if(typeof extra.skipComment==="function"){skipComment=extra.skipComment}if(extra.raw){createLiteral=extra.createLiteral}if(extra.range||extra.loc){parseAdditiveExpression=extra.parseAdditiveExpression;parseAssignmentExpression=extra.parseAssignmentExpression;parseBitwiseANDExpression=extra.parseBitwiseANDExpression;parseBitwiseORExpression=extra.parseBitwiseORExpression;parseBitwiseXORExpression=extra.parseBitwiseXORExpression;parseBlock=extra.parseBlock;parseFunctionSourceElements=extra.parseFunctionSourceElements;parseCatchClause=extra.parseCatchClause;parseComputedMember=extra.parseComputedMember;parseConditionalExpression=extra.parseConditionalExpression;parseConstLetDeclaration=extra.parseConstLetDeclaration;parseEqualityExpression=extra.parseEqualityExpression;parseExpression=extra.parseExpression;parseForVariableDeclaration=extra.parseForVariableDeclaration;parseFunctionDeclaration=extra.parseFunctionDeclaration;parseFunctionExpression=extra.parseFunctionExpression;parseGroupExpression=extra.parseGroupExpression;parseLeftHandSideExpression=extra.parseLeftHandSideExpression;parseLeftHandSideExpressionAllowCall=extra.parseLeftHandSideExpressionAllowCall;parseLogicalANDExpression=extra.parseLogicalANDExpression;parseLogicalORExpression=extra.parseLogicalORExpression;parseMultiplicativeExpression=extra.parseMultiplicativeExpression;parseNewExpression=extra.parseNewExpression;parseNonComputedProperty=extra.parseNonComputedProperty;parseObjectProperty=extra.parseObjectProperty;parseObjectPropertyKey=extra.parseObjectPropertyKey;parsePrimaryExpression=extra.parsePrimaryExpression;parsePostfixExpression=extra.parsePostfixExpression;parseProgram=extra.parseProgram;parsePropertyFunction=extra.parsePropertyFunction;parseRelationalExpression=extra.parseRelationalExpression;parseStatement=extra.parseStatement;parseShiftExpression=extra.parseShiftExpression;parseSwitchCase=extra.parseSwitchCase;parseUnaryExpression=extra.parseUnaryExpression;parseVariableDeclaration=extra.parseVariableDeclaration;parseVariableIdentifier=extra.parseVariableIdentifier}if(typeof extra.scanRegExp==="function"){advance=extra.advance;scanRegExp=extra.scanRegExp}}function stringToArray(str){var length=str.length,result=[],i;for(i=0;i<length;++i){result[i]=str.charAt(i)}return result}function parse(code,options){var program,toString;toString=String;if(typeof code!=="string"&&!(code instanceof String)){code=toString(code)}source=code;index=0;lineNumber=source.length>0?1:0;lineStart=0;length=source.length;buffer=null;state={allowIn:true,labelSet:{},inFunctionBody:false,inIteration:false,inSwitch:false};extra={};if(typeof options!=="undefined"){extra.range=typeof options.range==="boolean"&&options.range;extra.loc=typeof options.loc==="boolean"&&options.loc;extra.raw=typeof options.raw==="boolean"&&options.raw;if(typeof options.tokens==="boolean"&&options.tokens){extra.tokens=[]}if(typeof options.comment==="boolean"&&options.comment){extra.comments=[]}if(typeof options.tolerant==="boolean"&&options.tolerant){extra.errors=[]}}if(length>0){if(typeof source[0]==="undefined"){if(code instanceof String){source=code.valueOf()}if(typeof source[0]==="undefined"){source=stringToArray(code)}}}patch();try{program=parseProgram();if(typeof extra.comments!=="undefined"){filterCommentLocation();program.comments=extra.comments}if(typeof extra.tokens!=="undefined"){filterTokenLocation();program.tokens=extra.tokens}if(typeof extra.errors!=="undefined"){program.errors=extra.errors}if(extra.range||extra.loc){program.body=filterGroup(program.body)}}catch(e){throw e}finally{unpatch();extra={}}return program}exports.version="1.0.2";exports.parse=parse;exports.Syntax=function(){var name,types={};if(typeof Object.create==="function"){types=Object.create(null)}for(name in Syntax){if(Syntax.hasOwnProperty(name)){types[name]=Syntax[name]}}if(typeof Object.freeze==="function"){Object.freeze(types)}return types}()})})()},{}]},{},[]);return require("./index")}();
\ No newline at end of file diff --git a/js/mustache.js b/js/mustache.js new file mode 100644 index 0000000..bee26f9 --- /dev/null +++ b/js/mustache.js @@ -0,0 +1,536 @@ +/*! + * mustache.js - Logic-less {{mustache}} templates with JavaScript + * http://github.com/janl/mustache.js + */ + +/*global define: false*/ + +(function (root, factory) { + if (typeof exports === "object" && exports) { + factory(exports); // CommonJS + } else { + var mustache = {}; + factory(mustache); + if (typeof define === "function" && define.amd) { + define(mustache); // AMD + } else { + root.Mustache = mustache; // <script> + } + } +}(this, function (mustache) { + + var whiteRe = /\s*/; + var spaceRe = /\s+/; + var nonSpaceRe = /\S/; + var eqRe = /\s*=/; + var curlyRe = /\s*\}/; + var tagRe = /#|\^|\/|>|\{|&|=|!/; + + // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577 + // See https://github.com/janl/mustache.js/issues/189 + var RegExp_test = RegExp.prototype.test; + function testRegExp(re, string) { + return RegExp_test.call(re, string); + } + + function isWhitespace(string) { + return !testRegExp(nonSpaceRe, string); + } + + var Object_toString = Object.prototype.toString; + var isArray = Array.isArray || function (obj) { + return Object_toString.call(obj) === '[object Array]'; + }; + + function escapeRegExp(string) { + return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); + } + + var entityMap = { + "&": "&", + "<": "<", + ">": ">", + '"': '"', + "'": ''', + "/": '/' + }; + + function escapeHtml(string) { + return String(string).replace(/[&<>"'\/]/g, function (s) { + return entityMap[s]; + }); + } + + function Scanner(string) { + this.string = string; + this.tail = string; + this.pos = 0; + } + + /** + * Returns `true` if the tail is empty (end of string). + */ + Scanner.prototype.eos = function () { + return this.tail === ""; + }; + + /** + * Tries to match the given regular expression at the current position. + * Returns the matched text if it can match, the empty string otherwise. + */ + Scanner.prototype.scan = function (re) { + var match = this.tail.match(re); + + if (match && match.index === 0) { + this.tail = this.tail.substring(match[0].length); + this.pos += match[0].length; + return match[0]; + } + + return ""; + }; + + /** + * Skips all text until the given regular expression can be matched. Returns + * the skipped string, which is the entire tail if no match can be made. + */ + Scanner.prototype.scanUntil = function (re) { + var match, pos = this.tail.search(re); + + switch (pos) { + case -1: + match = this.tail; + this.pos += this.tail.length; + this.tail = ""; + break; + case 0: + match = ""; + break; + default: + match = this.tail.substring(0, pos); + this.tail = this.tail.substring(pos); + this.pos += pos; + } + + return match; + }; + + function Context(view, parent) { + this.view = view || {}; + this.parent = parent; + this._cache = {}; + } + + Context.make = function (view) { + return (view instanceof Context) ? view : new Context(view); + }; + + Context.prototype.push = function (view) { + return new Context(view, this); + }; + + Context.prototype.lookup = function (name) { + var value = this._cache[name]; + + if (!value) { + if (name == '.') { + value = this.view; + } else { + var context = this; + + while (context) { + if (name.indexOf('.') > 0) { + value = context.view; + var names = name.split('.'), i = 0; + while (value && i < names.length) { + value = value[names[i++]]; + } + } else { + value = context.view[name]; + } + + if (value != null) break; + + context = context.parent; + } + } + + this._cache[name] = value; + } + + if (typeof value === 'function') value = value.call(this.view); + + return value; + }; + + function Writer() { + this.clearCache(); + } + + Writer.prototype.clearCache = function () { + this._cache = {}; + this._partialCache = {}; + }; + + Writer.prototype.compile = function (template, tags) { + var fn = this._cache[template]; + + if (!fn) { + var tokens = mustache.parse(template, tags); + fn = this._cache[template] = this.compileTokens(tokens, template); + } + + return fn; + }; + + Writer.prototype.compilePartial = function (name, template, tags) { + var fn = this.compile(template, tags); + this._partialCache[name] = fn; + return fn; + }; + + Writer.prototype.getPartial = function (name) { + if (!(name in this._partialCache) && this._loadPartial) { + this.compilePartial(name, this._loadPartial(name)); + } + + return this._partialCache[name]; + }; + + Writer.prototype.compileTokens = function (tokens, template) { + var self = this; + return function (view, partials) { + if (partials) { + if (typeof partials === 'function') { + self._loadPartial = partials; + } else { + for (var name in partials) { + self.compilePartial(name, partials[name]); + } + } + } + + return renderTokens(tokens, self, Context.make(view), template); + }; + }; + + Writer.prototype.render = function (template, view, partials) { + return this.compile(template)(view, partials); + }; + + /** + * Low-level function that renders the given `tokens` using the given `writer` + * and `context`. The `template` string is only needed for templates that use + * higher-order sections to extract the portion of the original template that + * was contained in that section. + */ + function renderTokens(tokens, writer, context, template) { + var buffer = ''; + + var token, tokenValue, value; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + tokenValue = token[1]; + + switch (token[0]) { + case '#': + value = context.lookup(tokenValue); + + if (typeof value === 'object') { + if (isArray(value)) { + for (var j = 0, jlen = value.length; j < jlen; ++j) { + buffer += renderTokens(token[4], writer, context.push(value[j]), template); + } + } else if (value) { + buffer += renderTokens(token[4], writer, context.push(value), template); + } + } else if (typeof value === 'function') { + var text = template == null ? null : template.slice(token[3], token[5]); + value = value.call(context.view, text, function (template) { + return writer.render(template, context); + }); + if (value != null) buffer += value; + } else if (value) { + buffer += renderTokens(token[4], writer, context, template); + } + + break; + case '^': + value = context.lookup(tokenValue); + + // Use JavaScript's definition of falsy. Include empty arrays. + // See https://github.com/janl/mustache.js/issues/186 + if (!value || (isArray(value) && value.length === 0)) { + buffer += renderTokens(token[4], writer, context, template); + } + + break; + case '>': + value = writer.getPartial(tokenValue); + if (typeof value === 'function') buffer += value(context); + break; + case '&': + value = context.lookup(tokenValue); + if (value != null) buffer += value; + break; + case 'name': + value = context.lookup(tokenValue); + if (value != null) buffer += mustache.escape(value); + break; + case 'text': + buffer += tokenValue; + break; + } + } + + return buffer; + } + + /** + * Forms the given array of `tokens` into a nested tree structure where + * tokens that represent a section have two additional items: 1) an array of + * all tokens that appear in that section and 2) the index in the original + * template that represents the end of that section. + */ + function nestTokens(tokens) { + var tree = []; + var collector = tree; + var sections = []; + + var token; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + switch (token[0]) { + case '#': + case '^': + sections.push(token); + collector.push(token); + collector = token[4] = []; + break; + case '/': + var section = sections.pop(); + section[5] = token[2]; + collector = sections.length > 0 ? sections[sections.length - 1][4] : tree; + break; + default: + collector.push(token); + } + } + + return tree; + } + + /** + * Combines the values of consecutive text tokens in the given `tokens` array + * to a single token. + */ + function squashTokens(tokens) { + var squashedTokens = []; + + var token, lastToken; + for (var i = 0, len = tokens.length; i < len; ++i) { + token = tokens[i]; + if (token) { + if (token[0] === 'text' && lastToken && lastToken[0] === 'text') { + lastToken[1] += token[1]; + lastToken[3] = token[3]; + } else { + lastToken = token; + squashedTokens.push(token); + } + } + } + + return squashedTokens; + } + + function escapeTags(tags) { + return [ + new RegExp(escapeRegExp(tags[0]) + "\\s*"), + new RegExp("\\s*" + escapeRegExp(tags[1])) + ]; + } + + /** + * Breaks up the given `template` string into a tree of token objects. If + * `tags` is given here it must be an array with two string values: the + * opening and closing tags used in the template (e.g. ["<%", "%>"]). Of + * course, the default is to use mustaches (i.e. Mustache.tags). + */ + function parseTemplate(template, tags) { + template = template || ''; + tags = tags || mustache.tags; + + if (typeof tags === 'string') tags = tags.split(spaceRe); + if (tags.length !== 2) throw new Error('Invalid tags: ' + tags.join(', ')); + + var tagRes = escapeTags(tags); + var scanner = new Scanner(template); + + var sections = []; // Stack to hold section tokens + var tokens = []; // Buffer to hold the tokens + var spaces = []; // Indices of whitespace tokens on the current line + var hasTag = false; // Is there a {{tag}} on the current line? + var nonSpace = false; // Is there a non-space char on the current line? + + // Strips all whitespace tokens array for the current line + // if there was a {{#tag}} on it and otherwise only space. + function stripSpace() { + if (hasTag && !nonSpace) { + while (spaces.length) { + delete tokens[spaces.pop()]; + } + } else { + spaces = []; + } + + hasTag = false; + nonSpace = false; + } + + var start, type, value, chr, token; + while (!scanner.eos()) { + start = scanner.pos; + + // Match any text between tags. + value = scanner.scanUntil(tagRes[0]); + if (value) { + for (var i = 0, len = value.length; i < len; ++i) { + chr = value.charAt(i); + + if (isWhitespace(chr)) { + spaces.push(tokens.length); + } else { + nonSpace = true; + } + + tokens.push(['text', chr, start, start + 1]); + start += 1; + + // Check for whitespace on the current line. + if (chr == '\n') stripSpace(); + } + } + + // Match the opening tag. + if (!scanner.scan(tagRes[0])) break; + hasTag = true; + + // Get the tag type. + type = scanner.scan(tagRe) || 'name'; + scanner.scan(whiteRe); + + // Get the tag value. + if (type === '=') { + value = scanner.scanUntil(eqRe); + scanner.scan(eqRe); + scanner.scanUntil(tagRes[1]); + } else if (type === '{') { + value = scanner.scanUntil(new RegExp('\\s*' + escapeRegExp('}' + tags[1]))); + scanner.scan(curlyRe); + scanner.scanUntil(tagRes[1]); + type = '&'; + } else { + value = scanner.scanUntil(tagRes[1]); + } + + // Match the closing tag. + if (!scanner.scan(tagRes[1])) throw new Error('Unclosed tag at ' + scanner.pos); + + token = [type, value, start, scanner.pos]; + tokens.push(token); + + if (type === '#' || type === '^') { + sections.push(token); + } else if (type === '/') { + // Check section nesting. + if (sections.length === 0) throw new Error('Unopened section "' + value + '" at ' + start); + var openSection = sections.pop(); + if (openSection[1] !== value) throw new Error('Unclosed section "' + openSection[1] + '" at ' + start); + } else if (type === 'name' || type === '{' || type === '&') { + nonSpace = true; + } else if (type === '=') { + // Set the tags for the next time around. + tags = value.split(spaceRe); + if (tags.length !== 2) throw new Error('Invalid tags at ' + start + ': ' + tags.join(', ')); + tagRes = escapeTags(tags); + } + } + + // Make sure there are no open sections when we're done. + var openSection = sections.pop(); + if (openSection) throw new Error('Unclosed section "' + openSection[1] + '" at ' + scanner.pos); + + tokens = squashTokens(tokens); + + return nestTokens(tokens); + } + + mustache.name = "mustache.js"; + mustache.version = "0.7.2"; + mustache.tags = ["{{", "}}"]; + + mustache.Scanner = Scanner; + mustache.Context = Context; + mustache.Writer = Writer; + + mustache.parse = parseTemplate; + + // Export the escaping function so that the user may override it. + // See https://github.com/janl/mustache.js/issues/244 + mustache.escape = escapeHtml; + + // All Mustache.* functions use this writer. + var defaultWriter = new Writer(); + + /** + * Clears all cached templates and partials in the default writer. + */ + mustache.clearCache = function () { + return defaultWriter.clearCache(); + }; + + /** + * Compiles the given `template` to a reusable function using the default + * writer. + */ + mustache.compile = function (template, tags) { + return defaultWriter.compile(template, tags); + }; + + /** + * Compiles the partial with the given `name` and `template` to a reusable + * function using the default writer. + */ + mustache.compilePartial = function (name, template, tags) { + return defaultWriter.compilePartial(name, template, tags); + }; + + /** + * Compiles the given array of tokens (the output of a parse) to a reusable + * function using the default writer. + */ + mustache.compileTokens = function (tokens, template) { + return defaultWriter.compileTokens(tokens, template); + }; + + /** + * Renders the `template` with the given `view` and `partials` using the + * default writer. + */ + mustache.render = function (template, view, partials) { + return defaultWriter.render(template, view, partials); + }; + + // This is here for backwards compatibility with 0.4.x. + mustache.to_html = function (template, view, partials, send) { + var result = mustache.render(template, view, partials); + + if (typeof send === "function") { + send(result); + } else { + return result; + } + }; + +})); |