/*!
 * jQuery JavaScript Library v1.11.3
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2015-04-28T16:19Z
 */
function mergeRecursive(t,e){"use strict";for(var n in e)try{e[n].constructor===Object?t[n]=mergeRecursive(t[n],e[n]):t[n]=e[n]}catch(i){t[n]=e[n]}return t}function arrayEquals(t,e){"use strict";if(!e||!t)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]instanceof Array&&e[n]instanceof Array){if(!arrayEquals(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function md5(t){var e,n,i,r,o,s,a,l,c,h,u=function(t,e){return t<<e|t>>>32-e},d=function(t,e){var n,i,r,o,s;return r=2147483648&t,o=2147483648&e,n=1073741824&t,i=1073741824&e,s=(1073741823&t)+(1073741823&e),n&i?2147483648^s^r^o:n|i?1073741824&s?3221225472^s^r^o:1073741824^s^r^o:s^r^o},f=function(t,e,n){return t&e|~t&n},p=function(t,e,n){return t&n|e&~n},g=function(t,e,n){return t^e^n},m=function(t,e,n){return e^(t|~n)},v=function(t,e,n,i,r,o,s){return t=d(t,d(d(f(e,n,i),r),s)),d(u(t,o),e)},y=function(t,e,n,i,r,o,s){return t=d(t,d(d(p(e,n,i),r),s)),d(u(t,o),e)},w=function(t,e,n,i,r,o,s){return t=d(t,d(d(g(e,n,i),r),s)),d(u(t,o),e)},b=function(t,e,n,i,r,o,s){return t=d(t,d(d(m(e,n,i),r),s)),d(u(t,o),e)},x=function(t){for(var e,n=t.length,i=n+8,r=(i-i%64)/64,o=16*(r+1),s=new Array(o-1),a=0,l=0;n>l;)e=(l-l%4)/4,a=l%4*8,s[e]=s[e]|t.charCodeAt(l)<<a,l++;return e=(l-l%4)/4,a=l%4*8,s[e]=s[e]|128<<a,s[o-2]=n<<3,s[o-1]=n>>>29,s},C=function(t){var e,n,i="",r="";for(n=0;3>=n;n++)e=t>>>8*n&255,r="0"+e.toString(16),i+=r.substr(r.length-2,2);return i},A=[],E=7,k=12,F=17,_=22,D=5,S=9,$=14,T=20,B=4,M=11,L=16,R=23,I=6,P=10,N=15,O=21;for(t=this.utf8_encode(t),A=x(t),a=1732584193,l=4023233417,c=2562383102,h=271733878,e=A.length,n=0;e>n;n+=16)i=a,r=l,o=c,s=h,a=v(a,l,c,h,A[n+0],E,3614090360),h=v(h,a,l,c,A[n+1],k,3905402710),c=v(c,h,a,l,A[n+2],F,606105819),l=v(l,c,h,a,A[n+3],_,3250441966),a=v(a,l,c,h,A[n+4],E,4118548399),h=v(h,a,l,c,A[n+5],k,1200080426),c=v(c,h,a,l,A[n+6],F,2821735955),l=v(l,c,h,a,A[n+7],_,4249261313),a=v(a,l,c,h,A[n+8],E,1770035416),h=v(h,a,l,c,A[n+9],k,2336552879),c=v(c,h,a,l,A[n+10],F,4294925233),l=v(l,c,h,a,A[n+11],_,2304563134),a=v(a,l,c,h,A[n+12],E,1804603682),h=v(h,a,l,c,A[n+13],k,4254626195),c=v(c,h,a,l,A[n+14],F,2792965006),l=v(l,c,h,a,A[n+15],_,1236535329),a=y(a,l,c,h,A[n+1],D,4129170786),h=y(h,a,l,c,A[n+6],S,3225465664),c=y(c,h,a,l,A[n+11],$,643717713),l=y(l,c,h,a,A[n+0],T,3921069994),a=y(a,l,c,h,A[n+5],D,3593408605),h=y(h,a,l,c,A[n+10],S,38016083),c=y(c,h,a,l,A[n+15],$,3634488961),l=y(l,c,h,a,A[n+4],T,3889429448),a=y(a,l,c,h,A[n+9],D,568446438),h=y(h,a,l,c,A[n+14],S,3275163606),c=y(c,h,a,l,A[n+3],$,4107603335),l=y(l,c,h,a,A[n+8],T,1163531501),a=y(a,l,c,h,A[n+13],D,2850285829),h=y(h,a,l,c,A[n+2],S,4243563512),c=y(c,h,a,l,A[n+7],$,1735328473),l=y(l,c,h,a,A[n+12],T,2368359562),a=w(a,l,c,h,A[n+5],B,4294588738),h=w(h,a,l,c,A[n+8],M,2272392833),c=w(c,h,a,l,A[n+11],L,1839030562),l=w(l,c,h,a,A[n+14],R,4259657740),a=w(a,l,c,h,A[n+1],B,2763975236),h=w(h,a,l,c,A[n+4],M,1272893353),c=w(c,h,a,l,A[n+7],L,4139469664),l=w(l,c,h,a,A[n+10],R,3200236656),a=w(a,l,c,h,A[n+13],B,681279174),h=w(h,a,l,c,A[n+0],M,3936430074),c=w(c,h,a,l,A[n+3],L,3572445317),l=w(l,c,h,a,A[n+6],R,76029189),a=w(a,l,c,h,A[n+9],B,3654602809),h=w(h,a,l,c,A[n+12],M,3873151461),c=w(c,h,a,l,A[n+15],L,530742520),l=w(l,c,h,a,A[n+2],R,3299628645),a=b(a,l,c,h,A[n+0],I,4096336452),h=b(h,a,l,c,A[n+7],P,1126891415),c=b(c,h,a,l,A[n+14],N,2878612391),l=b(l,c,h,a,A[n+5],O,4237533241),a=b(a,l,c,h,A[n+12],I,1700485571),h=b(h,a,l,c,A[n+3],P,2399980690),c=b(c,h,a,l,A[n+10],N,4293915773),l=b(l,c,h,a,A[n+1],O,2240044497),a=b(a,l,c,h,A[n+8],I,1873313359),h=b(h,a,l,c,A[n+15],P,4264355552),c=b(c,h,a,l,A[n+6],N,2734768916),l=b(l,c,h,a,A[n+13],O,1309151649),a=b(a,l,c,h,A[n+4],I,4149444226),h=b(h,a,l,c,A[n+11],P,3174756917),c=b(c,h,a,l,A[n+2],N,718787259),l=b(l,c,h,a,A[n+9],O,3951481745),a=d(a,i),l=d(l,r),c=d(c,o),h=d(h,s);var j=C(a)+C(l)+C(c)+C(h);return j.toLowerCase()}function utf8_encode(t){if(null===t||"undefined"==typeof t)return"";var e,n,i=t+"",r="",o=0;e=n=0,o=i.length;for(var s=0;o>s;s++){var a=i.charCodeAt(s),l=null;if(128>a)n++;else if(a>127&&2048>a)l=String.fromCharCode(a>>6|192,63&a|128);else if(a&!0)l=String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128);else{if(a&!0)throw new RangeError("Unmatched trail surrogate at "+s);var c=i.charCodeAt(++s);if(c&!0)throw new RangeError("Unmatched lead surrogate at "+(s-1));a=((1023&a)<<10)+(1023&c)+65536,l=String.fromCharCode(a>>18|240,a>>12&63|128,a>>6&63|128,63&a|128)}null!==l&&(n>e&&(r+=i.slice(e,n)),r+=l,e=n=s+1)}return n>e&&(r+=i.slice(e,o)),r}!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e="length"in t&&t.length,n=rt.type(t);return"function"===n||rt.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t,e,n){if(rt.isFunction(e))return rt.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return rt.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(dt.test(e))return rt.filter(e,t,n);e=rt.filter(e,t)}return rt.grep(t,function(t){return rt.inArray(t,e)>=0!==n})}function r(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function o(t){var e=bt[t]={};return rt.each(t.match(wt)||[],function(t,n){e[n]=!0}),e}function s(){pt.addEventListener?(pt.removeEventListener("DOMContentLoaded",a,!1),t.removeEventListener("load",a,!1)):(pt.detachEvent("onreadystatechange",a),t.detachEvent("onload",a))}function a(){(pt.addEventListener||"load"===event.type||"complete"===pt.readyState)&&(s(),rt.ready())}function l(t,e,n){if(void 0===n&&1===t.nodeType){var i="data-"+e.replace(kt,"-$1").toLowerCase();if(n=t.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Et.test(n)?rt.parseJSON(n):n}catch(r){}rt.data(t,e,n)}else n=void 0}return n}function c(t){var e;for(e in t)if(("data"!==e||!rt.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function h(t,e,n,i){if(rt.acceptData(t)){var r,o,s=rt.expando,a=t.nodeType,l=a?rt.cache:t,c=a?t[s]:t[s]&&s;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof e)return c||(c=a?t[s]=V.pop()||rt.guid++:s),l[c]||(l[c]=a?{}:{toJSON:rt.noop}),("object"==typeof e||"function"==typeof e)&&(i?l[c]=rt.extend(l[c],e):l[c].data=rt.extend(l[c].data,e)),o=l[c],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[rt.camelCase(e)]=n),"string"==typeof e?(r=o[e],null==r&&(r=o[rt.camelCase(e)])):r=o,r}}function u(t,e,n){if(rt.acceptData(t)){var i,r,o=t.nodeType,s=o?rt.cache:t,a=o?t[rt.expando]:rt.expando;if(s[a]){if(e&&(i=n?s[a]:s[a].data)){rt.isArray(e)?e=e.concat(rt.map(e,rt.camelCase)):e in i?e=[e]:(e=rt.camelCase(e),e=e in i?[e]:e.split(" ")),r=e.length;for(;r--;)delete i[e[r]];if(n?!c(i):!rt.isEmptyObject(i))return}(n||(delete s[a].data,c(s[a])))&&(o?rt.cleanData([t],!0):nt.deleteExpando||s!=s.window?delete s[a]:s[a]=null)}}}function d(){return!0}function f(){return!1}function p(){try{return pt.activeElement}catch(t){}}function g(t){var e=It.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function m(t,e){var n,i,r=0,o=typeof t.getElementsByTagName!==At?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==At?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],n=t.childNodes||t;null!=(i=n[r]);r++)!e||rt.nodeName(i,e)?o.push(i):rt.merge(o,m(i,e));return void 0===e||e&&rt.nodeName(t,e)?rt.merge([t],o):o}function v(t){$t.test(t.type)&&(t.defaultChecked=t.checked)}function y(t,e){return rt.nodeName(t,"table")&&rt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function w(t){return t.type=(null!==rt.find.attr(t,"type"))+"/"+t.type,t}function b(t){var e=Gt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function x(t,e){for(var n,i=0;null!=(n=t[i]);i++)rt._data(n,"globalEval",!e||rt._data(e[i],"globalEval"))}function C(t,e){if(1===e.nodeType&&rt.hasData(t)){var n,i,r,o=rt._data(t),s=rt._data(e,o),a=o.events;if(a){delete s.handle,s.events={};for(n in a)for(i=0,r=a[n].length;r>i;i++)rt.event.add(e,n,a[n][i])}s.data&&(s.data=rt.extend({},s.data))}}function A(t,e){var n,i,r;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!nt.noCloneEvent&&e[rt.expando]){r=rt._data(e);for(i in r.events)rt.removeEvent(e,i,r.handle);e.removeAttribute(rt.expando)}"script"===n&&e.text!==t.text?(w(e).text=t.text,b(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),nt.html5Clone&&t.innerHTML&&!rt.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&$t.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}}function E(e,n){var i,r=rt(n.createElement(e)).appendTo(n.body),o=t.getDefaultComputedStyle&&(i=t.getDefaultComputedStyle(r[0]))?i.display:rt.css(r[0],"display");return r.detach(),o}function k(t){var e=pt,n=Jt[t];return n||(n=E(t,e),"none"!==n&&n||(Qt=(Qt||rt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=(Qt[0].contentWindow||Qt[0].contentDocument).document,e.write(),e.close(),n=E(t,e),Qt.detach()),Jt[t]=n),n}function F(t,e){return{get:function(){var n=t();if(null!=n)return n?void delete this.get:(this.get=e).apply(this,arguments)}}}function _(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),i=e,r=de.length;r--;)if(e=de[r]+n,e in t)return e;return i}function D(t,e){for(var n,i,r,o=[],s=0,a=t.length;a>s;s++)i=t[s],i.style&&(o[s]=rt._data(i,"olddisplay"),n=i.style.display,e?(o[s]||"none"!==n||(i.style.display=""),""===i.style.display&&Dt(i)&&(o[s]=rt._data(i,"olddisplay",k(i.nodeName)))):(r=Dt(i),(n&&"none"!==n||!r)&&rt._data(i,"olddisplay",r?n:rt.css(i,"display"))));for(s=0;a>s;s++)i=t[s],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?o[s]||"":"none"));return t}function S(t,e,n){var i=le.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):e}function $(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=rt.css(t,n+_t[o],!0,r)),i?("content"===n&&(s-=rt.css(t,"padding"+_t[o],!0,r)),"margin"!==n&&(s-=rt.css(t,"border"+_t[o]+"Width",!0,r))):(s+=rt.css(t,"padding"+_t[o],!0,r),"padding"!==n&&(s+=rt.css(t,"border"+_t[o]+"Width",!0,r)));return s}function T(t,e,n){var i=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=te(t),s=nt.boxSizing&&"border-box"===rt.css(t,"boxSizing",!1,o);if(0>=r||null==r){if(r=ee(t,e,o),(0>r||null==r)&&(r=t.style[e]),ie.test(r))return r;i=s&&(nt.boxSizingReliable()||r===t.style[e]),r=parseFloat(r)||0}return r+$(t,e,n||(s?"border":"content"),i,o)+"px"}function B(t,e,n,i,r){return new B.prototype.init(t,e,n,i,r)}function M(){return setTimeout(function(){fe=void 0}),fe=rt.now()}function L(t,e){var n,i={height:t},r=0;for(e=e?1:0;4>r;r+=2-e)n=_t[r],i["margin"+n]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function R(t,e,n){for(var i,r=(we[e]||[]).concat(we["*"]),o=0,s=r.length;s>o;o++)if(i=r[o].call(n,e,t))return i}function I(t,e,n){var i,r,o,s,a,l,c,h,u=this,d={},f=t.style,p=t.nodeType&&Dt(t),g=rt._data(t,"fxshow");n.queue||(a=rt._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,u.always(function(){u.always(function(){a.unqueued--,rt.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],c=rt.css(t,"display"),h="none"===c?rt._data(t,"olddisplay")||k(t.nodeName):c,"inline"===h&&"none"===rt.css(t,"float")&&(nt.inlineBlockNeedsLayout&&"inline"!==k(t.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",nt.shrinkWrapBlocks()||u.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in e)if(r=e[i],ge.exec(r)){if(delete e[i],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;p=!0}d[i]=g&&g[i]||rt.style(t,i)}else c=void 0;if(rt.isEmptyObject(d))"inline"===("none"===c?k(t.nodeName):c)&&(f.display=c);else{g?"hidden"in g&&(p=g.hidden):g=rt._data(t,"fxshow",{}),o&&(g.hidden=!p),p?rt(t).show():u.done(function(){rt(t).hide()}),u.done(function(){var e;rt._removeData(t,"fxshow");for(e in d)rt.style(t,e,d[e])});for(i in d)s=R(p?g[i]:0,i,u),i in g||(g[i]=s.start,p&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}}function P(t,e){var n,i,r,o,s;for(n in t)if(i=rt.camelCase(n),r=e[i],o=t[n],rt.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),s=rt.cssHooks[i],s&&"expand"in s){o=s.expand(o),delete t[i];for(n in o)n in t||(t[n]=o[n],e[n]=r)}else e[i]=r}function N(t,e,n){var i,r,o=0,s=ye.length,a=rt.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=fe||M(),n=Math.max(0,c.startTime+c.duration-e),i=n/c.duration||0,o=1-i,s=0,l=c.tweens.length;l>s;s++)c.tweens[s].run(o);return a.notifyWith(t,[c,o,n]),1>o&&l?n:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:rt.extend({},e),opts:rt.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:fe||M(),duration:n.duration,tweens:[],createTween:function(e,n){var i=rt.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return e?a.resolveWith(t,[c,e]):a.rejectWith(t,[c,e]),this}}),h=c.props;for(P(h,c.opts.specialEasing);s>o;o++)if(i=ye[o].call(c,t,h,c.opts))return i;return rt.map(h,R,c),rt.isFunction(c.opts.start)&&c.opts.start.call(t,c),rt.fx.timer(rt.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function O(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(wt)||[];if(rt.isFunction(n))for(;i=o[r++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function j(t,e,n,i){function r(a){var l;return o[a]=!0,rt.each(t[a]||[],function(t,a){var c=a(e,n,i);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}var o={},s=t===We;return r(e.dataTypes[0])||!o["*"]&&r("*")}function z(t,e){var n,i,r=rt.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&rt.extend(!0,t,n),t}function H(t,e,n){for(var i,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(s in a)if(a[s]&&a[s].test(r)){l.unshift(s);break}if(l[0]in n)o=l[0];else{for(s in n){if(!l[0]||t.converters[s+" "+l[0]]){o=s;break}i||(i=s)}o=o||i}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function W(t,e,n,i){var r,o,s,a,l,c={},h=t.dataTypes.slice();if(h[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(o=h.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=h.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=c[l+" "+o]||c["* "+o],!s)for(r in c)if(a=r.split(" "),a[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){s===!0?s=c[r]:c[r]!==!0&&(o=a[0],h.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(u){return{state:"parsererror",error:s?u:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function U(t,e,n,i){var r;if(rt.isArray(e))rt.each(e,function(e,r){n||Ge.test(t)?i(t,r):U(t+"["+("object"==typeof r?e:"")+"]",r,n,i)});else if(n||"object"!==rt.type(e))i(t,e);else for(r in e)U(t+"["+r+"]",e[r],n,i)}function q(){try{return new t.XMLHttpRequest}catch(e){}}function Y(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function G(t){return rt.isWindow(t)?t:9===t.nodeType?t.defaultView||t.parentWindow:!1}var V=[],K=V.slice,X=V.concat,Z=V.push,Q=V.indexOf,J={},tt=J.toString,et=J.hasOwnProperty,nt={},it="1.11.3",rt=function(t,e){return new rt.fn.init(t,e)},ot=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,st=/^-ms-/,at=/-([\da-z])/gi,lt=function(t,e){return e.toUpperCase()};rt.fn=rt.prototype={jquery:it,constructor:rt,selector:"",length:0,toArray:function(){return K.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:K.call(this)},pushStack:function(t){var e=rt.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return rt.each(this,t,e)},map:function(t){return this.pushStack(rt.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(K.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:Z,sort:V.sort,splice:V.splice},rt.extend=rt.fn.extend=function(){var t,e,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||rt.isFunction(s)||(s={}),a===l&&(s=this,a--);l>a;a++)if(null!=(r=arguments[a]))for(i in r)t=s[i],n=r[i],s!==n&&(c&&n&&(rt.isPlainObject(n)||(e=rt.isArray(n)))?(e?(e=!1,o=t&&rt.isArray(t)?t:[]):o=t&&rt.isPlainObject(t)?t:{},s[i]=rt.extend(c,o,n)):void 0!==n&&(s[i]=n));return s},rt.extend({expando:"jQuery"+(it+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===rt.type(t)},isArray:Array.isArray||function(t){return"array"===rt.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){return!rt.isArray(t)&&t-parseFloat(t)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==rt.type(t)||t.nodeType||rt.isWindow(t))return!1;try{if(t.constructor&&!et.call(t,"constructor")&&!et.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(nt.ownLast)for(e in t)return et.call(t,e);for(e in t);return void 0===e||et.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?J[tt.call(t)]||"object":typeof t},globalEval:function(e){e&&rt.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(st,"ms-").replace(at,lt)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,i){var r,o=0,s=t.length,a=n(t);if(i){if(a)for(;s>o&&(r=e.apply(t[o],i),r!==!1);o++);else for(o in t)if(r=e.apply(t[o],i),r===!1)break}else if(a)for(;s>o&&(r=e.call(t[o],o,t[o]),r!==!1);o++);else for(o in t)if(r=e.call(t[o],o,t[o]),r===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(ot,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?rt.merge(i,"string"==typeof t?[t]:t):Z.call(i,t)),i},inArray:function(t,e,n){var i;if(e){if(Q)return Q.call(e,t,n);for(i=e.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in e&&e[n]===t)return n}return-1},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;n>i;)t[r++]=e[i++];if(n!==n)for(;void 0!==e[i];)t[r++]=e[i++];return t.length=r,t},grep:function(t,e,n){for(var i,r=[],o=0,s=t.length,a=!n;s>o;o++)i=!e(t[o],o),i!==a&&r.push(t[o]);return r},map:function(t,e,i){var r,o=0,s=t.length,a=n(t),l=[];if(a)for(;s>o;o++)r=e(t[o],o,i),null!=r&&l.push(r);else for(o in t)r=e(t[o],o,i),null!=r&&l.push(r);return X.apply([],l)},guid:1,proxy:function(t,e){var n,i,r;return"string"==typeof e&&(r=t[e],e=t,t=r),rt.isFunction(t)?(n=K.call(arguments,2),i=function(){return t.apply(e||this,n.concat(K.call(arguments)))},i.guid=t.guid=t.guid||rt.guid++,i):void 0},now:function(){return+new Date},support:nt}),rt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){J["[object "+e+"]"]=e.toLowerCase()});var ct=/*!
 * Sizzle CSS Selector Engine v2.2.0-pre
 * http://sizzlejs.com/
 *
 * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2014-12-16
 */
function(t){function e(t,e,n,i){var r,o,s,a,l,c,u,f,p,g;if((e?e.ownerDocument||e:j)!==B&&T(e),e=e||B,n=n||[],a=e.nodeType,"string"!=typeof t||!t||1!==a&&9!==a&&11!==a)return n;if(!i&&L){if(11!==a&&(r=yt.exec(t)))if(s=r[1]){if(9===a){if(o=e.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(s))&&N(e,o)&&o.id===s)return n.push(o),n}else{if(r[2])return Q.apply(n,e.getElementsByTagName(t)),n;if((s=r[3])&&x.getElementsByClassName)return Q.apply(n,e.getElementsByClassName(s)),n}if(x.qsa&&(!R||!R.test(t))){if(f=u=O,p=e,g=1!==a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(c=k(t),(u=e.getAttribute("id"))?f=u.replace(bt,"\\$&"):e.setAttribute("id",f),f="[id='"+f+"'] ",l=c.length;l--;)c[l]=f+d(c[l]);p=wt.test(t)&&h(e.parentNode)||e,g=c.join(",")}if(g)try{return Q.apply(n,p.querySelectorAll(g)),n}catch(m){}finally{u||e.removeAttribute("id")}}}return _(t.replace(lt,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>C.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[O]=!0,t}function r(t){var e=B.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),i=t.length;i--;)C.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||G)-(~t.sourceIndex||G);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function c(t){return i(function(e){return e=+e,i(function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function h(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function u(){}function d(t){for(var e=0,n=t.length,i="";n>e;e++)i+=t[e].value;return i}function f(t,e,n){var i=e.dir,r=n&&"parentNode"===i,o=H++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,o)}:function(e,n,s){var a,l,c=[z,o];if(s){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,s))return!0}else for(;e=e[i];)if(1===e.nodeType||r){if(l=e[O]||(e[O]={}),(a=l[i])&&a[0]===z&&a[1]===o)return c[2]=a[2];if(l[i]=c,c[2]=t(e,n,s))return!0}}}function p(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function g(t,n,i){for(var r=0,o=n.length;o>r;r++)e(t,n[r],i);return i}function m(t,e,n,i,r){for(var o,s=[],a=0,l=t.length,c=null!=e;l>a;a++)(o=t[a])&&(!n||n(o,i,r))&&(s.push(o),c&&e.push(a));return s}function v(t,e,n,r,o,s){return r&&!r[O]&&(r=v(r)),o&&!o[O]&&(o=v(o,s)),i(function(i,s,a,l){var c,h,u,d=[],f=[],p=s.length,v=i||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!i&&e?v:m(v,d,t,a,l),w=n?o||(i?t:p||r)?[]:s:y;if(n&&n(y,w,a,l),r)for(c=m(w,f),r(c,[],a,l),h=c.length;h--;)(u=c[h])&&(w[f[h]]=!(y[f[h]]=u));if(i){if(o||t){if(o){for(c=[],h=w.length;h--;)(u=w[h])&&c.push(y[h]=u);o(null,w=[],c,l)}for(h=w.length;h--;)(u=w[h])&&(c=o?tt(i,u):d[h])>-1&&(i[c]=!(s[c]=u))}}else w=m(w===s?w.splice(p,w.length):w),o?o(null,s,w,l):Q.apply(s,w)})}function y(t){for(var e,n,i,r=t.length,o=C.relative[t[0].type],s=o||C.relative[" "],a=o?1:0,l=f(function(t){return t===e},s,!0),c=f(function(t){return tt(e,t)>-1},s,!0),h=[function(t,n,i){var r=!o&&(i||n!==D)||((e=n).nodeType?l(t,n,i):c(t,n,i));return e=null,r}];r>a;a++)if(n=C.relative[t[a].type])h=[f(p(h),n)];else{if(n=C.filter[t[a].type].apply(null,t[a].matches),n[O]){for(i=++a;r>i&&!C.relative[t[i].type];i++);return v(a>1&&p(h),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(lt,"$1"),n,i>a&&y(t.slice(a,i)),r>i&&y(t=t.slice(i)),r>i&&d(t))}h.push(n)}return p(h)}function w(t,n){var r=n.length>0,o=t.length>0,s=function(i,s,a,l,c){var h,u,d,f=0,p="0",g=i&&[],v=[],y=D,w=i||o&&C.find.TAG("*",c),b=z+=null==y?1:Math.random()||.1,x=w.length;for(c&&(D=s!==B&&s);p!==x&&null!=(h=w[p]);p++){if(o&&h){for(u=0;d=t[u++];)if(d(h,s,a)){l.push(h);break}c&&(z=b)}r&&((h=!d&&h)&&f--,i&&g.push(h))}if(f+=p,r&&p!==f){for(u=0;d=n[u++];)d(g,v,s,a);if(i){if(f>0)for(;p--;)g[p]||v[p]||(v[p]=X.call(l));v=m(v)}Q.apply(l,v),c&&!i&&v.length>0&&f+n.length>1&&e.uniqueSort(l)}return c&&(z=b,D=y),g};return r?i(s):s}var b,x,C,A,E,k,F,_,D,S,$,T,B,M,L,R,I,P,N,O="sizzle"+1*new Date,j=t.document,z=0,H=0,W=n(),U=n(),q=n(),Y=function(t,e){return t===e&&($=!0),0},G=1<<31,V={}.hasOwnProperty,K=[],X=K.pop,Z=K.push,Q=K.push,J=K.slice,tt=function(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",rt=it.replace("w","w#"),ot="\\["+nt+"*("+it+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rt+"))|)"+nt+"*\\]",st=":("+it+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",at=new RegExp(nt+"+","g"),lt=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ct=new RegExp("^"+nt+"*,"+nt+"*"),ht=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ut=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),dt=new RegExp(st),ft=new RegExp("^"+rt+"$"),pt={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it.replace("w","w*")+")"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},gt=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wt=/[+~]/,bt=/'|\\/g,xt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),Ct=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},At=function(){T()};try{Q.apply(K=J.call(j.childNodes),j.childNodes),K[j.childNodes.length].nodeType}catch(Et){Q={apply:K.length?function(t,e){Z.apply(t,J.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}x=e.support={},E=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},T=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:j;return i!==B&&9===i.nodeType&&i.documentElement?(B=i,M=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",At,!1):n.attachEvent&&n.attachEvent("onunload",At)),L=!E(i),x.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=r(function(t){return t.appendChild(i.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=vt.test(i.getElementsByClassName),x.getById=r(function(t){return M.appendChild(t).id=O,!i.getElementsByName||!i.getElementsByName(O).length}),x.getById?(C.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&L){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(t){var e=t.replace(xt,Ct);return function(t){return t.getAttribute("id")===e}}):(delete C.find.ID,C.filter.ID=function(t){var e=t.replace(xt,Ct);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),C.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},C.find.CLASS=x.getElementsByClassName&&function(t,e){return L?e.getElementsByClassName(t):void 0},I=[],R=[],(x.qsa=vt.test(i.querySelectorAll))&&(r(function(t){M.appendChild(t).innerHTML="<a id='"+O+"'></a><select id='"+O+"-\f]' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||R.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+O+"-]").length||R.push("~="),t.querySelectorAll(":checked").length||R.push(":checked"),t.querySelectorAll("a#"+O+"+*").length||R.push(".#.+[+~]")}),r(function(t){var e=i.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&R.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),R.push(",.*:")})),(x.matchesSelector=vt.test(P=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&r(function(t){x.disconnectedMatch=P.call(t,"div"),P.call(t,"[s!='']:x"),I.push("!=",st)}),R=R.length&&new RegExp(R.join("|")),I=I.length&&new RegExp(I.join("|")),e=vt.test(M.compareDocumentPosition),N=e||vt.test(M.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Y=e?function(t,e){if(t===e)return $=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!x.sortDetached&&e.compareDocumentPosition(t)===n?t===i||t.ownerDocument===j&&N(j,t)?-1:e===i||e.ownerDocument===j&&N(j,e)?1:S?tt(S,t)-tt(S,e):0:4&n?-1:1)}:function(t,e){if(t===e)return $=!0,0;var n,r=0,o=t.parentNode,a=e.parentNode,l=[t],c=[e];if(!o||!a)return t===i?-1:e===i?1:o?-1:a?1:S?tt(S,t)-tt(S,e):0;if(o===a)return s(t,e);for(n=t;n=n.parentNode;)l.unshift(n);for(n=e;n=n.parentNode;)c.unshift(n);for(;l[r]===c[r];)r++;return r?s(l[r],c[r]):l[r]===j?-1:c[r]===j?1:0},i):B},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==B&&T(t),n=n.replace(ut,"='$1']"),x.matchesSelector&&L&&(!I||!I.test(n))&&(!R||!R.test(n)))try{var i=P.call(t,n);if(i||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(r){}return e(n,B,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==B&&T(t),N(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==B&&T(t);var n=C.attrHandle[e.toLowerCase()],i=n&&V.call(C.attrHandle,e.toLowerCase())?n(t,e,!L):void 0;return void 0!==i?i:x.attributes||!L?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if($=!x.detectDuplicates,S=!x.sortStable&&t.slice(0),t.sort(Y),$){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return S=null,t},A=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=A(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=A(e);return n},C=e.selectors={cacheLength:50,createPseudo:i,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(xt,Ct),t[3]=(t[3]||t[4]||t[5]||"").replace(xt,Ct),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&dt.test(n)&&(e=k(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(xt,Ct).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=W[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&W(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(at," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var c,h,u,d,f,p,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a;if(m){if(o){for(;g;){for(u=e;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(h=m[O]||(m[O]={}),c=h[t]||[],f=c[0]===z&&c[1],d=c[0]===z&&c[2],u=f&&m.childNodes[f];u=++f&&u&&u[g]||(d=f=0)||p.pop();)if(1===u.nodeType&&++d&&u===e){h[t]=[z,f,d];break}}else if(y&&(c=(e[O]||(e[O]={}))[t])&&c[0]===z)d=c[1];else for(;(u=++f&&u&&u[g]||(d=f=0)||p.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++d||(y&&((u[O]||(u[O]={}))[t]=[z,d]),u!==e)););return d-=r,d===i||d%i===0&&d/i>=0}}},PSEUDO:function(t,n){var r,o=C.pseudos[t]||C.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[O]?o(n):o.length>1?(r=[t,t,"",n],C.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),s=r.length;s--;)i=tt(t,r[s]),t[i]=!(e[i]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=F(t.replace(lt,"$1"));return r[O]?i(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(xt,Ct),function(e){return(e.textContent||e.innerText||A(e)).indexOf(t)>-1}}),lang:i(function(t){return ft.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(xt,Ct).toLowerCase(),function(e){var n;do if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===M},focus:function(t){return t===B.activeElement&&(!B.hasFocus||B.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!C.pseudos.empty(t)},header:function(t){return mt.test(t.nodeName)},input:function(t){return gt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,n){return[0>n?n+e:n]}),even:c(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:c(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:c(function(t,e,n){for(var i=0>n?n+e:n;--i>=0;)t.push(i);return t}),gt:c(function(t,e,n){for(var i=0>n?n+e:n;++i<e;)t.push(i);return t})}},C.pseudos.nth=C.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[b]=a(b);for(b in{submit:!0,reset:!0})C.pseudos[b]=l(b);return u.prototype=C.filters=C.pseudos,C.setFilters=new u,k=e.tokenize=function(t,n){var i,r,o,s,a,l,c,h=U[t+" "];if(h)return n?0:h.slice(0);for(a=t,l=[],c=C.preFilter;a;){(!i||(r=ct.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),i=!1,(r=ht.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(lt," ")}),a=a.slice(i.length));for(s in C.filter)!(r=pt[s].exec(a))||c[s]&&!(r=c[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return n?a.length:a?e.error(t):U(t,l).slice(0)},F=e.compile=function(t,e){var n,i=[],r=[],o=q[t+" "];if(!o){for(e||(e=k(t)),n=e.length;n--;)o=y(e[n]),o[O]?i.push(o):r.push(o);o=q(t,w(r,i)),o.selector=t}return o},_=e.select=function(t,e,n,i){var r,o,s,a,l,c="function"==typeof t&&t,u=!i&&k(t=c.selector||t);if(n=n||[],1===u.length){if(o=u[0]=u[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&x.getById&&9===e.nodeType&&L&&C.relative[o[1].type]){if(e=(C.find.ID(s.matches[0].replace(xt,Ct),e)||[])[0],!e)return n;c&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=pt.needsContext.test(t)?0:o.length;r--&&(s=o[r],!C.relative[a=s.type]);)if((l=C.find[a])&&(i=l(s.matches[0].replace(xt,Ct),wt.test(o[0].type)&&h(e.parentNode)||e))){if(o.splice(r,1),t=i.length&&d(o),!t)return Q.apply(n,i),n;break}}return(c||F(t,u))(i,e,!L,n,wt.test(t)&&h(e.parentNode)||e),n},x.sortStable=O.split("").sort(Y).join("")===O,x.detectDuplicates=!!$,T(),x.sortDetached=r(function(t){return 1&t.compareDocumentPosition(B.createElement("div"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){return n?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){return n||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,n){var i;return n?void 0:t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);rt.find=ct,rt.expr=ct.selectors,rt.expr[":"]=rt.expr.pseudos,rt.unique=ct.uniqueSort,rt.text=ct.getText,rt.isXMLDoc=ct.isXML,rt.contains=ct.contains;var ht=rt.expr.match.needsContext,ut=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^.[^:#\[\.,]*$/;rt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?rt.find.matchesSelector(i,t)?[i]:[]:rt.find.matches(t,rt.grep(e,function(t){return 1===t.nodeType}))},rt.fn.extend({find:function(t){var e,n=[],i=this,r=i.length;if("string"!=typeof t)return this.pushStack(rt(t).filter(function(){for(e=0;r>e;e++)if(rt.contains(i[e],this))return!0}));for(e=0;r>e;e++)rt.find(t,i[e],n);return n=this.pushStack(r>1?rt.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&ht.test(t)?rt(t):t||[],!1).length}});var ft,pt=t.document,gt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,mt=rt.fn.init=function(t,e){var n,i;if(!t)return this;if("string"==typeof t){if(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:gt.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||ft).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof rt?e[0]:e,rt.merge(this,rt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:pt,!0)),ut.test(n[1])&&rt.isPlainObject(e))for(n in e)rt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if(i=pt.getElementById(n[2]),i&&i.parentNode){if(i.id!==n[2])return ft.find(t);this.length=1,this[0]=i}return this.context=pt,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):rt.isFunction(t)?"undefined"!=typeof ft.ready?ft.ready(t):t(rt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),rt.makeArray(t,this))};mt.prototype=rt.fn,ft=rt(pt);var vt=/^(?:parents|prev(?:Until|All))/,yt={children:!0,contents:!0,next:!0,prev:!0};rt.extend({dir:function(t,e,n){for(var i=[],r=t[e];r&&9!==r.nodeType&&(void 0===n||1!==r.nodeType||!rt(r).is(n));)1===r.nodeType&&i.push(r),r=r[e];return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),rt.fn.extend({has:function(t){var e,n=rt(t,this),i=n.length;return this.filter(function(){for(e=0;i>e;e++)if(rt.contains(this,n[e]))return!0})},closest:function(t,e){for(var n,i=0,r=this.length,o=[],s=ht.test(t)||"string"!=typeof t?rt(t,e||this.context):0;r>i;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&rt.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?rt.unique(o):o)},index:function(t){return t?"string"==typeof t?rt.inArray(this[0],rt(t)):rt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(rt.unique(rt.merge(this.get(),rt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),rt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return rt.dir(t,"parentNode")},parentsUntil:function(t,e,n){return rt.dir(t,"parentNode",n)},next:function(t){return r(t,"nextSibling")},prev:function(t){return r(t,"previousSibling")},nextAll:function(t){return rt.dir(t,"nextSibling")},prevAll:function(t){return rt.dir(t,"previousSibling")},nextUntil:function(t,e,n){return rt.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return rt.dir(t,"previousSibling",n)},siblings:function(t){return rt.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return rt.sibling(t.firstChild)},contents:function(t){return rt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:rt.merge([],t.childNodes)}},function(t,e){rt.fn[t]=function(n,i){var r=rt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=rt.filter(i,r)),this.length>1&&(yt[t]||(r=rt.unique(r)),vt.test(t)&&(r=r.reverse())),this.pushStack(r)}});var wt=/\S+/g,bt={};rt.Callbacks=function(t){t="string"==typeof t?bt[t]||o(t):rt.extend({},t);var e,n,i,r,s,a,l=[],c=!t.once&&[],h=function(o){for(n=t.memory&&o,i=!0,s=a||0,a=0,r=l.length,e=!0;l&&r>s;s++)if(l[s].apply(o[0],o[1])===!1&&t.stopOnFalse){n=!1;break}e=!1,l&&(c?c.length&&h(c.shift()):n?l=[]:u.disable())},u={add:function(){if(l){var i=l.length;!function o(e){rt.each(e,function(e,n){var i=rt.type(n);"function"===i?t.unique&&u.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),e?r=l.length:n&&(a=i,h(n))}return this},remove:function(){return l&&rt.each(arguments,function(t,n){for(var i;(i=rt.inArray(n,l,i))>-1;)l.splice(i,1),e&&(r>=i&&r--,s>=i&&s--)}),this},has:function(t){return t?rt.inArray(t,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=c=n=void 0,this},disabled:function(){return!l},lock:function(){return c=void 0,n||u.disable(),this},locked:function(){return!c},fireWith:function(t,n){return!l||i&&!c||(n=n||[],n=[t,n.slice?n.slice():n],e?c.push(n):h(n)),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},rt.extend({Deferred:function(t){var e=[["resolve","done",rt.Callbacks("once memory"),"resolved"],["reject","fail",rt.Callbacks("once memory"),"rejected"],["notify","progress",rt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return rt.Deferred(function(n){rt.each(e,function(e,o){var s=rt.isFunction(t[e])&&t[e];r[o[1]](function(){var t=s&&s.apply(this,arguments);t&&rt.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?rt.extend(t,i):i}},r={};return i.pipe=i.then,rt.each(e,function(t,o){var s=o[2],a=o[3];i[o[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=s.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(t){var e,n,i,r=0,o=K.call(arguments),s=o.length,a=1!==s||t&&rt.isFunction(t.promise)?s:0,l=1===a?t:rt.Deferred(),c=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?K.call(arguments):r,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(e=new Array(s),n=new Array(s),i=new Array(s);s>r;r++)o[r]&&rt.isFunction(o[r].promise)?o[r].promise().done(c(r,i,o)).fail(l.reject).progress(c(r,n,e)):--a;return a||l.resolveWith(i,o),l.promise()}});var xt;rt.fn.ready=function(t){return rt.ready.promise().done(t),this},rt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?rt.readyWait++:rt.ready(!0)},ready:function(t){if(t===!0?!--rt.readyWait:!rt.isReady){if(!pt.body)return setTimeout(rt.ready);rt.isReady=!0,t!==!0&&--rt.readyWait>0||(xt.resolveWith(pt,[rt]),rt.fn.triggerHandler&&(rt(pt).triggerHandler("ready"),rt(pt).off("ready")))}}}),rt.ready.promise=function(e){if(!xt)if(xt=rt.Deferred(),"complete"===pt.readyState)setTimeout(rt.ready);else if(pt.addEventListener)pt.addEventListener("DOMContentLoaded",a,!1),t.addEventListener("load",a,!1);else{pt.attachEvent("onreadystatechange",a),t.attachEvent("onload",a);var n=!1;try{n=null==t.frameElement&&pt.documentElement}catch(i){}n&&n.doScroll&&!function r(){if(!rt.isReady){try{n.doScroll("left")}catch(t){return setTimeout(r,50)}s(),rt.ready()}}()}return xt.promise(e)};var Ct,At="undefined";for(Ct in rt(nt))break;nt.ownLast="0"!==Ct,nt.inlineBlockNeedsLayout=!1,rt(function(){var t,e,n,i;n=pt.getElementsByTagName("body")[0],n&&n.style&&(e=pt.createElement("div"),i=pt.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),typeof e.style.zoom!==At&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",nt.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(i))}),function(){var t=pt.createElement("div");if(null==nt.deleteExpando){nt.deleteExpando=!0;try{delete t.test}catch(e){nt.deleteExpando=!1}}t=null}(),rt.acceptData=function(t){var e=rt.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return 1!==n&&9!==n?!1:!e||e!==!0&&t.getAttribute("classid")===e};var Et=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,kt=/([A-Z])/g;rt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?rt.cache[t[rt.expando]]:t[rt.expando],!!t&&!c(t)},data:function(t,e,n){return h(t,e,n)},removeData:function(t,e){return u(t,e)},_data:function(t,e,n){return h(t,e,n,!0)},_removeData:function(t,e){return u(t,e,!0)}}),rt.fn.extend({data:function(t,e){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=rt.data(o),1===o.nodeType&&!rt._data(o,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=rt.camelCase(i.slice(5)),l(o,i,r[i])));rt._data(o,"parsedAttrs",!0)}return r}return"object"==typeof t?this.each(function(){rt.data(this,t)}):arguments.length>1?this.each(function(){rt.data(this,t,e)}):o?l(o,t,rt.data(o,t)):void 0},removeData:function(t){return this.each(function(){rt.removeData(this,t)})}}),rt.extend({queue:function(t,e,n){var i;return t?(e=(e||"fx")+"queue",i=rt._data(t,e),n&&(!i||rt.isArray(n)?i=rt._data(t,e,rt.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=rt.queue(t,e),i=n.length,r=n.shift(),o=rt._queueHooks(t,e),s=function(){rt.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return rt._data(t,n)||rt._data(t,n,{empty:rt.Callbacks("once memory").add(function(){rt._removeData(t,e+"queue"),rt._removeData(t,n)})})}}),rt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?rt.queue(this[0],t):void 0===e?this:this.each(function(){var n=rt.queue(this,t,e);rt._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&rt.dequeue(this,t)})},dequeue:function(t){return this.each(function(){rt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=rt.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)n=rt._data(o[s],t+"queueHooks"),n&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(e)}});var Ft=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_t=["Top","Right","Bottom","Left"],Dt=function(t,e){return t=e||t,"none"===rt.css(t,"display")||!rt.contains(t.ownerDocument,t)},St=rt.access=function(t,e,n,i,r,o,s){var a=0,l=t.length,c=null==n;if("object"===rt.type(n)){r=!0;for(a in n)rt.access(t,e,a,n[a],!0,o,s)}else if(void 0!==i&&(r=!0,rt.isFunction(i)||(s=!0),c&&(s?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(rt(t),n)})),e))for(;l>a;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return r?t:c?e.call(t):l?e(t[0],n):o},$t=/^(?:checkbox|radio)$/i;!function(){var t=pt.createElement("input"),e=pt.createElement("div"),n=pt.createDocumentFragment();if(e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",nt.leadingWhitespace=3===e.firstChild.nodeType,nt.tbody=!e.getElementsByTagName("tbody").length,nt.htmlSerialize=!!e.getElementsByTagName("link").length,nt.html5Clone="<:nav></:nav>"!==pt.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,n.appendChild(t),nt.appendChecked=t.checked,e.innerHTML="<textarea>x</textarea>",nt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,n.appendChild(e),e.innerHTML="<input type='radio' checked='checked' name='t'/>",nt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,nt.noCloneEvent=!0,e.attachEvent&&(e.attachEvent("onclick",function(){nt.noCloneEvent=!1}),e.cloneNode(!0).click()),null==nt.deleteExpando){nt.deleteExpando=!0;try{delete e.test}catch(i){nt.deleteExpando=!1}}}(),function(){var e,n,i=pt.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})n="on"+e,(nt[e+"Bubbles"]=n in t)||(i.setAttribute(n,"t"),nt[e+"Bubbles"]=i.attributes[n].expando===!1);i=null}();var Tt=/^(?:input|select|textarea)$/i,Bt=/^key/,Mt=/^(?:mouse|pointer|contextmenu)|click/,Lt=/^(?:focusinfocus|focusoutblur)$/,Rt=/^([^.]*)(?:\.(.+)|)$/;rt.event={global:{},add:function(t,e,n,i,r){var o,s,a,l,c,h,u,d,f,p,g,m=rt._data(t);if(m){for(n.handler&&(l=n,n=l.handler,r=l.selector),n.guid||(n.guid=rt.guid++),(s=m.events)||(s=m.events={}),(h=m.handle)||(h=m.handle=function(t){return typeof rt===At||t&&rt.event.triggered===t.type?void 0:rt.event.dispatch.apply(h.elem,arguments)},h.elem=t),e=(e||"").match(wt)||[""],a=e.length;a--;)o=Rt.exec(e[a])||[],f=g=o[1],p=(o[2]||"").split(".").sort(),f&&(c=rt.event.special[f]||{},f=(r?c.delegateType:c.bindType)||f,c=rt.event.special[f]||{},u=rt.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&rt.expr.match.needsContext.test(r),namespace:p.join(".")},l),(d=s[f])||(d=s[f]=[],d.delegateCount=0,c.setup&&c.setup.call(t,i,p,h)!==!1||(t.addEventListener?t.addEventListener(f,h,!1):t.attachEvent&&t.attachEvent("on"+f,h))),c.add&&(c.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,u):d.push(u),rt.event.global[f]=!0);t=null}},remove:function(t,e,n,i,r){var o,s,a,l,c,h,u,d,f,p,g,m=rt.hasData(t)&&rt._data(t);if(m&&(h=m.events)){for(e=(e||"").match(wt)||[""],c=e.length;c--;)if(a=Rt.exec(e[c])||[],f=g=a[1],p=(a[2]||"").split(".").sort(),f){for(u=rt.event.special[f]||{},f=(i?u.delegateType:u.bindType)||f,d=h[f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=d.length;o--;)s=d[o],!r&&g!==s.origType||n&&n.guid!==s.guid||a&&!a.test(s.namespace)||i&&i!==s.selector&&("**"!==i||!s.selector)||(d.splice(o,1),s.selector&&d.delegateCount--,u.remove&&u.remove.call(t,s));l&&!d.length&&(u.teardown&&u.teardown.call(t,p,m.handle)!==!1||rt.removeEvent(t,f,m.handle),delete h[f])}else for(f in h)rt.event.remove(t,f+e[c],n,i,!0);rt.isEmptyObject(h)&&(delete m.handle,rt._removeData(t,"events"))}},trigger:function(e,n,i,r){var o,s,a,l,c,h,u,d=[i||pt],f=et.call(e,"type")?e.type:e,p=et.call(e,"namespace")?e.namespace.split("."):[];if(a=h=i=i||pt,3!==i.nodeType&&8!==i.nodeType&&!Lt.test(f+rt.event.triggered)&&(f.indexOf(".")>=0&&(p=f.split("."),f=p.shift(),p.sort()),s=f.indexOf(":")<0&&"on"+f,e=e[rt.expando]?e:new rt.Event(f,"object"==typeof e&&e),
e.isTrigger=r?2:3,e.namespace=p.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:rt.makeArray(n,[e]),c=rt.event.special[f]||{},r||!c.trigger||c.trigger.apply(i,n)!==!1)){if(!r&&!c.noBubble&&!rt.isWindow(i)){for(l=c.delegateType||f,Lt.test(l+f)||(a=a.parentNode);a;a=a.parentNode)d.push(a),h=a;h===(i.ownerDocument||pt)&&d.push(h.defaultView||h.parentWindow||t)}for(u=0;(a=d[u++])&&!e.isPropagationStopped();)e.type=u>1?l:c.bindType||f,o=(rt._data(a,"events")||{})[e.type]&&rt._data(a,"handle"),o&&o.apply(a,n),o=s&&a[s],o&&o.apply&&rt.acceptData(a)&&(e.result=o.apply(a,n),e.result===!1&&e.preventDefault());if(e.type=f,!r&&!e.isDefaultPrevented()&&(!c._default||c._default.apply(d.pop(),n)===!1)&&rt.acceptData(i)&&s&&i[f]&&!rt.isWindow(i)){h=i[s],h&&(i[s]=null),rt.event.triggered=f;try{i[f]()}catch(g){}rt.event.triggered=void 0,h&&(i[s]=h)}return e.result}},dispatch:function(t){t=rt.event.fix(t);var e,n,i,r,o,s=[],a=K.call(arguments),l=(rt._data(this,"events")||{})[t.type]||[],c=rt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,t)!==!1){for(s=rt.event.handlers.call(this,t,l),e=0;(r=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,o=0;(i=r.handlers[o++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(i.namespace))&&(t.handleObj=i,t.data=i.data,n=((rt.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,a),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,r,o,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(r=[],o=0;a>o;o++)i=e[o],n=i.selector+" ",void 0===r[n]&&(r[n]=i.needsContext?rt(n,this).index(l)>=0:rt.find(n,this,null,[l]).length),r[n]&&r.push(i);r.length&&s.push({elem:l,handlers:r})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},fix:function(t){if(t[rt.expando])return t;var e,n,i,r=t.type,o=t,s=this.fixHooks[r];for(s||(this.fixHooks[r]=s=Mt.test(r)?this.mouseHooks:Bt.test(r)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,t=new rt.Event(o),e=i.length;e--;)n=i[e],t[n]=o[n];return t.target||(t.target=o.srcElement||pt),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,s.filter?s.filter(t,o):t},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(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,r,o=e.button,s=e.fromElement;return null==t.pageX&&null!=e.clientX&&(i=t.target.ownerDocument||pt,r=i.documentElement,n=i.body,t.pageX=e.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),t.pageY=e.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!t.relatedTarget&&s&&(t.relatedTarget=s===t.target?e.toElement:s),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==p()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){return this===p()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return rt.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(t){return rt.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,i){var r=rt.extend(new rt.Event,n,{type:t,isSimulated:!0,originalEvent:{}});i?rt.event.trigger(r,null,e):rt.event.dispatch.call(e,r),r.isDefaultPrevented()&&n.preventDefault()}},rt.removeEvent=pt.removeEventListener?function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)}:function(t,e,n){var i="on"+e;t.detachEvent&&(typeof t[i]===At&&(t[i]=null),t.detachEvent(i,n))},rt.Event=function(t,e){return this instanceof rt.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?d:f):this.type=t,e&&rt.extend(this,e),this.timeStamp=t&&t.timeStamp||rt.now(),void(this[rt.expando]=!0)):new rt.Event(t,e)},rt.Event.prototype={isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=d,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=d,t&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=d,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},rt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){rt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return(!r||r!==i&&!rt.contains(i,r))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),nt.submitBubbles||(rt.event.special.submit={setup:function(){return rt.nodeName(this,"form")?!1:void rt.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,n=rt.nodeName(e,"input")||rt.nodeName(e,"button")?e.form:void 0;n&&!rt._data(n,"submitBubbles")&&(rt.event.add(n,"submit._submit",function(t){t._submit_bubble=!0}),rt._data(n,"submitBubbles",!0))})},postDispatch:function(t){t._submit_bubble&&(delete t._submit_bubble,this.parentNode&&!t.isTrigger&&rt.event.simulate("submit",this.parentNode,t,!0))},teardown:function(){return rt.nodeName(this,"form")?!1:void rt.event.remove(this,"._submit")}}),nt.changeBubbles||(rt.event.special.change={setup:function(){return Tt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(rt.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._just_changed=!0)}),rt.event.add(this,"click._change",function(t){this._just_changed&&!t.isTrigger&&(this._just_changed=!1),rt.event.simulate("change",this,t,!0)})),!1):void rt.event.add(this,"beforeactivate._change",function(t){var e=t.target;Tt.test(e.nodeName)&&!rt._data(e,"changeBubbles")&&(rt.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||rt.event.simulate("change",this.parentNode,t,!0)}),rt._data(e,"changeBubbles",!0))})},handle:function(t){var e=t.target;return this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type?t.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return rt.event.remove(this,"._change"),!Tt.test(this.nodeName)}}),nt.focusinBubbles||rt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){rt.event.simulate(e,t.target,rt.event.fix(t),!0)};rt.event.special[e]={setup:function(){var i=this.ownerDocument||this,r=rt._data(i,e);r||i.addEventListener(t,n,!0),rt._data(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=rt._data(i,e)-1;r?rt._data(i,e,r):(i.removeEventListener(t,n,!0),rt._removeData(i,e))}}}),rt.fn.extend({on:function(t,e,n,i,r){var o,s;if("object"==typeof t){"string"!=typeof e&&(n=n||e,e=void 0);for(o in t)this.on(o,e,n,t[o],r);return this}if(null==n&&null==i?(i=e,n=e=void 0):null==i&&("string"==typeof e?(i=n,n=void 0):(i=n,n=e,e=void 0)),i===!1)i=f;else if(!i)return this;return 1===r&&(s=i,i=function(t){return rt().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=rt.guid++)),this.each(function(){rt.event.add(this,t,i,n,e)})},one:function(t,e,n,i){return this.on(t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,rt(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return(e===!1||"function"==typeof e)&&(n=e,e=void 0),n===!1&&(n=f),this.each(function(){rt.event.remove(this,t,n,e)})},trigger:function(t,e){return this.each(function(){rt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?rt.event.trigger(t,e,n,!0):void 0}});var It="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Pt=/ jQuery\d+="(?:null|\d+)"/g,Nt=new RegExp("<(?:"+It+")[\\s/>]","i"),Ot=/^\s+/,jt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,zt=/<([\w:]+)/,Ht=/<tbody/i,Wt=/<|&#?\w+;/,Ut=/<(?:script|style|link)/i,qt=/checked\s*(?:[^=]|=\s*.checked.)/i,Yt=/^$|\/(?:java|ecma)script/i,Gt=/^true\/(.*)/,Vt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Kt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:nt.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Xt=g(pt),Zt=Xt.appendChild(pt.createElement("div"));Kt.optgroup=Kt.option,Kt.tbody=Kt.tfoot=Kt.colgroup=Kt.caption=Kt.thead,Kt.th=Kt.td,rt.extend({clone:function(t,e,n){var i,r,o,s,a,l=rt.contains(t.ownerDocument,t);if(nt.html5Clone||rt.isXMLDoc(t)||!Nt.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(Zt.innerHTML=t.outerHTML,Zt.removeChild(o=Zt.firstChild)),!(nt.noCloneEvent&&nt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||rt.isXMLDoc(t)))for(i=m(o),a=m(t),s=0;null!=(r=a[s]);++s)i[s]&&A(r,i[s]);if(e)if(n)for(a=a||m(t),i=i||m(o),s=0;null!=(r=a[s]);s++)C(r,i[s]);else C(t,o);return i=m(o,"script"),i.length>0&&x(i,!l&&m(t,"script")),i=a=r=null,o},buildFragment:function(t,e,n,i){for(var r,o,s,a,l,c,h,u=t.length,d=g(e),f=[],p=0;u>p;p++)if(o=t[p],o||0===o)if("object"===rt.type(o))rt.merge(f,o.nodeType?[o]:o);else if(Wt.test(o)){for(a=a||d.appendChild(e.createElement("div")),l=(zt.exec(o)||["",""])[1].toLowerCase(),h=Kt[l]||Kt._default,a.innerHTML=h[1]+o.replace(jt,"<$1></$2>")+h[2],r=h[0];r--;)a=a.lastChild;if(!nt.leadingWhitespace&&Ot.test(o)&&f.push(e.createTextNode(Ot.exec(o)[0])),!nt.tbody)for(o="table"!==l||Ht.test(o)?"<table>"!==h[1]||Ht.test(o)?0:a:a.firstChild,r=o&&o.childNodes.length;r--;)rt.nodeName(c=o.childNodes[r],"tbody")&&!c.childNodes.length&&o.removeChild(c);for(rt.merge(f,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=d.lastChild}else f.push(e.createTextNode(o));for(a&&d.removeChild(a),nt.appendChecked||rt.grep(m(f,"input"),v),p=0;o=f[p++];)if((!i||-1===rt.inArray(o,i))&&(s=rt.contains(o.ownerDocument,o),a=m(d.appendChild(o),"script"),s&&x(a),n))for(r=0;o=a[r++];)Yt.test(o.type||"")&&n.push(o);return a=null,d},cleanData:function(t,e){for(var n,i,r,o,s=0,a=rt.expando,l=rt.cache,c=nt.deleteExpando,h=rt.event.special;null!=(n=t[s]);s++)if((e||rt.acceptData(n))&&(r=n[a],o=r&&l[r])){if(o.events)for(i in o.events)h[i]?rt.event.remove(n,i):rt.removeEvent(n,i,o.handle);l[r]&&(delete l[r],c?delete n[a]:typeof n.removeAttribute!==At?n.removeAttribute(a):n[a]=null,V.push(r))}}}),rt.fn.extend({text:function(t){return St(this,function(t){return void 0===t?rt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||pt).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=y(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=y(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,i=t?rt.filter(t,this):this,r=0;null!=(n=i[r]);r++)e||1!==n.nodeType||rt.cleanData(m(n)),n.parentNode&&(e&&rt.contains(n.ownerDocument,n)&&x(m(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&rt.cleanData(m(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&rt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return rt.clone(this,t,e)})},html:function(t){return St(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Pt,""):void 0;if("string"==typeof t&&!Ut.test(t)&&(nt.htmlSerialize||!Nt.test(t))&&(nt.leadingWhitespace||!Ot.test(t))&&!Kt[(zt.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(jt,"<$1></$2>");try{for(;i>n;n++)e=this[n]||{},1===e.nodeType&&(rt.cleanData(m(e,!1)),e.innerHTML=t);e=0}catch(r){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,function(e){t=this.parentNode,rt.cleanData(m(this)),t&&t.replaceChild(e,this)}),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e){t=X.apply([],t);var n,i,r,o,s,a,l=0,c=this.length,h=this,u=c-1,d=t[0],f=rt.isFunction(d);if(f||c>1&&"string"==typeof d&&!nt.checkClone&&qt.test(d))return this.each(function(n){var i=h.eq(n);f&&(t[0]=d.call(this,n,i.html())),i.domManip(t,e)});if(c&&(a=rt.buildFragment(t,this[0].ownerDocument,!1,this),n=a.firstChild,1===a.childNodes.length&&(a=n),n)){for(o=rt.map(m(a,"script"),w),r=o.length;c>l;l++)i=a,l!==u&&(i=rt.clone(i,!0,!0),r&&rt.merge(o,m(i,"script"))),e.call(this[l],i,l);if(r)for(s=o[o.length-1].ownerDocument,rt.map(o,b),l=0;r>l;l++)i=o[l],Yt.test(i.type||"")&&!rt._data(i,"globalEval")&&rt.contains(s,i)&&(i.src?rt._evalUrl&&rt._evalUrl(i.src):rt.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Vt,"")));a=n=null}return this}}),rt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){rt.fn[t]=function(t){for(var n,i=0,r=[],o=rt(t),s=o.length-1;s>=i;i++)n=i===s?this:this.clone(!0),rt(o[i])[e](n),Z.apply(r,n.get());return this.pushStack(r)}});var Qt,Jt={};!function(){var t;nt.shrinkWrapBlocks=function(){if(null!=t)return t;t=!1;var e,n,i;return n=pt.getElementsByTagName("body")[0],n&&n.style?(e=pt.createElement("div"),i=pt.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),typeof e.style.zoom!==At&&(e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",e.appendChild(pt.createElement("div")).style.width="5px",t=3!==e.offsetWidth),n.removeChild(i),t):void 0}}();var te,ee,ne=/^margin/,ie=new RegExp("^("+Ft+")(?!px)[a-z%]+$","i"),re=/^(top|right|bottom|left)$/;t.getComputedStyle?(te=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):t.getComputedStyle(e,null)},ee=function(t,e,n){var i,r,o,s,a=t.style;return n=n||te(t),s=n?n.getPropertyValue(e)||n[e]:void 0,n&&(""!==s||rt.contains(t.ownerDocument,t)||(s=rt.style(t,e)),ie.test(s)&&ne.test(e)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0===s?s:s+""}):pt.documentElement.currentStyle&&(te=function(t){return t.currentStyle},ee=function(t,e,n){var i,r,o,s,a=t.style;return n=n||te(t),s=n?n[e]:void 0,null==s&&a&&a[e]&&(s=a[e]),ie.test(s)&&!re.test(e)&&(i=a.left,r=t.runtimeStyle,o=r&&r.left,o&&(r.left=t.currentStyle.left),a.left="fontSize"===e?"1em":s,s=a.pixelLeft+"px",a.left=i,o&&(r.left=o)),void 0===s?s:s+""||"auto"}),function(){function e(){var e,n,i,r;n=pt.getElementsByTagName("body")[0],n&&n.style&&(e=pt.createElement("div"),i=pt.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),e.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,l=!0,t.getComputedStyle&&(o="1%"!==(t.getComputedStyle(e,null)||{}).top,s="4px"===(t.getComputedStyle(e,null)||{width:"4px"}).width,r=e.appendChild(pt.createElement("div")),r.style.cssText=e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",r.style.marginRight=r.style.width="0",e.style.width="1px",l=!parseFloat((t.getComputedStyle(r,null)||{}).marginRight),e.removeChild(r)),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",r=e.getElementsByTagName("td"),r[0].style.cssText="margin:0;border:0;padding:0;display:none",a=0===r[0].offsetHeight,a&&(r[0].style.display="",r[1].style.display="none",a=0===r[0].offsetHeight),n.removeChild(i))}var n,i,r,o,s,a,l;n=pt.createElement("div"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=n.getElementsByTagName("a")[0],i=r&&r.style,i&&(i.cssText="float:left;opacity:.5",nt.opacity="0.5"===i.opacity,nt.cssFloat=!!i.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",nt.clearCloneStyle="content-box"===n.style.backgroundClip,nt.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,rt.extend(nt,{reliableHiddenOffsets:function(){return null==a&&e(),a},boxSizingReliable:function(){return null==s&&e(),s},pixelPosition:function(){return null==o&&e(),o},reliableMarginRight:function(){return null==l&&e(),l}}))}(),rt.swap=function(t,e,n,i){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];r=n.apply(t,i||[]);for(o in e)t.style[o]=s[o];return r};var oe=/alpha\([^)]*\)/i,se=/opacity\s*=\s*([^)]*)/,ae=/^(none|table(?!-c[ea]).+)/,le=new RegExp("^("+Ft+")(.*)$","i"),ce=new RegExp("^([+-])=("+Ft+")","i"),he={position:"absolute",visibility:"hidden",display:"block"},ue={letterSpacing:"0",fontWeight:"400"},de=["Webkit","O","Moz","ms"];rt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=ee(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":nt.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=rt.camelCase(e),l=t.style;if(e=rt.cssProps[a]||(rt.cssProps[a]=_(l,a)),s=rt.cssHooks[e]||rt.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(t,!1,i))?r:l[e];if(o=typeof n,"string"===o&&(r=ce.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(rt.css(t,e)),o="number"),null!=n&&n===n&&("number"!==o||rt.cssNumber[a]||(n+="px"),nt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),!(s&&"set"in s&&void 0===(n=s.set(t,n,i)))))try{l[e]=n}catch(c){}}},css:function(t,e,n,i){var r,o,s,a=rt.camelCase(e);return e=rt.cssProps[a]||(rt.cssProps[a]=_(t.style,a)),s=rt.cssHooks[e]||rt.cssHooks[a],s&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=ee(t,e,i)),"normal"===o&&e in ue&&(o=ue[e]),""===n||n?(r=parseFloat(o),n===!0||rt.isNumeric(r)?r||0:o):o}}),rt.each(["height","width"],function(t,e){rt.cssHooks[e]={get:function(t,n,i){return n?ae.test(rt.css(t,"display"))&&0===t.offsetWidth?rt.swap(t,he,function(){return T(t,e,i)}):T(t,e,i):void 0},set:function(t,n,i){var r=i&&te(t);return S(t,n,i?$(t,e,i,nt.boxSizing&&"border-box"===rt.css(t,"boxSizing",!1,r),r):0)}}}),nt.opacity||(rt.cssHooks.opacity={get:function(t,e){return se.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,r=rt.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===rt.trim(o.replace(oe,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=oe.test(o)?o.replace(oe,r):o+" "+r)}}),rt.cssHooks.marginRight=F(nt.reliableMarginRight,function(t,e){return e?rt.swap(t,{display:"inline-block"},ee,[t,"marginRight"]):void 0}),rt.each({margin:"",padding:"",border:"Width"},function(t,e){rt.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[t+_t[i]+e]=o[i]||o[i-2]||o[0];return r}},ne.test(t)||(rt.cssHooks[t+e].set=S)}),rt.fn.extend({css:function(t,e){return St(this,function(t,e,n){var i,r,o={},s=0;if(rt.isArray(e)){for(i=te(t),r=e.length;r>s;s++)o[e[s]]=rt.css(t,e[s],!1,i);return o}return void 0!==n?rt.style(t,e,n):rt.css(t,e)},t,e,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Dt(this)?rt(this).show():rt(this).hide()})}}),rt.Tween=B,B.prototype={constructor:B,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||"swing",this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(rt.cssNumber[n]?"":"px")},cur:function(){var t=B.propHooks[this.prop];return t&&t.get?t.get(this):B.propHooks._default.get(this)},run:function(t){var e,n=B.propHooks[this.prop];return this.options.duration?this.pos=e=rt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=rt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){rt.fx.step[t.prop]?rt.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[rt.cssProps[t.prop]]||rt.cssHooks[t.prop])?rt.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},rt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},rt.fx=B.prototype.init,rt.fx.step={};var fe,pe,ge=/^(?:toggle|show|hide)$/,me=new RegExp("^(?:([+-])=|)("+Ft+")([a-z%]*)$","i"),ve=/queueHooks$/,ye=[I],we={"*":[function(t,e){var n=this.createTween(t,e),i=n.cur(),r=me.exec(e),o=r&&r[3]||(rt.cssNumber[t]?"":"px"),s=(rt.cssNumber[t]||"px"!==o&&+i)&&me.exec(rt.css(n.elem,t)),a=1,l=20;if(s&&s[3]!==o){o=o||s[3],r=r||[],s=+i||1;do a=a||".5",s/=a,rt.style(n.elem,t,s+o);while(a!==(a=n.cur()/i)&&1!==a&&--l)}return r&&(s=n.start=+s||+i||0,n.unit=o,n.end=r[1]?s+(r[1]+1)*r[2]:+r[2]),n}]};rt.Animation=rt.extend(N,{tweener:function(t,e){rt.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,i=0,r=t.length;r>i;i++)n=t[i],we[n]=we[n]||[],we[n].unshift(e)},prefilter:function(t,e){e?ye.unshift(t):ye.push(t)}}),rt.speed=function(t,e,n){var i=t&&"object"==typeof t?rt.extend({},t):{complete:n||!n&&e||rt.isFunction(t)&&t,duration:t,easing:n&&e||e&&!rt.isFunction(e)&&e};return i.duration=rt.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in rt.fx.speeds?rt.fx.speeds[i.duration]:rt.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){rt.isFunction(i.old)&&i.old.call(this),i.queue&&rt.dequeue(this,i.queue)},i},rt.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Dt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=rt.isEmptyObject(t),o=rt.speed(e,n,i),s=function(){var e=N(this,rt.extend({},t),o);(r||rt._data(this,"finish"))&&e.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=rt.timers,s=rt._data(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&ve.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));(e||!n)&&rt.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=rt._data(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=rt.timers,s=i?i.length:0;for(n.finish=!0,rt.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;s>e;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),rt.each(["toggle","show","hide"],function(t,e){var n=rt.fn[e];rt.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(L(e,!0),t,i,r)}}),rt.each({slideDown:L("show"),slideUp:L("hide"),slideToggle:L("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){rt.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),rt.timers=[],rt.fx.tick=function(){var t,e=rt.timers,n=0;for(fe=rt.now();n<e.length;n++)t=e[n],t()||e[n]!==t||e.splice(n--,1);e.length||rt.fx.stop(),fe=void 0},rt.fx.timer=function(t){rt.timers.push(t),t()?rt.fx.start():rt.timers.pop()},rt.fx.interval=13,rt.fx.start=function(){pe||(pe=setInterval(rt.fx.tick,rt.fx.interval))},rt.fx.stop=function(){clearInterval(pe),pe=null},rt.fx.speeds={slow:600,fast:200,_default:400},rt.fn.delay=function(t,e){return t=rt.fx?rt.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var i=setTimeout(e,t);n.stop=function(){clearTimeout(i)}})},function(){var t,e,n,i,r;e=pt.createElement("div"),e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=e.getElementsByTagName("a")[0],n=pt.createElement("select"),r=n.appendChild(pt.createElement("option")),t=e.getElementsByTagName("input")[0],i.style.cssText="top:1px",nt.getSetAttribute="t"!==e.className,nt.style=/top/.test(i.getAttribute("style")),nt.hrefNormalized="/a"===i.getAttribute("href"),nt.checkOn=!!t.value,nt.optSelected=r.selected,nt.enctype=!!pt.createElement("form").enctype,n.disabled=!0,nt.optDisabled=!r.disabled,t=pt.createElement("input"),t.setAttribute("value",""),nt.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),nt.radioValue="t"===t.value}();var be=/\r/g;rt.fn.extend({val:function(t){var e,n,i,r=this[0];{if(arguments.length)return i=rt.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(r=i?t.call(this,n,rt(this).val()):t,null==r?r="":"number"==typeof r?r+="":rt.isArray(r)&&(r=rt.map(r,function(t){return null==t?"":t+""})),e=rt.valHooks[this.type]||rt.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return e=rt.valHooks[r.type]||rt.valHooks[r.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(be,""):null==n?"":n)}}}),rt.extend({valHooks:{option:{get:function(t){var e=rt.find.attr(t,"value");return null!=e?e:rt.trim(rt.text(t))}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o="select-one"===t.type||0>r,s=o?null:[],a=o?r+1:i.length,l=0>r?a:o?r:0;a>l;l++)if(n=i[l],(n.selected||l===r)&&(nt.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!rt.nodeName(n.parentNode,"optgroup"))){if(e=rt(n).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var n,i,r=t.options,o=rt.makeArray(e),s=r.length;s--;)if(i=r[s],rt.inArray(rt.valHooks.option.get(i),o)>=0)try{i.selected=n=!0}catch(a){i.scrollHeight}else i.selected=!1;return n||(t.selectedIndex=-1),r}}}}),rt.each(["radio","checkbox"],function(){rt.valHooks[this]={set:function(t,e){return rt.isArray(e)?t.checked=rt.inArray(rt(t).val(),e)>=0:void 0}},nt.checkOn||(rt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var xe,Ce,Ae=rt.expr.attrHandle,Ee=/^(?:checked|selected)$/i,ke=nt.getSetAttribute,Fe=nt.input;rt.fn.extend({attr:function(t,e){return St(this,rt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){rt.removeAttr(this,t)})}}),rt.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===At?rt.prop(t,e,n):(1===o&&rt.isXMLDoc(t)||(e=e.toLowerCase(),i=rt.attrHooks[e]||(rt.expr.match.bool.test(e)?Ce:xe)),void 0===n?i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=rt.find.attr(t,e),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):void rt.removeAttr(t,e))},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(wt);if(o&&1===t.nodeType)for(;n=o[r++];)i=rt.propFix[n]||n,rt.expr.match.bool.test(n)?Fe&&ke||!Ee.test(n)?t[i]=!1:t[rt.camelCase("default-"+n)]=t[i]=!1:rt.attr(t,n,""),t.removeAttribute(ke?n:i)},attrHooks:{type:{set:function(t,e){if(!nt.radioValue&&"radio"===e&&rt.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),Ce={set:function(t,e,n){return e===!1?rt.removeAttr(t,n):Fe&&ke||!Ee.test(n)?t.setAttribute(!ke&&rt.propFix[n]||n,n):t[rt.camelCase("default-"+n)]=t[n]=!0,n}},rt.each(rt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=Ae[e]||rt.find.attr;Ae[e]=Fe&&ke||!Ee.test(e)?function(t,e,i){var r,o;return i||(o=Ae[e],Ae[e]=r,r=null!=n(t,e,i)?e.toLowerCase():null,Ae[e]=o),r}:function(t,e,n){return n?void 0:t[rt.camelCase("default-"+e)]?e.toLowerCase():null}}),Fe&&ke||(rt.attrHooks.value={set:function(t,e,n){return rt.nodeName(t,"input")?void(t.defaultValue=e):xe&&xe.set(t,e,n)}}),ke||(xe={set:function(t,e,n){var i=t.getAttributeNode(n);return i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n)?e:void 0}},Ae.id=Ae.name=Ae.coords=function(t,e,n){var i;return n?void 0:(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},rt.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);return n&&n.specified?n.value:void 0},set:xe.set},rt.attrHooks.contenteditable={set:function(t,e,n){xe.set(t,""===e?!1:e,n)}},rt.each(["width","height"],function(t,e){rt.attrHooks[e]={set:function(t,n){return""===n?(t.setAttribute(e,"auto"),n):void 0}}})),nt.style||(rt.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var _e=/^(?:input|select|textarea|button|object)$/i,De=/^(?:a|area)$/i;rt.fn.extend({prop:function(t,e){return St(this,rt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=rt.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(e){}})}}),rt.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(t,e,n){var i,r,o,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return o=1!==s||!rt.isXMLDoc(t),o&&(e=rt.propFix[e]||e,r=rt.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=rt.find.attr(t,"tabindex");return e?parseInt(e,10):_e.test(t.nodeName)||De.test(t.nodeName)&&t.href?0:-1}}}}),nt.hrefNormalized||rt.each(["href","src"],function(t,e){rt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),nt.optSelected||(rt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),rt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){rt.propFix[this.toLowerCase()]=this}),nt.enctype||(rt.propFix.enctype="encoding");var Se=/[\t\r\n\f]/g;rt.fn.extend({addClass:function(t){var e,n,i,r,o,s,a=0,l=this.length,c="string"==typeof t&&t;if(rt.isFunction(t))return this.each(function(e){rt(this).addClass(t.call(this,e,this.className))});if(c)for(e=(t||"").match(wt)||[];l>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Se," "):" ")){for(o=0;r=e[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");s=rt.trim(i),n.className!==s&&(n.className=s)}return this},removeClass:function(t){var e,n,i,r,o,s,a=0,l=this.length,c=0===arguments.length||"string"==typeof t&&t;if(rt.isFunction(t))return this.each(function(e){rt(this).removeClass(t.call(this,e,this.className))});if(c)for(e=(t||"").match(wt)||[];l>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Se," "):"")){
for(o=0;r=e[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");s=t?rt.trim(i):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):rt.isFunction(t)?this.each(function(n){rt(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var e,i=0,r=rt(this),o=t.match(wt)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else(n===At||"boolean"===n)&&(this.className&&rt._data(this,"__className__",this.className),this.className=this.className||t===!1?"":rt._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Se," ").indexOf(e)>=0)return!0;return!1}}),rt.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(t,e){rt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),rt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var $e=rt.now(),Te=/\?/,Be=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;rt.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,r=rt.trim(e+"");return r&&!rt.trim(r.replace(Be,function(t,e,r,o){return n&&e&&(i=0),0===i?t:(n=r||e,i+=!o-!r,"")}))?Function("return "+r)():rt.error("Invalid JSON: "+e)},rt.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(i=new DOMParser,n=i.parseFromString(e,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(e))}catch(r){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||rt.error("Invalid XML: "+e),n};var Me,Le,Re=/#.*$/,Ie=/([?&])_=[^&]*/,Pe=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ne=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Oe=/^(?:GET|HEAD)$/,je=/^\/\//,ze=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,He={},We={},Ue="*/".concat("*");try{Le=location.href}catch(qe){Le=pt.createElement("a"),Le.href="",Le=Le.href}Me=ze.exec(Le.toLowerCase())||[],rt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Le,type:"GET",isLocal:Ne.test(Me[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ue,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":rt.parseJSON,"text xml":rt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?z(z(t,rt.ajaxSettings),e):z(rt.ajaxSettings,t)},ajaxPrefilter:O(He),ajaxTransport:O(We),ajax:function(t,e){function n(t,e,n,i){var r,h,v,y,b,C=e;2!==w&&(w=2,a&&clearTimeout(a),c=void 0,s=i||"",x.readyState=t>0?4:0,r=t>=200&&300>t||304===t,n&&(y=H(u,x,n)),y=W(u,y,x,r),r?(u.ifModified&&(b=x.getResponseHeader("Last-Modified"),b&&(rt.lastModified[o]=b),b=x.getResponseHeader("etag"),b&&(rt.etag[o]=b)),204===t||"HEAD"===u.type?C="nocontent":304===t?C="notmodified":(C=y.state,h=y.data,v=y.error,r=!v)):(v=C,(t||!C)&&(C="error",0>t&&(t=0))),x.status=t,x.statusText=(e||C)+"",r?p.resolveWith(d,[h,C,x]):p.rejectWith(d,[x,C,v]),x.statusCode(m),m=void 0,l&&f.trigger(r?"ajaxSuccess":"ajaxError",[x,u,r?h:v]),g.fireWith(d,[x,C]),l&&(f.trigger("ajaxComplete",[x,u]),--rt.active||rt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,r,o,s,a,l,c,h,u=rt.ajaxSetup({},e),d=u.context||u,f=u.context&&(d.nodeType||d.jquery)?rt(d):rt.event,p=rt.Deferred(),g=rt.Callbacks("once memory"),m=u.statusCode||{},v={},y={},w=0,b="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!h)for(h={};e=Pe.exec(s);)h[e[1].toLowerCase()]=e[2];e=h[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return w||(t=y[n]=y[n]||t,v[t]=e),this},overrideMimeType:function(t){return w||(u.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>w)for(e in t)m[e]=[m[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||b;return c&&c.abort(e),n(0,e),this}};if(p.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,u.url=((t||u.url||Le)+"").replace(Re,"").replace(je,Me[1]+"//"),u.type=e.method||e.type||u.method||u.type,u.dataTypes=rt.trim(u.dataType||"*").toLowerCase().match(wt)||[""],null==u.crossDomain&&(i=ze.exec(u.url.toLowerCase()),u.crossDomain=!(!i||i[1]===Me[1]&&i[2]===Me[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Me[3]||("http:"===Me[1]?"80":"443")))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=rt.param(u.data,u.traditional)),j(He,u,e,x),2===w)return x;l=rt.event&&u.global,l&&0===rt.active++&&rt.event.trigger("ajaxStart"),u.type=u.type.toUpperCase(),u.hasContent=!Oe.test(u.type),o=u.url,u.hasContent||(u.data&&(o=u.url+=(Te.test(o)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=Ie.test(o)?o.replace(Ie,"$1_="+$e++):o+(Te.test(o)?"&":"?")+"_="+$e++)),u.ifModified&&(rt.lastModified[o]&&x.setRequestHeader("If-Modified-Since",rt.lastModified[o]),rt.etag[o]&&x.setRequestHeader("If-None-Match",rt.etag[o])),(u.data&&u.hasContent&&u.contentType!==!1||e.contentType)&&x.setRequestHeader("Content-Type",u.contentType),x.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+Ue+"; q=0.01":""):u.accepts["*"]);for(r in u.headers)x.setRequestHeader(r,u.headers[r]);if(u.beforeSend&&(u.beforeSend.call(d,x,u)===!1||2===w))return x.abort();b="abort";for(r in{success:1,error:1,complete:1})x[r](u[r]);if(c=j(We,u,e,x)){x.readyState=1,l&&f.trigger("ajaxSend",[x,u]),u.async&&u.timeout>0&&(a=setTimeout(function(){x.abort("timeout")},u.timeout));try{w=1,c.send(v,n)}catch(C){if(!(2>w))throw C;n(-1,C)}}else n(-1,"No Transport");return x},getJSON:function(t,e,n){return rt.get(t,e,n,"json")},getScript:function(t,e){return rt.get(t,void 0,e,"script")}}),rt.each(["get","post"],function(t,e){rt[e]=function(t,n,i,r){return rt.isFunction(n)&&(r=r||i,i=n,n=void 0),rt.ajax({url:t,type:e,dataType:r,data:n,success:i})}}),rt._evalUrl=function(t){return rt.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},rt.fn.extend({wrapAll:function(t){if(rt.isFunction(t))return this.each(function(e){rt(this).wrapAll(t.call(this,e))});if(this[0]){var e=rt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return rt.isFunction(t)?this.each(function(e){rt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=rt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=rt.isFunction(t);return this.each(function(n){rt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){rt.nodeName(this,"body")||rt(this).replaceWith(this.childNodes)}).end()}}),rt.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!nt.reliableHiddenOffsets()&&"none"===(t.style&&t.style.display||rt.css(t,"display"))},rt.expr.filters.visible=function(t){return!rt.expr.filters.hidden(t)};var Ye=/%20/g,Ge=/\[\]$/,Ve=/\r?\n/g,Ke=/^(?:submit|button|image|reset|file)$/i,Xe=/^(?:input|select|textarea|keygen)/i;rt.param=function(t,e){var n,i=[],r=function(t,e){e=rt.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=rt.ajaxSettings&&rt.ajaxSettings.traditional),rt.isArray(t)||t.jquery&&!rt.isPlainObject(t))rt.each(t,function(){r(this.name,this.value)});else for(n in t)U(n,t[n],e,r);return i.join("&").replace(Ye,"+")},rt.fn.extend({serialize:function(){return rt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=rt.prop(this,"elements");return t?rt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!rt(this).is(":disabled")&&Xe.test(this.nodeName)&&!Ke.test(t)&&(this.checked||!$t.test(t))}).map(function(t,e){var n=rt(this).val();return null==n?null:rt.isArray(n)?rt.map(n,function(t){return{name:e.name,value:t.replace(Ve,"\r\n")}}):{name:e.name,value:n.replace(Ve,"\r\n")}}).get()}}),rt.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&q()||Y()}:q;var Ze=0,Qe={},Je=rt.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in Qe)Qe[t](void 0,!0)}),nt.cors=!!Je&&"withCredentials"in Je,Je=nt.ajax=!!Je,Je&&rt.ajaxTransport(function(t){if(!t.crossDomain||nt.cors){var e;return{send:function(n,i){var r,o=t.xhr(),s=++Ze;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(r in t.xhrFields)o[r]=t.xhrFields[r];t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&o.setRequestHeader(r,n[r]+"");o.send(t.hasContent&&t.data||null),e=function(n,r){var a,l,c;if(e&&(r||4===o.readyState))if(delete Qe[s],e=void 0,o.onreadystatechange=rt.noop,r)4!==o.readyState&&o.abort();else{c={},a=o.status,"string"==typeof o.responseText&&(c.text=o.responseText);try{l=o.statusText}catch(h){l=""}a||!t.isLocal||t.crossDomain?1223===a&&(a=204):a=c.text?200:404}c&&i(a,l,c,o.getAllResponseHeaders())},t.async?4===o.readyState?setTimeout(e):o.onreadystatechange=Qe[s]=e:e()},abort:function(){e&&e(void 0,!0)}}}}),rt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return rt.globalEval(t),t}}}),rt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),rt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=pt.head||rt("head")[0]||pt.documentElement;return{send:function(i,r){e=pt.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||r(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var tn=[],en=/(=)\?(?=&|$)|\?\?/;rt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=tn.pop()||rt.expando+"_"+$e++;return this[t]=!0,t}}),rt.ajaxPrefilter("json jsonp",function(e,n,i){var r,o,s,a=e.jsonp!==!1&&(en.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&en.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=rt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(en,"$1"+r):e.jsonp!==!1&&(e.url+=(Te.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||rt.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},i.always(function(){t[r]=o,e[r]&&(e.jsonpCallback=n.jsonpCallback,tn.push(r)),s&&rt.isFunction(o)&&o(s[0]),s=o=void 0}),"script"):void 0}),rt.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||pt;var i=ut.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=rt.buildFragment([t],e,r),r&&r.length&&rt(r).remove(),rt.merge([],i.childNodes))};var nn=rt.fn.load;rt.fn.load=function(t,e,n){if("string"!=typeof t&&nn)return nn.apply(this,arguments);var i,r,o,s=this,a=t.indexOf(" ");return a>=0&&(i=rt.trim(t.slice(a,t.length)),t=t.slice(0,a)),rt.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&rt.ajax({url:t,type:o,dataType:"html",data:e}).done(function(t){r=arguments,s.html(i?rt("<div>").append(rt.parseHTML(t)).find(i):t)}).complete(n&&function(t,e){s.each(n,r||[t.responseText,e,t])}),this},rt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){rt.fn[e]=function(t){return this.on(e,t)}}),rt.expr.filters.animated=function(t){return rt.grep(rt.timers,function(e){return t===e.elem}).length};var rn=t.document.documentElement;rt.offset={setOffset:function(t,e,n){var i,r,o,s,a,l,c,h=rt.css(t,"position"),u=rt(t),d={};"static"===h&&(t.style.position="relative"),a=u.offset(),o=rt.css(t,"top"),l=rt.css(t,"left"),c=("absolute"===h||"fixed"===h)&&rt.inArray("auto",[o,l])>-1,c?(i=u.position(),s=i.top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),rt.isFunction(e)&&(e=e.call(t,n,a)),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):u.css(d)}},rt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){rt.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return e=o.documentElement,rt.contains(e,r)?(typeof r.getBoundingClientRect!==At&&(i=r.getBoundingClientRect()),n=G(o),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===rt.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),rt.nodeName(t[0],"html")||(n=t.offset()),n.top+=rt.css(t[0],"borderTopWidth",!0),n.left+=rt.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-rt.css(i,"marginTop",!0),left:e.left-n.left-rt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||rn;t&&!rt.nodeName(t,"html")&&"static"===rt.css(t,"position");)t=t.offsetParent;return t||rn})}}),rt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);rt.fn[t]=function(i){return St(this,function(t,i,r){var o=G(t);return void 0===r?o?e in o?o[e]:o.document.documentElement[i]:t[i]:void(o?o.scrollTo(n?rt(o).scrollLeft():r,n?r:rt(o).scrollTop()):t[i]=r)},t,i,arguments.length,null)}}),rt.each(["top","left"],function(t,e){rt.cssHooks[e]=F(nt.pixelPosition,function(t,n){return n?(n=ee(t,e),ie.test(n)?rt(t).position()[e]+"px":n):void 0})}),rt.each({Height:"height",Width:"width"},function(t,e){rt.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){rt.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||r===!0?"margin":"border");return St(this,function(e,n,i){var r;return rt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===i?rt.css(e,n,s):rt.style(e,n,i,s)},e,o?i:void 0,o,null)}})}),rt.fn.size=function(){return this.length},rt.fn.andSelf=rt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return rt});var on=t.jQuery,sn=t.$;return rt.noConflict=function(e){return t.$===rt&&(t.$=sn),e&&t.jQuery===rt&&(t.jQuery=on),rt},typeof e===At&&(t.jQuery=t.$=rt),rt}),/*!
 * jQuery UI Core 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/category/ui-core/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,i){var r,o,s,a=e.nodeName.toLowerCase();return"area"===a?(r=e.parentNode,o=r.name,e.href&&o&&"map"===r.nodeName.toLowerCase()?(s=t("img[usemap='#"+o+"']")[0],!!s&&n(s)):!1):(/^(input|select|textarea|button|object)$/.test(a)?!e.disabled:"a"===a?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var n=this.css("position"),i="absolute"===n,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return i&&"static"===e.css("position")?!1:r.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,i){return!!t.data(e,i[3])},focusable:function(n){return e(n,!isNaN(t.attr(n,"tabindex")))},tabbable:function(n){var i=t.attr(n,"tabindex"),r=isNaN(i);return(r||i>=0)&&e(n,!r)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,n){function i(e,n,i,o){return t.each(r,function(){n-=parseFloat(t.css(e,"padding"+this))||0,i&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(n-=parseFloat(t.css(e,"margin"+this))||0)}),n}var r="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),s={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(e){return void 0===e?s["inner"+n].call(this):this.each(function(){t(this).css(o,i(this,e)+"px")})},t.fn["outer"+n]=function(e,r){return"number"!=typeof e?s["outer"+n].call(this,e):this.each(function(){t(this).css(o,i(this,e,!0,r)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(n){return arguments.length?e.call(this,t.camelCase(n)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(n,i){return"number"==typeof n?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),i&&i.call(e)},n)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var n,i,r=t(this[0]);r.length&&r[0]!==document;){if(n=r.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(i=parseInt(r.css("zIndex"),10),!isNaN(i)&&0!==i))return i;r=r.parent()}return 0}}),t.ui.plugin={add:function(e,n,i){var r,o=t.ui[e].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(t,e,n,i){var r,o=t.plugins[e];if(o&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)t.options[o[r][0]]&&o[r][1].apply(t.element,n)}}}),/*!
 * jQuery UI Widget 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/jQuery.widget/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){var e=0,n=Array.prototype.slice;return t.cleanData=function(e){return function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{i=t._data(r,"events"),i&&i.remove&&t(r).triggerHandler("remove")}catch(s){}e(n)}}(t.cleanData),t.widget=function(e,n,i){var r,o,s,a,l={},c=e.split(".")[0];return e=e.split(".")[1],r=c+"-"+e,i||(i=n,n=t.Widget),t.expr[":"][r.toLowerCase()]=function(e){return!!t.data(e,r)},t[c]=t[c]||{},o=t[c][e],s=t[c][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new s(t,e)},t.extend(s,o,{version:i.version,_proto:t.extend({},i),_childConstructors:[]}),a=new n,a.options=t.widget.extend({},a.options),t.each(i,function(e,i){return t.isFunction(i)?void(l[e]=function(){var t=function(){return n.prototype[e].apply(this,arguments)},r=function(t){return n.prototype[e].apply(this,t)};return function(){var e,n=this._super,o=this._superApply;return this._super=t,this._superApply=r,e=i.apply(this,arguments),this._super=n,this._superApply=o,e}}()):void(l[e]=i)}),s.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||e:e},l,{constructor:s,namespace:c,widgetName:e,widgetFullName:r}),o?(t.each(o._childConstructors,function(e,n){var i=n.prototype;t.widget(i.namespace+"."+i.widgetName,s,n._proto)}),delete o._childConstructors):n._childConstructors.push(s),t.widget.bridge(e,s),s},t.widget.extend=function(e){for(var i,r,o=n.call(arguments,1),s=0,a=o.length;a>s;s++)for(i in o[s])r=o[s][i],o[s].hasOwnProperty(i)&&void 0!==r&&(t.isPlainObject(r)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],r):t.widget.extend({},r):e[i]=r);return e},t.widget.bridge=function(e,i){var r=i.prototype.widgetFullName||e;t.fn[e]=function(o){var s="string"==typeof o,a=n.call(arguments,1),l=this;return s?this.each(function(){var n,i=t.data(this,r);return"instance"===o?(l=i,!1):i?t.isFunction(i[o])&&"_"!==o.charAt(0)?(n=i[o].apply(i,a),n!==i&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")}):(a.length&&(o=t.widget.extend.apply(null,[o].concat(a))),this.each(function(){var e=t.data(this,r);e?(e.option(o||{}),e._init&&e._init()):t.data(this,r,new i(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(n,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var i,r,o,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},i=e.split("."),e=i.shift(),i.length){for(r=s[e]=t.widget.extend({},this.options[e]),o=0;o<i.length-1;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(e=i.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=n}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,n,i){var r,o=this;"boolean"!=typeof e&&(i=n,n=e,e=!1),i?(n=r=t(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),t.each(i,function(i,s){function a(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof s?o[s]:s).apply(o,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,h=l[2];h?r.delegate(h,c,a):n.bind(c,a)})},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(n).undelegate(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function n(){return("string"==typeof t?i[t]:t).apply(i,arguments)}var i=this;return setTimeout(n,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,n,i){var r,o,s=this.options[e];if(i=i||{},n=t.Event(n),n.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(t.isFunction(s)&&s.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(i,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?r===!0||"number"==typeof r?n:r.effect||n:e;r=r||{},"number"==typeof r&&(r={duration:r}),s=!t.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),s&&t.effects&&t.effects.effect[a]?i[e](r):a!==e&&i[a]?i[a](r.duration,r.easing,o):i.queue(function(n){t(this)[e](),o&&o.call(i[0]),n()})}}),t.widget}),/*!
 * jQuery UI Position 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/position/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){return function(){function e(t,e,n){return[parseFloat(t[0])*(f.test(t[0])?e/100:1),parseFloat(t[1])*(f.test(t[1])?n/100:1)]}function n(e,n){return parseInt(t.css(e,n),10)||0}function i(e){var n=e[0];return 9===n.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var r,o,s=Math.max,a=Math.abs,l=Math.round,c=/left|center|right/,h=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,f=/%$/,p=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==r)return r;var e,n,i=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=i.children()[0];return t("body").append(i),e=o.offsetWidth,i.css("overflow","scroll"),n=o.offsetWidth,e===n&&(n=i[0].clientWidth),i.remove(),r=e-n},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),r="scroll"===n||"auto"===n&&e.width<e.element[0].scrollWidth,o="scroll"===i||"auto"===i&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:r?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var n=t(e||window),i=t.isWindow(n[0]),r=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:i,isDocument:r,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:i||r?n.width():n.outerWidth(),height:i||r?n.height():n.outerHeight()}}},t.fn.position=function(r){if(!r||!r.of)return p.apply(this,arguments);r=t.extend({},r);var f,g,m,v,y,w,b=t(r.of),x=t.position.getWithinInfo(r.within),C=t.position.getScrollInfo(x),A=(r.collision||"flip").split(" "),E={};return w=i(b),b[0].preventDefault&&(r.at="left top"),g=w.width,m=w.height,v=w.offset,y=t.extend({},v),t.each(["my","at"],function(){var t,e,n=(r[this]||"").split(" ");1===n.length&&(n=c.test(n[0])?n.concat(["center"]):h.test(n[0])?["center"].concat(n):["center","center"]),n[0]=c.test(n[0])?n[0]:"center",n[1]=h.test(n[1])?n[1]:"center",t=u.exec(n[0]),e=u.exec(n[1]),E[this]=[t?t[0]:0,e?e[0]:0],r[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===A.length&&(A[1]=A[0]),"right"===r.at[0]?y.left+=g:"center"===r.at[0]&&(y.left+=g/2),"bottom"===r.at[1]?y.top+=m:"center"===r.at[1]&&(y.top+=m/2),f=e(E.at,g,m),y.left+=f[0],y.top+=f[1],this.each(function(){var i,c,h=t(this),u=h.outerWidth(),d=h.outerHeight(),p=n(this,"marginLeft"),w=n(this,"marginTop"),k=u+p+n(this,"marginRight")+C.width,F=d+w+n(this,"marginBottom")+C.height,_=t.extend({},y),D=e(E.my,h.outerWidth(),h.outerHeight());"right"===r.my[0]?_.left-=u:"center"===r.my[0]&&(_.left-=u/2),"bottom"===r.my[1]?_.top-=d:"center"===r.my[1]&&(_.top-=d/2),_.left+=D[0],_.top+=D[1],o||(_.left=l(_.left),_.top=l(_.top)),i={marginLeft:p,marginTop:w},t.each(["left","top"],function(e,n){t.ui.position[A[e]]&&t.ui.position[A[e]][n](_,{targetWidth:g,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:i,collisionWidth:k,collisionHeight:F,offset:[f[0]+D[0],f[1]+D[1]],my:r.my,at:r.at,within:x,elem:h})}),r.using&&(c=function(t){var e=v.left-_.left,n=e+g-u,i=v.top-_.top,o=i+m-d,l={target:{element:b,left:v.left,top:v.top,width:g,height:m},element:{element:h,left:_.left,top:_.top,width:u,height:d},horizontal:0>n?"left":e>0?"right":"center",vertical:0>o?"top":i>0?"bottom":"middle"};u>g&&a(e+n)<g&&(l.horizontal="center"),d>m&&a(i+o)<m&&(l.vertical="middle"),s(a(e),a(n))>s(a(i),a(o))?l.important="horizontal":l.important="vertical",r.using.call(this,t,l)}),h.offset(t.extend(_,{using:c}))})},t.ui.position={fit:{left:function(t,e){var n,i=e.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,a=t.left-e.collisionPosition.marginLeft,l=r-a,c=a+e.collisionWidth-o-r;e.collisionWidth>o?l>0&&0>=c?(n=t.left+l+e.collisionWidth-o-r,t.left+=l-n):c>0&&0>=l?t.left=r:l>c?t.left=r+o-e.collisionWidth:t.left=r:l>0?t.left+=l:c>0?t.left-=c:t.left=s(t.left-a,t.left)},top:function(t,e){var n,i=e.within,r=i.isWindow?i.scrollTop:i.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=r-a,c=a+e.collisionHeight-o-r;e.collisionHeight>o?l>0&&0>=c?(n=t.top+l+e.collisionHeight-o-r,t.top+=l-n):c>0&&0>=l?t.top=r:l>c?t.top=r+o-e.collisionHeight:t.top=r:l>0?t.top+=l:c>0?t.top-=c:t.top=s(t.top-a,t.top)}},flip:{left:function(t,e){var n,i,r=e.within,o=r.offset.left+r.scrollLeft,s=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,c=t.left-e.collisionPosition.marginLeft,h=c-l,u=c+e.collisionWidth-s-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];0>h?(n=t.left+d+f+p+e.collisionWidth-s-o,(0>n||n<a(h))&&(t.left+=d+f+p)):u>0&&(i=t.left-e.collisionPosition.marginLeft+d+f+p-l,(i>0||a(i)<u)&&(t.left+=d+f+p))},top:function(t,e){var n,i,r=e.within,o=r.offset.top+r.scrollTop,s=r.height,l=r.isWindow?r.scrollTop:r.offset.top,c=t.top-e.collisionPosition.marginTop,h=c-l,u=c+e.collisionHeight-s-l,d="top"===e.my[1],f=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>h?(i=t.top+f+p+g+e.collisionHeight-s-o,(0>i||i<a(h))&&(t.top+=f+p+g)):u>0&&(n=t.top-e.collisionPosition.marginTop+f+p+g-l,(n>0||a(n)<u)&&(t.top+=f+p+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,n,i,r,s,a=document.getElementsByTagName("body")[0],l=document.createElement("div");e=document.createElement(a?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in i)e.style[s]=i[s];e.appendChild(l),n=a||document.documentElement,n.insertBefore(e,n.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",r=t(l).offset().left,o=r>10&&11>r,e.innerHTML="",n.removeChild(e)}()}(),t.ui.position}),/*!
 * jQuery UI Menu 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/menu/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],t):t(jQuery)}(function(t){return t.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var n=t(e.target);!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var n=t(e.currentTarget);n.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,n)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var n=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,n)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var n,i,r,o,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:s=!1,i=this.previousFilter||"",r=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),r===i?o=!0:r=i+r,n=this._filterMenuItems(r),n=o&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(r=String.fromCharCode(e.keyCode),n=this._filterMenuItems(r)),n.length?(this.focus(e,n),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))},refresh:function(){var e,n,i=this,r=this.options.icons.submenu,o=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),o.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.parent(),i=t("<span>").addClass("ui-menu-icon ui-icon "+r).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",n.attr("id"))}),e=o.add(this.element),n=e.find(this.options.items),n.not(".ui-menu-item").each(function(){var e=t(this);i._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),n.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),n.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var n,i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=e.children(".ui-menu"),n.length&&t&&/^mouse/.test(t.type)&&this._startOpening(n),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var n,i,r,o,s,a;this._hasScroll()&&(n=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,r=e.offset().top-this.activeMenu.offset().top-n-i,o=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=e.outerHeight(),0>r?this.activeMenu.scrollTop(o+r):r+a>s&&this.activeMenu.scrollTop(o+r-s+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var n=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(e,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(e),this.activeMenu=i},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,n){var i;this.active&&(i="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[e]()),this.focus(n,i)},nextPage:function(e){var n,i,r;return this.active?void(this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,r=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i-r<0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var n,i,r;return this.active?void(this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,r=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i+r>0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,n)},_filterMenuItems:function(e){var n=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=new RegExp("^"+n,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(t.trim(t(this).text()))})}})}),/*!
 * jQuery UI Autocomplete 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/autocomplete/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position","./menu"],t):t(jQuery)}(function(t){return t.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,n,i,r=this.element[0].nodeName.toLowerCase(),o="textarea"===r,s="input"===r;this.isMultiLine=o?!0:s?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||s?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return e=!0,i=!0,void(n=!0);e=!1,i=!1,n=!1;var o=t.ui.keyCode;switch(r.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",r);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",r);break;case o.UP:e=!0,this._keyEvent("previous",r);break;case o.DOWN:e=!0,this._keyEvent("next",r);break;case o.ENTER:this.menu.active&&(e=!0,r.preventDefault(),this.menu.select(r));break;case o.TAB:this.menu.active&&this.menu.select(r);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(r),r.preventDefault());break;default:n=!0,this._searchTimeout(r)}},keypress:function(i){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&i.preventDefault());if(!n){var r=t.ui.keyCode;switch(i.keyCode){case r.PAGE_UP:this._move("previousPage",i);break;case r.PAGE_DOWN:this._move("nextPage",i);break;case r.UP:this._keyEvent("previous",i);break;case r.DOWN:this._keyEvent("next",i)}}},input:function(t){return i?(i=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(i){i.target===e.element[0]||i.target===n||t.contains(n,i.target)||e.close()})})},menufocus:function(e,n){var i,r;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(r=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:r})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(r.value),i=n.item.attr("aria-label")||r.value,void(i&&t.trim(i).length&&(this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))))},menuselect:function(t,e){var n=e.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i,this.selectedItem=n})),!1!==this._trigger("select",t,{item:n})&&this._value(n.value),this.term=this._value(),this.close(t),this.selectedItem=n}}),this.liveRegion=t("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,n,i=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(n,i){i(t.ui.autocomplete.filter(e,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(e,r){i.xhr&&i.xhr.abort(),i.xhr=t.ajax({url:n,data:e,dataType:"json",success:function(t){r(t)},error:function(){r([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),n=this.menu.element.is(":visible"),i=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!n&&!i)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var n=this.menu.element.empty();this._renderMenu(n,e),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,n){var i=this;t.each(n,function(t,n){i._renderItemData(e,n)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,n){return t("<li>").text(n.label).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,n){var i=new RegExp(t.ui.autocomplete.escapeRegex(n),"i");return t.grep(e,function(t){return i.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))}}),t.ui.autocomplete}),/*!
 * jQuery UI Datepicker 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/datepicker/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core"],t):t(jQuery)}(function(t){function e(t){for(var e,n;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(n=parseInt(t.css("zIndex"),10),!isNaN(n)&&0!==n))return n;t=t.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=i(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function i(e){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(n,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(n,"mouseover",r)}function r(){t.datepicker._isDisabledDatepicker(s.inline?s.dpDiv.parent()[0]:s.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function o(e,n){t.extend(e,n);for(var i in n)null==n[i]&&(e[i]=n[i]);return e}t.extend(t.ui,{datepicker:{version:"1.11.4"}});var s;return t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,n){var i,r,o;i=e.nodeName.toLowerCase(),r="div"===i||"span"===i,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),r),o.settings=t.extend({},n||{}),"input"===i?this._connectDatepicker(e,o):r&&this._inlineDatepicker(e,o)},_newInst:function(e,n){var r=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?i(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,n){var i=t(e);n.append=t([]),n.trigger=t([]),i.hasClass(this.markerClassName)||(this._attachments(i,n),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(n),t.data(e,"datepicker",n),n.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,n){var i,r,o,s=this._get(n,"appendText"),a=this._get(n,"isRTL");n.append&&n.append.remove(),s&&(n.append=t("<span class='"+this._appendClass+"'>"+s+"</span>"),e[a?"before":"after"](n.append)),e.unbind("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),i=this._get(n,"showOn"),("focus"===i||"both"===i)&&e.focus(this._showDatepicker),("button"===i||"both"===i)&&(r=this._get(n,"buttonText"),o=this._get(n,"buttonImage"),n.trigger=t(this._get(n,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:r,title:r}):r)),e[a?"before":"after"](n.trigger),n.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,n,i,r,o=new Date(2009,11,20),s=this._get(t,"dateFormat");s.match(/[DM]/)&&(e=function(t){for(n=0,i=0,r=0;r<t.length;r++)t[r].length>n&&(n=t[r].length,i=r);return i},o.setMonth(e(this._get(t,s.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,n){var i=t(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(n.dpDiv),t.data(e,"datepicker",n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(e),n.dpDiv.css("display","block"))},_dialogDatepicker:function(e,n,i,r,s){var a,l,c,h,u,d=this._dialogInst;return d||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),o(d.settings,r||{}),n=n&&n.constructor===Date?this._formatDate(d,n):n,this._dialogInput.val(n),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+h,c/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var n,i=t(e),r=t.data(e,"datepicker");i.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===n?(r.append.remove(),r.trigger.remove(),i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===n||"span"===n)&&i.removeClass(this.markerClassName).empty(),s===r&&(s=null))},_enableDatepicker:function(e){var n,i,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===n||"span"===n)&&(i=r.children("."+this._inlineClass),i.children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var n,i,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===n||"span"===n)&&(i=r.children("."+this._inlineClass),i.children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(n){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,n,i){var r,s,a,l,c=this._getInst(e);return 2===arguments.length&&"string"==typeof n?"defaults"===n?t.extend({},t.datepicker._defaults):c?"all"===n?t.extend({},c.settings):this._get(c,n):null:(r=n||{},"string"==typeof n&&(r={},r[n]=i),void(c&&(this._curInst===c&&this._hideDatepicker(),s=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),o(c.settings,r),null!==a&&void 0!==r.dateFormat&&void 0===r.minDate&&(c.settings.minDate=this._formatDate(c,a)),null!==l&&void 0!==r.dateFormat&&void 0===r.maxDate&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),c),this._autoSize(c),this._setDate(c,s),this._updateAlternate(c),this._updateDatepicker(c))))},_changeDatepicker:function(t,e,n){this._optionDatepicker(t,e,n)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var n=this._getInst(t);n&&(this._setDate(n,e),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(t,e){var n=this._getInst(t);return n&&!n.inline&&this._setDateFromField(n,e),n?this._getDate(n):null},_doKeyDown:function(e){var n,i,r,o=t.datepicker._getInst(e.target),s=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),s=!1;break;case 13:return r=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),r[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,r[0]),n=t.datepicker._get(o,"onSelect"),n?(i=t.datepicker._formatDate(o),n.apply(o.input?o.input[0]:null,[i,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var n,i,r=t.datepicker._getInst(e.target);return t.datepicker._get(r,"constrainInput")?(n=t.datepicker._possibleChars(t.datepicker._get(r,"dateFormat")),i=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">i||!n||n.indexOf(i)>-1):void 0},_doKeyUp:function(e){var n,i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{n=t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i)),n&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(r){}return!0},_showDatepicker:function(n){if(n=n.target||n,"input"!==n.nodeName.toLowerCase()&&(n=t("input",n.parentNode)[0]),!t.datepicker._isDisabledDatepicker(n)&&t.datepicker._lastInput!==n){var i,r,s,a,l,c,h;i=t.datepicker._getInst(n),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),r=t.datepicker._get(i,"beforeShow"),s=r?r.apply(n,[n,i]):{},s!==!1&&(o(i.settings,s),i.lastVal=null,t.datepicker._lastInput=n,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(n.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(n),t.datepicker._pos[1]+=n.offsetHeight),a=!1,t(n).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),l=t.datepicker._checkOffset(i,l,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),i.inline||(c=t.datepicker._get(i,"showAnim"),h=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",e(t(n))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[c]?i.dpDiv.show(c,t.datepicker._get(i,"showOptions"),h):i.dpDiv[c||"show"](c?h:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,s=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var n,i=this._getNumberOfMonths(e),o=i[1],a=17,l=e.dpDiv.find("."+this._dayOverClass+" a");l.length>0&&r.apply(l.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",a*o+"em"),e.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(n=e.yearshtml,setTimeout(function(){n===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),n=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,n,i){var r=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(i?0:t(document).scrollLeft()),c=document.documentElement.clientHeight+(i?0:t(document).scrollTop());return n.left-=this._get(e,"isRTL")?r-s:0,n.left-=i&&n.left===e.input.offset().left?t(document).scrollLeft():0,n.top-=i&&n.top===e.input.offset().top+a?t(document).scrollTop():0,n.left-=Math.min(n.left,n.left+r>l&&l>r?Math.abs(n.left+r-l):0),n.top-=Math.min(n.top,n.top+o>c&&c>o?Math.abs(o+a):0),n},_findPos:function(e){for(var n,i=this._getInst(e),r=this._get(i,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[r?"previousSibling":"nextSibling"];return n=t(e).offset(),[n.left,n.top]},_hideDatepicker:function(e){var n,i,r,o,s=this._curInst;!s||e&&s!==t.data(e,"datepicker")||this._datepickerShowing&&(n=this._get(s,"showAnim"),i=this._get(s,"duration"),r=function(){t.datepicker._tidyDialog(s)},t.effects&&(t.effects.effect[n]||t.effects[n])?s.dpDiv.hide(n,t.datepicker._get(s,"showOptions"),i,r):s.dpDiv["slideDown"===n?"slideUp":"fadeIn"===n?"fadeOut":"hide"](n?i:null,r),n||r(),this._datepickerShowing=!1,o=this._get(s,"onClose"),o&&o.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var n=t(e.target),i=t.datepicker._getInst(n[0]);(n[0].id!==t.datepicker._mainDivId&&0===n.parents("#"+t.datepicker._mainDivId).length&&!n.hasClass(t.datepicker.markerClassName)&&!n.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||n.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==i)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,n,i){var r=t(e),o=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(o,n+("M"===i?this._get(o,"showCurrentAtPos"):0),i),this._updateDatepicker(o))},_gotoToday:function(e){var n,i=t(e),r=this._getInst(i[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(n=new Date,r.selectedDay=n.getDate(),r.drawMonth=r.selectedMonth=n.getMonth(),r.drawYear=r.selectedYear=n.getFullYear()),this._notifyChange(r),this._adjustDate(i)},_selectMonthYear:function(e,n,i){var r=t(e),o=this._getInst(r[0]);o["selected"+("M"===i?"Month":"Year")]=o["draw"+("M"===i?"Month":"Year")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(r)},_selectDay:function(e,n,i,r){var o,s=t(e);t(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(o=this._getInst(s[0]),o.selectedDay=o.currentDay=t("a",r).html(),o.selectedMonth=o.currentMonth=n,o.selectedYear=o.currentYear=i,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var n=t(e);this._selectDate(n,"")},_selectDate:function(e,n){var i,r=t(e),o=this._getInst(r[0]);n=null!=n?n:this._formatDate(o),o.input&&o.input.val(n),this._updateAlternate(o),i=this._get(o,"onSelect"),i?i.apply(o.input?o.input[0]:null,[n,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var n,i,r,o=this._get(e,"altField");o&&(n=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),r=this.formatDate(n,i,this._getFormatConfig(e)),t(o).each(function(){t(this).val(r)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1},parseDate:function(e,n,i){if(null==e||null==n)throw"Invalid arguments";if(n="object"==typeof n?n.toString():n+"",""===n)return null;var r,o,s,a,l=0,c=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff,h="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),u=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,d=(i?i.dayNames:null)||this._defaults.dayNames,f=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,p=(i?i.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,y=-1,w=!1,b=function(t){var n=r+1<e.length&&e.charAt(r+1)===t;return n&&r++,n},x=function(t){var e=b(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,r="y"===t?i:1,o=new RegExp("^\\d{"+r+","+i+"}"),s=n.substring(l).match(o);if(!s)throw"Missing number at position "+l;return l+=s[0].length,parseInt(s[0],10)},C=function(e,i,r){var o=-1,s=t.map(b(e)?r:i,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(s,function(t,e){var i=e[1];return n.substr(l,i.length).toLowerCase()===i.toLowerCase()?(o=e[0],l+=i.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},A=function(){if(n.charAt(l)!==e.charAt(r))throw"Unexpected literal at position "+l;l++};for(r=0;r<e.length;r++)if(w)"'"!==e.charAt(r)||b("'")?A():w=!1;else switch(e.charAt(r)){case"d":v=x("d");break;case"D":C("D",u,d);break;case"o":y=x("o");break;case"m":m=x("m");break;case"M":m=C("M",f,p);break;case"y":g=x("y");break;case"@":a=new Date(x("@")),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((x("!")-this._ticksTo1970)/1e4),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"'":b("'")?A():w=!0;break;default:A()}if(l<n.length&&(s=n.substr(l),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h>=g?0:-100)),y>-1)for(m=1,v=y;;){if(o=this._getDaysInMonth(g,m-1),o>=v)break;m++,v-=o}if(a=this._daylightSavingAdjust(new Date(g,m-1,v)),a.getFullYear()!==g||a.getMonth()+1!==m||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,n){if(!e)return"";var i,r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,o=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,a=(n?n.monthNames:null)||this._defaults.monthNames,l=function(e){var n=i+1<t.length&&t.charAt(i+1)===e;return n&&i++,n},c=function(t,e,n){var i=""+e;if(l(t))for(;i.length<n;)i="0"+i;return i},h=function(t,e,n,i){return l(t)?i[e]:n[e]},u="",d=!1;if(e)for(i=0;i<t.length;i++)if(d)"'"!==t.charAt(i)||l("'")?u+=t.charAt(i):d=!1;else switch(t.charAt(i)){case"d":u+=c("d",e.getDate(),2);break;case"D":u+=h("D",e.getDay(),r,o);break;case"o":u+=c("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=c("m",e.getMonth()+1,2);break;case"M":u+=h("M",e.getMonth(),s,a);break;case"y":u+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(i)}return u},_possibleChars:function(t){var e,n="",i=!1,r=function(n){var i=e+1<t.length&&t.charAt(e+1)===n;return i&&e++,i};for(e=0;e<t.length;e++)if(i)"'"!==t.charAt(e)||r("'")?n+=t.charAt(e):i=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":n+="0123456789";break;case"D":case"M":return null;case"'":r("'")?n+="'":i=!0;break;default:n+=t.charAt(e)}return n},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var n=this._get(t,"dateFormat"),i=t.lastVal=t.input?t.input.val():null,r=this._getDefaultDate(t),o=r,s=this._getFormatConfig(t);try{o=this.parseDate(n,i,s)||r}catch(a){i=e?"":i}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=i?o.getDate():0,t.currentMonth=i?o.getMonth():0,t.currentYear=i?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,n,i){var r=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(n){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),n,t.datepicker._getFormatConfig(e))}catch(i){}for(var r=(n.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=r.getFullYear(),s=r.getMonth(),a=r.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=l.exec(n);c;){switch(c[2]||"d"){case"d":case"D":a+=parseInt(c[1],10);break;case"w":case"W":a+=7*parseInt(c[1],10);break;case"m":case"M":s+=parseInt(c[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s));break;case"y":case"Y":o+=parseInt(c[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s))}c=l.exec(n)}return new Date(o,s,a)},s=null==n||""===n?i:"string"==typeof n?o(n):"number"==typeof n?isNaN(n)?i:r(n):new Date(n.getTime());return s=s&&"Invalid Date"===s.toString()?i:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,n){var i=!e,r=t.selectedMonth,o=t.selectedYear,s=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=s.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=s.getMonth(),t.drawYear=t.selectedYear=t.currentYear=s.getFullYear(),r===t.selectedMonth&&o===t.selectedYear||n||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(i?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var n=this._get(e,"stepMonths"),i="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(i,-n,"M")},next:function(){t.datepicker._adjustDate(i,+n,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(i)},selectDay:function(){return t.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(i,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,n,i,r,o,s,a,l,c,h,u,d,f,p,g,m,v,y,w,b,x,C,A,E,k,F,_,D,S,$,T,B,M,L,R,I,P,N,O,j=new Date,z=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),H=this._get(t,"isRTL"),W=this._get(t,"showButtonPanel"),U=this._get(t,"hideIfNoPrevNext"),q=this._get(t,"navigationAsDateFormat"),Y=this._getNumberOfMonths(t),G=this._get(t,"showCurrentAtPos"),V=this._get(t,"stepMonths"),K=1!==Y[0]||1!==Y[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),J=t.drawMonth-G,tt=t.drawYear;if(0>J&&(J+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-Y[0]*Y[1]+1,Q.getDate())),e=Z&&Z>e?Z:e;this._daylightSavingAdjust(new Date(tt,J,1))>e;)J--,0>J&&(J=11,tt--);for(t.drawMonth=J,t.drawYear=tt,n=this._get(t,"prevText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,J-V,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,tt,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(H?"e":"w")+"'>"+n+"</span></a>":U?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(H?"e":"w")+"'>"+n+"</span></a>",r=this._get(t,"nextText"),r=q?this.formatDate(r,this._daylightSavingAdjust(new Date(tt,J+V,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,tt,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(H?"w":"e")+"'>"+r+"</span></a>":U?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(H?"w":"e")+"'>"+r+"</span></a>",s=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?X:z,s=q?this.formatDate(s,a,this._getFormatConfig(t)):s,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",c=W?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(H?l:"")+(this._isInRange(t,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(H?"":l)+"</div>":"",h=parseInt(this._get(t,"firstDay"),10),h=isNaN(h)?0:h,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),f=this._get(t,"dayNamesMin"),p=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),w=this._getDefaultDate(t),b="",C=0;C<Y[0];C++){for(A="",this.maxRows=4,E=0;E<Y[1];E++){if(k=this._daylightSavingAdjust(new Date(tt,J,t.selectedDay)),F=" ui-corner-all",_="",K){if(_+="<div class='ui-datepicker-group",Y[1]>1)switch(E){case 0:_+=" ui-datepicker-group-first",F=" ui-corner-"+(H?"right":"left");break;case Y[1]-1:_+=" ui-datepicker-group-last",F=" ui-corner-"+(H?"left":"right");break;default:_+=" ui-datepicker-group-middle",F=""}_+="'>"}for(_+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+F+"'>"+(/all|left/.test(F)&&0===C?H?o:i:"")+(/all|right/.test(F)&&0===C?H?i:o:"")+this._generateMonthYearHeader(t,J,tt,Z,Q,C>0||E>0,p,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",D=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;7>x;x++)S=(x+h)%7,D+="<th scope='col'"+((x+h+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[S]+"'>"+f[S]+"</span></th>";for(_+=D+"</tr></thead><tbody>",$=this._getDaysInMonth(tt,J),tt===t.selectedYear&&J===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,$)),T=(this._getFirstDayOfMonth(tt,J)-h+7)%7,B=Math.ceil((T+$)/7),M=K&&this.maxRows>B?this.maxRows:B,this.maxRows=M,L=this._daylightSavingAdjust(new Date(tt,J,1-T)),R=0;M>R;R++){for(_+="<tr>",I=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(L)+"</td>":"",x=0;7>x;x++)P=m?m.apply(t.input?t.input[0]:null,[L]):[!0,""],N=L.getMonth()!==J,O=N&&!y||!P[0]||Z&&Z>L||Q&&L>Q,I+="<td class='"+((x+h+6)%7>=5?" ui-datepicker-week-end":"")+(N?" ui-datepicker-other-month":"")+(L.getTime()===k.getTime()&&J===t.selectedMonth&&t._keyEvent||w.getTime()===L.getTime()&&w.getTime()===k.getTime()?" "+this._dayOverClass:"")+(O?" "+this._unselectableClass+" ui-state-disabled":"")+(N&&!v?"":" "+P[1]+(L.getTime()===X.getTime()?" "+this._currentClass:"")+(L.getTime()===z.getTime()?" ui-datepicker-today":""))+"'"+(N&&!v||!P[2]?"":" title='"+P[2].replace(/'/g,"&#39;")+"'")+(O?"":" data-handler='selectDay' data-event='click' data-month='"+L.getMonth()+"' data-year='"+L.getFullYear()+"'")+">"+(N&&!v?"&#xa0;":O?"<span class='ui-state-default'>"+L.getDate()+"</span>":"<a class='ui-state-default"+(L.getTime()===z.getTime()?" ui-state-highlight":"")+(L.getTime()===X.getTime()?" ui-state-active":"")+(N?" ui-priority-secondary":"")+"' href='#'>"+L.getDate()+"</a>")+"</td>",L.setDate(L.getDate()+1),L=this._daylightSavingAdjust(L);_+=I+"</tr>"}J++,J>11&&(J=0,tt++),_+="</tbody></table>"+(K?"</div>"+(Y[0]>0&&E===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),A+=_}b+=A}return b+=c,t._keyEvent=!1,b},_generateMonthYearHeader:function(t,e,n,i,r,o,s,a){var l,c,h,u,d,f,p,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),w="<div class='ui-datepicker-title'>",b="";if(o||!m)b+="<span class='ui-datepicker-month'>"+s[e]+"</span>";else{for(l=i&&i.getFullYear()===n,c=r&&r.getFullYear()===n,b+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!l||h>=i.getMonth())&&(!c||h<=r.getMonth())&&(b+="<option value='"+h+"'"+(h===e?" selected='selected'":"")+">"+a[h]+"</option>");b+="</select>"}if(y||(w+=b+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)w+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),f=function(t){var e=t.match(/c[+\-].*/)?n+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},p=f(u[0]),g=Math.max(p,f(u[1]||"")),p=i?Math.max(p,i.getFullYear()):p,g=r?Math.min(g,r.getFullYear()):g,
t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=p;p++)t.yearshtml+="<option value='"+p+"'"+(p===n?" selected='selected'":"")+">"+p+"</option>";t.yearshtml+="</select>",w+=t.yearshtml,t.yearshtml=null}return w+=this._get(t,"yearSuffix"),y&&(w+=(!o&&m&&v?"":"&#xa0;")+b),w+="</div>"},_adjustInstDate:function(t,e,n){var i=t.drawYear+("Y"===n?e:0),r=t.drawMonth+("M"===n?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(i,r))+("D"===n?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(i,r,o)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),("M"===n||"Y"===n)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var n=this._getMinMaxDate(t,"min"),i=this._getMinMaxDate(t,"max"),r=n&&n>e?n:e;return i&&r>i?i:r},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,n,i){var r=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(n,i+(0>e?e:r[0]*r[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var n,i,r=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),s=null,a=null,l=this._get(t,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),s=parseInt(n[0],10),a=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(s+=i),n[1].match(/[+\-].*/)&&(a+=i)),(!r||e.getTime()>=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!s||e.getFullYear()>=s)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,n,i){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(i,n,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),r,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var n=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(n)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(n)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(n))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.11.4",t.datepicker}),/*!
 * jQuery UI Mouse 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/mouse/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./widget"],t):t(jQuery)}(function(t){var e=!1;return t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(n){return!0===t.data(n.target,e.widgetName+".preventClickEvent")?(t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!e){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var i=this,r=1===n.which,o="string"==typeof this.options.cancel&&n.target.nodeName?t(n.target).closest(this.options.cancel).length:!1;return r&&!o&&this._mouseCapture(n)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=this._mouseStart(n)!==!1,!this._mouseStarted)?(n.preventDefault(),!0):(!0===t.data(n.target,this.widgetName+".preventClickEvent")&&t.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(n){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&t.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),e=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}),/*!
 * jQuery UI Draggable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/draggable/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.draggable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var n=this.options;return this._blurActiveElement(e),this.helper||n.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blockFrames(n.iframeFix===!0?"iframe":n.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var n=this.document[0];if(this.handleElement.is(e.target))try{n.activeElement&&"body"!==n.activeElement.nodeName.toLowerCase()&&t(n.activeElement).blur()}catch(i){}},_mouseStart:function(e){var n=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(this._trigger("drag",e,i)===!1)return this._mouseUp({}),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var n=this,i=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(i=t.ui.ddmanager.drop(this,e)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",e)!==!1&&n._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper),r=i?t(n.helper.apply(this.element[0],[e])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,r=this.options,o=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):r.containment.constructor===Array?void(this.containment=r.containment):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),n=t(r.containment),i=n[0],void(i&&(e=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(e?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var n="absolute"===t?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:e.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(t,e){var n,i,r,o,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,c=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,t.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),t.pageY-this.offset.click.top<n[1]&&(c=n[1]+this.offset.click.top),t.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),t.pageY-this.offset.click.top>n[3]&&(c=n[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-s.grid[0]:o+s.grid[0]:o),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,n,i){return i=i||this._uiHash(),t.ui.plugin.call(this,e,[n,i,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,n,i){var r=t.extend({},n,{item:i.element});i.sortables=[],t(i.options.connectToSortable).each(function(){var n=t(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",e,r))})},stop:function(e,n,i){var r=t.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,t.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,r))})},drag:function(e,n,i){t.each(i.sortables,function(){var r=!1,o=this;o.positionAbs=i.positionAbs,o.helperProportions=i.helperProportions,o.offset.click=i.offset.click,o._intersectsWith(o.containerCache)&&(r=!0,t.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(r=!1),r})),r?(o.isOver||(o.isOver=1,i._parent=n.helper.parent(),o.currentItem=n.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return n.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=i.offset.click.top,o.offset.click.left=i.offset.click.left,o.offset.parent.left-=i.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=i.offset.parent.top-o.offset.parent.top,i._trigger("toSortable",e),i.dropped=o.element,t.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,o.fromOutside=i),o.currentItem&&(o._mouseDrag(e),n.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(e),n.position=i._generatePosition(e,!0),i._trigger("fromSortable",e),i.dropped=!1,t.each(i.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,n,i){var r=t("body"),o=i.options;r.css("cursor")&&(o._cursor=r.css("cursor")),r.css("cursor",o.cursor)},stop:function(e,n,i){var r=i.options;r._cursor&&t("body").css("cursor",r._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,n,i){var r=t(n.helper),o=i.options;r.css("opacity")&&(o._opacity=r.css("opacity")),r.css("opacity",o.opacity)},stop:function(e,n,i){var r=i.options;r._opacity&&t(n.helper).css("opacity",r._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,n,i){var r=i.options,o=!1,s=i.scrollParentNotHidden[0],a=i.document[0];s!==a&&"HTML"!==s.tagName?(r.axis&&"x"===r.axis||(i.overflowOffset.top+s.offsetHeight-e.pageY<r.scrollSensitivity?s.scrollTop=o=s.scrollTop+r.scrollSpeed:e.pageY-i.overflowOffset.top<r.scrollSensitivity&&(s.scrollTop=o=s.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(i.overflowOffset.left+s.offsetWidth-e.pageX<r.scrollSensitivity?s.scrollLeft=o=s.scrollLeft+r.scrollSpeed:e.pageX-i.overflowOffset.left<r.scrollSensitivity&&(s.scrollLeft=o=s.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(e.pageY-t(a).scrollTop()<r.scrollSensitivity?o=t(a).scrollTop(t(a).scrollTop()-r.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<r.scrollSensitivity&&(o=t(a).scrollTop(t(a).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(e.pageX-t(a).scrollLeft()<r.scrollSensitivity?o=t(a).scrollLeft(t(a).scrollLeft()-r.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<r.scrollSensitivity&&(o=t(a).scrollLeft(t(a).scrollLeft()+r.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,n,i){var r=i.options;i.snapElements=[],t(r.snap.constructor!==String?r.snap.items||":data(ui-draggable)":r.snap).each(function(){var e=t(this),n=e.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:n.top,left:n.left})})},drag:function(e,n,i){var r,o,s,a,l,c,h,u,d,f,p=i.options,g=p.snapTolerance,m=n.offset.left,v=m+i.helperProportions.width,y=n.offset.top,w=y+i.helperProportions.height;for(d=i.snapElements.length-1;d>=0;d--)l=i.snapElements[d].left-i.margins.left,c=l+i.snapElements[d].width,h=i.snapElements[d].top-i.margins.top,u=h+i.snapElements[d].height,l-g>v||m>c+g||h-g>w||y>u+g||!t.contains(i.snapElements[d].item.ownerDocument,i.snapElements[d].item)?(i.snapElements[d].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[d].item})),i.snapElements[d].snapping=!1):("inner"!==p.snapMode&&(r=Math.abs(h-w)<=g,o=Math.abs(u-y)<=g,s=Math.abs(l-v)<=g,a=Math.abs(c-m)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:u,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c}).left)),f=r||o||s||a,"outer"!==p.snapMode&&(r=Math.abs(h-y)<=g,o=Math.abs(u-w)<=g,s=Math.abs(l-m)<=g,a=Math.abs(c-v)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:u-i.helperProportions.height,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c-i.helperProportions.width}).left)),!i.snapElements[d].snapping&&(r||o||s||a||f)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[d].item})),i.snapElements[d].snapping=r||o||s||a||f)}}),t.ui.plugin.add("draggable","stack",{start:function(e,n,i){var r,o=i.options,s=t.makeArray(t(o.stack)).sort(function(e,n){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(n).css("zIndex"),10)||0)});s.length&&(r=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(e){t(this).css("zIndex",r+e)}),this.css("zIndex",r+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,n,i){var r=t(n.helper),o=i.options;r.css("zIndex")&&(o._zIndex=r.css("zIndex")),r.css("zIndex",o.zIndex)},stop:function(e,n,i){var r=i.options;r._zIndex&&t(n.helper).css("zIndex",r._zIndex)}}),t.ui.draggable}),/*!
 * jQuery UI Effects 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/category/effects-core/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){var e="ui-effects-",n=t;/*!
 * jQuery Color Animations v2.1.2
 * https://github.com/jquery/jquery-color
 *
 * Copyright 2014 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * Date: Wed Jan 16 08:47:09 2013 -0600
 */
return t.effects={effect:{}},function(t,e){function n(t,e,n){var i=u[e.type]||{};return null==t?n||!e.def?null:e.def:(t=i.floor?~~t:parseFloat(t),isNaN(t)?e.def:i.mod?(t+i.mod)%i.mod:0>t?0:i.max<t?i.max:t)}function i(e){var n=c(),i=n._rgba=[];return e=e.toLowerCase(),p(l,function(t,r){var o,s=r.re.exec(e),a=s&&r.parse(s),l=r.space||"rgba";return a?(o=n[l](a),n[h[l].cache]=o[h[l].cache],i=n._rgba=o._rgba,!1):void 0}),i.length?("0,0,0,0"===i.join()&&t.extend(i,o.transparent),n):o[e]}function r(t,e,n){return n=(n+1)%1,1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}var o,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],c=t.Color=function(e,n,i,r){return new t.Color.fn.parse(e,n,i,r)},h={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=c.support={},f=t("<p>")[0],p=t.each;f.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=f.style.backgroundColor.indexOf("rgba")>-1,p(h,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),c.fn=t.extend(c.prototype,{parse:function(r,s,a,l){if(r===e)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=t(r).css(s),s=e);var u=this,d=t.type(r),f=this._rgba=[];return s!==e&&(r=[r,s,a,l],d="array"),"string"===d?this.parse(i(r)||o._default):"array"===d?(p(h.rgba.props,function(t,e){f[e.idx]=n(r[e.idx],e)}),this):"object"===d?(r instanceof c?p(h,function(t,e){r[e.cache]&&(u[e.cache]=r[e.cache].slice())}):p(h,function(e,i){var o=i.cache;p(i.props,function(t,e){if(!u[o]&&i.to){if("alpha"===t||null==r[t])return;u[o]=i.to(u._rgba)}u[o][e.idx]=n(r[t],e,!0)}),u[o]&&t.inArray(null,u[o].slice(0,3))<0&&(u[o][3]=1,i.from&&(u._rgba=i.from(u[o])))}),this):void 0},is:function(t){var e=c(t),n=!0,i=this;return p(h,function(t,r){var o,s=e[r.cache];return s&&(o=i[r.cache]||r.to&&r.to(i._rgba)||[],p(r.props,function(t,e){return null!=s[e.idx]?n=s[e.idx]===o[e.idx]:void 0})),n}),n},_space:function(){var t=[],e=this;return p(h,function(n,i){e[i.cache]&&t.push(n)}),t.pop()},transition:function(t,e){var i=c(t),r=i._space(),o=h[r],s=0===this.alpha()?c("transparent"):this,a=s[o.cache]||o.to(s._rgba),l=a.slice();return i=i[o.cache],p(o.props,function(t,r){var o=r.idx,s=a[o],c=i[o],h=u[r.type]||{};null!==c&&(null===s?l[o]=c:(h.mod&&(c-s>h.mod/2?s+=h.mod:s-c>h.mod/2&&(s-=h.mod)),l[o]=n((c-s)*e+s,r)))}),this[r](l)},blend:function(e){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),r=c(e)._rgba;return c(t.map(n,function(t,e){return(1-i)*r[e]+i*t}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===n[3]&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===n[3]&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),i=n.pop();return e&&n.push(~~(255*i)),"#"+t.map(n,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),c.fn.parse.prototype=c.fn,h.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,s=t[3],a=Math.max(i,r,o),l=Math.min(i,r,o),c=a-l,h=a+l,u=.5*h;return e=l===a?0:i===a?60*(r-o)/c+360:r===a?60*(o-i)/c+120:60*(i-r)/c+240,n=0===c?0:.5>=u?c/h:c/(2-h),[Math.round(e)%360,n,u,null==s?1:s]},h.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,n=t[1],i=t[2],o=t[3],s=.5>=i?i*(1+n):i+n-i*n,a=2*i-s;return[Math.round(255*r(a,s,e+1/3)),Math.round(255*r(a,s,e)),Math.round(255*r(a,s,e-1/3)),o]},p(h,function(i,r){var o=r.props,s=r.cache,l=r.to,h=r.from;c.fn[i]=function(i){if(l&&!this[s]&&(this[s]=l(this._rgba)),i===e)return this[s].slice();var r,a=t.type(i),u="array"===a||"object"===a?i:arguments,d=this[s].slice();return p(o,function(t,e){var i=u["object"===a?t:e.idx];null==i&&(i=d[e.idx]),d[e.idx]=n(i,e)}),h?(r=c(h(d)),r[s]=d,r):c(d)},p(o,function(e,n){c.fn[e]||(c.fn[e]=function(r){var o,s=t.type(r),l="alpha"===e?this._hsla?"hsla":"rgba":i,c=this[l](),h=c[n.idx];return"undefined"===s?h:("function"===s&&(r=r.call(this,h),s=t.type(r)),null==r&&n.empty?this:("string"===s&&(o=a.exec(r),o&&(r=h+parseFloat(o[2])*("+"===o[1]?1:-1))),c[n.idx]=r,this[l](c)))})})}),c.hook=function(e){var n=e.split(" ");p(n,function(e,n){t.cssHooks[n]={set:function(e,r){var o,s,a="";if("transparent"!==r&&("string"!==t.type(r)||(o=i(r)))){if(r=c(o||r),!d.rgba&&1!==r._rgba[3]){for(s="backgroundColor"===n?e.parentNode:e;(""===a||"transparent"===a)&&s&&s.style;)try{a=t.css(s,"backgroundColor"),s=s.parentNode}catch(l){}r=r.blend(a&&"transparent"!==a?a:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=c(e.elem,n),e.end=c(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}})},c.hook(s),t.cssHooks.borderColor={expand:function(t){var e={};return p(["Top","Right","Bottom","Left"],function(n,i){e["border"+i+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(n),function(){function e(e){var n,i,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)n=r[i],"string"==typeof r[n]&&(o[t.camelCase(n)]=r[n]);else for(n in r)"string"==typeof r[n]&&(o[n]=r[n]);return o}function i(e,n){var i,r,s={};for(i in n)r=n[i],e[i]!==r&&(o[i]||(t.fx.step[i]||!isNaN(parseFloat(r)))&&(s[i]=r));return s}var r=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(n.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,s,a){var l=t.speed(o,s,a);return this.queue(function(){var o,s=t(this),a=s.attr("class")||"",c=l.children?s.find("*").addBack():s;c=c.map(function(){var n=t(this);return{el:n,start:e(this)}}),o=function(){t.each(r,function(t,e){n[e]&&s[e+"Class"](n[e])})},o(),c=c.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),s.attr("class",a),c=c.map(function(){var e=this,n=t.Deferred(),i=t.extend({},l,{queue:!1,complete:function(){n.resolve(e)}});return this.el.animate(this.diff,i),n.promise()}),t.when.apply(t,c.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(s[0])})})},t.fn.extend({addClass:function(e){return function(n,i,r,o){return i?t.effects.animateClass.call(this,{add:n},i,r,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(n,i,r,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:n},i,r,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(n,i,r,o,s){return"boolean"==typeof i||void 0===i?r?t.effects.animateClass.call(this,i?{add:n}:{remove:n},r,o,s):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:n},i,r,o)}}(t.fn.toggleClass),switchClass:function(e,n,i,r,o){return t.effects.animateClass.call(this,{add:n,remove:e},i,r,o)}})}(),function(){function n(e,n,i,r){return t.isPlainObject(e)&&(n=e,e=e.effect),e={effect:e},null==n&&(n={}),t.isFunction(n)&&(r=n,i=null,n={}),("number"==typeof n||t.fx.speeds[n])&&(r=i,i=n,n={}),t.isFunction(i)&&(r=i,i=null),n&&t.extend(e,n),i=i||n.duration,e.duration=t.fx.off?0:"number"==typeof i?i:i in t.fx.speeds?t.fx.speeds[i]:t.fx.speeds._default,e.complete=r||n.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.11.4",save:function(t,n){for(var i=0;i<n.length;i++)null!==n[i]&&t.data(e+n[i],t[0].style[n[i]])},restore:function(t,n){var i,r;for(r=0;r<n.length;r++)null!==n[r]&&(i=t.data(e+n[r]),void 0===i&&(i=""),t.css(n[r],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var n,i;switch(t[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=t[0]/e.height}switch(t[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=t[1]/e.width}return{x:i,y:n}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var n={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},i=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(s){o=document.body}return e.wrap(i),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),i=e.parent(),"static"===e.css("position")?(i.css({position:"relative"}),e.css({position:"relative"})):(t.extend(n,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,i){n[i]=e.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(r),i.css(n).show()},removeWrapper:function(e){var n=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===n||t.contains(e[0],n))&&t(n).focus()),e},setTransition:function(e,n,i,r){return r=r||{},t.each(n,function(t,n){var o=e.cssUnit(n);o[0]>0&&(r[n]=o[0]*i+o[1])}),r}}),t.fn.extend({effect:function(){function e(e){function n(){t.isFunction(o)&&o.call(r[0]),t.isFunction(e)&&e()}var r=t(this),o=i.complete,a=i.mode;(r.is(":hidden")?"hide"===a:"show"===a)?(r[a](),n()):s.call(r[0],i,n)}var i=n.apply(this,arguments),r=i.mode,o=i.queue,s=t.effects.effect[i.effect];return t.fx.off||!s?r?this[r](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(i(e))return t.apply(this,arguments);var r=n.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(t.fn.show),hide:function(t){return function(e){if(i(e))return t.apply(this,arguments);var r=n.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(t.fn.hide),toggle:function(t){return function(e){if(i(e)||"boolean"==typeof e)return t.apply(this,arguments);var r=n.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(t.fn.toggle),cssUnit:function(e){var n=this.css(e),i=[];return t.each(["em","px","%","pt"],function(t,e){n.indexOf(e)>0&&(i=[parseFloat(n),e])}),i}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,n){e[n]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,n){t.easing["easeIn"+e]=n,t.easing["easeOut"+e]=function(t){return 1-n(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?n(2*t)/2:1-n(-2*t+2)/2}})}(),t.effects}),/*!
 * jQuery UI Effects Highlight 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/highlight-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.highlight=function(e,n){var i=t(this),r=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(i,e.mode||"show"),s={backgroundColor:i.css("backgroundColor")};"hide"===o&&(s.opacity=0),t.effects.save(i,r),i.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&i.hide(),t.effects.restore(i,r),n()}})}}),/*!
 * jQuery UI Sortable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/sortable/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.sortable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,n){return t>=e&&e+n>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),t.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,n){var i=null,r=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(i=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(i=t(e.target)),i&&(!this.options.handle||n||(t(this.options.handle,i).find("*").addBack().each(function(){this===e.target&&(r=!0)}),r))?(this.currentItem=i,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(e,n,i){var r,o,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=t("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var n,i,r,o,s=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-this.document.scrollTop()<s.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-s.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<s.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+s.scrollSpeed)),e.pageX-this.document.scrollLeft()<s.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-s.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<s.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+s.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(i=this.items[n],r=i.item[0],o=this._intersectsWithPointer(i),o&&i.instance===this.currentContainer&&r!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==r&&!t.contains(this.placeholder[0],r)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],r):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(e,i),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,n){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var i=this,r=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){i._clear(e)})}else this._clear(e,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},t(n).each(function(){var n=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);n&&i.push((e.key||n[1]+"[]")+"="+(e.key&&e.expression?n[1]:n[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},n.each(function(){i.push(t(e.item||this).attr(e.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,n=e+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=t.left,s=o+t.width,a=t.top,l=a+t.height,c=this.offset.click.top,h=this.offset.click.left,u="x"===this.options.axis||i+c>a&&l>i+c,d="y"===this.options.axis||e+h>o&&s>e+h,f=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?f:o<e+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),i=e&&n,r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return i?this.floating?o&&"right"===o||"down"===r?2:1:r&&("down"===r?2:1):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function n(){a.push(this)}var i,r,o,s,a=[],l=[],c=this._connectWith();if(c&&e)for(i=c.length-1;i>=0;i--)for(o=t(c[i],this.document[0]),r=o.length-1;r>=0;r--)s=t.data(o[r],this.widgetFullName),s&&s!==this&&!s.options.disabled&&l.push([t.isFunction(s.options.items)?s.options.items.call(s.element):t(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var n=0;n<e.length;n++)if(e[n]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var n,i,r,o,s,a,l,c,h=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(n=d.length-1;n>=0;n--)for(r=t(d[n],this.document[0]),i=r.length-1;i>=0;i--)o=t.data(r[i],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(n=u.length-1;n>=0;n--)for(s=u[n][1],a=u[n][0],i=0,c=a.length;c>i;i++)l=t(a[i]),l.data(this.widgetName+"-item",s),h.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,i,r,o;for(n=this.items.length-1;n>=0;n--)i=this.items[n],i.instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?t(this.options.toleranceElement,i.item):i.item,e||(i.width=r.outerWidth(),i.height=r.outerHeight()),o=r.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var n,i=e.options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=e.currentItem[0].nodeName.toLowerCase(),r=t("<"+i+">",e.document[0]).addClass(n||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===i?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(r)):"tr"===i?e._createTrPlaceholder(e.currentItem,r):"img"===i&&r.attr("src",e.currentItem.attr("src")),n||r.css("visibility","hidden"),r},update:function(t,r){(!n||i.forcePlaceholderSize)&&(r.height()||r.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(i.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),i.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,n){var i=this;e.children().each(function(){t("<td>&#160;</td>",i.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(e){var n,i,r,o,s,a,l,c,h,u,d=null,f=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(d&&t.contains(this.containers[n].element[0],d.element[0]))continue;d=this.containers[n],f=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(r=1e4,o=null,h=d.floating||this._isFloating(this.currentItem),s=h?"left":"top",a=h?"width":"height",u=h?"clientX":"clientY",i=this.items.length-1;i>=0;i--)t.contains(this.containers[f].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[s],c=!1,e[u]-l>this.items[i][a]/2&&(c=!0),Math.abs(e[u]-l)<r&&(r=Math.abs(e[u]-l),o=this.items[i],this.direction=c?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[f].element,!0),this._trigger("change",e,this._uiHash()),this.containers[f]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1}},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||t("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!i[0].style.width||n.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||n.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),("document"===r.containment||"window"===r.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===r.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===r.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(e=t(r.containment)[0],n=t(r.containment).offset(),i="hidden"!==t(e).css("overflow"),this.containment=[n.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,n){n||(n=this.position);var i="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i}},_generatePosition:function(e){var n,i,r=this.options,o=e.pageX,s=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),r.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-r.grid[1]:n+r.grid[1]:n,i=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-r.grid[0]:i+r.grid[0]:i)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,n,i){n?n[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(t,e){function n(t,e,n){return function(i){n._trigger(t,i,e._uiHash(e))}}this.reverting=!1;var i,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&r.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||r.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(r.push(function(t){this._trigger("remove",t,this._uiHash())}),r.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||r.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<r.length;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var n=e||this;return{helper:n.helper,placeholder:n.placeholder||t([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:e?e.element:null}}})}),function(t,e){"use strict";t.rails!==e&&t.error("jquery-ujs has already been loaded!");var n,i=t(document);t.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not(form button), button[data-confirm]:not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return t("meta[name=csrf-token]").attr("content")},csrfParam:function(){return t("meta[name=csrf-param]").attr("content")},CSRFProtection:function(t){var e=n.csrfToken();e&&t.setRequestHeader("X-CSRF-Token",e)},refreshCSRFTokens:function(){t('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},fire:function(e,n,i){var r=t.Event(n);return e.trigger(r,i),r.result!==!1},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t[0].href},isRemote:function(t){return t.data("remote")!==e&&t.data("remote")!==!1},handleRemote:function(i){var r,o,s,a,l,c;if(n.fire(i,"ajax:before")){if(a=i.data("with-credentials")||null,l=i.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,i.is("form")){r=i.attr("method"),o=i.attr("action"),s=i.serializeArray();var h=i.data("ujs:submit-button");h&&(s.push(h),i.data("ujs:submit-button",null))}else i.is(n.inputChangeSelector)?(r=i.data("method"),o=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(r=i.data("method")||"get",o=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):(r=i.data("method"),o=n.href(i),s=i.data("params")||null);return c={type:r||"GET",data:s,dataType:l,beforeSend:function(t,r){return r.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),n.fire(i,"ajax:beforeSend",[t,r])?void i.trigger("ajax:send",t):!1},success:function(t,e,n){i.trigger("ajax:success",[t,e,n])},complete:function(t,e){i.trigger("ajax:complete",[t,e])},error:function(t,e,n){i.trigger("ajax:error",[t,e,n])},crossDomain:n.isCrossDomain(o)},a&&(c.xhrFields={withCredentials:a}),o&&(c.url=o),n.ajax(c)}return!1},isCrossDomain:function(t){var e=document.createElement("a");e.href=location.href;var n=document.createElement("a");try{return n.href=t,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(i){return!0}},handleMethod:function(i){var r=n.href(i),o=i.data("method"),s=i.attr("target"),a=n.csrfToken(),l=n.csrfParam(),c=t('<form method="post" action="'+r+'"></form>'),h='<input name="_method" value="'+o+'" type="hidden" />';l===e||a===e||n.isCrossDomain(r)||(h+='<input name="'+l+'" value="'+a+'" type="hidden" />'),s&&c.attr("target",s),c.hide().append(h).appendTo("body"),c.submit()},formElements:function(e,n){return e.is("form")?t(e[0].elements).filter(n):e.find(n)},disableFormElements:function(e){n.formElements(e,n.disableSelector).each(function(){n.disableFormElement(t(this))})},disableFormElement:function(t){var n,i;n=t.is("button")?"html":"val",i=t.data("disable-with"),t.data("ujs:enable-with",t[n]()),i!==e&&t[n](i),t.prop("disabled",!0)},enableFormElements:function(e){n.formElements(e,n.enableSelector).each(function(){n.enableFormElement(t(this))})},enableFormElement:function(t){var e=t.is("button")?"html":"val";"undefined"!=typeof t.data("ujs:enable-with")&&t[e](t.data("ujs:enable-with")),t.prop("disabled",!1)},allowAction:function(t){var e,i=t.data("confirm"),r=!1;if(!i)return!0;if(n.fire(t,"confirm")){try{r=n.confirm(i)}catch(o){(console.error||console.log).call(console,o.stack||o)}e=n.fire(t,"confirm:complete",[r])}return r&&e},blankInputs:function(e,n,i){var r,o,s=t(),a=n||"input,textarea",l=e.find(a);return l.each(function(){if(r=t(this),o=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):!!r.val(),o===i){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;s=s.add(r)}}),s.length?s:!1},nonBlankInputs:function(t,e){return n.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var i=t.data("disable-with");t.data("ujs:enable-with",t.html()),i!==e&&t.html(i),t.bind("click.railsDisable",function(t){return n.stopEverything(t)})},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable")}},n.fire(i,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,i){t.crossDomain||n.CSRFProtection(i)}),t(window).on("pageshow.rails",function(){t(t.rails.enableSelector).each(function(){var e=t(this);e.data("ujs:enable-with")&&t.rails.enableFormElement(e)}),t(t.rails.linkDisableSelector).each(function(){var e=t(this);e.data("ujs:enable-with")&&t.rails.enableElement(e)})}),i.delegate(n.linkDisableSelector,"ajax:complete",function(){n.enableElement(t(this))}),i.delegate(n.buttonDisableSelector,"ajax:complete",function(){n.enableFormElement(t(this))}),i.delegate(n.linkClickSelector,"click.rails",function(e){var i=t(this),r=i.data("method"),o=i.data("params"),s=e.metaKey||e.ctrlKey;if(!n.allowAction(i))return n.stopEverything(e);if(!s&&i.is(n.linkDisableSelector)&&n.disableElement(i),n.isRemote(i)){if(s&&(!r||"GET"===r)&&!o)return!0;var a=n.handleRemote(i);return a===!1?n.enableElement(i):a.fail(function(){n.enableElement(i)}),!1}return r?(n.handleMethod(i),!1):void 0}),i.delegate(n.buttonClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i)||!n.isRemote(i))return n.stopEverything(e);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var r=n.handleRemote(i);return r===!1?n.enableFormElement(i):r.fail(function(){n.enableFormElement(i)}),!1}),i.delegate(n.inputChangeSelector,"change.rails",function(e){var i=t(this);return n.allowAction(i)&&n.isRemote(i)?(n.handleRemote(i),!1):n.stopEverything(e)}),i.delegate(n.formSubmitSelector,"submit.rails",function(i){var r,o,s=t(this),a=n.isRemote(s);if(!n.allowAction(s))return n.stopEverything(i);if(s.attr("novalidate")===e&&(r=n.blankInputs(s,n.requiredInputSelector,!1),r&&n.fire(s,"ajax:aborted:required",[r])))return n.stopEverything(i);if(a){if(o=n.nonBlankInputs(s,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(s)},13);var l=n.fire(s,"ajax:aborted:file",[o]);return l||setTimeout(function(){n.enableFormElements(s)},13),l}return n.handleRemote(s),!1}setTimeout(function(){n.disableFormElements(s)},13)}),i.delegate(n.formInputClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);var r=i.attr("name"),o=r?{name:r,value:i.val()}:null;i.closest("form").data("ujs:submit-button",o)}),i.delegate(n.formSubmitSelector,"ajax:send.rails",function(e){this===e.target&&n.disableFormElements(t(this))}),i.delegate(n.formSubmitSelector,"ajax:complete.rails",function(e){this===e.target&&n.enableFormElements(t(this))}),t(function(){n.refreshCSRFTokens()}))}(jQuery),/**
 * jQuery Cookie plugin
 *
 * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */
jQuery.cookie=function(t,e,n){if(arguments.length>1&&"[object Object]"!==String(e)){if(n=jQuery.extend({},n),(null===e||void 0===e)&&(n.expires=-1),"number"==typeof n.expires){var i=n.expires,r=n.expires=new Date;r.setDate(r.getDate()+i)}return e=String(e),document.cookie=[encodeURIComponent(t),"=",n.raw?e:encodeURIComponent(e),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}n=e||{};var o,s=n.raw?function(t){return t}:decodeURIComponent;return(o=new RegExp("(?:^|; )"+encodeURIComponent(t)+"=([^;]*)").exec(document.cookie))?s(o[1]):null},/**
 * Endless Scroll plugin for jQuery
 *
 * v1.4.8
 *
 * Copyright (c) 2008 Fred Wu
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
function(t){t.fn.endlessScroll=function(e){var n,i={bottomPixels:50,fireOnce:!0,fireDelay:150,loader:"<br />Loading...<br />",data:"",insertAfter:"div:last",resetCounter:function(){return!1},callback:function(){return!0},ceaseFire:function(){return!1}},e=t.extend({},i,e),r=!0,o=!1,s=0;e.ceaseFire.apply(this)===!0&&(r=!1),r===!0&&t(this).scroll(function(){if(e.ceaseFire.apply(this)===!0)return void(r=!1);if(this==document||this==window)n=t(document).height()-t(window).height()<=t(window).scrollTop()+e.bottomPixels;else{var i=t(".endless_scroll_inner_wrap",this);0==i.length&&(i=t(this).wrapInner('<div class="endless_scroll_inner_wrap" />').find(".endless_scroll_inner_wrap")),n=i.length>0&&i.height()-t(this).height()<=t(this).scrollTop()+e.bottomPixels}n&&(0==e.fireOnce||1==e.fireOnce&&1!=o)&&(e.resetCounter.apply(this)===!0&&(s=0),o=!0,s++,t(e.insertAfter).after('<div id="endless_scroll_loader">'+e.loader+"</div>"),data="function"==typeof e.data?e.data.apply(this,[s]):e.data,data!==!1&&(t(e.insertAfter).after('<div id="endless_scroll_data">'+data+"</div>"),t("#endless_scroll_data").hide().fadeIn(250,function(){t(this).removeAttr("id")}),e.callback.apply(this,[s]),e.fireDelay!==!1||0!==e.fireDelay?(t("body").after('<div id="endless_scroll_marker"></div>'),t("#endless_scroll_marker").fadeTo(e.fireDelay,1,function(){t(this).remove(),o=!1})):o=!1),t("#endless_scroll_loader").remove())})}}(jQuery),jQuery.fn.highlight=function(t){function e(t,n){var i=0;if(3==t.nodeType){var r=t.data.toUpperCase().indexOf(n);if(r>=0){var o=document.createElement("span");o.className="highlight_word";var s=t.splitText(r),a=(s.splitText(n.length),s.cloneNode(!0));o.appendChild(a),s.parentNode.replaceChild(o,s),i=1}}else if(1==t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var l=0;l<t.childNodes.length;++l)l+=e(t.childNodes[l],n);return i}return this.each(function(){e(this,t.toUpperCase())})},jQuery.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){with(this.parentNode.firstChild.nodeName,this.parentNode)replaceChild(this.firstChild,this),normalize()}).end()},function(t){var e="waitForImages";t.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]},t.expr[":"].uncached=function(e){if(!t(e).is('img[src!=""]'))return!1;var n=document.createElement("img");return n.src=e.src,!n.complete},t.fn.waitForImages=function(n,i,r){if(t.isPlainObject(arguments[0])&&(i=n.each,r=n.waitForAll,n=n.finished),n=n||t.noop,i=i||t.noop,r=!!r,!t.isFunction(n)||!t.isFunction(i))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var o=t(this),s=[];if(r){var a=t.waitForImages.hasImageProperties||[],l=/url\((['"]?)(.*?)\1\)/g;o.find("*").each(function(){var e=t(this);e.is("img:uncached")&&s.push({src:e.attr("src"),element:e[0]}),t.each(a,function(t,n){var i=e.css(n);if(!i)return!0;for(var r;r=l.exec(i);)s.push({src:r[2],element:e[0]})})})}else o.find("img:uncached").each(function(){s.push({src:this.src,element:this})});var c=s.length,h=0;0==c&&n.call(o[0]),t.each(s,function(r,s){var a=new Image;t(a).bind("load."+e+" error."+e,function(t){return h++,i.call(s.element,h,c,"load"==t.type),h==c?(n.call(o[0]),!1):void 0}),a.src=s.src})})}}(jQuery),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t.returnExportsGlobal=e(n)}):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(this,function(t){/*
  Implement Github like autocomplete mentions
  http://ichord.github.com/At.js

  Copyright (c) 2013 chord.luo@gmail.com
  Licensed under the MIT license.
*/
"use strict";var e,n,i,r,o,s,a,l,c,h,u;h="caret",e=function(){function e(t){this.$inputor=t,this.domInputor=this.$inputor[0]}return e.prototype.setPos=function(t){return this.domInputor},e.prototype.getIEPosition=function(){return this.getPosition()},e.prototype.getPosition=function(){var t,e;return e=this.getOffset(),t=this.$inputor.offset(),e.left-=t.left,e.top-=t.top,e},e.prototype.getOldIEPos=function(){var t,e;return e=a.selection.createRange(),t=a.body.createTextRange(),t.moveToElementText(this.domInputor),t.setEndPoint("EndToEnd",e),t.text.length},e.prototype.getPos=function(){var t,e,n;return(n=this.range())?(t=n.cloneRange(),t.selectNodeContents(this.domInputor),t.setEnd(n.endContainer,n.endOffset),e=t.toString().length,t.detach(),e):a.selection?this.getOldIEPos():void 0},e.prototype.getOldIEOffset=function(){var t,e;return t=a.selection.createRange().duplicate(),t.moveStart("character",-1),e=t.getBoundingClientRect(),{height:e.bottom-e.top,left:e.left,top:e.top}},e.prototype.getOffset=function(e){var n,i,r,o,s;return c.getSelection&&(r=this.range())?(r.endOffset-1>0&&r.endContainer===!this.domInputor&&(n=r.cloneRange(),n.setStart(r.endContainer,r.endOffset-1),n.setEnd(r.endContainer,r.endOffset),o=n.getBoundingClientRect(),i={height:o.height,left:o.left+o.width,top:o.top},n.detach()),i&&0!==(null!=i?i.height:void 0)||(n=r.cloneRange(),s=t(a.createTextNode("|")),n.insertNode(s[0]),n.selectNode(s[0]),o=n.getBoundingClientRect(),i={height:o.height,left:o.left,top:o.top},s.remove(),n.detach())):a.selection&&(i=this.getOldIEOffset()),i&&(i.top+=t(c).scrollTop(),i.left+=t(c).scrollLeft()),i},e.prototype.range=function(){var t;if(c.getSelection)return t=c.getSelection(),t.rangeCount>0?t.getRangeAt(0):null},e}(),n=function(){function e(t){this.$inputor=t,this.domInputor=this.$inputor[0]}return e.prototype.getIEPos=function(){var t,e,n,i,r,o,s;return e=this.domInputor,o=a.selection.createRange(),r=0,o&&o.parentElement()===e&&(i=e.value.replace(/\r\n/g,"\n"),n=i.length,s=e.createTextRange(),s.moveToBookmark(o.getBookmark()),t=e.createTextRange(),t.collapse(!1),r=s.compareEndPoints("StartToEnd",t)>-1?n:-s.moveStart("character",-n)),r},e.prototype.getPos=function(){return a.selection?this.getIEPos():this.domInputor.selectionStart},e.prototype.setPos=function(t){var e,n;return e=this.domInputor,a.selection?(n=e.createTextRange(),n.move("character",t),n.select()):e.setSelectionRange&&e.setSelectionRange(t,t),e},e.prototype.getIEOffset=function(t){var e,n,i,r;return n=this.domInputor.createTextRange(),t||(t=this.getPos()),n.move("character",t),i=n.boundingLeft,r=n.boundingTop,e=n.boundingHeight,{left:i,top:r,height:e}},e.prototype.getOffset=function(e){var n,i,r;return n=this.$inputor,a.selection?(i=this.getIEOffset(e),i.top+=t(c).scrollTop()+n.scrollTop(),i.left+=t(c).scrollLeft()+n.scrollLeft(),i):(i=n.offset(),r=this.getPosition(e),i={left:i.left+r.left-n.scrollLeft(),top:i.top+r.top-n.scrollTop(),height:r.height})},e.prototype.getPosition=function(t){var e,n,r,o,s,a,l;return e=this.$inputor,o=function(t){return t=t.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>"),/firefox/i.test(navigator.userAgent)&&(t=t.replace(/\s/g,"&nbsp;")),t},void 0===t&&(t=this.getPos()),l=e.val().slice(0,t),r=e.val().slice(t),s="<span style='position: relative; display: inline;'>"+o(l)+"</span>",s+="<span id='caret' style='position: relative; display: inline;'>|</span>",s+="<span style='position: relative; display: inline;'>"+o(r)+"</span>",a=new i(e),n=a.create(s).rect()},e.prototype.getIEPosition=function(t){var e,n,i,r,o;return i=this.getIEOffset(t),n=this.$inputor.offset(),r=i.left-n.left,o=i.top-n.top,e=i.height,{left:r,top:o,height:e}},e}(),i=function(){function e(t){this.$inputor=t}return e.prototype.css_attr=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap"],e.prototype.mirrorCss=function(){var e,n=this;return e={position:"absolute",left:-9999,top:0,zIndex:-2e4},"TEXTAREA"===this.$inputor.prop("tagName")&&this.css_attr.push("width"),t.each(this.css_attr,function(t,i){return e[i]=n.$inputor.css(i)}),e},e.prototype.create=function(e){return this.$mirror=t("<div></div>"),this.$mirror.css(this.mirrorCss()),this.$mirror.html(e),this.$inputor.after(this.$mirror),this},e.prototype.rect=function(){var t,e,n;return t=this.$mirror.find("#caret"),e=t.position(),n={left:e.left,top:e.top,height:t.height()},this.$mirror.remove(),n},e}(),r={contentEditable:function(t){return!(!t[0].contentEditable||"true"!==t[0].contentEditable)}},s={pos:function(t){return t||0===t?this.setPos(t):this.getPos()},position:function(t){return a.selection?this.getIEPosition(t):this.getPosition(t)},offset:function(t){var e;return e=this.getOffset(t)}},a=null,c=null,l=null,u=function(t){var e;return(e=null!=t?t.iframe:void 0)?(l=e,c=e.contentWindow,a=e.contentDocument||c.document):(l=void 0,c=window,a=document)},o=function(t){var e;a=t[0].ownerDocument,c=a.defaultView||a.parentWindow;try{return l=c.frameElement}catch(n){e=n}},t.fn.caret=function(i,o,a){var l;return s[i]?(t.isPlainObject(o)?(u(o),o=void 0):u(a),l=r.contentEditable(this)?new e(this):new n(this),s[i].apply(l,[o])):t.error("Method "+i+" does not exist on jQuery.caret")},t.fn.caret.EditableCaret=e,t.fn.caret.InputCaret=n,t.fn.caret.Utils=r,t.fn.caret.apis=s}),/*! jquery.atwho - v1.3.2 %>
* Copyright (c) 2015 chord.luo <chord.luo@gmail.com>;
* homepage: http://ichord.github.com/At.js
* Licensed MIT
*/
function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(this,function(t){var e,n,i,r,o,s,a,l,c,h,u=[].slice,d=function(t,e){function n(){this.constructor=t}for(var i in e)f.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty;e=t,i=function(){function t(t){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=e(t),this.setupRootElement(),this.listen()}return t.prototype.createContainer=function(t){var n;return null!=(n=this.$el)&&n.remove(),e(t.body).append(this.$el=e("<div class='atwho-container'></div>"))},t.prototype.setupRootElement=function(t,n){var i;if(null==n&&(n=!1),t)this.window=t.contentWindow,this.document=t.contentDocument||this.window.document,this.iframe=t;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(r){if(i=r,this.iframe=null,e.fn.atwho.debug)throw new Error("iframe auto-discovery is failed.\nPlease use `setIframe` to set the target iframe manually.\n"+i)}}return this.createContainer((this.iframeAsRoot=n)?this.document:document)},t.prototype.controller=function(t){var e,n,i,r;if(this.aliasMaps[t])n=this.controllers[this.aliasMaps[t]];else{r=this.controllers;for(i in r)if(e=r[i],i===t){n=e;break}}return n?n:this.controllers[this.currentFlag]},t.prototype.setContextFor=function(t){return this.currentFlag=t,this},t.prototype.reg=function(t,e){var n,i;return i=(n=this.controllers)[t]||(n[t]=this.$inputor.is("[contentEditable]")?new s(this,t):new c(this,t)),e.alias&&(this.aliasMaps[e.alias]=t),i.init(e),this},t.prototype.listen=function(){return this.$inputor.on("compositionstart",function(t){return function(e){var n;return null!=(n=t.controller())&&n.view.hide(),t.isComposing=!0}}(this)).on("compositionend",function(t){return function(e){return t.isComposing=!1}}(this)).on("keyup.atwhoInner",function(t){return function(e){return t.onKeyup(e)}}(this)).on("keydown.atwhoInner",function(t){return function(e){return t.onKeydown(e)}}(this)).on("blur.atwhoInner",function(t){return function(e){var n;return(n=t.controller())?(n.expectedQueryCBId=null,n.view.hide(e,n.getOpt("displayTimeout"))):void 0}}(this)).on("click.atwhoInner",function(t){return function(e){return t.dispatch(e)}}(this)).on("scroll.atwhoInner",function(t){return function(){var e;return e=t.$inputor.scrollTop(),function(n){var i,r;return i=n.target.scrollTop,e!==i&&null!=(r=t.controller())&&r.view.hide(n),e=i,!0}}}(this)())},t.prototype.shutdown=function(){var t,e,n;n=this.controllers;for(t in n)e=n[t],e.destroy(),delete this.controllers[t];return this.$inputor.off(".atwhoInner"),this.$el.remove()},t.prototype.dispatch=function(t){var e,n,i,r;i=this.controllers,r=[];for(e in i)n=i[e],r.push(n.lookUp(t));return r},t.prototype.onKeyup=function(t){var n;switch(t.keyCode){case a.ESC:t.preventDefault(),null!=(n=this.controller())&&n.view.hide();break;case a.DOWN:case a.UP:case a.CTRL:e.noop();break;case a.P:case a.N:t.ctrlKey||this.dispatch(t);break;default:this.dispatch(t)}},t.prototype.onKeydown=function(t){var n,i;if(i=null!=(n=this.controller())?n.view:void 0,i&&i.visible())switch(t.keyCode){case a.ESC:t.preventDefault(),i.hide(t);break;case a.UP:t.preventDefault(),i.prev();break;case a.DOWN:t.preventDefault(),i.next();break;case a.P:if(!t.ctrlKey)return;t.preventDefault(),i.prev();break;case a.N:if(!t.ctrlKey)return;t.preventDefault(),i.next();break;case a.TAB:case a.ENTER:case a.SPACE:if(!i.visible())return;if(!this.controller().getOpt("spaceSelectsMatch")&&t.keyCode===a.SPACE)return;if(!this.controller().getOpt("tabSelectsMatch")&&t.keyCode===a.TAB)return;i.highlighted()?(t.preventDefault(),i.choose(t)):i.hide(t);break;default:e.noop()}},t}(),r=function(){function t(t,n){this.app=t,this.at=n,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=e("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=e("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new l(this),this.view=new h(this)}return t.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},t.prototype.init=function(t){return this.setting=e.extend({},this.setting||e.fn.atwho["default"],t),this.view.init(),this.model.reload(this.setting.data)},t.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},t.prototype.callDefault=function(){var t,n,i;i=arguments[0],t=2<=arguments.length?u.call(arguments,1):[];try{return o[i].apply(this,t)}catch(r){return n=r,e.error(n+" Or maybe At.js doesn't have function "+i)}},t.prototype.trigger=function(t,e){var n,i;return null==e&&(e=[]),e.push(this),n=this.getOpt("alias"),i=n?t+"-"+n+".atwho":t+".atwho",this.$inputor.trigger(i,e)},t.prototype.callbacks=function(t){return this.getOpt("callbacks")[t]||o[t]},t.prototype.getOpt=function(t,e){var n;try{return this.setting[t]}catch(i){return n=i,null}},t.prototype.insertContentFor=function(t){var n,i;return i=this.getOpt("insertTpl"),n=e.extend({},t.data("item-data"),{"atwho-at":this.at}),this.callbacks("tplEval").call(this,i,n,"onInsert")},t.prototype.renderView=function(t){var e;return e=this.getOpt("searchKey"),t=this.callbacks("sorter").call(this,this.query.text,t.slice(0,1001),e),this.view.render(t.slice(0,this.getOpt("limit")))},t.arrayToDefaultHash=function(t){var n,i,r,o;if(!e.isArray(t))return t;for(o=[],n=0,r=t.length;r>n;n++)i=t[n],e.isPlainObject(i)?o.push(i):o.push({name:i});return o},t.prototype.lookUp=function(t){var e,n;return(e=this.catchQuery(t))?(this.app.setContextFor(this.at),(n=this.getOpt("delay"))?this._delayLookUp(e,n):this._lookUp(e),e):(this.expectedQueryCBId=null,e)},t.prototype._delayLookUp=function(t,e){var n,i;return n=Date.now?Date.now():(new Date).getTime(),this.previousCallTime||(this.previousCallTime=n),i=e-(n-this.previousCallTime),i>0&&e>i?(this.previousCallTime=n,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout(function(e){return function(){return e.previousCallTime=0,e.delayedCallTimeout=null,e._lookUp(t)}}(this),e)):(this._stopDelayedCall(),this.previousCallTime!==n&&(this.previousCallTime=0),this._lookUp(t))},t.prototype._stopDelayedCall=function(){return this.delayedCallTimeout?(clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null):void 0},t.prototype._generateQueryCBId=function(){return{}},t.prototype._lookUp=function(t){var n;return n=function(t,e){return t===this.expectedQueryCBId?e&&e.length>0?this.renderView(this.constructor.arrayToDefaultHash(e)):this.view.hide():void 0},this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(t.text,e.proxy(n,this,this.expectedQueryCBId))},t}(),c=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return d(n,t),n.prototype.catchQuery=function(){var t,e,n,i,r,o;return e=this.$inputor.val(),t=this.$inputor.caret("pos",{iframe:this.app.iframe}),o=e.slice(0,t),i=this.callbacks("matcher").call(this,this.at,o,this.getOpt("startWithSpace")),"string"==typeof i&&i.length<=this.getOpt("maxLen",20)?(r=t-i.length,n=r+i.length,this.pos=r,i={text:i,headPos:r,endPos:n},this.trigger("matched",[this.at,i.text])):(i=null,this.view.hide()),this.query=i},n.prototype.rect=function(){var t,n,i;if(t=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(n=e(this.app.iframe).offset(),t.left+=n.left,t.top+=n.top),i=this.app.document.selection?0:2,{left:t.left,top:t.top,bottom:t.top+t.height+i}},n.prototype.insert=function(t,e){var n,i,r,o,s;return n=this.$inputor,i=n.val(),r=i.slice(0,Math.max(this.query.headPos-this.at.length,0)),o=""===(o=this.getOpt("suffix"))?o:o||" ",t+=o,s=""+r+t+i.slice(this.query.endPos||0),n.val(s),n.caret("pos",r.length+t.length,{iframe:this.app.iframe}),n.is(":focus")||n.focus(),n.change()},n}(r),s=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return d(n,t),n.prototype._getRange=function(){var t;return t=this.app.window.getSelection(),t.rangeCount>0?t.getRangeAt(0):void 0},n.prototype._setRange=function(t,n,i){return null==i&&(i=this._getRange()),i?(n=e(n)[0],"after"===t?(i.setEndAfter(n),i.setStartAfter(n)):(i.setEndBefore(n),i.setStartBefore(n)),i.collapse(!1),this._clearRange(i)):void 0},n.prototype._clearRange=function(t){var e;return null==t&&(t=this._getRange()),e=this.app.window.getSelection(),null==this.ctrl_a_pressed?(e.removeAllRanges(),e.addRange(t)):void 0},n.prototype._movingEvent=function(t){var e;return"click"===t.type||(e=t.which)===a.RIGHT||e===a.LEFT||e===a.UP||e===a.DOWN},n.prototype._unwrap=function(t){var n;return t=e(t).unwrap().get(0),(n=t.nextSibling)&&n.nodeValue&&(t.nodeValue+=n.nodeValue,e(n).remove()),t},n.prototype.catchQuery=function(t){var n,i,r,o,s,l,c,h,u,d;if(!this.app.isComposing&&(d=this._getRange())){if(t.which===a.CTRL?this.ctrl_pressed=!0:t.which===a.A?null==this.ctrl_pressed&&(this.ctrl_a_pressed=!0):(delete this.ctrl_a_pressed,delete this.ctrl_pressed),t.which===a.ENTER)return(i=e(d.startContainer).closest(".atwho-query")).contents().unwrap(),i.is(":empty")&&i.remove(),(i=e(".atwho-query",this.app.document)).text(i.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(e(d.startContainer).is(this.$inputor))return void this._clearRange();t.which===a.BACKSPACE&&d.startContainer.nodeType===document.ELEMENT_NODE&&(h=d.startOffset-1)>=0?(r=d.cloneRange(),r.setStart(d.startContainer,h),e(r.cloneContents()).contents().last().is(".atwho-inserted")&&(s=e(d.startContainer).contents().get(h),this._setRange("after",e(s).contents().last()))):t.which===a.LEFT&&d.startContainer.nodeType===document.TEXT_NODE&&(n=e(d.startContainer.previousSibling),n.is(".atwho-inserted")&&0===d.startOffset&&this._setRange("after",n.contents().last()))}return e(d.startContainer).closest(".atwho-inserted").addClass("atwho-query").siblings().removeClass("atwho-query"),(i=e(".atwho-query",this.app.document)).length>0&&i.is(":empty")&&0===i.text().length&&i.remove(),this._movingEvent(t)||i.removeClass("atwho-inserted"),r=d.cloneRange(),r.setStart(d.startContainer,0),c=this.callbacks("matcher").call(this,this.at,r.toString(),this.getOpt("startWithSpace")),0===i.length&&"string"==typeof c&&(o=d.startOffset-this.at.length-c.length)>=0&&(d.setStart(d.startContainer,o),i=e("<span/>",this.app.document).attr(this.getOpt("editableAtwhoQueryAttrs")).addClass("atwho-query"),d.surroundContents(i.get(0)),l=i.contents().last().get(0),/firefox/i.test(navigator.userAgent)?(d.setStart(l,l.length),d.setEnd(l,l.length),this._clearRange(d)):this._setRange("after",l,d)),"string"==typeof c&&c.length<=this.getOpt("maxLen",20)?(u={text:c,el:i},this.trigger("matched",[this.at,u.text]),this.query=u):(this.view.hide(),this.query={el:i},i.text().indexOf(this.at)>=0&&(this._movingEvent(t)&&i.hasClass("atwho-inserted")?i.removeClass("atwho-query"):!1!==this.callbacks("afterMatchFailed").call(this,this.at,i)&&this._setRange("after",this._unwrap(i.text(i.text()).contents().first()))),null)}},n.prototype.rect=function(){var t,n,i;return i=this.query.el.offset(),this.app.iframe&&!this.app.iframeAsRoot&&(n=(t=e(this.app.iframe)).offset(),i.left+=n.left-this.$inputor.scrollLeft(),i.top+=n.top-this.$inputor.scrollTop()),i.bottom=i.top+this.query.el.height(),i},n.prototype.insert=function(t,e){var n,i,r;return i=""===(i=this.getOpt("suffix"))?i:i||"\xa0",this.query.el.removeClass("atwho-query").addClass("atwho-inserted").html(t),(n=this._getRange())&&(n.setEndAfter(this.query.el[0]),n.collapse(!1),n.insertNode(r=this.app.document.createTextNode(i)),this._setRange("after",r,n)),this.$inputor.is(":focus")||this.$inputor.focus(),this.$inputor.change()},n}(r),l=function(){function t(t){this.context=t,this.at=this.context.at,this.storage=this.context.$inputor}return t.prototype.destroy=function(){return this.storage.data(this.at,null)},t.prototype.saved=function(){return this.fetch()>0},t.prototype.query=function(t,e){var n,i,r;return i=this.fetch(),r=this.context.getOpt("searchKey"),i=this.context.callbacks("filter").call(this.context,t,i,r)||[],n=this.context.callbacks("remoteFilter"),i.length>0||!n&&0===i.length?e(i):n.call(this.context,t,e)},t.prototype.fetch=function(){return this.storage.data(this.at)||[]},t.prototype.save=function(t){return this.storage.data(this.at,this.context.callbacks("beforeSave").call(this.context,t||[]))},t.prototype.load=function(t){return!this.saved()&&t?this._load(t):void 0},t.prototype.reload=function(t){return this._load(t)},t.prototype._load=function(t){return"string"==typeof t?e.ajax(t,{dataType:"json"}).done(function(t){return function(e){return t.save(e)}}(this)):this.save(t)},t}(),h=function(){function t(t){this.context=t,this.$el=e("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}return t.prototype.init=function(){var t;return t=this.context.getOpt("alias")||this.context.at.charCodeAt(0),this.$el.attr({id:"at-view-"+t})},t.prototype.destroy=function(){return this.$el.remove()},t.prototype.bindEvent=function(){var t;return t=this.$el.find("ul"),t.on("mouseenter.atwho-view","li",function(n){return t.find(".cur").removeClass("cur"),e(n.currentTarget).addClass("cur")}).on("click.atwho-view","li",function(n){return function(i){return t.find(".cur").removeClass("cur"),e(i.currentTarget).addClass("cur"),n.choose(i),i.preventDefault()}}(this))},t.prototype.visible=function(){return this.$el.is(":visible")},t.prototype.highlighted=function(){return this.$el.find(".cur").length>0},t.prototype.choose=function(t){var e,n;return(e=this.$el.find(".cur")).length&&(n=this.context.insertContentFor(e),this.context.insert(this.context.callbacks("beforeInsert").call(this.context,n,e),e),this.context.trigger("inserted",[e,t]),this.hide(t)),this.context.getOpt("hideWithoutSuffix")?this.stopShowing=!0:void 0},t.prototype.reposition=function(t){var n,i,r,o;return n=this.context.app.iframeAsRoot?this.context.app.window:window,t.bottom+this.$el.height()-e(n).scrollTop()>e(n).height()&&(t.bottom=t.top-this.$el.height()),t.left>(r=e(n).width()-this.$el.width()-5)&&(t.left=r),i={left:t.left,top:t.bottom},null!=(o=this.context.callbacks("beforeReposition"))&&o.call(this.context,i),this.$el.offset(i),this.context.trigger("reposition",[i])},t.prototype.next=function(){var t,e;return t=this.$el.find(".cur").removeClass("cur"),e=t.next(),e.length||(e=this.$el.find("li:first")),e.addClass("cur"),this.scrollTop(Math.max(0,t.innerHeight()*(e.index()+2)-this.$el.height()))},t.prototype.prev=function(){var t,e;return t=this.$el.find(".cur").removeClass("cur"),e=t.prev(),e.length||(e=this.$el.find("li:last")),e.addClass("cur"),this.scrollTop(Math.max(0,t.innerHeight()*(e.index()+2)-this.$el.height()))},t.prototype.scrollTop=function(t){var e;return e=this.context.getOpt("scrollDuration"),e?this.$el.animate({scrollTop:t},e):this.$el.scrollTop(t)},t.prototype.show=function(){var t;return this.stopShowing?void(this.stopShowing=!1):(this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(t=this.context.rect())?this.reposition(t):void 0)},t.prototype.hide=function(t,e){var n;if(this.visible())return isNaN(e)?(this.$el.hide(),this.context.trigger("hidden",[t])):(n=function(t){return function(){return t.hide()}}(this),clearTimeout(this.timeoutID),this.timeoutID=setTimeout(n,e))},t.prototype.render=function(t){var n,i,r,o,s,a,l;if(!(e.isArray(t)&&t.length>0))return void this.hide();for(this.$el.find("ul").empty(),i=this.$el.find("ul"),l=this.context.getOpt("displayTpl"),r=0,s=t.length;s>r;r++)o=t[r],o=e.extend({},o,{"atwho-at":this.context.at}),a=this.context.callbacks("tplEval").call(this.context,l,o,"onDisplay"),n=e(this.context.callbacks("highlighter").call(this.context,a,this.context.query.text)),n.data("item-data",o),i.append(n);return this.show(),this.context.getOpt("highlightFirst")?i.find("li:first").addClass("cur"):void 0},t}(),a={DOWN:40,UP:38,ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},o={beforeSave:function(t){return r.arrayToDefaultHash(t)},matcher:function(t,e,n,i){var r,o,s,a,l;return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n&&(t="(?:^|\\s)"+t),r=decodeURI("%C3%80"),o=decodeURI("%C3%BF"),l=i?" ":"",a=new RegExp(t+"([A-Za-z"+r+"-"+o+"0-9_"+l+".+-]*)$|"+t+"([^\\x00-\\xff]*)$","gi"),s=a.exec(e),s?s[2]||s[1]:null},filter:function(t,e,n){var i,r,o,s;for(i=[],r=0,s=e.length;s>r;r++)o=e[r],~new String(o[n]).toLowerCase().indexOf(t.toLowerCase())&&i.push(o);return i},remoteFilter:null,sorter:function(t,e,n){var i,r,o,s;if(!t)return e;for(i=[],r=0,s=e.length;s>r;r++)o=e[r],o.atwho_order=new String(o[n]).toLowerCase().indexOf(t.toLowerCase()),o.atwho_order>-1&&i.push(o);return i.sort(function(t,e){return t.atwho_order-e.atwho_order})},tplEval:function(t,e){var n,i;i=t;try{return"string"!=typeof t&&(i=t(e)),i.replace(/\$\{([^\}]*)\}/g,function(t,n,i){return e[n]})}catch(r){return n=r,""}},highlighter:function(t,e){var n;return e?(n=new RegExp(">\\s*(\\w*?)("+e.replace("+","\\+")+")(\\w*)\\s*<","ig"),t.replace(n,function(t,e,n,i){return"> "+e+"<strong>"+n+"</strong>"+i+" <"})):t},beforeInsert:function(t,e){return t},beforeReposition:function(t){return t},afterMatchFailed:function(t,e){}},n={load:function(t,e){var n;return(n=this.controller(t))?n.model.load(e):void 0},isSelecting:function(){var t;return null!=(t=this.controller())?t.view.visible():void 0},hide:function(){var t;return null!=(t=this.controller())?t.view.hide():void 0},reposition:function(){var t;return(t=this.controller())?t.view.reposition(t.rect()):void 0},setIframe:function(t,e){return this.setupRootElement(t,e),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},e.fn.atwho=function(t){var r,o;return r=arguments,o=null,this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function(){var s,a;return(a=(s=e(this)).data("atwho"))||s.data("atwho",a=new i(this)),"object"!=typeof t&&t?n[t]&&a?o=n[t].apply(a,Array.prototype.slice.call(r,1)):e.error("Method "+t+" does not exist on jQuery.atwho"):a.reg(t.at,t)}),null!=o?o:this},e.fn.atwho["default"]={at:void 0,alias:void 0,data:null,displayTpl:"<li>${name}</li>",insertTpl:"${atwho-at}${name}",callbacks:o,searchKey:"name",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,highlightFirst:!0,limit:5,maxLen:20,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150},e.fn.atwho.debug=!1}),function(t){function e(t){return"object"==typeof t?t:{top:t,left:t}}var n=t.scrollTo=function(e,n,i){t(window).scrollTo(e,n,i)};n.defaults={axis:"xy",duration:parseFloat(t.fn.jquery)>=1.3?0:1,limit:!0},n.window=function(e){return t(window)._scrollable()},t.fn._scrollable=function(){return this.map(function(){var e=this,n=!e.nodeName||-1!=t.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"]);if(!n)return e;var i=(e.contentWindow||e).document||e.ownerDocument||e;return/webkit/i.test(navigator.userAgent)||"BackCompat"==i.compatMode?i.body:i.documentElement})},t.fn.scrollTo=function(i,r,o){return"object"==typeof r&&(o=r,r=0),"function"==typeof o&&(o={onAfter:o}),"max"==i&&(i=9e9),o=t.extend({},n.defaults,o),r=r||o.duration,o.queue=o.queue&&o.axis.length>1,o.queue&&(r/=2),o.offset=e(o.offset),o.over=e(o.over),this._scrollable().each(function(){function s(t){c.animate(u,r,o.easing,t&&function(){t.call(this,i,o)})}if(null!=i){var a,l=this,c=t(l),h=i,u={},d=c.is("html,body");switch(typeof h){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(h)){h=e(h);break}if(h=t(h,this),!h.length)return;case"object":(h.is||h.style)&&(a=(h=t(h)).offset())}t.each(o.axis.split(""),function(t,e){var i="x"==e?"Left":"Top",r=i.toLowerCase(),f="scroll"+i,p=l[f],g=n.max(l,e);if(a)u[f]=a[r]+(d?0:p-c.offset()[r]),o.margin&&(u[f]-=parseInt(h.css("margin"+i))||0,u[f]-=parseInt(h.css("border"+i+"Width"))||0),u[f]+=o.offset[r]||0,o.over[r]&&(u[f]+=h["x"==e?"width":"height"]()*o.over[r]);else{var m=h[r];u[f]=m.slice&&"%"==m.slice(-1)?parseFloat(m)/100*g:m}o.limit&&/^\d+$/.test(u[f])&&(u[f]=u[f]<=0?0:Math.min(u[f],g)),!t&&o.queue&&(p!=u[f]&&s(o.onAfterFirst),delete u[f])}),s(o.onAfter)}}).end()},n.max=function(e,n){var i="x"==n?"Width":"Height",r="scroll"+i;if(!t(e).is("html,body"))return e[r]-t(e)[i.toLowerCase()]();var o="client"+i,s=e.ownerDocument.documentElement,a=e.ownerDocument.body;return Math.max(s[r],a[r])-Math.min(s[o],a[o])}}(jQuery),/*
jQuery.Turbolinks ~ https://github.com/kossnocorp/jquery.turbolinks
jQuery plugin for drop-in fix binded events problem caused by Turbolinks

The MIT License
Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz
 */
function(){var t,e;t=window.jQuery||("function"==typeof require?require("jquery"):void 0),e=t(document),t.turbo={version:"2.1.0",isReady:!1,use:function(t,n){return e.off(".turbo").on(""+t+".turbo",this.onLoad).on(""+n+".turbo",this.onFetch)},addCallback:function(n){return t.turbo.isReady&&n(t),e.on("turbo:ready",function(){return n(t)})},onLoad:function(){return t.turbo.isReady=!0,e.trigger("turbo:ready")},onFetch:function(){return t.turbo.isReady=!1},register:function(){return t(this.onLoad),t.fn.ready=this.addCallback}},t.turbo.register(),t.turbo.use("page:load","page:fetch")}.call(this),!function(){function t(t){return t&&(t.ownerDocument||t.document||t).documentElement}function e(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function n(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function i(t){return null===t?NaN:+t}function r(t){return!isNaN(t)}function o(t){return{left:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);r>i;){var o=i+r>>>1;t(e[o],n)<0?i=o+1:r=o}return i},right:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);r>i;){var o=i+r>>>1;t(e[o],n)>0?r=o:i=o+1}return i}}}function s(t){return t.length}function a(t){for(var e=1;t*e%1;)e*=10;return e}function l(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function c(){this._=Object.create(null)}function h(t){return(t+="")===xs||t[0]===Cs?Cs+t:t}function u(t){return(t+="")[0]===Cs?t.slice(1):t}function d(t){return h(t)in this._}function f(t){return(t=h(t))in this._&&delete this._[t]}function p(){var t=[];for(var e in this._)t.push(u(e));return t}function g(){var t=0;for(var e in this._)++t;return t}function m(){for(var t in this._)return!1;return!0}function v(){this._=Object.create(null)}function y(t){return t}function w(t,e,n){return function(){var i=n.apply(e,arguments);return i===e?t:i}}function b(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,i=As.length;i>n;++n){var r=As[n]+e;if(r in t)return r}}function x(){}function C(){}function A(t){function e(){for(var e,i=n,r=-1,o=i.length;++r<o;)(e=i[r].on)&&e.apply(this,arguments);return t}var n=[],i=new c;return e.on=function(e,r){var o,s=i.get(e);return arguments.length<2?s&&s.on:(s&&(s.on=null,n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1)),i.remove(e)),r&&n.push(i.set(e,{on:r})),t)},e}function E(){ls.event.preventDefault()}function k(){for(var t,e=ls.event;t=e.sourceEvent;)e=t;return e}function F(t){for(var e=new C,n=0,i=arguments.length;++n<i;)e[arguments[n]]=A(e);return e.of=function(n,i){return function(r){try{var o=r.sourceEvent=ls.event;r.target=t,ls.event=r,e[r.type].apply(n,i)}finally{ls.event=o}}},e}function _(t){return ks(t,Ss),t}function D(t){return"function"==typeof t?t:function(){return Fs(t,this)}}function S(t){return"function"==typeof t?t:function(){return _s(t,this)}}function $(t,e){function n(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function r(){this.setAttribute(t,e)}function o(){this.setAttributeNS(t.space,t.local,e)}function s(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}function a(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}return t=ls.ns.qualify(t),null==e?t.local?i:n:"function"==typeof e?t.local?a:s:t.local?o:r}function T(t){return t.trim().replace(/\s+/g," ")}function B(t){return new RegExp("(?:^|\\s+)"+ls.requote(t)+"(?:\\s+|$)","g")}function M(t){return(t+"").trim().split(/^|\s+/)}function L(t,e){function n(){for(var n=-1;++n<r;)t[n](this,e)}function i(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}t=M(t).map(R);var r=t.length;return"function"==typeof e?i:n}function R(t){var e=B(t);return function(n,i){if(r=n.classList)return i?r.add(t):r.remove(t);var r=n.getAttribute("class")||"";i?(e.lastIndex=0,e.test(r)||n.setAttribute("class",T(r+" "+t))):n.setAttribute("class",T(r.replace(e," ")))}}function I(t,e,n){function i(){this.style.removeProperty(t)}function r(){this.style.setProperty(t,e,n)}function o(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}return null==e?i:"function"==typeof e?o:r}function P(t,e){function n(){delete this[t]}function i(){this[t]=e}function r(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}return null==e?n:"function"==typeof e?r:i}function N(t){function e(){var e=this.ownerDocument,n=this.namespaceURI;return n?e.createElementNS(n,t):e.createElement(t)}function n(){return this.ownerDocument.createElementNS(t.space,t.local)}return"function"==typeof t?t:(t=ls.ns.qualify(t)).local?n:e}function O(){var t=this.parentNode;t&&t.removeChild(this)}function j(t){return{__data__:t}}function z(t){return function(){return Ds(this,t)}}function H(t){return arguments.length||(t=n),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function W(t,e){for(var n=0,i=t.length;i>n;n++)for(var r,o=t[n],s=0,a=o.length;a>s;s++)(r=o[s])&&e(r,s,n);return t}function U(t){return ks(t,Ts),t}function q(t){var e,n;return function(i,r,o){var s,a=t[o].update,l=a.length;for(o!=n&&(n=o,e=0),r>=e&&(e=r+1);!(s=a[e])&&++e<l;);return s}}function Y(t,e,n){function i(){var e=this[s];e&&(this.removeEventListener(t,e,e.$),delete this[s])}function r(){var r=l(e,hs(arguments));i.call(this),this.addEventListener(t,this[s]=r,r.$=n),r._=e}function o(){var e,n=new RegExp("^__on([^.]+)"+ls.requote(t)+"$");for(var i in this)if(e=i.match(n)){var r=this[i];this.removeEventListener(e[1],r,r.$),delete this[i]}}var s="__on"+t,a=t.indexOf("."),l=G;a>0&&(t=t.slice(0,a));var c=Bs.get(t);return c&&(t=c,l=V),a?e?r:i:e?x:o}function G(t,e){return function(n){var i=ls.event;ls.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{ls.event=i}}}function V(t,e){var n=G(t,e);return function(t){var e=this,i=t.relatedTarget;i&&(i===e||8&i.compareDocumentPosition(e))||n.call(e,t)}}function K(n){var i=".dragsuppress-"+ ++Ls,r="click"+i,o=ls.select(e(n)).on("touchmove"+i,E).on("dragstart"+i,E).on("selectstart"+i,E);if(null==Ms&&(Ms="onselectstart"in n?!1:b(n.style,"userSelect")),Ms){var s=t(n).style,a=s[Ms];s[Ms]="none"}return function(t){if(o.on(i,null),Ms&&(s[Ms]=a),t){var e=function(){o.on(r,null)};o.on(r,function(){E(),e()},!0),setTimeout(e,0)}}}function X(t,n){n.changedTouches&&(n=n.changedTouches[0]);var i=t.ownerSVGElement||t;if(i.createSVGPoint){var r=i.createSVGPoint();if(0>Rs){var o=e(t);if(o.scrollX||o.scrollY){i=ls.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var s=i[0][0].getScreenCTM();Rs=!(s.f||s.e),i.remove()}}return Rs?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var a=t.getBoundingClientRect();return[n.clientX-a.left-t.clientLeft,n.clientY-a.top-t.clientTop]}function Z(){return ls.event.changedTouches[0].identifier}function Q(t){return t>0?1:0>t?-1:0}function J(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function tt(t){return t>1?0:-1>t?Ns:Math.acos(t)}function et(t){return t>1?zs:-1>t?-zs:Math.asin(t)}function nt(t){return((t=Math.exp(t))-1/t)/2}function it(t){return((t=Math.exp(t))+1/t)/2}function rt(t){return((t=Math.exp(2*t))-1)/(t+1)}function ot(t){return(t=Math.sin(t/2))*t}function st(){}function at(t,e,n){return this instanceof at?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof at?new at(t.h,t.s,t.l):xt(""+t,Ct,at):new at(t,e,n)}function lt(t,e,n){function i(t){return t>360?t-=360:0>t&&(t+=360),60>t?o+(s-o)*t/60:180>t?s:240>t?o+(s-o)*(240-t)/60:o}function r(t){return Math.round(255*i(t))}var o,s;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,s=.5>=n?n*(1+e):n+e-n*e,o=2*n-s,new vt(r(t+120),r(t),r(t-120))}function ct(t,e,n){return this instanceof ct?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ct?new ct(t.h,t.c,t.l):t instanceof ut?ft(t.l,t.a,t.b):ft((t=At((t=ls.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ct(t,e,n)}function ht(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new ut(n,Math.cos(t*=Hs)*e,Math.sin(t)*e)}function ut(t,e,n){return this instanceof ut?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof ut?new ut(t.l,t.a,t.b):t instanceof ct?ht(t.h,t.c,t.l):At((t=vt(t)).r,t.g,t.b):new ut(t,e,n)}function dt(t,e,n){var i=(t+16)/116,r=i+e/500,o=i-n/200;return r=pt(r)*Js,i=pt(i)*ta,o=pt(o)*ea,new vt(mt(3.2404542*r-1.5371385*i-.4985314*o),mt(-.969266*r+1.8760108*i+.041556*o),mt(.0556434*r-.2040259*i+1.0572252*o))}function ft(t,e,n){return t>0?new ct(Math.atan2(n,e)*Ws,Math.sqrt(e*e+n*n),t):new ct(NaN,NaN,t)}function pt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function gt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function mt(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function vt(t,e,n){return this instanceof vt?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof vt?new vt(t.r,t.g,t.b):xt(""+t,vt,lt):new vt(t,e,n)}function yt(t){return new vt(t>>16,t>>8&255,255&t)}function wt(t){return yt(t)+""}function bt(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function xt(t,e,n){var i,r,o,s=0,a=0,l=0;if(i=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(r=i[2].split(","),i[1]){case"hsl":return n(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return e(kt(r[0]),kt(r[1]),kt(r[2]))}return(o=ra.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(s=(3840&o)>>4,s=s>>4|s,a=240&o,a=a>>4|a,l=15&o,l=l<<4|l):7===t.length&&(s=(16711680&o)>>16,a=(65280&o)>>8,l=255&o)),e(s,a,l))}function Ct(t,e,n){var i,r,o=Math.min(t/=255,e/=255,n/=255),s=Math.max(t,e,n),a=s-o,l=(s+o)/2;return a?(r=.5>l?a/(s+o):a/(2-s-o),i=t==s?(e-n)/a+(n>e?6:0):e==s?(n-t)/a+2:(t-e)/a+4,i*=60):(i=NaN,r=l>0&&1>l?0:i),new at(i,r,l)}function At(t,e,n){t=Et(t),e=Et(e),n=Et(n);var i=gt((.4124564*t+.3575761*e+.1804375*n)/Js),r=gt((.2126729*t+.7151522*e+.072175*n)/ta),o=gt((.0193339*t+.119192*e+.9503041*n)/ea);return ut(116*r-16,500*(i-r),200*(r-o))}function Et(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function kt(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Ft(t){return"function"==typeof t?t:function(){return t}}function _t(t){return function(e,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),Dt(e,n,t,i)}}function Dt(t,e,n,i){function r(){var t,e=l.status;if(!e&&$t(l)||e>=200&&300>e||304===e){try{t=n.call(o,l)}catch(i){return void s.error.call(o,i)}s.load.call(o,t)}else s.error.call(o,l)}var o={},s=ls.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(t){var e=ls.event;ls.event=t;try{s.progress.call(o,l)}finally{ls.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?a[t]:(null==e?delete a[t]:a[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(hs(arguments)))}}),o.send=function(n,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),l.open(n,t,!0),null==e||"accept"in a||(a.accept=e+",*/*"),l.setRequestHeader)for(var h in a)l.setRequestHeader(h,a[h]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=c&&(l.responseType=c),null!=r&&o.on("error",r).on("load",function(t){r(null,t)}),s.beforesend.call(o,l),l.send(null==i?null:i),o},o.abort=function(){return l.abort(),o},ls.rebind(o,s,"on"),null==i?o:o.get(St(i))}function St(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function $t(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Tt(t,e,n){var i=arguments.length;2>i&&(e=0),3>i&&(n=Date.now());var r=n+e,o={c:t,t:r,n:null};return sa?sa.n=o:oa=o,sa=o,aa||(la=clearTimeout(la),aa=1,ca(Bt)),o}function Bt(){var t=Mt(),e=Lt()-t;e>24?(isFinite(e)&&(clearTimeout(la),la=setTimeout(Bt,e)),aa=0):(aa=1,ca(Bt))}function Mt(){for(var t=Date.now(),e=oa;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Lt(){for(var t,e=oa,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:oa=e.n;return sa=t,n}function Rt(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function It(t,e){var n=Math.pow(10,3*bs(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}function Pt(t){var e=t.decimal,n=t.thousands,i=t.grouping,r=t.currency,o=i&&n?function(t,e){for(var r=t.length,o=[],s=0,a=i[0],l=0;r>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),o.push(t.substring(r-=a,r+a)),!((l+=a+1)>e));)a=i[s=(s+1)%i.length];return o.reverse().join(n)}:y;return function(t){var n=ua.exec(t),i=n[1]||" ",s=n[2]||">",a=n[3]||"-",l=n[4]||"",c=n[5],h=+n[6],u=n[7],d=n[8],f=n[9],p=1,g="",m="",v=!1,y=!0;switch(d&&(d=+d.substring(1)),(c||"0"===i&&"="===s)&&(c=i="0",s="="),f){case"n":u=!0,f="g";break;case"%":p=100,m="%",f="f";break;case"p":p=100,m="%",f="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+f.toLowerCase());case"c":y=!1;case"d":v=!0,d=0;break;case"s":p=-1,f="r"}"$"===l&&(g=r[0],m=r[1]),"r"!=f||d||(f="g"),null!=d&&("g"==f?d=Math.max(1,Math.min(21,d)):("e"==f||"f"==f)&&(d=Math.max(0,Math.min(20,d)))),f=da.get(f)||Nt;var w=c&&u;return function(t){var n=m;if(v&&t%1)return"";var r=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===a?"":a;if(0>p){var l=ls.formatPrefix(t,d);t=l.scale(t),n=l.symbol+m}else t*=p;t=f(t,d);var b,x,C=t.lastIndexOf(".");if(0>C){var A=y?t.lastIndexOf("e"):-1;0>A?(b=t,x=""):(b=t.substring(0,A),x=t.substring(A))}else b=t.substring(0,C),x=e+t.substring(C+1);!c&&u&&(b=o(b,1/0));var E=g.length+b.length+x.length+(w?0:r.length),k=h>E?new Array(E=h-E+1).join(i):"";return w&&(b=o(k+b,k.length?h-x.length:1/0)),r+=g,t=b+x,("<"===s?r+t+k:">"===s?k+r+t:"^"===s?k.substring(0,E>>=1)+r+t+k.substring(E):r+(w?t:k+t))+n}}}function Nt(t){return t+""}function Ot(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function jt(t,e,n){function i(e){var n=t(e),i=o(n,1);return i-e>e-n?n:i}function r(n){return e(n=t(new pa(n-1)),1),n}function o(t,n){return e(t=new pa(+t),n),t}function s(t,i,o){var s=r(t),a=[];if(o>1)for(;i>s;)n(s)%o||a.push(new Date(+s)),e(s,1);else for(;i>s;)a.push(new Date(+s)),e(s,1);return a}function a(t,e,n){try{pa=Ot;var i=new Ot;return i._=t,s(i,e,n)}finally{pa=Date}}t.floor=t,t.round=i,t.ceil=r,t.offset=o,t.range=s;var l=t.utc=zt(t);return l.floor=l,l.round=zt(i),l.ceil=zt(r),l.offset=zt(o),l.range=a,t}function zt(t){return function(e,n){try{pa=Ot;var i=new Ot;return i._=e,t(i,n)._}finally{pa=Date}}}function Ht(t){function e(t){function e(e){for(var n,r,o,s=[],a=-1,l=0;++a<i;)37===t.charCodeAt(a)&&(s.push(t.slice(l,a)),null!=(r=ma[n=t.charAt(++a)])&&(n=t.charAt(++a)),(o=D[n])&&(n=o(e,null==r?"e"===n?" ":"0":r)),s.push(n),l=a+1);return s.push(t.slice(l,a)),s.join("")}var i=t.length;return e.parse=function(e){var i={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},r=n(i,t,e,0);if(r!=e.length)return null;"p"in i&&(i.H=i.H%12+12*i.p);var o=null!=i.Z&&pa!==Ot,s=new(o?Ot:pa);return"j"in i?s.setFullYear(i.y,0,i.j):"W"in i||"U"in i?("w"in i||(i.w="W"in i?1:0),s.setFullYear(i.y,0,1),s.setFullYear(i.y,0,"W"in i?(i.w+6)%7+7*i.W-(s.getDay()+5)%7:i.w+7*i.U-(s.getDay()+6)%7)):s.setFullYear(i.y,i.m,i.d),s.setHours(i.H+(i.Z/100|0),i.M+i.Z%100,i.S,i.L),o?s._:s},e.toString=function(){return t},e}function n(t,e,n,i){for(var r,o,s,a=0,l=e.length,c=n.length;l>a;){if(i>=c)return-1;if(r=e.charCodeAt(a++),37===r){if(s=e.charAt(a++),o=S[s in ma?e.charAt(a++):s],!o||(i=o(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function i(t,e,n){C.lastIndex=0;var i=C.exec(e.slice(n));return i?(t.w=A.get(i[0].toLowerCase()),n+i[0].length):-1}function r(t,e,n){b.lastIndex=0;var i=b.exec(e.slice(n));return i?(t.w=x.get(i[0].toLowerCase()),n+i[0].length):-1}function o(t,e,n){F.lastIndex=0;var i=F.exec(e.slice(n));return i?(t.m=_.get(i[0].toLowerCase()),n+i[0].length):-1}function s(t,e,n){E.lastIndex=0;var i=E.exec(e.slice(n));return i?(t.m=k.get(i[0].toLowerCase()),n+i[0].length):-1}function a(t,e,i){return n(t,D.c.toString(),e,i)}function l(t,e,i){return n(t,D.x.toString(),e,i)}function c(t,e,i){return n(t,D.X.toString(),e,i)}function h(t,e,n){var i=w.get(e.slice(n,n+=2).toLowerCase());return null==i?-1:(t.p=i,n)}var u=t.dateTime,d=t.date,f=t.time,p=t.periods,g=t.days,m=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function n(t){try{pa=Ot;var e=new pa;return e._=t,i(e)}finally{pa=Date}}var i=e(t);return n.parse=function(t){try{pa=Ot;var e=i.parse(t);return e&&e._}finally{pa=Date}},n.toString=i.toString,n},e.multi=e.utc.multi=le;var w=ls.map(),b=Ut(g),x=qt(g),C=Ut(m),A=qt(m),E=Ut(v),k=qt(v),F=Ut(y),_=qt(y);p.forEach(function(t,e){w.set(t.toLowerCase(),e)});var D={a:function(t){return m[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(u),d:function(t,e){return Wt(t.getDate(),e,2)},e:function(t,e){return Wt(t.getDate(),e,2)},H:function(t,e){return Wt(t.getHours(),e,2)},I:function(t,e){return Wt(t.getHours()%12||12,e,2)},j:function(t,e){return Wt(1+fa.dayOfYear(t),e,3)},L:function(t,e){return Wt(t.getMilliseconds(),e,3)},m:function(t,e){return Wt(t.getMonth()+1,e,2)},M:function(t,e){return Wt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Wt(t.getSeconds(),e,2)},U:function(t,e){return Wt(fa.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Wt(fa.mondayOfYear(t),e,2)},x:e(d),X:e(f),y:function(t,e){return Wt(t.getFullYear()%100,e,2)},Y:function(t,e){return Wt(t.getFullYear()%1e4,e,4)},Z:se,"%":function(){return"%"}},S={a:i,A:r,b:o,B:s,c:a,d:te,e:te,H:ne,I:ne,j:ee,L:oe,m:Jt,M:ie,p:h,S:re,U:Gt,w:Yt,W:Vt,x:l,X:c,y:Xt,Y:Kt,Z:Zt,"%":ae};return e}function Wt(t,e,n){var i=0>t?"-":"",r=(i?-t:t)+"",o=r.length;return i+(n>o?new Array(n-o+1).join(e)+r:r)}function Ut(t){return new RegExp("^(?:"+t.map(ls.requote).join("|")+")","i")}function qt(t){for(var e=new c,n=-1,i=t.length;++n<i;)e.set(t[n].toLowerCase(),n);return e}function Yt(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Gt(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n));return i?(t.U=+i[0],n+i[0].length):-1}function Vt(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n));return i?(t.W=+i[0],n+i[0].length):-1}function Kt(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Xt(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+2));return i?(t.y=Qt(+i[0]),n+i[0].length):-1}function Zt(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function Qt(t){return t+(t>68?1900:2e3)}function Jt(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function te(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function ee(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+3));return i?(t.j=+i[0],n+i[0].length):-1}function ne(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function ie(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function re(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function oe(t,e,n){va.lastIndex=0;var i=va.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function se(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",i=bs(e)/60|0,r=bs(e)%60;return n+Wt(i,"0",2)+Wt(r,"0",2)}function ae(t,e,n){ya.lastIndex=0;var i=ya.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function le(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,i=t[n];!i[1](e);)i=t[++n];return i[0](e)}}function ce(){}function he(t,e,n){var i=n.s=t+e,r=i-t,o=i-r;n.t=t-o+(e-r)}function ue(t,e){t&&Ca.hasOwnProperty(t.type)&&Ca[t.type](t,e)}function de(t,e,n){var i,r=-1,o=t.length-n;for(e.lineStart();++r<o;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function fe(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)de(t[n],e,1);e.polygonEnd()}function pe(){function t(t,e){t*=Hs,e=e*Hs/2+Ns/4;var n=t-i,s=n>=0?1:-1,a=s*n,l=Math.cos(e),c=Math.sin(e),h=o*c,u=r*l+h*Math.cos(a),d=h*s*Math.sin(a);Ea.add(Math.atan2(d,u)),i=t,r=l,o=c}var e,n,i,r,o;ka.point=function(s,a){ka.point=t,i=(e=s)*Hs,r=Math.cos(a=(n=a)*Hs/2+Ns/4),o=Math.sin(a)},ka.lineEnd=function(){t(e,n)}}function ge(t){var e=t[0],n=t[1],i=Math.cos(n);return[i*Math.cos(e),i*Math.sin(e),Math.sin(n)]}function me(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ve(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ye(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function we(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function be(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function xe(t){return[Math.atan2(t[1],t[0]),et(t[2])]}function Ce(t,e){return bs(t[0]-e[0])<Is&&bs(t[1]-e[1])<Is}function Ae(t,e){t*=Hs;var n=Math.cos(e*=Hs);Ee(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function Ee(t,e,n){++Fa,Da+=(t-Da)/Fa,Sa+=(e-Sa)/Fa,$a+=(n-$a)/Fa}function ke(){function t(t,r){t*=Hs;var o=Math.cos(r*=Hs),s=o*Math.cos(t),a=o*Math.sin(t),l=Math.sin(r),c=Math.atan2(Math.sqrt((c=n*l-i*a)*c+(c=i*s-e*l)*c+(c=e*a-n*s)*c),e*s+n*a+i*l);_a+=c,Ta+=c*(e+(e=s)),Ba+=c*(n+(n=a)),Ma+=c*(i+(i=l)),Ee(e,n,i)}var e,n,i;Pa.point=function(r,o){r*=Hs;var s=Math.cos(o*=Hs);e=s*Math.cos(r),n=s*Math.sin(r),i=Math.sin(o),Pa.point=t,Ee(e,n,i)}}function Fe(){Pa.point=Ae}function _e(){function t(t,e){t*=Hs;var n=Math.cos(e*=Hs),s=n*Math.cos(t),a=n*Math.sin(t),l=Math.sin(e),c=r*l-o*a,h=o*s-i*l,u=i*a-r*s,d=Math.sqrt(c*c+h*h+u*u),f=i*s+r*a+o*l,p=d&&-tt(f)/d,g=Math.atan2(d,f);La+=p*c,Ra+=p*h,Ia+=p*u,_a+=g,Ta+=g*(i+(i=s)),Ba+=g*(r+(r=a)),Ma+=g*(o+(o=l)),Ee(i,r,o)}var e,n,i,r,o;Pa.point=function(s,a){e=s,n=a,Pa.point=t,s*=Hs;var l=Math.cos(a*=Hs);i=l*Math.cos(s),r=l*Math.sin(s),o=Math.sin(a),Ee(i,r,o)},Pa.lineEnd=function(){t(e,n),Pa.lineEnd=Fe,Pa.point=Ae}}function De(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return n=e.invert(n,i),n&&t.invert(n[0],n[1])}),n}function Se(){return!0}function $e(t,e,n,i,r){var o=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],i=t[e];if(Ce(n,i)){r.lineStart();for(var a=0;e>a;++a)r.point((n=t[a])[0],n[1]);return void r.lineEnd()}var l=new Be(n,t,null,!0),c=new Be(n,null,l,!1);l.o=c,o.push(l),s.push(c),l=new Be(i,t,null,!1),c=new Be(i,null,l,!0),l.o=c,o.push(l),s.push(c)}}),s.sort(e),Te(o),Te(s),o.length){for(var a=0,l=n,c=s.length;c>a;++a)s[a].e=l=!l;for(var h,u,d=o[0];;){for(var f=d,p=!0;f.v;)if((f=f.n)===d)return;h=f.z,r.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(var a=0,c=h.length;c>a;++a)r.point((u=h[a])[0],u[1]);else i(f.x,f.n.x,1,r);f=f.n}else{if(p){h=f.p.z;for(var a=h.length-1;a>=0;--a)r.point((u=h[a])[0],u[1])}else i(f.x,f.p.x,-1,r);f=f.p}f=f.o,h=f.z,p=!p}while(!f.v);r.lineEnd()}}}function Te(t){if(e=t.length){for(var e,n,i=0,r=t[0];++i<e;)r.n=n=t[i],n.p=r,r=n;r.n=n=t[0],n.p=r}}function Be(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Me(t,e,n,i){return function(r,o){function s(e,n){var i=r(e,n);t(e=i[0],n=i[1])&&o.point(e,n)}function a(t,e){var n=r(t,e);m.point(n[0],n[1])}function l(){y.point=a,m.lineStart()}function c(){y.point=s,m.lineEnd()}function h(t,e){g.push([t,e]);var n=r(t,e);b.point(n[0],n[1])}function u(){b.lineStart(),g=[]}function d(){h(g[0][0],g[0][1]),b.lineEnd();var t,e=b.clean(),n=w.buffer(),i=n.length;if(g.pop(),p.push(g),g=null,i)if(1&e){t=n[0];var r,i=t.length-1,s=-1;if(i>0){for(x||(o.polygonStart(),x=!0),o.lineStart();++s<i;)o.point((r=t[s])[0],r[1]);o.lineEnd()}}else i>1&&2&e&&n.push(n.pop().concat(n.shift())),f.push(n.filter(Le))}var f,p,g,m=e(o),v=r.invert(i[0],i[1]),y={point:s,lineStart:l,lineEnd:c,polygonStart:function(){y.point=h,y.lineStart=u,y.lineEnd=d,f=[],p=[]},polygonEnd:function(){y.point=s,y.lineStart=l,y.lineEnd=c,f=ls.merge(f);var t=je(v,p);f.length?(x||(o.polygonStart(),x=!0),$e(f,Ie,t,n,o)):t&&(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),f=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},w=Re(),b=e(w),x=!1;return y}}function Le(t){return t.length>1}function Re(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:x,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Ie(t,e){return((t=t.x)[0]<0?t[1]-zs-Is:zs-t[1])-((e=e.x)[0]<0?e[1]-zs-Is:zs-e[1])}function Pe(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?Ns:-Ns,l=bs(o-n);bs(l-Ns)<Is?(t.point(n,i=(i+s)/2>0?zs:-zs),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),t.point(o,i),e=0):r!==a&&l>=Ns&&(bs(n-r)<Is&&(n-=r*Is),bs(o-a)<Is&&(o-=a*Is),i=Ne(n,i,o,s),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),e=0),t.point(n=o,i=s),r=a},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}function Ne(t,e,n,i){var r,o,s=Math.sin(t-n);return bs(s)>Is?Math.atan((Math.sin(e)*(o=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(e))*Math.sin(t))/(r*o*s)):(e+i)/2}function Oe(t,e,n,i){var r;if(null==t)r=n*zs,i.point(-Ns,r),i.point(0,r),i.point(Ns,r),i.point(Ns,0),i.point(Ns,-r),i.point(0,-r),i.point(-Ns,-r),i.point(-Ns,0),i.point(-Ns,r);else if(bs(t[0]-e[0])>Is){var o=t[0]<e[0]?Ns:-Ns;r=n*o/2,i.point(-o,r),i.point(0,r),i.point(o,r)}else i.point(e[0],e[1])}function je(t,e){var n=t[0],i=t[1],r=[Math.sin(n),-Math.cos(n),0],o=0,s=0;Ea.reset();for(var a=0,l=e.length;l>a;++a){var c=e[a],h=c.length;if(h)for(var u=c[0],d=u[0],f=u[1]/2+Ns/4,p=Math.sin(f),g=Math.cos(f),m=1;;){m===h&&(m=0),t=c[m];var v=t[0],y=t[1]/2+Ns/4,w=Math.sin(y),b=Math.cos(y),x=v-d,C=x>=0?1:-1,A=C*x,E=A>Ns,k=p*w;if(Ea.add(Math.atan2(k*C*Math.sin(A),g*b+k*Math.cos(A))),o+=E?x+C*Os:x,E^d>=n^v>=n){var F=ve(ge(u),ge(t));be(F);var _=ve(r,F);be(_);var D=(E^x>=0?-1:1)*et(_[2]);(i>D||i===D&&(F[0]||F[1]))&&(s+=E^x>=0?1:-1)}if(!m++)break;d=v,p=w,g=b,u=t}}return(-Is>o||Is>o&&0>Ea)^1&s}function ze(t){function e(t,e){return Math.cos(t)*Math.cos(e)>o}function n(t){var n,o,l,c,h;return{lineStart:function(){c=l=!1,h=1},point:function(u,d){var f,p=[u,d],g=e(u,d),m=s?g?0:r(u,d):g?r(u+(0>u?Ns:-Ns),d):0;if(!n&&(c=l=g)&&t.lineStart(),g!==l&&(f=i(n,p),(Ce(n,f)||Ce(p,f))&&(p[0]+=Is,p[1]+=Is,g=e(p[0],p[1]))),g!==l)h=0,g?(t.lineStart(),f=i(p,n),t.point(f[0],f[1])):(f=i(n,p),t.point(f[0],f[1]),t.lineEnd()),n=f;else if(a&&n&&s^g){var v;m&o||!(v=i(p,n,!0))||(h=0,s?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||n&&Ce(n,p)||t.point(p[0],p[1]),n=p,l=g,o=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return h|(c&&l)<<1}}}function i(t,e,n){var i=ge(t),r=ge(e),s=[1,0,0],a=ve(i,r),l=me(a,a),c=a[0],h=l-c*c;if(!h)return!n&&t;var u=o*l/h,d=-o*c/h,f=ve(s,a),p=we(s,u),g=we(a,d);ye(p,g);var m=f,v=me(p,m),y=me(m,m),w=v*v-y*(me(p,p)-1);if(!(0>w)){var b=Math.sqrt(w),x=we(m,(-v-b)/y);if(ye(x,p),x=xe(x),!n)return x;var C,A=t[0],E=e[0],k=t[1],F=e[1];A>E&&(C=A,A=E,E=C);var _=E-A,D=bs(_-Ns)<Is,S=D||Is>_;if(!D&&k>F&&(C=k,k=F,F=C),S?D?k+F>0^x[1]<(bs(x[0]-A)<Is?k:F):k<=x[1]&&x[1]<=F:_>Ns^(A<=x[0]&&x[0]<=E)){var $=we(m,(-v+b)/y);return ye($,p),[x,xe($)]}}}function r(e,n){var i=s?t:Ns-t,r=0;return-i>e?r|=1:e>i&&(r|=2),-i>n?r|=4:n>i&&(r|=8),r}var o=Math.cos(t),s=o>0,a=bs(o)>Is,l=gn(t,6*Hs);return Me(e,n,l,s?[0,-t]:[-Ns,t-Ns])}function He(t,e,n,i){return function(r){var o,s=r.a,a=r.b,l=s.x,c=s.y,h=a.x,u=a.y,d=0,f=1,p=h-l,g=u-c;if(o=t-l,p||!(o>0)){if(o/=p,0>p){if(d>o)return;f>o&&(f=o)}else if(p>0){if(o>f)return;o>d&&(d=o)}if(o=n-l,p||!(0>o)){if(o/=p,0>p){if(o>f)return;o>d&&(d=o)}else if(p>0){if(d>o)return;f>o&&(f=o)}if(o=e-c,g||!(o>0)){if(o/=g,0>g){if(d>o)return;f>o&&(f=o)}else if(g>0){if(o>f)return;o>d&&(d=o)}if(o=i-c,g||!(0>o)){if(o/=g,0>g){if(o>f)return;o>d&&(d=o)}else if(g>0){if(d>o)return;f>o&&(f=o)}return d>0&&(r.a={x:l+d*p,y:c+d*g}),1>f&&(r.b={x:l+f*p,y:c+f*g}),r}}}}}}function We(t,e,n,i){function r(i,r){return bs(i[0]-t)<Is?r>0?0:3:bs(i[0]-n)<Is?r>0?2:1:bs(i[1]-e)<Is?r>0?1:0:r>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var n=r(t,1),i=r(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){function l(t){for(var e=0,n=m.length,i=t[1],r=0;n>r;++r)for(var o,s=1,a=m[r],l=a.length,c=a[0];l>s;++s)o=a[s],c[1]<=i?o[1]>i&&J(c,o,t)>0&&++e:o[1]<=i&&J(c,o,t)<0&&--e,c=o;return 0!==e}function c(o,a,l,c){var h=0,u=0;if(null==o||(h=r(o,l))!==(u=r(a,l))||s(o,a)<0^l>0){do c.point(0===h||3===h?t:n,h>1?i:e);while((h=(h+l+4)%4)!==u)}else c.point(a[0],a[1])}function h(r,o){return r>=t&&n>=r&&o>=e&&i>=o}function u(t,e){h(t,e)&&a.point(t,e)}function d(){S.point=p,m&&m.push(v=[]),E=!0,A=!1,x=C=NaN}function f(){g&&(p(y,w),b&&A&&_.rejoin(),g.push(_.buffer())),S.point=u,A&&a.lineEnd()}function p(t,e){t=Math.max(-Oa,Math.min(Oa,t)),e=Math.max(-Oa,Math.min(Oa,e));var n=h(t,e);if(m&&v.push([t,e]),E)y=t,w=e,b=n,E=!1,n&&(a.lineStart(),a.point(t,e));else if(n&&A)a.point(t,e);else{var i={a:{x:x,y:C},b:{x:t,y:e}};D(i)?(A||(a.lineStart(),a.point(i.a.x,i.a.y)),a.point(i.b.x,i.b.y),n||a.lineEnd(),k=!1):n&&(a.lineStart(),a.point(t,e),k=!1)}x=t,C=e,A=n}var g,m,v,y,w,b,x,C,A,E,k,F=a,_=Re(),D=He(t,e,n,i),S={point:u,lineStart:d,lineEnd:f,polygonStart:function(){a=_,g=[],m=[],k=!0},polygonEnd:function(){a=F,g=ls.merge(g);var e=l([t,i]),n=k&&e,r=g.length;(n||r)&&(a.polygonStart(),n&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),r&&$e(g,o,e,c,a),a.polygonEnd()),g=m=v=null}};return S}}function Ue(t){var e=0,n=Ns/3,i=an(t),r=i(e,n);return r.parallels=function(t){return arguments.length?i(e=t[0]*Ns/180,n=t[1]*Ns/180):[e/Ns*180,n/Ns*180]},r}function qe(t,e){function n(t,e){var n=Math.sqrt(o-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),s-n*Math.cos(t)]}var i=Math.sin(t),r=(i+Math.sin(e))/2,o=1+i*(2*r-i),s=Math.sqrt(o)/r;return n.invert=function(t,e){var n=s-e;return[Math.atan2(t,n)/r,et((o-(t*t+n*n)*r*r)/(2*r))]},n}function Ye(){function t(t,e){za+=r*t-i*e,i=t,r=e}var e,n,i,r;Ya.point=function(o,s){Ya.point=t,e=i=o,n=r=s},Ya.lineEnd=function(){t(e,n)}}function Ge(t,e){Ha>t&&(Ha=t),t>Ua&&(Ua=t),Wa>e&&(Wa=e),e>qa&&(qa=e)}function Ve(){function t(t,e){s.push("M",t,",",e,o)}function e(t,e){s.push("M",t,",",e),a.point=n}function n(t,e){s.push("L",t,",",e)}function i(){a.point=t}function r(){s.push("Z")}var o=Ke(4.5),s=[],a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=r},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(t){return o=Ke(t),a},result:function(){if(s.length){var t=s.join("");return s=[],t}}};return a}function Ke(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Xe(t,e){Da+=t,Sa+=e,++$a}function Ze(){function t(t,i){var r=t-e,o=i-n,s=Math.sqrt(r*r+o*o);Ta+=s*(e+t)/2,Ba+=s*(n+i)/2,Ma+=s,Xe(e=t,n=i)}var e,n;Va.point=function(i,r){Va.point=t,Xe(e=i,n=r)}}function Qe(){Va.point=Xe}function Je(){function t(t,e){var n=t-i,o=e-r,s=Math.sqrt(n*n+o*o);Ta+=s*(i+t)/2,Ba+=s*(r+e)/2,Ma+=s,s=r*t-i*e,La+=s*(i+t),Ra+=s*(r+e),Ia+=3*s,Xe(i=t,r=e)}var e,n,i,r;Va.point=function(o,s){Va.point=t,Xe(e=i=o,n=r=s)},Va.lineEnd=function(){t(e,n)}}function tn(t){function e(e,n){t.moveTo(e+s,n),t.arc(e,n,s,0,Os)}function n(e,n){t.moveTo(e,n),a.point=i}function i(e,n){t.lineTo(e,n)}function r(){a.point=e}function o(){t.closePath()}var s=4.5,a={point:e,lineStart:function(){a.point=n},lineEnd:r,polygonStart:function(){a.lineEnd=o},polygonEnd:function(){a.lineEnd=r,a.point=e},pointRadius:function(t){return s=t,a},result:x};return a}function en(t){function e(t){return(a?i:n)(t)}function n(e){return on(e,function(n,i){n=t(n,i),e.point(n[0],n[1])})}function i(e){function n(n,i){n=t(n,i),e.point(n[0],n[1])}function i(){w=NaN,E.point=o,e.lineStart()}function o(n,i){var o=ge([n,i]),s=t(n,i);r(w,b,y,x,C,A,w=s[0],b=s[1],y=n,x=o[0],C=o[1],A=o[2],a,e),e.point(w,b)}function s(){E.point=n,e.lineEnd()}function l(){i(),E.point=c,E.lineEnd=h}function c(t,e){o(u=t,d=e),f=w,p=b,g=x,m=C,v=A,E.point=o}function h(){r(w,b,y,x,C,A,f,p,u,g,m,v,a,e),E.lineEnd=s,s()}var u,d,f,p,g,m,v,y,w,b,x,C,A,E={point:n,lineStart:i,lineEnd:s,
polygonStart:function(){e.polygonStart(),E.lineStart=l},polygonEnd:function(){e.polygonEnd(),E.lineStart=i}};return E}function r(e,n,i,a,l,c,h,u,d,f,p,g,m,v){var y=h-e,w=u-n,b=y*y+w*w;if(b>4*o&&m--){var x=a+f,C=l+p,A=c+g,E=Math.sqrt(x*x+C*C+A*A),k=Math.asin(A/=E),F=bs(bs(A)-1)<Is||bs(i-d)<Is?(i+d)/2:Math.atan2(C,x),_=t(F,k),D=_[0],S=_[1],$=D-e,T=S-n,B=w*$-y*T;(B*B/b>o||bs((y*$+w*T)/b-.5)>.3||s>a*f+l*p+c*g)&&(r(e,n,i,a,l,c,D,S,F,x/=E,C/=E,A,m,v),v.point(D,S),r(D,S,F,x,C,A,h,u,d,f,p,g,m,v))}}var o=.5,s=Math.cos(30*Hs),a=16;return e.precision=function(t){return arguments.length?(a=(o=t*t)>0&&16,e):Math.sqrt(o)},e}function nn(t){var e=en(function(e,n){return t([e*Ws,n*Ws])});return function(t){return ln(e(t))}}function rn(t){this.stream=t}function on(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sn(t){return an(function(){return t})()}function an(t){function e(t){return t=a(t[0]*Hs,t[1]*Hs),[t[0]*d+l,c-t[1]*d]}function n(t){return t=a.invert((t[0]-l)/d,(c-t[1])/d),t&&[t[0]*Ws,t[1]*Ws]}function i(){a=De(s=un(v,w,b),o);var t=o(g,m);return l=f-t[0]*d,c=p+t[1]*d,r()}function r(){return h&&(h.valid=!1,h=null),e}var o,s,a,l,c,h,u=en(function(t,e){return t=o(t,e),[t[0]*d+l,c-t[1]*d]}),d=150,f=480,p=250,g=0,m=0,v=0,w=0,b=0,x=Na,C=y,A=null,E=null;return e.stream=function(t){return h&&(h.valid=!1),h=ln(x(s,u(C(t)))),h.valid=!0,h},e.clipAngle=function(t){return arguments.length?(x=null==t?(A=t,Na):ze((A=+t)*Hs),r()):A},e.clipExtent=function(t){return arguments.length?(E=t,C=t?We(t[0][0],t[0][1],t[1][0],t[1][1]):y,r()):E},e.scale=function(t){return arguments.length?(d=+t,i()):d},e.translate=function(t){return arguments.length?(f=+t[0],p=+t[1],i()):[f,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Hs,m=t[1]%360*Hs,i()):[g*Ws,m*Ws]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Hs,w=t[1]%360*Hs,b=t.length>2?t[2]%360*Hs:0,i()):[v*Ws,w*Ws,b*Ws]},ls.rebind(e,u,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,i()}}function ln(t){return on(t,function(e,n){t.point(e*Hs,n*Hs)})}function cn(t,e){return[t,e]}function hn(t,e){return[t>Ns?t-Os:-Ns>t?t+Os:t,e]}function un(t,e,n){return t?e||n?De(fn(t),pn(e,n)):fn(t):e||n?pn(e,n):hn}function dn(t){return function(e,n){return e+=t,[e>Ns?e-Os:-Ns>e?e+Os:e,n]}}function fn(t){var e=dn(t);return e.invert=dn(-t),e}function pn(t,e){function n(t,e){var n=Math.cos(e),a=Math.cos(t)*n,l=Math.sin(t)*n,c=Math.sin(e),h=c*i+a*r;return[Math.atan2(l*o-h*s,a*i-c*r),et(h*o+l*s)]}var i=Math.cos(t),r=Math.sin(t),o=Math.cos(e),s=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),a=Math.cos(t)*n,l=Math.sin(t)*n,c=Math.sin(e),h=c*o-l*s;return[Math.atan2(l*o+c*s,a*i+h*r),et(h*i-a*r)]},n}function gn(t,e){var n=Math.cos(t),i=Math.sin(t);return function(r,o,s,a){var l=s*e;null!=r?(r=mn(n,r),o=mn(n,o),(s>0?o>r:r>o)&&(r+=s*Os)):(r=t+s*Os,o=t-.5*l);for(var c,h=r;s>0?h>o:o>h;h-=l)a.point((c=xe([n,-i*Math.cos(h),-i*Math.sin(h)]))[0],c[1])}}function mn(t,e){var n=ge(e);n[0]-=t,be(n);var i=tt(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-Is)%(2*Math.PI)}function vn(t,e,n){var i=ls.range(t,e-Is,n).concat(e);return function(t){return i.map(function(e){return[t,e]})}}function yn(t,e,n){var i=ls.range(t,e-Is,n).concat(e);return function(t){return i.map(function(e){return[e,t]})}}function wn(t){return t.source}function bn(t){return t.target}function xn(t,e,n,i){var r=Math.cos(e),o=Math.sin(e),s=Math.cos(i),a=Math.sin(i),l=r*Math.cos(t),c=r*Math.sin(t),h=s*Math.cos(n),u=s*Math.sin(n),d=2*Math.asin(Math.sqrt(ot(i-e)+r*s*ot(n-t))),f=1/Math.sin(d),p=d?function(t){var e=Math.sin(t*=d)*f,n=Math.sin(d-t)*f,i=n*l+e*h,r=n*c+e*u,s=n*o+e*a;return[Math.atan2(r,i)*Ws,Math.atan2(s,Math.sqrt(i*i+r*r))*Ws]}:function(){return[t*Ws,e*Ws]};return p.distance=d,p}function Cn(){function t(t,r){var o=Math.sin(r*=Hs),s=Math.cos(r),a=bs((t*=Hs)-e),l=Math.cos(a);Ka+=Math.atan2(Math.sqrt((a=s*Math.sin(a))*a+(a=i*o-n*s*l)*a),n*o+i*s*l),e=t,n=o,i=s}var e,n,i;Xa.point=function(r,o){e=r*Hs,n=Math.sin(o*=Hs),i=Math.cos(o),Xa.point=t},Xa.lineEnd=function(){Xa.point=Xa.lineEnd=x}}function An(t,e){function n(e,n){var i=Math.cos(e),r=Math.cos(n),o=t(i*r);return[o*r*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var i=Math.sqrt(t*t+n*n),r=e(i),o=Math.sin(r),s=Math.cos(r);return[Math.atan2(t*o,i*s),Math.asin(i&&n*o/i)]},n}function En(t,e){function n(t,e){s>0?-zs+Is>e&&(e=-zs+Is):e>zs-Is&&(e=zs-Is);var n=s/Math.pow(r(e),o);return[n*Math.sin(o*t),s-n*Math.cos(o*t)]}var i=Math.cos(t),r=function(t){return Math.tan(Ns/4+t/2)},o=t===e?Math.sin(t):Math.log(i/Math.cos(e))/Math.log(r(e)/r(t)),s=i*Math.pow(r(t),o)/o;return o?(n.invert=function(t,e){var n=s-e,i=Q(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(s/i,1/o))-zs]},n):Fn}function kn(t,e){function n(t,e){var n=o-e;return[n*Math.sin(r*t),o-n*Math.cos(r*t)]}var i=Math.cos(t),r=t===e?Math.sin(t):(i-Math.cos(e))/(e-t),o=i/r+t;return bs(r)<Is?cn:(n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/r,o-Q(r)*Math.sqrt(t*t+n*n)]},n)}function Fn(t,e){return[t,Math.log(Math.tan(Ns/4+e/2))]}function _n(t){var e,n=sn(t),i=n.scale,r=n.translate,o=n.clipExtent;return n.scale=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var s=o.apply(n,arguments);if(s===n){if(e=null==t){var a=Ns*i(),l=r();o([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else e&&(s=null);return s},n.clipExtent(null)}function Dn(t,e){return[Math.log(Math.tan(Ns/4+e/2)),-t]}function Sn(t){return t[0]}function $n(t){return t[1]}function Tn(t){for(var e=t.length,n=[0,1],i=2,r=2;e>r;r++){for(;i>1&&J(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function Bn(t,e){return t[0]-e[0]||t[1]-e[1]}function Mn(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Ln(t,e,n,i){var r=t[0],o=n[0],s=e[0]-r,a=i[0]-o,l=t[1],c=n[1],h=e[1]-l,u=i[1]-c,d=(a*(l-c)-u*(r-o))/(u*s-a*h);return[r+d*s,l+d*h]}function Rn(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function In(){ii(this),this.edge=this.site=this.circle=null}function Pn(t){var e=ll.pop()||new In;return e.site=t,e}function Nn(t){Vn(t),ol.remove(t),ll.push(t),ii(t)}function On(t){var e=t.circle,n=e.x,i=e.cy,r={x:n,y:i},o=t.P,s=t.N,a=[t];Nn(t);for(var l=o;l.circle&&bs(n-l.circle.x)<Is&&bs(i-l.circle.cy)<Is;)o=l.P,a.unshift(l),Nn(l),l=o;a.unshift(l),Vn(l);for(var c=s;c.circle&&bs(n-c.circle.x)<Is&&bs(i-c.circle.cy)<Is;)s=c.N,a.push(c),Nn(c),c=s;a.push(c),Vn(c);var h,u=a.length;for(h=1;u>h;++h)c=a[h],l=a[h-1],ti(c.edge,l.site,c.site,r);l=a[0],c=a[u-1],c.edge=Qn(l.site,c.site,null,r),Gn(l),Gn(c)}function jn(t){for(var e,n,i,r,o=t.x,s=t.y,a=ol._;a;)if(i=zn(a,s)-o,i>Is)a=a.L;else{if(r=o-Hn(a,s),!(r>Is)){i>-Is?(e=a.P,n=a):r>-Is?(e=a,n=a.N):e=n=a;break}if(!a.R){e=a;break}a=a.R}var l=Pn(t);if(ol.insert(e,l),e||n){if(e===n)return Vn(e),n=Pn(e.site),ol.insert(l,n),l.edge=n.edge=Qn(e.site,l.site),Gn(e),void Gn(n);if(!n)return void(l.edge=Qn(e.site,l.site));Vn(e),Vn(n);var c=e.site,h=c.x,u=c.y,d=t.x-h,f=t.y-u,p=n.site,g=p.x-h,m=p.y-u,v=2*(d*m-f*g),y=d*d+f*f,w=g*g+m*m,b={x:(m*y-f*w)/v+h,y:(d*w-g*y)/v+u};ti(n.edge,c,p,b),l.edge=Qn(c,t,null,b),n.edge=Qn(t,p,null,b),Gn(e),Gn(n)}}function zn(t,e){var n=t.site,i=n.x,r=n.y,o=r-e;if(!o)return i;var s=t.P;if(!s)return-(1/0);n=s.site;var a=n.x,l=n.y,c=l-e;if(!c)return a;var h=a-i,u=1/o-1/c,d=h/c;return u?(-d+Math.sqrt(d*d-2*u*(h*h/(-2*c)-l+c/2+r-o/2)))/u+i:(i+a)/2}function Hn(t,e){var n=t.N;if(n)return zn(n,e);var i=t.site;return i.y===e?i.x:1/0}function Wn(t){this.site=t,this.edges=[]}function Un(t){for(var e,n,i,r,o,s,a,l,c,h,u=t[0][0],d=t[1][0],f=t[0][1],p=t[1][1],g=rl,m=g.length;m--;)if(o=g[m],o&&o.prepare())for(a=o.edges,l=a.length,s=0;l>s;)h=a[s].end(),i=h.x,r=h.y,c=a[++s%l].start(),e=c.x,n=c.y,(bs(i-e)>Is||bs(r-n)>Is)&&(a.splice(s,0,new ei(Jn(o.site,h,bs(i-u)<Is&&p-r>Is?{x:u,y:bs(e-u)<Is?n:p}:bs(r-p)<Is&&d-i>Is?{x:bs(n-p)<Is?e:d,y:p}:bs(i-d)<Is&&r-f>Is?{x:d,y:bs(e-d)<Is?n:f}:bs(r-f)<Is&&i-u>Is?{x:bs(n-f)<Is?e:u,y:f}:null),o.site,null)),++l)}function qn(t,e){return e.angle-t.angle}function Yn(){ii(this),this.x=this.y=this.arc=this.site=this.cy=null}function Gn(t){var e=t.P,n=t.N;if(e&&n){var i=e.site,r=t.site,o=n.site;if(i!==o){var s=r.x,a=r.y,l=i.x-s,c=i.y-a,h=o.x-s,u=o.y-a,d=2*(l*u-c*h);if(!(d>=-Ps)){var f=l*l+c*c,p=h*h+u*u,g=(u*f-c*p)/d,m=(l*p-h*f)/d,u=m+a,v=cl.pop()||new Yn;v.arc=t,v.site=r,v.x=g+s,v.y=u+Math.sqrt(g*g+m*m),v.cy=u,t.circle=v;for(var y=null,w=al._;w;)if(v.y<w.y||v.y===w.y&&v.x<=w.x){if(!w.L){y=w.P;break}w=w.L}else{if(!w.R){y=w;break}w=w.R}al.insert(y,v),y||(sl=v)}}}}function Vn(t){var e=t.circle;e&&(e.P||(sl=e.N),al.remove(e),cl.push(e),ii(e),t.circle=null)}function Kn(t){for(var e,n=il,i=He(t[0][0],t[0][1],t[1][0],t[1][1]),r=n.length;r--;)e=n[r],(!Xn(e,t)||!i(e)||bs(e.a.x-e.b.x)<Is&&bs(e.a.y-e.b.y)<Is)&&(e.a=e.b=null,n.splice(r,1))}function Xn(t,e){var n=t.b;if(n)return!0;var i,r,o=t.a,s=e[0][0],a=e[1][0],l=e[0][1],c=e[1][1],h=t.l,u=t.r,d=h.x,f=h.y,p=u.x,g=u.y,m=(d+p)/2,v=(f+g)/2;if(g===f){if(s>m||m>=a)return;if(d>p){if(o){if(o.y>=c)return}else o={x:m,y:l};n={x:m,y:c}}else{if(o){if(o.y<l)return}else o={x:m,y:c};n={x:m,y:l}}}else if(i=(d-p)/(g-f),r=v-i*m,-1>i||i>1)if(d>p){if(o){if(o.y>=c)return}else o={x:(l-r)/i,y:l};n={x:(c-r)/i,y:c}}else{if(o){if(o.y<l)return}else o={x:(c-r)/i,y:c};n={x:(l-r)/i,y:l}}else if(g>f){if(o){if(o.x>=a)return}else o={x:s,y:i*s+r};n={x:a,y:i*a+r}}else{if(o){if(o.x<s)return}else o={x:a,y:i*a+r};n={x:s,y:i*s+r}}return t.a=o,t.b=n,!0}function Zn(t,e){this.l=t,this.r=e,this.a=this.b=null}function Qn(t,e,n,i){var r=new Zn(t,e);return il.push(r),n&&ti(r,t,e,n),i&&ti(r,e,t,i),rl[t.i].edges.push(new ei(r,t,e)),rl[e.i].edges.push(new ei(r,e,t)),r}function Jn(t,e,n){var i=new Zn(t,null);return i.a=e,i.b=n,il.push(i),i}function ti(t,e,n,i){t.a||t.b?t.l===n?t.b=i:t.a=i:(t.a=i,t.l=e,t.r=n)}function ei(t,e,n){var i=t.a,r=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(r.x-i.x,i.y-r.y):Math.atan2(i.x-r.x,r.y-i.y)}function ni(){this._=null}function ii(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function ri(t,e){var n=e,i=e.R,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function oi(t,e){var n=e,i=e.L,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function si(t){for(;t.L;)t=t.L;return t}function ai(t,e){var n,i,r,o=t.sort(li).pop();for(il=[],rl=new Array(t.length),ol=new ni,al=new ni;;)if(r=sl,o&&(!r||o.y<r.y||o.y===r.y&&o.x<r.x))(o.x!==n||o.y!==i)&&(rl[o.i]=new Wn(o),jn(o),n=o.x,i=o.y),o=t.pop();else{if(!r)break;On(r.arc)}e&&(Kn(e),Un(e));var s={cells:rl,edges:il};return ol=al=il=rl=null,s}function li(t,e){return e.y-t.y||e.x-t.x}function ci(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function hi(t){return t.x}function ui(t){return t.y}function di(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function fi(t,e,n,i,r,o){if(!t(e,n,i,r,o)){var s=.5*(n+r),a=.5*(i+o),l=e.nodes;l[0]&&fi(t,l[0],n,i,s,a),l[1]&&fi(t,l[1],s,i,r,a),l[2]&&fi(t,l[2],n,a,s,o),l[3]&&fi(t,l[3],s,a,r,o)}}function pi(t,e,n,i,r,o,s){var a,l=1/0;return function c(t,h,u,d,f){if(!(h>o||u>s||i>d||r>f)){if(p=t.point){var p,g=e-t.x,m=n-t.y,v=g*g+m*m;if(l>v){var y=Math.sqrt(l=v);i=e-y,r=n-y,o=e+y,s=n+y,a=p}}for(var w=t.nodes,b=.5*(h+d),x=.5*(u+f),C=e>=b,A=n>=x,E=A<<1|C,k=E+4;k>E;++E)if(t=w[3&E])switch(3&E){case 0:c(t,h,u,b,x);break;case 1:c(t,b,u,d,x);break;case 2:c(t,h,x,b,f);break;case 3:c(t,b,x,d,f)}}}(t,i,r,o,s),a}function gi(t,e){t=ls.rgb(t),e=ls.rgb(e);var n=t.r,i=t.g,r=t.b,o=e.r-n,s=e.g-i,a=e.b-r;return function(t){return"#"+bt(Math.round(n+o*t))+bt(Math.round(i+s*t))+bt(Math.round(r+a*t))}}function mi(t,e){var n,i={},r={};for(n in t)n in e?i[n]=wi(t[n],e[n]):r[n]=t[n];for(n in e)n in t||(r[n]=e[n]);return function(t){for(n in i)r[n]=i[n](t);return r}}function vi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function yi(t,e){var n,i,r,o=ul.lastIndex=dl.lastIndex=0,s=-1,a=[],l=[];for(t+="",e+="";(n=ul.exec(t))&&(i=dl.exec(e));)(r=i.index)>o&&(r=e.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:vi(n,i)})),o=dl.lastIndex;return o<e.length&&(r=e.slice(o),a[s]?a[s]+=r:a[++s]=r),a.length<2?l[0]?(e=l[0].x,function(t){return e(t)+""}):function(){return e}:(e=l.length,function(t){for(var n,i=0;e>i;++i)a[(n=l[i]).i]=n.x(t);return a.join("")})}function wi(t,e){for(var n,i=ls.interpolators.length;--i>=0&&!(n=ls.interpolators[i](t,e)););return n}function bi(t,e){var n,i=[],r=[],o=t.length,s=e.length,a=Math.min(t.length,e.length);for(n=0;a>n;++n)i.push(wi(t[n],e[n]));for(;o>n;++n)r[n]=t[n];for(;s>n;++n)r[n]=e[n];return function(t){for(n=0;a>n;++n)r[n]=i[n](t);return r}}function xi(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function Ci(t){return function(e){return 1-t(1-e)}}function Ai(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function Ei(t){return t*t}function ki(t){return t*t*t}function Fi(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function _i(t){return function(e){return Math.pow(e,t)}}function Di(t){return 1-Math.cos(t*zs)}function Si(t){return Math.pow(2,10*(t-1))}function $i(t){return 1-Math.sqrt(1-t*t)}function Ti(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Os*Math.asin(1/t):(t=1,n=e/4),function(i){return 1+t*Math.pow(2,-10*i)*Math.sin((i-n)*Os/e)}}function Bi(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Mi(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Li(t,e){t=ls.hcl(t),e=ls.hcl(e);var n=t.h,i=t.c,r=t.l,o=e.h-n,s=e.c-i,a=e.l-r;return isNaN(s)&&(s=0,i=isNaN(i)?e.c:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return ht(n+o*t,i+s*t,r+a*t)+""}}function Ri(t,e){t=ls.hsl(t),e=ls.hsl(e);var n=t.h,i=t.s,r=t.l,o=e.h-n,s=e.s-i,a=e.l-r;return isNaN(s)&&(s=0,i=isNaN(i)?e.s:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return lt(n+o*t,i+s*t,r+a*t)+""}}function Ii(t,e){t=ls.lab(t),e=ls.lab(e);var n=t.l,i=t.a,r=t.b,o=e.l-n,s=e.a-i,a=e.b-r;return function(t){return dt(n+o*t,i+s*t,r+a*t)+""}}function Pi(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function Ni(t){var e=[t.a,t.b],n=[t.c,t.d],i=ji(e),r=Oi(e,n),o=ji(zi(n,e,-r))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,i*=-1,r*=-1),this.rotate=(i?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*Ws,this.translate=[t.e,t.f],this.scale=[i,o],this.skew=o?Math.atan2(r,o)*Ws:0}function Oi(t,e){return t[0]*e[0]+t[1]*e[1]}function ji(t){var e=Math.sqrt(Oi(t,t));return e&&(t[0]/=e,t[1]/=e),e}function zi(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}function Hi(t){return t.length?t.pop()+",":""}function Wi(t,e,n,i){if(t[0]!==e[0]||t[1]!==e[1]){var r=n.push("translate(",null,",",null,")");i.push({i:r-4,x:vi(t[0],e[0])},{i:r-2,x:vi(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}function Ui(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(Hi(n)+"rotate(",null,")")-2,x:vi(t,e)})):e&&n.push(Hi(n)+"rotate("+e+")")}function qi(t,e,n,i){t!==e?i.push({i:n.push(Hi(n)+"skewX(",null,")")-2,x:vi(t,e)}):e&&n.push(Hi(n)+"skewX("+e+")")}function Yi(t,e,n,i){if(t[0]!==e[0]||t[1]!==e[1]){var r=n.push(Hi(n)+"scale(",null,",",null,")");i.push({i:r-4,x:vi(t[0],e[0])},{i:r-2,x:vi(t[1],e[1])})}else(1!==e[0]||1!==e[1])&&n.push(Hi(n)+"scale("+e+")")}function Gi(t,e){var n=[],i=[];return t=ls.transform(t),e=ls.transform(e),Wi(t.translate,e.translate,n,i),Ui(t.rotate,e.rotate,n,i),qi(t.skew,e.skew,n,i),Yi(t.scale,e.scale,n,i),t=e=null,function(t){for(var e,r=-1,o=i.length;++r<o;)n[(e=i[r]).i]=e.x(t);return n.join("")}}function Vi(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function Ki(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function Xi(t){for(var e=t.source,n=t.target,i=Qi(e,n),r=[e];e!==i;)e=e.parent,r.push(e);for(var o=r.length;n!==i;)r.splice(o,0,n),n=n.parent;return r}function Zi(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function Qi(t,e){if(t===e)return t;for(var n=Zi(t),i=Zi(e),r=n.pop(),o=i.pop(),s=null;r===o;)s=r,r=n.pop(),o=i.pop();return s}function Ji(t){t.fixed|=2}function tr(t){t.fixed&=-7}function er(t){t.fixed|=4,t.px=t.x,t.py=t.y}function nr(t){t.fixed&=-5}function ir(t,e,n){var i=0,r=0;if(t.charge=0,!t.leaf)for(var o,s=t.nodes,a=s.length,l=-1;++l<a;)o=s[l],null!=o&&(ir(o,e,n),t.charge+=o.charge,i+=o.charge*o.cx,r+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var c=e*n[t.point.index];t.charge+=t.pointCharge=c,i+=c*t.point.x,r+=c*t.point.y}t.cx=i/t.charge,t.cy=r/t.charge}function rr(t,e){return ls.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=hr,t}function or(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(r=t.children)&&(i=r.length))for(var i,r;--i>=0;)n.push(r[i])}function sr(t,e){for(var n=[t],i=[];null!=(t=n.pop());)if(i.push(t),(o=t.children)&&(r=o.length))for(var r,o,s=-1;++s<r;)n.push(o[s]);for(;null!=(t=i.pop());)e(t)}function ar(t){return t.children}function lr(t){return t.value}function cr(t,e){return e.value-t.value}function hr(t){return ls.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function ur(t){return t.x}function dr(t){return t.y}function fr(t,e,n){t.y0=e,t.y=n}function pr(t){return ls.range(t.length)}function gr(t){for(var e=-1,n=t[0].length,i=[];++e<n;)i[e]=0;return i}function mr(t){for(var e,n=1,i=0,r=t[0][1],o=t.length;o>n;++n)(e=t[n][1])>r&&(i=n,r=e);return i}function vr(t){return t.reduce(yr,0)}function yr(t,e){return t+e[1]}function wr(t,e){return br(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function br(t,e){for(var n=-1,i=+t[0],r=(t[1]-i)/e,o=[];++n<=e;)o[n]=r*n+i;return o}function xr(t){return[ls.min(t),ls.max(t)]}function Cr(t,e){return t.value-e.value}function Ar(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Er(t,e){t._pack_next=e,e._pack_prev=t}function kr(t,e){var n=e.x-t.x,i=e.y-t.y,r=t.r+e.r;return.999*r*r>n*n+i*i}function Fr(t){function e(t){h=Math.min(t.x-t.r,h),u=Math.max(t.x+t.r,u),d=Math.min(t.y-t.r,d),f=Math.max(t.y+t.r,f)}if((n=t.children)&&(c=n.length)){var n,i,r,o,s,a,l,c,h=1/0,u=-(1/0),d=1/0,f=-(1/0);if(n.forEach(_r),i=n[0],i.x=-i.r,i.y=0,e(i),c>1&&(r=n[1],r.x=r.r,r.y=0,e(r),c>2))for(o=n[2],$r(i,r,o),e(o),Ar(i,o),i._pack_prev=o,Ar(o,r),r=i._pack_next,s=3;c>s;s++){$r(i,r,o=n[s]);var p=0,g=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,g++)if(kr(a,o)){p=1;break}if(1==p)for(l=i._pack_prev;l!==a._pack_prev&&!kr(l,o);l=l._pack_prev,m++);p?(m>g||g==m&&r.r<i.r?Er(i,r=a):Er(i=l,r),s--):(Ar(i,o),r=o,e(o))}var v=(h+u)/2,y=(d+f)/2,w=0;for(s=0;c>s;s++)o=n[s],o.x-=v,o.y-=y,w=Math.max(w,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=w,n.forEach(Dr)}}function _r(t){t._pack_next=t._pack_prev=t}function Dr(t){delete t._pack_next,delete t._pack_prev}function Sr(t,e,n,i){var r=t.children;if(t.x=e+=i*t.x,t.y=n+=i*t.y,t.r*=i,r)for(var o=-1,s=r.length;++o<s;)Sr(r[o],e,n,i)}function $r(t,e,n){var i=t.r+n.r,r=e.x-t.x,o=e.y-t.y;if(i&&(r||o)){var s=e.r+n.r,a=r*r+o*o;s*=s,i*=i;var l=.5+(i-s)/(2*a),c=Math.sqrt(Math.max(0,2*s*(i+a)-(i-=a)*i-s*s))/(2*a);n.x=t.x+l*r+c*o,n.y=t.y+l*o-c*r}else n.x=t.x+i,n.y=t.y}function Tr(t,e){return t.parent==e.parent?1:2}function Br(t){var e=t.children;return e.length?e[0]:t.t}function Mr(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function Lr(t,e,n){var i=n/(e.i-t.i);e.c-=i,e.s+=n,t.c+=i,e.z+=n,e.m+=n}function Rr(t){for(var e,n=0,i=0,r=t.children,o=r.length;--o>=0;)e=r[o],e.z+=n,e.m+=n,n+=e.s+(i+=e.c)}function Ir(t,e,n){return t.a.parent===e.parent?t.a:n}function Pr(t){return 1+ls.max(t,function(t){return t.y})}function Nr(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Or(t){var e=t.children;return e&&e.length?Or(e[0]):t}function jr(t){var e,n=t.children;return n&&(e=n.length)?jr(n[e-1]):t}function zr(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Hr(t,e){var n=t.x+e[3],i=t.y+e[0],r=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return 0>r&&(n+=r/2,r=0),0>o&&(i+=o/2,o=0),{x:n,y:i,dx:r,dy:o}}function Wr(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function Ur(t){return t.rangeExtent?t.rangeExtent():Wr(t.range())}function qr(t,e,n,i){var r=n(t[0],t[1]),o=i(e[0],e[1]);return function(t){return o(r(t))}}function Yr(t,e){var n,i=0,r=t.length-1,o=t[i],s=t[r];return o>s&&(n=i,i=r,r=n,n=o,o=s,s=n),t[i]=e.floor(o),t[r]=e.ceil(s),t}function Gr(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:Al}function Vr(t,e,n,i){var r=[],o=[],s=0,a=Math.min(t.length,e.length)-1;for(t[a]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=a;)r.push(n(t[s-1],t[s])),o.push(i(e[s-1],e[s]));return function(e){var n=ls.bisect(t,e,1,a)-1;return o[n](r[n](e))}}function Kr(t,e,n,i){function r(){var r=Math.min(t.length,e.length)>2?Vr:qr,l=i?Ki:Vi;return s=r(t,e,l,n),a=r(e,t,l,wi),o}function o(t){return s(t)}var s,a;return o.invert=function(t){return a(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),r()):t},o.range=function(t){return arguments.length?(e=t,r()):e},o.rangeRound=function(t){return o.range(t).interpolate(Pi)},o.clamp=function(t){return arguments.length?(i=t,r()):i},o.interpolate=function(t){return arguments.length?(n=t,r()):n},o.ticks=function(e){return Jr(t,e)},o.tickFormat=function(e,n){return to(t,e,n)},o.nice=function(e){return Zr(t,e),r()},o.copy=function(){return Kr(t,e,n,i)},r()}function Xr(t,e){return ls.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Zr(t,e){return Yr(t,Gr(Qr(t,e)[2]))}function Qr(t,e){null==e&&(e=10);var n=Wr(t),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/e)/Math.LN10)),o=e/i*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),n[0]=Math.ceil(n[0]/r)*r,n[1]=Math.floor(n[1]/r)*r+.5*r,n[2]=r,n}function Jr(t,e){return ls.range.apply(ls,Qr(t,e))}function to(t,e,n){var i=Qr(t,e);if(n){var r=ua.exec(n);if(r.shift(),"s"===r[8]){var o=ls.formatPrefix(Math.max(bs(i[0]),bs(i[1])));return r[7]||(r[7]="."+eo(o.scale(i[2]))),r[8]="f",n=ls.format(r.join("")),function(t){return n(o.scale(t))+o.symbol}}r[7]||(r[7]="."+no(r[8],i)),n=r.join("")}else n=",."+eo(i[2])+"f";return ls.format(n)}function eo(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function no(t,e){var n=eo(e[2]);return t in El?Math.abs(n-eo(Math.max(bs(e[0]),bs(e[1]))))+ +("e"!==t):n-2*("%"===t)}function io(t,e,n,i){function r(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(r(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((i=e.map(Number)).map(r)),s):i},s.base=function(n){return arguments.length?(e=+n,t.domain(i.map(r)),s):e},s.nice=function(){var e=Yr(i.map(r),n?Math:Fl);return t.domain(e),i=e.map(o),s},s.ticks=function(){var t=Wr(i),s=[],a=t[0],l=t[1],c=Math.floor(r(a)),h=Math.ceil(r(l)),u=e%1?2:e;if(isFinite(h-c)){if(n){for(;h>c;c++)for(var d=1;u>d;d++)s.push(o(c)*d);s.push(o(c))}else for(s.push(o(c));c++<h;)for(var d=u-1;d>0;d--)s.push(o(c)*d);for(c=0;s[c]<a;c++);for(h=s.length;s[h-1]>l;h--);s=s.slice(c,h)}return s},s.tickFormat=function(t,n){if(!arguments.length)return kl;arguments.length<2?n=kl:"function"!=typeof n&&(n=ls.format(n));var i=Math.max(1,e*t/s.ticks().length);return function(t){var s=t/o(Math.round(r(t)));return e-.5>s*e&&(s*=e),i>=s?n(t):""}},s.copy=function(){return io(t.copy(),e,n,i)},Xr(s,t)}function ro(t,e,n){function i(e){return t(r(e))}var r=oo(e),o=oo(1/e);return i.invert=function(e){return o(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(r)),i):n},i.ticks=function(t){return Jr(n,t)},i.tickFormat=function(t,e){return to(n,t,e)},i.nice=function(t){return i.domain(Zr(n,t))},i.exponent=function(s){return arguments.length?(r=oo(e=s),o=oo(1/e),t.domain(n.map(r)),i):e},i.copy=function(){return ro(t.copy(),e,n)},Xr(i,t)}function oo(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function so(t,e){function n(n){return o[((r.get(n)||("range"===e.t?r.set(n,t.push(n)):NaN))-1)%o.length]}function i(e,n){return ls.range(t.length).map(function(t){return e+n*t})}var r,o,s;return n.domain=function(i){if(!arguments.length)return t;t=[],r=new c;for(var o,s=-1,a=i.length;++s<a;)r.has(o=i[s])||r.set(o,t.push(o));return n[e.t].apply(n,e.a)},n.range=function(t){return arguments.length?(o=t,s=0,e={t:"range",a:arguments},n):o},n.rangePoints=function(r,a){arguments.length<2&&(a=0);var l=r[0],c=r[1],h=t.length<2?(l=(l+c)/2,0):(c-l)/(t.length-1+a);return o=i(l+h*a/2,h),s=0,e={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(r,a){arguments.length<2&&(a=0);var l=r[0],c=r[1],h=t.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(t.length-1+a)|0;return o=i(l+Math.round(h*a/2+(c-l-(t.length-1+a)*h)/2),h),s=0,e={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(r,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=r[1]<r[0],h=r[c-0],u=r[1-c],d=(u-h)/(t.length-a+2*l);return o=i(h+d*l,d),c&&o.reverse(),s=d*(1-a),e={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=r[1]<r[0],h=r[c-0],u=r[1-c],d=Math.floor((u-h)/(t.length-a+2*l));return o=i(h+Math.round((u-h-(t.length-a)*d)/2),d),c&&o.reverse(),s=Math.round(d*(1-a)),e={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return s},n.rangeExtent=function(){return Wr(e.a[0])},n.copy=function(){return so(t,e)},n.domain(t)}function ao(t,e){function o(){var n=0,i=e.length;for(a=[];++n<i;)a[n-1]=ls.quantile(t,n/i);return s}function s(t){return isNaN(t=+t)?void 0:e[ls.bisect(a,t)]}var a;return s.domain=function(e){return arguments.length?(t=e.map(i).filter(r).sort(n),o()):t},s.range=function(t){return arguments.length?(e=t,o()):e},s.quantiles=function(){return a},s.invertExtent=function(n){return n=e.indexOf(n),0>n?[NaN,NaN]:[n>0?a[n-1]:t[0],n<a.length?a[n]:t[t.length-1]]},s.copy=function(){return ao(t,e)},o()}function lo(t,e,n){function i(e){return n[Math.max(0,Math.min(s,Math.floor(o*(e-t))))]}function r(){return o=n.length/(e-t),s=n.length-1,i}var o,s;return i.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],r()):[t,e]},i.range=function(t){return arguments.length?(n=t,r()):n},i.invertExtent=function(e){return e=n.indexOf(e),e=0>e?NaN:e/o+t,[e,e+1/o]},i.copy=function(){return lo(t,e,n)},r()}function co(t,e){function n(n){return n>=n?e[ls.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return co(t,e)},n}function ho(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return Jr(t,e)},e.tickFormat=function(e,n){return to(t,e,n)},e.copy=function(){return ho(t)},e}function uo(){return 0}function fo(t){return t.innerRadius}function po(t){return t.outerRadius}function go(t){return t.startAngle}function mo(t){return t.endAngle}function vo(t){return t&&t.padAngle}function yo(t,e,n,i){return(t-n)*e-(e-i)*t>0?0:1}function wo(t,e,n,i,r){var o=t[0]-e[0],s=t[1]-e[1],a=(r?i:-i)/Math.sqrt(o*o+s*s),l=a*s,c=-a*o,h=t[0]+l,u=t[1]+c,d=e[0]+l,f=e[1]+c,p=(h+d)/2,g=(u+f)/2,m=d-h,v=f-u,y=m*m+v*v,w=n-i,b=h*f-d*u,x=(0>v?-1:1)*Math.sqrt(Math.max(0,w*w*y-b*b)),C=(b*v-m*x)/y,A=(-b*m-v*x)/y,E=(b*v+m*x)/y,k=(-b*m+v*x)/y,F=C-p,_=A-g,D=E-p,S=k-g;return F*F+_*_>D*D+S*S&&(C=E,A=k),[[C-l,A-c],[C*n/w,A*n/w]]}function bo(t){function e(e){function s(){c.push("M",o(t(h),a))}for(var l,c=[],h=[],u=-1,d=e.length,f=Ft(n),p=Ft(i);++u<d;)r.call(this,l=e[u],u)?h.push([+f.call(this,l,u),+p.call(this,l,u)]):h.length&&(s(),h=[]);return h.length&&s(),c.length?c.join(""):null}var n=Sn,i=$n,r=Se,o=xo,s=o.key,a=.7;return e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=t,e):i},e.defined=function(t){return arguments.length?(r=t,e):r},e.interpolate=function(t){return arguments.length?(s="function"==typeof t?o=t:(o=Bl.get(t)||xo).key,e):s},e.tension=function(t){return arguments.length?(a=t,e):a},e}function xo(t){return t.length>1?t.join("L"):t+"Z"}function Co(t){return t.join("L")+"Z"}function Ao(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("H",(i[0]+(i=t[e])[0])/2,"V",i[1]);return n>1&&r.push("H",i[0]),r.join("")}function Eo(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("V",(i=t[e])[1],"H",i[0]);return r.join("")}function ko(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("H",(i=t[e])[0],"V",i[1]);return r.join("")}function Fo(t,e){return t.length<4?xo(t):t[1]+So(t.slice(1,-1),$o(t,e))}function _o(t,e){return t.length<3?Co(t):t[0]+So((t.push(t[0]),t),$o([t[t.length-2]].concat(t,[t[1]]),e))}function Do(t,e){return t.length<3?xo(t):t[0]+So(t,$o(t,e))}function So(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return xo(t);var n=t.length!=e.length,i="",r=t[0],o=t[1],s=e[0],a=s,l=1;if(n&&(i+="Q"+(o[0]-2*s[0]/3)+","+(o[1]-2*s[1]/3)+","+o[0]+","+o[1],r=t[1],l=2),e.length>1){a=e[1],o=t[l],l++,i+="C"+(r[0]+s[0])+","+(r[1]+s[1])+","+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1];for(var c=2;c<e.length;c++,l++)o=t[l],a=e[c],i+="S"+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1]}if(n){var h=t[l];i+="Q"+(o[0]+2*a[0]/3)+","+(o[1]+2*a[1]/3)+","+h[0]+","+h[1]}return i}function $o(t,e){for(var n,i=[],r=(1-e)/2,o=t[0],s=t[1],a=1,l=t.length;++a<l;)n=o,o=s,s=t[a],i.push([r*(s[0]-n[0]),r*(s[1]-n[1])]);return i}function To(t){if(t.length<3)return xo(t);var e=1,n=t.length,i=t[0],r=i[0],o=i[1],s=[r,r,r,(i=t[1])[0]],a=[o,o,o,i[1]],l=[r,",",o,"L",Ro(Rl,s),",",Ro(Rl,a)];for(t.push(t[n-1]);++e<=n;)i=t[e],s.shift(),s.push(i[0]),a.shift(),a.push(i[1]),Io(l,s,a);return t.pop(),l.push("L",i),l.join("")}function Bo(t){if(t.length<4)return xo(t);for(var e,n=[],i=-1,r=t.length,o=[0],s=[0];++i<3;)e=t[i],o.push(e[0]),s.push(e[1]);for(n.push(Ro(Rl,o)+","+Ro(Rl,s)),--i;++i<r;)e=t[i],o.shift(),o.push(e[0]),s.shift(),s.push(e[1]),Io(n,o,s);return n.join("")}function Mo(t){for(var e,n,i=-1,r=t.length,o=r+4,s=[],a=[];++i<4;)n=t[i%r],s.push(n[0]),a.push(n[1]);for(e=[Ro(Rl,s),",",Ro(Rl,a)],--i;++i<o;)n=t[i%r],s.shift(),s.push(n[0]),a.shift(),a.push(n[1]),Io(e,s,a);return e.join("")}function Lo(t,e){var n=t.length-1;if(n)for(var i,r,o=t[0][0],s=t[0][1],a=t[n][0]-o,l=t[n][1]-s,c=-1;++c<=n;)i=t[c],r=c/n,i[0]=e*i[0]+(1-e)*(o+r*a),i[1]=e*i[1]+(1-e)*(s+r*l);return To(t)}function Ro(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Io(t,e,n){t.push("C",Ro(Ml,e),",",Ro(Ml,n),",",Ro(Ll,e),",",Ro(Ll,n),",",Ro(Rl,e),",",Ro(Rl,n))}function Po(t,e){return(e[1]-t[1])/(e[0]-t[0])}function No(t){for(var e=0,n=t.length-1,i=[],r=t[0],o=t[1],s=i[0]=Po(r,o);++e<n;)i[e]=(s+(s=Po(r=o,o=t[e+1])))/2;return i[e]=s,i}function Oo(t){for(var e,n,i,r,o=[],s=No(t),a=-1,l=t.length-1;++a<l;)e=Po(t[a],t[a+1]),bs(e)<Is?s[a]=s[a+1]=0:(n=s[a]/e,i=s[a+1]/e,r=n*n+i*i,r>9&&(r=3*e/Math.sqrt(r),s[a]=r*n,s[a+1]=r*i));for(a=-1;++a<=l;)r=(t[Math.min(l,a+1)][0]-t[Math.max(0,a-1)][0])/(6*(1+s[a]*s[a])),o.push([r||0,s[a]*r||0]);return o}function jo(t){return t.length<3?xo(t):t[0]+So(t,Oo(t))}function zo(t){for(var e,n,i,r=-1,o=t.length;++r<o;)e=t[r],n=e[0],i=e[1]-zs,e[0]=n*Math.cos(i),e[1]=n*Math.sin(i);return t}function Ho(t){function e(e){function l(){g.push("M",a(t(v),u),h,c(t(m.reverse()),u),"Z")}for(var d,f,p,g=[],m=[],v=[],y=-1,w=e.length,b=Ft(n),x=Ft(r),C=n===i?function(){return f}:Ft(i),A=r===o?function(){return p}:Ft(o);++y<w;)s.call(this,d=e[y],y)?(m.push([f=+b.call(this,d,y),p=+x.call(this,d,y)]),v.push([+C.call(this,d,y),+A.call(this,d,y)])):m.length&&(l(),m=[],v=[]);return m.length&&l(),g.length?g.join(""):null}var n=Sn,i=Sn,r=0,o=$n,s=Se,a=xo,l=a.key,c=a,h="L",u=.7;return e.x=function(t){return arguments.length?(n=i=t,e):i},e.x0=function(t){return arguments.length?(n=t,e):n},e.x1=function(t){return arguments.length?(i=t,e):i},e.y=function(t){return arguments.length?(r=o=t,e):o},e.y0=function(t){return arguments.length?(r=t,e):r},e.y1=function(t){return arguments.length?(o=t,e):o},e.defined=function(t){return arguments.length?(s=t,e):s},e.interpolate=function(t){return arguments.length?(l="function"==typeof t?a=t:(a=Bl.get(t)||xo).key,c=a.reverse||a,h=a.closed?"M":"L",e):l},e.tension=function(t){return arguments.length?(u=t,e):u},e}function Wo(t){return t.radius}function Uo(t){return[t.x,t.y]}function qo(t){
return function(){var e=t.apply(this,arguments),n=e[0],i=e[1]-zs;return[n*Math.cos(i),n*Math.sin(i)]}}function Yo(){return 64}function Go(){return"circle"}function Vo(t){var e=Math.sqrt(t/Ns);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}function Ko(t){return function(){var e,n,i;(e=this[t])&&(i=e[n=e.active])&&(i.timer.c=null,i.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,i.event&&i.event.interrupt.call(this,this.__data__,i.index))}}function Xo(t,e,n){return ks(t,Hl),t.namespace=e,t.id=n,t}function Zo(t,e,n,i){var r=t.id,o=t.namespace;return W(t,"function"==typeof n?function(t,s,a){t[o][r].tween.set(e,i(n.call(t,t.__data__,s,a)))}:(n=i(n),function(t){t[o][r].tween.set(e,n)}))}function Qo(t){return null==t&&(t=""),function(){this.textContent=t}}function Jo(t){return null==t?"__transition__":"__transition_"+t+"__"}function ts(t,e,n,i,r){function o(t){var e=g.delay;return h.t=e+l,t>=e?s(t-e):void(h.c=s)}function s(n){var r=p.active,o=p[r];o&&(o.timer.c=null,o.timer.t=NaN,--p.count,delete p[r],o.event&&o.event.interrupt.call(t,t.__data__,o.index));for(var s in p)if(i>+s){var c=p[s];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[s]}h.c=a,Tt(function(){return h.c&&a(n||1)&&(h.c=null,h.t=NaN),1},0,l),p.active=i,g.event&&g.event.start.call(t,t.__data__,e),f=[],g.tween.forEach(function(n,i){(i=i.call(t,t.__data__,e))&&f.push(i)}),d=g.ease,u=g.duration}function a(r){for(var o=r/u,s=d(o),a=f.length;a>0;)f[--a].call(t,s);return o>=1?(g.event&&g.event.end.call(t,t.__data__,e),--p.count?delete p[i]:delete t[n],1):void 0}var l,h,u,d,f,p=t[n]||(t[n]={active:0,count:0}),g=p[i];g||(l=r.time,h=Tt(o,0,l),g=p[i]={tween:new c,time:l,timer:h,delay:r.delay,duration:r.duration,ease:r.ease,index:e},r=null,++p.count)}function es(t,e,n){t.attr("transform",function(t){var i=e(t);return"translate("+(isFinite(i)?i:n(t))+",0)"})}function ns(t,e,n){t.attr("transform",function(t){var i=e(t);return"translate(0,"+(isFinite(i)?i:n(t))+")"})}function is(t){return t.toISOString()}function rs(t,e,n){function i(e){return t(e)}function r(t,n){var i=t[1]-t[0],r=i/n,o=ls.bisect(Zl,r);return o==Zl.length?[e.year,Qr(t.map(function(t){return t/31536e6}),n)[2]]:o?e[r/Zl[o-1]<Zl[o]/r?o-1:o]:[tc,Qr(t,n)[2]]}return i.invert=function(e){return os(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain().map(os)},i.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,os(+n+1),e).length}var o=i.domain(),s=Wr(o),a=null==t?r(s,10):"number"==typeof t&&r(s,t);return a&&(t=a[0],e=a[1]),i.domain(Yr(o,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=os(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=os(+e+1);return e}}:t))},i.ticks=function(t,e){var n=Wr(i.domain()),o=null==t?r(n,10):"number"==typeof t?r(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],os(+n[1]+1),1>e?1:e)},i.tickFormat=function(){return n},i.copy=function(){return rs(t.copy(),e,n)},Xr(i,t)}function os(t){return new Date(t)}function ss(t){return JSON.parse(t.responseText)}function as(t){var e=us.createRange();return e.selectNode(us.body),e.createContextualFragment(t.responseText)}var ls={version:"3.5.11"},cs=[].slice,hs=function(t){return cs.call(t)},us=this.document;if(us)try{hs(us.documentElement.childNodes)[0].nodeType}catch(ds){hs=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),us)try{us.createElement("DIV").style.setProperty("opacity",0,"")}catch(fs){var ps=this.Element.prototype,gs=ps.setAttribute,ms=ps.setAttributeNS,vs=this.CSSStyleDeclaration.prototype,ys=vs.setProperty;ps.setAttribute=function(t,e){gs.call(this,t,e+"")},ps.setAttributeNS=function(t,e,n){ms.call(this,t,e,n+"")},vs.setProperty=function(t,e,n){ys.call(this,t,e+"",n)}}ls.ascending=n,ls.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:NaN},ls.min=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=t[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=t[r])&&n>i&&(n=i)}else{for(;++r<o;)if(null!=(i=e.call(t,t[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=e.call(t,t[r],r))&&n>i&&(n=i)}return n},ls.max=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r<o;)if(null!=(i=t[r])&&i>=i){n=i;break}for(;++r<o;)null!=(i=t[r])&&i>n&&(n=i)}else{for(;++r<o;)if(null!=(i=e.call(t,t[r],r))&&i>=i){n=i;break}for(;++r<o;)null!=(i=e.call(t,t[r],r))&&i>n&&(n=i)}return n},ls.extent=function(t,e){var n,i,r,o=-1,s=t.length;if(1===arguments.length){for(;++o<s;)if(null!=(i=t[o])&&i>=i){n=r=i;break}for(;++o<s;)null!=(i=t[o])&&(n>i&&(n=i),i>r&&(r=i))}else{for(;++o<s;)if(null!=(i=e.call(t,t[o],o))&&i>=i){n=r=i;break}for(;++o<s;)null!=(i=e.call(t,t[o],o))&&(n>i&&(n=i),i>r&&(r=i))}return[n,r]},ls.sum=function(t,e){var n,i=0,o=t.length,s=-1;if(1===arguments.length)for(;++s<o;)r(n=+t[s])&&(i+=n);else for(;++s<o;)r(n=+e.call(t,t[s],s))&&(i+=n);return i},ls.mean=function(t,e){var n,o=0,s=t.length,a=-1,l=s;if(1===arguments.length)for(;++a<s;)r(n=i(t[a]))?o+=n:--l;else for(;++a<s;)r(n=i(e.call(t,t[a],a)))?o+=n:--l;return l?o/l:void 0},ls.quantile=function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r},ls.median=function(t,e){var o,s=[],a=t.length,l=-1;if(1===arguments.length)for(;++l<a;)r(o=i(t[l]))&&s.push(o);else for(;++l<a;)r(o=i(e.call(t,t[l],l)))&&s.push(o);return s.length?ls.quantile(s.sort(n),.5):void 0},ls.variance=function(t,e){var n,o,s=t.length,a=0,l=0,c=-1,h=0;if(1===arguments.length)for(;++c<s;)r(n=i(t[c]))&&(o=n-a,a+=o/++h,l+=o*(n-a));else for(;++c<s;)r(n=i(e.call(t,t[c],c)))&&(o=n-a,a+=o/++h,l+=o*(n-a));return h>1?l/(h-1):void 0},ls.deviation=function(){var t=ls.variance.apply(this,arguments);return t?Math.sqrt(t):t};var ws=o(n);ls.bisectLeft=ws.left,ls.bisect=ls.bisectRight=ws.right,ls.bisector=function(t){return o(1===t.length?function(e,i){return n(t(e),i)}:t)},ls.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,2>o&&(e=0));for(var i,r,o=n-e;o;)r=Math.random()*o--|0,i=t[o+e],t[o+e]=t[r+e],t[r+e]=i;return t},ls.permute=function(t,e){for(var n=e.length,i=new Array(n);n--;)i[n]=t[e[n]];return i},ls.pairs=function(t){for(var e,n=0,i=t.length-1,r=t[0],o=new Array(0>i?0:i);i>n;)o[n]=[e=r,r=t[++n]];return o},ls.zip=function(){if(!(i=arguments.length))return[];for(var t=-1,e=ls.min(arguments,s),n=new Array(e);++t<e;)for(var i,r=-1,o=n[t]=new Array(i);++r<i;)o[r]=arguments[r][t];return n},ls.transpose=function(t){return ls.zip.apply(ls,t)},ls.keys=function(t){var e=[];for(var n in t)e.push(n);return e},ls.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ls.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},ls.merge=function(t){for(var e,n,i,r=t.length,o=-1,s=0;++o<r;)s+=t[o].length;for(n=new Array(s);--r>=0;)for(i=t[r],e=i.length;--e>=0;)n[--s]=i[e];return n};var bs=Math.abs;ls.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n===1/0)throw new Error("infinite range");var i,r=[],o=a(bs(n)),s=-1;if(t*=o,e*=o,n*=o,0>n)for(;(i=t+n*++s)>e;)r.push(i/o);else for(;(i=t+n*++s)<e;)r.push(i/o);return r},ls.map=function(t,e){var n=new c;if(t instanceof c)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var i,r=-1,o=t.length;if(1===arguments.length)for(;++r<o;)n.set(r,t[r]);else for(;++r<o;)n.set(e.call(t,i=t[r],r),i)}else for(var s in t)n.set(s,t[s]);return n};var xs="__proto__",Cs="\x00";l(c,{has:d,get:function(t){return this._[h(t)]},set:function(t,e){return this._[h(t)]=e},remove:f,keys:p,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:u(e),value:this._[e]});return t},size:g,empty:m,forEach:function(t){for(var e in this._)t.call(this,u(e),this._[e])}}),ls.nest=function(){function t(e,s,a){if(a>=o.length)return i?i.call(r,s):n?s.sort(n):s;for(var l,h,u,d,f=-1,p=s.length,g=o[a++],m=new c;++f<p;)(d=m.get(l=g(h=s[f])))?d.push(h):m.set(l,[h]);return e?(h=e(),u=function(n,i){h.set(n,t(e,i,a))}):(h={},u=function(n,i){h[n]=t(e,i,a)}),m.forEach(u),h}function e(t,n){if(n>=o.length)return t;var i=[],r=s[n++];return t.forEach(function(t,r){i.push({key:t,values:e(r,n)})}),r?i.sort(function(t,e){return r(t.key,e.key)}):i}var n,i,r={},o=[],s=[];return r.map=function(e,n){return t(n,e,0)},r.entries=function(n){return e(t(ls.map,n,0),0)},r.key=function(t){return o.push(t),r},r.sortKeys=function(t){return s[o.length-1]=t,r},r.sortValues=function(t){return n=t,r},r.rollup=function(t){return i=t,r},r},ls.set=function(t){var e=new v;if(t)for(var n=0,i=t.length;i>n;++n)e.add(t[n]);return e},l(v,{has:d,add:function(t){return this._[h(t+="")]=!0,t},remove:f,values:p,size:g,empty:m,forEach:function(t){for(var e in this._)t.call(this,u(e))}}),ls.behavior={},ls.rebind=function(t,e){for(var n,i=1,r=arguments.length;++i<r;)t[n=arguments[i]]=w(t,e,e[n]);return t};var As=["webkit","ms","moz","Moz","o","O"];ls.dispatch=function(){for(var t=new C,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=A(t);return t},C.prototype.on=function(t,e){var n=t.indexOf("."),i="";if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(i):this[t].on(i,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(i,null);return this}},ls.event=null,ls.requote=function(t){return t.replace(Es,"\\$&")};var Es=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ks={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},Fs=function(t,e){return e.querySelector(t)},_s=function(t,e){return e.querySelectorAll(t)},Ds=function(t,e){var n=t.matches||t[b(t,"matchesSelector")];return(Ds=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(Fs=function(t,e){return Sizzle(t,e)[0]||null},_s=Sizzle,Ds=Sizzle.matchesSelector),ls.selection=function(){return ls.select(us.documentElement)};var Ss=ls.selection.prototype=[];Ss.select=function(t){var e,n,i,r,o=[];t=D(t);for(var s=-1,a=this.length;++s<a;){o.push(e=[]),e.parentNode=(i=this[s]).parentNode;for(var l=-1,c=i.length;++l<c;)(r=i[l])?(e.push(n=t.call(r,r.__data__,l,s)),n&&"__data__"in r&&(n.__data__=r.__data__)):e.push(null)}return _(o)},Ss.selectAll=function(t){var e,n,i=[];t=S(t);for(var r=-1,o=this.length;++r<o;)for(var s=this[r],a=-1,l=s.length;++a<l;)(n=s[a])&&(i.push(e=hs(t.call(n,n.__data__,a,r))),e.parentNode=n);return _(i)};var $s={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ls.ns={prefix:$s,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),$s.hasOwnProperty(n)?{space:$s[n],local:t}:t}},Ss.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=ls.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each($(e,t[e]));return this}return this.each($(t,e))},Ss.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),i=(t=M(t)).length,r=-1;if(e=n.classList){for(;++r<i;)if(!e.contains(t[r]))return!1}else for(e=n.getAttribute("class");++r<i;)if(!B(t[r]).test(e))return!1;return!0}for(e in t)this.each(L(e,t[e]));return this}return this.each(L(t,e))},Ss.style=function(t,n,i){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(n="");for(i in t)this.each(I(i,t[i],n));return this}if(2>r){var o=this.node();return e(o).getComputedStyle(o,null).getPropertyValue(t)}i=""}return this.each(I(t,n,i))},Ss.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(P(e,t[e]));return this}return this.each(P(t,e))},Ss.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Ss.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Ss.append=function(t){return t=N(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Ss.insert=function(t,e){return t=N(t),e=D(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},Ss.remove=function(){return this.each(O)},Ss.data=function(t,e){function n(t,n){var i,r,o,s=t.length,u=n.length,d=Math.min(s,u),f=new Array(u),p=new Array(u),g=new Array(s);if(e){var m,v=new c,y=new Array(s);for(i=-1;++i<s;)(r=t[i])&&(v.has(m=e.call(r,r.__data__,i))?g[i]=r:v.set(m,r),y[i]=m);for(i=-1;++i<u;)(r=v.get(m=e.call(n,o=n[i],i)))?r!==!0&&(f[i]=r,r.__data__=o):p[i]=j(o),v.set(m,!0);for(i=-1;++i<s;)i in y&&v.get(y[i])!==!0&&(g[i]=t[i])}else{for(i=-1;++i<d;)r=t[i],o=n[i],r?(r.__data__=o,f[i]=r):p[i]=j(o);for(;u>i;++i)p[i]=j(n[i]);for(;s>i;++i)g[i]=t[i]}p.update=f,p.parentNode=f.parentNode=g.parentNode=t.parentNode,a.push(p),l.push(f),h.push(g)}var i,r,o=-1,s=this.length;if(!arguments.length){for(t=new Array(s=(i=this[0]).length);++o<s;)(r=i[o])&&(t[o]=r.__data__);return t}var a=U([]),l=_([]),h=_([]);if("function"==typeof t)for(;++o<s;)n(i=this[o],t.call(i,i.parentNode.__data__,o));else for(;++o<s;)n(i=this[o],t);return l.enter=function(){return a},l.exit=function(){return h},l},Ss.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Ss.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=z(t));for(var o=0,s=this.length;s>o;o++){r.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var a=0,l=n.length;l>a;a++)(i=n[a])&&t.call(i,i.__data__,a,o)&&e.push(i)}return _(r)},Ss.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,i=this[t],r=i.length-1,o=i[r];--r>=0;)(n=i[r])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},Ss.sort=function(t){t=H.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},Ss.each=function(t){return W(this,function(e,n,i){t.call(e,e.__data__,n,i)})},Ss.call=function(t){var e=hs(arguments);return t.apply(e[0]=this,e),this},Ss.empty=function(){return!this.node()},Ss.node=function(){for(var t=0,e=this.length;e>t;t++)for(var n=this[t],i=0,r=n.length;r>i;i++){var o=n[i];if(o)return o}return null},Ss.size=function(){var t=0;return W(this,function(){++t}),t};var Ts=[];ls.selection.enter=U,ls.selection.enter.prototype=Ts,Ts.append=Ss.append,Ts.empty=Ss.empty,Ts.node=Ss.node,Ts.call=Ss.call,Ts.size=Ss.size,Ts.select=function(t){for(var e,n,i,r,o,s=[],a=-1,l=this.length;++a<l;){i=(r=this[a]).update,s.push(e=[]),e.parentNode=r.parentNode;for(var c=-1,h=r.length;++c<h;)(o=r[c])?(e.push(i[c]=n=t.call(r.parentNode,o.__data__,c,a)),n.__data__=o.__data__):e.push(null)}return _(s)},Ts.insert=function(t,e){return arguments.length<2&&(e=q(this)),Ss.insert.call(this,t,e)},ls.select=function(e){var n;return"string"==typeof e?(n=[Fs(e,us)],n.parentNode=us.documentElement):(n=[e],n.parentNode=t(e)),_([n])},ls.selectAll=function(t){var e;return"string"==typeof t?(e=hs(_s(t,us)),e.parentNode=us.documentElement):(e=hs(t),e.parentNode=null),_([e])},Ss.on=function(t,e,n){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e=!1);for(n in t)this.each(Y(n,t[n],e));return this}if(2>i)return(i=this.node()["__on"+t])&&i._;n=!1}return this.each(Y(t,e,n))};var Bs=ls.map({mouseenter:"mouseover",mouseleave:"mouseout"});us&&Bs.forEach(function(t){"on"+t in us&&Bs.remove(t)});var Ms,Ls=0;ls.mouse=function(t){return X(t,k())};var Rs=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ls.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=k().changedTouches),e)for(var i,r=0,o=e.length;o>r;++r)if((i=e[r]).identifier===n)return X(t,i)},ls.behavior.drag=function(){function t(){this.on("mousedown.drag",o).on("touchstart.drag",s)}function n(t,e,n,o,s){return function(){function a(){var t,n,i=e(d,g);i&&(t=i[0]-w[0],n=i[1]-w[1],p|=t|n,w=i,f({type:"drag",x:i[0]+c[0],y:i[1]+c[1],dx:t,dy:n}))}function l(){e(d,g)&&(v.on(o+m,null).on(s+m,null),y(p),f({type:"dragend"}))}var c,h=this,u=ls.event.target,d=h.parentNode,f=i.of(h,arguments),p=0,g=t(),m=".drag"+(null==g?"":"-"+g),v=ls.select(n(u)).on(o+m,a).on(s+m,l),y=K(u),w=e(d,g);r?(c=r.apply(h,arguments),c=[c.x-w[0],c.y-w[1]]):c=[0,0],f({type:"dragstart"})}}var i=F(t,"drag","dragstart","dragend"),r=null,o=n(x,ls.mouse,e,"mousemove","mouseup"),s=n(Z,ls.touch,y,"touchmove","touchend");return t.origin=function(e){return arguments.length?(r=e,t):r},ls.rebind(t,i,"on")},ls.touches=function(t,e){return arguments.length<2&&(e=k().touches),e?hs(e).map(function(e){var n=X(t,e);return n.identifier=e.identifier,n}):[]};var Is=1e-6,Ps=Is*Is,Ns=Math.PI,Os=2*Ns,js=Os-Is,zs=Ns/2,Hs=Ns/180,Ws=180/Ns,Us=Math.SQRT2,qs=2,Ys=4;ls.interpolateZoom=function(t,e){var n,i,r=t[0],o=t[1],s=t[2],a=e[0],l=e[1],c=e[2],h=a-r,u=l-o,d=h*h+u*u;if(Ps>d)i=Math.log(c/s)/Us,n=function(t){return[r+t*h,o+t*u,s*Math.exp(Us*t*i)]};else{var f=Math.sqrt(d),p=(c*c-s*s+Ys*d)/(2*s*qs*f),g=(c*c-s*s-Ys*d)/(2*c*qs*f),m=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);i=(v-m)/Us,n=function(t){var e=t*i,n=it(m),a=s/(qs*f)*(n*rt(Us*e+m)-nt(m));return[r+a*h,o+a*u,s*n/it(Us*e+m)]}}return n.duration=1e3*i,n},ls.behavior.zoom=function(){function t(t){t.on(T,u).on(Vs+".zoom",f).on("dblclick.zoom",p).on(L,d)}function n(t){return[(t[0]-k.x)/k.k,(t[1]-k.y)/k.k]}function i(t){return[t[0]*k.k+k.x,t[1]*k.k+k.y]}function r(t){k.k=Math.max(D[0],Math.min(D[1],t))}function o(t,e){e=i(e),k.x+=t[0]-e[0],k.y+=t[1]-e[1]}function s(e,n,i,s){e.__chart__={x:k.x,y:k.y,k:k.k},r(Math.pow(2,s)),o(m=n,i),e=ls.select(e),S>0&&(e=e.transition().duration(S)),e.call(t.event)}function a(){x&&x.domain(b.range().map(function(t){return(t-k.x)/k.k}).map(b.invert)),A&&A.domain(C.range().map(function(t){return(t-k.y)/k.k}).map(C.invert))}function l(t){$++||t({type:"zoomstart"})}function c(t){a(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function h(t){--$||(t({type:"zoomend"}),m=null)}function u(){function t(){a=1,o(ls.mouse(r),d),c(s)}function i(){u.on(B,null).on(M,null),f(a),h(s)}var r=this,s=R.of(r,arguments),a=0,u=ls.select(e(r)).on(B,t).on(M,i),d=n(ls.mouse(r)),f=K(r);zl.call(r),l(s)}function d(){function t(){var t=ls.touches(p);return f=k.k,t.forEach(function(t){t.identifier in m&&(m[t.identifier]=n(t))}),t}function e(){var e=ls.event.target;ls.select(e).on(b,i).on(x,a),C.push(e);for(var n=ls.event.changedTouches,r=0,o=n.length;o>r;++r)m[n[r].identifier]=null;var l=t(),c=Date.now();if(1===l.length){if(500>c-w){var h=l[0];s(p,h,m[h.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),E()}w=c}else if(l.length>1){var h=l[0],u=l[1],d=h[0]-u[0],f=h[1]-u[1];v=d*d+f*f}}function i(){var t,e,n,i,s=ls.touches(p);zl.call(p);for(var a=0,l=s.length;l>a;++a,i=null)if(n=s[a],i=m[n.identifier]){if(e)break;t=n,e=i}if(i){var h=(h=n[0]-t[0])*h+(h=n[1]-t[1])*h,u=v&&Math.sqrt(h/v);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+i[0])/2,(e[1]+i[1])/2],r(u*f)}w=null,o(t,e),c(g)}function a(){if(ls.event.touches.length){for(var e=ls.event.changedTouches,n=0,i=e.length;i>n;++n)delete m[e[n].identifier];for(var r in m)return void t()}ls.selectAll(C).on(y,null),A.on(T,u).on(L,d),F(),h(g)}var f,p=this,g=R.of(p,arguments),m={},v=0,y=".zoom-"+ls.event.changedTouches[0].identifier,b="touchmove"+y,x="touchend"+y,C=[],A=ls.select(p),F=K(p);e(),l(g),A.on(T,null).on(L,e)}function f(){var t=R.of(this,arguments);y?clearTimeout(y):(zl.call(this),g=n(m=v||ls.mouse(this)),l(t)),y=setTimeout(function(){y=null,h(t)},50),E(),r(Math.pow(2,.002*Gs())*k.k),o(m,g),c(t)}function p(){var t=ls.mouse(this),e=Math.log(k.k)/Math.LN2;s(this,t,n(t),ls.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var g,m,v,y,w,b,x,C,A,k={x:0,y:0,k:1},_=[960,500],D=Ks,S=250,$=0,T="mousedown.zoom",B="mousemove.zoom",M="mouseup.zoom",L="touchstart.zoom",R=F(t,"zoomstart","zoom","zoomend");return Vs||(Vs="onwheel"in us?(Gs=function(){return-ls.event.deltaY*(ls.event.deltaMode?120:1)},"wheel"):"onmousewheel"in us?(Gs=function(){return ls.event.wheelDelta},"mousewheel"):(Gs=function(){return-ls.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each(function(){var t=R.of(this,arguments),e=k;Ol?ls.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(t)}).tween("zoom:zoom",function(){var n=_[0],i=_[1],r=m?m[0]:n/2,o=m?m[1]:i/2,s=ls.interpolateZoom([(r-k.x)/k.k,(o-k.y)/k.k,n/k.k],[(r-e.x)/e.k,(o-e.y)/e.k,n/e.k]);return function(e){var i=s(e),a=n/i[2];this.__chart__=k={x:r-i[0]*a,y:o-i[1]*a,k:a},c(t)}}).each("interrupt.zoom",function(){h(t)}).each("end.zoom",function(){h(t)}):(this.__chart__=k,l(t),c(t),h(t))})},t.translate=function(e){return arguments.length?(k={x:+e[0],y:+e[1],k:k.k},a(),t):[k.x,k.y]},t.scale=function(e){return arguments.length?(k={x:k.x,y:k.y,k:null},r(+e),a(),t):k.k},t.scaleExtent=function(e){return arguments.length?(D=null==e?Ks:[+e[0],+e[1]],t):D},t.center=function(e){return arguments.length?(v=e&&[+e[0],+e[1]],t):v},t.size=function(e){return arguments.length?(_=e&&[+e[0],+e[1]],t):_},t.duration=function(e){return arguments.length?(S=+e,t):S},t.x=function(e){return arguments.length?(x=e,b=e.copy(),k={x:0,y:0,k:1},t):x},t.y=function(e){return arguments.length?(A=e,C=e.copy(),k={x:0,y:0,k:1},t):A},ls.rebind(t,R,"on")};var Gs,Vs,Ks=[0,1/0];ls.color=st,st.prototype.toString=function(){return this.rgb()+""},ls.hsl=at;var Xs=at.prototype=new st;Xs.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new at(this.h,this.s,this.l/t)},Xs.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new at(this.h,this.s,t*this.l)},Xs.rgb=function(){return lt(this.h,this.s,this.l)},ls.hcl=ct;var Zs=ct.prototype=new st;Zs.brighter=function(t){return new ct(this.h,this.c,Math.min(100,this.l+Qs*(arguments.length?t:1)))},Zs.darker=function(t){return new ct(this.h,this.c,Math.max(0,this.l-Qs*(arguments.length?t:1)))},Zs.rgb=function(){return ht(this.h,this.c,this.l).rgb()},ls.lab=ut;var Qs=18,Js=.95047,ta=1,ea=1.08883,na=ut.prototype=new st;na.brighter=function(t){return new ut(Math.min(100,this.l+Qs*(arguments.length?t:1)),this.a,this.b)},na.darker=function(t){return new ut(Math.max(0,this.l-Qs*(arguments.length?t:1)),this.a,this.b)},na.rgb=function(){return dt(this.l,this.a,this.b)},ls.rgb=vt;var ia=vt.prototype=new st;ia.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,i=this.b,r=30;return e||n||i?(e&&r>e&&(e=r),n&&r>n&&(n=r),i&&r>i&&(i=r),new vt(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,i/t))):new vt(r,r,r)},ia.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new vt(t*this.r,t*this.g,t*this.b)},ia.hsl=function(){return Ct(this.r,this.g,this.b)},ia.toString=function(){return"#"+bt(this.r)+bt(this.g)+bt(this.b)};var ra=ls.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ra.forEach(function(t,e){ra.set(t,yt(e))}),ls.functor=Ft,ls.xhr=_t(y),ls.dsv=function(t,e){function n(t,n,o){arguments.length<3&&(o=n,n=null);var s=Dt(t,e,null==n?i:r(n),o);return s.row=function(t){return arguments.length?s.response(null==(n=t)?i:r(t)):n},s}function i(t){return n.parse(t.responseText)}function r(t){return function(e){return n.parse(e.responseText,t)}}function o(e){return e.map(s).join(t)}function s(t){return a.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n]"),l=t.charCodeAt(0);return n.parse=function(t,e){var i;return n.parseRows(t,function(t,n){if(i)return i(t,n-1);var r=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");i=e?function(t,n){return e(r(t),n)}:r})},n.parseRows=function(t,e){function n(){if(h>=c)return s;if(r)return r=!1,o;var e=h;if(34===t.charCodeAt(e)){for(var n=e;n++<c;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}h=n+2;var i=t.charCodeAt(n+1);return 13===i?(r=!0,10===t.charCodeAt(n+2)&&++h):10===i&&(r=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;c>h;){var i=t.charCodeAt(h++),a=1;if(10===i)r=!0;else if(13===i)r=!0,10===t.charCodeAt(h)&&(++h,++a);else if(i!==l)continue;return t.slice(e,h-a)}return t.slice(e)}for(var i,r,o={},s={},a=[],c=t.length,h=0,u=0;(i=n())!==s;){for(var d=[];i!==o&&i!==s;)d.push(i),i=n();e&&null==(d=e(d,u++))||a.push(d)}return a},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var i=new v,r=[];return e.forEach(function(t){for(var e in t)i.has(e)||r.push(i.add(e))}),[r.map(s).join(t)].concat(e.map(function(e){return r.map(function(t){return s(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(o).join("\n")},n},ls.csv=ls.dsv(",","text/csv"),ls.tsv=ls.dsv("	","text/tab-separated-values");var oa,sa,aa,la,ca=this[b(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};ls.timer=function(){Tt.apply(this,arguments)},ls.timer.flush=function(){Mt(),Lt()},ls.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var ha=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(It);ls.formatPrefix=function(t,e){var n=0;return(t=+t)&&(0>t&&(t*=-1),e&&(t=ls.round(t,Rt(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),ha[8+n/3]};var ua=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,da=ls.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=ls.round(t,Rt(t,e))).toFixed(Math.max(0,Math.min(20,Rt(t*(1+1e-15),e))))}}),fa=ls.time={},pa=Date;Ot.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ga.setUTCDate.apply(this._,arguments)},setDay:function(){ga.setUTCDay.apply(this._,arguments)},setFullYear:function(){ga.setUTCFullYear.apply(this._,arguments)},setHours:function(){ga.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ga.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ga.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ga.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ga.setUTCSeconds.apply(this._,arguments)},setTime:function(){ga.setTime.apply(this._,arguments)}};var ga=Date.prototype;fa.year=jt(function(t){return t=fa.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),fa.years=fa.year.range,fa.years.utc=fa.year.utc.range,fa.day=jt(function(t){var e=new pa(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),fa.days=fa.day.range,fa.days.utc=fa.day.utc.range,fa.dayOfYear=function(t){var e=fa.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=fa[t]=jt(function(t){return(t=fa.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=fa.year(t).getDay();return Math.floor((fa.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});fa[t+"s"]=n.range,fa[t+"s"].utc=n.utc.range,fa[t+"OfYear"]=function(t){var n=fa.year(t).getDay();return Math.floor((fa.dayOfYear(t)+(n+e)%7)/7)}}),fa.week=fa.sunday,fa.weeks=fa.sunday.range,fa.weeks.utc=fa.sunday.utc.range,fa.weekOfYear=fa.sundayOfYear;var ma={"-":"",_:" ",0:"0"},va=/^\s*\d+/,ya=/^%/;ls.locale=function(t){return{numberFormat:Pt(t),timeFormat:Ht(t)}};var wa=ls.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ls.format=wa.numberFormat,ls.geo={},ce.prototype={s:0,t:0,add:function(t){he(t,this.t,ba),he(ba.s,this.s,this),this.s?this.t+=ba.t:this.s=ba.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ba=new ce;ls.geo.stream=function(t,e){t&&xa.hasOwnProperty(t.type)?xa[t.type](t,e):ue(t,e)};var xa={Feature:function(t,e){ue(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)ue(n[i].geometry,e)}},Ca={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){de(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)de(n[i],e,0)},Polygon:function(t,e){fe(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)fe(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)ue(n[i],e)}};ls.geo.area=function(t){return Aa=0,ls.geo.stream(t,ka),Aa};var Aa,Ea=new ce,ka={sphere:function(){Aa+=4*Ns},point:x,lineStart:x,lineEnd:x,polygonStart:function(){Ea.reset(),ka.lineStart=pe},polygonEnd:function(){var t=2*Ea;Aa+=0>t?4*Ns+t:t,ka.lineStart=ka.lineEnd=ka.point=x}};ls.geo.bounds=function(){function t(t,e){w.push(b=[h=t,d=t]),u>e&&(u=e),e>f&&(f=e)}function e(e,n){var i=ge([e*Hs,n*Hs]);if(v){
var r=ve(v,i),o=[r[1],-r[0],0],s=ve(o,r);be(s),s=xe(s);var l=e-p,c=l>0?1:-1,g=s[0]*Ws*c,m=bs(l)>180;if(m^(g>c*p&&c*e>g)){var y=s[1]*Ws;y>f&&(f=y)}else if(g=(g+360)%360-180,m^(g>c*p&&c*e>g)){var y=-s[1]*Ws;u>y&&(u=y)}else u>n&&(u=n),n>f&&(f=n);m?p>e?a(h,e)>a(h,d)&&(d=e):a(e,d)>a(h,d)&&(h=e):d>=h?(h>e&&(h=e),e>d&&(d=e)):e>p?a(h,e)>a(h,d)&&(d=e):a(e,d)>a(h,d)&&(h=e)}else t(e,n);v=i,p=e}function n(){x.point=e}function i(){b[0]=h,b[1]=d,x.point=t,v=null}function r(t,n){if(v){var i=t-p;y+=bs(i)>180?i+(i>0?360:-360):i}else g=t,m=n;ka.point(t,n),e(t,n)}function o(){ka.lineStart()}function s(){r(g,m),ka.lineEnd(),bs(y)>Is&&(h=-(d=180)),b[0]=h,b[1]=d,v=null}function a(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var h,u,d,f,p,g,m,v,y,w,b,x={point:t,lineStart:n,lineEnd:i,polygonStart:function(){x.point=r,x.lineStart=o,x.lineEnd=s,y=0,ka.polygonStart()},polygonEnd:function(){ka.polygonEnd(),x.point=t,x.lineStart=n,x.lineEnd=i,0>Ea?(h=-(d=180),u=-(f=90)):y>Is?f=90:-Is>y&&(u=-90),b[0]=h,b[1]=d}};return function(t){f=d=-(h=u=1/0),w=[],ls.geo.stream(t,x);var e=w.length;if(e){w.sort(l);for(var n,i=1,r=w[0],o=[r];e>i;++i)n=w[i],c(n[0],r)||c(n[1],r)?(a(r[0],n[1])>a(r[0],r[1])&&(r[1]=n[1]),a(n[0],r[1])>a(r[0],r[1])&&(r[0]=n[0])):o.push(r=n);for(var s,n,p=-(1/0),e=o.length-1,i=0,r=o[e];e>=i;r=n,++i)n=o[i],(s=a(r[1],n[0]))>p&&(p=s,h=n[0],d=r[1])}return w=b=null,h===1/0||u===1/0?[[NaN,NaN],[NaN,NaN]]:[[h,u],[d,f]]}}(),ls.geo.centroid=function(t){Fa=_a=Da=Sa=$a=Ta=Ba=Ma=La=Ra=Ia=0,ls.geo.stream(t,Pa);var e=La,n=Ra,i=Ia,r=e*e+n*n+i*i;return Ps>r&&(e=Ta,n=Ba,i=Ma,Is>_a&&(e=Da,n=Sa,i=$a),r=e*e+n*n+i*i,Ps>r)?[NaN,NaN]:[Math.atan2(n,e)*Ws,et(i/Math.sqrt(r))*Ws]};var Fa,_a,Da,Sa,$a,Ta,Ba,Ma,La,Ra,Ia,Pa={sphere:x,point:Ae,lineStart:ke,lineEnd:Fe,polygonStart:function(){Pa.lineStart=_e},polygonEnd:function(){Pa.lineStart=ke}},Na=Me(Se,Pe,Oe,[-Ns,-Ns/2]),Oa=1e9;ls.geo.clipExtent=function(){var t,e,n,i,r,o,s={stream:function(t){return r&&(r.valid=!1),r=o(t),r.valid=!0,r},extent:function(a){return arguments.length?(o=We(t=+a[0][0],e=+a[0][1],n=+a[1][0],i=+a[1][1]),r&&(r.valid=!1,r=null),s):[[t,e],[n,i]]}};return s.extent([[0,0],[960,500]])},(ls.geo.conicEqualArea=function(){return Ue(qe)}).raw=qe,ls.geo.albers=function(){return ls.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ls.geo.albersUsa=function(){function t(t){var o=t[0],s=t[1];return e=null,n(o,s),e||(i(o,s),e)||r(o,s),e}var e,n,i,r,o=ls.geo.albers(),s=ls.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ls.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=o.scale(),n=o.translate(),i=(t[0]-n[0])/e,r=(t[1]-n[1])/e;return(r>=.12&&.234>r&&i>=-.425&&-.214>i?s:r>=.166&&.234>r&&i>=-.214&&-.115>i?a:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=s.stream(t),i=a.stream(t);return{point:function(t,r){e.point(t,r),n.point(t,r),i.point(t,r)},sphere:function(){e.sphere(),n.sphere(),i.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),i.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),i.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),i.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),i.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),s.precision(e),a.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),s.scale(.35*e),a.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var c=o.scale(),h=+e[0],u=+e[1];return n=o.translate(e).clipExtent([[h-.455*c,u-.238*c],[h+.455*c,u+.238*c]]).stream(l).point,i=s.translate([h-.307*c,u+.201*c]).clipExtent([[h-.425*c+Is,u+.12*c+Is],[h-.214*c-Is,u+.234*c-Is]]).stream(l).point,r=a.translate([h-.205*c,u+.212*c]).clipExtent([[h-.214*c+Is,u+.166*c+Is],[h-.115*c-Is,u+.234*c-Is]]).stream(l).point,t},t.scale(1070)};var ja,za,Ha,Wa,Ua,qa,Ya={point:x,lineStart:x,lineEnd:x,polygonStart:function(){za=0,Ya.lineStart=Ye},polygonEnd:function(){Ya.lineStart=Ya.lineEnd=Ya.point=x,ja+=bs(za/2)}},Ga={point:Ge,lineStart:x,lineEnd:x,polygonStart:x,polygonEnd:x},Va={point:Xe,lineStart:Ze,lineEnd:Qe,polygonStart:function(){Va.lineStart=Je},polygonEnd:function(){Va.point=Xe,Va.lineStart=Ze,Va.lineEnd=Qe}};ls.geo.path=function(){function t(t){return t&&("function"==typeof a&&o.pointRadius(+a.apply(this,arguments)),s&&s.valid||(s=r(o)),ls.geo.stream(t,s)),o.result()}function e(){return s=null,t}var n,i,r,o,s,a=4.5;return t.area=function(t){return ja=0,ls.geo.stream(t,r(Ya)),ja},t.centroid=function(t){return Da=Sa=$a=Ta=Ba=Ma=La=Ra=Ia=0,ls.geo.stream(t,r(Va)),Ia?[La/Ia,Ra/Ia]:Ma?[Ta/Ma,Ba/Ma]:$a?[Da/$a,Sa/$a]:[NaN,NaN]},t.bounds=function(t){return Ua=qa=-(Ha=Wa=1/0),ls.geo.stream(t,r(Ga)),[[Ha,Wa],[Ua,qa]]},t.projection=function(t){return arguments.length?(r=(n=t)?t.stream||nn(t):y,e()):n},t.context=function(t){return arguments.length?(o=null==(i=t)?new Ve:new tn(t),"function"!=typeof a&&o.pointRadius(a),e()):i},t.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(o.pointRadius(+e),+e),t):a},t.projection(ls.geo.albersUsa()).context(null)},ls.geo.transform=function(t){return{stream:function(e){var n=new rn(e);for(var i in t)n[i]=t[i];return n}}},rn.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ls.geo.projection=sn,ls.geo.projectionMutator=an,(ls.geo.equirectangular=function(){return sn(cn)}).raw=cn.invert=cn,ls.geo.rotation=function(t){function e(e){return e=t(e[0]*Hs,e[1]*Hs),e[0]*=Ws,e[1]*=Ws,e}return t=un(t[0]%360*Hs,t[1]*Hs,t.length>2?t[2]*Hs:0),e.invert=function(e){return e=t.invert(e[0]*Hs,e[1]*Hs),e[0]*=Ws,e[1]*=Ws,e},e},hn.invert=cn,ls.geo.circle=function(){function t(){var t="function"==typeof i?i.apply(this,arguments):i,e=un(-t[0]*Hs,-t[1]*Hs,0).invert,r=[];return n(null,null,1,{point:function(t,n){r.push(t=e(t,n)),t[0]*=Ws,t[1]*=Ws}}),{type:"Polygon",coordinates:[r]}}var e,n,i=[0,0],r=6;return t.origin=function(e){return arguments.length?(i=e,t):i},t.angle=function(i){return arguments.length?(n=gn((e=+i)*Hs,r*Hs),t):e},t.precision=function(i){return arguments.length?(n=gn(e*Hs,(r=+i)*Hs),t):r},t.angle(90)},ls.geo.distance=function(t,e){var n,i=(e[0]-t[0])*Hs,r=t[1]*Hs,o=e[1]*Hs,s=Math.sin(i),a=Math.cos(i),l=Math.sin(r),c=Math.cos(r),h=Math.sin(o),u=Math.cos(o);return Math.atan2(Math.sqrt((n=u*s)*n+(n=c*h-l*u*a)*n),l*h+c*u*a)},ls.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return ls.range(Math.ceil(o/m)*m,r,m).map(d).concat(ls.range(Math.ceil(c/v)*v,l,v).map(f)).concat(ls.range(Math.ceil(i/p)*p,n,p).filter(function(t){return bs(t%m)>Is}).map(h)).concat(ls.range(Math.ceil(a/g)*g,s,g).filter(function(t){return bs(t%v)>Is}).map(u))}var n,i,r,o,s,a,l,c,h,u,d,f,p=10,g=p,m=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(f(l).slice(1),d(r).reverse().slice(1),f(c).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],r=+e[1][0],c=+e[0][1],l=+e[1][1],o>r&&(e=o,o=r,r=e),c>l&&(e=c,c=l,l=e),t.precision(y)):[[o,c],[r,l]]},t.minorExtent=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],a=+e[0][1],s=+e[1][1],i>n&&(e=i,i=n,n=e),a>s&&(e=a,a=s,s=e),t.precision(y)):[[i,a],[n,s]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(m=+e[0],v=+e[1],t):[m,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(y=+e,h=vn(a,s,90),u=yn(i,n,y),d=vn(c,l,90),f=yn(o,r,y),t):y},t.majorExtent([[-180,-90+Is],[180,90-Is]]).minorExtent([[-180,-80-Is],[180,80+Is]])},ls.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||i.apply(this,arguments),n||r.apply(this,arguments)]}}var e,n,i=wn,r=bn;return t.distance=function(){return ls.geo.distance(e||i.apply(this,arguments),n||r.apply(this,arguments))},t.source=function(n){return arguments.length?(i=n,e="function"==typeof n?null:n,t):i},t.target=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.precision=function(){return arguments.length?t:0},t},ls.geo.interpolate=function(t,e){return xn(t[0]*Hs,t[1]*Hs,e[0]*Hs,e[1]*Hs)},ls.geo.length=function(t){return Ka=0,ls.geo.stream(t,Xa),Ka};var Ka,Xa={sphere:x,point:x,lineStart:Cn,lineEnd:x,polygonStart:x,polygonEnd:x},Za=An(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(ls.geo.azimuthalEqualArea=function(){return sn(Za)}).raw=Za;var Qa=An(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},y);(ls.geo.azimuthalEquidistant=function(){return sn(Qa)}).raw=Qa,(ls.geo.conicConformal=function(){return Ue(En)}).raw=En,(ls.geo.conicEquidistant=function(){return Ue(kn)}).raw=kn;var Ja=An(function(t){return 1/t},Math.atan);(ls.geo.gnomonic=function(){return sn(Ja)}).raw=Ja,Fn.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-zs]},(ls.geo.mercator=function(){return _n(Fn)}).raw=Fn;var tl=An(function(){return 1},Math.asin);(ls.geo.orthographic=function(){return sn(tl)}).raw=tl;var el=An(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(ls.geo.stereographic=function(){return sn(el)}).raw=el,Dn.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-zs]},(ls.geo.transverseMercator=function(){var t=_n(Dn),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=Dn,ls.geom={},ls.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,r=Ft(n),o=Ft(i),s=t.length,a=[],l=[];for(e=0;s>e;e++)a.push([+r.call(this,t[e],e),+o.call(this,t[e],e),e]);for(a.sort(Bn),e=0;s>e;e++)l.push([a[e][0],-a[e][1]]);var c=Tn(a),h=Tn(l),u=h[0]===c[0],d=h[h.length-1]===c[c.length-1],f=[];for(e=c.length-1;e>=0;--e)f.push(t[a[c[e]][2]]);for(e=+u;e<h.length-d;++e)f.push(t[a[h[e]][2]]);return f}var n=Sn,i=$n;return arguments.length?e(t):(e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=t,e):i},e)},ls.geom.polygon=function(t){return ks(t,nl),t};var nl=ls.geom.polygon.prototype=[];nl.area=function(){for(var t,e=-1,n=this.length,i=this[n-1],r=0;++e<n;)t=i,i=this[e],r+=t[1]*i[0]-t[0]*i[1];return.5*r},nl.centroid=function(t){var e,n,i=-1,r=this.length,o=0,s=0,a=this[r-1];for(arguments.length||(t=-1/(6*this.area()));++i<r;)e=a,a=this[i],n=e[0]*a[1]-a[0]*e[1],o+=(e[0]+a[0])*n,s+=(e[1]+a[1])*n;return[o*t,s*t]},nl.clip=function(t){for(var e,n,i,r,o,s,a=Rn(t),l=-1,c=this.length-Rn(this),h=this[c-1];++l<c;){for(e=t.slice(),t.length=0,r=this[l],o=e[(i=e.length-a)-1],n=-1;++n<i;)s=e[n],Mn(s,h,r)?(Mn(o,h,r)||t.push(Ln(o,s,h,r)),t.push(s)):Mn(o,h,r)&&t.push(Ln(o,s,h,r)),o=s;a&&t.push(t[0]),h=r}return t};var il,rl,ol,sl,al,ll=[],cl=[];Wn.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)t=e[n].edge,t.b&&t.a||e.splice(n,1);return e.sort(qn),e.length},ei.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},ni.prototype={insert:function(t,e){var n,i,r;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=si(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)i=n.U,n===i.L?(r=i.R,r&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.R&&(ri(this,n),t=n,n=t.U),n.C=!1,i.C=!0,oi(this,i))):(r=i.L,r&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.L&&(oi(this,n),t=n,n=t.U),n.C=!1,i.C=!0,ri(this,i))),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,i,r=t.U,o=t.L,s=t.R;if(n=o?s?si(s):o:s,r?r.L===t?r.L=n:r.R=n:this._=n,o&&s?(i=n.C,n.C=t.C,n.L=o,o.U=n,n!==s?(r=n.U,n.U=t.U,t=n.R,r.L=t,n.R=s,s.U=n):(n.U=r,r=n,t=n.R)):(i=t.C,t=n),t&&(t.U=r),!i){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===r.L){if(e=r.R,e.C&&(e.C=!1,r.C=!0,ri(this,r),e=r.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,oi(this,e),e=r.R),e.C=r.C,r.C=e.R.C=!1,ri(this,r),t=this._;break}}else if(e=r.L,e.C&&(e.C=!1,r.C=!0,oi(this,r),e=r.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,ri(this,e),e=r.L),e.C=r.C,r.C=e.L.C=!1,oi(this,r),t=this._;break}e.C=!0,t=r,r=r.U}while(!t.C);t&&(t.C=!1)}}},ls.geom.voronoi=function(t){function e(t){var e=new Array(t.length),i=a[0][0],r=a[0][1],o=a[1][0],s=a[1][1];return ai(n(t),a).cells.forEach(function(n,a){var l=n.edges,c=n.site,h=e[a]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):c.x>=i&&c.x<=o&&c.y>=r&&c.y<=s?[[i,s],[o,s],[o,r],[i,r]]:[];h.point=t[a]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Is)*Is,y:Math.round(s(t,e)/Is)*Is,i:e}})}var i=Sn,r=$n,o=i,s=r,a=hl;return t?e(t):(e.links=function(t){return ai(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ai(n(t)).cells.forEach(function(n,i){for(var r,o,s=n.site,a=n.edges.sort(qn),l=-1,c=a.length,h=a[c-1].edge,u=h.l===s?h.r:h.l;++l<c;)r=h,o=u,h=a[l].edge,u=h.l===s?h.r:h.l,i<o.i&&i<u.i&&ci(s,o,u)<0&&e.push([t[i],t[o.i],t[u.i]])}),e},e.x=function(t){return arguments.length?(o=Ft(i=t),e):i},e.y=function(t){return arguments.length?(s=Ft(r=t),e):r},e.clipExtent=function(t){return arguments.length?(a=null==t?hl:t,e):a===hl?null:a},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):a===hl?null:a&&a[1]},e)};var hl=[[-1e6,-1e6],[1e6,1e6]];ls.geom.delaunay=function(t){return ls.geom.voronoi().triangles(t)},ls.geom.quadtree=function(t,e,n,i,r){function o(t){function o(t,e,n,i,r,o,s,a){if(!isNaN(n)&&!isNaN(i))if(t.leaf){var l=t.x,h=t.y;if(null!=l)if(bs(l-n)+bs(h-i)<.01)c(t,e,n,i,r,o,s,a);else{var u=t.point;t.x=t.y=t.point=null,c(t,u,l,h,r,o,s,a),c(t,e,n,i,r,o,s,a)}else t.x=n,t.y=i,t.point=e}else c(t,e,n,i,r,o,s,a)}function c(t,e,n,i,r,s,a,l){var c=.5*(r+a),h=.5*(s+l),u=n>=c,d=i>=h,f=d<<1|u;t.leaf=!1,t=t.nodes[f]||(t.nodes[f]=di()),u?r=c:a=c,d?s=h:l=h,o(t,e,n,i,r,s,a,l)}var h,u,d,f,p,g,m,v,y,w=Ft(a),b=Ft(l);if(null!=e)g=e,m=n,v=i,y=r;else if(v=y=-(g=m=1/0),u=[],d=[],p=t.length,s)for(f=0;p>f;++f)h=t[f],h.x<g&&(g=h.x),h.y<m&&(m=h.y),h.x>v&&(v=h.x),h.y>y&&(y=h.y),u.push(h.x),d.push(h.y);else for(f=0;p>f;++f){var x=+w(h=t[f],f),C=+b(h,f);g>x&&(g=x),m>C&&(m=C),x>v&&(v=x),C>y&&(y=C),u.push(x),d.push(C)}var A=v-g,E=y-m;A>E?y=m+A:v=g+E;var k=di();if(k.add=function(t){o(k,t,+w(t,++f),+b(t,f),g,m,v,y)},k.visit=function(t){fi(t,k,g,m,v,y)},k.find=function(t){return pi(k,t[0],t[1],g,m,v,y)},f=-1,null==e){for(;++f<p;)o(k,t[f],u[f],d[f],g,m,v,y);--f}else t.forEach(k.add);return u=d=t=h=null,k}var s,a=Sn,l=$n;return(s=arguments.length)?(a=hi,l=ui,3===s&&(r=n,i=e,n=e=0),o(t)):(o.x=function(t){return arguments.length?(a=t,o):a},o.y=function(t){return arguments.length?(l=t,o):l},o.extent=function(t){return arguments.length?(null==t?e=n=i=r=null:(e=+t[0][0],n=+t[0][1],i=+t[1][0],r=+t[1][1]),o):null==e?null:[[e,n],[i,r]]},o.size=function(t){return arguments.length?(null==t?e=n=i=r=null:(e=n=0,i=+t[0],r=+t[1]),o):null==e?null:[i-e,r-n]},o)},ls.interpolateRgb=gi,ls.interpolateObject=mi,ls.interpolateNumber=vi,ls.interpolateString=yi;var ul=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dl=new RegExp(ul.source,"g");ls.interpolate=wi,ls.interpolators=[function(t,e){var n=typeof e;return("string"===n?ra.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?gi:yi:e instanceof st?gi:Array.isArray(e)?bi:"object"===n&&isNaN(e)?mi:vi)(t,e)}],ls.interpolateArray=bi;var fl=function(){return y},pl=ls.map({linear:fl,poly:_i,quad:function(){return Ei},cubic:function(){return ki},sin:function(){return Di},exp:function(){return Si},circle:function(){return $i},elastic:Ti,back:Bi,bounce:function(){return Mi}}),gl=ls.map({"in":y,out:Ci,"in-out":Ai,"out-in":function(t){return Ai(Ci(t))}});ls.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.slice(0,e):t,i=e>=0?t.slice(e+1):"in";return n=pl.get(n)||fl,i=gl.get(i)||y,xi(i(n.apply(null,cs.call(arguments,1))))},ls.interpolateHcl=Li,ls.interpolateHsl=Ri,ls.interpolateLab=Ii,ls.interpolateRound=Pi,ls.transform=function(t){var e=us.createElementNS(ls.ns.prefix.svg,"g");return(ls.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new Ni(n?n.matrix:ml)})(t)},Ni.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};ls.interpolateTransform=Gi,ls.layout={},ls.layout.bundle=function(){return function(t){for(var e=[],n=-1,i=t.length;++n<i;)e.push(Xi(t[n]));return e}},ls.layout.chord=function(){function t(){var t,c,u,d,f,p={},g=[],m=ls.range(o),v=[];for(n=[],i=[],t=0,d=-1;++d<o;){for(c=0,f=-1;++f<o;)c+=r[d][f];g.push(c),v.push(ls.range(o)),t+=c}for(s&&m.sort(function(t,e){return s(g[t],g[e])}),a&&v.forEach(function(t,e){t.sort(function(t,n){return a(r[e][t],r[e][n])})}),t=(Os-h*o)/t,c=0,d=-1;++d<o;){for(u=c,f=-1;++f<o;){var y=m[d],w=v[y][f],b=r[y][w],x=c,C=c+=b*t;p[y+"-"+w]={index:y,subindex:w,startAngle:x,endAngle:C,value:b}}i[y]={index:y,startAngle:u,endAngle:c,value:g[y]},c+=h}for(d=-1;++d<o;)for(f=d-1;++f<o;){var A=p[d+"-"+f],E=p[f+"-"+d];(A.value||E.value)&&n.push(A.value<E.value?{source:E,target:A}:{source:A,target:E})}l&&e()}function e(){n.sort(function(t,e){return l((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}var n,i,r,o,s,a,l,c={},h=0;return c.matrix=function(t){return arguments.length?(o=(r=t)&&r.length,n=i=null,c):r},c.padding=function(t){return arguments.length?(h=t,n=i=null,c):h},c.sortGroups=function(t){return arguments.length?(s=t,n=i=null,c):s},c.sortSubgroups=function(t){return arguments.length?(a=t,n=null,c):a},c.sortChords=function(t){return arguments.length?(l=t,n&&e(),c):l},c.chords=function(){return n||t(),n},c.groups=function(){return i||t(),i},c},ls.layout.force=function(){function t(t){return function(e,n,i,r){if(e.point!==t){var o=e.cx-t.x,s=e.cy-t.y,a=r-n,l=o*o+s*s;if(l>a*a/v){if(g>l){var c=e.charge/l;t.px-=o*c,t.py-=s*c}return!0}if(e.point&&l&&g>l){var c=e.pointCharge/l;t.px-=o*c,t.py-=s*c}}return!e.charge}}function e(t){t.px=ls.event.x,t.py=ls.event.y,l.resume()}var n,i,r,o,s,a,l={},c=ls.dispatch("start","tick","end"),h=[1,1],u=.9,d=vl,f=yl,p=-30,g=wl,m=.1,v=.64,w=[],b=[];return l.tick=function(){if((r*=.99)<.005)return n=null,c.end({type:"end",alpha:r=0}),!0;var e,i,l,d,f,g,v,y,x,C=w.length,A=b.length;for(i=0;A>i;++i)l=b[i],d=l.source,f=l.target,y=f.x-d.x,x=f.y-d.y,(g=y*y+x*x)&&(g=r*s[i]*((g=Math.sqrt(g))-o[i])/g,y*=g,x*=g,f.x-=y*(v=d.weight+f.weight?d.weight/(d.weight+f.weight):.5),f.y-=x*v,d.x+=y*(v=1-v),d.y+=x*v);if((v=r*m)&&(y=h[0]/2,x=h[1]/2,i=-1,v))for(;++i<C;)l=w[i],l.x+=(y-l.x)*v,l.y+=(x-l.y)*v;if(p)for(ir(e=ls.geom.quadtree(w),r,a),i=-1;++i<C;)(l=w[i]).fixed||e.visit(t(l));for(i=-1;++i<C;)l=w[i],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*u,l.y-=(l.py-(l.py=l.y))*u);c.tick({type:"tick",alpha:r})},l.nodes=function(t){return arguments.length?(w=t,l):w},l.links=function(t){return arguments.length?(b=t,l):b},l.size=function(t){return arguments.length?(h=t,l):h},l.linkDistance=function(t){return arguments.length?(d="function"==typeof t?t:+t,l):d},l.distance=l.linkDistance,l.linkStrength=function(t){return arguments.length?(f="function"==typeof t?t:+t,l):f},l.friction=function(t){return arguments.length?(u=+t,l):u},l.charge=function(t){return arguments.length?(p="function"==typeof t?t:+t,l):p},l.chargeDistance=function(t){return arguments.length?(g=t*t,l):Math.sqrt(g)},l.gravity=function(t){return arguments.length?(m=+t,l):m},l.theta=function(t){return arguments.length?(v=t*t,l):Math.sqrt(v)},l.alpha=function(t){return arguments.length?(t=+t,r?t>0?r=t:(n.c=null,n.t=NaN,n=null,c.end({type:"end",alpha:r=0})):t>0&&(c.start({type:"start",alpha:r=t}),n=Tt(l.tick)),l):r},l.start=function(){function t(t,i){if(!n){for(n=new Array(r),l=0;r>l;++l)n[l]=[];for(l=0;c>l;++l){var o=b[l];n[o.source.index].push(o.target),n[o.target.index].push(o.source)}}for(var s,a=n[e],l=-1,h=a.length;++l<h;)if(!isNaN(s=a[l][t]))return s;return Math.random()*i}var e,n,i,r=w.length,c=b.length,u=h[0],g=h[1];for(e=0;r>e;++e)(i=w[e]).index=e,i.weight=0;for(e=0;c>e;++e)i=b[e],"number"==typeof i.source&&(i.source=w[i.source]),"number"==typeof i.target&&(i.target=w[i.target]),++i.source.weight,++i.target.weight;for(e=0;r>e;++e)i=w[e],isNaN(i.x)&&(i.x=t("x",u)),isNaN(i.y)&&(i.y=t("y",g)),isNaN(i.px)&&(i.px=i.x),isNaN(i.py)&&(i.py=i.y);if(o=[],"function"==typeof d)for(e=0;c>e;++e)o[e]=+d.call(this,b[e],e);else for(e=0;c>e;++e)o[e]=d;if(s=[],"function"==typeof f)for(e=0;c>e;++e)s[e]=+f.call(this,b[e],e);else for(e=0;c>e;++e)s[e]=f;if(a=[],"function"==typeof p)for(e=0;r>e;++e)a[e]=+p.call(this,w[e],e);else for(e=0;r>e;++e)a[e]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return i||(i=ls.behavior.drag().origin(y).on("dragstart.force",Ji).on("drag.force",e).on("dragend.force",tr)),arguments.length?void this.on("mouseover.force",er).on("mouseout.force",nr).call(i):i},ls.rebind(l,c,"on")};var vl=20,yl=1,wl=1/0;ls.layout.hierarchy=function(){function t(r){var o,s=[r],a=[];for(r.depth=0;null!=(o=s.pop());)if(a.push(o),(c=n.call(t,o,o.depth))&&(l=c.length)){for(var l,c,h;--l>=0;)s.push(h=c[l]),h.parent=o,h.depth=o.depth+1;i&&(o.value=0),o.children=c}else i&&(o.value=+i.call(t,o,o.depth)||0),delete o.children;return sr(r,function(t){var n,r;e&&(n=t.children)&&n.sort(e),i&&(r=t.parent)&&(r.value+=t.value)}),a}var e=cr,n=ar,i=lr;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(i=e,t):i},t.revalue=function(e){return i&&(or(e,function(t){t.children&&(t.value=0)}),sr(e,function(e){var n;e.children||(e.value=+i.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},ls.layout.partition=function(){function t(e,n,i,r){var o=e.children;if(e.x=n,e.y=e.depth*r,e.dx=i,e.dy=r,o&&(s=o.length)){var s,a,l,c=-1;for(i=e.value?i/e.value:0;++c<s;)t(a=o[c],n,l=a.value*i,r),n+=l}}function e(t){var n=t.children,i=0;if(n&&(r=n.length))for(var r,o=-1;++o<r;)i=Math.max(i,e(n[o]));return 1+i}function n(n,o){var s=i.call(this,n,o);return t(s[0],0,r[0],r[1]/e(s[0])),s}var i=ls.layout.hierarchy(),r=[1,1];return n.size=function(t){return arguments.length?(r=t,n):r},rr(n,i)},ls.layout.pie=function(){function t(s){var a,l=s.length,c=s.map(function(n,i){return+e.call(t,n,i)}),h=+("function"==typeof i?i.apply(this,arguments):i),u=("function"==typeof r?r.apply(this,arguments):r)-h,d=Math.min(Math.abs(u)/l,+("function"==typeof o?o.apply(this,arguments):o)),f=d*(0>u?-1:1),p=ls.sum(c),g=p?(u-l*f)/p:0,m=ls.range(l),v=[];return null!=n&&m.sort(n===bl?function(t,e){return c[e]-c[t]}:function(t,e){return n(s[t],s[e])}),m.forEach(function(t){v[t]={data:s[t],value:a=c[t],startAngle:h,endAngle:h+=a*g+f,padAngle:d}}),v}var e=Number,n=bl,i=0,r=Os,o=0;return t.value=function(n){return arguments.length?(e=n,t):e},t.sort=function(e){return arguments.length?(n=e,t):n},t.startAngle=function(e){return arguments.length?(i=e,t):i},t.endAngle=function(e){return arguments.length?(r=e,t):r},t.padAngle=function(e){return arguments.length?(o=e,t):o},t};var bl={};ls.layout.stack=function(){function t(a,l){if(!(d=a.length))return a;var c=a.map(function(n,i){return e.call(t,n,i)}),h=c.map(function(e){return e.map(function(e,n){return[o.call(t,e,n),s.call(t,e,n)]})}),u=n.call(t,h,l);c=ls.permute(c,u),h=ls.permute(h,u);var d,f,p,g,m=i.call(t,h,l),v=c[0].length;for(p=0;v>p;++p)for(r.call(t,c[0][p],g=m[p],h[0][p][1]),f=1;d>f;++f)r.call(t,c[f][p],g+=h[f-1][p][1],h[f][p][1]);return a}var e=y,n=pr,i=gr,r=fr,o=ur,s=dr;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:xl.get(e)||pr,t):n},t.offset=function(e){return arguments.length?(i="function"==typeof e?e:Cl.get(e)||gr,t):i},t.x=function(e){return arguments.length?(o=e,t):o},t.y=function(e){return arguments.length?(s=e,t):s},t.out=function(e){return arguments.length?(r=e,t):r},t};var xl=ls.map({"inside-out":function(t){var e,n,i=t.length,r=t.map(mr),o=t.map(vr),s=ls.range(i).sort(function(t,e){return r[t]-r[e]}),a=0,l=0,c=[],h=[];for(e=0;i>e;++e)n=s[e],l>a?(a+=o[n],c.push(n)):(l+=o[n],h.push(n));return h.reverse().concat(c)},reverse:function(t){return ls.range(t.length).reverse()},"default":pr}),Cl=ls.map({silhouette:function(t){var e,n,i,r=t.length,o=t[0].length,s=[],a=0,l=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];i>a&&(a=i),s.push(i)}for(n=0;o>n;++n)l[n]=(a-s[n])/2;return l},wiggle:function(t){var e,n,i,r,o,s,a,l,c,h=t.length,u=t[0],d=u.length,f=[];for(f[0]=l=c=0,n=1;d>n;++n){for(e=0,r=0;h>e;++e)r+=t[e][n][1];for(e=0,o=0,a=u[n][0]-u[n-1][0];h>e;++e){for(i=0,s=(t[e][n][1]-t[e][n-1][1])/(2*a);e>i;++i)s+=(t[i][n][1]-t[i][n-1][1])/a;o+=s*t[e][n][1]}f[n]=l-=r?o/r*a:0,c>l&&(c=l)}for(n=0;d>n;++n)f[n]-=c;return f},expand:function(t){var e,n,i,r=t.length,o=t[0].length,s=1/r,a=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];if(i)for(e=0;r>e;e++)t[e][n][1]/=i;else for(e=0;r>e;e++)t[e][n][1]=s}for(n=0;o>n;++n)a[n]=0;return a},zero:gr});ls.layout.histogram=function(){function t(t,o){for(var s,a,l=[],c=t.map(n,this),h=i.call(this,c,o),u=r.call(this,h,c,o),o=-1,d=c.length,f=u.length-1,p=e?1:1/d;++o<f;)s=l[o]=[],s.dx=u[o+1]-(s.x=u[o]),s.y=0;if(f>0)for(o=-1;++o<d;)a=c[o],a>=h[0]&&a<=h[1]&&(s=l[ls.bisect(u,a,1,f)-1],s.y+=p,s.push(t[o]));return l}var e=!0,n=Number,i=xr,r=wr;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(i=Ft(e),t):i},t.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return br(t,e)}:Ft(e),t):r},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},ls.layout.pack=function(){function t(t,o){var s=n.call(this,t,o),a=s[0],l=r[0],c=r[1],h=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(a.x=a.y=0,sr(a,function(t){t.r=+h(t.value)}),sr(a,Fr),i){var u=i*(e?1:Math.max(2*a.r/l,2*a.r/c))/2;sr(a,function(t){t.r+=u}),sr(a,Fr),sr(a,function(t){t.r-=u})}return Sr(a,l/2,c/2,e?1:1/Math.max(2*a.r/l,2*a.r/c)),s}var e,n=ls.layout.hierarchy().sort(Cr),i=0,r=[1,1];return t.size=function(e){return arguments.length?(r=e,t):r},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(i=+e,t):i},rr(t,n)},ls.layout.tree=function(){function t(t,r){var h=s.call(this,t,r),u=h[0],d=e(u);if(sr(d,n),d.parent.m=-d.z,or(d,i),c)or(u,o);else{var f=u,p=u,g=u;or(u,function(t){t.x<f.x&&(f=t),t.x>p.x&&(p=t),t.depth>g.depth&&(g=t)});var m=a(f,p)/2-f.x,v=l[0]/(p.x+a(p,f)/2+m),y=l[1]/(g.depth||1);or(u,function(t){t.x=(t.x+m)*v,t.y=t.depth*y})}return h}function e(t){for(var e,n={A:null,children:[t]},i=[n];null!=(e=i.pop());)for(var r,o=e.children,s=0,a=o.length;a>s;++s)i.push((o[s]=r={_:o[s],parent:e,children:(r=o[s].children)&&r.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:s}).a=r);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){Rr(t);var o=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+a(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+a(t._,i._));t.parent.A=r(t,i,t.parent.A||n[0])}function i(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,e,n){if(e){for(var i,r=t,o=t,s=e,l=r.parent.children[0],c=r.m,h=o.m,u=s.m,d=l.m;s=Mr(s),r=Br(r),s&&r;)l=Br(l),o=Mr(o),o.a=t,i=s.z+u-r.z-c+a(s._,r._),i>0&&(Lr(Ir(s,t,n),t,i),c+=i,h+=i),u+=s.m,c+=r.m,d+=l.m,h+=o.m;s&&!Mr(o)&&(o.t=s,o.m+=u-h),r&&!Br(l)&&(l.t=r,l.m+=c-d,n=t)}return n}function o(t){t.x*=l[0],t.y=t.depth*l[1]}var s=ls.layout.hierarchy().sort(null).value(null),a=Tr,l=[1,1],c=null;return t.separation=function(e){return arguments.length?(a=e,t):a},t.size=function(e){return arguments.length?(c=null==(l=e)?o:null,t):c?null:l},t.nodeSize=function(e){return arguments.length?(c=null==(l=e)?null:o,t):c?l:null},rr(t,s)},ls.layout.cluster=function(){function t(t,o){var s,a=e.call(this,t,o),l=a[0],c=0;sr(l,function(t){var e=t.children;e&&e.length?(t.x=Nr(e),t.y=Pr(e)):(t.x=s?c+=n(t,s):0,t.y=0,s=t)});var h=Or(l),u=jr(l),d=h.x-n(h,u)/2,f=u.x+n(u,h)/2;return sr(l,r?function(t){t.x=(t.x-l.x)*i[0],t.y=(l.y-t.y)*i[1]}:function(t){t.x=(t.x-d)/(f-d)*i[0],t.y=(1-(l.y?t.y/l.y:1))*i[1]}),a}var e=ls.layout.hierarchy().sort(null).value(null),n=Tr,i=[1,1],r=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(r=null==(i=e),t):r?null:i},t.nodeSize=function(e){return arguments.length?(r=null!=(i=e),t):r?i:null},rr(t,e)},ls.layout.treemap=function(){function t(t,e){for(var n,i,r=-1,o=t.length;++r<o;)i=(n=t[r]).value*(0>e?0:e),n.area=isNaN(i)||0>=i?0:i}function e(n){var o=n.children;if(o&&o.length){var s,a,l,c=u(n),h=[],d=o.slice(),p=1/0,g="slice"===f?c.dx:"dice"===f?c.dy:"slice-dice"===f?1&n.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(d,c.dx*c.dy/n.value),h.area=0;(l=d.length)>0;)h.push(s=d[l-1]),h.area+=s.area,"squarify"!==f||(a=i(h,g))<=p?(d.pop(),p=a):(h.area-=h.pop().area,r(h,g,c,!1),g=Math.min(c.dx,c.dy),h.length=h.area=0,p=1/0);h.length&&(r(h,g,c,!0),h.length=h.area=0),o.forEach(e)}}function n(e){var i=e.children;if(i&&i.length){var o,s=u(e),a=i.slice(),l=[];for(t(a,s.dx*s.dy/e.value),l.area=0;o=a.pop();)l.push(o),l.area+=o.area,null!=o.z&&(r(l,o.z?s.dx:s.dy,s,!a.length),l.length=l.area=0);i.forEach(n)}}function i(t,e){for(var n,i=t.area,r=0,o=1/0,s=-1,a=t.length;++s<a;)(n=t[s].area)&&(o>n&&(o=n),n>r&&(r=n));return i*=i,e*=e,i?Math.max(e*r*p/i,i/(e*o*p)):1/0}function r(t,e,n,i){var r,o=-1,s=t.length,a=n.x,c=n.y,h=e?l(t.area/e):0;if(e==n.dx){for((i||h>n.dy)&&(h=n.dy);++o<s;)r=t[o],r.x=a,r.y=c,r.dy=h,a+=r.dx=Math.min(n.x+n.dx-a,h?l(r.area/h):0);r.z=!0,r.dx+=n.x+n.dx-a,n.y+=h,n.dy-=h}else{for((i||h>n.dx)&&(h=n.dx);++o<s;)r=t[o],r.x=a,r.y=c,r.dx=h,c+=r.dy=Math.min(n.y+n.dy-c,h?l(r.area/h):0);r.z=!1,r.dy+=n.y+n.dy-c,n.x+=h,n.dx-=h}}function o(i){var r=s||a(i),o=r[0];return o.x=o.y=0,o.value?(o.dx=c[0],o.dy=c[1]):o.dx=o.dy=0,s&&a.revalue(o),t([o],o.dx*o.dy/o.value),(s?n:e)(o),d&&(s=r),r}var s,a=ls.layout.hierarchy(),l=Math.round,c=[1,1],h=null,u=zr,d=!1,f="squarify",p=.5*(1+Math.sqrt(5));return o.size=function(t){return arguments.length?(c=t,o):c},o.padding=function(t){function e(e){var n=t.call(o,e,e.depth);return null==n?zr(e):Hr(e,"number"==typeof n?[n,n,n,n]:n)}function n(e){return Hr(e,t)}if(!arguments.length)return h;var i;return u=null==(h=t)?zr:"function"==(i=typeof t)?e:"number"===i?(t=[t,t,t,t],n):n,o},o.round=function(t){return arguments.length?(l=t?Math.round:Number,o):l!=Number},o.sticky=function(t){return arguments.length?(d=t,s=null,o):d},o.ratio=function(t){return arguments.length?(p=t,o):p},o.mode=function(t){return arguments.length?(f=t+"",o):f},rr(o,a)},ls.random={normal:function(t,e){var n=arguments.length;return 2>n&&(e=1),1>n&&(t=0),function(){var n,i,r;do n=2*Math.random()-1,i=2*Math.random()-1,r=n*n+i*i;while(!r||r>1);return t+e*n*Math.sqrt(-2*Math.log(r)/r)}},logNormal:function(){var t=ls.random.normal.apply(ls,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=ls.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},ls.scale={};var Al={floor:y,ceil:y};ls.scale.linear=function(){return Kr([0,1],[0,1],wi,!1)};var El={s:1,g:1,p:1,r:1,e:1};ls.scale.log=function(){return io(ls.scale.linear().domain([0,1]),10,!0,[1,10])};var kl=ls.format(".0e"),Fl={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};ls.scale.pow=function(){return ro(ls.scale.linear(),1,[0,1])},ls.scale.sqrt=function(){return ls.scale.pow().exponent(.5)},ls.scale.ordinal=function(){return so([],{t:"range",a:[[]]})},ls.scale.category10=function(){return ls.scale.ordinal().range(_l)},ls.scale.category20=function(){return ls.scale.ordinal().range(Dl)},ls.scale.category20b=function(){return ls.scale.ordinal().range(Sl)},ls.scale.category20c=function(){return ls.scale.ordinal().range($l);
};var _l=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(wt),Dl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(wt),Sl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(wt),$l=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(wt);ls.scale.quantile=function(){return ao([],[])},ls.scale.quantize=function(){return lo(0,1,[0,1])},ls.scale.threshold=function(){return co([.5],[0,1])},ls.scale.identity=function(){return ho([0,1])},ls.svg={},ls.svg.arc=function(){function t(){var t=Math.max(0,+n.apply(this,arguments)),c=Math.max(0,+i.apply(this,arguments)),h=s.apply(this,arguments)-zs,u=a.apply(this,arguments)-zs,d=Math.abs(u-h),f=h>u?0:1;if(t>c&&(p=c,c=t,t=p),d>=js)return e(c,f)+(t?e(t,1-f):"")+"Z";var p,g,m,v,y,w,b,x,C,A,E,k,F=0,_=0,D=[];if((v=(+l.apply(this,arguments)||0)/2)&&(m=o===Tl?Math.sqrt(t*t+c*c):+o.apply(this,arguments),f||(_*=-1),c&&(_=et(m/c*Math.sin(v))),t&&(F=et(m/t*Math.sin(v)))),c){y=c*Math.cos(h+_),w=c*Math.sin(h+_),b=c*Math.cos(u-_),x=c*Math.sin(u-_);var S=Math.abs(u-h-2*_)<=Ns?0:1;if(_&&yo(y,w,b,x)===f^S){var $=(h+u)/2;y=c*Math.cos($),w=c*Math.sin($),b=x=null}}else y=w=0;if(t){C=t*Math.cos(u-F),A=t*Math.sin(u-F),E=t*Math.cos(h+F),k=t*Math.sin(h+F);var T=Math.abs(h-u+2*F)<=Ns?0:1;if(F&&yo(C,A,E,k)===1-f^T){var B=(h+u)/2;C=t*Math.cos(B),A=t*Math.sin(B),E=k=null}}else C=A=0;if(d>Is&&(p=Math.min(Math.abs(c-t)/2,+r.apply(this,arguments)))>.001){g=c>t^f?0:1;var M=p,L=p;if(Ns>d){var R=null==E?[C,A]:null==b?[y,w]:Ln([y,w],[E,k],[b,x],[C,A]),I=y-R[0],P=w-R[1],N=b-R[0],O=x-R[1],j=1/Math.sin(Math.acos((I*N+P*O)/(Math.sqrt(I*I+P*P)*Math.sqrt(N*N+O*O)))/2),z=Math.sqrt(R[0]*R[0]+R[1]*R[1]);L=Math.min(p,(t-z)/(j-1)),M=Math.min(p,(c-z)/(j+1))}if(null!=b){var H=wo(null==E?[C,A]:[E,k],[y,w],c,M,f),W=wo([b,x],[C,A],c,M,f);p===M?D.push("M",H[0],"A",M,",",M," 0 0,",g," ",H[1],"A",c,",",c," 0 ",1-f^yo(H[1][0],H[1][1],W[1][0],W[1][1]),",",f," ",W[1],"A",M,",",M," 0 0,",g," ",W[0]):D.push("M",H[0],"A",M,",",M," 0 1,",g," ",W[0])}else D.push("M",y,",",w);if(null!=E){var U=wo([y,w],[E,k],t,-L,f),q=wo([C,A],null==b?[y,w]:[b,x],t,-L,f);p===L?D.push("L",q[0],"A",L,",",L," 0 0,",g," ",q[1],"A",t,",",t," 0 ",f^yo(q[1][0],q[1][1],U[1][0],U[1][1]),",",1-f," ",U[1],"A",L,",",L," 0 0,",g," ",U[0]):D.push("L",q[0],"A",L,",",L," 0 0,",g," ",U[0])}else D.push("L",C,",",A)}else D.push("M",y,",",w),null!=b&&D.push("A",c,",",c," 0 ",S,",",f," ",b,",",x),D.push("L",C,",",A),null!=E&&D.push("A",t,",",t," 0 ",T,",",1-f," ",E,",",k);return D.push("Z"),D.join("")}function e(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=fo,i=po,r=uo,o=Tl,s=go,a=mo,l=vo;return t.innerRadius=function(e){return arguments.length?(n=Ft(e),t):n},t.outerRadius=function(e){return arguments.length?(i=Ft(e),t):i},t.cornerRadius=function(e){return arguments.length?(r=Ft(e),t):r},t.padRadius=function(e){return arguments.length?(o=e==Tl?Tl:Ft(e),t):o},t.startAngle=function(e){return arguments.length?(s=Ft(e),t):s},t.endAngle=function(e){return arguments.length?(a=Ft(e),t):a},t.padAngle=function(e){return arguments.length?(l=Ft(e),t):l},t.centroid=function(){var t=(+n.apply(this,arguments)+ +i.apply(this,arguments))/2,e=(+s.apply(this,arguments)+ +a.apply(this,arguments))/2-zs;return[Math.cos(e)*t,Math.sin(e)*t]},t};var Tl="auto";ls.svg.line=function(){return bo(y)};var Bl=ls.map({linear:xo,"linear-closed":Co,step:Ao,"step-before":Eo,"step-after":ko,basis:To,"basis-open":Bo,"basis-closed":Mo,bundle:Lo,cardinal:Do,"cardinal-open":Fo,"cardinal-closed":_o,monotone:jo});Bl.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Ml=[0,2/3,1/3,0],Ll=[0,1/3,2/3,0],Rl=[0,1/6,2/3,1/6];ls.svg.line.radial=function(){var t=bo(zo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Eo.reverse=ko,ko.reverse=Eo,ls.svg.area=function(){return Ho(y)},ls.svg.area.radial=function(){var t=Ho(zo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},ls.svg.chord=function(){function t(t,a){var l=e(this,o,t,a),c=e(this,s,t,a);return"M"+l.p0+i(l.r,l.p1,l.a1-l.a0)+(n(l,c)?r(l.r,l.p1,l.r,l.p0):r(l.r,l.p1,c.r,c.p0)+i(c.r,c.p1,c.a1-c.a0)+r(c.r,c.p1,l.r,l.p0))+"Z"}function e(t,e,n,i){var r=e.call(t,n,i),o=a.call(t,r,i),s=l.call(t,r,i)-zs,h=c.call(t,r,i)-zs;return{r:o,a0:s,a1:h,p0:[o*Math.cos(s),o*Math.sin(s)],p1:[o*Math.cos(h),o*Math.sin(h)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function i(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Ns)+",1 "+e}function r(t,e,n,i){return"Q 0,0 "+i}var o=wn,s=bn,a=Wo,l=go,c=mo;return t.radius=function(e){return arguments.length?(a=Ft(e),t):a},t.source=function(e){return arguments.length?(o=Ft(e),t):o},t.target=function(e){return arguments.length?(s=Ft(e),t):s},t.startAngle=function(e){return arguments.length?(l=Ft(e),t):l},t.endAngle=function(e){return arguments.length?(c=Ft(e),t):c},t},ls.svg.diagonal=function(){function t(t,r){var o=e.call(this,t,r),s=n.call(this,t,r),a=(o.y+s.y)/2,l=[o,{x:o.x,y:a},{x:s.x,y:a},s];return l=l.map(i),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=wn,n=bn,i=Uo;return t.source=function(n){return arguments.length?(e=Ft(n),t):e},t.target=function(e){return arguments.length?(n=Ft(e),t):n},t.projection=function(e){return arguments.length?(i=e,t):i},t},ls.svg.diagonal.radial=function(){var t=ls.svg.diagonal(),e=Uo,n=t.projection;return t.projection=function(t){return arguments.length?n(qo(e=t)):e},t},ls.svg.symbol=function(){function t(t,i){return(Il.get(e.call(this,t,i))||Vo)(n.call(this,t,i))}var e=Go,n=Yo;return t.type=function(n){return arguments.length?(e=Ft(n),t):e},t.size=function(e){return arguments.length?(n=Ft(e),t):n},t};var Il=ls.map({circle:Vo,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Nl)),n=e*Nl;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Pl),n=e*Pl/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Pl),n=e*Pl/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});ls.svg.symbolTypes=Il.keys();var Pl=Math.sqrt(3),Nl=Math.tan(30*Hs);Ss.transition=function(t){for(var e,n,i=Ol||++Wl,r=Jo(t),o=[],s=jl||{time:Date.now(),ease:Fi,delay:0,duration:250},a=-1,l=this.length;++a<l;){o.push(e=[]);for(var c=this[a],h=-1,u=c.length;++h<u;)(n=c[h])&&ts(n,h,r,i,s),e.push(n)}return Xo(o,r,i)},Ss.interrupt=function(t){return this.each(null==t?zl:Ko(Jo(t)))};var Ol,jl,zl=Ko(Jo()),Hl=[],Wl=0;Hl.call=Ss.call,Hl.empty=Ss.empty,Hl.node=Ss.node,Hl.size=Ss.size,ls.transition=function(t,e){return t&&t.transition?Ol?t.transition(e):t:ls.selection().transition(t)},ls.transition.prototype=Hl,Hl.select=function(t){var e,n,i,r=this.id,o=this.namespace,s=[];t=D(t);for(var a=-1,l=this.length;++a<l;){s.push(e=[]);for(var c=this[a],h=-1,u=c.length;++h<u;)(i=c[h])&&(n=t.call(i,i.__data__,h,a))?("__data__"in i&&(n.__data__=i.__data__),ts(n,h,o,r,i[o][r]),e.push(n)):e.push(null)}return Xo(s,o,r)},Hl.selectAll=function(t){var e,n,i,r,o,s=this.id,a=this.namespace,l=[];t=S(t);for(var c=-1,h=this.length;++c<h;)for(var u=this[c],d=-1,f=u.length;++d<f;)if(i=u[d]){o=i[a][s],n=t.call(i,i.__data__,d,c),l.push(e=[]);for(var p=-1,g=n.length;++p<g;)(r=n[p])&&ts(r,p,a,s,o),e.push(r)}return Xo(l,a,s)},Hl.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=z(t));for(var o=0,s=this.length;s>o;o++){r.push(e=[]);for(var n=this[o],a=0,l=n.length;l>a;a++)(i=n[a])&&t.call(i,i.__data__,a,o)&&e.push(i)}return Xo(r,this.namespace,this.id)},Hl.tween=function(t,e){var n=this.id,i=this.namespace;return arguments.length<2?this.node()[i][n].tween.get(t):W(this,null==e?function(e){e[i][n].tween.remove(t)}:function(r){r[i][n].tween.set(t,e)})},Hl.attr=function(t,e){function n(){this.removeAttribute(a)}function i(){this.removeAttributeNS(a.space,a.local)}function r(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(a);return n!==t&&(e=s(n,t),function(t){this.setAttribute(a,e(t))})})}function o(t){return null==t?i:(t+="",function(){var e,n=this.getAttributeNS(a.space,a.local);return n!==t&&(e=s(n,t),function(t){this.setAttributeNS(a.space,a.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var s="transform"==t?Gi:wi,a=ls.ns.qualify(t);return Zo(this,"attr."+t,e,a.local?o:r)},Hl.attrTween=function(t,e){function n(t,n){var i=e.call(this,t,n,this.getAttribute(r));return i&&function(t){this.setAttribute(r,i(t))}}function i(t,n){var i=e.call(this,t,n,this.getAttributeNS(r.space,r.local));return i&&function(t){this.setAttributeNS(r.space,r.local,i(t))}}var r=ls.ns.qualify(t);return this.tween("attr."+t,r.local?i:n)},Hl.style=function(t,n,i){function r(){this.style.removeProperty(t)}function o(n){return null==n?r:(n+="",function(){var r,o=e(this).getComputedStyle(this,null).getPropertyValue(t);return o!==n&&(r=wi(o,n),function(e){this.style.setProperty(t,r(e),i)})})}var s=arguments.length;if(3>s){if("string"!=typeof t){2>s&&(n="");for(i in t)this.style(i,t[i],n);return this}i=""}return Zo(this,"style."+t,n,o)},Hl.styleTween=function(t,n,i){function r(r,o){var s=n.call(this,r,o,e(this).getComputedStyle(this,null).getPropertyValue(t));return s&&function(e){this.style.setProperty(t,s(e),i)}}return arguments.length<3&&(i=""),this.tween("style."+t,r)},Hl.text=function(t){return Zo(this,"text",t,Qo)},Hl.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},Hl.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=ls.ease.apply(ls,arguments)),W(this,function(i){i[n][e].ease=t}))},Hl.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:W(this,"function"==typeof t?function(i,r,o){i[n][e].delay=+t.call(i,i.__data__,r,o)}:(t=+t,function(i){i[n][e].delay=t}))},Hl.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:W(this,"function"==typeof t?function(i,r,o){i[n][e].duration=Math.max(1,t.call(i,i.__data__,r,o))}:(t=Math.max(1,t),function(i){i[n][e].duration=t}))},Hl.each=function(t,e){var n=this.id,i=this.namespace;if(arguments.length<2){var r=jl,o=Ol;try{Ol=n,W(this,function(e,r,o){jl=e[i][n],t.call(e,e.__data__,r,o)})}finally{jl=r,Ol=o}}else W(this,function(r){var o=r[i][n];(o.event||(o.event=ls.dispatch("start","end","interrupt"))).on(t,e)});return this},Hl.transition=function(){for(var t,e,n,i,r=this.id,o=++Wl,s=this.namespace,a=[],l=0,c=this.length;c>l;l++){a.push(t=[]);for(var e=this[l],h=0,u=e.length;u>h;h++)(n=e[h])&&(i=n[s][r],ts(n,h,s,o,{time:i.time,ease:i.ease,delay:i.delay+i.duration,duration:i.duration})),t.push(n)}return Xo(a,s,o)},ls.svg.axis=function(){function t(t){t.each(function(){var t,c=ls.select(this),h=this.__chart__||n,u=this.__chart__=n.copy(),d=null==l?u.ticks?u.ticks.apply(u,a):u.domain():l,f=null==e?u.tickFormat?u.tickFormat.apply(u,a):y:e,p=c.selectAll(".tick").data(d,u),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Is),m=ls.transition(p.exit()).style("opacity",Is).remove(),v=ls.transition(p.order()).style("opacity",1),w=Math.max(r,0)+s,b=Ur(u),x=c.selectAll(".domain").data([0]),C=(x.enter().append("path").attr("class","domain"),ls.transition(x));g.append("line"),g.append("text");var A,E,k,F,_=g.select("line"),D=v.select("line"),S=p.select("text").text(f),$=g.select("text"),T=v.select("text"),B="top"===i||"left"===i?-1:1;if("bottom"===i||"top"===i?(t=es,A="x",k="y",E="x2",F="y2",S.attr("dy",0>B?"0em":".71em").style("text-anchor","middle"),C.attr("d","M"+b[0]+","+B*o+"V0H"+b[1]+"V"+B*o)):(t=ns,A="y",k="x",E="y2",F="x2",S.attr("dy",".32em").style("text-anchor",0>B?"end":"start"),C.attr("d","M"+B*o+","+b[0]+"H0V"+b[1]+"H"+B*o)),_.attr(F,B*r),$.attr(k,B*w),D.attr(E,0).attr(F,B*r),T.attr(A,0).attr(k,B*w),u.rangeBand){var M=u,L=M.rangeBand()/2;h=u=function(t){return M(t)+L}}else h.rangeBand?h=u:m.call(t,u,h);g.call(t,h,u),v.call(t,u,u)})}var e,n=ls.scale.linear(),i=Ul,r=6,o=6,s=3,a=[10],l=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(i=e in ql?e+"":Ul,t):i},t.ticks=function(){return arguments.length?(a=hs(arguments),t):a},t.tickValues=function(e){return arguments.length?(l=e,t):l},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(r=+e,o=+arguments[n-1],t):r},t.innerTickSize=function(e){return arguments.length?(r=+e,t):r},t.outerTickSize=function(e){return arguments.length?(o=+e,t):o},t.tickPadding=function(e){return arguments.length?(s=+e,t):s},t.tickSubdivide=function(){return arguments.length&&t},t};var Ul="bottom",ql={top:1,right:1,bottom:1,left:1};ls.svg.brush=function(){function t(e){e.each(function(){var e=ls.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",o).on("touchstart.brush",o),s=e.selectAll(".background").data([0]);s.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=e.selectAll(".resize").data(g,y);a.exit().remove(),a.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Yl[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",t.empty()?"none":null);var l,u=ls.transition(e),d=ls.transition(s);c&&(l=Ur(c),d.attr("x",l[0]).attr("width",l[1]-l[0]),i(u)),h&&(l=Ur(h),d.attr("y",l[0]).attr("height",l[1]-l[0]),r(u)),n(u)})}function n(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+u[+/e$/.test(t)]+","+d[+/^s/.test(t)]+")"})}function i(t){t.select(".extent").attr("x",u[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",u[1]-u[0])}function r(t){t.select(".extent").attr("y",d[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",d[1]-d[0])}function o(){function o(){32==ls.event.keyCode&&(S||(w=null,T[0]-=u[1],T[1]-=d[1],S=2),E())}function g(){32==ls.event.keyCode&&2==S&&(T[0]+=u[1],T[1]+=d[1],S=0,E())}function m(){var t=ls.mouse(x),e=!1;b&&(t[0]+=b[0],t[1]+=b[1]),S||(ls.event.altKey?(w||(w=[(u[0]+u[1])/2,(d[0]+d[1])/2]),T[0]=u[+(t[0]<w[0])],T[1]=d[+(t[1]<w[1])]):w=null),_&&v(t,c,0)&&(i(k),e=!0),D&&v(t,h,1)&&(r(k),e=!0),e&&(n(k),A({type:"brush",mode:S?"move":"resize"}))}function v(t,e,n){var i,r,o=Ur(e),l=o[0],c=o[1],h=T[n],g=n?d:u,m=g[1]-g[0];return S&&(l-=h,c-=m+h),i=(n?p:f)?Math.max(l,Math.min(c,t[n])):t[n],S?r=(i+=h)+m:(w&&(h=Math.max(l,Math.min(c,2*w[n]-i))),i>h?(r=i,i=h):r=h),g[0]!=i||g[1]!=r?(n?a=null:s=null,g[0]=i,g[1]=r,!0):void 0}function y(){m(),k.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),ls.select("body").style("cursor",null),B.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),$(),A({type:"brushend"})}var w,b,x=this,C=ls.select(ls.event.target),A=l.of(x,arguments),k=ls.select(x),F=C.datum(),_=!/^(n|s)$/.test(F)&&c,D=!/^(e|w)$/.test(F)&&h,S=C.classed("extent"),$=K(x),T=ls.mouse(x),B=ls.select(e(x)).on("keydown.brush",o).on("keyup.brush",g);if(ls.event.changedTouches?B.on("touchmove.brush",m).on("touchend.brush",y):B.on("mousemove.brush",m).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),S)T[0]=u[0]-T[0],T[1]=d[0]-T[1];else if(F){var M=+/w$/.test(F),L=+/^n/.test(F);b=[u[1-M]-T[0],d[1-L]-T[1]],T[0]=u[M],T[1]=d[L]}else ls.event.altKey&&(w=T.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),ls.select("body").style("cursor",C.style("cursor")),A({type:"brushstart"}),m()}var s,a,l=F(t,"brushstart","brush","brushend"),c=null,h=null,u=[0,0],d=[0,0],f=!0,p=!0,g=Gl[0];return t.event=function(t){t.each(function(){var t=l.of(this,arguments),e={x:u,y:d,i:s,j:a},n=this.__chart__||e;this.__chart__=e,Ol?ls.select(this).transition().each("start.brush",function(){s=n.i,a=n.j,u=n.x,d=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=bi(u,e.x),i=bi(d,e.y);return s=a=null,function(r){u=e.x=n(r),d=e.y=i(r),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){s=e.i,a=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(c=e,g=Gl[!c<<1|!h],t):c},t.y=function(e){return arguments.length?(h=e,g=Gl[!c<<1|!h],t):h},t.clamp=function(e){return arguments.length?(c&&h?(f=!!e[0],p=!!e[1]):c?f=!!e:h&&(p=!!e),t):c&&h?[f,p]:c?f:h?p:null},t.extent=function(e){var n,i,r,o,l;return arguments.length?(c&&(n=e[0],i=e[1],h&&(n=n[0],i=i[0]),s=[n,i],c.invert&&(n=c(n),i=c(i)),n>i&&(l=n,n=i,i=l),(n!=u[0]||i!=u[1])&&(u=[n,i])),h&&(r=e[0],o=e[1],c&&(r=r[1],o=o[1]),a=[r,o],h.invert&&(r=h(r),o=h(o)),r>o&&(l=r,r=o,o=l),(r!=d[0]||o!=d[1])&&(d=[r,o])),t):(c&&(s?(n=s[0],i=s[1]):(n=u[0],i=u[1],c.invert&&(n=c.invert(n),i=c.invert(i)),n>i&&(l=n,n=i,i=l))),h&&(a?(r=a[0],o=a[1]):(r=d[0],o=d[1],h.invert&&(r=h.invert(r),o=h.invert(o)),r>o&&(l=r,r=o,o=l))),c&&h?[[n,r],[i,o]]:c?[n,i]:h&&[r,o])},t.clear=function(){return t.empty()||(u=[0,0],d=[0,0],s=a=null),t},t.empty=function(){return!!c&&u[0]==u[1]||!!h&&d[0]==d[1]},ls.rebind(t,l,"on")};var Yl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Gl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Vl=fa.format=wa.timeFormat,Kl=Vl.utc,Xl=Kl("%Y-%m-%dT%H:%M:%S.%LZ");Vl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?is:Xl,is.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},is.toString=Xl.toString,fa.second=jt(function(t){return new pa(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),fa.seconds=fa.second.range,fa.seconds.utc=fa.second.utc.range,fa.minute=jt(function(t){return new pa(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),fa.minutes=fa.minute.range,fa.minutes.utc=fa.minute.utc.range,fa.hour=jt(function(t){var e=t.getTimezoneOffset()/60;return new pa(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),fa.hours=fa.hour.range,fa.hours.utc=fa.hour.utc.range,fa.month=jt(function(t){return t=fa.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),fa.months=fa.month.range,fa.months.utc=fa.month.utc.range;var Zl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[fa.second,1],[fa.second,5],[fa.second,15],[fa.second,30],[fa.minute,1],[fa.minute,5],[fa.minute,15],[fa.minute,30],[fa.hour,1],[fa.hour,3],[fa.hour,6],[fa.hour,12],[fa.day,1],[fa.day,2],[fa.week,1],[fa.month,1],[fa.month,3],[fa.year,1]],Jl=Vl.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Se]]),tc={range:function(t,e,n){return ls.range(Math.ceil(t/n)*n,+e,n).map(os)},floor:y,ceil:y};Ql.year=fa.year,fa.scale=function(){return rs(ls.scale.linear(),Ql,Jl)};var ec=Ql.map(function(t){return[t[0].utc,t[1]]}),nc=Kl.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Se]]);ec.year=fa.year.utc,fa.scale.utc=function(){return rs(ls.scale.linear(),ec,nc)},ls.text=_t(function(t){return t.responseText}),ls.json=function(t,e){return Dt(t,"application/json",ss,e)},ls.html=function(t,e){return Dt(t,"text/html",as,e)},ls.xml=_t(function(t){return t.responseXML}),"function"==typeof define&&define.amd?(this.d3=ls,define(ls)):"object"==typeof module&&module.exports?module.exports=ls:this.d3=ls}();/*! cal-heatmap v3.5.1 (Mon Jan 19 2015 17:28:39)
 *  ---------------------------------------------
 *  Cal-Heatmap is a javascript module to create calendar heatmap to visualize time series data
 *  https://github.com/kamisama/cal-heatmap
 *  Licensed under the MIT license
 *  Copyright 2014 Wan Qi Chen
 */
var d3="function"==typeof require?require("d3"):window.d3,CalHeatMap=function(){"use strict";function t(){i.verticalDomainLabel="top"===i.options.label.position||"bottom"===i.options.label.position,i.domainVerticalLabelHeight=null===i.options.label.height?Math.max(25,2*i.options.cellSize):i.options.label.height,i.domainHorizontalLabelWidth=0,""===i.options.domainLabelFormat&&null===i.options.label.height&&(i.domainVerticalLabelHeight=0),i.verticalDomainLabel||(i.domainVerticalLabelHeight=0,i.domainHorizontalLabelWidth=i.options.label.width),i.paint(),i.options.nextSelector!==!1&&d3.select(i.options.nextSelector).on("click."+i.options.itemNamespace,function(){return d3.event.preventDefault(),i.loadNextDomain(1)}),i.options.previousSelector!==!1&&d3.select(i.options.previousSelector).on("click."+i.options.itemNamespace,function(){return d3.event.preventDefault(),i.loadPreviousDomain(1)}),i.Legend.redraw(i.graphDim.width-i.options.domainGutter-i.options.cellPadding),i.afterLoad();var t=i.getDomainKeys();i.options.loadOnInit?i.getDatas(i.options.data,new Date(t[0]),i.getSubDomain(t[t.length-1]).pop(),function(){i.fill(),i.onComplete()}):i.onComplete(),i.checkIfMinDomainIsReached(t[0]),i.checkIfMaxDomainIsReached(i.getNextDomain().getTime())}function e(t,e){var n=i.options.cellSize*i._domainType[i.options.subDomain].column(t)+i.options.cellPadding*i._domainType[i.options.subDomain].column(t);return 2===arguments.length&&e===!0?n+=i.domainHorizontalLabelWidth+i.options.domainGutter+i.options.domainMargin[1]+i.options.domainMargin[3]:n}function n(t,e){var n=i.options.cellSize*i._domainType[i.options.subDomain].row(t)+i.options.cellPadding*i._domainType[i.options.subDomain].row(t);return 2===arguments.length&&e===!0&&(n+=i.options.domainGutter+i.domainVerticalLabelHeight+i.options.domainMargin[0]+i.options.domainMargin[2]),n}var i=this;this.allowedDataType=["json","csv","tsv","txt"],this.options={itemSelector:"#cal-heatmap",paintOnLoad:!0,range:12,cellSize:10,cellPadding:2,cellRadius:0,domainGutter:2,domainMargin:[0,0,0,0],domain:"hour",subDomain:"min",colLimit:null,rowLimit:null,weekStartOnMonday:!0,start:new Date,minDate:null,maxDate:null,data:"",dataType:this.allowedDataType[0],considerMissingDataAsZero:!1,loadOnInit:!0,verticalOrientation:!1,domainDynamicDimension:!0,label:{position:"bottom",align:"center",offset:{x:0,y:0},rotate:null,width:100,height:null},legend:[10,20,30,40],displayLegend:!0,legendCellSize:10,legendCellPadding:2,legendMargin:[0,0,0,0],legendVerticalPosition:"bottom",legendHorizontalPosition:"left",legendOrientation:"horizontal",legendColors:null,highlight:[],itemName:["item","items"],domainLabelFormat:null,subDomainTitleFormat:{empty:"{date}",filled:"{count} {name} {connector} {date}"},subDomainDateFormat:null,subDomainTextFormat:null,legendTitleFormat:{lower:"less than {min} {name}",inner:"between {down} and {up} {name}",upper:"more than {max} {name}"},animationDuration:500,nextSelector:!1,previousSelector:!1,itemNamespace:"cal-heatmap",tooltip:!1,onClick:null,afterLoad:null,afterLoadNextDomain:null,afterLoadPreviousDomain:null,onComplete:null,afterLoadData:function(t){return t},onMaxDomainReached:null,onMinDomainReached:null},this._domainType={min:{name:"minute",level:10,maxItemNumber:60,defaultRowNumber:10,defaultColumnNumber:6,row:function(t){return i.getSubDomainRowNumber(t)},column:function(t){return i.getSubDomainColumnNumber(t)},position:{x:function(t){return Math.floor(t.getMinutes()/i._domainType.min.row(t))},y:function(t){return t.getMinutes()%i._domainType.min.row(t)}},format:{date:"%H:%M, %A %B %-e, %Y",legend:"",connector:"at"},extractUnit:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes()).getTime()}},hour:{name:"hour",level:20,maxItemNumber:function(t){switch(i.options.domain){case"day":return 24;case"week":return 168;case"month":return 24*(i.options.domainDynamicDimension?i.getDayCountInMonth(t):31)}},defaultRowNumber:6,defaultColumnNumber:function(t){switch(i.options.domain){case"day":return 4;case"week":return 28;case"month":return i.options.domainDynamicDimension?i.getDayCountInMonth(t):31}},row:function(t){return i.getSubDomainRowNumber(t)},column:function(t){return i.getSubDomainColumnNumber(t)},position:{x:function(t){return"month"===i.options.domain?i.options.colLimit>0||i.options.rowLimit>0?Math.floor((t.getHours()+24*(t.getDate()-1))/i._domainType.hour.row(t)):Math.floor(t.getHours()/i._domainType.hour.row(t))+4*(t.getDate()-1):"week"===i.options.domain?i.options.colLimit>0||i.options.rowLimit>0?Math.floor((t.getHours()+24*i.getWeekDay(t))/i._domainType.hour.row(t)):Math.floor(t.getHours()/i._domainType.hour.row(t))+4*i.getWeekDay(t):Math.floor(t.getHours()/i._domainType.hour.row(t))},y:function(t){var e=t.getHours();if(i.options.colLimit>0||i.options.rowLimit>0)switch(i.options.domain){case"month":e+=24*(t.getDate()-1);break;case"week":e+=24*i.getWeekDay(t)}return Math.floor(e%i._domainType.hour.row(t))}},format:{date:"%Hh, %A %B %-e, %Y",legend:"%H:00",connector:"at"},extractUnit:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()).getTime()}},day:{name:"day",level:30,maxItemNumber:function(t){switch(i.options.domain){case"week":return 7;case"month":return i.options.domainDynamicDimension?i.getDayCountInMonth(t):31;case"year":return i.options.domainDynamicDimension?i.getDayCountInYear(t):366}},defaultColumnNumber:function(t){switch(t=new Date(t),i.options.domain){case"week":return 1;case"month":return i.options.domainDynamicDimension&&!i.options.verticalOrientation?i.getWeekNumber(new Date(t.getFullYear(),t.getMonth()+1,0))-i.getWeekNumber(t)+1:6;case"year":return i.options.domainDynamicDimension?i.getWeekNumber(new Date(t.getFullYear(),11,31))-i.getWeekNumber(new Date(t.getFullYear(),0))+1:54}},defaultRowNumber:7,row:function(t){return i.getSubDomainRowNumber(t)},column:function(t){return i.getSubDomainColumnNumber(t)},position:{x:function(t){switch(i.options.domain){case"week":return Math.floor(i.getWeekDay(t)/i._domainType.day.row(t));case"month":return i.options.colLimit>0||i.options.rowLimit>0?Math.floor((t.getDate()-1)/i._domainType.day.row(t)):i.getWeekNumber(t)-i.getWeekNumber(new Date(t.getFullYear(),t.getMonth()));case"year":return i.options.colLimit>0||i.options.rowLimit>0?Math.floor((i.getDayOfYear(t)-1)/i._domainType.day.row(t)):i.getWeekNumber(t)}},y:function(t){var e=i.getWeekDay(t);if(i.options.colLimit>0||i.options.rowLimit>0)switch(i.options.domain){case"year":e=i.getDayOfYear(t)-1;break;case"week":e=i.getWeekDay(t);break;case"month":e=t.getDate()-1}return Math.floor(e%i._domainType.day.row(t))}},format:{date:"%A %B %-e, %Y",legend:"%e %b",connector:"on"},extractUnit:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}},week:{name:"week",level:40,maxItemNumber:54,defaultColumnNumber:function(t){switch(t=new Date(t),i.options.domain){case"year":return i._domainType.week.maxItemNumber;case"month":return i.getWeekNumber(new Date(t.getFullYear(),t.getMonth()+1,0))-i.getWeekNumber(t)}},defaultRowNumber:1,row:function(t){return i.getSubDomainRowNumber(t)},column:function(t){return i.getSubDomainColumnNumber(t)},position:{x:function(t){switch(i.options.domain){case"year":return Math.floor(i.getWeekNumber(t)/i._domainType.week.row(t));case"month":return Math.floor(i.getMonthWeekNumber(t)/i._domainType.week.row(t))}},y:function(t){return i.getWeekNumber(t)%i._domainType.week.row(t)}},format:{date:"%B Week #%W",legend:"%B Week #%W",connector:"in"},extractUnit:function(t){var e=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=e.getDay()-1;return 0>n&&(n=6),e.setDate(e.getDate()-n),e.getTime()}},month:{name:"month",level:50,maxItemNumber:12,defaultColumnNumber:12,defaultRowNumber:1,row:function(){return i.getSubDomainRowNumber()},column:function(){return i.getSubDomainColumnNumber()},position:{x:function(t){return Math.floor(t.getMonth()/i._domainType.month.row(t))},y:function(t){return t.getMonth()%i._domainType.month.row(t)}},format:{date:"%B %Y",legend:"%B",connector:"in"},extractUnit:function(t){return new Date(t.getFullYear(),t.getMonth()).getTime()}},year:{name:"year",level:60,row:function(){return i.options.rowLimit||1},column:function(){return i.options.colLimit||1},position:{x:function(){return 1},y:function(){return 1}},format:{date:"%Y",legend:"%Y",connector:"in"},extractUnit:function(t){return new Date(t.getFullYear()).getTime()}}};for(var r in this._domainType)if(this._domainType.hasOwnProperty(r)){var o=this._domainType[r];this._domainType["x_"+r]={name:"x_"+r,level:o.type,maxItemNumber:o.maxItemNumber,defaultRowNumber:o.defaultRowNumber,defaultColumnNumber:o.defaultColumnNumber,row:o.column,column:o.row,position:{x:o.position.y,y:o.position.x},format:o.format,extractUnit:o.extractUnit}}this.lastInsertedSvg=null,this._completed=!1,this._domains=d3.map(),this.graphDim={width:0,height:0},this.legendDim={width:0,height:0},this.NAVIGATE_LEFT=1,this.NAVIGATE_RIGHT=2,this.RESET_ALL_ON_UPDATE=0,this.RESET_SINGLE_ON_UPDATE=1,this.APPEND_ON_UPDATE=2,this.DEFAULT_LEGEND_MARGIN=10,this.root=null,this.tooltip=null,this._maxDomainReached=!1,this._minDomainReached=!1,this.domainPosition=new DomainPosition,this.Legend=null,this.legendScale=null,this.DSTDomain=[],this._init=function(){return i.getDomain(i.options.start).map(function(t){return t.getTime()}).map(function(t){i._domains.set(t,i.getSubDomain(t).map(function(t){return{t:i._domainType[i.options.subDomain].extractUnit(t),v:null}}))}),i.root=d3.select(i.options.itemSelector).append("svg").attr("class","cal-heatmap-container"),i.tooltip=d3.select(i.options.itemSelector).attr("style",function(){var t=d3.select(i.options.itemSelector).attr("style");return(null!==t?t:"")+"position:relative;"}).append("div").attr("class","ch-tooltip"),i.root.attr("x",0).attr("y",0).append("svg").attr("class","graph"),i.Legend=new Legend(i),i.options.paintOnLoad&&t(),!0},this.paint=function(t){function r(e,n,r,o){var s=0;switch(t){case!1:return s=n[r],n[r]+=o,i.domainPosition.setPosition(e,s),s;case i.NAVIGATE_RIGHT:return i.domainPosition.setPosition(e,n[r]),l=o,c=i.domainPosition.getPositionFromIndex(1),i.domainPosition.shiftRightBy(c),n[r];case i.NAVIGATE_LEFT:return s=-o,l=-s,c=n[r]-i.domainPosition.getLast(),i.domainPosition.setPosition(e,s),i.domainPosition.shiftLeftBy(l),s}}function o(t){switch(s.label.rotate){case"right":t.attr("transform",function(t){var n="rotate(90), ";switch(s.label.position){case"right":n+="translate(-"+e(t)+" , -"+e(t)+")";break;case"left":n+="translate(0, -"+i.domainHorizontalLabelWidth+")"}return n});break;case"left":t.attr("transform",function(t){var n="rotate(270), ";switch(s.label.position){case"right":n+="translate(-"+(e(t)+i.domainHorizontalLabelWidth)+" , "+e(t)+")";break;case"left":n+="translate(-"+i.domainHorizontalLabelWidth+" , "+i.domainHorizontalLabelWidth+")"}return n})}}var s=i.options;0===arguments.length&&(t=!1);var a=i.root.select(".graph").selectAll(".graph-domain").data(function(){var e=i.getDomainKeys();return t===i.NAVIGATE_LEFT?e.reverse():e},function(t){return t}),l=0,c=0,h=a.enter().append("svg").attr("width",function(t){return e(t,!0)}).attr("height",function(t){return n(t,!0)}).attr("x",function(t){return s.verticalOrientation?(i.graphDim.width=Math.max(i.graphDim.width,e(t,!0)),0):r(t,i.graphDim,"width",e(t,!0))}).attr("y",function(t){return s.verticalOrientation?r(t,i.graphDim,"height",n(t,!0)):(i.graphDim.height=Math.max(i.graphDim.height,n(t,!0)),0)}).attr("class",function(t){var e="graph-domain",n=new Date(t);switch(s.domain){case"hour":e+=" h_"+n.getHours();case"day":e+=" d_"+n.getDate()+" dy_"+n.getDay();case"week":e+=" w_"+i.getWeekNumber(n);case"month":e+=" m_"+(n.getMonth()+1);case"year":e+=" y_"+n.getFullYear()}return e});i.lastInsertedSvg=h,h.append("rect").attr("width",function(t){return e(t,!0)-s.domainGutter-s.cellPadding}).attr("height",function(t){return n(t,!0)-s.domainGutter-s.cellPadding}).attr("class","domain-background");var u=h.append("svg").attr("x",function(){return"left"===s.label.position?i.domainHorizontalLabelWidth+s.domainMargin[3]:s.domainMargin[3]}).attr("y",function(){return"top"===s.label.position?i.domainVerticalLabelHeight+s.domainMargin[0]:s.domainMargin[0]}).attr("class","graph-subdomain-group"),d=u.selectAll("g").data(function(t){return i._domains.get(t)}).enter().append("g");d.append("rect").attr("class",function(t){return"graph-rect"+i.getHighlightClassName(t.t)+(null!==s.onClick?" hover_cursor":"")}).attr("width",s.cellSize).attr("height",s.cellSize).attr("x",function(t){return i.positionSubDomainX(t.t)}).attr("y",function(t){return i.positionSubDomainY(t.t)}).on("click",function(t){return null!==s.onClick?i.onClick(new Date(t.t),t.v):void 0}).call(function(t){s.cellRadius>0&&t.attr("rx",s.cellRadius).attr("ry",s.cellRadius),null!==i.legendScale&&null!==s.legendColors&&s.legendColors.hasOwnProperty("base")&&t.attr("fill",s.legendColors.base),s.tooltip&&(t.on("mouseover",function(t){var e=this.parentNode.parentNode;i.tooltip.html(i.getSubDomainTitle(t)).attr("style","display: block;");var n=i.positionSubDomainX(t.t)-i.tooltip[0][0].offsetWidth/2+s.cellSize/2,r=i.positionSubDomainY(t.t)-i.tooltip[0][0].offsetHeight-s.cellSize/2;n+=parseInt(e.getAttribute("x"),10),r+=parseInt(e.getAttribute("y"),10),n+=parseInt(i.root.select(".graph").attr("x"),10),r+=parseInt(i.root.select(".graph").attr("y"),10),n+=parseInt(e.parentNode.getAttribute("x"),10),r+=parseInt(e.parentNode.getAttribute("y"),10),i.tooltip.attr("style","display: block; left: "+n+"px; top: "+r+"px;")}),t.on("mouseout",function(){i.tooltip.attr("style","display:none").html("")}))}),s.tooltip||d.append("title").text(function(t){return i.formatDate(new Date(t.t),s.subDomainDateFormat)}),""!==s.domainLabelFormat&&h.append("text").attr("class","graph-label").attr("y",function(t){var e=s.domainMargin[0];switch(s.label.position){case"top":e+=i.domainVerticalLabelHeight/2;break;case"bottom":e+=n(t)+i.domainVerticalLabelHeight/2}return e+s.label.offset.y*("right"===s.label.rotate&&"right"===s.label.position||"left"===s.label.rotate&&"left"===s.label.position?-1:1)}).attr("x",function(t){var n=s.domainMargin[3];switch(s.label.position){case"right":n+=e(t);break;case"bottom":case"top":n+=e(t)/2}return"right"===s.label.align?n+i.domainHorizontalLabelWidth-s.label.offset.x*("right"===s.label.rotate?-1:1):n+s.label.offset.x}).attr("text-anchor",function(){switch(s.label.align){case"start":case"left":return"start";case"end":case"right":return"end";default:return"middle"}}).attr("dominant-baseline",function(){return i.verticalDomainLabel?"middle":"top"}).text(function(t){return i.formatDate(new Date(t),s.domainLabelFormat)}).call(o),null!==s.subDomainTextFormat&&d.append("text").attr("class",function(t){return"subdomain-text"+i.getHighlightClassName(t.t)}).attr("x",function(t){return i.positionSubDomainX(t.t)+s.cellSize/2}).attr("y",function(t){return i.positionSubDomainY(t.t)+s.cellSize/2}).attr("text-anchor","middle").attr("dominant-baseline","central").text(function(t){return i.formatDate(new Date(t.t),s.subDomainTextFormat)}),t!==!1&&a.transition().duration(s.animationDuration).attr("x",function(t){return s.verticalOrientation?0:i.domainPosition.getPosition(t)}).attr("y",function(t){return s.verticalOrientation?i.domainPosition.getPosition(t):0});var f=i.graphDim.width,p=i.graphDim.height;s.verticalOrientation?i.graphDim.height+=l-c:i.graphDim.width+=l-c,a.exit().transition().duration(s.animationDuration).attr("x",function(n){if(s.verticalOrientation)return 0;switch(t){case i.NAVIGATE_LEFT:return Math.min(i.graphDim.width,f);case i.NAVIGATE_RIGHT:return-e(n,!0)}}).attr("y",function(e){if(!s.verticalOrientation)return 0;switch(t){case i.NAVIGATE_LEFT:return Math.min(i.graphDim.height,p);case i.NAVIGATE_RIGHT:return-n(e,!0)}}).remove(),i.resize()}};CalHeatMap.prototype={init:function(t){"use strict";function e(t,e,n){if((e&&t===!1||t instanceof Element||"string"==typeof t)&&""!==t)return!0;throw new Error("The "+n+" is not valid")}function n(t){switch(t){case"year":return"month";case"month":return"day";case"week":return"day";case"day":return"hour";default:return"min"}}function i(){if(!h._domainType.hasOwnProperty(u.domain)||"min"===u.domain||"x_"===u.domain.substring(0,2))throw new Error("The domain '"+u.domain+"' is not valid");if(!h._domainType.hasOwnProperty(u.subDomain)||"year"===u.subDomain)throw new Error("The subDomain '"+u.subDomain+"' is not valid");if(h._domainType[u.domain].level<=h._domainType[u.subDomain].level)throw new Error("'"+u.subDomain+"' is not a valid subDomain to '"+u.domain+"'");return!0}function r(){if(!t.hasOwnProperty("label")||t.hasOwnProperty("label")&&!t.label.hasOwnProperty("align")){switch(u.label.position){case"left":u.label.align="right";break;case"right":u.label.align="left";break;default:u.label.align="center"}"left"===u.label.rotate?u.label.align="right":"right"===u.label.rotate&&(u.label.align="left")}(!t.hasOwnProperty("label")||t.hasOwnProperty("label")&&!t.label.hasOwnProperty("offset"))&&("left"===u.label.position||"right"===u.label.position)&&(u.label.offset={x:10,y:15})}function o(){switch(u.legendVerticalPosition){case"top":u.legendMargin[2]=h.DEFAULT_LEGEND_MARGIN;break;case"bottom":u.legendMargin[0]=h.DEFAULT_LEGEND_MARGIN;break;case"middle":case"center":u.legendMargin["right"===u.legendHorizontalPosition?3:1]=h.DEFAULT_LEGEND_MARGIN}}function s(t){switch("number"==typeof t&&(t=[t]),Array.isArray(t)||(console.log("Margin only takes an integer or an array of integers"),t=[0]),t.length){case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];case 4:return t;default:return t.slice(0,4)}}function a(t){return"string"==typeof t?[t,t+(""!==t?"s":"")]:Array.isArray(t)?1===t.length?[t[0],t[0]+"s"]:t.length>2?t.slice(0,2):t:["item","items"]}function l(t){return t>0?t:null}function c(t){return t>0&&u.colLimit>0?(console.log("colLimit and rowLimit are mutually exclusive, rowLimit will be ignored"),null):t>0?t:null}var h=this,u=h.options=mergeRecursive(h.options,t);if(i(),e(u.itemSelector,!1,"itemSelector"),-1===h.allowedDataType.indexOf(u.dataType))throw new Error("The data type '"+u.dataType+"' is not valid data type");if(null===d3.select(u.itemSelector)[0][0])throw new Error("The node '"+u.itemSelector+"' specified in itemSelector does not exists");try{e(u.nextSelector,!0,"nextSelector"),e(u.previousSelector,!0,"previousSelector")}catch(d){return console.log(d.message),!1}t.hasOwnProperty("subDomain")||(this.options.subDomain=n(t.domain)),("string"!=typeof u.itemNamespace||""===u.itemNamespace)&&(console.log("itemNamespace can not be empty, falling back to cal-heatmap"),u.itemNamespace="cal-heatmap");var f=["data","onComplete","onClick","afterLoad","afterLoadData","afterLoadPreviousDomain","afterLoadNextDomain"];for(var p in f)t.hasOwnProperty(f[p])&&(u[f[p]]=t[f[p]]);return u.subDomainDateFormat="string"==typeof u.subDomainDateFormat||"function"==typeof u.subDomainDateFormat?u.subDomainDateFormat:this._domainType[u.subDomain].format.date,u.domainLabelFormat="string"==typeof u.domainLabelFormat||"function"==typeof u.domainLabelFormat?u.domainLabelFormat:this._domainType[u.domain].format.legend,u.subDomainTextFormat="string"==typeof u.subDomainTextFormat&&""!==u.subDomainTextFormat||"function"==typeof u.subDomainTextFormat?u.subDomainTextFormat:null,u.domainMargin=s(u.domainMargin),u.legendMargin=s(u.legendMargin),u.highlight=h.expandDateSetting(u.highlight),u.itemName=a(u.itemName),u.colLimit=l(u.colLimit),u.rowLimit=c(u.rowLimit),t.hasOwnProperty("legendMargin")||o(),r(),this._init()},expandDateSetting:function(t){"use strict";return Array.isArray(t)||(t=[t]),t.map(function(t){return"now"===t?new Date:t instanceof Date?t:!1}).filter(function(t){return t!==!1})},fill:function(t){"use strict";function e(t){return null===i.legendScale?!1:void t.attr("fill",function(t){return 0===t.v&&null!==r.legendColors&&r.legendColors.hasOwnProperty("empty")?r.legendColors.empty:t.v<0&&r.legend[0]>0&&null!==r.legendColors&&r.legendColors.hasOwnProperty("overflow")?r.legendColors.overflow:i.legendScale(Math.min(t.v,r.legend[r.legend.length-1]))})}function n(t){"function"==typeof r.subDomainTextFormat&&t.text(function(t){return r.subDomainTextFormat(t.t,t.v)})}var i=this,r=i.options;0===arguments.length&&(t=i.root.selectAll(".graph-domain"));var o=t.selectAll("svg").selectAll("g").data(function(t){return i._domains.get(t)});o.transition().duration(r.animationDuration).select("rect").attr("class",function(t){var e=i.getHighlightClassName(t.t).trim().split(" "),n=i.dateIsLessThan(t.t,new Date);return null===i.legendScale&&e.push("graph-rect"),n||-1!==e.indexOf("now")||e.push("future"),null!==t.v?e.push(i.Legend.getClass(t.v,null===i.legendScale)):r.considerMissingDataAsZero&&n&&e.push(i.Legend.getClass(0,null===i.legendScale)),null!==r.onClick&&e.push("hover_cursor"),e.join(" ")}).call(e),o.transition().duration(r.animationDuration).select("title").text(function(t){return i.getSubDomainTitle(t)}),o.transition().duration(r.animationDuration).select("text").attr("class",function(t){return"subdomain-text"+i.getHighlightClassName(t.t)}).call(n)},triggerEvent:function(t,e,n){"use strict";return 3===arguments.length&&n||null===this.options[t]?!0:"function"==typeof this.options[t]?("function"==typeof e&&(e=e()),this.options[t].apply(this,e)):(console.log("Provided callback for "+t+" is not a function."),!1)},onClick:function(t,e){"use strict";return this.triggerEvent("onClick",[t,e])},afterLoad:function(){"use strict";return this.triggerEvent("afterLoad")},onComplete:function(){"use strict";var t=this.triggerEvent("onComplete",[],this._completed);return this._completed=!0,t},afterLoadPreviousDomain:function(t){"use strict";var e=this;return this.triggerEvent("afterLoadPreviousDomain",function(){var n=e.getSubDomain(t);return[n.shift(),n.pop()]})},afterLoadNextDomain:function(t){"use strict";var e=this;return this.triggerEvent("afterLoadNextDomain",function(){var n=e.getSubDomain(t);return[n.shift(),n.pop()]})},onMinDomainReached:function(t){"use strict";return this._minDomainReached=t,this.triggerEvent("onMinDomainReached",[t])},onMaxDomainReached:function(t){"use strict";return this._maxDomainReached=t,this.triggerEvent("onMaxDomainReached",[t])},checkIfMinDomainIsReached:function(t,e){"use strict";this.minDomainIsReached(t)&&this.onMinDomainReached(!0),2===arguments.length&&this._maxDomainReached&&!this.maxDomainIsReached(e)&&this.onMaxDomainReached(!1)},checkIfMaxDomainIsReached:function(t,e){"use strict";this.maxDomainIsReached(t)&&this.onMaxDomainReached(!0),2===arguments.length&&this._minDomainReached&&!this.minDomainIsReached(e)&&this.onMinDomainReached(!1)},formatNumber:d3.format(",g"),formatDate:function(t,e){"use strict";if(arguments.length<2&&(e="title"),"function"==typeof e)return e(t);var n=d3.time.format(e);return n(t)},getSubDomainTitle:function(t){"use strict";if(null!==t.v||this.options.considerMissingDataAsZero){var e=t.v;return null===e&&this.options.considerMissingDataAsZero&&(e=0),this.options.subDomainTitleFormat.filled.format({count:this.formatNumber(e),name:this.options.itemName[1!==e?1:0],connector:this._domainType[this.options.subDomain].format.connector,date:this.formatDate(new Date(t.t),this.options.subDomainDateFormat)})}return this.options.subDomainTitleFormat.empty.format({date:this.formatDate(new Date(t.t),this.options.subDomainDateFormat)})},loadNextDomain:function(t){"use strict";if(this._maxDomainReached||0===t)return!1;var e=this.loadNewDomains(this.NAVIGATE_RIGHT,this.getDomain(this.getNextDomain(),t));return this.afterLoadNextDomain(e.end),this.checkIfMaxDomainIsReached(this.getNextDomain().getTime(),e.start),!0},loadPreviousDomain:function(t){"use strict";if(this._minDomainReached||0===t)return!1;var e=this.loadNewDomains(this.NAVIGATE_LEFT,this.getDomain(this.getDomainKeys()[0],-t).reverse());return this.afterLoadPreviousDomain(e.start),this.checkIfMinDomainIsReached(e.start,e.end),!0},loadNewDomains:function(t,e){"use strict";function n(t){return{t:i._domainType[i.options.subDomain].extractUnit(t),v:null}}for(var i=this,r=t===this.NAVIGATE_LEFT,o=-1,s=e.length,a=this.getDomainKeys();++o<s;){if(r&&this.minDomainIsReached(e[o])){e=e.slice(0,o+1);break}if(!r&&this.maxDomainIsReached(e[o])){e=e.slice(0,o);break}}for(e=e.slice(-this.options.range),o=0,s=e.length;s>o;o++)this._domains.set(e[o].getTime(),this.getSubDomain(e[o]).map(n)),this._domains.remove(r?a.pop():a.shift());return a=this.getDomainKeys(),r&&(e=e.reverse()),this.paint(t),this.getDatas(this.options.data,e[0],this.getSubDomain(e[e.length-1]).pop(),function(){i.fill(i.lastInsertedSvg)}),{start:e[r?0:1],end:a[a.length-1]}},maxDomainIsReached:function(t){"use strict";return null!==this.options.maxDate&&this.options.maxDate.getTime()<t},minDomainIsReached:function(t){"use strict";return null!==this.options.minDate&&this.options.minDate.getTime()>=t},getDomainKeys:function(){"use strict";return this._domains.keys().map(function(t){return parseInt(t,10)}).sort(function(t,e){return t-e})},positionSubDomainX:function(t){"use strict";var e=this._domainType[this.options.subDomain].position.x(new Date(t));return e*this.options.cellSize+e*this.options.cellPadding},positionSubDomainY:function(t){"use strict";var e=this._domainType[this.options.subDomain].position.y(new Date(t));return e*this.options.cellSize+e*this.options.cellPadding},getSubDomainColumnNumber:function(t){"use strict";if(this.options.rowLimit>0){var e=this._domainType[this.options.subDomain].maxItemNumber;return"function"==typeof e&&(e=e(t)),Math.ceil(e/this.options.rowLimit)}var n=this._domainType[this.options.subDomain].defaultColumnNumber;return"function"==typeof n&&(n=n(t)),this.options.colLimit||n},getSubDomainRowNumber:function(t){"use strict";if(this.options.colLimit>0){var e=this._domainType[this.options.subDomain].maxItemNumber;return"function"==typeof e&&(e=e(t)),Math.ceil(e/this.options.colLimit)}var n=this._domainType[this.options.subDomain].defaultRowNumber;return"function"==typeof n&&(n=n(t)),this.options.rowLimit||n},getHighlightClassName:function(t){"use strict";if(t=new Date(t),this.options.highlight.length>0)for(var e in this.options.highlight)if(this.options.highlight[e]instanceof Date&&this.dateIsEqual(this.options.highlight[e],t))return" highlight"+(this.isNow(this.options.highlight[e])?" now":"");return""},isNow:function(t){"use strict";return this.dateIsEqual(t,new Date)},dateIsEqual:function(t,e){"use strict";switch(this.options.subDomain){case"x_min":case"min":return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()&&t.getHours()===e.getHours()&&t.getMinutes()===e.getMinutes();case"x_hour":case"hour":return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()&&t.getHours()===e.getHours();case"x_day":case"day":return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();case"x_week":case"week":return t.getFullYear()===e.getFullYear()&&this.getWeekNumber(t)===this.getWeekNumber(e);case"x_month":case"month":return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth();default:return!1}},dateIsLessThan:function(t,e){"use strict";function n(t,e){switch(e){case"x_min":case"min":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes()).getTime();case"x_hour":case"hour":return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()).getTime();case"x_day":case"day":return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();case"x_week":case"week":case"x_month":case"month":return new Date(t.getFullYear(),t.getMonth()).getTime();default:return t.getTime()}}return t instanceof Date||(t=new Date(t)),e instanceof Date||(e=new Date(e)),n(t,this.options.subDomain)<n(e,this.options.subDomain)},getDayOfYear:d3.time.format("%j"),getWeekNumber:function(t){"use strict";var e=this.options.weekStartOnMonday===!0?d3.time.format("%W"):d3.time.format("%U");return e(t)},getMonthWeekNumber:function(t){"use strict";"number"==typeof t&&(t=new Date(t));var e=this.getWeekNumber(new Date(t.getFullYear(),t.getMonth()));return this.getWeekNumber(t)-e-1},getWeekNumberInYear:function(t){"use strict";"number"==typeof t&&(t=new Date(t))},getDayCountInMonth:function(t){"use strict";return this.getEndOfMonth(t).getDate()},getDayCountInYear:function(t){"use strict";return"number"==typeof t&&(t=new Date(t)),1===new Date(t.getFullYear(),1,29).getMonth()?366:365},getWeekDay:function(t){"use strict";return this.options.weekStartOnMonday===!1?t.getDay():0===t.getDay()?6:t.getDay()-1},getEndOfMonth:function(t){"use strict";return"number"==typeof t&&(t=new Date(t)),new Date(t.getFullYear(),t.getMonth()+1,0)},jumpDate:function(t,e,n){"use strict";var i=new Date(t);switch(n){case"hour":i.setHours(i.getHours()+e);break;case"day":i.setHours(i.getHours()+24*e);break;case"week":i.setHours(i.getHours()+24*e*7);break;case"month":i.setMonth(i.getMonth()+e);break;case"year":i.setFullYear(i.getFullYear()+e)}return new Date(i)},getMinuteDomain:function(t,e){"use strict";var n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()),i=null;return i=e instanceof Date?new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()):new Date(+n+1e3*e*60),d3.time.minutes(Math.min(n,i),Math.max(n,i))},getHourDomain:function(t,e){"use strict";var n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()),i=null;e instanceof Date?i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()):(i=new Date(n),i.setHours(i.getHours()+e));var r=d3.time.hours(Math.min(n,i),Math.max(n,i)),o=0,s=r.length;for(o=0;s>o;o++)if(o>0&&r[o].getHours()===r[o-1].getHours()){this.DSTDomain.push(r[o].getTime()),r.splice(o,1);break}return"number"==typeof e&&r.length>Math.abs(e)&&r.splice(r.length-1,1),r},getDayDomain:function(t,e){"use strict";var n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),i=null;return e instanceof Date?i=new Date(e.getFullYear(),e.getMonth(),e.getDate()):(i=new Date(n),i=new Date(i.setDate(i.getDate()+parseInt(e,10)))),d3.time.days(Math.min(n,i),Math.max(n,i))},getWeekDomain:function(t,e){"use strict";var n;this.options.weekStartOnMonday===!1?n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay()):1===t.getDay()?n=new Date(t.getFullYear(),t.getMonth(),t.getDate()):0===t.getDay()?(n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n.setDate(n.getDate()-6)):n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay()+1);var i=new Date(n),r=e;return"object"!=typeof e&&(r=new Date(i.setDate(i.getDate()+7*e))),this.options.weekStartOnMonday===!0?d3.time.mondays(Math.min(n,r),Math.max(n,r)):d3.time.sundays(Math.min(n,r),Math.max(n,r))},getMonthDomain:function(t,e){"use strict";var n=new Date(t.getFullYear(),t.getMonth()),i=null;return e instanceof Date?i=new Date(e.getFullYear(),e.getMonth()):(i=new Date(n),i=i.setMonth(i.getMonth()+e)),d3.time.months(Math.min(n,i),Math.max(n,i))},getYearDomain:function(t,e){"use strict";var n=new Date(t.getFullYear(),0),i=null;return i=e instanceof Date?new Date(e.getFullYear(),0):new Date(t.getFullYear()+e,0),d3.time.years(Math.min(n,i),Math.max(n,i))},getDomain:function(t,e){"use strict";switch("number"==typeof t&&(t=new Date(t)),arguments.length<2&&(e=this.options.range),this.options.domain){case"hour":var n=this.getHourDomain(t,e);return"number"==typeof e&&n.length<e&&(e>0?n.push(this.getHourDomain(n[n.length-1],2)[1]):n.shift(this.getHourDomain(n[0],-2)[0])),n;case"day":return this.getDayDomain(t,e);case"week":return this.getWeekDomain(t,e);case"month":return this.getMonthDomain(t,e);case"year":return this.getYearDomain(t,e)}},getSubDomain:function(t){"use strict";"number"==typeof t&&(t=new Date(t));var e=this,n=function(t,n){switch(n){case"year":return e.getDayCountInYear(t);case"month":return e.getDayCountInMonth(t);case"week":return 7}},i=function(t,e){switch(e){case"hour":return 60;case"day":return 1440;case"week":return 10080}},r=function(t,n){switch(n){case"day":return 24;case"week":return 168;case"month":return 24*e.getDayCountInMonth(t)}},o=function(t,n){if("month"===n){var i=new Date(t.getFullYear(),t.getMonth()+1,0),r=e.getWeekNumber(i),o=e.getWeekNumber(new Date(t.getFullYear(),t.getMonth()));return o>r&&(o=0,r++),r-o+1}return"year"===n?e.getWeekNumber(new Date(t.getFullYear(),11,31)):void 0};switch(this.options.subDomain){case"x_min":case"min":return this.getMinuteDomain(t,i(t,this.options.domain));case"x_hour":case"hour":return this.getHourDomain(t,r(t,this.options.domain));case"x_day":case"day":return this.getDayDomain(t,n(t,this.options.domain));case"x_week":case"week":return this.getWeekDomain(t,o(t,this.options.domain));
case"x_month":case"month":return this.getMonthDomain(t,12)}},getNextDomain:function(t){"use strict";return 0===arguments.length&&(t=1),this.getDomain(this.jumpDate(this.getDomainKeys().pop(),t,this.options.domain),1)[0]},getPreviousDomain:function(t){"use strict";return 0===arguments.length&&(t=1),this.getDomain(this.jumpDate(this.getDomainKeys().shift(),-t,this.options.domain),1)[0]},getDatas:function(t,e,n,i,r,o){"use strict";var s=this;arguments.length<5&&(r=!0),arguments.length<6&&(o=this.APPEND_ON_UPDATE);var a=function(t){r!==!1?"function"==typeof r?t=r(t):"function"==typeof s.options.afterLoadData?t=s.options.afterLoadData(t):console.log("Provided callback for afterLoadData is not a function."):("csv"===s.options.dataType||"tsv"===s.options.dataType)&&(t=this.interpretCSV(t)),s.parseDatas(t,o,e,n),"function"==typeof i&&i()};switch(typeof t){case"string":if(""===t)return a({}),!0;switch(this.options.dataType){case"json":d3.json(this.parseURI(t,e,n),a);break;case"csv":d3.csv(this.parseURI(t,e,n),a);break;case"tsv":d3.tsv(this.parseURI(t,e,n),a);break;case"txt":d3.text(this.parseURI(t,e,n),"text/plain",a)}return!1;case"object":if(t===Object(t))return a(t),!1;default:return a({}),!0}},parseDatas:function(t,e,n,i){"use strict";e===this.RESET_ALL_ON_UPDATE&&this._domains.forEach(function(t,e){e.forEach(function(t,e,n){n[e].v=null})});var r={},o=function(t){return t.t};for(var s in t){var a=new Date(1e3*s),l=this.getDomain(a)[0].getTime();if(this.DSTDomain.indexOf(l)>=0&&this._domains.has(l-36e5)&&(l-=36e5),!isNaN(s)&&t.hasOwnProperty(s)&&this._domains.has(l)&&l>=+n&&+i>l){var c=this._domains.get(l);r.hasOwnProperty(l)||(r[l]=c.map(o));var h=r[l].indexOf(this._domainType[this.options.subDomain].extractUnit(a));e===this.RESET_SINGLE_ON_UPDATE?c[h].v=t[s]:isNaN(c[h].v)?c[h].v=t[s]:c[h].v+=t[s]}}},parseURI:function(t,e,n){"use strict";return t=t.replace(/\{\{t:start\}\}/g,e.getTime()/1e3),t=t.replace(/\{\{t:end\}\}/g,n.getTime()/1e3),t=t.replace(/\{\{d:start\}\}/g,e.toISOString()),t=t.replace(/\{\{d:end\}\}/g,n.toISOString())},interpretCSV:function(t){"use strict";var e,n,i={},r=Object.keys(t[0]);for(e=0,n=t.length;n>e;e++)i[t[e][r[0]]]=+t[e][r[1]];return i},resize:function(){"use strict";var t=this,e=t.options,n=e.displayLegend?t.Legend.getDim("width")+e.legendMargin[1]+e.legendMargin[3]:0,i=e.displayLegend?t.Legend.getDim("height")+e.legendMargin[0]+e.legendMargin[2]:0,r=t.graphDim.width-e.domainGutter-e.cellPadding,o=t.graphDim.height-e.domainGutter-e.cellPadding;this.root.transition().duration(e.animationDuration).attr("width",function(){return"middle"===e.legendVerticalPosition||"center"===e.legendVerticalPosition?r+n:Math.max(r,n)}).attr("height",function(){return"middle"===e.legendVerticalPosition||"center"===e.legendVerticalPosition?Math.max(o,i):o+i}),this.root.select(".graph").transition().duration(e.animationDuration).attr("y",function(){return"top"===e.legendVerticalPosition?i:0}).attr("x",function(){return"middle"!==e.legendVerticalPosition&&"center"!==e.legendVerticalPosition||"left"!==e.legendHorizontalPosition?0:n})},next:function(t){"use strict";return 0===arguments.length&&(t=1),this.loadNextDomain(t)},previous:function(t){"use strict";return 0===arguments.length&&(t=1),this.loadPreviousDomain(t)},jumpTo:function(t,e){"use strict";arguments.length<2&&(e=!1);var n=this.getDomainKeys(),i=n[0],r=n[n.length-1];return i>t?this.loadPreviousDomain(this.getDomain(i,t).length):e?this.loadNextDomain(this.getDomain(i,t).length):t>r?this.loadNextDomain(this.getDomain(r,t).length):!1},rewind:function(){"use strict";this.jumpTo(this.options.start,!0)},update:function(t,e,n){"use strict";arguments.length<2&&(e=!0),arguments.length<3&&(n=this.RESET_ALL_ON_UPDATE);var i=this.getDomainKeys(),r=this;this.getDatas(t,new Date(i[0]),this.getSubDomain(i[i.length-1]).pop(),function(){r.fill()},e,n)},setLegend:function(){"use strict";var t=this.options.legend.slice(0);arguments.length>=1&&Array.isArray(arguments[0])&&(this.options.legend=arguments[0]),arguments.length>=2&&(Array.isArray(arguments[1])&&arguments[1].length>=2?this.options.legendColors=[arguments[1][0],arguments[1][1]]:this.options.legendColors=arguments[1]),(arguments.length>0&&!arrayEquals(t,this.options.legend)||arguments.length>=2)&&(this.Legend.buildColors(),this.fill()),this.Legend.redraw(this.graphDim.width-this.options.domainGutter-this.options.cellPadding)},removeLegend:function(){"use strict";return this.options.displayLegend?(this.options.displayLegend=!1,this.Legend.remove(),!0):!1},showLegend:function(){"use strict";return this.options.displayLegend?!1:(this.options.displayLegend=!0,this.Legend.redraw(this.graphDim.width-this.options.domainGutter-this.options.cellPadding),!0)},highlight:function(t){"use strict";return(this.options.highlight=this.expandDateSetting(t)).length>0?(this.fill(),!0):!1},destroy:function(t){"use strict";return this.root.transition().duration(this.options.animationDuration).attr("width",0).attr("height",0).remove().each("end",function(){"function"==typeof t?t():"undefined"!=typeof t&&console.log("Provided callback for destroy() is not a function.")}),null},getSVG:function(){"use strict";for(var t={".cal-heatmap-container":{},".graph":{},".graph-rect":{},"rect.highlight":{},"rect.now":{},"text.highlight":{},"text.now":{},".domain-background":{},".graph-label":{},".subdomain-text":{},".q0":{},".qi":{}},e=1,n=this.options.legend.length+1;n>=e;e++)t[".q"+e]={};var i=this.root,r=["stroke","stroke-width","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-miterlimit","fill","fill-opacity","fill-rule","marker","marker-start","marker-mid","marker-end","alignement-baseline","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","kerning","text-anchor","shape-rendering","text-transform","font-family","font","font-size","font-weight"],o=function(e,n,i){-1!==r.indexOf(n)&&(t[e][n]=i)},s=function(t){return i.select(t)[0][0]};for(var a in t)if(t.hasOwnProperty(a)){var l=s(a);if(null!==l)if("getComputedStyle"in window){var c=getComputedStyle(l,null);if(0!==c.length)for(var h=0;h<c.length;h++)o(a,c.item(h),c.getPropertyValue(c.item(h)));else for(var u in c)c.hasOwnProperty(u)&&o(a,u,c[u])}else if("currentStyle"in l){var d=l.currentStyle;for(var f in d)o(a,f,d[f])}}var p='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css"><![CDATA[ ';for(var g in t){p+=g+" {\n";for(var m in t[g])p+="	"+m+":"+t[g][m]+";\n";p+="}\n"}return p+="]]></style>",p+=(new XMLSerializer).serializeToString(this.root[0][0]),p+="</svg>"}};var DomainPosition=function(){"use strict";this.positions=d3.map()};DomainPosition.prototype.getPosition=function(t){"use strict";return this.positions.get(t)},DomainPosition.prototype.getPositionFromIndex=function(t){"use strict";var e=this.getKeys();return this.positions.get(e[t])},DomainPosition.prototype.getLast=function(){"use strict";var t=this.getKeys();return this.positions.get(t[t.length-1])},DomainPosition.prototype.setPosition=function(t,e){"use strict";this.positions.set(t,e)},DomainPosition.prototype.shiftRightBy=function(t){"use strict";this.positions.forEach(function(e,n){this.set(e,n-t)});var e=this.getKeys();this.positions.remove(e[0])},DomainPosition.prototype.shiftLeftBy=function(t){"use strict";this.positions.forEach(function(e,n){this.set(e,n+t)});var e=this.getKeys();this.positions.remove(e[e.length-1])},DomainPosition.prototype.getKeys=function(){"use strict";return this.positions.keys().sort(function(t,e){return parseInt(t,10)-parseInt(e,10)})};var Legend=function(t){"use strict";this.calendar=t,this.computeDim(),null!==t.options.legendColors&&this.buildColors()};Legend.prototype.computeDim=function(){"use strict";var t=this.calendar.options;this.dim={width:t.legendCellSize*(t.legend.length+1)+t.legendCellPadding*t.legend.length,height:t.legendCellSize}},Legend.prototype.remove=function(){"use strict";this.calendar.root.select(".graph-legend").remove(),this.calendar.resize()},Legend.prototype.redraw=function(t){"use strict";function e(t){t.attr("width",l.legendCellSize).attr("height",l.legendCellSize).attr("x",function(t,e){return e*(l.legendCellSize+l.legendCellPadding)})}function n(){switch(l.legendHorizontalPosition){case"right":return"center"===l.legendVerticalPosition||"middle"===l.legendVerticalPosition?t+l.legendMargin[3]:t-o.getDim("width")-l.legendMargin[1];case"middle":case"center":return Math.round(t/2-o.getDim("width")/2);default:return l.legendMargin[3]}}function i(){return"bottom"===l.legendVerticalPosition?s.graphDim.height+l.legendMargin[0]-l.domainGutter-l.cellPadding:l.legendMargin[0]}if(!this.calendar.options.displayLegend)return!1;var r,o=this,s=this.calendar,a=s.root,l=s.options;this.computeDim();var c=l.legend.slice(0);c.push(c[c.length-1]+1);var h=s.root.select(".graph-legend");null!==h[0][0]?(a=h,r=a.select("g").selectAll("rect").data(c)):(a="top"===l.legendVerticalPosition?a.insert("svg",".graph"):a.append("svg"),a.attr("x",n()).attr("y",i()),r=a.attr("class","graph-legend").attr("height",o.getDim("height")).attr("width",o.getDim("width")).append("g").selectAll().data(c)),r.enter().append("rect").call(e).attr("class",function(t){return s.Legend.getClass(t,null===s.legendScale)}).attr("fill-opacity",0).call(function(t){null!==s.legendScale&&null!==l.legendColors&&l.legendColors.hasOwnProperty("base")&&t.attr("fill",l.legendColors.base)}).append("title"),r.exit().transition().duration(l.animationDuration).attr("fill-opacity",0).remove(),r.transition().delay(function(t,e){return l.animationDuration*e/10}).call(e).attr("fill-opacity",1).call(function(t){t.attr("fill",function(t,e){return null===s.legendScale?"":0===e?s.legendScale(t-1):s.legendScale(l.legend[e-1])}),t.attr("class",function(t){return s.Legend.getClass(t,null===s.legendScale)})}),r.select("title").text(function(t,e){return 0===e?l.legendTitleFormat.lower.format({min:l.legend[e],name:l.itemName[1]}):e===c.length-1?l.legendTitleFormat.upper.format({max:l.legend[e-1],name:l.itemName[1]}):l.legendTitleFormat.inner.format({down:l.legend[e-1],up:l.legend[e],name:l.itemName[1]})}),a.transition().duration(l.animationDuration).attr("x",n()).attr("y",i()).attr("width",o.getDim("width")).attr("height",o.getDim("height")),a.select("g").transition().duration(l.animationDuration).attr("transform",function(){return"vertical"===l.legendOrientation?"rotate(90 "+l.legendCellSize/2+" "+l.legendCellSize/2+")":""}),s.resize()},Legend.prototype.getDim=function(t){"use strict";var e="horizontal"===this.calendar.options.legendOrientation;switch(t){case"width":return this.dim[e?"width":"height"];case"height":return this.dim[e?"height":"width"]}},Legend.prototype.buildColors=function(){"use strict";var t=this.calendar.options;if(null===t.legendColors)return this.calendar.legendScale=null,!1;var e=[];if(Array.isArray(t.legendColors))e=t.legendColors;else{if(!t.legendColors.hasOwnProperty("min")||!t.legendColors.hasOwnProperty("max"))return t.legendColors=null,!1;e=[t.legendColors.min,t.legendColors.max]}var n=t.legend.slice(0);n[0]>0?n.unshift(0):n[0]<0&&n.unshift(n[0]-(n[n.length-1]-n[0])/n.length);var i=d3.scale.linear().range(e).interpolate(d3.interpolateHcl).domain([d3.min(n),d3.max(n)]),r=n.map(function(t){return i(t)});return this.calendar.legendScale=d3.scale.threshold().domain(t.legend).range(r),!0},Legend.prototype.getClass=function(t,e){"use strict";if(null===t||isNaN(t))return"";for(var n=[this.calendar.options.legend.length+1],i=0,r=this.calendar.options.legend.length-1;r>=i;i++){if(this.calendar.options.legend[0]>0&&0>t){n=["1","i"];break}if(t<=this.calendar.options.legend[i]){n=[i+1];break}}return 0===t&&n.push(0),n.unshift(""),(n.join(" r")+(e?n.join(" q"):"")).trim()},String.prototype.format=function(){"use strict";var t=this;for(var e in arguments[0])if(arguments[0].hasOwnProperty(e)){var n=new RegExp("\\{"+e+"\\}","gi");t=t.replace(n,arguments[0][e])}return t},"function"==typeof define&&define.amd?define(["d3"],function(){"use strict";return CalHeatMap}):"object"==typeof module&&module.exports?module.exports=CalHeatMap:window.CalHeatMap=CalHeatMap,function(){var t,e,n,i,r,o,s,a,l,c,h,u,d,f,p,g,m,v,y,w,b,x,C,A,E,k,F,_,D,S,$,T,B,M,L,R,I,P,N,O,j,z,H,W,U,q,Y,G,V,K,X,Z,Q,J,tt,et,nt=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},it=function(t,e){function n(){this.constructor=t}for(var i in e)rt.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},rt={}.hasOwnProperty,ot=[].slice,st=function(t,e){return function(){return t.apply(e,arguments)}};M={},d=10,Z=!1,N=null,y=null,T=null,z=null,et=null,i={BEFORE_CHANGE:"page:before-change",FETCH:"page:fetch",RECEIVE:"page:receive",CHANGE:"page:change",UPDATE:"page:update",LOAD:"page:load",RESTORE:"page:restore",BEFORE_UNLOAD:"page:before-unload",EXPIRE:"page:expire"},A=function(t){var e;return t=new n(t),Y(),u(),null!=N&&N.start(),Z&&(e=Q(t.absolute))?(E(e),k(t,null,!1)):k(t,K)},Q=function(t){var e;return e=M[t],e&&!e.transitionCacheDisabled?e:void 0},b=function(t){return null==t&&(t=!0),Z=t},w=function(t){return null==t&&(t=!0),c?t?null!=N?N:N=new o("html"):(null!=N&&N.uninstall(),N=null):void 0},k=function(t,e,n){return null==n&&(n=!0),J(i.FETCH,{url:t.absolute}),null!=et&&et.abort(),et=new XMLHttpRequest,et.open("GET",t.withoutHashForIE10compatibility(),!0),et.setRequestHeader("Accept","text/html, application/xhtml+xml, application/xml"),et.setRequestHeader("X-XHR-Referer",z),et.onload=function(){var n;return J(i.RECEIVE,{url:t.absolute}),(n=P())?(H(t),W(),f.apply(null,C(n)),B(),"function"==typeof e&&e(),J(i.LOAD)):document.location.href=v()||t.absolute},N&&n&&(et.onprogress=function(t){return function(t){var e;return e=t.lengthComputable?t.loaded/t.total*100:N.value+(100-N.value)/10,N.advanceTo(e)}}(this)),et.onloadend=function(){return et=null},et.onerror=function(){return document.location.href=t.absolute},et.send()},E=function(t){return null!=et&&et.abort(),f(t.title,t.body),O(t),J(i.RESTORE)},u=function(){var t;return t=new n(y.url),M[t.absolute]={url:t.relative,body:document.body,title:document.title,positionY:window.pageYOffset,positionX:window.pageXOffset,cachedAt:(new Date).getTime(),transitionCacheDisabled:null!=document.querySelector("[data-no-transition-cache]")},g(d)},R=function(t){return null==t&&(t=d),/^[\d]+$/.test(t)?d=parseInt(t):void 0},g=function(t){var e,n,r,o,s,a;for(s=Object.keys(M),e=s.map(function(t){return M[t].cachedAt}).sort(function(t,e){return e-t}),a=[],n=0,o=s.length;o>n;n++)r=s[n],M[r].cachedAt<=e[t]&&(J(i.EXPIRE,M[r]),a.push(delete M[r]));return a},f=function(e,n,r,o){return J(i.BEFORE_UNLOAD),document.title=e,document.documentElement.replaceChild(n,document.body),null!=r&&t.update(r),X(),o&&x(),y=window.history.state,null!=N&&N.done(),J(i.CHANGE),J(i.UPDATE)},x=function(){var t,e,n,i,r,o,s,a,l,c,h,u;for(u=Array.prototype.slice.call(document.body.querySelectorAll('script:not([data-turbolinks-eval="false"])')),n=0,r=u.length;r>n;n++)if(h=u[n],""===(l=h.type)||"text/javascript"===l){for(e=document.createElement("script"),c=h.attributes,i=0,o=c.length;o>i;i++)t=c[i],e.setAttribute(t.name,t.value);h.hasAttribute("async")||(e.async=!1),e.appendChild(document.createTextNode(h.innerHTML)),a=h.parentNode,s=h.nextSibling,a.removeChild(h),a.insertBefore(e,s)}},G=function(t){return t.innerHTML=t.innerHTML.replace(/<noscript[\S\s]*?<\/noscript>/gi,""),t},X=function(){var t,e;return t=(e=document.querySelectorAll("input[autofocus], textarea[autofocus]"))[e.length-1],t&&document.activeElement!==t?t.focus():void 0},H=function(t){return(t=new n(t)).absolute!==z?window.history.pushState({turbolinks:!0,url:t.absolute},"",t.absolute):void 0},W=function(){var t,e;return(t=et.getResponseHeader("X-XHR-Redirected-To"))?(t=new n(t),e=t.hasNoHash()?document.location.hash:"",window.history.replaceState(window.history.state,"",t.href+e)):void 0},v=function(){var t;return null!=(t=et.getResponseHeader("Location"))&&new n(t).crossOrigin()?t:void 0},Y=function(){return z=document.location.href},q=function(){return window.history.replaceState({turbolinks:!0,url:document.location.href},"",document.location.href)},U=function(){return y=window.history.state},B=function(){var t;return navigator.userAgent.match(/Firefox/)&&!(t=new n).hasNoHash()?(window.history.replaceState(y,"",t.withoutHash()),document.location.hash=t.hash):void 0},O=function(t){return window.scrollTo(t.positionX,t.positionY)},K=function(){return document.location.hash?document.location.href=document.location.href:window.scrollTo(0,0)},p=function(t){var e,n,i;if(null==t||"object"!=typeof t)return t;e=new t.constructor;for(n in t)i=t[n],e[n]=p(i);return e},I=function(t){var e,n;return n=(null!=(e=document.cookie.match(new RegExp(t+"=(\\w+)")))?e[1].toUpperCase():void 0)||"",document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/",n},J=function(t,e){var n;return"undefined"!=typeof Prototype&&Event.fire(document,t,e,!0),n=document.createEvent("Events"),e&&(n.data=e),n.initEvent(t,!0,!0),document.dispatchEvent(n)},L=function(t){return!J(i.BEFORE_CHANGE,{url:t})},P=function(){var t,e,n,i,r,o;return e=function(){var t;return 400<=(t=et.status)&&600>t},o=function(){var t;return null!=(t=et.getResponseHeader("Content-Type"))&&t.match(/^(?:text\/html|application\/xhtml\+xml|application\/xml)(?:;|$)/)},i=function(t){var e,n,i,r,o;for(r=t.querySelector("head").childNodes,o=[],e=0,n=r.length;n>e;e++)i=r[e],null!=("function"==typeof i.getAttribute?i.getAttribute("data-turbolinks-track"):void 0)&&o.push(i.getAttribute("src")||i.getAttribute("href"));return o},t=function(t){var e;return T||(T=i(document)),e=i(t),e.length!==T.length||r(e,T).length!==T.length},r=function(t,e){var n,i,r,o,s;for(t.length>e.length&&(r=[e,t],t=r[0],e=r[1]),o=[],n=0,i=t.length;i>n;n++)s=t[n],nt.call(e,s)>=0&&o.push(s);return o},!e()&&o()&&(n=m(et.responseText),n&&!t(n))?n:void 0},C=function(e){var n;return n=e.querySelector("title"),[null!=n?n.textContent:void 0,G(e.querySelector("body")),t.get(e).token,"runScripts"]},t={get:function(t){var e;return null==t&&(t=document),{node:e=t.querySelector('meta[name="csrf-token"]'),token:null!=e&&"function"==typeof e.getAttribute?e.getAttribute("content"):void 0}},update:function(t){var e;return e=this.get(),null!=e.token&&null!=t&&e.token!==t?e.node.setAttribute("content",t):void 0}},m=function(t){var e;return e=document.documentElement.cloneNode(),e.innerHTML=t,e.head=e.querySelector("head"),e.body=e.querySelector("body"),e},n=function(){function t(e){return this.original=null!=e?e:document.location.href,this.original.constructor===t?this.original:void this._parse()}return t.prototype.withoutHash=function(){return this.href.replace(this.hash,"").replace("#","")},t.prototype.withoutHashForIE10compatibility=function(){return this.withoutHash()},t.prototype.hasNoHash=function(){return 0===this.hash.length},t.prototype.crossOrigin=function(){return this.origin!==(new t).origin},t.prototype._parse=function(){var t;return(null!=this.link?this.link:this.link=document.createElement("a")).href=this.original,t=this.link,this.href=t.href,this.protocol=t.protocol,this.host=t.host,this.hostname=t.hostname,this.port=t.port,this.pathname=t.pathname,this.search=t.search,this.hash=t.hash,this.origin=[this.protocol,"//",this.hostname].join(""),0!==this.port.length&&(this.origin+=":"+this.port),this.relative=[this.pathname,this.search,this.hash].join(""),this.absolute=this.href},t}(),r=function(t){function e(t){return this.link=t,this.link.constructor===e?this.link:(this.original=this.link.href,this.originalElement=this.link,this.link=this.link.cloneNode(!1),void e.__super__.constructor.apply(this,arguments))}return it(e,t),e.HTML_EXTENSIONS=["html"],e.allowExtensions=function(){var t,n,i,r;for(n=1<=arguments.length?ot.call(arguments,0):[],i=0,r=n.length;r>i;i++)t=n[i],e.HTML_EXTENSIONS.push(t);return e.HTML_EXTENSIONS},e.prototype.shouldIgnore=function(){return this.crossOrigin()||this._anchored()||this._nonHtml()||this._optOut()||this._target()},e.prototype._anchored=function(){return(this.hash.length>0||"#"===this.href.charAt(this.href.length-1))&&this.withoutHash()===(new n).withoutHash()},e.prototype._nonHtml=function(){return this.pathname.match(/\.[a-z]+$/g)&&!this.pathname.match(new RegExp("\\.(?:"+e.HTML_EXTENSIONS.join("|")+")?$","g"))},e.prototype._optOut=function(){var t,e;for(e=this.originalElement;!t&&e!==document;)t=null!=e.getAttribute("data-no-turbolink"),e=e.parentNode;return t},e.prototype._target=function(){return 0!==this.link.target.length},e}(n),e=function(){function t(t){this.event=t,this.event.defaultPrevented||(this._extractLink(),this._validForTurbolinks()&&(L(this.link.absolute)||tt(this.link.href),this.event.preventDefault()))}return t.installHandlerLast=function(e){return e.defaultPrevented?void 0:(document.removeEventListener("click",t.handle,!1),document.addEventListener("click",t.handle,!1))},t.handle=function(e){return new t(e)},t.prototype._extractLink=function(){var t;for(t=this.event.target;t.parentNode&&"A"!==t.nodeName;)t=t.parentNode;return"A"===t.nodeName&&0!==t.href.length?this.link=new r(t):void 0},t.prototype._validForTurbolinks=function(){return null!=this.link&&!(this.link.shouldIgnore()||this._nonStandardClick())},t.prototype._nonStandardClick=function(){return this.event.which>1||this.event.metaKey||this.event.ctrlKey||this.event.shiftKey||this.event.altKey},t}(),o=function(){function t(t){this.elementSelector=t,this._trickle=st(this._trickle,this),this.value=0,this.content="",this.speed=300,this.opacity=.99,this.install()}var e;return e="turbolinks-progress-bar",t.prototype.install=function(){return this.element=document.querySelector(this.elementSelector),this.element.classList.add(e),this.styleElement=document.createElement("style"),document.head.appendChild(this.styleElement),this._updateStyle()},t.prototype.uninstall=function(){return this.element.classList.remove(e),document.head.removeChild(this.styleElement)},t.prototype.start=function(){return this.advanceTo(5)},t.prototype.advanceTo=function(t){var e;if(t>(e=this.value)&&100>=e){if(this.value=t,this._updateStyle(),100===this.value)return this._stopTrickle();if(this.value>0)return this._startTrickle()}},t.prototype.done=function(){return this.value>0?(this.advanceTo(100),this._reset()):void 0},t.prototype._reset=function(){var t;return t=this.opacity,setTimeout(function(t){return function(){return t.opacity=0,t._updateStyle()}}(this),this.speed/2),setTimeout(function(e){return function(){return e.value=0,e.opacity=t,e._withSpeed(0,function(){return e._updateStyle(!0)})}}(this),this.speed)},t.prototype._startTrickle=function(){return this.trickling?void 0:(this.trickling=!0,setTimeout(this._trickle,this.speed))},t.prototype._stopTrickle=function(){return delete this.trickling},t.prototype._trickle=function(){return this.trickling?(this.advanceTo(this.value+Math.random()/2),setTimeout(this._trickle,this.speed)):void 0},t.prototype._withSpeed=function(t,e){var n,i;return n=this.speed,this.speed=t,i=e(),this.speed=n,i},t.prototype._updateStyle=function(t){return null==t&&(t=!1),t&&this._changeContentToForceRepaint(),this.styleElement.textContent=this._createCSSRule()},t.prototype._changeContentToForceRepaint=function(){return this.content=""===this.content?" ":""},t.prototype._createCSSRule=function(){return this.elementSelector+"."+e+"::before {\n  content: '"+this.content+"';\n  position: fixed;\n  top: 0;\n  left: 0;\n  z-index: 2000;\n  background-color: #0076ff;\n  height: 3px;\n  opacity: "+this.opacity+";\n  width: "+this.value+"%;\n  transition: width "+this.speed+"ms ease-out, opacity "+this.speed/2+"ms ease-in;\n  transform: translate3d(0,0,0);\n}"},t}(),h=function(t){return setTimeout(t,500)},D=function(){return document.addEventListener("DOMContentLoaded",function(){return J(i.CHANGE),J(i.UPDATE)},!0)},$=function(){return"undefined"!=typeof jQuery?jQuery(document).on("ajaxSuccess",function(t,e,n){return jQuery.trim(e.responseText)?J(i.UPDATE):void 0}):void 0},S=function(t){var e,i;return(null!=(i=t.state)?i.turbolinks:void 0)?(e=M[new n(t.state.url).absolute])?(u(),E(e)):tt(t.target.location.href):void 0},_=function(){return q(),U(),document.addEventListener("click",e.installHandlerLast,!0),window.addEventListener("hashchange",function(t){return q(),U()},!1),h(function(){return window.addEventListener("popstate",S,!1)})},F=void 0!==window.history.state||navigator.userAgent.match(/Firefox\/2[6|7]/),l=window.history&&window.history.pushState&&window.history.replaceState&&F,s=!navigator.userAgent.match(/CriOS\//),V="GET"===(j=I("request_method"))||""===j,c=l&&s&&V,a=document.addEventListener&&document.createEvent,a&&(D(),$()),c?(tt=A,_()):tt=function(t){return document.location.href=t},this.Turbolinks={visit:tt,pagesCached:R,enableTransitionCache:b,enableProgressBar:w,allowLinkExtensions:r.allowExtensions,supported:c,EVENTS:p(i)}}.call(this),function(){this.Autosave=function(){function t(t,e){this.field=t,null!=e.join&&(e=e.join("/")),this.key="autosave/"+e,this.field.data("autosave",this),this.restore(),this.field.on("input",function(t){return function(){return t.save()}}(this))}return t.prototype.restore=function(){var t,e,n;if(null!=window.localStorage){try{n=window.localStorage.getItem(this.key)}catch(e){return void(t=e)}return(null!=n?n.length:void 0)>0&&this.field.val(n),this.field.trigger("input")}},t.prototype.save=function(){var t;if(null!=window.localStorage){if(t=this.field.val(),!((null!=t?t.length:void 0)>0))return this.reset();try{return window.localStorage.setItem(this.key,t)}catch(e){}}},t.prototype.reset=function(){if(null!=window.localStorage)try{return window.localStorage.removeItem(this.key)}catch(t){}},t}()}.call(this),/* ========================================================================
 * Bootstrap: affix.js v3.3.6
 * http://getbootstrap.com/javascript/#affix
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof e&&e;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof e&&r[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.6",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return n>r?"top":!1;if("bottom"==this.affixed)return null!=n?r+this.unpin<=o.top?!1:"bottom":t-i>=r+s?!1:"bottom";var a=null==this.affixed,l=a?r:o.top,c=a?s:e;return null!=n&&n>=r?"top":null!=i&&l+c>=t-i?"bottom":!1},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var a=this.getState(s,e,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-o})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),/* ========================================================================
 * Bootstrap: alert.js v3.3.6
 * http://getbootstrap.com/javascript/#alerts
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.6",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){s.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var s=t(o);e&&e.preventDefault(),s.length||(s=r.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var r=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=r,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),/* ========================================================================
 * Bootstrap: button.js v3.3.6
 * http://getbootstrap.com/javascript/#buttons
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.button"),o="object"==typeof e&&e;r||i.data("bs.button",r=new n(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.6",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();e+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(t.proxy(function(){i[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target);i.hasClass("btn")||(i=i.closest(".btn")),e.call(i,"toggle"),t(n.target).is('input[type="radio"]')||t(n.target).is('input[type="checkbox"]')||n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),/* ========================================================================
 * Bootstrap: collapse.js v3.3.6
 * http://getbootstrap.com/javascript/#collapse
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),r=n.data("bs.collapse"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||n.data("bs.collapse",r=new i(this,o)),"string"==typeof e&&r[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.6",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),e||r.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION):r.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var r=t(i);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=t(this);r.attr("data-target")||i.preventDefault();var o=e(r),s=o.data("bs.collapse"),a=s?"toggle":r.data();n.call(o,a)})}(jQuery),/* ========================================================================
 * Bootstrap: dropdown.js v3.3.6
 * http://getbootstrap.com/javascript/#dropdowns
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(r).remove(),t(o).each(function(){var i=t(this),r=e(i),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(r[0],n.target)||(r.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),r.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))}))}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new s(this)),"string"==typeof e&&i[e].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.6",s.prototype.toggle=function(i){var r=t(this);if(!r.is(".disabled, :disabled")){var o=e(r),s=o.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(o.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},s.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=e(i),s=r.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&r.find(o).trigger("focus"),i.trigger("click");var a=" li:not(.disabled):visible a",l=r.find(".dropdown-menu"+a);if(l.length){var c=l.index(n.target);38==n.which&&c>0&&c--,40==n.which&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=i,t.fn.dropdown.Constructor=s,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",o,s.prototype.toggle).on("keydown.bs.dropdown.data-api",o,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),/* ========================================================================
 * Bootstrap: modal.js v3.3.6
 * http://getbootstrap.com/javascript/#modals
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e,i){return this.each(function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},n.DEFAULTS,r.data(),"object"==typeof e&&e);o||r.data("bs.modal",o=new n(this,s)),"string"==typeof e?o[e](i):s.show&&o.show(i)})}var n=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.6",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var r=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});r?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=t(this),r=i.attr("href"),o=t(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(o,s,this)})}(jQuery),/* ========================================================================
 * Bootstrap: scrollspy.js v3.3.6
 * http://getbootstrap.com/javascript/#scrollspy
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new e(this,o)),"string"==typeof n&&r[n]()})}e.VERSION="3.3.6",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),r=e.data("target")||e.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return s!=(t=o[o.length-1])&&this.activate(t);if(s&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)s!=o[t]&&e>=r[t]&&(void 0===r[t+1]||e<r[t+1])&&this.activate(o[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);n.call(e,e.data())})})}(jQuery),/* ========================================================================
 * Bootstrap: tab.js v3.3.6
 * http://getbootstrap.com/javascript/#tabs
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof e&&r[e]()})}var n=function(e){this.element=t(e)};n.VERSION="3.3.6",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=e.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=n.find(".active:last a"),o=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),e.trigger(s),!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=t(i);this.activate(e.closest("li"),n),this.activate(a,a.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},n.prototype.activate=function(e,i,r){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var s=i.find("> .active"),a=r&&t.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),s.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var r=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),/* ========================================================================
 * Bootstrap: transition.js v3.3.6
 * http://getbootstrap.com/javascript/#transitions
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(r,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),/* ========================================================================
 * Bootstrap: tooltip.js v3.3.6
 * http://getbootstrap.com/javascript/#tooltip
 * Inspired by the original jQuery.tipsy by Jason Frame
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tooltip"),o="object"==typeof e&&e;(r||!/destroy|hide/.test(e))&&(r||i.data("bs.tooltip",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};n.VERSION="3.3.6",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),n.isInStateTrue()?void 0:(clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide())},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var r=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),u=o[0].offsetWidth,d=o[0].offsetHeight;if(c){var f=a,p=this.getPosition(this.$viewport);a="bottom"==a&&h.bottom+d>p.bottom?"top":"top"==a&&h.top-d<p.top?"bottom":"right"==a&&h.right+u>p.width?"left":"left"==a&&h.left-u<p.left?"right":a,o.removeClass(f).addClass(a)}var g=this.getCalculatedOffset(a,h,u,d);this.applyPlacement(g,a);var m=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",m).emulateTransitionEnd(n.TRANSITION_DURATION):m()}},n.prototype.applyPlacement=function(e,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=o&&(e.top=e.top+o-c);var h=this.getViewportAdjustedDelta(n,e,l,c);h.left?e.left+=h.left:e.top+=h.top;var u=/top|bottom/.test(n),d=u?2*h.left-r+l:2*h.top-o+c,f=u?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(d,i[0][f],u)},n.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},n.prototype.hide=function(e){function i(){"in"!=r.hoverState&&o.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),e&&e()}var r=this,o=t(this.$tip),s=t.Event("hide.bs."+this.type);return this.$element.trigger(s),s.isDefaultPrevented()?void 0:(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this)},n.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(e){e=e||this.$element;var n=e[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=i?{top:0,left:0}:e.offset(),s={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},a=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,s,a,o)},n.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},n.prototype.getViewportAdjustedDelta=function(t,e,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,l=e.top+o-s.scroll+i;a<s.top?r.top=s.top-a:l>s.top+s.height&&(r.top=s.top+s.height-l)}else{var c=e.left-o,h=e.left+o+n;c<s.left?r.left=s.left-c:h>s.right&&(r.left=s.left+s.width-h)}return r},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),/* ========================================================================
 * Bootstrap: popover.js v3.3.6
 * http://getbootstrap.com/javascript/#popovers
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.popover"),o="object"==typeof e&&e;(r||!/destroy|hide/.test(e))&&(r||i.data("bs.popover",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.6",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),/*
Copyright 2012 Igor Vaynberg

Version: 3.5.2 Timestamp: Sat Nov  1 14:43:36 EDT 2014

This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
use of this software only upon the condition that you accept all of the terms of either the Apache
License or the GPL License.

You may obtain a copy of the Apache License and the GPL License at:

    http://www.apache.org/licenses/LICENSE-2.0
    http://www.gnu.org/licenses/gpl-2.0.html

Unless required by applicable law or agreed to in writing, software distributed under the
Apache License or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
the specific language governing permissions and limitations under the Apache License and the GPL License.
*/
function(t){"undefined"==typeof t.fn.each2&&t.extend(t.fn,{each2:function(e){for(var n=t([0]),i=-1,r=this.length;++i<r&&(n.context=n[0]=this[i])&&e.call(n[0],i,n)!==!1;);return this}})}(jQuery),function(t,e){"use strict";function n(e){var n=t(document.createTextNode(""));e.before(n),n.before(e),n.remove()}function i(t){function e(t){return j[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function r(t,e){for(var n=0,i=e.length;i>n;n+=1)if(s(t,e[n]))return n;return-1}function o(){var e=t(O);e.appendTo(document.body);var n={width:e.width()-e[0].clientWidth,height:e.height()-e[0].clientHeight};return e.remove(),n}function s(t,n){return t===n?!0:t===e||n===e?!1:null===t||null===n?!1:t.constructor===String?t+""==n+"":n.constructor===String?n+""==t+"":!1}function a(t,e,n){var i,r,o;if(null===t||t.length<1)return[];for(i=t.split(e),r=0,o=i.length;o>r;r+=1)i[r]=n(i[r]);return i}function l(t){return t.outerWidth(!1)-t.width()}function c(n){var i="keyup-change-value";n.on("keydown",function(){t.data(n,i)===e&&t.data(n,i,n.val())}),n.on("keyup",function(){var r=t.data(n,i);r!==e&&n.val()!==r&&(t.removeData(n,i),n.trigger("keyup-change"))})}function h(n){n.on("mousemove",function(n){var i=P;(i===e||i.x!==n.pageX||i.y!==n.pageY)&&t(n.target).trigger("mousemove-filtered",n)})}function u(t,n,i){i=i||e;var r;return function(){var e=arguments;window.clearTimeout(r),r=window.setTimeout(function(){n.apply(i,e)},t)}}function d(t,e){var n=u(t,function(t){e.trigger("scroll-debounced",t)});e.on("scroll",function(t){r(t.target,e.get())>=0&&n(t)})}function f(t){t[0]!==document.activeElement&&window.setTimeout(function(){var e,n=t[0],i=t.val().length;t.focus();var r=n.offsetWidth>0||n.offsetHeight>0;r&&n===document.activeElement&&(n.setSelectionRange?n.setSelectionRange(i,i):n.createTextRange&&(e=n.createTextRange(),e.collapse(!1),e.select()))},0)}function p(e){e=t(e)[0];var n=0,i=0;if("selectionStart"in e)n=e.selectionStart,i=e.selectionEnd-n;else if("selection"in document){e.focus();var r=document.selection.createRange();i=document.selection.createRange().text.length,r.moveStart("character",-e.value.length),n=r.text.length-i}return{offset:n,length:i}}function g(t){t.preventDefault(),t.stopPropagation()}function m(t){t.preventDefault(),t.stopImmediatePropagation()}function v(e){if(!L){var n=e[0].currentStyle||window.getComputedStyle(e[0],null);L=t(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),L.attr("class","select2-sizer"),t(document.body).append(L)}return L.text(e.val()),L.width()}function y(e,n,i){var r,o,s=[];r=t.trim(e.attr("class")),r&&(r=""+r,t(r.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&s.push(this)})),r=t.trim(n.attr("class")),r&&(r=""+r,t(r.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=i(this),o&&s.push(o))})),e.attr("class",s.join(" "))}function w(t,e,n,r){var o=i(t.toUpperCase()).indexOf(i(e.toUpperCase())),s=e.length;return 0>o?void n.push(r(t)):(n.push(r(t.substring(0,o))),n.push("<span class='select2-match'>"),n.push(r(t.substring(o,o+s))),n.push("</span>"),void n.push(r(t.substring(o+s,t.length))))}function b(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})}function x(n){var i,r=null,o=n.quietMillis||100,s=n.url,a=this;return function(l){window.clearTimeout(i),i=window.setTimeout(function(){var i=n.data,o=s,c=n.transport||t.fn.select2.ajaxDefaults.transport,h={type:n.type||"GET",cache:n.cache||!1,jsonpCallback:n.jsonpCallback||e,dataType:n.dataType||"json"},u=t.extend({},t.fn.select2.ajaxDefaults.params,h);i=i?i.call(a,l.term,l.page,l.context):null,o="function"==typeof o?o.call(a,l.term,l.page,l.context):o,r&&"function"==typeof r.abort&&r.abort(),n.params&&(t.isFunction(n.params)?t.extend(u,n.params.call(a)):t.extend(u,n.params)),t.extend(u,{url:o,dataType:n.dataType,data:i,success:function(t){var e=n.results(t,l.page,l);l.callback(e)},error:function(t,e,n){var i={hasError:!0,jqXHR:t,textStatus:e,errorThrown:n};l.callback(i)}}),r=c.call(a,u)},o)}}function C(e){var n,i,r=e,o=function(t){return""+t.text};t.isArray(r)&&(i=r,r={results:i}),t.isFunction(r)===!1&&(i=r,r=function(){return i});var s=r();return s.text&&(o=s.text,t.isFunction(o)||(n=s.text,o=function(t){return t[n]})),function(e){var n,i=e.term,s={results:[]};return""===i?void e.callback(r()):(n=function(r,s){var a,l;if(r=r[0],r.children){a={};for(l in r)r.hasOwnProperty(l)&&(a[l]=r[l]);a.children=[],t(r.children).each2(function(t,e){n(e,a.children)}),(a.children.length||e.matcher(i,o(a),r))&&s.push(a)}else e.matcher(i,o(r),r)&&s.push(r)},t(r().results).each2(function(t,e){n(e,s.results)}),void e.callback(s))}}function A(n){var i=t.isFunction(n);return function(r){var o=r.term,s={results:[]},a=i?n(r):n;t.isArray(a)&&(t(a).each(function(){var t=this.text!==e,n=t?this.text:this;(""===o||r.matcher(o,n))&&s.results.push(t?this:{id:this,text:this})}),r.callback(s))}}function E(e,n){if(t.isFunction(e))return!0;if(!e)return!1;if("string"==typeof e)return!0;throw new Error(n+" must be a string, function, or falsy value")}function k(e,n){if(t.isFunction(e)){var i=Array.prototype.slice.call(arguments,2);return e.apply(n,i)}return e}function F(e){var n=0;return t.each(e,function(t,e){e.children?n+=F(e.children):n++}),n}function _(t,n,i,r){var o,a,l,c,h,u=t,d=!1;if(!r.createSearchChoice||!r.tokenSeparators||r.tokenSeparators.length<1)return e;for(;;){for(a=-1,l=0,c=r.tokenSeparators.length;c>l&&(h=r.tokenSeparators[l],a=t.indexOf(h),!(a>=0));l++);if(0>a)break;if(o=t.substring(0,a),t=t.substring(a+h.length),o.length>0&&(o=r.createSearchChoice.call(this,o,n),o!==e&&null!==o&&r.id(o)!==e&&null!==r.id(o))){for(d=!1,l=0,c=n.length;c>l;l++)if(s(r.id(o),r.id(n[l]))){d=!0;break}d||i(o)}}return u!==t?t:void 0}function D(){var e=this;t.each(arguments,function(t,n){e[n].remove(),e[n]=null})}function S(e,n){var i=function(){};return i.prototype=new e,i.prototype.constructor=i,i.prototype.parent=e.prototype,i.prototype=t.extend(i.prototype,n),i}if(window.Select2===e){var $,T,B,M,L,R,I,P={x:0,y:0},N={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(t){switch(t=t.which?t.which:t){case N.LEFT:case N.RIGHT:case N.UP:case N.DOWN:return!0}return!1},isControl:function(t){var e=t.which;switch(e){case N.SHIFT:case N.CTRL:case N.ALT:return!0}return t.metaKey?!0:!1},isFunctionKey:function(t){return t=t.which?t.which:t,t>=112&&123>=t}},O="<div class='select2-measure-scrollbar'></div>",j={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03c9":"\u03c9","\u03c2":"\u03c3"};R=t(document),M=function(){var t=1;return function(){return t++}}(),$=S(Object,{bind:function(t){var e=this;return function(){t.apply(e,arguments)}},init:function(n){var i,r,s=".select2-results";this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==e&&null!==n.element.data("select2")&&n.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=t(".select2-hidden-accessible"),0==this.liveRegion.length&&(this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body)),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+M()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",n.element.attr("title")),this.body=t(document.body),y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",n.element.attr("style")),this.container.css(k(n.containerCss,this.opts.element)),this.container.addClass(k(n.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",g),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(k(n.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",g),this.results=i=this.container.find(s),this.search=r=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",g),h(this.results),this.dropdown.on("mousemove-filtered",s,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",s,this.bind(function(t){this._touchEvent=!0,this.highlightUnderEvent(t)})),this.dropdown.on("touchmove",s,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",s,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(t){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),d(80,this.results),this.dropdown.on("scroll-debounced",s,this.bind(this.loadMoreIfNeeded)),t(this.container).on("change",".select2-input",function(t){t.stopPropagation()}),t(this.dropdown).on("change",".select2-input",function(t){t.stopPropagation()}),t.fn.mousewheel&&i.mousewheel(function(t,e,n,r){var o=i.scrollTop();r>0&&0>=o-r?(i.scrollTop(0),g(t)):0>r&&i.get(0).scrollHeight-i.scrollTop()+r<=i.height()&&(i.scrollTop(i.get(0).scrollHeight-i.height()),g(t))}),c(r),r.on("keyup-change input paste",this.bind(this.updateResults)),r.on("focus",function(){r.addClass("select2-focused")}),r.on("blur",function(){r.removeClass("select2-focused")}),this.dropdown.on("mouseup",s,this.bind(function(e){t(e.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(t){t.stopPropagation()}),this.nextSearchTerm=e,t.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==n.maximumInputLength&&this.search.attr("maxlength",n.maximumInputLength);var a=n.element.prop("disabled");a===e&&(a=!1),this.enable(!a);var l=n.element.prop("readonly");l===e&&(l=!1),this.readonly(l),I=I||o(),this.autofocus=n.element.prop("autofocus"),n.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",n.searchInputPlaceholder)},destroy:function(){var t=this.opts.element,n=t.data("select2"),i=this;this.close(),t.length&&t[0].detachEvent&&i._sync&&t.each(function(){i._sync&&this.detachEvent("onpropertychange",i._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,n!==e&&(n.container.remove(),n.liveRegion.remove(),n.dropdown.remove(),t.show().removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?t.attr({tabindex:this.elementTabIndex}):t.removeAttr("tabindex"),t.show()),D.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(t){return t.is("option")?{id:t.prop("value"),text:t.text(),element:t.get(),css:t.attr("class"),disabled:t.prop("disabled"),locked:s(t.attr("locked"),"locked")||s(t.data("locked"),!0)}:t.is("optgroup")?{text:t.attr("label"),children:[],element:t.get(),css:t.attr("class")}:void 0},prepareOpts:function(n){var i,r,o,l,c=this;if(i=n.element,"select"===i.get(0).tagName.toLowerCase()&&(this.select=r=n.element),r&&t.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=t.extend({},{populateResults:function(i,r,o){var s,a=this.opts.id,l=this.liveRegion;(s=function(i,r,h){var u,d,f,p,g,m,v,y,w,b;i=n.sortResults(i,r,o);var x=[];for(u=0,d=i.length;d>u;u+=1)f=i[u],g=f.disabled===!0,p=!g&&a(f)!==e,m=f.children&&f.children.length>0,v=t("<li></li>"),v.addClass("select2-results-dept-"+h),v.addClass("select2-result"),v.addClass(p?"select2-result-selectable":"select2-result-unselectable"),g&&v.addClass("select2-disabled"),m&&v.addClass("select2-result-with-children"),v.addClass(c.opts.formatResultCssClass(f)),v.attr("role","presentation"),y=t(document.createElement("div")),y.addClass("select2-result-label"),y.attr("id","select2-result-label-"+M()),y.attr("role","option"),b=n.formatResult(f,y,o,c.opts.escapeMarkup),b!==e&&(y.html(b),v.append(y)),m&&(w=t("<ul></ul>"),w.addClass("select2-result-sub"),s(f.children,w,h+1),v.append(w)),v.data("select2-data",f),x.push(v[0]);r.append(x),l.text(n.formatMatches(i.length))})(r,i,0)}},t.fn.select2.defaults,n),"function"!=typeof n.id&&(o=n.id,n.id=function(t){return t[o]}),t.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.data("select2Tags")}if(r?(n.query=this.bind(function(t){var n,r,o,s={results:[],more:!1},a=t.term;o=function(e,n){var i;e.is("option")?t.matcher(a,e.text(),e)&&n.push(c.optionToData(e)):e.is("optgroup")&&(i=c.optionToData(e),e.children().each2(function(t,e){o(e,i.children)}),i.children.length>0&&n.push(i))},n=i.children(),this.getPlaceholder()!==e&&n.length>0&&(r=this.getPlaceholderOption(),r&&(n=n.not(r))),n.each2(function(t,e){o(e,s.results)}),t.callback(s)}),n.id=function(t){return t.id}):"query"in n||("ajax"in n?(l=n.element.data("ajax-url"),l&&l.length>0&&(n.ajax.url=l),n.query=x.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=A(n.tags),n.createSearchChoice===e&&(n.createSearchChoice=function(e){return{id:t.trim(e),text:t.trim(e)}}),n.initSelection===e&&(n.initSelection=function(e,i){var r=[];t(a(e.val(),n.separator,n.transformVal)).each(function(){var e={id:this,text:this},i=n.tags;t.isFunction(i)&&(i=i()),t(i).each(function(){return s(this.id,e.id)?(e=this,!1):void 0}),r.push(e)}),i(r)}))),"function"!=typeof n.query)throw"query function not defined for Select2 "+n.element.attr("id");if("top"===n.createSearchChoicePosition)n.createSearchChoicePosition=function(t,e){t.unshift(e)};else if("bottom"===n.createSearchChoicePosition)n.createSearchChoicePosition=function(t,e){t.push(e)};else if("function"!=typeof n.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return n},monitorSource:function(){var n,i=this.opts.element,r=this;i.on("change.select2",this.bind(function(t){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),this._sync=this.bind(function(){var t=i.prop("disabled");t===e&&(t=!1),this.enable(!t);var n=i.prop("readonly");n===e&&(n=!1),this.readonly(n),this.container&&(y(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(k(this.opts.containerCssClass,this.opts.element))),this.dropdown&&(y(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(k(this.opts.dropdownCssClass,this.opts.element)))}),i.length&&i[0].attachEvent&&i.each(function(){this.attachEvent("onpropertychange",r._sync)}),n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,n!==e&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new n(function(e){t.each(e,r._sync)}),this.propertyObserver.observe(i.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(e){var n=t.Event("select2-selecting",{val:this.id(e),object:e,choice:e});return this.opts.element.trigger(n),!n.isDefaultPrevented()},triggerChange:function(e){e=e||{},e=t.extend({},e,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(e),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var t=this._enabled&&!this._readonly,e=!t;return t===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",e),this.close(),this.enabledInterface=t,!0)},enable:function(t){t===e&&(t=!0),this._enabled!==t&&(this._enabled=t,this.opts.element.prop("disabled",!t),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(t){t===e&&(t=!1),this._readonly!==t&&(this._readonly=t,this.opts.element.prop("readonly",t),this.enableInterface())},opened:function(){return this.container?this.container.hasClass("select2-dropdown-open"):!1},positionDropdown:function(){var e,n,i,r,o,s=this.dropdown,a=this.container,l=a.offset(),c=a.outerHeight(!1),h=a.outerWidth(!1),u=s.outerHeight(!1),d=t(window),f=d.width(),p=d.height(),g=d.scrollLeft()+f,m=d.scrollTop()+p,v=l.top+c,y=l.left,w=m>=v+u,b=l.top-u>=d.scrollTop(),x=s.outerWidth(!1),C=function(){return g>=y+x},A=function(){return l.left+g+a.outerWidth(!1)>x},E=s.hasClass("select2-drop-above");E?(n=!0,!b&&w&&(i=!0,n=!1)):(n=!1,!w&&b&&(i=!0,n=!0)),i&&(s.hide(),l=this.container.offset(),c=this.container.outerHeight(!1),h=this.container.outerWidth(!1),u=s.outerHeight(!1),g=d.scrollLeft()+f,m=d.scrollTop()+p,v=l.top+c,y=l.left,x=s.outerWidth(!1),s.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(o=t(".select2-results",s)[0],s.addClass("select2-drop-auto-width"),s.css("width",""),x=s.outerWidth(!1)+(o.scrollHeight===o.clientHeight?0:I.width),x>h?h=x:x=h,u=s.outerHeight(!1)):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(e=this.body.offset(),v-=e.top,y-=e.left),!C()&&A()&&(y=l.left+this.container.outerWidth(!1)-x),r={left:y,width:h},n?(r.top=l.top-u,r.bottom="auto",this.container.addClass("select2-drop-above"),s.addClass("select2-drop-above")):(r.top=v,r.bottom="auto",this.container.removeClass("select2-drop-above"),s.removeClass("select2-drop-above")),r=t.extend(r,k(this.opts.dropdownCss,this.opts.element)),s.css(r)},shouldOpen:function(){var e;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(e=t.Event("select2-opening"),this.opts.element.trigger(e),!e.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),R.on("mousemove.select2Event",function(t){P.x=t.pageX,P.y=t.pageY}),!0):!1},opening:function(){var e,i=this.containerEventName,r="scroll."+i,o="resize."+i,s="orientationchange."+i;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),e=t("#select2-drop-mask"),0===e.length&&(e=t(document.createElement("div")),e.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),e.hide(),e.appendTo(this.body),e.on("mousedown touchstart click",function(i){n(e);var r,o=t("#select2-drop");o.length>0&&(r=o.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close(),i.preventDefault(),i.stopPropagation())})),this.dropdown.prev()[0]!==e[0]&&this.dropdown.before(e),t("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),e.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var a=this;this.container.parents().add(window).each(function(){t(this).on(o+" "+r+" "+s,function(t){a.opened()&&a.positionDropdown()})})},close:function(){if(this.opened()){var e=this.containerEventName,n="scroll."+e,i="resize."+e,r="orientationchange."+e;this.container.parents().add(window).each(function(){t(this).off(n).off(i).off(r)}),this.clearDropdownAlignmentPreference(),t("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),R.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(t.Event("select2-close"))}},externalSearch:function(t){this.open(),this.search.val(t),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return k(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var e,n,i,r,o,s,a,l,c=this.results;if(n=this.highlight(),!(0>n)){if(0==n)return void c.scrollTop(0);e=this.findHighlightableChoices().find(".select2-result-label"),i=t(e[n]),l=(i.offset()||{}).top||0,r=l+i.outerHeight(!0),n===e.length-1&&(a=c.find("li.select2-more-results"),a.length>0&&(r=a.offset().top+a.outerHeight(!0))),o=c.offset().top+c.outerHeight(!1),r>o&&c.scrollTop(c.scrollTop()+(r-o)),s=l-c.offset().top,0>s&&"none"!=i.css("display")&&c.scrollTop(c.scrollTop()+s)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(e){for(var n=this.findHighlightableChoices(),i=this.highlight();i>-1&&i<n.length;){i+=e;var r=t(n[i]);if(r.hasClass("select2-result-selectable")&&!r.hasClass("select2-disabled")&&!r.hasClass("select2-selected")){this.highlight(i);break}}},highlight:function(e){var n,i,o=this.findHighlightableChoices();return 0===arguments.length?r(o.filter(".select2-highlighted")[0],o.get()):(e>=o.length&&(e=o.length-1),0>e&&(e=0),this.removeHighlight(),n=t(o[e]),n.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",n.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(n.text()),i=n.data("select2-data"),void(i&&this.opts.element.trigger({type:"select2-highlight",val:this.id(i),choice:i})))},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted");
},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(e){var n=t(e.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var i=this.findHighlightableChoices();this.highlight(i.index(n))}else 0==n.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var t,e=this.results,n=e.find("li.select2-more-results"),i=this.resultsPage+1,r=this,o=this.search.val(),s=this.context;0!==n.length&&(t=n.offset().top-e.offset().top-e.height(),t<=this.opts.loadMorePadding&&(n.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:s,matcher:this.opts.matcher,callback:this.bind(function(t){r.opened()&&(r.opts.populateResults.call(this,e,t.results,{term:o,page:i,context:s}),r.postprocessResults(t,!1,!1),t.more===!0?(n.detach().appendTo(e).html(r.opts.escapeMarkup(k(r.opts.formatLoadMore,r.opts.element,i+1))),window.setTimeout(function(){r.loadMoreIfNeeded()},10)):n.remove(),r.positionDropdown(),r.resultsPage=i,r.context=t.context,this.opts.element.trigger({type:"select2-loaded",items:t}))})})))},tokenize:function(){},updateResults:function(n){function i(){c.removeClass("select2-active"),d.positionDropdown(),h.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?d.liveRegion.text(h.text()):d.liveRegion.text(d.opts.formatMatches(h.find('.select2-result-selectable:not(".select2-selected")').length))}function r(t){h.html(t),i()}var o,a,l,c=this.search,h=this.results,u=this.opts,d=this,f=c.val(),p=t.data(this.container,"select2-last-term");if((n===!0||!p||!s(f,p))&&(t.data(this.container,"select2-last-term",f),n===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var g=this.getMaximumSelectionSize();if(g>=1&&(o=this.data(),t.isArray(o)&&o.length>=g&&E(u.formatSelectionTooBig,"formatSelectionTooBig")))return void r("<li class='select2-selection-limit'>"+k(u.formatSelectionTooBig,u.element,g)+"</li>");if(c.val().length<u.minimumInputLength)return r(E(u.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+k(u.formatInputTooShort,u.element,c.val(),u.minimumInputLength)+"</li>":""),void(n&&this.showSearch&&this.showSearch(!0));if(u.maximumInputLength&&c.val().length>u.maximumInputLength)return void r(E(u.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+k(u.formatInputTooLong,u.element,c.val(),u.maximumInputLength)+"</li>":"");u.formatSearching&&0===this.findHighlightableChoices().length&&r("<li class='select2-searching'>"+k(u.formatSearching,u.element)+"</li>"),c.addClass("select2-active"),this.removeHighlight(),a=this.tokenize(),a!=e&&null!=a&&c.val(a),this.resultsPage=1,u.query({element:u.element,term:c.val(),page:this.resultsPage,context:null,matcher:u.matcher,callback:this.bind(function(o){var a;if(l==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(o.hasError!==e&&E(u.formatAjaxError,"formatAjaxError"))return void r("<li class='select2-ajax-error'>"+k(u.formatAjaxError,u.element,o.jqXHR,o.textStatus,o.errorThrown)+"</li>");if(this.context=o.context===e?null:o.context,this.opts.createSearchChoice&&""!==c.val()&&(a=this.opts.createSearchChoice.call(d,c.val(),o.results),a!==e&&null!==a&&d.id(a)!==e&&null!==d.id(a)&&0===t(o.results).filter(function(){return s(d.id(this),d.id(a))}).length&&this.opts.createSearchChoicePosition(o.results,a)),0===o.results.length&&E(u.formatNoMatches,"formatNoMatches"))return void r("<li class='select2-no-results'>"+k(u.formatNoMatches,u.element,c.val())+"</li>");h.empty(),d.opts.populateResults.call(this,h,o.results,{term:c.val(),page:this.resultsPage,context:null}),o.more===!0&&E(u.formatLoadMore,"formatLoadMore")&&(h.append("<li class='select2-more-results'>"+u.escapeMarkup(k(u.formatLoadMore,u.element,this.resultsPage))+"</li>"),window.setTimeout(function(){d.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),i(),this.opts.element.trigger({type:"select2-loaded",items:o})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){f(this.search)},selectHighlighted:function(t){if(this._touchMoved)return void this.clearTouchMoved();var e=this.highlight(),n=this.results.find(".select2-highlighted"),i=n.closest(".select2-result").data("select2-data");i?(this.highlight(e),this.onSelect(i,t)):t&&t.noFocus&&this.close()},getPlaceholder:function(){var t;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((t=this.getPlaceholderOption())!==e?t.text():e)},getPlaceholderOption:function(){if(this.select){var n=this.select.children("option").first();if(this.opts.placeholderOption!==e)return"first"===this.opts.placeholderOption&&n||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===t.trim(n.text())&&""===n.val())return n}},initContainerWidth:function(){function n(){var n,i,r,o,s,a;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(n=this.opts.element.attr("style"),n!==e)for(i=n.split(";"),o=0,s=i.length;s>o;o+=1)if(a=i[o].replace(/\s/g,""),r=a.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==r&&r.length>=1)return r[1];return"resolve"===this.opts.width?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return t.isFunction(this.opts.width)?this.opts.width():this.opts.width}var i=n.call(this);null!==i&&this.container.css("width",i)}}),T=S($,{createContainer:function(){var e=t(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>","   <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>","   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>","   <div class='select2-search'>","       <label for='' class='select2-offscreen'></label>","       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'","       aria-autocomplete='list' />","   </div>","   <ul class='select2-results' role='listbox'>","   </ul>","</div>"].join(""));return e},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var n,i,r;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),n=this.search.get(0),n.createTextRange?(i=n.createTextRange(),i.collapse(!1),i.select()):n.setSelectionRange&&(r=this.search.val().length,n.setSelectionRange(r,r))),""===this.search.val()&&this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){t("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),D.call(this,"selection","focusser")},initContainer:function(){var e,i,r=this.container,o=this.dropdown,s=M();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=e=r.find(".select2-choice"),this.focusser=r.find(".select2-focusser"),e.find(".select2-chosen").attr("id","select2-chosen-"+s),this.focusser.attr("aria-labelledby","select2-chosen-"+s),this.results.attr("id","select2-results-"+s),this.search.attr("aria-owns","select2-results-"+s),this.focusser.attr("id","s2id_autogen"+s),i=t("label[for='"+this.opts.element.attr("id")+"']"),this.opts.element.focus(this.bind(function(){this.focus()})),this.focusser.prev().text(i.text()).attr("for",this.focusser.attr("id"));var a=this.opts.element.attr("title");this.opts.element.attr("title",a||i.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(t("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&229!=t.keyCode){if(t.which===N.PAGE_UP||t.which===N.PAGE_DOWN)return void g(t);switch(t.which){case N.UP:case N.DOWN:return this.moveHighlight(t.which===N.UP?-1:1),void g(t);case N.ENTER:return this.selectHighlighted(),void g(t);case N.TAB:return void this.selectHighlighted({noFocus:!0});case N.ESC:return this.cancel(t),void g(t)}}})),this.search.on("blur",this.bind(function(t){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()&&t.which!==N.TAB&&!N.isControl(t)&&!N.isFunctionKey(t)&&t.which!==N.ESC){if(this.opts.openOnEnter===!1&&t.which===N.ENTER)return void g(t);if(t.which==N.DOWN||t.which==N.UP||t.which==N.ENTER&&this.opts.openOnEnter){if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return;return this.open(),void g(t)}return t.which==N.DELETE||t.which==N.BACKSPACE?(this.opts.allowClear&&this.clear(),void g(t)):void 0}})),c(this.focusser),this.focusser.on("keyup-change input",this.bind(function(t){if(this.opts.minimumResultsForSearch>=0){if(t.stopPropagation(),this.opened())return;this.open()}})),e.on("mousedown touchstart","abbr",this.bind(function(t){this.isInterfaceEnabled()&&(this.clear(),m(t),this.close(),this.selection&&this.selection.focus())})),e.on("mousedown touchstart",this.bind(function(i){n(e),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),g(i)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),e.on("focus",this.bind(function(t){g(t)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(t.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.hide(),this.setPlaceholder()},clear:function(e){var n=this.selection.data("select2-data");if(n){var i=t.Event("select2-clearing");if(this.opts.element.trigger(i),i.isDefaultPrevented())return;var r=this.getPlaceholderOption();this.opts.element.val(r?r.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),e!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(n),choice:n}),this.triggerChange({removed:n}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var t=this;this.opts.initSelection.call(null,this.opts.element,function(n){n!==e&&null!==n&&(t.updateSelection(n),t.close(),t.setPlaceholder(),t.nextSearchTerm=t.opts.nextSearchTerm(n,t.search.val()))})}},isPlaceholderOptionSelected:function(){var t;return this.getPlaceholder()===e?!1:(t=this.getPlaceholderOption())!==e&&t.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===e||null===this.opts.element.val()},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),n=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var i=t.find("option").filter(function(){return this.selected&&!this.disabled});e(n.optionToData(i))}:"data"in e&&(e.initSelection=e.initSelection||function(n,i){var r=n.val(),o=null;e.query({matcher:function(t,n,i){var a=s(r,e.id(i));return a&&(o=i),a},callback:t.isFunction(i)?function(){i(o)}:t.noop})}),e},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===e?e:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var t=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&t!==e){if(this.select&&this.getPlaceholderOption()===e)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(t)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(t,e,n){var i=0,r=this;if(this.findHighlightableChoices().each2(function(t,e){return s(r.id(e.data("select2-data")),r.opts.element.val())?(i=t,!1):void 0}),n!==!1&&(e===!0&&i>=0?this.highlight(i):this.highlight(0)),e===!0){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(F(t.results)>=o)}},showSearch:function(e){this.showSearchInput!==e&&(this.showSearchInput=e,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!e),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!e),t(this.dropdown,this.container).toggleClass("select2-with-searchbox",e))},onSelect:function(t,e){if(this.triggerSelect(t)){var n=this.opts.element.val(),i=this.data();this.opts.element.val(this.id(t)),this.updateSelection(t),this.opts.element.trigger({type:"select2-selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.close(),e&&e.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),s(n,this.id(t))||this.triggerChange({added:t,removed:i})}},updateSelection:function(t){var n,i,r=this.selection.find(".select2-chosen");this.selection.data("select2-data",t),r.empty(),null!==t&&(n=this.opts.formatSelection(t,r,this.opts.escapeMarkup)),n!==e&&r.append(n),i=this.opts.formatSelectionCssClass(t,r),i!==e&&r.addClass(i),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==e&&this.container.addClass("select2-allowclear")},val:function(){var t,n=!1,i=null,r=this,o=this.data();if(0===arguments.length)return this.opts.element.val();if(t=arguments[0],arguments.length>1&&(n=arguments[1]),this.select)this.select.val(t).find("option").filter(function(){return this.selected}).each2(function(t,e){return i=r.optionToData(e),!1}),this.updateSelection(i),this.setPlaceholder(),n&&this.triggerChange({added:i,removed:o});else{if(!t&&0!==t)return void this.clear(n);if(this.opts.initSelection===e)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(t),this.opts.initSelection(this.opts.element,function(t){r.opts.element.val(t?r.id(t):""),r.updateSelection(t),r.setPlaceholder(),n&&r.triggerChange({added:t,removed:o})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(t){var n,i=!1;return 0===arguments.length?(n=this.selection.data("select2-data"),n==e&&(n=null),n):(arguments.length>1&&(i=arguments[1]),void(t?(n=this.data(),this.opts.element.val(t?this.id(t):""),this.updateSelection(t),i&&this.triggerChange({added:t,removed:n})):this.clear(i)))}}),B=S($,{createContainer:function(){var e=t(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>","  <li class='select2-search-field'>","    <label for='' class='select2-offscreen'></label>","    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>","  </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>","   <ul class='select2-results'>","   </ul>","</div>"].join(""));return e},prepareOpts:function(){var e=this.parent.prepareOpts.apply(this,arguments),n=this;return"select"===e.element.get(0).tagName.toLowerCase()?e.initSelection=function(t,e){var i=[];t.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(t,e){i.push(n.optionToData(e))}),e(i)}:"data"in e&&(e.initSelection=e.initSelection||function(n,i){var r=a(n.val(),e.separator,e.transformVal),o=[];e.query({matcher:function(n,i,a){var l=t.grep(r,function(t){return s(t,e.id(a))}).length;return l&&o.push(a),l},callback:t.isFunction(i)?function(){for(var t=[],n=0;n<r.length;n++)for(var a=r[n],l=0;l<o.length;l++){var c=o[l];if(s(a,e.id(c))){t.push(c),o.splice(l,1);break}}i(t)}:t.noop})}),e},selectChoice:function(t){var e=this.container.find(".select2-search-choice-focus");e.length&&t&&t[0]==e[0]||(e.length&&this.opts.element.trigger("choice-deselected",e),e.removeClass("select2-search-choice-focus"),t&&t.length&&(this.close(),t.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",t)))},destroy:function(){t("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),D.call(this,"searchContainer","selection")},initContainer:function(){var e,n=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=e=this.container.find(n);var i=this;this.selection.on("click",".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)",function(e){i.search[0].focus(),i.selectChoice(t(this))}),this.search.attr("id","s2id_autogen"+M()),this.search.prev().text(t("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.opts.element.focus(this.bind(function(){this.focus()})),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(t){if(this.isInterfaceEnabled()){++this.keydowns;var n=e.find(".select2-search-choice-focus"),i=n.prev(".select2-search-choice:not(.select2-locked)"),r=n.next(".select2-search-choice:not(.select2-locked)"),o=p(this.search);if(n.length&&(t.which==N.LEFT||t.which==N.RIGHT||t.which==N.BACKSPACE||t.which==N.DELETE||t.which==N.ENTER)){var s=n;return t.which==N.LEFT&&i.length?s=i:t.which==N.RIGHT?s=r.length?r:null:t.which===N.BACKSPACE?this.unselect(n.first())&&(this.search.width(10),s=i.length?i:r):t.which==N.DELETE?this.unselect(n.first())&&(this.search.width(10),s=r.length?r:null):t.which==N.ENTER&&(s=null),this.selectChoice(s),g(t),void(s&&s.length||this.open())}if((t.which===N.BACKSPACE&&1==this.keydowns||t.which==N.LEFT)&&0==o.offset&&!o.length)return this.selectChoice(e.find(".select2-search-choice:not(.select2-locked)").last()),void g(t);if(this.selectChoice(null),this.opened())switch(t.which){case N.UP:case N.DOWN:return this.moveHighlight(t.which===N.UP?-1:1),void g(t);case N.ENTER:return this.selectHighlighted(),void g(t);case N.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case N.ESC:return this.cancel(t),void g(t)}if(t.which!==N.TAB&&!N.isControl(t)&&!N.isFunctionKey(t)&&t.which!==N.BACKSPACE&&t.which!==N.ESC){if(t.which===N.ENTER){if(this.opts.openOnEnter===!1)return;if(t.altKey||t.ctrlKey||t.shiftKey||t.metaKey)return}this.open(),(t.which===N.PAGE_UP||t.which===N.PAGE_DOWN)&&g(t),t.which===N.ENTER&&g(t)}}})),this.search.on("keyup",this.bind(function(t){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),e.stopImmediatePropagation(),this.opts.element.trigger(t.Event("select2-blur"))})),this.container.on("click",n,this.bind(function(e){this.isInterfaceEnabled()&&(t(e.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on("focus",n,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(t.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.hide(),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var t=this;this.opts.initSelection.call(null,this.opts.element,function(n){n!==e&&null!==n&&(t.updateSelection(n),t.close(),t.clearSearch())})}},clearSearch:function(){var t=this.getPlaceholder(),n=this.getMaxSearchWidth();t!==e&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(t).addClass("select2-default"),this.search.width(n>0?n:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(t.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(e){var n=[],i=[],o=this;t(e).each(function(){r(o.id(this),n)<0&&(n.push(o.id(this)),i.push(this))}),e=i,this.selection.find(".select2-search-choice").remove(),t(e).each(function(){o.addSelectedChoice(this)}),o.postprocessResults()},tokenize:function(){var t=this.search.val();t=this.opts.tokenizer.call(this,t,this.data(),this.bind(this.onSelect),this.opts),null!=t&&t!=e&&(this.search.val(t),t.length>0&&this.open())},onSelect:function(t,n){this.triggerSelect(t)&&""!==t.text&&(this.addSelectedChoice(t),this.opts.element.trigger({type:"selected",val:this.id(t),choice:t}),this.nextSearchTerm=this.opts.nextSearchTerm(t,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(t,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=e&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:t}),n&&n.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var i,r,o=!n.locked,s=t("<li class='select2-search-choice'>    <div></div>    <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),a=t("<li class='select2-search-choice select2-locked'><div></div></li>"),l=o?s:a,c=this.id(n),h=this.getVal();i=this.opts.formatSelection(n,l.find("div"),this.opts.escapeMarkup),i!=e&&l.find("div").replaceWith(t("<div></div>").html(i)),r=this.opts.formatSelectionCssClass(n,l.find("div")),r!=e&&l.addClass(r),o&&l.find(".select2-search-choice-close").on("mousedown",g).on("click dblclick",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect(t(e.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),g(e),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),l.data("select2-data",n),l.insertBefore(this.searchContainer),h.push(c),this.setVal(h)},unselect:function(e){var n,i,o=this.getVal();if(e=e.closest(".select2-search-choice"),0===e.length)throw"Invalid argument: "+e+". Must be .select2-search-choice";if(n=e.data("select2-data")){var s=t.Event("select2-removing");if(s.val=this.id(n),s.choice=n,this.opts.element.trigger(s),s.isDefaultPrevented())return!1;for(;(i=r(this.id(n),o))>=0;)o.splice(i,1),this.setVal(o),this.select&&this.postprocessResults();return e.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(n),choice:n}),this.triggerChange({removed:n}),!0}},postprocessResults:function(t,e,n){var i=this.getVal(),o=this.results.find(".select2-result"),s=this.results.find(".select2-result-with-children"),a=this;o.each2(function(t,e){var n=a.id(e.data("select2-data"));r(n,i)>=0&&(e.addClass("select2-selected"),e.find(".select2-result-selectable").addClass("select2-selected"))}),s.each2(function(t,e){e.is(".select2-result-selectable")||0!==e.find(".select2-result-selectable:not(.select2-selected)").length||e.addClass("select2-selected")}),-1==this.highlight()&&n!==!1&&this.opts.closeOnSelect===!0&&a.highlight(0),!this.opts.createSearchChoice&&!o.filter(".select2-result:not(.select2-selected)").length>0&&(!t||t&&!t.more&&0===this.results.find(".select2-no-results").length)&&E(a.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+k(a.opts.formatNoMatches,a.opts.element,a.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-l(this.search)},resizeSearch:function(){var t,e,n,i,r,o=l(this.search);t=v(this.search)+10,e=this.search.offset().left,n=this.selection.width(),i=this.selection.offset().left,r=n-(e-i)-o,t>r&&(r=n-o),40>r&&(r=n-o),0>=r&&(r=t),this.search.width(Math.floor(r))},getVal:function(){var t;return this.select?(t=this.select.val(),null===t?[]:t):(t=this.opts.element.val(),a(t,this.opts.separator,this.opts.transformVal))},setVal:function(e){var n;this.select?this.select.val(e):(n=[],t(e).each(function(){r(this,n)<0&&n.push(this)}),this.opts.element.val(0===n.length?"":n.join(this.opts.separator)))},buildChangeDetails:function(t,e){for(var e=e.slice(0),t=t.slice(0),n=0;n<e.length;n++)for(var i=0;i<t.length;i++)s(this.opts.id(e[n]),this.opts.id(t[i]))&&(e.splice(n,1),n>0&&n--,t.splice(i,1),i--);return{added:e,removed:t}},val:function(n,i){var r,o=this;if(0===arguments.length)return this.getVal();if(r=this.data(),r.length||(r=[]),!n&&0!==n)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(i&&this.triggerChange({added:this.data(),removed:r}));if(this.setVal(n),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),i&&this.triggerChange(this.buildChangeDetails(r,this.data()));else{if(this.opts.initSelection===e)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(e){var n=t.map(e,o.id);o.setVal(n),o.updateSelection(e),o.clearSearch(),i&&o.triggerChange(o.buildChangeDetails(r,o.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var e=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){e.push(n.opts.id(t(this).data("select2-data")))}),this.setVal(e),this.triggerChange()},data:function(e,n){var i,r,o=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return t(this).data("select2-data")}).get():(r=this.data(),e||(e=[]),i=t.map(e,function(t){return o.opts.id(t)}),this.setVal(i),this.updateSelection(e),this.clearSearch(),n&&this.triggerChange(this.buildChangeDetails(r,this.data())),void 0)}}),t.fn.select2=function(){var n,i,o,s,a,l=Array.prototype.slice.call(arguments,0),c=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],h=["opened","isFocused","container","dropdown"],u=["val","data"],d={search:"externalSearch"};return this.each(function(){if(0===l.length||"object"==typeof l[0])n=0===l.length?{}:t.extend({},l[0]),n.element=t(this),"select"===n.element.get(0).tagName.toLowerCase()?a=n.element.prop("multiple"):(a=n.multiple||!1,"tags"in n&&(n.multiple=a=!0)),i=a?new window.Select2["class"].multi:new window.Select2["class"].single,i.init(n);else{if("string"!=typeof l[0])throw"Invalid arguments to select2 plugin: "+l;if(r(l[0],c)<0)throw"Unknown method: "+l[0];if(s=e,i=t(this).data("select2"),i===e)return;if(o=l[0],"container"===o?s=i.container:"dropdown"===o?s=i.dropdown:(d[o]&&(o=d[o]),s=i[o].apply(i,l.slice(1))),r(l[0],h)>=0||r(l[0],u)>=0&&1==l.length)return!1}}),s===e?this:s},t.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(t,e,n,i){var r=[];return w(this.text(t),n.term,r,i),r.join("")},transformVal:function(e){return t.trim(e)},formatSelection:function(t,n,i){return t?i(this.text(t)):e},sortResults:function(t,e,n){return t},formatResultCssClass:function(t){return t.css},formatSelectionCssClass:function(t,n){return e},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(t){return t==e?null:t.id},text:function(e){return e&&this.data&&this.data.text?t.isFunction(this.data.text)?this.data.text(e):e[this.data.text]:e.text},matcher:function(t,e){return i(""+e).toUpperCase().indexOf(i(""+t).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:_,escapeMarkup:b,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(t){return t},adaptDropdownCssClass:function(t){return null},nextSearchTerm:function(t,n){return e},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(t){var e="ontouchstart"in window||navigator.msMaxTouchPoints>0;return e&&t.opts.minimumResultsForSearch<0?!1:!0}},t.fn.select2.locales=[],t.fn.select2.locales.en={formatMatches:function(t){return 1===t?"One result is available, press enter to select it.":t+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(t,e,n){return"Loading failed"},formatInputTooShort:function(t,e){var n=e-t.length;return"Please enter "+n+" or more character"+(1==n?"":"s")},formatInputTooLong:function(t,e){var n=t.length-e;return"Please delete "+n+" character"+(1==n?"":"s")},formatSelectionTooBig:function(t){return"You can only select "+t+" item"+(1==t?"":"s")},formatLoadMore:function(t){return"Loading more results\u2026"},formatSearching:function(){return"Searching\u2026"}},t.extend(t.fn.select2.defaults,t.fn.select2.locales.en),t.fn.select2.ajaxDefaults={transport:t.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:x,local:C,tags:A},util:{debounce:u,markMatch:w,escapeMarkup:b,stripDiacritics:i},"class":{"abstract":$,single:T,multi:B}}}}(jQuery),
// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com)    │ \\
// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com)              │ \\
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
function(t){var e,n,i="0.4.2",r="hasOwnProperty",o=/[\.\/]/,s="*",a=function(){},l=function(t,e){return t-e},c={n:{}},h=function(t,i){t=String(t);var r,o=n,s=Array.prototype.slice.call(arguments,2),a=h.listeners(t),c=0,u=[],d={},f=[],p=e;e=t,n=0;for(var g=0,m=a.length;m>g;g++)"zIndex"in a[g]&&(u.push(a[g].zIndex),a[g].zIndex<0&&(d[a[g].zIndex]=a[g]));for(u.sort(l);u[c]<0;)if(r=d[u[c++]],f.push(r.apply(i,s)),n)return n=o,f;for(g=0;m>g;g++)if(r=a[g],"zIndex"in r)if(r.zIndex==u[c]){if(f.push(r.apply(i,s)),n)break;do if(c++,r=d[u[c]],r&&f.push(r.apply(i,s)),n)break;while(r)}else d[r.zIndex]=r;else if(f.push(r.apply(i,s)),n)break;return n=o,e=p,f.length?f:null};h._events=c,h.listeners=function(t){var e,n,i,r,a,l,h,u,d=t.split(o),f=c,p=[f],g=[];for(r=0,a=d.length;a>r;r++){for(u=[],l=0,h=p.length;h>l;l++)for(f=p[l].n,n=[f[d[r]],f[s]],i=2;i--;)e=n[i],e&&(u.push(e),g=g.concat(e.f||[]));p=u}return g},h.on=function(t,e){if(t=String(t),"function"!=typeof e)return function(){};for(var n=t.split(o),i=c,r=0,s=n.length;s>r;r++)i=i.n,i=i.hasOwnProperty(n[r])&&i[n[r]]||(i[n[r]]={n:{}});for(i.f=i.f||[],r=0,s=i.f.length;s>r;r++)if(i.f[r]==e)return a;return i.f.push(e),function(t){+t==+t&&(e.zIndex=+t)}},h.f=function(t){var e=[].slice.call(arguments,1);return function(){h.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},h.stop=function(){n=1},h.nt=function(t){return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},h.nts=function(){return e.split(o)},h.off=h.unbind=function(t,e){if(!t)return void(h._events=c={n:{}});var n,i,a,l,u,d,f,p=t.split(o),g=[c];for(l=0,u=p.length;u>l;l++)for(d=0;d<g.length;d+=a.length-2){if(a=[d,1],n=g[d].n,p[l]!=s)n[p[l]]&&a.push(n[p[l]]);else for(i in n)n[r](i)&&a.push(n[i]);g.splice.apply(g,a)}for(l=0,u=g.length;u>l;l++)for(n=g[l];n.n;){if(e){if(n.f){for(d=0,f=n.f.length;f>d;d++)if(n.f[d]==e){n.f.splice(d,1);break}!n.f.length&&delete n.f}for(i in n.n)if(n.n[r](i)&&n.n[i].f){var m=n.n[i].f;for(d=0,f=m.length;f>d;d++)if(m[d]==e){m.splice(d,1);break}!m.length&&delete n.n[i].f}}else{delete n.f;for(i in n.n)n.n[r](i)&&n.n[i].f&&delete n.n[i].f}n=n.n}},h.once=function(t,e){var n=function(){return h.unbind(t,n),e.apply(this,arguments)};return h.on(t,n)},h.version=i,h.toString=function(){return"You are running Eve "+i},"undefined"!=typeof module&&module.exports?module.exports=h:"undefined"!=typeof define?define("eve",[],function(){return h}):t.eve=h}(this),
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com)   │ \\
// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com)             │ \\
function(t,e){"function"==typeof define&&define.amd?define(["eve"],function(n){return e(t,n)}):e(t,t.eve)}(this,function(t,e){function n(t){if(n.is(t,"function"))return b?t():e.on("raphael.DOMload",t);if(n.is(t,G))return n._engine.create[S](n,t.splice(0,3+n.is(t[0],q))).add(t);var i=Array.prototype.slice.call(arguments,0);if(n.is(i[i.length-1],"function")){var r=i.pop();return b?r.call(n._engine.create[S](n,i)):e.on("raphael.DOMload",function(){r.call(n._engine.create[S](n,i))})}return n._engine.create[S](n,arguments)}function i(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[k](n)&&(e[n]=i(t[n]));return e}function r(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return t.push(t.splice(n,1)[0])}function o(t,e,n){function i(){var o=Array.prototype.slice.call(arguments,0),s=o.join("\u2400"),a=i.cache=i.cache||{},l=i.count=i.count||[];return a[k](s)?(r(l,s),n?n(a[s]):a[s]):(l.length>=1e3&&delete a[l.shift()],l.push(s),a[s]=t[S](e,o),n?n(a[s]):a[s])}return i}function s(){return this.hex}function a(t,e){for(var n=[],i=0,r=t.length;r-2*!e>i;i+=2){var o=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?r-4==i?o[3]={x:+t[0],y:+t[1]}:r-2==i&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4==i?o[3]=o[2]:i||(o[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return n}function l(t,e,n,i,r){var o=-3*e+9*n-9*i+3*r,s=t*o+6*e-12*n+6*i;return t*s-3*e+3*n}function c(t,e,n,i,r,o,s,a,c){null==c&&(c=1),c=c>1?1:0>c?0:c;for(var h=c/2,u=12,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,g=0;u>g;g++){var m=h*d[g]+h,v=l(m,t,n,r,s),y=l(m,e,i,o,a),w=v*v+y*y;p+=f[g]*O.sqrt(w)}return h*p}function h(t,e,n,i,r,o,s,a,l){if(!(0>l||c(t,e,n,i,r,o,s,a)<l)){var h,u=1,d=u/2,f=u-d,p=.01;for(h=c(t,e,n,i,r,o,s,a,f);H(h-l)>p;)d/=2,f+=(l>h?1:-1)*d,h=c(t,e,n,i,r,o,s,a,f);return f}}function u(t,e,n,i,r,o,s,a){if(!(j(t,n)<z(r,s)||z(t,n)>j(r,s)||j(e,i)<z(o,a)||z(e,i)>j(o,a))){var l=(t*i-e*n)*(r-s)-(t-n)*(r*a-o*s),c=(t*i-e*n)*(o-a)-(e-i)*(r*a-o*s),h=(t-n)*(o-a)-(e-i)*(r-s);if(h){var u=l/h,d=c/h,f=+u.toFixed(2),p=+d.toFixed(2);if(!(f<+z(t,n).toFixed(2)||f>+j(t,n).toFixed(2)||f<+z(r,s).toFixed(2)||f>+j(r,s).toFixed(2)||p<+z(e,i).toFixed(2)||p>+j(e,i).toFixed(2)||p<+z(o,a).toFixed(2)||p>+j(o,a).toFixed(2)))return{x:u,y:d}}}}function d(t,e,i){var r=n.bezierBBox(t),o=n.bezierBBox(e);if(!n.isBBoxIntersect(r,o))return i?0:[];for(var s=c.apply(0,t),a=c.apply(0,e),l=j(~~(s/5),1),h=j(~~(a/5),1),d=[],f=[],p={},g=i?0:[],m=0;l+1>m;m++){var v=n.findDotsAtSegment.apply(n,t.concat(m/l));d.push({x:v.x,y:v.y,t:m/l})}for(m=0;h+1>m;m++)v=n.findDotsAtSegment.apply(n,e.concat(m/h)),f.push({x:v.x,y:v.y,t:m/h});for(m=0;l>m;m++)for(var y=0;h>y;y++){var w=d[m],b=d[m+1],x=f[y],C=f[y+1],A=H(b.x-w.x)<.001?"y":"x",E=H(C.x-x.x)<.001?"y":"x",k=u(w.x,w.y,b.x,b.y,x.x,x.y,C.x,C.y);if(k){if(p[k.x.toFixed(4)]==k.y.toFixed(4))continue;p[k.x.toFixed(4)]=k.y.toFixed(4);var F=w.t+H((k[A]-w[A])/(b[A]-w[A]))*(b.t-w.t),_=x.t+H((k[E]-x[E])/(C[E]-x[E]))*(C.t-x.t);F>=0&&1.001>=F&&_>=0&&1.001>=_&&(i?g++:g.push({x:k.x,y:k.y,t1:z(F,1),t2:z(_,1)}))}}return g}function f(t,e,i){t=n._path2curve(t),e=n._path2curve(e);for(var r,o,s,a,l,c,h,u,f,p,g=i?0:[],m=0,v=t.length;v>m;m++){var y=t[m];if("M"==y[0])r=l=y[1],o=c=y[2];else{"C"==y[0]?(f=[r,o].concat(y.slice(1)),r=f[6],o=f[7]):(f=[r,o,r,o,l,c,l,c],r=l,o=c);for(var w=0,b=e.length;b>w;w++){var x=e[w];if("M"==x[0])s=h=x[1],a=u=x[2];else{"C"==x[0]?(p=[s,a].concat(x.slice(1)),s=p[6],a=p[7]):(p=[s,a,s,a,h,u,h,u],s=h,a=u);var C=d(f,p,i);if(i)g+=C;else{for(var A=0,E=C.length;E>A;A++)C[A].segment1=m,C[A].segment2=w,C[A].bez1=f,C[A].bez2=p;g=g.concat(C)}}}}}return g}function p(t,e,n,i,r,o){null!=t?(this.a=+t,this.b=+e,this.c=+n,this.d=+i,this.e=+r,this.f=+o):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function g(){return this.x+M+this.y+M+this.width+" \xd7 "+this.height}function m(t,e,n,i,r,o){function s(t){return((u*t+h)*t+c)*t}function a(t,e){var n=l(t,e);return((p*n+f)*n+d)*n}function l(t,e){var n,i,r,o,a,l;for(r=t,l=0;8>l;l++){if(o=s(r)-t,H(o)<e)return r;if(a=(3*u*r+2*h)*r+c,H(a)<1e-6)break;r-=o/a}if(n=0,i=1,r=t,n>r)return n;if(r>i)return i;for(;i>n;){if(o=s(r),H(o-t)<e)return r;t>o?n=r:i=r,r=(i-n)/2+n}return r}var c=3*e,h=3*(i-e)-c,u=1-c-h,d=3*n,f=3*(r-n)-d,p=1-d-f;return a(t,1/(200*o))}function v(t,e){var n=[],i={};if(this.ms=e,this.times=1,t){for(var r in t)t[k](r)&&(i[J(r)]=t[r],n.push(J(r)));n.sort(ut)}this.anim=i,this.top=n[n.length-1],this.percents=n}function y(t,i,r,o,s,a){r=J(r);var l,c,h,u,d,f,g=t.ms,v={},y={},w={};if(o)for(x=0,A=le.length;A>x;x++){var b=le[x];if(b.el.id==i.id&&b.anim==t){b.percent!=r?(le.splice(x,1),h=1):c=b,i.attr(b.totalOrigin);break}}else o=+y;for(var x=0,A=t.percents.length;A>x;x++){if(t.percents[x]==r||t.percents[x]>o*t.top){r=t.percents[x],d=t.percents[x-1]||0,g=g/t.top*(r-d),u=t.percents[x+1],l=t.anim[r];break}o&&i.attr(t.anim[t.percents[x]])}if(l){if(c)c.initstatus=o,c.start=new Date-c.ms*o;else{for(var E in l)if(l[k](E)&&(it[k](E)||i.paper.customAttributes[k](E)))switch(v[E]=i.attr(E),null==v[E]&&(v[E]=nt[E]),y[E]=l[E],it[E]){case q:w[E]=(y[E]-v[E])/g;break;case"colour":v[E]=n.getRGB(v[E]);var F=n.getRGB(y[E]);w[E]={r:(F.r-v[E].r)/g,g:(F.g-v[E].g)/g,b:(F.b-v[E].b)/g};break;case"path":var _=It(v[E],y[E]),D=_[1];for(v[E]=_[0],w[E]=[],x=0,A=v[E].length;A>x;x++){w[E][x]=[0];for(var S=1,T=v[E][x].length;T>S;S++)w[E][x][S]=(D[x][S]-v[E][x][S])/g}break;case"transform":var B=i._,M=zt(B[E],y[E]);if(M)for(v[E]=M.from,y[E]=M.to,w[E]=[],w[E].real=!0,x=0,A=v[E].length;A>x;x++)for(w[E][x]=[v[E][x][0]],S=1,T=v[E][x].length;T>S;S++)w[E][x][S]=(y[E][x][S]-v[E][x][S])/g;else{var I=i.matrix||new p,P={_:{transform:B.transform},getBBox:function(){return i.getBBox(1)}};v[E]=[I.a,I.b,I.c,I.d,I.e,I.f],Ot(P,y[E]),y[E]=P._.transform,w[E]=[(P.matrix.a-I.a)/g,(P.matrix.b-I.b)/g,(P.matrix.c-I.c)/g,(P.matrix.d-I.d)/g,(P.matrix.e-I.e)/g,(P.matrix.f-I.f)/g]}break;case"csv":var N=L(l[E])[R](C),O=L(v[E])[R](C);if("clip-rect"==E)for(v[E]=O,w[E]=[],x=O.length;x--;)w[E][x]=(N[x]-v[E][x])/g;y[E]=N;break;default:for(N=[][$](l[E]),O=[][$](v[E]),w[E]=[],x=i.paper.customAttributes[E].length;x--;)w[E][x]=((N[x]||0)-(O[x]||0))/g}var j=l.easing,z=n.easing_formulas[j];if(!z)if(z=L(j).match(Z),z&&5==z.length){var H=z;z=function(t){return m(t,+H[1],+H[2],+H[3],+H[4],g)}}else z=ft;if(f=l.start||t.start||+new Date,b={anim:t,percent:r,timestamp:f,start:f+(t.del||0),status:0,initstatus:o||0,stop:!1,ms:g,easing:z,from:v,diff:w,to:y,el:i,callback:l.callback,prev:d,next:u,repeat:a||t.times,origin:i.attr(),totalOrigin:s},le.push(b),o&&!c&&!h&&(b.stop=!0,b.start=new Date-g*o,1==le.length))return he();h&&(b.start=new Date-b.ms*o),1==le.length&&ce(he)}e("raphael.anim.start."+i.id,i,t)}}function w(t){for(var e=0;e<le.length;e++)le[e].el.paper==t&&le.splice(e--,1)}n.version="2.1.2",n.eve=e;var b,x,C=/[, ]+/,A={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},E=/\{(\d+)\}/g,k="hasOwnProperty",F={doc:document,win:t},_={was:Object.prototype[k].call(F.win,"Raphael"),is:F.win.Raphael},D=function(){this.ca=this.customAttributes={}},S="apply",$="concat",T="ontouchstart"in F.win||F.win.DocumentTouch&&F.doc instanceof DocumentTouch,B="",M=" ",L=String,R="split",I="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[R](M),P={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},N=L.prototype.toLowerCase,O=Math,j=O.max,z=O.min,H=O.abs,W=O.pow,U=O.PI,q="number",Y="string",G="array",V=Object.prototype.toString,K=(n._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),X={NaN:1,Infinity:1,"-Infinity":1},Z=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Q=O.round,J=parseFloat,tt=parseInt,et=L.prototype.toUpperCase,nt=n._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},it=n._availableAnimAttrs={blur:q,"clip-rect":"csv",cx:q,cy:q,fill:"colour","fill-opacity":q,"font-size":q,height:q,opacity:q,path:"path",r:q,rx:q,ry:q,stroke:"colour","stroke-opacity":q,"stroke-width":q,transform:"transform",width:q,x:q,y:q},rt=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,ot={hs:1,rg:1},st=/,?([achlmqrstvxz]),?/gi,at=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,lt=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,ct=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,ht=(n._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),ut=function(t,e){return J(t)-J(e)},dt=function(){},ft=function(t){return t},pt=n._rectPath=function(t,e,n,i,r){return r?[["M",t+r,e],["l",n-2*r,0],["a",r,r,0,0,1,r,r],["l",0,i-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-n,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-i],["a",r,r,0,0,1,r,-r],["z"]]:[["M",t,e],["l",n,0],["l",0,i],["l",-n,0],["z"]]},gt=function(t,e,n,i){return null==i&&(i=n),[["M",t,e],["m",0,-i],["a",n,i,0,1,1,0,2*i],["a",n,i,0,1,1,0,-2*i],["z"]]},mt=n._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return gt(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return gt(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return pt(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return pt(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return pt(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return pt(e.x,e.y,e.width,e.height)}},vt=n.mapPath=function(t,e){if(!e)return t;var n,i,r,o,s,a,l;for(t=It(t),r=0,s=t.length;s>r;r++)for(l=t[r],o=1,a=l.length;a>o;o+=2)n=e.x(l[o],l[o+1]),i=e.y(l[o],l[o+1]),l[o]=n,l[o+1]=i;return t};if(n._g=F,n.type=F.win.SVGAngle||F.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==n.type){var yt,wt=F.doc.createElement("div");if(wt.innerHTML='<v:shape adj="1"/>',yt=wt.firstChild,yt.style.behavior="url(#default#VML)",!yt||"object"!=typeof yt.adj)return n.type=B;wt=null}n.svg=!(n.vml="VML"==n.type),n._Paper=D,n.fn=x=D.prototype=n.prototype,n._id=0,n._oid=0,n.is=function(t,e){return e=N.call(e),"finite"==e?!X[k](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||V.call(t).slice(8,-1).toLowerCase()==e},n.angle=function(t,e,i,r,o,s){if(null==o){var a=t-i,l=e-r;return a||l?(180+180*O.atan2(-l,-a)/U+360)%360:0}return n.angle(t,e,o,s)-n.angle(i,r,o,s)},n.rad=function(t){return t%360*U/180},n.deg=function(t){return 180*t/U%360},n.snapTo=function(t,e,i){if(i=n.is(i,"finite")?i:10,n.is(t,G)){for(var r=t.length;r--;)if(H(t[r]-e)<=i)return t[r]}else{t=+t;var o=e%t;if(i>o)return e-o;if(o>t-i)return e-o+t}return e};n.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*O.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});n.setWindow=function(t){e("raphael.setWindow",n,F.win,t),F.win=t,F.doc=F.win.document,n._engine.initWin&&n._engine.initWin(F.win)};var bt=function(t){if(n.vml){var e,i=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write("<body>"),r.close(),e=r.body}catch(s){e=createPopup().document.body}var a=e.createTextRange();bt=o(function(t){try{e.style.color=L(t).replace(i,B);var n=a.queryCommandValue("ForeColor");return n=(255&n)<<16|65280&n|(16711680&n)>>>16,"#"+("000000"+n.toString(16)).slice(-6)}catch(r){return"none"}})}else{var l=F.doc.createElement("i");l.title="Rapha\xebl Colour Picker",l.style.display="none",F.doc.body.appendChild(l),bt=o(function(t){return l.style.color=t,F.doc.defaultView.getComputedStyle(l,B).getPropertyValue("color")})}return bt(t)},xt=function(){return"hsb("+[this.h,this.s,this.b]+")"},Ct=function(){return"hsl("+[this.h,this.s,this.l]+")"},At=function(){return this.hex},Et=function(t,e,i){if(null==e&&n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,e=t.g,t=t.r),null==e&&n.is(t,Y)){var r=n.getRGB(t);t=r.r,e=r.g,i=r.b}return(t>1||e>1||i>1)&&(t/=255,e/=255,i/=255),[t,e,i]},kt=function(t,e,i,r){t*=255,e*=255,i*=255;var o={r:t,g:e,b:i,hex:n.rgb(t,e,i),toString:At};return n.is(r,"finite")&&(o.opacity=r),o};n.color=function(t){var e;return n.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=n.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):n.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=n.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):(n.is(t,"string")&&(t=n.getRGB(t)),n.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(e=n.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=n.rgb2hsb(t),t.v=e.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=At,t},n.hsb2rgb=function(t,e,n,i){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,t=t.h,i=t.o),t*=360;var r,o,s,a,l;return t=t%360/60,l=n*e,a=l*(1-H(t%2-1)),r=o=s=n-l,t=~~t,r+=[l,a,0,0,a,l][t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],kt(r,o,s,i)},n.hsl2rgb=function(t,e,n,i){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var r,o,s,a,l;return t=t%360/60,l=2*e*(.5>n?n:1-n),a=l*(1-H(t%2-1)),r=o=s=n-l/2,t=~~t,r+=[l,a,0,0,a,l][t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],kt(r,o,s,i)},n.rgb2hsb=function(t,e,n){n=Et(t,e,n),t=n[0],e=n[1],n=n[2];var i,r,o,s;return o=j(t,e,n),s=o-z(t,e,n),i=0==s?null:o==t?(e-n)/s:o==e?(n-t)/s+2:(t-e)/s+4,i=(i+360)%6*60/360,r=0==s?0:s/o,{h:i,s:r,b:o,toString:xt}},n.rgb2hsl=function(t,e,n){n=Et(t,e,n),t=n[0],e=n[1],n=n[2];var i,r,o,s,a,l;return s=j(t,e,n),a=z(t,e,n),l=s-a,i=0==l?null:s==t?(e-n)/l:s==e?(n-t)/l+2:(t-e)/l+4,i=(i+360)%6*60/360,o=(s+a)/2,r=0==l?0:.5>o?l/(2*o):l/(2-2*o),{h:i,s:r,l:o,toString:Ct}},n._path2string=function(){return this.join(",").replace(st,"$1")};n._preload=function(t,e){var n=F.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,F.doc.body.removeChild(this)},n.onerror=function(){F.doc.body.removeChild(this)},F.doc.body.appendChild(n),n.src=t};n.getRGB=o(function(t){if(!t||(t=L(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:s};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:s};!(ot[k](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=bt(t));var e,i,r,o,a,l,c=t.match(K);return c?(c[2]&&(r=tt(c[2].substring(5),16),i=tt(c[2].substring(3,5),16),e=tt(c[2].substring(1,3),16)),c[3]&&(r=tt((a=c[3].charAt(3))+a,16),i=tt((a=c[3].charAt(2))+a,16),e=tt((a=c[3].charAt(1))+a,16)),c[4]&&(l=c[4][R](rt),e=J(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=J(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),r=J(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(o=J(l[3])),l[3]&&"%"==l[3].slice(-1)&&(o/=100)),c[5]?(l=c[5][R](rt),e=J(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=J(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),r=J(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),("deg"==l[0].slice(-3)||"\xb0"==l[0].slice(-1))&&(e/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(o=J(l[3])),l[3]&&"%"==l[3].slice(-1)&&(o/=100),n.hsb2rgb(e,i,r,o)):c[6]?(l=c[6][R](rt),e=J(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),i=J(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),r=J(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),("deg"==l[0].slice(-3)||"\xb0"==l[0].slice(-1))&&(e/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(o=J(l[3])),l[3]&&"%"==l[3].slice(-1)&&(o/=100),n.hsl2rgb(e,i,r,o)):(c={r:e,g:i,b:r,toString:s},c.hex="#"+(16777216|r|i<<8|e<<16).toString(16).slice(1),n.is(o,"finite")&&(c.opacity=o),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:s}},n),n.hsb=o(function(t,e,i){return n.hsb2rgb(t,e,i).hex}),n.hsl=o(function(t,e,i){return n.hsl2rgb(t,e,i).hex}),n.rgb=o(function(t,e,n){return"#"+(16777216|n|e<<8|t<<16).toString(16).slice(1)}),n.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},n.getColor.reset=function(){delete this.start},n.parsePathString=function(t){if(!t)return null;var e=Ft(t);if(e.arr)return Dt(e.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},r=[];return n.is(t,G)&&n.is(t[0],G)&&(r=Dt(t)),r.length||L(t).replace(at,function(t,e,n){var o=[],s=e.toLowerCase();if(n.replace(ct,function(t,e){e&&o.push(+e)}),"m"==s&&o.length>2&&(r.push([e][$](o.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)r.push([e][$](o));else for(;o.length>=i[s]&&(r.push([e][$](o.splice(0,i[s]))),i[s]););}),r.toString=n._path2string,e.arr=Dt(r),r},n.parseTransformString=o(function(t){if(!t)return null;var e=[];return n.is(t,G)&&n.is(t[0],G)&&(e=Dt(t)),e.length||L(t).replace(lt,function(t,n,i){var r=[];N.call(n);i.replace(ct,function(t,e){e&&r.push(+e)}),e.push([n][$](r))}),e.toString=n._path2string,e});var Ft=function(t){var e=Ft.ps=Ft.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[k](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};n.findDotsAtSegment=function(t,e,n,i,r,o,s,a,l){var c=1-l,h=W(c,3),u=W(c,2),d=l*l,f=d*l,p=h*t+3*u*l*n+3*c*l*l*r+f*s,g=h*e+3*u*l*i+3*c*l*l*o+f*a,m=t+2*l*(n-t)+d*(r-2*n+t),v=e+2*l*(i-e)+d*(o-2*i+e),y=n+2*l*(r-n)+d*(s-2*r+n),w=i+2*l*(o-i)+d*(a-2*o+i),b=c*t+l*n,x=c*e+l*i,C=c*r+l*s,A=c*o+l*a,E=90-180*O.atan2(m-y,v-w)/U;return(m>y||w>v)&&(E+=180),{x:p,y:g,m:{x:m,y:v},n:{x:y,y:w},start:{x:b,y:x},end:{x:C,y:A},alpha:E}},n.bezierBBox=function(t,e,i,r,o,s,a,l){n.is(t,"array")||(t=[t,e,i,r,o,s,a,l]);var c=Rt.apply(null,t);return{x:c.min.x,y:c.min.y,x2:c.max.x,y2:c.max.y,width:c.max.x-c.min.x,height:c.max.y-c.min.y}},n.isPointInsideBBox=function(t,e,n){return e>=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},n.isBBoxIntersect=function(t,e){var i=n.isPointInsideBBox;return i(e,t.x,t.y)||i(e,t.x2,t.y)||i(e,t.x,t.y2)||i(e,t.x2,t.y2)||i(t,e.x,e.y)||i(t,e.x2,e.y)||i(t,e.x,e.y2)||i(t,e.x2,e.y2)||(t.x<e.x2&&t.x>e.x||e.x<t.x2&&e.x>t.x)&&(t.y<e.y2&&t.y>e.y||e.y<t.y2&&e.y>t.y)},n.pathIntersection=function(t,e){return f(t,e)},n.pathIntersectionNumber=function(t,e){return f(t,e,1)},n.isPointInsidePath=function(t,e,i){var r=n.pathBBox(t);return n.isPointInsideBBox(r,e,i)&&f(t,[["M",e,i],["H",r.x2+10]],1)%2==1},n._removedFactory=function(t){return function(){e("raphael.log",null,"Rapha\xebl: you are calling to method \u201c"+t+"\u201d of removed object",t)}};var _t=n.pathBBox=function(t){var e=Ft(t);if(e.bbox)return i(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=It(t);for(var n,r=0,o=0,s=[],a=[],l=0,c=t.length;c>l;l++)if(n=t[l],"M"==n[0])r=n[1],o=n[2],s.push(r),a.push(o);else{var h=Rt(r,o,n[1],n[2],n[3],n[4],n[5],n[6]);s=s[$](h.min.x,h.max.x),a=a[$](h.min.y,h.max.y),r=n[5],o=n[6]}var u=z[S](0,s),d=z[S](0,a),f=j[S](0,s),p=j[S](0,a),g=f-u,m=p-d,v={x:u,y:d,x2:f,y2:p,width:g,height:m,cx:u+g/2,cy:d+m/2};return e.bbox=i(v),v},Dt=function(t){var e=i(t);return e.toString=n._path2string,e},St=n._pathToRelative=function(t){var e=Ft(t);if(e.rel)return Dt(e.rel);n.is(t,G)&&n.is(t&&t[0],G)||(t=n.parsePathString(t));var i=[],r=0,o=0,s=0,a=0,l=0;"M"==t[0][0]&&(r=t[0][1],o=t[0][2],s=r,a=o,l++,i.push(["M",r,o]));for(var c=l,h=t.length;h>c;c++){var u=i[c]=[],d=t[c];if(d[0]!=N.call(d[0]))switch(u[0]=N.call(d[0]),u[0]){case"a":u[1]=d[1],u[2]=d[2],u[3]=d[3],u[4]=d[4],u[5]=d[5],u[6]=+(d[6]-r).toFixed(3),u[7]=+(d[7]-o).toFixed(3);break;case"v":u[1]=+(d[1]-o).toFixed(3);break;case"m":s=d[1],a=d[2];default:for(var f=1,p=d.length;p>f;f++)u[f]=+(d[f]-(f%2?r:o)).toFixed(3)}else{u=i[c]=[],"m"==d[0]&&(s=d[1]+r,a=d[2]+o);for(var g=0,m=d.length;m>g;g++)i[c][g]=d[g]}var v=i[c].length;switch(i[c][0]){case"z":r=s,o=a;break;case"h":r+=+i[c][v-1];break;case"v":o+=+i[c][v-1];break;default:r+=+i[c][v-2],o+=+i[c][v-1]}}return i.toString=n._path2string,e.rel=Dt(i),i},$t=n._pathToAbsolute=function(t){var e=Ft(t);if(e.abs)return Dt(e.abs);if(n.is(t,G)&&n.is(t&&t[0],G)||(t=n.parsePathString(t)),!t||!t.length)return[["M",0,0]];var i=[],r=0,o=0,s=0,l=0,c=0;"M"==t[0][0]&&(r=+t[0][1],o=+t[0][2],s=r,l=o,c++,i[0]=["M",r,o]);for(var h,u,d=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),f=c,p=t.length;p>f;f++){if(i.push(h=[]),u=t[f],u[0]!=et.call(u[0]))switch(h[0]=et.call(u[0]),h[0]){case"A":h[1]=u[1],h[2]=u[2],h[3]=u[3],h[4]=u[4],h[5]=u[5],h[6]=+(u[6]+r),h[7]=+(u[7]+o);break;case"V":h[1]=+u[1]+o;break;case"H":h[1]=+u[1]+r;break;case"R":for(var g=[r,o][$](u.slice(1)),m=2,v=g.length;v>m;m++)g[m]=+g[m]+r,g[++m]=+g[m]+o;i.pop(),i=i[$](a(g,d));break;case"M":s=+u[1]+r,l=+u[2]+o;default:for(m=1,v=u.length;v>m;m++)h[m]=+u[m]+(m%2?r:o)}else if("R"==u[0])g=[r,o][$](u.slice(1)),i.pop(),i=i[$](a(g,d)),h=["R"][$](u.slice(-2));else for(var y=0,w=u.length;w>y;y++)h[y]=u[y];switch(h[0]){case"Z":r=s,o=l;break;case"H":r=h[1];break;case"V":o=h[1];break;case"M":s=h[h.length-2],l=h[h.length-1];default:r=h[h.length-2],o=h[h.length-1]}}return i.toString=n._path2string,e.abs=Dt(i),i},Tt=function(t,e,n,i){return[t,e,n,i,n,i]},Bt=function(t,e,n,i,r,o){var s=1/3,a=2/3;return[s*t+a*n,s*e+a*i,s*r+a*n,s*o+a*i,r,o]},Mt=function(t,e,n,i,r,s,a,l,c,h){var u,d=120*U/180,f=U/180*(+r||0),p=[],g=o(function(t,e,n){var i=t*O.cos(n)-e*O.sin(n),r=t*O.sin(n)+e*O.cos(n);return{x:i,y:r}});if(h)E=h[0],k=h[1],C=h[2],A=h[3];else{u=g(t,e,-f),t=u.x,e=u.y,u=g(l,c,-f),l=u.x,c=u.y;var m=(O.cos(U/180*r),O.sin(U/180*r),(t-l)/2),v=(e-c)/2,y=m*m/(n*n)+v*v/(i*i);y>1&&(y=O.sqrt(y),n=y*n,i=y*i);var w=n*n,b=i*i,x=(s==a?-1:1)*O.sqrt(H((w*b-w*v*v-b*m*m)/(w*v*v+b*m*m))),C=x*n*v/i+(t+l)/2,A=x*-i*m/n+(e+c)/2,E=O.asin(((e-A)/i).toFixed(9)),k=O.asin(((c-A)/i).toFixed(9));E=C>t?U-E:E,k=C>l?U-k:k,0>E&&(E=2*U+E),0>k&&(k=2*U+k),a&&E>k&&(E-=2*U),!a&&k>E&&(k-=2*U)}var F=k-E;if(H(F)>d){var _=k,D=l,S=c;k=E+d*(a&&k>E?1:-1),l=C+n*O.cos(k),c=A+i*O.sin(k),p=Mt(l,c,n,i,r,0,a,D,S,[k,_,C,A])}F=k-E;var T=O.cos(E),B=O.sin(E),M=O.cos(k),L=O.sin(k),I=O.tan(F/4),P=4/3*n*I,N=4/3*i*I,j=[t,e],z=[t+P*B,e-N*T],W=[l+P*L,c-N*M],q=[l,c];if(z[0]=2*j[0]-z[0],z[1]=2*j[1]-z[1],h)return[z,W,q][$](p);p=[z,W,q][$](p).join()[R](",");for(var Y=[],G=0,V=p.length;V>G;G++)Y[G]=G%2?g(p[G-1],p[G],f).y:g(p[G],p[G+1],f).x;return Y},Lt=function(t,e,n,i,r,o,s,a,l){var c=1-l;return{x:W(c,3)*t+3*W(c,2)*l*n+3*c*l*l*r+W(l,3)*s,y:W(c,3)*e+3*W(c,2)*l*i+3*c*l*l*o+W(l,3)*a}},Rt=o(function(t,e,n,i,r,o,s,a){var l,c=r-2*n+t-(s-2*r+n),h=2*(n-t)-2*(r-n),u=t-n,d=(-h+O.sqrt(h*h-4*c*u))/2/c,f=(-h-O.sqrt(h*h-4*c*u))/2/c,p=[e,a],g=[t,s];return H(d)>"1e12"&&(d=.5),H(f)>"1e12"&&(f=.5),d>0&&1>d&&(l=Lt(t,e,n,i,r,o,s,a,d),g.push(l.x),p.push(l.y)),f>0&&1>f&&(l=Lt(t,e,n,i,r,o,s,a,f),g.push(l.x),p.push(l.y)),c=o-2*i+e-(a-2*o+i),h=2*(i-e)-2*(o-i),u=e-i,d=(-h+O.sqrt(h*h-4*c*u))/2/c,f=(-h-O.sqrt(h*h-4*c*u))/2/c,H(d)>"1e12"&&(d=.5),H(f)>"1e12"&&(f=.5),d>0&&1>d&&(l=Lt(t,e,n,i,r,o,s,a,d),g.push(l.x),p.push(l.y)),f>0&&1>f&&(l=Lt(t,e,n,i,r,o,s,a,f),g.push(l.x),p.push(l.y)),{min:{x:z[S](0,g),y:z[S](0,p)},max:{x:j[S](0,g),y:j[S](0,p)}}}),It=n._path2curve=o(function(t,e){var n=!e&&Ft(t);if(!e&&n.curve)return Dt(n.curve);for(var i=$t(t),r=e&&$t(e),o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,n){var i,r;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][$](Mt[S](0,[e.x,e.y][$](t.slice(1))));break;case"S":"C"==n||"S"==n?(i=2*e.x-e.bx,r=2*e.y-e.by):(i=e.x,r=e.y),t=["C",i,r][$](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][$](Bt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][$](Bt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][$](Tt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][$](Tt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][$](Tt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][$](Tt(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)t.splice(e++,0,["C"][$](n.splice(0,6)));t.splice(e,1),u=j(i.length,r&&r.length||0)}},c=function(t,e,n,o,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),n.bx=0,n.by=0,n.x=t[s][1],n.y=t[s][2],u=j(i.length,r&&r.length||0))},h=0,u=j(i.length,r&&r.length||0);u>h;h++){i[h]=a(i[h],o),l(i,h),r&&(r[h]=a(r[h],s)),r&&l(r,h),c(i,r,o,s,h),c(r,i,s,o,h);var d=i[h],f=r&&r[h],p=d.length,g=r&&f.length;o.x=d[p-2],o.y=d[p-1],o.bx=J(d[p-4])||o.x,o.by=J(d[p-3])||o.y,s.bx=r&&(J(f[g-4])||s.x),s.by=r&&(J(f[g-3])||s.y),s.x=r&&f[g-2],s.y=r&&f[g-1]}return r||(n.curve=Dt(i)),r?[i,r]:i},null,Dt),Pt=(n._parseDots=o(function(t){for(var e=[],i=0,r=t.length;r>i;i++){var o={},s=t[i].match(/^([^:]*):?([\d\.]*)/);if(o.color=n.getRGB(s[1]),o.color.error)return null;o.color=o.color.hex,s[2]&&(o.offset=s[2]+"%"),e.push(o)}for(i=1,r=e.length-1;r>i;i++)if(!e[i].offset){for(var a=J(e[i-1].offset||0),l=0,c=i+1;r>c;c++)if(e[c].offset){l=e[c].offset;break}l||(l=100,c=r),l=J(l);for(var h=(l-a)/(c-i+1);c>i;i++)a+=h,e[i].offset=a+"%"}return e}),n._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Nt=(n._tofront=function(t,e){e.top!==t&&(Pt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},n._toback=function(t,e){e.bottom!==t&&(Pt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},n._insertafter=function(t,e,n){Pt(t,n),e==n.top&&(n.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},n._insertbefore=function(t,e,n){Pt(t,n),e==n.bottom&&(n.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},n.toMatrix=function(t,e){var n=_t(t),i={_:{transform:B},getBBox:function(){return n}};return Ot(i,e),i.matrix}),Ot=(n.transformPath=function(t,e){return vt(t,Nt(t,e))},n._extractTransform=function(t,e){if(null==e)return t._.transform;e=L(e).replace(/\.{3}|\u2026/g,t._.transform||B);var i=n.parseTransformString(e),r=0,o=0,s=0,a=1,l=1,c=t._,h=new p;if(c.transform=i||[],i)for(var u=0,d=i.length;d>u;u++){var f,g,m,v,y,w=i[u],b=w.length,x=L(w[0]).toLowerCase(),C=w[0]!=x,A=C?h.invert():0;"t"==x&&3==b?C?(f=A.x(0,0),g=A.y(0,0),m=A.x(w[1],w[2]),v=A.y(w[1],w[2]),h.translate(m-f,v-g)):h.translate(w[1],w[2]):"r"==x?2==b?(y=y||t.getBBox(1),h.rotate(w[1],y.x+y.width/2,y.y+y.height/2),r+=w[1]):4==b&&(C?(m=A.x(w[2],w[3]),v=A.y(w[2],w[3]),h.rotate(w[1],m,v)):h.rotate(w[1],w[2],w[3]),r+=w[1]):"s"==x?2==b||3==b?(y=y||t.getBBox(1),h.scale(w[1],w[b-1],y.x+y.width/2,y.y+y.height/2),a*=w[1],l*=w[b-1]):5==b&&(C?(m=A.x(w[3],w[4]),v=A.y(w[3],w[4]),h.scale(w[1],w[2],m,v)):h.scale(w[1],w[2],w[3],w[4]),a*=w[1],l*=w[2]):"m"==x&&7==b&&h.add(w[1],w[2],w[3],w[4],w[5],w[6]),c.dirtyT=1,t.matrix=h}t.matrix=h,c.sx=a,c.sy=l,c.deg=r,c.dx=o=h.e,c.dy=s=h.f,1==a&&1==l&&!r&&c.bbox?(c.bbox.x+=+o,c.bbox.y+=+s):c.dirtyT=1}),jt=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},zt=n._equaliseTransform=function(t,e){e=L(e).replace(/\.{3}|\u2026/g,t),t=n.parseTransformString(t)||[],e=n.parseTransformString(e)||[];for(var i,r,o,s,a=j(t.length,e.length),l=[],c=[],h=0;a>h;h++){if(o=t[h]||jt(e[h]),s=e[h]||jt(o),o[0]!=s[0]||"r"==o[0].toLowerCase()&&(o[2]!=s[2]||o[3]!=s[3])||"s"==o[0].toLowerCase()&&(o[3]!=s[3]||o[4]!=s[4]))return;for(l[h]=[],c[h]=[],i=0,r=j(o.length,s.length);r>i;i++)i in o&&(l[h][i]=o[i]),i in s&&(c[h][i]=s[i])}return{from:l,to:c}};n._getContainer=function(t,e,i,r){var o;return o=null!=r||n.is(t,"object")?t:F.doc.getElementById(t),null!=o?o.tagName?null==e?{container:o,width:o.style.pixelWidth||o.offsetWidth,height:o.style.pixelHeight||o.offsetHeight}:{container:o,width:e,height:i}:{container:1,x:t,y:e,width:i,height:r}:void 0},n.pathToRelative=St,n._engine={},n.path2curve=It,n.matrix=function(t,e,n,i,r,o){return new p(t,e,n,i,r,o)},function(t){function e(t){return t[0]*t[0]+t[1]*t[1]}function i(t){var n=O.sqrt(e(t));t[0]&&(t[0]/=n),t[1]&&(t[1]/=n)}t.add=function(t,e,n,i,r,o){var s,a,l,c,h=[[],[],[]],u=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],d=[[t,n,r],[e,i,o],[0,0,1]];for(t&&t instanceof p&&(d=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;3>s;s++)for(a=0;3>a;a++){for(c=0,l=0;3>l;l++)c+=u[s][l]*d[l][a];h[s][a]=c}this.a=h[0][0],this.b=h[1][0],this.c=h[0][1],this.d=h[1][1],this.e=h[0][2],this.f=h[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new p(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new p(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,n,i){null==e&&(e=t),(n||i)&&this.add(1,0,0,1,n,i),this.add(t,0,0,e,0,0),(n||i)&&this.add(1,0,0,1,-n,-i)},t.rotate=function(t,e,i){t=n.rad(t),e=e||0,i=i||0;var r=+O.cos(t).toFixed(9),o=+O.sin(t).toFixed(9);this.add(r,o,-o,r,e,i),this.add(1,0,0,1,-e,-i)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[L.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return n.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var r=[[this.a,this.c],[this.b,this.d]];t.scalex=O.sqrt(e(r[0])),i(r[0]),t.shear=r[0][0]*r[1][0]+r[0][1]*r[1][1],r[1]=[r[1][0]-r[0][0]*t.shear,r[1][1]-r[0][1]*t.shear],t.scaley=O.sqrt(e(r[1])),i(r[1]),t.shear/=t.scaley;var o=-r[0][1],s=r[1][1];return 0>s?(t.rotate=n.deg(O.acos(s)),0>o&&(t.rotate=360-t.rotate)):t.rotate=n.deg(O.asin(o)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[R]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:B)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:B)+(e.rotate?"r"+[e.rotate,0,0]:B)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(p.prototype);
var Ht=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);"Apple Computer, Inc."==navigator.vendor&&(Ht&&Ht[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&Ht&&Ht[1]<8?x.safari=function(){var t=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){t.remove()})}:x.safari=dt;for(var Wt=function(){this.returnValue=!1},Ut=function(){return this.originalEvent.preventDefault()},qt=function(){this.cancelBubble=!0},Yt=function(){return this.originalEvent.stopPropagation()},Gt=function(t){var e=F.doc.documentElement.scrollTop||F.doc.body.scrollTop,n=F.doc.documentElement.scrollLeft||F.doc.body.scrollLeft;return{x:t.clientX+n,y:t.clientY+e}},Vt=function(){return F.doc.addEventListener?function(t,e,n,i){var r=function(t){var e=Gt(t);return n.call(i,t,e.x,e.y)};if(t.addEventListener(e,r,!1),T&&P[e]){var o=function(e){for(var r=Gt(e),o=e,s=0,a=e.targetTouches&&e.targetTouches.length;a>s;s++)if(e.targetTouches[s].target==t){e=e.targetTouches[s],e.originalEvent=o,e.preventDefault=Ut,e.stopPropagation=Yt;break}return n.call(i,e,r.x,r.y)};t.addEventListener(P[e],o,!1)}return function(){return t.removeEventListener(e,r,!1),T&&P[e]&&t.removeEventListener(P[e],r,!1),!0}}:F.doc.attachEvent?function(t,e,n,i){var r=function(t){t=t||F.win.event;var e=F.doc.documentElement.scrollTop||F.doc.body.scrollTop,r=F.doc.documentElement.scrollLeft||F.doc.body.scrollLeft,o=t.clientX+r,s=t.clientY+e;return t.preventDefault=t.preventDefault||Wt,t.stopPropagation=t.stopPropagation||qt,n.call(i,t,o,s)};t.attachEvent("on"+e,r);var o=function(){return t.detachEvent("on"+e,r),!0};return o}:void 0}(),Kt=[],Xt=function(t){for(var n,i=t.clientX,r=t.clientY,o=F.doc.documentElement.scrollTop||F.doc.body.scrollTop,s=F.doc.documentElement.scrollLeft||F.doc.body.scrollLeft,a=Kt.length;a--;){if(n=Kt[a],T&&t.touches){for(var l,c=t.touches.length;c--;)if(l=t.touches[c],l.identifier==n.el._drag.id){i=l.clientX,r=l.clientY,(t.originalEvent?t.originalEvent:t).preventDefault();break}}else t.preventDefault();var h,u=n.el.node,d=u.nextSibling,f=u.parentNode,p=u.style.display;F.win.opera&&f.removeChild(u),u.style.display="none",h=n.el.paper.getElementByPoint(i,r),u.style.display=p,F.win.opera&&(d?f.insertBefore(u,d):f.appendChild(u)),h&&e("raphael.drag.over."+n.el.id,n.el,h),i+=s,r+=o,e("raphael.drag.move."+n.el.id,n.move_scope||n.el,i-n.el._drag.x,r-n.el._drag.y,i,r,t)}},Zt=function(t){n.unmousemove(Xt).unmouseup(Zt);for(var i,r=Kt.length;r--;)i=Kt[r],i.el._drag={},e("raphael.drag.end."+i.el.id,i.end_scope||i.start_scope||i.move_scope||i.el,t);Kt=[]},Qt=n.el={},Jt=I.length;Jt--;)!function(t){n[t]=Qt[t]=function(e,i){return n.is(e,"function")&&(this.events=this.events||[],this.events.push({name:t,f:e,unbind:Vt(this.shape||this.node||F.doc,t,e,i||this)})),this},n["un"+t]=Qt["un"+t]=function(e){for(var i=this.events||[],r=i.length;r--;)i[r].name!=t||!n.is(e,"undefined")&&i[r].f!=e||(i[r].unbind(),i.splice(r,1),!i.length&&delete this.events);return this}}(I[Jt]);Qt.data=function(t,i){var r=ht[this.id]=ht[this.id]||{};if(0==arguments.length)return r;if(1==arguments.length){if(n.is(t,"object")){for(var o in t)t[k](o)&&this.data(o,t[o]);return this}return e("raphael.data.get."+this.id,this,r[t],t),r[t]}return r[t]=i,e("raphael.data.set."+this.id,this,i,t),this},Qt.removeData=function(t){return null==t?ht[this.id]={}:ht[this.id]&&delete ht[this.id][t],this},Qt.getData=function(){return i(ht[this.id]||{})},Qt.hover=function(t,e,n,i){return this.mouseover(t,n).mouseout(e,i||n)},Qt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var te=[];Qt.drag=function(t,i,r,o,s,a){function l(l){(l.originalEvent||l).preventDefault();var c=l.clientX,h=l.clientY,u=F.doc.documentElement.scrollTop||F.doc.body.scrollTop,d=F.doc.documentElement.scrollLeft||F.doc.body.scrollLeft;if(this._drag.id=l.identifier,T&&l.touches)for(var f,p=l.touches.length;p--;)if(f=l.touches[p],this._drag.id=f.identifier,f.identifier==this._drag.id){c=f.clientX,h=f.clientY;break}this._drag.x=c+d,this._drag.y=h+u,!Kt.length&&n.mousemove(Xt).mouseup(Zt),Kt.push({el:this,move_scope:o,start_scope:s,end_scope:a}),i&&e.on("raphael.drag.start."+this.id,i),t&&e.on("raphael.drag.move."+this.id,t),r&&e.on("raphael.drag.end."+this.id,r),e("raphael.drag.start."+this.id,s||o||this,l.clientX+d,l.clientY+u,l)}return this._drag={},te.push({el:this,start:l}),this.mousedown(l),this},Qt.onDragOver=function(t){t?e.on("raphael.drag.over."+this.id,t):e.unbind("raphael.drag.over."+this.id)},Qt.undrag=function(){for(var t=te.length;t--;)te[t].el==this&&(this.unmousedown(te[t].start),te.splice(t,1),e.unbind("raphael.drag.*."+this.id));!te.length&&n.unmousemove(Xt).unmouseup(Zt),Kt=[]},x.circle=function(t,e,i){var r=n._engine.circle(this,t||0,e||0,i||0);return this.__set__&&this.__set__.push(r),r},x.rect=function(t,e,i,r,o){var s=n._engine.rect(this,t||0,e||0,i||0,r||0,o||0);return this.__set__&&this.__set__.push(s),s},x.ellipse=function(t,e,i,r){var o=n._engine.ellipse(this,t||0,e||0,i||0,r||0);return this.__set__&&this.__set__.push(o),o},x.path=function(t){t&&!n.is(t,Y)&&!n.is(t[0],G)&&(t+=B);var e=n._engine.path(n.format[S](n,arguments),this);return this.__set__&&this.__set__.push(e),e},x.image=function(t,e,i,r,o){var s=n._engine.image(this,t||"about:blank",e||0,i||0,r||0,o||0);return this.__set__&&this.__set__.push(s),s},x.text=function(t,e,i){var r=n._engine.text(this,t||0,e||0,L(i));return this.__set__&&this.__set__.push(r),r},x.set=function(t){!n.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var e=new de(t);return this.__set__&&this.__set__.push(e),e.paper=this,e.type="set",e},x.setStart=function(t){this.__set__=t||this.set()},x.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},x.setSize=function(t,e){return n._engine.setSize.call(this,t,e)},x.setViewBox=function(t,e,i,r,o){return n._engine.setViewBox.call(this,t,e,i,r,o)},x.top=x.bottom=null,x.raphael=n;var ee=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,i=n.body,r=n.documentElement,o=r.clientTop||i.clientTop||0,s=r.clientLeft||i.clientLeft||0,a=e.top+(F.win.pageYOffset||r.scrollTop||i.scrollTop)-o,l=e.left+(F.win.pageXOffset||r.scrollLeft||i.scrollLeft)-s;return{y:a,x:l}};x.getElementByPoint=function(t,e){var n=this,i=n.canvas,r=F.doc.elementFromPoint(t,e);if(F.win.opera&&"svg"==r.tagName){var o=ee(i),s=i.createSVGRect();s.x=t-o.x,s.y=e-o.y,s.width=s.height=1;var a=i.getIntersectionList(s,null);a.length&&(r=a[a.length-1])}if(!r)return null;for(;r.parentNode&&r!=i.parentNode&&!r.raphael;)r=r.parentNode;return r==n.canvas.parentNode&&(r=i),r=r&&r.raphael?n.getById(r.raphaelid):null},x.getElementsByBBox=function(t){var e=this.set();return this.forEach(function(i){n.isBBoxIntersect(i.getBBox(),t)&&e.push(i)}),e},x.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},x.forEach=function(t,e){for(var n=this.bottom;n;){if(t.call(e,n)===!1)return this;n=n.next}return this},x.getElementsByPoint=function(t,e){var n=this.set();return this.forEach(function(i){i.isPointInside(t,e)&&n.push(i)}),n},Qt.isPointInside=function(t,e){var i=this.realPath=mt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(i=n.transformPath(i,this.attr("transform"))),n.isPointInsidePath(i,t,e)},Qt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?((e.dirty||!e.bboxwt)&&(this.realPath=mt[this.type](this),e.bboxwt=_t(this.realPath),e.bboxwt.toString=g,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&((e.dirty||!this.realPath)&&(e.bboxwt=0,this.realPath=mt[this.type](this)),e.bbox=_t(vt(this.realPath,this.matrix)),e.bbox.toString=g,e.dirty=e.dirtyT=0),e.bbox)},Qt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Qt.glow=function(t){if("text"==this.type)return null;t=t||{};var e={width:(t.width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:t.opacity||.5,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},n=e.width/2,i=this.paper,r=i.set(),o=this.realPath||mt[this.type](this);o=this.matrix?vt(o,this.matrix):o;for(var s=1;n+1>s;s++)r.push(i.path(o).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/n*s).toFixed(3),opacity:+(e.opacity/n).toFixed(3)}));return r.insertBefore(this).translate(e.offsetx,e.offsety)};var ne=function(t,e,i,r,o,s,a,l,u){return null==u?c(t,e,i,r,o,s,a,l):n.findDotsAtSegment(t,e,i,r,o,s,a,l,h(t,e,i,r,o,s,a,l,u))},ie=function(t,e){return function(i,r,o){i=It(i);for(var s,a,l,c,h,u="",d={},f=0,p=0,g=i.length;g>p;p++){if(l=i[p],"M"==l[0])s=+l[1],a=+l[2];else{if(c=ne(s,a,l[1],l[2],l[3],l[4],l[5],l[6]),f+c>r){if(e&&!d.start){if(h=ne(s,a,l[1],l[2],l[3],l[4],l[5],l[6],r-f),u+=["C"+h.start.x,h.start.y,h.m.x,h.m.y,h.x,h.y],o)return u;d.start=u,u=["M"+h.x,h.y+"C"+h.n.x,h.n.y,h.end.x,h.end.y,l[5],l[6]].join(),f+=c,s=+l[5],a=+l[6];continue}if(!t&&!e)return h=ne(s,a,l[1],l[2],l[3],l[4],l[5],l[6],r-f),{x:h.x,y:h.y,alpha:h.alpha}}f+=c,s=+l[5],a=+l[6]}u+=l.shift()+l}return d.end=u,h=t?f:e?d:n.findDotsAtSegment(s,a,l[0],l[1],l[2],l[3],l[4],l[5],1),h.alpha&&(h={x:h.x,y:h.y,alpha:h.alpha}),h}},re=ie(1),oe=ie(),se=ie(0,1);n.getTotalLength=re,n.getPointAtLength=oe,n.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return se(t,e).end;var i=se(t,n,1);return e?se(i,e).end:i},Qt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():re(t)},Qt.getPointAtLength=function(t){var e=this.getPath();if(e)return oe(e,t)},Qt.getPath=function(){var t,e=n._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return e&&(t=e(this)),t},Qt.getSubpath=function(t,e){var i=this.getPath();if(i)return n.getSubpath(i,t,e)};var ae=n.easing_formulas={linear:function(t){return t},"<":function(t){return W(t,1.7)},">":function(t){return W(t,.48)},"<>":function(t){var e=.48-t/1.04,n=O.sqrt(.1734+e*e),i=n-e,r=W(H(i),1/3)*(0>i?-1:1),o=-n-e,s=W(H(o),1/3)*(0>o?-1:1),a=r+s+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:W(2,-10*t)*O.sin((t-.075)*(2*U)/.3)+1},bounce:function(t){var e,n=7.5625,i=2.75;return 1/i>t?e=n*t*t:2/i>t?(t-=1.5/i,e=n*t*t+.75):2.5/i>t?(t-=2.25/i,e=n*t*t+.9375):(t-=2.625/i,e=n*t*t+.984375),e}};ae.easeIn=ae["ease-in"]=ae["<"],ae.easeOut=ae["ease-out"]=ae[">"],ae.easeInOut=ae["ease-in-out"]=ae["<>"],ae["back-in"]=ae.backIn,ae["back-out"]=ae.backOut;var le=[],ce=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(t){setTimeout(t,16)},he=function(){for(var t=+new Date,i=0;i<le.length;i++){var r=le[i];if(!r.el.removed&&!r.paused){var o,s,a=t-r.start,l=r.ms,c=r.easing,h=r.from,u=r.diff,d=r.to,f=(r.t,r.el),p={},g={};if(r.initstatus?(a=(r.initstatus*r.anim.top-r.prev)/(r.percent-r.prev)*l,r.status=r.initstatus,delete r.initstatus,r.stop&&le.splice(i--,1)):r.status=(r.prev+(r.percent-r.prev)*(a/l))/r.anim.top,!(0>a))if(l>a){var m=c(a/l);for(var v in h)if(h[k](v)){switch(it[v]){case q:o=+h[v]+m*l*u[v];break;case"colour":o="rgb("+[ue(Q(h[v].r+m*l*u[v].r)),ue(Q(h[v].g+m*l*u[v].g)),ue(Q(h[v].b+m*l*u[v].b))].join(",")+")";break;case"path":o=[];for(var w=0,b=h[v].length;b>w;w++){o[w]=[h[v][w][0]];for(var x=1,C=h[v][w].length;C>x;x++)o[w][x]=+h[v][w][x]+m*l*u[v][w][x];o[w]=o[w].join(M)}o=o.join(M);break;case"transform":if(u[v].real)for(o=[],w=0,b=h[v].length;b>w;w++)for(o[w]=[h[v][w][0]],x=1,C=h[v][w].length;C>x;x++)o[w][x]=h[v][w][x]+m*l*u[v][w][x];else{var A=function(t){return+h[v][t]+m*l*u[v][t]};o=[["m",A(0),A(1),A(2),A(3),A(4),A(5)]]}break;case"csv":if("clip-rect"==v)for(o=[],w=4;w--;)o[w]=+h[v][w]+m*l*u[v][w];break;default:var E=[][$](h[v]);for(o=[],w=f.paper.customAttributes[v].length;w--;)o[w]=+E[w]+m*l*u[v][w]}p[v]=o}f.attr(p),function(t,n,i){setTimeout(function(){e("raphael.anim.frame."+t,n,i)})}(f.id,f,r.anim)}else{if(function(t,i,r){setTimeout(function(){e("raphael.anim.frame."+i.id,i,r),e("raphael.anim.finish."+i.id,i,r),n.is(t,"function")&&t.call(i)})}(r.callback,f,r.anim),f.attr(d),le.splice(i--,1),r.repeat>1&&!r.next){for(s in d)d[k](s)&&(g[s]=r.totalOrigin[s]);r.el.attr(g),y(r.anim,r.el,r.anim.percents[0],null,r.totalOrigin,r.repeat-1)}r.next&&!r.stop&&y(r.anim,r.el,r.next,null,r.totalOrigin,r.repeat)}}}n.svg&&f&&f.paper&&f.paper.safari(),le.length&&ce(he)},ue=function(t){return t>255?255:0>t?0:t};Qt.animateWith=function(t,e,i,r,o,s){var a=this;if(a.removed)return s&&s.call(a),a;var l=i instanceof v?i:n.animation(i,r,o,s);y(l,a,l.percents[0],null,a.attr());for(var c=0,h=le.length;h>c;c++)if(le[c].anim==e&&le[c].el==t){le[h-1].start=le[c].start;break}return a},Qt.onAnimation=function(t){return t?e.on("raphael.anim.frame."+this.id,t):e.unbind("raphael.anim.frame."+this.id),this},v.prototype.delay=function(t){var e=new v(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},v.prototype.repeat=function(t){var e=new v(this.anim,this.ms);return e.del=this.del,e.times=O.floor(j(t,0))||1,e},n.animation=function(t,e,i,r){if(t instanceof v)return t;(n.is(i,"function")||!i)&&(r=r||i||null,i=null),t=Object(t),e=+e||0;var o,s,a={};for(s in t)t[k](s)&&J(s)!=s&&J(s)+"%"!=s&&(o=!0,a[s]=t[s]);return o?(i&&(a.easing=i),r&&(a.callback=r),new v({100:a},e)):new v(t,e)},Qt.animate=function(t,e,i,r){var o=this;if(o.removed)return r&&r.call(o),o;var s=t instanceof v?t:n.animation(t,e,i,r);return y(s,o,s.percents[0],null,o.attr()),o},Qt.setTime=function(t,e){return t&&null!=e&&this.status(t,z(e,t.ms)/t.ms),this},Qt.status=function(t,e){var n,i,r=[],o=0;if(null!=e)return y(t,this,-1,z(e,1)),this;for(n=le.length;n>o;o++)if(i=le[o],i.el.id==this.id&&(!t||i.anim==t)){if(t)return i.status;r.push({anim:i.anim,status:i.status})}return t?0:r},Qt.pause=function(t){for(var n=0;n<le.length;n++)le[n].el.id!=this.id||t&&le[n].anim!=t||e("raphael.anim.pause."+this.id,this,le[n].anim)!==!1&&(le[n].paused=!0);return this},Qt.resume=function(t){for(var n=0;n<le.length;n++)if(le[n].el.id==this.id&&(!t||le[n].anim==t)){var i=le[n];e("raphael.anim.resume."+this.id,this,i.anim)!==!1&&(delete i.paused,this.status(i.anim,i.status))}return this},Qt.stop=function(t){for(var n=0;n<le.length;n++)le[n].el.id!=this.id||t&&le[n].anim!=t||e("raphael.anim.stop."+this.id,this,le[n].anim)!==!1&&le.splice(n--,1);return this},e.on("raphael.remove",w),e.on("raphael.clear",w),Qt.toString=function(){return"Rapha\xebl\u2019s object"};var de=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,n=t.length;n>e;e++)!t[e]||t[e].constructor!=Qt.constructor&&t[e].constructor!=de||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},fe=de.prototype;fe.push=function(){for(var t,e,n=0,i=arguments.length;i>n;n++)t=arguments[n],!t||t.constructor!=Qt.constructor&&t.constructor!=de||(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},fe.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},fe.forEach=function(t,e){for(var n=0,i=this.items.length;i>n;n++)if(t.call(e,this.items[n],n)===!1)return this;return this};for(var pe in Qt)Qt[k](pe)&&(fe[pe]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t][S](n,e)})}}(pe));
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com)   │ \\
// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com)             │ \\
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com)   │ \\
// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com)             │ \\
return fe.attr=function(t,e){if(t&&n.is(t,G)&&n.is(t[0],"object"))for(var i=0,r=t.length;r>i;i++)this.items[i].attr(t[i]);else for(var o=0,s=this.items.length;s>o;o++)this.items[o].attr(t,e);return this},fe.clear=function(){for(;this.length;)this.pop()},fe.splice=function(t,e,n){t=0>t?j(this.length+t,0):t,e=j(0,z(this.length-t,e));var i,r=[],o=[],s=[];for(i=2;i<arguments.length;i++)s.push(arguments[i]);for(i=0;e>i;i++)o.push(this[t+i]);for(;i<this.length-t;i++)r.push(this[t+i]);var a=s.length;for(i=0;i<a+r.length;i++)this.items[t+i]=this[t+i]=a>i?s[i]:r[i-a];for(i=this.items.length=this.length-=e-a;this[i];)delete this[i++];return new de(o)},fe.exclude=function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]==t)return this.splice(e,1),!0},fe.animate=function(t,e,i,r){(n.is(i,"function")||!i)&&(r=i||null);var o,s,a=this.items.length,l=a,c=this;if(!a)return this;r&&(s=function(){!--a&&r.call(c)}),i=n.is(i,Y)?i:s;var h=n.animation(t,e,i,s);for(o=this.items[--l].animate(h);l--;)this.items[l]&&!this.items[l].removed&&this.items[l].animateWith(o,h,h),this.items[l]&&!this.items[l].removed||a--;return this},fe.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},fe.getBBox=function(){for(var t=[],e=[],n=[],i=[],r=this.items.length;r--;)if(!this.items[r].removed){var o=this.items[r].getBBox();t.push(o.x),e.push(o.y),n.push(o.x+o.width),i.push(o.y+o.height)}return t=z[S](0,t),e=z[S](0,e),n=j[S](0,n),i=j[S](0,i),{x:t,y:e,x2:n,y2:i,width:n-t,height:i-e}},fe.clone=function(t){t=this.paper.set();for(var e=0,n=this.items.length;n>e;e++)t.push(this.items[e].clone());return t},fe.toString=function(){return"Rapha\xebl\u2018s set"},fe.glow=function(t){var e=this.paper.set();return this.forEach(function(n,i){var r=n.glow(t);null!=r&&r.forEach(function(t,n){e.push(t)})}),e},fe.isPointInside=function(t,e){var n=!1;return this.forEach(function(i){return i.isPointInside(t,e)?(console.log("runned"),n=!0,!1):void 0}),n},n.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},n=t.face["font-family"];for(var i in t.face)t.face[k](i)&&(e.face[i]=t.face[i]);if(this.fonts[n]?this.fonts[n].push(e):this.fonts[n]=[e],!t.svg){e.face["units-per-em"]=tt(t.face["units-per-em"],10);for(var r in t.glyphs)if(t.glyphs[k](r)){var o=t.glyphs[r];if(e.glyphs[r]={w:o.w,k:{},d:o.d&&"M"+o.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},o.k)for(var s in o.k)o[k](s)&&(e.glyphs[r].k[s]=o.k[s])}}return t},x.getFont=function(t,e,i,r){if(r=r||"normal",i=i||"normal",e=+e||{normal:400,bold:700,lighter:300,bolder:800}[e]||400,n.fonts){var o=n.fonts[t];if(!o){var s=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,B)+"(\\s|$)","i");for(var a in n.fonts)if(n.fonts[k](a)&&s.test(a)){o=n.fonts[a];break}}var l;if(o)for(var c=0,h=o.length;h>c&&(l=o[c],l.face["font-weight"]!=e||l.face["font-style"]!=i&&l.face["font-style"]||l.face["font-stretch"]!=r);c++);return l}},x.print=function(t,e,i,r,o,s,a,l){s=s||"middle",a=j(z(a||0,1),-1),l=j(z(l||1,3),1);var c,h=L(i)[R](B),u=0,d=0,f=B;if(n.is(r,"string")&&(r=this.getFont(r)),r){c=(o||16)/r.face["units-per-em"];for(var p=r.face.bbox[R](C),g=+p[0],m=p[3]-p[1],v=0,y=+p[1]+("baseline"==s?m+ +r.face.descent:m/2),w=0,b=h.length;b>w;w++){if("\n"==h[w])u=0,A=0,d=0,v+=m*l;else{var x=d&&r.glyphs[h[w-1]]||{},A=r.glyphs[h[w]];u+=d?(x.w||r.w)+(x.k&&x.k[h[w]]||0)+r.w*a:0,d=1}A&&A.d&&(f+=n.transformPath(A.d,["t",u*c,v*c,"s",c,c,g,y,"t",(t-g)/c,(e-y)/c]))}}return this.path(f).attr({fill:"#000",stroke:"none"})},x.add=function(t){if(n.is(t,"array"))for(var e,i=this.set(),r=0,o=t.length;o>r;r++)e=t[r]||{},A[k](e.type)&&i.push(this[e.type]().attr(e));return i},n.format=function(t,e){var i=n.is(e,G)?[0][$](e):arguments;return t&&n.is(t,Y)&&i.length-1&&(t=t.replace(E,function(t,e){return null==i[++e]?B:i[e]})),t||B},n.fullfill=function(){var t=/\{([^\}]+)\}/g,e=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,n=function(t,n,i){var r=i;return n.replace(e,function(t,e,n,i,o){e=e||i,r&&(e in r&&(r=r[e]),"function"==typeof r&&o&&(r=r()))}),r=(null==r||r==i?t:r)+""};return function(e,i){return String(e).replace(t,function(t,e){return n(t,e,i)})}}(),n.ninja=function(){return _.was?F.win.Raphael=_.is:delete Raphael,n},n.st=fe,function(t,e,i){function r(){/in/.test(t.readyState)?setTimeout(r,9):n.eve("raphael.DOMload")}null==t.readyState&&t.addEventListener&&(t.addEventListener(e,i=function(){t.removeEventListener(e,i,!1),t.readyState="complete"},!1),t.readyState="loading"),r()}(document,"DOMContentLoaded"),e.on("raphael.DOMload",function(){b=!0}),function(){if(n.svg){var t="hasOwnProperty",e=String,i=parseFloat,r=parseInt,o=Math,s=o.max,a=o.abs,l=o.pow,c=/[, ]+/,h=n.eve,u="",d=" ",f="http://www.w3.org/1999/xlink",p={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},g={};n.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version};var m=function(i,r){if(r){"string"==typeof i&&(i=m(i));for(var o in r)r[t](o)&&("xlink:"==o.substring(0,6)?i.setAttributeNS(f,o.substring(6),e(r[o])):i.setAttribute(o,e(r[o])))}else i=n._g.doc.createElementNS("http://www.w3.org/2000/svg",i),i.style&&(i.style.webkitTapHighlightColor="rgba(0,0,0,0)");return i},v=function(t,r){var c="linear",h=t.id+r,d=.5,f=.5,p=t.node,g=t.paper,v=p.style,y=n._g.doc.getElementById(h);if(!y){if(r=e(r).replace(n._radial_gradient,function(t,e,n){if(c="radial",e&&n){d=i(e),f=i(n);var r=2*(f>.5)-1;l(d-.5,2)+l(f-.5,2)>.25&&(f=o.sqrt(.25-l(d-.5,2))*r+.5)&&.5!=f&&(f=f.toFixed(5)-1e-5*r)}return u}),r=r.split(/\s*\-\s*/),"linear"==c){var w=r.shift();if(w=-i(w),isNaN(w))return null;var b=[0,0,o.cos(n.rad(w)),o.sin(n.rad(w))],x=1/(s(a(b[2]),a(b[3]))||1);b[2]*=x,b[3]*=x,b[2]<0&&(b[0]=-b[2],b[2]=0),b[3]<0&&(b[1]=-b[3],b[3]=0)}var C=n._parseDots(r);if(!C)return null;if(h=h.replace(/[\(\)\s,\xb0#]/g,"_"),t.gradient&&h!=t.gradient.id&&(g.defs.removeChild(t.gradient),delete t.gradient),!t.gradient){y=m(c+"Gradient",{id:h}),t.gradient=y,m(y,"radial"==c?{fx:d,fy:f}:{x1:b[0],y1:b[1],x2:b[2],y2:b[3],gradientTransform:t.matrix.invert()}),g.defs.appendChild(y);for(var A=0,E=C.length;E>A;A++)y.appendChild(m("stop",{offset:C[A].offset?C[A].offset:A?"100%":"0%","stop-color":C[A].color||"#fff"}))}}return m(p,{fill:"url(#"+h+")",opacity:1,"fill-opacity":1}),v.fill=u,v.opacity=1,v.fillOpacity=1,1},y=function(t){var e=t.getBBox(1);m(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},w=function(i,r,o){if("path"==i.type){for(var s,a,l,c,h,d=e(r).toLowerCase().split("-"),f=i.paper,v=o?"end":"start",y=i.node,w=i.attrs,b=w["stroke-width"],x=d.length,C="classic",A=3,E=3,k=5;x--;)switch(d[x]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":C=d[x];break;case"wide":E=5;break;case"narrow":E=2;break;case"long":A=5;break;case"short":A=2}if("open"==C?(A+=2,E+=2,k+=2,l=1,c=o?4:1,h={fill:"none",stroke:w.stroke}):(c=l=A/2,h={fill:w.stroke,stroke:"none"}),i._.arrows?o?(i._.arrows.endPath&&g[i._.arrows.endPath]--,i._.arrows.endMarker&&g[i._.arrows.endMarker]--):(i._.arrows.startPath&&g[i._.arrows.startPath]--,i._.arrows.startMarker&&g[i._.arrows.startMarker]--):i._.arrows={},"none"!=C){var F="raphael-marker-"+C,_="raphael-marker-"+v+C+A+E;n._g.doc.getElementById(F)?g[F]++:(f.defs.appendChild(m(m("path"),{"stroke-linecap":"round",d:p[C],id:F})),g[F]=1);var D,S=n._g.doc.getElementById(_);S?(g[_]++,D=S.getElementsByTagName("use")[0]):(S=m(m("marker"),{id:_,markerHeight:E,markerWidth:A,orient:"auto",refX:c,refY:E/2}),D=m(m("use"),{"xlink:href":"#"+F,transform:(o?"rotate(180 "+A/2+" "+E/2+") ":u)+"scale("+A/k+","+E/k+")","stroke-width":(1/((A/k+E/k)/2)).toFixed(4)}),S.appendChild(D),f.defs.appendChild(S),g[_]=1),m(D,h);var $=l*("diamond"!=C&&"oval"!=C);o?(s=i._.arrows.startdx*b||0,a=n.getTotalLength(w.path)-$*b):(s=$*b,a=n.getTotalLength(w.path)-(i._.arrows.enddx*b||0)),h={},h["marker-"+v]="url(#"+_+")",(a||s)&&(h.d=n.getSubpath(w.path,s,a)),m(y,h),i._.arrows[v+"Path"]=F,i._.arrows[v+"Marker"]=_,i._.arrows[v+"dx"]=$,i._.arrows[v+"Type"]=C,i._.arrows[v+"String"]=r}else o?(s=i._.arrows.startdx*b||0,a=n.getTotalLength(w.path)-s):(s=0,a=n.getTotalLength(w.path)-(i._.arrows.enddx*b||0)),i._.arrows[v+"Path"]&&m(y,{d:n.getSubpath(w.path,s,a)}),delete i._.arrows[v+"Path"],delete i._.arrows[v+"Marker"],delete i._.arrows[v+"dx"],delete i._.arrows[v+"Type"],delete i._.arrows[v+"String"];for(h in g)if(g[t](h)&&!g[h]){var T=n._g.doc.getElementById(h);T&&T.parentNode.removeChild(T)}}},b={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},x=function(t,n,i){if(n=b[e(n).toLowerCase()]){for(var r=t.attrs["stroke-width"]||"1",o={round:r,square:r,butt:0}[t.attrs["stroke-linecap"]||i["stroke-linecap"]]||0,s=[],a=n.length;a--;)s[a]=n[a]*r+(a%2?1:-1)*o;m(t.node,{"stroke-dasharray":s.join(",")})}},C=function(i,o){var l=i.node,h=i.attrs,d=l.style.visibility;l.style.visibility="hidden";for(var p in o)if(o[t](p)){if(!n._availableAttrs[t](p))continue;var g=o[p];switch(h[p]=g,p){case"blur":i.blur(g);break;case"href":case"title":var b=m("title"),C=n._g.doc.createTextNode(g);b.appendChild(C),l.appendChild(b);break;case"target":var A=l.parentNode;if("a"!=A.tagName.toLowerCase()){var b=m("a");A.insertBefore(b,l),b.appendChild(l),A=b}"target"==p?A.setAttributeNS(f,"show","blank"==g?"new":g):A.setAttributeNS(f,p,g);break;case"cursor":l.style.cursor=g;break;case"transform":i.transform(g);break;case"arrow-start":w(i,g);break;case"arrow-end":w(i,g,1);break;case"clip-rect":var k=e(g).split(c);if(4==k.length){i.clip&&i.clip.parentNode.parentNode.removeChild(i.clip.parentNode);var F=m("clipPath"),_=m("rect");F.id=n.createUUID(),m(_,{x:k[0],y:k[1],width:k[2],height:k[3]}),F.appendChild(_),i.paper.defs.appendChild(F),m(l,{"clip-path":"url(#"+F.id+")"}),i.clip=_}if(!g){var D=l.getAttribute("clip-path");if(D){var S=n._g.doc.getElementById(D.replace(/(^url\(#|\)$)/g,u));S&&S.parentNode.removeChild(S),m(l,{"clip-path":u}),delete i.clip}}break;case"path":"path"==i.type&&(m(l,{d:g?h.path=n._pathToAbsolute(g):"M0,0"}),i._.dirty=1,i._.arrows&&("startString"in i._.arrows&&w(i,i._.arrows.startString),"endString"in i._.arrows&&w(i,i._.arrows.endString,1)));break;case"width":if(l.setAttribute(p,g),i._.dirty=1,!h.fx)break;p="x",g=h.x;case"x":h.fx&&(g=-h.x-(h.width||0));case"rx":if("rx"==p&&"rect"==i.type)break;case"cx":l.setAttribute(p,g),i.pattern&&y(i),i._.dirty=1;break;case"height":if(l.setAttribute(p,g),i._.dirty=1,!h.fy)break;p="y",g=h.y;case"y":h.fy&&(g=-h.y-(h.height||0));case"ry":if("ry"==p&&"rect"==i.type)break;case"cy":l.setAttribute(p,g),i.pattern&&y(i),i._.dirty=1;break;case"r":"rect"==i.type?m(l,{rx:g,ry:g}):l.setAttribute(p,g),i._.dirty=1;break;case"src":"image"==i.type&&l.setAttributeNS(f,"href",g);break;case"stroke-width":(1!=i._.sx||1!=i._.sy)&&(g/=s(a(i._.sx),a(i._.sy))||1),i.paper._vbSize&&(g*=i.paper._vbSize),l.setAttribute(p,g),h["stroke-dasharray"]&&x(i,h["stroke-dasharray"],o),i._.arrows&&("startString"in i._.arrows&&w(i,i._.arrows.startString),"endString"in i._.arrows&&w(i,i._.arrows.endString,1));break;case"stroke-dasharray":x(i,g,o);break;case"fill":var $=e(g).match(n._ISURL);if($){F=m("pattern");var T=m("image");F.id=n.createUUID(),m(F,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),m(T,{x:0,y:0,"xlink:href":$[1]}),F.appendChild(T),function(t){n._preload($[1],function(){var e=this.offsetWidth,n=this.offsetHeight;m(t,{width:e,height:n}),m(T,{width:e,height:n}),i.paper.safari()})}(F),i.paper.defs.appendChild(F),m(l,{fill:"url(#"+F.id+")"}),i.pattern=F,i.pattern&&y(i);break}var B=n.getRGB(g);if(B.error){if(("circle"==i.type||"ellipse"==i.type||"r"!=e(g).charAt())&&v(i,g)){if("opacity"in h||"fill-opacity"in h){var M=n._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,u));if(M){var L=M.getElementsByTagName("stop");m(L[L.length-1],{"stop-opacity":("opacity"in h?h.opacity:1)*("fill-opacity"in h?h["fill-opacity"]:1)})}}h.gradient=g,h.fill="none";break}}else delete o.gradient,delete h.gradient,!n.is(h.opacity,"undefined")&&n.is(o.opacity,"undefined")&&m(l,{opacity:h.opacity}),!n.is(h["fill-opacity"],"undefined")&&n.is(o["fill-opacity"],"undefined")&&m(l,{"fill-opacity":h["fill-opacity"]});B[t]("opacity")&&m(l,{"fill-opacity":B.opacity>1?B.opacity/100:B.opacity});case"stroke":B=n.getRGB(g),l.setAttribute(p,B.hex),"stroke"==p&&B[t]("opacity")&&m(l,{"stroke-opacity":B.opacity>1?B.opacity/100:B.opacity}),"stroke"==p&&i._.arrows&&("startString"in i._.arrows&&w(i,i._.arrows.startString),"endString"in i._.arrows&&w(i,i._.arrows.endString,1));break;case"gradient":("circle"==i.type||"ellipse"==i.type||"r"!=e(g).charAt())&&v(i,g);break;case"opacity":h.gradient&&!h[t]("stroke-opacity")&&m(l,{"stroke-opacity":g>1?g/100:g});case"fill-opacity":if(h.gradient){M=n._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,u)),M&&(L=M.getElementsByTagName("stop"),m(L[L.length-1],{"stop-opacity":g}));break}default:"font-size"==p&&(g=r(g,10)+"px");var R=p.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[R]=g,i._.dirty=1,l.setAttribute(p,g)}}E(i,o),l.style.visibility=d},A=1.2,E=function(i,o){if("text"==i.type&&(o[t]("text")||o[t]("font")||o[t]("font-size")||o[t]("x")||o[t]("y"))){var s=i.attrs,a=i.node,l=a.firstChild?r(n._g.doc.defaultView.getComputedStyle(a.firstChild,u).getPropertyValue("font-size"),10):10;if(o[t]("text")){for(s.text=o.text;a.firstChild;)a.removeChild(a.firstChild);for(var c,h=e(o.text).split("\n"),d=[],f=0,p=h.length;p>f;f++)c=m("tspan"),f&&m(c,{dy:l*A,x:s.x}),c.appendChild(n._g.doc.createTextNode(h[f])),a.appendChild(c),d[f]=c}else for(d=a.getElementsByTagName("tspan"),f=0,p=d.length;p>f;f++)f?m(d[f],{dy:l*A,x:s.x}):m(d[0],{dy:0});m(a,{x:s.x,y:s.y}),i._.dirty=1;var g=i._getBBox(),v=s.y-(g.y+g.height/2);v&&n.is(v,"finite")&&m(d[0],{dy:v})}},k=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=n._oid++,t.raphaelid=this.id,this.matrix=n.matrix(),this.realPath=null,this.paper=e,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},F=n.el;k.prototype=F,F.constructor=k,n._engine.path=function(t,e){var n=m("path");e.canvas&&e.canvas.appendChild(n);var i=new k(n,e);return i.type="path",C(i,{fill:"none",stroke:"#000",path:t}),i},F.rotate=function(t,n,r){if(this.removed)return this;if(t=e(t).split(c),t.length-1&&(n=i(t[1]),r=i(t[2])),t=i(t[0]),null==r&&(n=r),null==n||null==r){var o=this.getBBox(1);n=o.x+o.width/2,r=o.y+o.height/2}return this.transform(this._.transform.concat([["r",t,n,r]])),this},F.scale=function(t,n,r,o){if(this.removed)return this;if(t=e(t).split(c),t.length-1&&(n=i(t[1]),r=i(t[2]),o=i(t[3])),t=i(t[0]),null==n&&(n=t),null==o&&(r=o),null==r||null==o)var s=this.getBBox(1);return r=null==r?s.x+s.width/2:r,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,n,r,o]])),this},F.translate=function(t,n){return this.removed?this:(t=e(t).split(c),t.length-1&&(n=i(t[1])),t=i(t[0])||0,n=+n||0,this.transform(this._.transform.concat([["t",t,n]])),this)},F.transform=function(e){var i=this._;if(null==e)return i.transform;if(n._extractTransform(this,e),this.clip&&m(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&m(this.node,{transform:this.matrix}),1!=i.sx||1!=i.sy){var r=this.attrs[t]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":r})}return this},F.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},F.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},F.remove=function(){if(!this.removed&&this.node.parentNode){var t=this.paper;t.__set__&&t.__set__.exclude(this),h.unbind("raphael.*.*."+this.id),this.gradient&&t.defs.removeChild(this.gradient),n._tear(this,t),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var e in this)this[e]="function"==typeof this[e]?n._removedFactory(e):null;this.removed=!0}},F._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e={};try{e=this.node.getBBox()}catch(n){}finally{e=e||{}}return t&&this.hide(),e},F.attr=function(e,i){if(this.removed)return this;if(null==e){var r={};for(var o in this.attrs)this.attrs[t](o)&&(r[o]=this.attrs[o]);return r.gradient&&"none"==r.fill&&(r.fill=r.gradient)&&delete r.gradient,r.transform=this._.transform,r}if(null==i&&n.is(e,"string")){if("fill"==e&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==e)return this._.transform;for(var s=e.split(c),a={},l=0,u=s.length;u>l;l++)e=s[l],e in this.attrs?a[e]=this.attrs[e]:n.is(this.paper.customAttributes[e],"function")?a[e]=this.paper.customAttributes[e].def:a[e]=n._availableAttrs[e];return u-1?a:a[s[0]]}if(null==i&&n.is(e,"array")){for(a={},l=0,u=e.length;u>l;l++)a[e[l]]=this.attr(e[l]);return a}if(null!=i){var d={};d[e]=i}else null!=e&&n.is(e,"object")&&(d=e);for(var f in d)h("raphael.attr."+f+"."+this.id,this,d[f]);for(f in this.paper.customAttributes)if(this.paper.customAttributes[t](f)&&d[t](f)&&n.is(this.paper.customAttributes[f],"function")){var p=this.paper.customAttributes[f].apply(this,[].concat(d[f]));this.attrs[f]=d[f];for(var g in p)p[t](g)&&(d[g]=p[g])}return C(this,d),this},F.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var t=this.paper;return t.top!=this&&n._tofront(this,t),this},F.toBack=function(){if(this.removed)return this;var t=this.node.parentNode;"a"==t.tagName.toLowerCase()?t.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):t.firstChild!=this.node&&t.insertBefore(this.node,this.node.parentNode.firstChild),n._toback(this,this.paper);this.paper;return this},F.insertAfter=function(t){if(this.removed)return this;var e=t.node||t[t.length-1].node;return e.nextSibling?e.parentNode.insertBefore(this.node,e.nextSibling):e.parentNode.appendChild(this.node),n._insertafter(this,t,this.paper),this},F.insertBefore=function(t){if(this.removed)return this;var e=t.node||t[0].node;return e.parentNode.insertBefore(this.node,e),n._insertbefore(this,t,this.paper),this},F.blur=function(t){var e=this;if(0!==+t){var i=m("filter"),r=m("feGaussianBlur");e.attrs.blur=t,i.id=n.createUUID(),m(r,{stdDeviation:+t||1.5}),i.appendChild(r),e.paper.defs.appendChild(i),e._blur=i,m(e.node,{filter:"url(#"+i.id+")"})}else e._blur&&(e._blur.parentNode.removeChild(e._blur),delete e._blur,delete e.attrs.blur),e.node.removeAttribute("filter");return e},n._engine.circle=function(t,e,n,i){var r=m("circle");t.canvas&&t.canvas.appendChild(r);var o=new k(r,t);return o.attrs={cx:e,cy:n,r:i,fill:"none",stroke:"#000"},o.type="circle",m(r,o.attrs),o},n._engine.rect=function(t,e,n,i,r,o){var s=m("rect");t.canvas&&t.canvas.appendChild(s);var a=new k(s,t);return a.attrs={x:e,y:n,width:i,height:r,r:o||0,rx:o||0,ry:o||0,fill:"none",stroke:"#000"},a.type="rect",m(s,a.attrs),a},n._engine.ellipse=function(t,e,n,i,r){var o=m("ellipse");t.canvas&&t.canvas.appendChild(o);var s=new k(o,t);return s.attrs={cx:e,cy:n,rx:i,ry:r,fill:"none",stroke:"#000"},s.type="ellipse",m(o,s.attrs),s},n._engine.image=function(t,e,n,i,r,o){var s=m("image");m(s,{x:n,y:i,width:r,height:o,preserveAspectRatio:"none"}),s.setAttributeNS(f,"href",e),t.canvas&&t.canvas.appendChild(s);var a=new k(s,t);return a.attrs={x:n,y:i,width:r,height:o,src:e},a.type="image",a},n._engine.text=function(t,e,i,r){var o=m("text");t.canvas&&t.canvas.appendChild(o);var s=new k(o,t);return s.attrs={x:e,y:i,"text-anchor":"middle",text:r,font:n._availableAttrs.font,stroke:"none",fill:"#000"},s.type="text",C(s,s.attrs),s},n._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},n._engine.create=function(){var t=n._getContainer.apply(0,arguments),e=t&&t.container,i=t.x,r=t.y,o=t.width,s=t.height;if(!e)throw new Error("SVG container not found.");var a,l=m("svg"),c="overflow:hidden;";return i=i||0,r=r||0,o=o||512,s=s||342,m(l,{height:s,version:1.1,width:o,xmlns:"http://www.w3.org/2000/svg"}),1==e?(l.style.cssText=c+"position:absolute;left:"+i+"px;top:"+r+"px",n._g.doc.body.appendChild(l),a=1):(l.style.cssText=c+"position:relative",e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l)),e=new n._Paper,e.width=o,e.height=s,e.canvas=l,e.clear(),e._left=e._top=0,a&&(e.renderfix=function(){}),e.renderfix(),e},n._engine.setViewBox=function(t,e,n,i,r){h("raphael.setViewBox",this,this._viewBox,[t,e,n,i,r]);var o,a,l=s(n/this.width,i/this.height),c=this.top,u=r?"meet":"xMinYMin";for(null==t?(this._vbSize&&(l=1),delete this._vbSize,o="0 0 "+this.width+d+this.height):(this._vbSize=l,o=t+d+e+d+n+d+i),m(this.canvas,{viewBox:o,preserveAspectRatio:u});l&&c;)a="stroke-width"in c.attrs?c.attrs["stroke-width"]:1,c.attr({"stroke-width":a}),c._.dirty=1,c._.dirtyT=1,c=c.prev;return this._viewBox=[t,e,n,i,!!r],this},n.prototype.renderfix=function(){var t,e=this.canvas,n=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(i){t=e.createSVGMatrix()}var r=-t.e%1,o=-t.f%1;(r||o)&&(r&&(this._left=(this._left+r)%1,n.left=this._left+"px"),o&&(this._top=(this._top+o)%1,n.top=this._top+"px"))},n.prototype.clear=function(){n.eve("raphael.clear",this);for(var t=this.canvas;t.firstChild;)t.removeChild(t.firstChild);this.bottom=this.top=null,(this.desc=m("desc")).appendChild(n._g.doc.createTextNode("Created with Rapha\xebl "+n.version)),t.appendChild(this.desc),t.appendChild(this.defs=m("defs"))},n.prototype.remove=function(){h("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]="function"==typeof this[t]?n._removedFactory(t):null};var _=n.st;for(var D in F)F[t](D)&&!_[t](D)&&(_[D]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(D))}}(),function(){if(n.vml){var t="hasOwnProperty",e=String,i=parseFloat,r=Math,o=r.round,s=r.max,a=r.min,l=r.abs,c="fill",h=/[, ]+/,u=n.eve,d=" progid:DXImageTransform.Microsoft",f=" ",p="",g={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},m=/([clmz]),?([^clmz]*)/gi,v=/ progid:\S+Blur\([^\)]+\)/g,y=/-?[^,\s-]+/g,w="position:absolute;left:0;top:0;width:1px;height:1px",b=21600,x={path:1,rect:1,image:1},C={circle:1,ellipse:1},A=function(t){var i=/[ahqstv]/gi,r=n._pathToAbsolute;if(e(t).match(i)&&(r=n._path2curve),i=/[clmz]/g,r==n._pathToAbsolute&&!e(t).match(i)){var s=e(t).replace(m,function(t,e,n){var i=[],r="m"==e.toLowerCase(),s=g[e];return n.replace(y,function(t){r&&2==i.length&&(s+=i+g["m"==e?"l":"L"],i=[]),i.push(o(t*b))}),s+i});return s}var a,l,c=r(t);s=[];for(var h=0,u=c.length;u>h;h++){a=c[h],l=c[h][0].toLowerCase(),"z"==l&&(l="x");for(var d=1,v=a.length;v>d;d++)l+=o(a[d]*b)+(d!=v-1?",":p);s.push(l)}return s.join(f)},E=function(t,e,i){var r=n.matrix();return r.rotate(-t,.5,.5),{dx:r.x(e,i),dy:r.y(e,i)}},k=function(t,e,n,i,r,o){var s=t._,a=t.matrix,h=s.fillpos,u=t.node,d=u.style,p=1,g="",m=b/e,v=b/n;if(d.visibility="hidden",e&&n){if(u.coordsize=l(m)+f+l(v),d.rotation=o*(0>e*n?-1:1),o){var y=E(o,i,r);i=y.dx,r=y.dy}if(0>e&&(g+="x"),0>n&&(g+=" y")&&(p=-1),d.flip=g,u.coordorigin=i*-m+f+r*-v,h||s.fillsize){var w=u.getElementsByTagName(c);w=w&&w[0],u.removeChild(w),h&&(y=E(o,a.x(h[0],h[1]),a.y(h[0],h[1])),w.position=y.dx*p+f+y.dy*p),s.fillsize&&(w.size=s.fillsize[0]*l(e)+f+s.fillsize[1]*l(n)),u.appendChild(w)}d.visibility="visible"}};n.toString=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version};var F=function(t,n,i){for(var r=e(n).toLowerCase().split("-"),o=i?"end":"start",s=r.length,a="classic",l="medium",c="medium";s--;)switch(r[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":a=r[s];break;case"wide":case"narrow":c=r[s];break;case"long":case"short":l=r[s]}var h=t.node.getElementsByTagName("stroke")[0];h[o+"arrow"]=a,h[o+"arrowlength"]=l,h[o+"arrowwidth"]=c},_=function(r,l){r.attrs=r.attrs||{};var u=r.node,d=r.attrs,g=u.style,m=x[r.type]&&(l.x!=d.x||l.y!=d.y||l.width!=d.width||l.height!=d.height||l.cx!=d.cx||l.cy!=d.cy||l.rx!=d.rx||l.ry!=d.ry||l.r!=d.r),v=C[r.type]&&(d.cx!=l.cx||d.cy!=l.cy||d.r!=l.r||d.rx!=l.rx||d.ry!=l.ry),y=r;for(var w in l)l[t](w)&&(d[w]=l[w]);if(m&&(d.path=n._getPath[r.type](r),r._.dirty=1),l.href&&(u.href=l.href),l.title&&(u.title=l.title),l.target&&(u.target=l.target),l.cursor&&(g.cursor=l.cursor),"blur"in l&&r.blur(l.blur),(l.path&&"path"==r.type||m)&&(u.path=A(~e(d.path).toLowerCase().indexOf("r")?n._pathToAbsolute(d.path):d.path),"image"==r.type&&(r._.fillpos=[d.x,d.y],r._.fillsize=[d.width,d.height],k(r,1,1,0,0,0))),"transform"in l&&r.transform(l.transform),v){var E=+d.cx,_=+d.cy,S=+d.rx||+d.r||0,$=+d.ry||+d.r||0;u.path=n.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",o((E-S)*b),o((_-$)*b),o((E+S)*b),o((_+$)*b),o(E*b)),r._.dirty=1}if("clip-rect"in l){var B=e(l["clip-rect"]).split(h);if(4==B.length){B[2]=+B[2]+ +B[0],B[3]=+B[3]+ +B[1];var M=u.clipRect||n._g.doc.createElement("div"),L=M.style;L.clip=n.format("rect({1}px {2}px {3}px {0}px)",B),u.clipRect||(L.position="absolute",L.top=0,L.left=0,L.width=r.paper.width+"px",L.height=r.paper.height+"px",u.parentNode.insertBefore(M,u),M.appendChild(u),u.clipRect=M)}l["clip-rect"]||u.clipRect&&(u.clipRect.style.clip="auto")}if(r.textpath){var R=r.textpath.style;l.font&&(R.font=l.font),l["font-family"]&&(R.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,p)+'"'),l["font-size"]&&(R.fontSize=l["font-size"]),l["font-weight"]&&(R.fontWeight=l["font-weight"]),l["font-style"]&&(R.fontStyle=l["font-style"])}if("arrow-start"in l&&F(y,l["arrow-start"]),"arrow-end"in l&&F(y,l["arrow-end"],1),null!=l.opacity||null!=l["stroke-width"]||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var I=u.getElementsByTagName(c),P=!1;if(I=I&&I[0],!I&&(P=I=T(c)),"image"==r.type&&l.src&&(I.src=l.src),l.fill&&(I.on=!0),(null==I.on||"none"==l.fill||null===l.fill)&&(I.on=!1),I.on&&l.fill){var N=e(l.fill).match(n._ISURL);if(N){I.parentNode==u&&u.removeChild(I),I.rotate=!0,I.src=N[1],I.type="tile";var O=r.getBBox(1);I.position=O.x+f+O.y,r._.fillpos=[O.x,O.y],n._preload(N[1],function(){r._.fillsize=[this.offsetWidth,this.offsetHeight]})}else I.color=n.getRGB(l.fill).hex,I.src=p,I.type="solid",n.getRGB(l.fill).error&&(y.type in{circle:1,ellipse:1}||"r"!=e(l.fill).charAt())&&D(y,l.fill,I)&&(d.fill="none",d.gradient=l.fill,I.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var j=((+d["fill-opacity"]+1||2)-1)*((+d.opacity+1||2)-1)*((+n.getRGB(l.fill).o+1||2)-1);j=a(s(j,0),1),I.opacity=j,I.src&&(I.color="none")}u.appendChild(I);var z=u.getElementsByTagName("stroke")&&u.getElementsByTagName("stroke")[0],H=!1;!z&&(H=z=T("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(z.on=!0),("none"==l.stroke||null===l.stroke||null==z.on||0==l.stroke||0==l["stroke-width"])&&(z.on=!1);var W=n.getRGB(l.stroke);z.on&&l.stroke&&(z.color=W.hex),j=((+d["stroke-opacity"]+1||2)-1)*((+d.opacity+1||2)-1)*((+W.o+1||2)-1);var U=.75*(i(l["stroke-width"])||1);if(j=a(s(j,0),1),null==l["stroke-width"]&&(U=d["stroke-width"]),l["stroke-width"]&&(z.weight=U),U&&1>U&&(j*=U)&&(z.weight=1),z.opacity=j,l["stroke-linejoin"]&&(z.joinstyle=l["stroke-linejoin"]||"miter"),z.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(z.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),l["stroke-dasharray"]){var q={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};z.dashstyle=q[t](l["stroke-dasharray"])?q[l["stroke-dasharray"]]:p}H&&u.appendChild(z)}if("text"==y.type){y.paper.canvas.style.display=p;var Y=y.paper.span,G=100,V=d.font&&d.font.match(/\d+(?:\.\d*)?(?=px)/);g=Y.style,d.font&&(g.font=d.font),d["font-family"]&&(g.fontFamily=d["font-family"]),d["font-weight"]&&(g.fontWeight=d["font-weight"]),d["font-style"]&&(g.fontStyle=d["font-style"]),V=i(d["font-size"]||V&&V[0])||10,g.fontSize=V*G+"px",y.textpath.string&&(Y.innerHTML=e(y.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var K=Y.getBoundingClientRect();y.W=d.w=(K.right-K.left)/G,y.H=d.h=(K.bottom-K.top)/G,y.X=d.x,y.Y=d.y+y.H/2,("x"in l||"y"in l)&&(y.path.v=n.format("m{0},{1}l{2},{1}",o(d.x*b),o(d.y*b),o(d.x*b)+1));for(var X=["x","y","text","font","font-family","font-weight","font-style","font-size"],Z=0,Q=X.length;Q>Z;Z++)if(X[Z]in l){y._.dirty=1;break}switch(d["text-anchor"]){case"start":y.textpath.style["v-text-align"]="left",y.bbx=y.W/2;break;case"end":y.textpath.style["v-text-align"]="right",y.bbx=-y.W/2;break;default:y.textpath.style["v-text-align"]="center",y.bbx=0}y.textpath.style["v-text-kern"]=!0}},D=function(t,o,s){t.attrs=t.attrs||{};var a=(t.attrs,Math.pow),l="linear",c=".5 .5";if(t.attrs.gradient=o,o=e(o).replace(n._radial_gradient,function(t,e,n){return l="radial",e&&n&&(e=i(e),n=i(n),a(e-.5,2)+a(n-.5,2)>.25&&(n=r.sqrt(.25-a(e-.5,2))*(2*(n>.5)-1)+.5),c=e+f+n),p}),o=o.split(/\s*\-\s*/),"linear"==l){var h=o.shift();if(h=-i(h),isNaN(h))return null}var u=n._parseDots(o);if(!u)return null;if(t=t.shape||t.node,u.length){t.removeChild(s),s.on=!0,s.method="none",s.color=u[0].color,s.color2=u[u.length-1].color;for(var d=[],g=0,m=u.length;m>g;g++)u[g].offset&&d.push(u[g].offset+f+u[g].color);s.colors=d.length?d.join():"0% "+s.color,"radial"==l?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=c,s.angle=0):(s.type="gradient",s.angle=(270-h)%360),t.appendChild(s)}return 1},S=function(t,e){this[0]=this.node=t,t.raphael=!0,this.id=n._oid++,t.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=e,this.matrix=n.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!e.bottom&&(e.bottom=this),this.prev=e.top,e.top&&(e.top.next=this),e.top=this,this.next=null},$=n.el;S.prototype=$,$.constructor=S,$.transform=function(t){if(null==t)return this._.transform;var i,r=this.paper._viewBoxShift,o=r?"s"+[r.scale,r.scale]+"-1-1t"+[r.dx,r.dy]:p;r&&(i=t=e(t).replace(/\.{3}|\u2026/g,this._.transform||p)),n._extractTransform(this,o+t);var s,a=this.matrix.clone(),l=this.skew,c=this.node,h=~e(this.attrs.fill).indexOf("-"),u=!e(this.attrs.fill).indexOf("url(");if(a.translate(1,1),u||h||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",s=a.split(),h&&s.noRotation||!s.isSimple){c.style.filter=a.toFilter();var d=this.getBBox(),g=this.getBBox(1),m=d.x-g.x,v=d.y-g.y;c.coordorigin=m*-b+f+v*-b,k(this,1,1,m,v,0)}else c.style.filter=p,k(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else c.style.filter=p,l.matrix=e(a),l.offset=a.offset();return i&&(this._.transform=i),this},$.rotate=function(t,n,r){if(this.removed)return this;if(null!=t){if(t=e(t).split(h),t.length-1&&(n=i(t[1]),r=i(t[2])),t=i(t[0]),null==r&&(n=r),null==n||null==r){var o=this.getBBox(1);n=o.x+o.width/2,r=o.y+o.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,n,r]])),this}},$.translate=function(t,n){return this.removed?this:(t=e(t).split(h),t.length-1&&(n=i(t[1])),t=i(t[0])||0,n=+n||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=n),this.transform(this._.transform.concat([["t",t,n]])),this)},$.scale=function(t,n,r,o){if(this.removed)return this;if(t=e(t).split(h),t.length-1&&(n=i(t[1]),r=i(t[2]),o=i(t[3]),isNaN(r)&&(r=null),isNaN(o)&&(o=null)),t=i(t[0]),null==n&&(n=t),null==o&&(r=o),null==r||null==o)var s=this.getBBox(1);return r=null==r?s.x+s.width/2:r,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,n,r,o]])),this._.dirtyT=1,this},$.hide=function(){return!this.removed&&(this.node.style.display="none"),this},$.show=function(){return!this.removed&&(this.node.style.display=p),this},$._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},$.remove=function(){if(!this.removed&&this.node.parentNode){
this.paper.__set__&&this.paper.__set__.exclude(this),n.eve.unbind("raphael.*.*."+this.id),n._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var t in this)this[t]="function"==typeof this[t]?n._removedFactory(t):null;this.removed=!0}},$.attr=function(e,i){if(this.removed)return this;if(null==e){var r={};for(var o in this.attrs)this.attrs[t](o)&&(r[o]=this.attrs[o]);return r.gradient&&"none"==r.fill&&(r.fill=r.gradient)&&delete r.gradient,r.transform=this._.transform,r}if(null==i&&n.is(e,"string")){if(e==c&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=e.split(h),a={},l=0,d=s.length;d>l;l++)e=s[l],e in this.attrs?a[e]=this.attrs[e]:n.is(this.paper.customAttributes[e],"function")?a[e]=this.paper.customAttributes[e].def:a[e]=n._availableAttrs[e];return d-1?a:a[s[0]]}if(this.attrs&&null==i&&n.is(e,"array")){for(a={},l=0,d=e.length;d>l;l++)a[e[l]]=this.attr(e[l]);return a}var f;null!=i&&(f={},f[e]=i),null==i&&n.is(e,"object")&&(f=e);for(var p in f)u("raphael.attr."+p+"."+this.id,this,f[p]);if(f){for(p in this.paper.customAttributes)if(this.paper.customAttributes[t](p)&&f[t](p)&&n.is(this.paper.customAttributes[p],"function")){var g=this.paper.customAttributes[p].apply(this,[].concat(f[p]));this.attrs[p]=f[p];for(var m in g)g[t](m)&&(f[m]=g[m])}f.text&&"text"==this.type&&(this.textpath.string=f.text),_(this,f)}return this},$.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&n._tofront(this,this.paper),this},$.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),n._toback(this,this.paper)),this)},$.insertAfter=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[t.length-1]),t.node.nextSibling?t.node.parentNode.insertBefore(this.node,t.node.nextSibling):t.node.parentNode.appendChild(this.node),n._insertafter(this,t,this.paper),this)},$.insertBefore=function(t){return this.removed?this:(t.constructor==n.st.constructor&&(t=t[0]),t.node.parentNode.insertBefore(this.node,t.node),n._insertbefore(this,t,this.paper),this)},$.blur=function(t){var e=this.node.runtimeStyle,i=e.filter;return i=i.replace(v,p),0!==+t?(this.attrs.blur=t,e.filter=i+f+d+".Blur(pixelradius="+(+t||1.5)+")",e.margin=n.format("-{0}px 0 0 -{0}px",o(+t||1.5))):(e.filter=i,e.margin=0,delete this.attrs.blur),this},n._engine.path=function(t,e){var n=T("shape");n.style.cssText=w,n.coordsize=b+f+b,n.coordorigin=e.coordorigin;var i=new S(n,e),r={fill:"none",stroke:"#000"};t&&(r.path=t),i.type="path",i.path=[],i.Path=p,_(i,r),e.canvas.appendChild(n);var o=T("skew");return o.on=!0,n.appendChild(o),i.skew=o,i.transform(p),i},n._engine.rect=function(t,e,i,r,o,s){var a=n._rectPath(e,i,r,o,s),l=t.path(a),c=l.attrs;return l.X=c.x=e,l.Y=c.y=i,l.W=c.width=r,l.H=c.height=o,c.r=s,c.path=a,l.type="rect",l},n._engine.ellipse=function(t,e,n,i,r){var o=t.path();o.attrs;return o.X=e-i,o.Y=n-r,o.W=2*i,o.H=2*r,o.type="ellipse",_(o,{cx:e,cy:n,rx:i,ry:r}),o},n._engine.circle=function(t,e,n,i){var r=t.path();r.attrs;return r.X=e-i,r.Y=n-i,r.W=r.H=2*i,r.type="circle",_(r,{cx:e,cy:n,r:i}),r},n._engine.image=function(t,e,i,r,o,s){var a=n._rectPath(i,r,o,s),l=t.path(a).attr({stroke:"none"}),h=l.attrs,u=l.node,d=u.getElementsByTagName(c)[0];return h.src=e,l.X=h.x=i,l.Y=h.y=r,l.W=h.width=o,l.H=h.height=s,h.path=a,l.type="image",d.parentNode==u&&u.removeChild(d),d.rotate=!0,d.src=e,d.type="tile",l._.fillpos=[i,r],l._.fillsize=[o,s],u.appendChild(d),k(l,1,1,0,0,0),l},n._engine.text=function(t,i,r,s){var a=T("shape"),l=T("path"),c=T("textpath");i=i||0,r=r||0,s=s||"",l.v=n.format("m{0},{1}l{2},{1}",o(i*b),o(r*b),o(i*b)+1),l.textpathok=!0,c.string=e(s),c.on=!0,a.style.cssText=w,a.coordsize=b+f+b,a.coordorigin="0 0";var h=new S(a,t),u={fill:"#000",stroke:"none",font:n._availableAttrs.font,text:s};h.shape=a,h.path=l,h.textpath=c,h.type="text",h.attrs.text=e(s),h.attrs.x=i,h.attrs.y=r,h.attrs.w=1,h.attrs.h=1,_(h,u),a.appendChild(c),a.appendChild(l),t.canvas.appendChild(a);var d=T("skew");return d.on=!0,a.appendChild(d),h.skew=d,h.transform(p),h},n._engine.setSize=function(t,e){var i=this.canvas.style;return this.width=t,this.height=e,t==+t&&(t+="px"),e==+e&&(e+="px"),i.width=t,i.height=e,i.clip="rect(0 "+t+" "+e+" 0)",this._viewBox&&n._engine.setViewBox.apply(this,this._viewBox),this},n._engine.setViewBox=function(t,e,i,r,o){n.eve("raphael.setViewBox",this,this._viewBox,[t,e,i,r,o]);var a,l,c=this.width,h=this.height,u=1/s(i/c,r/h);return o&&(a=h/r,l=c/i,c>i*a&&(t-=(c-i*a)/2/a),h>r*l&&(e-=(h-r*l)/2/l)),this._viewBox=[t,e,i,r,!!o],this._viewBoxShift={dx:-t,dy:-e,scale:u},this.forEach(function(t){t.transform("...")}),this};var T;n._engine.initWin=function(t){var e=t.document;e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),T=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(n){T=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},n._engine.initWin(n._g.win),n._engine.create=function(){var t=n._getContainer.apply(0,arguments),e=t.container,i=t.height,r=t.width,o=t.x,s=t.y;if(!e)throw new Error("VML container not found.");var a=new n._Paper,l=a.canvas=n._g.doc.createElement("div"),c=l.style;return o=o||0,s=s||0,r=r||512,i=i||342,a.width=r,a.height=i,r==+r&&(r+="px"),i==+i&&(i+="px"),a.coordsize=1e3*b+f+1e3*b,a.coordorigin="0 0",a.span=n._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(a.span),c.cssText=n.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",r,i),1==e?(n._g.doc.body.appendChild(l),c.left=o+"px",c.top=s+"px",c.position="absolute"):e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l),a.renderfix=function(){},a},n.prototype.clear=function(){n.eve("raphael.clear",this),this.canvas.innerHTML=p,this.span=n._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},n.prototype.remove=function(){n.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]="function"==typeof this[t]?n._removedFactory(t):null;return!0};var B=n.st;for(var M in $)$[t](M)&&!B[t](M)&&(B[M]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(M))}}(),_.was?F.win.Raphael=n:Raphael=n,n}),/*!
 * g.Raphael 0.51 - Charting library, based on Raphaël
 *
 * Copyright (c) 2009-2012 Dmitry Baranovskiy (http://g.raphaeljs.com)
 * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
 */
Raphael.el.popup=function(t,e,n,i){var r,o,s,a,l,c=this.paper||this[0].paper;if(c){switch(this.type){case"text":case"circle":case"ellipse":s=!0;break;default:s=!1}t=null==t?"up":t,e=e||5,r=this.getBBox(),n="number"==typeof n?n:s?r.x+r.width/2:r.x,i="number"==typeof i?i:s?r.y+r.height/2:r.y,a=Math.max(r.width/2-e,0),l=Math.max(r.height/2-e,0),this.translate(n-r.x-(s?r.width/2:0),i-r.y-(s?r.height/2:0)),r=this.getBBox();var h={up:["M",n,i,"l",-e,-e,-a,0,"a",e,e,0,0,1,-e,-e,"l",0,-r.height,"a",e,e,0,0,1,e,-e,"l",2*e+2*a,0,"a",e,e,0,0,1,e,e,"l",0,r.height,"a",e,e,0,0,1,-e,e,"l",-a,0,"z"].join(","),down:["M",n,i,"l",e,e,a,0,"a",e,e,0,0,1,e,e,"l",0,r.height,"a",e,e,0,0,1,-e,e,"l",-(2*e+2*a),0,"a",e,e,0,0,1,-e,-e,"l",0,-r.height,"a",e,e,0,0,1,e,-e,"l",a,0,"z"].join(","),left:["M",n,i,"l",-e,e,0,l,"a",e,e,0,0,1,-e,e,"l",-r.width,0,"a",e,e,0,0,1,-e,-e,"l",0,-(2*e+2*l),"a",e,e,0,0,1,e,-e,"l",r.width,0,"a",e,e,0,0,1,e,e,"l",0,l,"z"].join(","),right:["M",n,i,"l",e,-e,0,-l,"a",e,e,0,0,1,e,-e,"l",r.width,0,"a",e,e,0,0,1,e,e,"l",0,2*e+2*l,"a",e,e,0,0,1,-e,e,"l",-r.width,0,"a",e,e,0,0,1,-e,-e,"l",0,-l,"z"].join(",")};return o={up:{x:-!s*(r.width/2),y:2*-e-(s?r.height/2:r.height)},down:{x:-!s*(r.width/2),y:2*e+(s?r.height/2:r.height)},left:{x:2*-e-(s?r.width/2:r.width),y:-!s*(r.height/2)},right:{x:2*e+(s?r.width/2:r.width),y:-!s*(r.height/2)}}[t],this.translate(o.x,o.y),c.path(h[t]).attr({fill:"#000",stroke:"none"}).insertBefore(this.node?this:this[0])}},Raphael.el.tag=function(t,e,n,i){var r=3,o=this.paper||this[0].paper;if(o){var s,a,l,c=o.path().attr({fill:"#000",stroke:"#000"}),h=this.getBBox();switch(this.type){case"text":case"circle":case"ellipse":l=!0;break;default:l=!1}return t=t||0,n="number"==typeof n?n:l?h.x+h.width/2:h.x,i="number"==typeof i?i:l?h.y+h.height/2:h.y,e=null==e?5:e,a=.5522*e,h.height>=2*e?c.attr({path:["M",n,i+e,"a",e,e,0,1,1,0,2*-e,e,e,0,1,1,0,2*e,"m",0,2*-e-r,"a",e+r,e+r,0,1,0,0,2*(e+r),"L",n+e+r,i+h.height/2+r,"l",h.width+2*r,0,0,-h.height-2*r,-h.width-2*r,0,"L",n,i-e-r].join(",")}):(s=Math.sqrt(Math.pow(e+r,2)-Math.pow(h.height/2+r,2)),c.attr({path:["M",n,i+e,"c",-a,0,-e,a-e,-e,-e,0,-a,e-a,-e,e,-e,a,0,e,e-a,e,e,0,a,a-e,e,-e,e,"M",n+s,i-h.height/2-r,"a",e+r,e+r,0,1,0,0,h.height+2*r,"l",e+r-s+h.width+2*r,0,0,-h.height-2*r,"L",n+s,i-h.height/2-r].join(",")})),t=360-t,c.rotate(t,n,i),this.attrs?(this.attr(this.attrs.x?"x":"cx",n+e+r+(l?h.width/2:"text"==this.type?h.width:0)).attr("y",l?i:i-h.height/2),this.rotate(t,n,i),t>90&&270>t&&this.attr(this.attrs.x?"x":"cx",n-e-r-(l?h.width/2:h.width)).rotate(180,n,i)):t>90&&270>t?(this.translate(n-h.x-h.width-e-r,i-h.y-h.height/2),this.rotate(t-180,h.x+h.width+e+r,h.y+h.height/2)):(this.translate(n-h.x+e+r,i-h.y-h.height/2),this.rotate(t,h.x-e-r,h.y+h.height/2)),c.insertBefore(this.node?this:this[0])}},Raphael.el.drop=function(t,e,n){var i,r,o,s,a,l=this.getBBox(),c=this.paper||this[0].paper;if(c){switch(this.type){case"text":case"circle":case"ellipse":i=!0;break;default:i=!1}return t=t||0,e="number"==typeof e?e:i?l.x+l.width/2:l.x,n="number"==typeof n?n:i?l.y+l.height/2:l.y,r=Math.max(l.width,l.height)+Math.min(l.width,l.height),o=c.path(["M",e,n,"l",r,0,"A",.4*r,.4*r,0,1,0,e+.7*r,n-.7*r,"z"]).attr({fill:"#000",stroke:"none"}).rotate(22.5-t,e,n),t=(t+90)*Math.PI/180,s=e+r*Math.sin(t)-(i?0:l.width/2),a=n+r*Math.cos(t)-(i?0:l.height/2),this.attrs?this.attr(this.attrs.x?"x":"cx",s).attr(this.attrs.y?"y":"cy",a):this.translate(s-l.x,a-l.y),o.insertBefore(this.node?this:this[0])}},Raphael.el.flag=function(t,e,n){var i=3,r=this.paper||this[0].paper;if(r){var o,s=r.path().attr({fill:"#000",stroke:"#000"}),a=this.getBBox(),l=a.height/2;switch(this.type){case"text":case"circle":case"ellipse":o=!0;break;default:o=!1}return t=t||0,e="number"==typeof e?e:o?a.x+a.width/2:a.x,n="number"==typeof n?n:o?a.y+a.height/2:a.y,s.attr({path:["M",e,n,"l",l+i,-l-i,a.width+2*i,0,0,a.height+2*i,-a.width-2*i,0,"z"].join(",")}),t=360-t,s.rotate(t,e,n),this.attrs?(this.attr(this.attrs.x?"x":"cx",e+l+i+(o?a.width/2:"text"==this.type?a.width:0)).attr("y",o?n:n-a.height/2),this.rotate(t,e,n),t>90&&270>t&&this.attr(this.attrs.x?"x":"cx",e-l-i-(o?a.width/2:a.width)).rotate(180,e,n)):t>90&&270>t?(this.translate(e-a.x-a.width-l-i,n-a.y-a.height/2),this.rotate(t-180,a.x+a.width+l+i,a.y+a.height/2)):(this.translate(e-a.x+l+i,n-a.y-a.height/2),this.rotate(t,a.x-l-i,a.y+a.height/2)),s.insertBefore(this.node?this:this[0])}},Raphael.el.label=function(){var t=this.getBBox(),e=this.paper||this[0].paper,n=Math.min(20,t.width+10,t.height+10)/2;if(e)return e.rect(t.x-n/2,t.y-n/2,t.width+n,t.height+n,n).attr({stroke:"none",fill:"#000"}).insertBefore(this.node?this:this[0])},Raphael.el.blob=function(t,e,n){var i,r,o,s=this.getBBox(),a=Math.PI/180,l=this.paper||this[0].paper;if(l){switch(this.type){case"text":case"circle":case"ellipse":r=!0;break;default:r=!1}i=l.path().attr({fill:"#000",stroke:"none"}),t=(+t+1?t:45)+90,o=Math.min(s.height,s.width),e="number"==typeof e?e:r?s.x+s.width/2:s.x,n="number"==typeof n?n:r?s.y+s.height/2:s.y;var c=Math.max(s.width+o,25*o/12),h=Math.max(s.height+o,25*o/12),u=e+o*Math.sin((t-22.5)*a),d=n+o*Math.cos((t-22.5)*a),f=e+o*Math.sin((t+22.5)*a),p=n+o*Math.cos((t+22.5)*a),g=(f-u)/2,m=(p-d)/2,v=c/2,y=h/2,w=-Math.sqrt(Math.abs(v*v*y*y-v*v*m*m-y*y*g*g)/(v*v*m*m+y*y*g*g)),b=w*v*m/y+(f+u)/2,x=w*-y*g/v+(p+d)/2;return i.attr({x:b,y:x,path:["M",e,n,"L",f,p,"A",v,y,0,1,1,u,d,"z"].join(",")}),this.translate(b-s.x-s.width/2,x-s.y-s.height/2),i.insertBefore(this.node?this:this[0])}},Raphael.fn.label=function(t,e,n){var i=this.set();return n=this.text(t,e,n).attr(Raphael.g.txtattr),i.push(n.label(),n)},Raphael.fn.popup=function(t,e,n,i,r){var o=this.set();return n=this.text(t,e,n).attr(Raphael.g.txtattr),o.push(n.popup(i,r),n)},Raphael.fn.tag=function(t,e,n,i,r){var o=this.set();return n=this.text(t,e,n).attr(Raphael.g.txtattr),o.push(n.tag(i,r),n)},Raphael.fn.flag=function(t,e,n,i){var r=this.set();return n=this.text(t,e,n).attr(Raphael.g.txtattr),r.push(n.flag(i),n)},Raphael.fn.drop=function(t,e,n,i){var r=this.set();return n=this.text(t,e,n).attr(Raphael.g.txtattr),r.push(n.drop(i),n)},Raphael.fn.blob=function(t,e,n,i){var r=this.set();return n=this.text(t,e,n).attr(Raphael.g.txtattr),r.push(n.blob(i),n)},Raphael.el.lighter=function(t){t=t||2;var e=[this.attrs.fill,this.attrs.stroke];return this.fs=this.fs||[e[0],e[1]],e[0]=Raphael.rgb2hsb(Raphael.getRGB(e[0]).hex),e[1]=Raphael.rgb2hsb(Raphael.getRGB(e[1]).hex),e[0].b=Math.min(e[0].b*t,1),e[0].s=e[0].s/t,e[1].b=Math.min(e[1].b*t,1),e[1].s=e[1].s/t,this.attr({fill:"hsb("+[e[0].h,e[0].s,e[0].b]+")",stroke:"hsb("+[e[1].h,e[1].s,e[1].b]+")"}),this},Raphael.el.darker=function(t){t=t||2;var e=[this.attrs.fill,this.attrs.stroke];return this.fs=this.fs||[e[0],e[1]],e[0]=Raphael.rgb2hsb(Raphael.getRGB(e[0]).hex),e[1]=Raphael.rgb2hsb(Raphael.getRGB(e[1]).hex),e[0].s=Math.min(e[0].s*t,1),e[0].b=e[0].b/t,e[1].s=Math.min(e[1].s*t,1),e[1].b=e[1].b/t,this.attr({fill:"hsb("+[e[0].h,e[0].s,e[0].b]+")",stroke:"hsb("+[e[1].h,e[1].s,e[1].b]+")"}),this},Raphael.el.resetBrightness=function(){return this.fs&&(this.attr({fill:this.fs[0],stroke:this.fs[1]}),delete this.fs),this},function(){var t=["lighter","darker","resetBrightness"],e=["popup","tag","flag","label","drop","blob"];for(var n in e)(function(t){Raphael.st[t]=function(){return Raphael.el[t].apply(this,arguments)}})(e[n]);for(var n in t)(function(t){Raphael.st[t]=function(){for(var e=0;e<this.length;e++)this[e][t].apply(this[e],arguments);return this}})(t[n])}(),Raphael.g={shim:{stroke:"none",fill:"#000","fill-opacity":0},txtattr:{font:"12px Arial, sans-serif",fill:"#fff"},colors:function(){for(var t=[.6,.2,.05,.1333,.75,0],e=[],n=0;10>n;n++)n<t.length?e.push("hsb("+t[n]+",.75, .75)"):e.push("hsb("+t[n-t.length]+", 1, .5)");return e}(),snapEnds:function(t,e,n){function i(t){return Math.abs(t-.5)<.25?~~t+.5:Math.round(t)}var r=t,o=e;if(r==o)return{from:r,to:o,power:0};var s=(o-r)/n,a=~~s,l=a,c=0;if(a){for(;l;)c--,l=~~(s*Math.pow(10,c))/Math.pow(10,c);c++}else{if(0!=s&&isFinite(s))for(;!a;)c=c||1,a=~~(s*Math.pow(10,c))/Math.pow(10,c),c++;else c=1;c&&c--}return o=i(e*Math.pow(10,c))/Math.pow(10,c),e>o&&(o=i((e+.5)*Math.pow(10,c))/Math.pow(10,c)),r=i((t-(c>0?0:.5))*Math.pow(10,c))/Math.pow(10,c),{from:r,to:o,power:c}},axis:function(t,e,n,i,r,o,s,a,l,c,h){c=null==c?2:c,l=l||"t",o=o||10,h=arguments[arguments.length-1];var u,d="|"==l||" "==l?["M",t+.5,e,"l",0,.001]:1==s||3==s?["M",t+.5,e,"l",0,-n]:["M",t,e+.5,"l",n,0],f=this.snapEnds(i,r,o),p=f.from,g=f.to,m=f.power,v=0,y={font:"11px 'Fontin Sans', Fontin-Sans, sans-serif"},w=h.set();u=(g-p)/o;var b=p,x=m>0?m:0;if(k=n/o,1==+s||3==+s){for(var C=e,A=(s-1?1:-1)*(c+3+!!(s-1));C>=e-n;)"-"!=l&&" "!=l&&(d=d.concat(["M",t-("+"==l||"|"==l?c:!(s-1)*c*2),C+.5,"l",2*c+1,0])),w.push(h.text(t+A,C,a&&a[v++]||(Math.round(b)==b?b:+b.toFixed(x))).attr(y).attr({"text-anchor":s-1?"start":"end"})),b+=u,C-=k;Math.round(C+k-(e-n))&&("-"!=l&&" "!=l&&(d=d.concat(["M",t-("+"==l||"|"==l?c:!(s-1)*c*2),e-n+.5,"l",2*c+1,0])),w.push(h.text(t+A,e-n,a&&a[v]||(Math.round(b)==b?b:+b.toFixed(x))).attr(y).attr({"text-anchor":s-1?"start":"end"})))}else{b=p,x=(m>0)*m,A=(s?-1:1)*(c+9+!s);for(var E=t,k=n/o,F=0,_=0;t+n>=E;){"-"!=l&&" "!=l&&(d=d.concat(["M",E+.5,e-("+"==l?c:!!s*c*2),"l",0,2*c+1])),w.push(F=h.text(E,e+A,a&&a[v++]||(Math.round(b)==b?b:+b.toFixed(x))).attr(y));var D=F.getBBox();_>=D.x-5?w.pop(w.length-1).remove():_=D.x+D.width,b+=u,E+=k}Math.round(E-k-t-n)&&("-"!=l&&" "!=l&&(d=d.concat(["M",t+n+.5,e-("+"==l?c:!!s*c*2),"l",0,2*c+1])),w.push(h.text(t+n,e+A,a&&a[v]||(Math.round(b)==b?b:+b.toFixed(x))).attr(y)))}var S=h.path(d);return S.text=w,S.all=h.set([S,w]),S.remove=function(){this.text.remove(),this.constructor.prototype.remove.call(this)},S},labelise:function(t,e,n){return t?(t+"").replace(/(##+(?:\.#+)?)|(%%+(?:\.%+)?)/g,function(t,i,r){return i?(+e).toFixed(i.replace(/^#+\.?/g,"").length):r?(100*e/n).toFixed(r.replace(/^%+\.?/g,"").length)+"%":void 0}):(+e).toFixed(0)}},/*!
 * g.Raphael 0.51 - Charting library, based on Raphaël
 *
 * Copyright (c) 2009-2012 Dmitry Baranovskiy (http://g.raphaeljs.com)
 * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
 */
function(){function t(t,e,n,o,s,a,l,c){var h,u={round:"round",sharp:"sharp",soft:"soft",square:"square"};if(s&&!o||!s&&!n)return l?"":c.path();switch(a=u[a]||"square",o=Math.round(o),n=Math.round(n),t=Math.round(t),e=Math.round(e),a){case"round":if(s)d=~~(n/2),d>o?(d=o,h=["M",t-~~(n/2),e,"l",0,0,"a",~~(n/2),d,0,0,1,n,0,"l",0,0,"z"]):h=["M",t-d,e,"l",0,d-o,"a",d,d,0,1,1,n,0,"l",0,o-d,"z"];else{var d=~~(o/2);d>n?(d=n,h=["M",t+.5,e+.5-~~(o/2),"l",0,0,"a",d,~~(o/2),0,0,1,0,o,"l",0,0,"z"]):h=["M",t+.5,e+.5-d,"l",n-d,0,"a",d,d,0,1,1,0,o,"l",d-n,0,"z"]}break;case"sharp":if(s)f=~~(n/2),h=["M",t+f,e,"l",-n,0,0,-r(o-f,0),f,-i(f,o),f,i(f,o),f,"z"];else{var f=~~(o/2);h=["M",t,e+f,"l",0,-o,r(n-f,0),0,i(f,n),f,-i(f,n),f+(o>2*f),"z"]}break;case"square":h=s?["M",t+~~(n/2),e,"l",1-n,0,0,-o,n-1,0,"z"]:["M",t,e+~~(o/2),"l",0,-o,n,0,0,o,"z"];break;case"soft":s?(d=i(Math.round(n/5),o),h=["M",t-~~(n/2),e,"l",0,d-o,"a",d,d,0,0,1,d,-d,"l",n-2*d,0,"a",d,d,0,0,1,d,d,"l",0,o-d,"z"]):(d=i(n,Math.round(o/5)),h=["M",t+.5,e+.5-~~(o/2),"l",n-d,0,"a",d,d,0,0,1,d,d,"l",0,o-2*d,"a",d,d,0,0,1,-d,d,"l",d-n,0,"z"])}return l?h.join(","):c.path(h)}function e(e,n,i,r,o,s,a){a=a||{};var l=this,c=a.type||"square",h=parseFloat(a.gutter||"20%"),u=e.set(),d=e.set(),f=e.set(),p=e.set(),g=Math.max.apply(Math,s),m=[],v=0,y=a.colors||l.colors,w=s.length;if(Raphael.is(s[0],"array")){g=[],v=w,w=0;for(var b=s.length;b--;)d.push(e.set()),g.push(Math.max.apply(Math,s[b])),w=Math.max(w,s[b].length);if(a.stacked)for(var b=w;b--;){for(var x=0,C=s.length;C--;)x+=+s[C][b]||0;m.push(x)}for(var b=s.length;b--;)if(s[b].length<w)for(var C=w;C--;)s[b].push(0);g=Math.max.apply(Math,a.stacked?m:g)}g=a.to||g;var A=r/(w*(100+h)+h)*100,E=A*h/100,k=null==a.vgutter?20:a.vgutter,F=[],_=n+E,D=(o-2*k)/g;a.stretch||(E=Math.round(E),A=Math.floor(A)),!a.stacked&&(A/=v||1);for(var b=0;w>b;b++){F=[];for(var C=0;(v||1)>C;C++){var S=Math.round((v?s[C][b]:s[b])*D),$=i+o-k-S,T=t(Math.round(_+A/2),$+S,A,S,!0,c,null,e).attr({stroke:"none",fill:y[v?C:b]});v?d[C].push(T):d.push(T),T.y=$,T.x=Math.round(_+A/2),T.w=A,T.h=S,T.value=v?s[C][b]:s[b],a.stacked?F.push(T):_+=A}if(a.stacked){var B;p.push(B=e.rect(F[0].x-F[0].w/2,i,A,o).attr(l.shim)),B.bars=e.set();for(var M=0,L=F.length;L--;)F[L].toFront();for(var L=0,R=F.length;R>L;L++){var I,T=F[L],S=(M+T.value)*D,P=t(T.x,i+o-k-.5*!!M,A,S,!0,c,1,e);B.bars.push(T),M&&T.attr({path:P}),T.h=S,T.y=i+o-k-.5*!!M-S,f.push(I=e.rect(T.x-T.w/2,T.y,A,T.value*D).attr(l.shim)),I.bar=T,I.value=T.value,M+=T.value}_+=A}_+=E}if(p.toFront(),_=n+E,!a.stacked)for(var b=0;w>b;b++){for(var C=0;(v||1)>C;C++){var I;f.push(I=e.rect(Math.round(_),i+k,A,o-k).attr(l.shim)),I.bar=v?d[C][b]:d[b],I.value=I.bar.value,_+=A}_+=E}return u.label=function(t,n){t=t||[],this.labels=e.set();var r,l=-(1/0);if(a.stacked){for(var c=0;w>c;c++)for(var h=0,u=0;(v||1)>u;u++)if(h+=v?s[u][c]:s[c],u==v-1){var p=e.labelise(t[c],h,g);r=e.text(d[c*(v||1)+u].x,i+o-k/2,p).attr(txtattr).insertBefore(f[c*(v||1)+u]);var m=r.getBBox();m.x-7<l?r.remove():(this.labels.push(r),l=m.x+m.width)}}else for(var c=0;w>c;c++)for(var u=0;(v||1)>u;u++){var p=e.labelise(v?t[u]&&t[u][c]:t[c],v?s[u][c]:s[c],g);r=e.text(d[c*(v||1)+u].x,n?i+o-k/2:d[c*(v||1)+u].y-10,p).attr(txtattr).insertBefore(f[c*(v||1)+u]);var m=r.getBBox();m.x-7<l?r.remove():(this.labels.push(r),l=m.x+m.width)}return this},u.hover=function(t,e){return p.hide(),f.show(),f.mouseover(t).mouseout(e),this},u.hoverColumn=function(t,e){return f.hide(),p.show(),e=e||function(){},p.mouseover(t).mouseout(e),this},u.click=function(t){return p.hide(),f.show(),f.click(t),this},u.each=function(t){if(!Raphael.is(t,"function"))return this;for(var e=f.length;e--;)t.call(f[e]);return this},u.eachColumn=function(t){if(!Raphael.is(t,"function"))return this;for(var e=p.length;e--;)t.call(p[e]);return this},u.clickColumn=function(t){return f.hide(),p.show(),p.click(t),this},u.push(d,f,p),u.bars=d,u.covers=f,u}function n(e,n,i,r,o,s,a){a=a||{};var l=this,c=a.type||"square",h=parseFloat(a.gutter||"20%"),u=e.set(),d=e.set(),f=e.set(),p=e.set(),g=Math.max.apply(Math,s),m=[],v=0,y=a.colors||l.colors,w=s.length;if(Raphael.is(s[0],"array")){g=[],v=w,w=0;for(var b=s.length;b--;)d.push(e.set()),g.push(Math.max.apply(Math,s[b])),w=Math.max(w,s[b].length);if(a.stacked)for(var b=w;b--;){for(var x=0,C=s.length;C--;)x+=+s[C][b]||0;m.push(x)}for(var b=s.length;b--;)if(s[b].length<w)for(var C=w;C--;)s[b].push(0);g=Math.max.apply(Math,a.stacked?m:g)}g=a.to||g;var A=Math.floor(o/(w*(100+h)+h)*100),E=Math.floor(A*h/100),k=[],F=i+E,_=(r-1)/g;!a.stacked&&(A/=v||1);for(var b=0;w>b;b++){k=[];for(var C=0;(v||1)>C;C++){var D=v?s[C][b]:s[b],S=t(n,F+A/2,Math.round(D*_),A-1,!1,c,null,e).attr({stroke:"none",fill:y[v?C:b]});v?d[C].push(S):d.push(S),S.x=n+Math.round(D*_),S.y=F+A/2,S.w=Math.round(D*_),S.h=A,S.value=+D,a.stacked?k.push(S):F+=A}if(a.stacked){var $=e.rect(n,k[0].y-k[0].h/2,r,A).attr(l.shim);p.push($),$.bars=e.set();for(var T=0,B=k.length;B--;)k[B].toFront();for(var B=0,M=k.length;M>B;B++){var L,S=k[B],D=Math.round((T+S.value)*_),R=t(n,S.y,D,A-1,!1,c,1,e);$.bars.push(S),T&&S.attr({path:R}),S.w=D,S.x=n+D,f.push(L=e.rect(n+T*_,S.y-S.h/2,S.value*_,A).attr(l.shim)),L.bar=S,T+=S.value}F+=A}F+=E}if(p.toFront(),F=i+E,!a.stacked)for(var b=0;w>b;b++){for(var C=0;(v||1)>C;C++){var L=e.rect(n,F,r,A).attr(l.shim);f.push(L),L.bar=v?d[C][b]:d[b],L.value=L.bar.value,F+=A}F+=E}return u.label=function(t,i){t=t||[],this.labels=e.set();for(var r=0;w>r;r++)for(var o=0;v>o;o++){var a,l=e.labelise(v?t[o]&&t[o][r]:t[r],v?s[o][r]:s[r],g),c=i?d[r*(v||1)+o].x-A/2+3:n+5,h=i?"end":"start";this.labels.push(a=e.text(c,d[r*(v||1)+o].y,l).attr(txtattr).attr({"text-anchor":h}).insertBefore(f[0])),a.getBBox().x<n+5?a.attr({x:n+5,"text-anchor":"start"}):d[r*(v||1)+o].label=a}return this},u.hover=function(t,e){return p.hide(),f.show(),e=e||function(){},f.mouseover(t).mouseout(e),this},u.hoverColumn=function(t,e){return f.hide(),p.show(),e=e||function(){},p.mouseover(t).mouseout(e),this},u.each=function(t){if(!Raphael.is(t,"function"))return this;for(var e=f.length;e--;)t.call(f[e]);return this},u.eachColumn=function(t){if(!Raphael.is(t,"function"))return this;for(var e=p.length;e--;)t.call(p[e]);return this},u.click=function(t){return p.hide(),f.show(),f.click(t),this},u.clickColumn=function(t){return f.hide(),p.show(),p.click(t),this},u.push(d,f,p),u.bars=d,u.covers=f,u}var i=Math.min,r=Math.max,o=function(){};o.prototype=Raphael.g,n.prototype=e.prototype=new o,Raphael.fn.barchart=function(t,n,i,r,o,s){return new e(this,t,n,i,r,o,s)},Raphael.fn.hbarchart=function(t,e,i,r,o,s){return new n(this,t,e,i,r,o,s)}}(),/*!
 * Chart.js
 * http://chartjs.org/
 * Version: 1.0.2
 *
 * Copyright 2015 Nick Downie
 * Released under the MIT license
 * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
 */
function(){"use strict";var t=this,e=t.Chart,n=function(t){this.canvas=t.canvas,this.ctx=t;var e=function(t,e){return t["offset"+e]?t["offset"+e]:document.defaultView.getComputedStyle(t).getPropertyValue(e)},n=this.width=e(t.canvas,"Width"),r=this.height=e(t.canvas,"Height");t.canvas.width=n,t.canvas.height=r;var n=this.width=t.canvas.width,r=this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,i.retinaScale(this),this};n.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},n.types={};var i=n.helpers={},r=i.each=function(t,e,n){var i=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var r;for(r=0;r<t.length;r++)e.apply(n,[t[r],r].concat(i))}else for(var o in t)e.apply(n,[t[o],o].concat(i))},o=i.clone=function(t){var e={};return r(t,function(n,i){t.hasOwnProperty(i)&&(e[i]=n)}),e},s=i.extend=function(t){return r(Array.prototype.slice.call(arguments,1),function(e){r(e,function(n,i){e.hasOwnProperty(i)&&(t[i]=n)})}),t},a=i.merge=function(t,e){var n=Array.prototype.slice.call(arguments,0);return n.unshift({}),s.apply(null,n)},l=i.indexOf=function(t,e){if(Array.prototype.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1},c=(i.where=function(t,e){var n=[];return i.each(t,function(t){e(t)&&n.push(t)}),n},i.findNextWhere=function(t,e,n){n||(n=-1);for(var i=n+1;i<t.length;i++){var r=t[i];if(e(r))return r}},i.findPreviousWhere=function(t,e,n){n||(n=t.length);for(var i=n-1;i>=0;i--){var r=t[i];if(e(r))return r}},i.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=c,t&&s(n.prototype,t),n.__super__=e.prototype,n}),h=i.noop=function(){},u=i.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=i.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},f=i.amd="function"==typeof define&&define.amd,p=i.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=i.max=function(t){return Math.max.apply(Math,t)},m=i.min=function(t){return Math.min.apply(Math,t)},v=(i.cap=function(t,e,n){if(p(e)){if(t>e)return e}else if(p(n)&&n>t)return n;return t},i.getDecimalPlaces=function(t){return t%1!==0&&p(t)?t.toString().split(".")[1].length:0}),y=i.radians=function(t){return t*(Math.PI/180)},w=(i.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i),o=2*Math.PI+Math.atan2(i,n);return 0>n&&0>i&&(o+=2*Math.PI),{angle:o,distance:r}},i.aliasPixel=function(t){return t%2===0?0:.5}),b=(i.splineCurve=function(t,e,n,i){var r=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),o=Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2)),s=i*r/(r+o),a=i*o/(r+o);return{inner:{x:e.x-s*(n.x-t.x),y:e.y-s*(n.y-t.y)},outer:{x:e.x+a*(n.x-t.x),y:e.y+a*(n.y-t.y)}}},i.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),x=(i.calculateScaleRange=function(t,e,n,i,r){var o=2,s=Math.floor(e/(1.5*n)),a=o>=s,l=g(t),c=m(t);l===c&&(l+=.5,c>=.5&&!i?c-=.5:l+=.5);for(var h=Math.abs(l-c),u=b(h),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),f=i?0:Math.floor(c/(1*Math.pow(10,u)))*Math.pow(10,u),p=d-f,v=Math.pow(10,u),y=Math.round(p/v);(y>s||s>2*y)&&!a;)if(y>s)v*=2,y=Math.round(p/v),y%1!==0&&(a=!0);else if(r&&u>=0){if(v/2%1!==0)break;v/=2,y=Math.round(p/v)}else v/=2,y=Math.round(p/v);return a&&(y=o,v=p/y),{steps:y,stepValue:v,min:f,max:f+y*v}},i.template=function(t,e){function n(t,e){var n=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join("	").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("	").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):i[t]=i[t];return e?n(e):n}if(t instanceof Function)return t(e);var i={};return n(t,e)}),C=(i.generateLabels=function(t,e,n,i){var o=new Array(e);return labelTemplateString&&r(o,function(e,r){o[r]=x(t,{value:n+i*(r+1)})}),o},i.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1==(t/=1)?1:(n||(n=.3),i<Math.abs(1)?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-(i*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/n)))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1==(t/=1)?1:(n||(n=.3),i<Math.abs(1)?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((1*t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=1*(.3*1.5)),i<Math.abs(1)?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),1>t?-.5*(i*Math.pow(2,10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/n)):i*Math.pow(2,-10*(t-=1))*Math.sin((1*t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-C.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*C.easeInBounce(2*t):.5*C.easeOutBounce(2*t-1)+.5}}),A=i.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),E=i.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),k=(i.animationLoop=function(t,e,n,i,r,o){var s=0,a=C[n]||C.linear,l=function(){s++;var n=s/e,c=a(n);t.call(o,c,n,s),i.call(o,c,n),e>s?o.animationFrame=A(l):r.apply(o)};A(l)},i.getRelativePosition=function(t){var e,n,i=t.originalEvent||t,r=t.currentTarget||t.srcElement,o=r.getBoundingClientRect();return i.touches?(e=i.touches[0].clientX-o.left,n=i.touches[0].clientY-o.top):(e=i.clientX-o.left,n=i.clientY-o.top),{x:e,y:n}},i.addEvent=function(t,e,n){t.addEventListener?t.addEventListener(e,n):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n}),F=i.removeEvent=function(t,e,n){t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=h},_=(i.bindEvents=function(t,e,n){t.events||(t.events={}),r(e,function(e){t.events[e]=function(){n.apply(t,arguments)},k(t.chart.canvas,e,t.events[e])})},i.unbindEvents=function(t,e){r(e,function(e,n){F(t.chart.canvas,n,e)})}),D=i.getMaximumWidth=function(t){var e=t.parentNode;return e.clientWidth},S=i.getMaximumHeight=function(t){var e=t.parentNode;return e.clientHeight},$=(i.getMaximumSize=i.getMaximumWidth,i.retinaScale=function(t){var e=t.ctx,n=t.canvas.width,i=t.canvas.height;window.devicePixelRatio&&(e.canvas.style.width=n+"px",e.canvas.style.height=i+"px",e.canvas.height=i*window.devicePixelRatio,e.canvas.width=n*window.devicePixelRatio,e.scale(window.devicePixelRatio,window.devicePixelRatio))}),T=i.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},B=i.fontString=function(t,e,n){return e+" "+t+"px "+n},M=i.longestText=function(t,e,n){t.font=e;var i=0;return r(n,function(e){var n=t.measureText(e).width;i=n>i?n:i}),i},L=i.drawRoundedRectangle=function(t,e,n,i,r,o){t.beginPath(),t.moveTo(e+o,n),t.lineTo(e+i-o,n),t.quadraticCurveTo(e+i,n,e+i,n+o),t.lineTo(e+i,n+r-o),t.quadraticCurveTo(e+i,n+r,e+i-o,n+r),t.lineTo(e+o,n+r),t.quadraticCurveTo(e,n+r,e,n+r-o),t.lineTo(e,n+o),t.quadraticCurveTo(e,n,e+o,n),t.closePath()};n.instances={},n.Type=function(t,e,i){this.options=e,this.chart=i,this.id=u(),n.instances[this.id]=this,e.responsive&&this.resize(),this.initialize.call(this,t)},s(n.Type.prototype,{initialize:function(){return this},clear:function(){return T(this.chart),this},stop:function(){return E(this.animationFrame),this},resize:function(t){this.stop();var e=this.chart.canvas,n=D(this.chart.canvas),i=this.options.maintainAspectRatio?n/this.chart.aspectRatio:S(this.chart.canvas);return e.width=this.chart.width=n,e.height=this.chart.height=i,$(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:h,render:function(t){return t&&this.reflow(),this.options.animation&&!t?i.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return x(this.options.legendTemplate,this)},destroy:function(){this.clear(),_(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete n.instances[this.id]},showTooltip:function(t,e){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var e=!1;return t.length!==this.activeElements.length?e=!0:(r(t,function(t,n){t!==this.activeElements[n]&&(e=!0)},this),e)}.call(this,t);if(o||e){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var s,a,c=this.datasets.length-1;c>=0&&(s=this.datasets[c].points||this.datasets[c].bars||this.datasets[c].segments,a=l(s,t[0]),-1===a);c--);var h=[],u=[],d=function(t){var e,n,r,o,s,l=[],c=[],d=[];return i.each(this.datasets,function(t){e=t.points||t.bars||t.segments,e[a]&&e[a].hasValue()&&l.push(e[a])}),i.each(l,function(t){c.push(t.x),d.push(t.y),h.push(i.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),s=m(d),r=g(d),o=m(c),n=g(c),{x:o>this.chart.width/2?o:n,y:(s+r)/2}}.call(this,a);new n.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:h,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else r(t,function(t){var e=t.tooltipPosition();new n.Tooltip({x:Math.round(e.x),y:Math.round(e.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:x(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),n.Type.extend=function(t){var e=this,i=function(){return e.apply(this,arguments)};if(i.prototype=o(e.prototype),s(i.prototype,t),i.extend=n.Type.extend,t.name||e.prototype.name){var r=t.name||e.prototype.name,l=n.defaults[e.prototype.name]?o(n.defaults[e.prototype.name]):{};n.defaults[r]=s(l,t.defaults),n.types[r]=i,n.prototype[r]=function(t,e){var o=a(n.defaults.global,n.defaults[r],e||{});return new i(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return e},n.Element=function(t){s(this,t),this.initialize.apply(this,arguments),this.save()},s(n.Element.prototype,{initialize:function(){},restore:function(t){return t?r(t,function(t){this[t]=this._saved[t]},this):s(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return r(t,function(t,e){this._saved[e]=this[e],this[e]=t},this),this},transition:function(t,e){return r(t,function(t,n){this[n]=(t-this._saved[n])*e+this._saved[n]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return p(this.value)}}),n.Element.extend=c,n.Point=n.Element.extend({display:!0,inRange:function(t,e){var n=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(e-this.y,2)<Math.pow(n,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),n.Arc=n.Element.extend({inRange:function(t,e){var n=i.getAngleFromPoint(this,{x:t,y:e}),r=n.angle>=this.startAngle&&n.angle<=this.endAngle,o=n.distance>=this.innerRadius&&n.distance<=this.outerRadius;return r&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,e=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*e,y:this.y+Math.sin(t)*e}},draw:function(t){var e=this.ctx;e.beginPath(),e.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),e.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),e.closePath(),e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.fillStyle=this.fillColor,e.fill(),e.lineJoin="bevel",this.showStroke&&e.stroke()}}),n.Rectangle=n.Element.extend({draw:function(){var t=this.ctx,e=this.width/2,n=this.x-e,i=this.x+e,r=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(n+=o,i-=o,r+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(n,this.base),t.lineTo(n,r),t.lineTo(i,r),t.lineTo(i,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,e){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&e>=this.y&&e<=this.base}}),n.Tooltip=n.Element.extend({draw:function(){var t=this.chart.ctx;t.font=B(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var e=this.caretPadding=2,n=t.measureText(this.text).width+2*this.xPadding,i=this.fontSize+2*this.yPadding,r=i+this.caretHeight+e;this.x+n/2>this.chart.width?this.xAlign="left":this.x-n/2<0&&(this.xAlign="right"),this.y-r<0&&(this.yAlign="below");var o=this.x-n/2,s=this.y-r;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-e),t.lineTo(this.x+this.caretHeight,this.y-(e+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(e+this.caretHeight)),t.closePath(),t.fill();break;case"below":s=this.y+e+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+e),t.lineTo(this.x+this.caretHeight,this.y+e+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+e+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-n+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}L(t,o,s,n,i,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+n/2,s+i/2)}}}),n.MultiTooltip=n.Element.extend({initialize:function(){this.font=B(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=B(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,e=M(this.ctx,this.font,this.labels)+this.fontSize+3,n=g([e,t]);this.width=n+2*this.xPadding;var i=this.height/2;this.y-i<0?this.y=i:this.y+i>this.chart.height&&(this.y=this.chart.height-i),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var e=this.y-this.height/2+this.yPadding,n=t-1;return 0===t?e+this.titleFontSize/2:e+(1.5*this.fontSize*n+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{L(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,i.each(this.labels,function(e,n){t.fillStyle=this.textColor,t.fillText(e,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(n+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[n].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),n.Scale=n.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(x(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?M(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,e=this.endPoint-this.startPoint;for(this.calculateYRange(e),this.buildYLabels(),this.calculateXLabelRotation();e>this.endPoint-this.startPoint;)e=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(e),this.buildYLabels(),t<this.yLabelWidth&&this.calculateXLabelRotation()},calculateXLabelRotation:function(){this.ctx.font=this.font;var t,e,n=this.ctx.measureText(this.xLabels[0]).width,i=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=i/2+3,this.xScalePaddingLeft=n/2>this.yLabelWidth+10?n/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var r,o=M(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var s=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>s&&0===this.xLabelRotation||this.xLabelWidth>s&&this.xLabelRotation<=90&&this.xLabelRotation>0;)r=Math.cos(y(this.xLabelRotation)),t=r*n,e=r*i,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=r*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(y(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:h,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var e=this.drawingArea()/(this.min-this.max);return this.endPoint-e*(t-this.min)},calculateX:function(t){var e=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),n=e/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),i=n*t+this.xScalePaddingLeft;return this.offsetGridLines&&(i+=n/2),Math.round(i)},update:function(t){i.extend(this,t),this.fit()},draw:function(){var t=this.ctx,e=(this.endPoint-this.startPoint)/this.steps,n=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,r(this.yLabels,function(r,o){var s=this.endPoint-e*o,a=Math.round(s),l=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(r,n-10,s),0!==o||l||(l=!0),l&&t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a+=i.aliasPixel(t.lineWidth),l&&(t.moveTo(n,a),t.lineTo(this.width,a),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n-5,a),t.lineTo(n,a),t.stroke(),t.closePath()},this),r(this.xLabels,function(e,n){var i=this.calculateX(n)+w(this.lineWidth),r=this.calculateX(n-(this.offsetGridLines?.5:0))+w(this.lineWidth),o=this.xLabelRotation>0,s=this.showVerticalLines;0!==n||s||(s=!0),s&&t.beginPath(),n>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),s&&(t.moveTo(r,this.endPoint),t.lineTo(r,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(r,this.endPoint),t.lineTo(r,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(i,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*y(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(e,0,0),t.restore()},this))}}),n.RadialScale=n.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var e=this.drawingArea/(this.max-this.min);return(t-this.min)*e},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(x(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,e,n,i,r,o,s,a,l,c,h,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),f=this.width,g=0;for(this.ctx.font=B(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),e=0;e<this.valuesCount;e++)t=this.getPointPosition(e,d),n=this.ctx.measureText(x(this.templateString,{value:this.labels[e]})).width+5,0===e||e===this.valuesCount/2?(i=n/2,t.x+i>f&&(f=t.x+i,r=e),t.x-i<g&&(g=t.x-i,s=e)):e<this.valuesCount/2?t.x+n>f&&(f=t.x+n,r=e):e>this.valuesCount/2&&t.x-n<g&&(g=t.x-n,s=e);l=g,c=Math.ceil(f-this.width),o=this.getIndexAngle(r),a=this.getIndexAngle(s),h=c/Math.sin(o+Math.PI/2),u=l/Math.sin(a+Math.PI/2),h=p(h)?h:0,u=p(u)?u:0,this.drawingArea=d-(u+h)/2,this.setCenterPoint(u,h)},setCenterPoint:function(t,e){var n=this.width-e-this.drawingArea,i=t+this.drawingArea;this.xCenter=(i+n)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var e=2*Math.PI/this.valuesCount;return t*e-Math.PI/2},getPointPosition:function(t,e){var n=this.getIndexAngle(t);return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(r(this.yLabels,function(e,n){if(n>0){var i,r=n*(this.drawingArea/this.steps),o=this.yCenter-r;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,r,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var s=0;s<this.valuesCount;s++)i=this.getPointPosition(s,this.calculateCenterOffset(this.min+n*this.stepValue)),0===s?t.moveTo(i.x,i.y):t.lineTo(i.x,i.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=B(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var a=t.measureText(e).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-a/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,a+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(e,this.xCenter,o)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var e=this.valuesCount-1;e>=0;e--){if(this.angleLineWidth>0){var n=this.getPointPosition(e,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(n.x,n.y),t.stroke(),t.closePath()}var i=this.getPointPosition(e,this.calculateCenterOffset(this.max)+5);t.font=B(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,s=this.labels.length/2,a=s/2,l=a>e||e>o-a,c=e===a||e===o-a;0===e?t.textAlign="center":e===s?t.textAlign="center":s>e?t.textAlign="left":t.textAlign="right",c?t.textBaseline="middle":l?t.textBaseline="bottom":t.textBaseline="top",t.fillText(this.labels[e],i.x,i.y)}}}}}),i.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){r(n.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),f?define(function(){return n}):"object"==typeof module&&module.exports&&(module.exports=n),t.Chart=n,n.noConflict=function(){return t.Chart=e,n}}.call(this),function(){"use strict";var t=this,e=t.Chart,n=e.helpers,i={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};e.Type.extend({name:"Bar",defaults:i,initialize:function(t){var i=this.options;this.ScaleClass=e.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,e,n){var r=this.calculateBaseWidth(),o=this.calculateX(n)-r/2,s=this.calculateBarWidth(t);return o+s*e+e*i.barDatasetSpacing+s/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*i.barValueSpacing},calculateBarWidth:function(t){var e=this.calculateBaseWidth()-(t-1)*i.barDatasetSpacing;return e/t}}),this.datasets=[],this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),n.each(e,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(e)}),this.BarClass=e.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),n.each(t.datasets,function(e,i){var r={label:e.label||null,fillColor:e.fillColor,strokeColor:e.strokeColor,bars:[]};this.datasets.push(r),n.each(e.data,function(n,i){r.bars.push(new this.BarClass({value:n,label:t.labels[i],datasetLabel:e.label,strokeColor:e.strokeColor,fillColor:e.fillColor,highlightFill:e.highlightFill||e.fillColor,highlightStroke:e.highlightStroke||e.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,e,i){n.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,i,e),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),n.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){n.each(this.datasets,function(e,i){n.each(e.bars,t,this,i)},this)},getBarsAtEvent:function(t){for(var e,i=[],r=n.getRelativePosition(t),o=function(t){i.push(t.bars[e])},s=0;s<this.datasets.length;s++)for(e=0;e<this.datasets[s].bars.length;e++)if(this.datasets[s].bars[e].inRange(r.x,r.y))return n.each(this.datasets,o),i;return i},buildScale:function(t){var e=this,i=function(){var t=[];return e.eachBars(function(e){t.push(e.value)}),t},r={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var e=n.calculateScaleRange(i(),t,this.fontSize,this.beginAtZero,this.integersOnly);n.extend(this,e)},xLabels:t,font:n.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&n.extend(r,{calculateYRange:n.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(r)},addData:function(t,e){n.each(t,function(t,n){this.datasets[n].bars.push(new this.BarClass({value:t,label:e,x:this.scale.calculateBarX(this.datasets.length,n,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[n].strokeColor,fillColor:this.datasets[n].fillColor}))},this),this.scale.addXLabel(e),this.update()},removeData:function(){this.scale.removeXLabel(),n.each(this.datasets,function(t){t.bars.shift()},this),this.update()},reflow:function(){n.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var t=n.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var e=t||1;this.clear();this.chart.ctx;this.scale.draw(e),n.each(this.datasets,function(t,i){n.each(t.bars,function(t,n){t.hasValue()&&(t.base=this.scale.endPoint,t.transition({x:this.scale.calculateBarX(this.datasets.length,i,n),y:this.scale.calculateY(t.value),width:this.scale.calculateBarWidth(this.datasets.length)
},e).draw())},this)},this)}})}.call(this),function(){"use strict";var t=this,e=t.Chart,n=e.helpers,i={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};e.Type.extend({name:"Doughnut",defaults:i,initialize:function(t){this.segments=[],this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=e.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];n.each(this.segments,function(t){t.restore(["fillColor"])}),n.each(e,function(t){t.fillColor=t.highlightColor}),this.showTooltip(e)}),this.calculateTotal(t),n.each(t,function(t,e){this.addData(t,e,!0)},this),this.render()},getSegmentsAtEvent:function(t){var e=[],i=n.getRelativePosition(t);return n.each(this.segments,function(t){t.inRange(i.x,i.y)&&e.push(t)},this),e},addData:function(t,e,n){var i=e||this.segments.length;this.segments.splice(i,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),n||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(Math.abs(t)/this.total)},calculateTotal:function(t){this.total=0,n.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),n.each(this.activeElements,function(t){t.restore(["fillColor"])}),n.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var e=n.isNumber(t)?t:this.segments.length-1;this.segments.splice(e,1),this.reflow(),this.update()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,n.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var e=t?t:1;this.clear(),n.each(this.segments,function(t,n){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},e),t.endAngle=t.startAngle+t.circumference,t.draw(),0===n&&(t.startAngle=1.5*Math.PI),n<this.segments.length-1&&(this.segments[n+1].startAngle=t.endAngle)},this)}}),e.types.Doughnut.extend({name:"Pie",defaults:n.merge(i,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var t=this,e=t.Chart,n=e.helpers,i={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};e.Type.extend({name:"Line",defaults:i,initialize:function(t){this.PointClass=e.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),n.each(e,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(e)}),n.each(t.datasets,function(e){var i={label:e.label||null,fillColor:e.fillColor,strokeColor:e.strokeColor,pointColor:e.pointColor,pointStrokeColor:e.pointStrokeColor,points:[]};this.datasets.push(i),n.each(e.data,function(n,r){i.points.push(new this.PointClass({value:n,label:t.labels[r],datasetLabel:e.label,strokeColor:e.pointStrokeColor,fillColor:e.pointColor,highlightFill:e.pointHighlightFill||e.pointColor,highlightStroke:e.pointHighlightStroke||e.pointStrokeColor}))},this),this.buildScale(t.labels),this.eachPoints(function(t,e){n.extend(t,{x:this.scale.calculateX(e),y:this.scale.endPoint}),t.save()},this)},this),this.render()},update:function(){this.scale.update(),n.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachPoints(function(t){t.save()}),this.render()},eachPoints:function(t){n.each(this.datasets,function(e){n.each(e.points,t,this)},this)},getPointsAtEvent:function(t){var e=[],i=n.getRelativePosition(t);return n.each(this.datasets,function(t){n.each(t.points,function(t){t.inRange(i.x,i.y)&&e.push(t)})},this),e},buildScale:function(t){var i=this,r=function(){var t=[];return i.eachPoints(function(e){t.push(e.value)}),t},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var e=n.calculateScaleRange(r(),t,this.fontSize,this.beginAtZero,this.integersOnly);n.extend(this,e)},xLabels:t,font:n.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&n.extend(o,{calculateYRange:n.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new e.Scale(o)},addData:function(t,e){n.each(t,function(t,n){this.datasets[n].points.push(new this.PointClass({value:t,label:e,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[n].pointStrokeColor,fillColor:this.datasets[n].pointColor}))},this),this.scale.addXLabel(e),this.update()},removeData:function(){this.scale.removeXLabel(),n.each(this.datasets,function(t){t.points.shift()},this),this.update()},reflow:function(){var t=n.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var e=t||1;this.clear();var i=this.chart.ctx,r=function(t){return null!==t.value},o=function(t,e,i){return n.findNextWhere(e,r,i)||t},s=function(t,e,i){return n.findPreviousWhere(e,r,i)||t};this.scale.draw(e),n.each(this.datasets,function(t){var a=n.where(t.points,r);n.each(t.points,function(t,n){t.hasValue()&&t.transition({y:this.scale.calculateY(t.value),x:this.scale.calculateX(n)},e)},this),this.options.bezierCurve&&n.each(a,function(t,e){var i=e>0&&e<a.length-1?this.options.bezierCurveTension:0;t.controlPoints=n.splineCurve(s(t,a,e),t,o(t,a,e),i),t.controlPoints.outer.y>this.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.y<this.scale.startPoint&&(t.controlPoints.outer.y=this.scale.startPoint),t.controlPoints.inner.y>this.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y<this.scale.startPoint&&(t.controlPoints.inner.y=this.scale.startPoint)},this),i.lineWidth=this.options.datasetStrokeWidth,i.strokeStyle=t.strokeColor,i.beginPath(),n.each(a,function(t,e){if(0===e)i.moveTo(t.x,t.y);else if(this.options.bezierCurve){var n=s(t,a,e);i.bezierCurveTo(n.controlPoints.outer.x,n.controlPoints.outer.y,t.controlPoints.inner.x,t.controlPoints.inner.y,t.x,t.y)}else i.lineTo(t.x,t.y)},this),i.stroke(),this.options.datasetFill&&a.length>0&&(i.lineTo(a[a.length-1].x,this.scale.endPoint),i.lineTo(a[0].x,this.scale.endPoint),i.fillStyle=t.fillColor,i.closePath(),i.fill()),n.each(a,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,e=t.Chart,n=e.helpers,i={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};e.Type.extend({name:"PolarArea",defaults:i,initialize:function(t){this.segments=[],this.SegmentArc=e.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new e.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),n.each(t,function(t,e){this.addData(t,e,!0)},this),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];n.each(this.segments,function(t){t.restore(["fillColor"])}),n.each(e,function(t){t.fillColor=t.highlightColor}),this.showTooltip(e)}),this.render()},getSegmentsAtEvent:function(t){var e=[],i=n.getRelativePosition(t);return n.each(this.segments,function(t){t.inRange(i.x,i.y)&&e.push(t)},this),e},addData:function(t,e,n){var i=e||this.segments.length;this.segments.splice(i,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),n||(this.reflow(),this.update())},removeData:function(t){var e=n.isNumber(t)?t:this.segments.length-1;this.segments.splice(e,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,n.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var e=[];n.each(t,function(t){e.push(t.value)});var i=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(e,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,i,{size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),n.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),n.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),n.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var e=t||1;this.clear(),n.each(this.segments,function(t,n){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},e),t.endAngle=t.startAngle+t.circumference,0===n&&(t.startAngle=1.5*Math.PI),n<this.segments.length-1&&(this.segments[n+1].startAngle=t.endAngle),t.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var t=this,e=t.Chart,n=e.helpers;e.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},initialize:function(t){this.PointClass=e.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),n.each(e,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(e)}),n.each(t.datasets,function(e){var i={label:e.label||null,fillColor:e.fillColor,strokeColor:e.strokeColor,pointColor:e.pointColor,pointStrokeColor:e.pointStrokeColor,points:[]};this.datasets.push(i),n.each(e.data,function(n,r){var o;this.scale.animation||(o=this.scale.getPointPosition(r,this.scale.calculateCenterOffset(n))),i.points.push(new this.PointClass({value:n,label:t.labels[r],datasetLabel:e.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:e.pointStrokeColor,fillColor:e.pointColor,highlightFill:e.pointHighlightFill||e.pointColor,highlightStroke:e.pointHighlightStroke||e.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){n.each(this.datasets,function(e){n.each(e.points,t,this)},this)},getPointsAtEvent:function(t){var e=n.getRelativePosition(t),i=n.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},e),r=2*Math.PI/this.scale.valuesCount,o=Math.round((i.angle-1.5*Math.PI)/r),s=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),i.distance<=this.scale.drawingArea&&n.each(this.datasets,function(t){s.push(t.points[o])}),s},buildScale:function(t){this.scale=new e.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var e=function(){var e=[];return n.each(t,function(t){t.data?e=e.concat(t.data):n.each(t.points,function(t){e.push(t.value)})}),e}(),i=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(e,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,i)},addData:function(t,e){this.scale.valuesCount++,n.each(t,function(t,n){var i=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[n].points.push(new this.PointClass({value:t,label:e,x:i.x,y:i.y,strokeColor:this.datasets[n].pointStrokeColor,fillColor:this.datasets[n].pointColor}))},this),this.scale.labels.push(e),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),n.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){n.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var e=t||1,i=this.chart.ctx;this.clear(),this.scale.draw(),n.each(this.datasets,function(t){n.each(t.points,function(t,n){t.hasValue()&&t.transition(this.scale.getPointPosition(n,this.scale.calculateCenterOffset(t.value)),e)},this),i.lineWidth=this.options.datasetStrokeWidth,i.strokeStyle=t.strokeColor,i.beginPath(),n.each(t.points,function(t,e){0===e?i.moveTo(t.x,t.y):i.lineTo(t.x,t.y)},this),i.closePath(),i.stroke(),i.fillStyle=t.fillColor,i.fill(),n.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.BranchGraph=function(){function e(e,n){this.element=e,this.options=n,this.scrollTop=t(this.scrollTop,this),this.scrollBottom=t(this.scrollBottom,this),this.scrollRight=t(this.scrollRight,this),this.scrollLeft=t(this.scrollLeft,this),this.scrollUp=t(this.scrollUp,this),this.scrollDown=t(this.scrollDown,this),this.preparedCommits={},this.mtime=0,this.mspace=0,this.parents={},this.colors=["#000"],this.offsetX=150,this.offsetY=20,this.unitTime=30,this.unitSpace=10,this.prev_start=-1,this.load()}return e.prototype.load=function(){return $.ajax({url:this.options.url,method:"get",dataType:"json",success:$.proxy(function(t){return $(".loading",this.element).hide(),this.prepareData(t.days,t.commits),this.buildGraph()},this)})},e.prototype.prepareData=function(t,e){var n,i,r,o,s,a;for(this.days=t,this.commits=e,this.collectParents(),this.graphHeight=$(this.element).height(),this.graphWidth=$(this.element).width(),i=Math.max(this.graphHeight,this.offsetY+this.unitTime*this.mtime+150),r=Math.max(this.graphWidth,this.offsetX+this.unitSpace*this.mspace+300),this.r=Raphael(this.element.get(0),r,i),this.top=this.r.set(),this.barHeight=Math.max(this.graphHeight,this.unitTime*this.days.length+320),a=this.commits,o=0,s=a.length;s>o;o++)n=a[o],n.id in this.parents&&(n.isParent=!0),this.preparedCommits[n.id]=n,this.markCommit(n);return this.collectColors()},e.prototype.collectParents=function(){var t,e,n,i,r,o;for(r=this.commits,o=[],e=0,n=r.length;n>e;e++)t=r[e],this.mtime=Math.max(this.mtime,t.time),this.mspace=Math.max(this.mspace,t.space),o.push(function(){var e,n,r,o;for(r=t.parents,o=[],e=0,n=r.length;n>e;e++)i=r[e],this.parents[i[0]]=!0,o.push(this.mspace=Math.max(this.mspace,i[1]));return o}.call(this));return o},e.prototype.collectColors=function(){var t,e;for(t=0,e=[];t<this.mspace;)this.colors.push(Raphael.getColor(.8)),Raphael.getColor(),Raphael.getColor(),e.push(t++);return e},e.prototype.buildGraph=function(){var t,e,n,i,r,o,s,a;for(s=this.r,t=0,e="",s.rect(0,0,40,this.barHeight).attr({fill:"#222"}),s.rect(40,0,30,this.barHeight).attr({fill:"#444"}),a=this.days,o=i=0,r=a.length;r>i;o=++i)n=a[o],(t!==n[0]||e!==n[1])&&(s.text(55,this.offsetY+this.unitTime*o,n[0]).attr({font:"12px Monaco, monospace",fill:"#BBB"}),t=n[0]),e!==n[1]&&(s.text(20,this.offsetY+this.unitTime*o,n[1]).attr({font:"12px Monaco, monospace",fill:"#EEE"}),e=n[1]);return this.renderPartialGraph(),this.bindEvents()},e.prototype.renderPartialGraph=function(){var t,e,n,i,r,o,s;if(r=Math.floor((this.element.scrollTop()-this.offsetY)/this.unitTime)-10,0>r&&(i=!0,r=0),e=r+40,this.commits.length<e&&(i=!0,e=this.commits.length),-1===this.prev_start||Math.abs(this.prev_start-r)>10||i){for(n=r,this.prev_start=r;e>n;)t=this.commits[n],n+=1,t.hasDrawn!==!0&&(o=this.offsetX+this.unitSpace*(this.mspace-t.space),s=this.offsetY+this.unitTime*t.time,this.drawDot(o,s,t),this.drawLines(o,s,t),this.appendLabel(o,s,t),this.appendAnchor(o,s,t),t.hasDrawn=!0);return this.top.toFront()}},e.prototype.bindEvents=function(){var t;return t=this.element,$(t).scroll(function(t){return function(e){return t.renderPartialGraph()}}(this))},e.prototype.scrollDown=function(){return this.element.scrollTop(this.element.scrollTop()+50),this.renderPartialGraph()},e.prototype.scrollUp=function(){return this.element.scrollTop(this.element.scrollTop()-50),this.renderPartialGraph()},e.prototype.scrollLeft=function(){return this.element.scrollLeft(this.element.scrollLeft()-50),this.renderPartialGraph()},e.prototype.scrollRight=function(){return this.element.scrollLeft(this.element.scrollLeft()+50),this.renderPartialGraph()},e.prototype.scrollBottom=function(){return this.element.scrollTop(this.element.find("svg").height())},e.prototype.scrollTop=function(){return this.element.scrollTop(0)},e.prototype.appendLabel=function(t,e,n){var i,r,o,s,a,l,c;if(n.refs)return r=this.r,s=n.refs,s.length>17&&(s=s.substr(0,15)+"\u2026"),a=r.text(t+4,e,s).attr({"text-anchor":"start",font:"10px Monaco, monospace",fill:"#FFF",title:n.refs}),l=a.getBBox(),o=r.rect(t,e-7,l.width+5,l.height+5,4).attr({fill:"#000","fill-opacity":.5,stroke:"none"}),c=r.path(["M",t-5,e,"L",t-15,e-4,"L",t-15,e+4,"Z"]).attr({fill:"#000","fill-opacity":.5,stroke:"none"}),i=r.set(o,a),i.transform(["t",-o.getBBox().width-15,0]),a.toFront()},e.prototype.appendAnchor=function(t,e,n){var i,r,o,s;return o=this.r,s=this.top,r=this.options,i=o.circle(t,e,10).attr({fill:"#000",opacity:0,cursor:"pointer"}).click(function(){return window.open(r.commit_url.replace("%s",n.id),"_blank")}).hover(function(){return this.tooltip=o.commitTooltip(t+5,e,n),s.push(this.tooltip.insertBefore(this))},function(){return this.tooltip&&this.tooltip.remove()&&delete this.tooltip}),s.push(i)},e.prototype.drawDot=function(t,e,n){var i,r,o;return o=this.r,o.circle(t,e,3).attr({fill:this.colors[n.space],stroke:"none"}),i=this.offsetX+this.unitSpace*this.mspace+10,r=e-10,o.rect(i,r,20,20).attr({stroke:this.colors[n.space],"stroke-width":2}),o.image(n.author.icon,i,r,20,20),o.text(this.offsetX+this.unitSpace*this.mspace+35,e,n.message.split("\n")[0]).attr({"text-anchor":"start",font:"14px Monaco, monospace"})},e.prototype.drawLines=function(t,e,n){var i,r,o,s,a,l,c,h,u,d,f,p,g,m,v;for(p=this.r,g=n.parents,m=[],o=s=0,a=g.length;a>s;o=++s)c=g[o],h=this.preparedCommits[c[0]],f=this.offsetY+this.unitTime*h.time,u=this.offsetX+this.unitSpace*(this.mspace-h.space),d=this.offsetX+this.unitSpace*(this.mspace-c[1]),r=h.space<=n.space?this.colors[n.space]:this.colors[h.space],c[1]===n.space?(l=[0,5],i="l-2,5,4,0,-2,-5,0,5"):c[1]<n.space?(l=[3,3],i="l5,0,-2,4,-3,-4,4,2"):(l=[-3,3],i="l-5,0,2,4,3,-4,-4,2"),v=["M",t+l[0],e+l[1]],o>0&&v.push(i),(n.space!==h.space||n.space!==c[1])&&v.push("L",d,e+10,"L",d,f-5),v.push("L",u,f),m.push(p.path(v).attr({stroke:r,"stroke-width":2}));return m},e.prototype.markCommit=function(t){var e,n,i;return t.id===this.options.commit_id?(e=this.r,n=this.offsetX+this.unitSpace*(this.mspace-t.space),i=this.offsetY+this.unitTime*t.time,e.path(["M",n+5,i,"L",n+15,i+4,"L",n+15,i-4,"Z"]).attr({fill:"#000","fill-opacity":.5,stroke:"none"}),this.element.scrollTop(i-this.graphHeight/2)):void 0},e}(),Raphael.prototype.commitTooltip=function(t,e,n){var i,r,o,s,a,l,c,h,u;return r=300,i=200,o=this.image(gon.relative_url_root+n.author.icon,t,e,20,20),l=this.text(t+25,e+10,n.author.name),s=this.text(t,e+35,n.id),a=this.text(t,e+50,n.message),h=this.set(o,l,s,a).attr({"text-anchor":"start",font:"12px Monaco, monospace"}),l.attr({font:"14px Arial","font-weight":"bold"}),s.attr({fill:"#AAA"}),this.textWrap(a,r-50),c=this.rect(t-10,e-10,r,100,4).attr({fill:"#FFF",stroke:"#000","stroke-linecap":"round","stroke-width":2}),u=this.set(c,h),c.attr({height:u.getBBox().height+10,width:u.getBBox().width+10}),u.transform(["t",20,20]),u},Raphael.prototype.textWrap=function(t,e){var n,i,r,o,s,a,l,c,h,u,d;for(r=t.attr("text"),n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",t.attr({text:n}),l=t.getBBox().width/n.length,t.attr({text:r}),u=r.split(" "),d=0,c=[],s=0,a=u.length;a>s;s++)h=u[s],d+h.length*l>e&&(c.push("\n"),d=0),d+=h.length*l,c.push(h+" ");return t.attr({text:c.join("")}),i=t.getBBox(),o=Math.abs(i.y2)-Math.abs(i.y)+1,t.attr({y:i.y+o})}}.call(this),/* ***** BEGIN LICENSE BLOCK *****
 * Distributed under the BSD license:
 *
 * Copyright (c) 2010, Ajax.org B.V.
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of Ajax.org B.V. nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ***** END LICENSE BLOCK ***** */
function(){function t(t){var e=function(t,e){return r("",t,e)},o=n;t&&(n[t]||(n[t]={}),o=n[t]),o.define&&o.define.packaged||(i.original=o.define,o.define=i,o.define.packaged=!0),o.require&&o.require.packaged||(r.original=o.require,o.require=e,o.require.packaged=!0)}var e="",n=function(){return this}();if(e||"undefined"==typeof requirejs){var i=function(t,e,n){return"string"!=typeof t?void(i.original?i.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(n=e),i.modules||(i.modules={},i.payloads={}),i.payloads[t]=n,void(i.modules[t]=null))},r=function(t,e,n){if("[object Array]"===Object.prototype.toString.call(e)){for(var i=[],o=0,a=e.length;a>o;++o){var l=s(t,e[o]);if(!l&&r.original)return r.original.apply(window,arguments);i.push(l)}n&&n.apply(null,i)}else{if("string"==typeof e){var c=s(t,e);return!c&&r.original?r.original.apply(window,arguments):(n&&n(),c)}if(r.original)return r.original.apply(window,arguments)}},o=function(t,e){if(-1!==e.indexOf("!")){var n=e.split("!");return o(t,n[0])+"!"+o(t,n[1])}if("."==e.charAt(0)){var i=t.split("/").slice(0,-1).join("/");for(e=i+"/"+e;-1!==e.indexOf(".")&&r!=e;){var r=e;e=e.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return e},s=function(t,e){e=o(t,e);var n=i.modules[e];if(!n){if(n=i.payloads[e],"function"==typeof n){var s={},a={id:e,uri:"",exports:s,packaged:!0},l=function(t,n){return r(e,t,n)},c=n(l,s,a);s=c||a.exports,i.modules[e]=s,delete i.payloads[e]}n=i.modules[e]=s||n}return n};t(e)}}(),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/multi_select","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(t,e,n){t("./lib/fixoldbrowsers");var i=t("./lib/dom"),r=t("./lib/event"),o=t("./editor").Editor,s=t("./edit_session").EditSession,a=t("./undomanager").UndoManager,l=t("./virtual_renderer").VirtualRenderer,c=t("./multi_select").MultiSelect;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),e.config=t("./config"),e.require=t,e.edit=function(t){if("string"==typeof t){var n=t,t=document.getElementById(n);if(!t)throw new Error("ace.edit can't find div #"+n)}if(t.env&&t.env.editor instanceof o)return t.env.editor;var s=e.createEditSession(i.getInnerText(t));t.innerHTML="";var a=new o(new l(t));new c(a),a.setSession(s);var h={document:s,editor:a,onResize:a.resize.bind(a,null)};return r.addListener(window,"resize",h.onResize),a.on("destroy",function(){r.removeListener(window,"resize",h.onResize)}),t.env=a.env=h,a},e.createEditSession=function(t,e){var n=new s(t,e);return n.setUndoManager(new a),n},e.EditSession=s,e.UndoManager=a}),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(t,e,n){t("./regexp"),t("./es5-shim")}),define("ace/lib/regexp",["require","exports","module"],function(t,e,n){function i(t){return(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.extended?"x":"")+(t.sticky?"y":"")}function r(t,e,n){if(Array.prototype.indexOf)return t.indexOf(e,n);for(var i=n||0;i<t.length;i++)if(t[i]===e)return i;return-1}var o={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},s=void 0===o.exec.call(/()??/,"")[1],a=function(){var t=/^/g;return o.test.call(t,""),!t.lastIndex}();a&&s||(RegExp.prototype.exec=function(t){var e,n,l=o.exec.apply(this,arguments);if("string"==typeof t&&l){if(!s&&l.length>1&&r(l,"")>-1&&(n=RegExp(this.source,o.replace.call(i(this),"g","")),o.replace.call(t.slice(l.index),n,function(){for(var t=1;t<arguments.length-2;t++)void 0===arguments[t]&&(l[t]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var c=1;c<l.length;c++)e=this._xregexp.captureNames[c-1],e&&(l[e]=l[c]);!a&&this.global&&!l[0].length&&this.lastIndex>l.index&&this.lastIndex--}return l},a||(RegExp.prototype.test=function(t){var e=o.exec.call(this,t);return e&&this.global&&!e[0].length&&this.lastIndex>e.index&&this.lastIndex--,!!e}))}),define("ace/lib/es5-shim",["require","exports","module"],function(t,e,n){function i(){}function r(t){try{return Object.defineProperty(t,"sentinel",{}),"sentinel"in t}catch(e){}}function o(t){return t=+t,t!==t?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError("Function.prototype.bind called on incompatible "+e);var n=p.call(arguments,1),r=function(){if(this instanceof r){var i=e.apply(this,n.concat(p.call(arguments)));return Object(i)===i?i:this}return e.apply(t,n.concat(p.call(arguments)))};return e.prototype&&(i.prototype=e.prototype,r.prototype=new i,i.prototype=null),r});var s,a,l,c,h,u=Function.prototype.call,d=Array.prototype,f=Object.prototype,p=d.slice,g=u.bind(f.toString),m=u.bind(f.hasOwnProperty);if((h=m(f,"__defineGetter__"))&&(s=u.bind(f.__defineGetter__),a=u.bind(f.__defineSetter__),l=u.bind(f.__lookupGetter__),c=u.bind(f.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function t(t){var e=new Array(t+2);return e[0]=e[1]=0,e}var e,n=[];return n.splice.apply(n,t(20)),n.splice.apply(n,t(26)),e=n.length,n.splice(5,0,"XXX"),e+1==n.length,e+1==n.length?!0:void 0}()){var v=Array.prototype.splice;Array.prototype.splice=function(t,e){return arguments.length?v.apply(this,[void 0===t?0:t,void 0===e?this.length-t:e].concat(p.call(arguments,2))):[]}}else Array.prototype.splice=function(t,e){var n=this.length;t>0?t>n&&(t=n):void 0==t?t=0:0>t&&(t=Math.max(n+t,0)),n>t+e||(e=n-t);var i=this.slice(t,t+e),r=p.call(arguments,2),o=r.length;if(t===n)o&&this.push.apply(this,r);else{var s=Math.min(e,n-t),a=t+s,l=a+o-s,c=n-a,h=n-s;if(a>l)for(var u=0;c>u;++u)this[l+u]=this[a+u];else if(l>a)for(u=c;u--;)this[l+u]=this[a+u];if(o&&t===h)this.length=h,this.push.apply(this,r);else for(this.length=h+o,u=0;o>u;++u)this[t+u]=r[u]}return i};Array.isArray||(Array.isArray=function(t){return"[object Array]"==g(t)});var y=Object("a"),w="a"!=y[0]||!(0 in y);if(Array.prototype.forEach||(Array.prototype.forEach=function(t){var e=I(this),n=w&&"[object String]"==g(this)?this.split(""):e,i=arguments[1],r=-1,o=n.length>>>0;if("[object Function]"!=g(t))throw new TypeError;for(;++r<o;)r in n&&t.call(i,n[r],r,e)}),Array.prototype.map||(Array.prototype.map=function(t){var e=I(this),n=w&&"[object String]"==g(this)?this.split(""):e,i=n.length>>>0,r=Array(i),o=arguments[1];if("[object Function]"!=g(t))throw new TypeError(t+" is not a function");for(var s=0;i>s;s++)s in n&&(r[s]=t.call(o,n[s],s,e));return r}),Array.prototype.filter||(Array.prototype.filter=function(t){var e,n=I(this),i=w&&"[object String]"==g(this)?this.split(""):n,r=i.length>>>0,o=[],s=arguments[1];if("[object Function]"!=g(t))throw new TypeError(t+" is not a function");for(var a=0;r>a;a++)a in i&&(e=i[a],t.call(s,e,a,n)&&o.push(e));return o}),Array.prototype.every||(Array.prototype.every=function(t){var e=I(this),n=w&&"[object String]"==g(this)?this.split(""):e,i=n.length>>>0,r=arguments[1];if("[object Function]"!=g(t))throw new TypeError(t+" is not a function");for(var o=0;i>o;o++)if(o in n&&!t.call(r,n[o],o,e))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var e=I(this),n=w&&"[object String]"==g(this)?this.split(""):e,i=n.length>>>0,r=arguments[1];if("[object Function]"!=g(t))throw new TypeError(t+" is not a function");for(var o=0;i>o;o++)if(o in n&&t.call(r,n[o],o,e))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var e=I(this),n=w&&"[object String]"==g(this)?this.split(""):e,i=n.length>>>0;if("[object Function]"!=g(t))throw new TypeError(t+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,o=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o++];break}if(++o>=i)throw new TypeError("reduce of empty array with no initial value")}for(;i>o;o++)o in n&&(r=t.call(void 0,r,n[o],o,e));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var e=I(this),n=w&&"[object String]"==g(this)?this.split(""):e,i=n.length>>>0;if("[object Function]"!=g(t))throw new TypeError(t+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,o=i-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do o in this&&(r=t.call(void 0,r,n[o],o,e));while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(t){var e=w&&"[object String]"==g(this)?this.split(""):I(this),n=e.length>>>0;if(!n)return-1;var i=0;for(arguments.length>1&&(i=o(arguments[1])),i=i>=0?i:Math.max(0,n+i);n>i;i++)if(i in e&&e[i]===t)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(t){var e=w&&"[object String]"==g(this)?this.split(""):I(this),n=e.length>>>0;if(!n)return-1;var i=n-1;for(arguments.length>1&&(i=Math.min(i,o(arguments[1]))),i=i>=0?i:n-Math.abs(i);i>=0;i--)if(i in e&&t===e[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:f)}),!Object.getOwnPropertyDescriptor){var b="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,e){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError(b+t);if(m(t,e)){var n,i,r;if(n={enumerable:!0,configurable:!0},h){var o=t.__proto__;t.__proto__=f;var i=l(t,e),r=c(t,e);if(t.__proto__=o,i||r)return i&&(n.get=i),r&&(n.set=r),n}return n.value=t[e],n}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)}),!Object.create){var x;x=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var t={};for(var e in t)t[e]=null;return t.constructor=t.hasOwnProperty=t.propertyIsEnumerable=t.isPrototypeOf=t.toLocaleString=t.toString=t.valueOf=t.__proto__=null,t},Object.create=function(t,e){var n;if(null===t)n=x();else{if("object"!=typeof t)throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,n=new i,n.__proto__=t}return void 0!==e&&Object.defineProperties(n,e),n}}if(Object.defineProperty){var C=r({}),A="undefined"==typeof document||r(document.createElement("div"));if(!C||!A)var E=Object.defineProperty}if(!Object.defineProperty||E){var k="Property description must be an object: ",F="Object.defineProperty called on non-object: ",_="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,e,n){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError(F+t);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError(k+n);if(E)try{return E.call(Object,t,e,n)}catch(i){}if(m(n,"value"))if(h&&(l(t,e)||c(t,e))){var r=t.__proto__;t.__proto__=f,delete t[e],t[e]=n.value,t.__proto__=r}else t[e]=n.value;else{if(!h)throw new TypeError(_);m(n,"get")&&s(t,e,n.get),m(n,"set")&&a(t,e,n.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,e){for(var n in e)m(e,n)&&Object.defineProperty(t,n,e[n]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(D){Object.freeze=function(t){return function(e){return"function"==typeof e?e:t(e)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;for(var e="";m(t,e);)e+="?";t[e]=!0;var n=m(t,e);return delete t[e],n}),!Object.keys){var S=!0,$=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],T=$.length;for(var B in{toString:null})S=!1;Object.keys=function P(t){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError("Object.keys called on a non-object");var P=[];for(var e in t)m(t,e)&&P.push(e);if(S)for(var n=0,i=T;i>n;n++){var r=$[n];m(t,r)&&P.push(r)}return P}}Date.now||(Date.now=function(){return(new Date).getTime()});var M="	\n\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||M.trim()){M="["+M+"]";var L=new RegExp("^"+M+M+"*"),R=new RegExp(M+M+"*$");String.prototype.trim=function(){return String(this).replace(L,"").replace(R,"")}}var I=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)}}),define("ace/lib/dom",["require","exports","module"],function(t,e,n){if("undefined"!=typeof document){var i="http://www.w3.org/1999/xhtml";e.getDocumentHead=function(t){return t||(t=document),t.head||t.getElementsByTagName("head")[0]||t.documentElement},e.createElement=function(t,e){return document.createElementNS?document.createElementNS(e||i,t):document.createElement(t)},e.hasCssClass=function(t,e){var n=t.className.split(/\s+/g);return-1!==n.indexOf(e)},e.addCssClass=function(t,n){e.hasCssClass(t,n)||(t.className+=" "+n)},e.removeCssClass=function(t,e){for(var n=t.className.split(/\s+/g);;){var i=n.indexOf(e);if(-1==i)break;n.splice(i,1)}t.className=n.join(" ")},e.toggleCssClass=function(t,e){for(var n=t.className.split(/\s+/g),i=!0;;){var r=n.indexOf(e);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(e),t.className=n.join(" "),i},e.setCssClass=function(t,n,i){i?e.addCssClass(t,n):e.removeCssClass(t,n)},e.hasCssString=function(t,e){var n,i=0;if(e=e||document,e.createStyleSheet&&(n=e.styleSheets)){for(;i<n.length;)if(n[i++].owningElement.id===t)return!0}else if(n=e.getElementsByTagName("style"))for(;i<n.length;)if(n[i++].id===t)return!0;return!1},e.importCssString=function(t,n,r){if(r=r||document,n&&e.hasCssString(n,r))return null;var o;r.createStyleSheet?(o=r.createStyleSheet(),o.cssText=t,n&&(o.owningElement.id=n)):(o=r.createElementNS?r.createElementNS(i,"style"):r.createElement("style"),o.appendChild(r.createTextNode(t)),n&&(o.id=n),e.getDocumentHead(r).appendChild(o))},e.importCssStylsheet=function(t,n){if(n.createStyleSheet)n.createStyleSheet(t);else{var i=e.createElement("link");i.rel="stylesheet",i.href=t,e.getDocumentHead(n).appendChild(i)}},e.getInnerWidth=function(t){return parseInt(e.computedStyle(t,"paddingLeft"),10)+parseInt(e.computedStyle(t,"paddingRight"),10)+t.clientWidth},e.getInnerHeight=function(t){return parseInt(e.computedStyle(t,"paddingTop"),10)+parseInt(e.computedStyle(t,"paddingBottom"),10)+t.clientHeight},void 0!==window.pageYOffset?(e.getPageScrollTop=function(){return window.pageYOffset},e.getPageScrollLeft=function(){return window.pageXOffset}):(e.getPageScrollTop=function(){return document.body.scrollTop},e.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?e.computedStyle=function(t,e){return e?(window.getComputedStyle(t,"")||{})[e]||"":window.getComputedStyle(t,"")||{}}:e.computedStyle=function(t,e){return e?t.currentStyle[e]:t.currentStyle},e.scrollbarWidth=function(t){var n=e.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=e.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=t.documentElement;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s==a&&(a=i.clientWidth),o.removeChild(i),s-a},e.setInnerHtml=function(t,e){var n=t.cloneNode(!1);return n.innerHTML=e,t.parentNode.replaceChild(n,t),n},"textContent"in document.documentElement?(e.setInnerText=function(t,e){t.textContent=e},e.getInnerText=function(t){return t.textContent}):(e.setInnerText=function(t,e){t.innerText=e},e.getInnerText=function(t){return t.innerText}),e.getParentWindow=function(t){return t.defaultView||t.parentWindow}}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent","ace/lib/dom"],function(t,e,n){function i(t,e,n){var i=0;if(i=!o.isOpera||"KeyboardEvent"in window||!o.isMac?0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0):0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0),!o.isMac&&s){if((s[91]||s[92])&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l=e.location||e.keyLocation;if(17===n&&1===l)a=e.timeStamp;else if(18===n&&3===i&&2===l){var c=-a;a=e.timeStamp,c+=a,3>c&&(s.altGr=!0)}}}if(n in r.MODIFIER_KEYS){switch(r.MODIFIER_KEYS[n]){case"Alt":i=2;break;case"Shift":i=4;break;case"Ctrl":i=1;break;default:i=8}n=0}return 8&i&&(91===n||93===n)&&(n=0),i||13!==n||!e.location&&3!==e.keyLocation||(t(e,i,-n),!e.defaultPrevented)?i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS?t(e,i,n):!1:void 0}var r=t("./keys"),o=t("./useragent");t("./dom");e.addListener=function(t,e,n){if(t.addEventListener)return t.addEventListener(e,n,!1);if(t.attachEvent){var i=function(){n.call(t,window.event)};n._wrapper=i,t.attachEvent("on"+e,i)}},e.removeListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):void(t.detachEvent&&t.detachEvent("on"+e,n._wrapper||n))},e.stopEvent=function(t){return e.stopPropagation(t),e.preventDefault(t),!1},e.stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},e.preventDefault=function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},e.getButton=function(t){return"dblclick"==t.type?0:"contextmenu"==t.type||t.ctrlKey&&o.isMac?2:t.preventDefault?t.button:{1:0,2:2,4:1}[t.button]},e.capture=function(t,n,i){function r(t){n&&n(t),i&&i(t),e.removeListener(document,"mousemove",n,!0),e.removeListener(document,"mouseup",r,!0),e.removeListener(document,"dragstart",r,!0)}return e.addListener(document,"mousemove",n,!0),e.addListener(document,"mouseup",r,!0),e.addListener(document,"dragstart",r,!0),r},e.addMouseWheelListener=function(t,n){"onmousewheel"in t?e.addListener(t,"mousewheel",function(t){var e=8;void 0!==t.wheelDeltaX?(t.wheelX=-t.wheelDeltaX/e,t.wheelY=-t.wheelDeltaY/e):(t.wheelX=0,t.wheelY=-t.wheelDelta/e),n(t)}):"onwheel"in t?e.addListener(t,"wheel",function(t){var e=.35;switch(t.deltaMode){case t.DOM_DELTA_PIXEL:t.wheelX=t.deltaX*e||0,t.wheelY=t.deltaY*e||0;break;case t.DOM_DELTA_LINE:case t.DOM_DELTA_PAGE:t.wheelX=5*(t.deltaX||0),t.wheelY=5*(t.deltaY||0)}n(t)}):e.addListener(t,"DOMMouseScroll",function(t){t.axis&&t.axis==t.HORIZONTAL_AXIS?(t.wheelX=5*(t.detail||0),t.wheelY=0):(t.wheelX=0,t.wheelY=5*(t.detail||0)),n(t)})},e.addMultiMouseDownListener=function(t,n,i,r){var s,a,l,c=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};e.addListener(t,"mousedown",function(t){if(0!=e.getButton(t)?c=0:t.detail>1?(c++,c>4&&(c=1)):c=1,o.isIE){var n=Math.abs(t.clientX-s)>5||Math.abs(t.clientY-a)>5;n&&(c=1),1==c&&(s=t.clientX,a=t.clientY)}if(i[r]("mousedown",t),c>4)c=0;else if(c>1)return i[r](h[c],t)}),o.isOldIE&&e.addListener(t,"dblclick",function(t){c=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},n[c-1]||600),i[r]("mousedown",t),i[r](h[c],t)})};var s=null,a=0;if(e.addCommandKeyListener=function(t,n){var r=e.addListener;if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var a=null;r(t,"keydown",function(t){a=t.keyCode}),r(t,"keypress",function(t){return i(n,t,a)})}else{var l=null;r(t,"keydown",function(t){s[t.keyCode]=!0;var e=i(n,t,t.keyCode);return l=t.defaultPrevented,e}),r(t,"keypress",function(t){l&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(e.stopEvent(t),l=null)}),r(t,"keyup",function(t){s[t.keyCode]=null}),s||(s=Object.create(null),r(window,"focus",function(t){s=Object.create(null)}))}},window.postMessage&&!o.isOldIE){var l=1;e.nextTick=function(t,n){n=n||window;var i="zero-timeout-message-"+l;e.addListener(n,"message",function r(o){o.data==i&&(e.stopPropagation(o),e.removeListener(n,"message",r),t())}),n.postMessage(i,"*")}}e.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,e.nextFrame?e.nextFrame=e.nextFrame.bind(window):e.nextFrame=function(t){setTimeout(t,17)}}),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,e,n){var i=t("./oop"),r=function(){var t={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}};for(var e in t.FUNCTION_KEYS){var n=t.FUNCTION_KEYS[e].toLowerCase();t[n]=parseInt(e,10)}return i.mixin(t,t.MODIFIER_KEYS),i.mixin(t,t.PRINTABLE_KEYS),i.mixin(t,t.FUNCTION_KEYS),t.enter=t["return"],t.escape=t.esc,t.del=t["delete"],t[173]="-",t}();i.mixin(e,r),e.keyCodeToString=function(t){return(r[t]||String.fromCharCode(t)).toLowerCase()}}),define("ace/lib/oop",["require","exports","module"],function(t,e,n){e.inherits=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},e.mixin=function(t,e){for(var n in e)t[n]=e[n];return t},e.implement=function(t,n){e.mixin(t,n)}}),define("ace/lib/useragent",["require","exports","module"],function(t,e,n){if(e.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},e.getOS=function(){return e.isMac?e.OS.MAC:e.isLinux?e.OS.LINUX:e.OS.WINDOWS},"object"==typeof navigator){var i=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;e.isWin="win"==i,e.isMac="mac"==i,e.isLinux="linux"==i,e.isIE=("Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0)&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=window.controllers&&"Gecko"===window.navigator.product,e.isOldGecko=e.isGecko&&parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1],10)<4,e.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),e.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,e.isAIR=r.indexOf("AdobeAIR")>=0,e.isIPad=r.indexOf("iPad")>=0,e.isTouchPad=r.indexOf("TouchPad")>=0}}),define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config"],function(t,e,n){t("./lib/fixoldbrowsers");var i=t("./lib/oop"),r=t("./lib/dom"),o=t("./lib/lang"),s=t("./lib/useragent"),a=t("./keyboard/textinput").TextInput,l=t("./mouse/mouse_handler").MouseHandler,c=t("./mouse/fold_handler").FoldHandler,h=t("./keyboard/keybinding").KeyBinding,u=t("./edit_session").EditSession,d=t("./search").Search,f=t("./range").Range,p=t("./lib/event_emitter").EventEmitter,g=t("./commands/command_manager").CommandManager,m=t("./commands/default_commands").commands,v=t("./config"),y=function(t,e){var n=t.getContainerElement();this.container=n,this.renderer=t,this.commands=new g(s.isMac?"mac":"win",m),this.textInput=new a(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new h(this),this.$mouseHandler=new l(this),new c(this),this.$blockScrolling=0,this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(t,e){e._$emitInputEvent.schedule(31)}),this.setSession(e||new u("")),v.resetOptions(this),v._emit("editor",this)};(function(){i.implement(this,p),this.$initOperationListeners=function(){function t(t){return t[t.length-1]}this.selections=[],this.commands.on("exec",function(e){this.startOperation(e);var n=e.command;if("fileJump"==n.aceCommandGroup){var i=this.prevOp;i&&"fileJump"==i.command.aceCommandGroup||(this.lastFileJumpPos=t(this.selections))}else this.lastFileJumpPos=null}.bind(this),!0),this.commands.on("afterExec",function(t){var e=t.command;"fileJump"==e.aceCommandGroup&&this.lastFileJumpPos&&!this.curOp.selectionChanged&&this.selection.fromJSON(this.lastFileJumpPos),this.endOperation(t)}.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(t){if(this.curOp){if(!t||this.curOp.command)return;this.prevOp=this.curOp}t||(this.previousCommand=null,t={}),this.$opResetTimer.schedule(),this.curOp={command:t.command||{},args:t.args,scrollTop:this.renderer.scrollTop};var e=this.curOp.command;e&&e.scrollIntoView&&this.$blockScrolling++,this.selections.push(this.selection.toJSON())},this.endOperation=function(){if(this.curOp){var t=this.curOp.command;if(t&&t.scrollIntoView){switch(this.$blockScrolling--,t.scrollIntoView){case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var e=this.selection.getRange(),n=this.renderer.layerConfig;(e.start.row>=n.lastRow||e.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t.scrollIntoView&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$historyTracker=function(t){if(this.$mergeUndoDeltas){var e=this.prevOp,n=["backspace","del","insertstring"],i=e.command&&t.command.name==e.command.name;if("insertstring"==t.command.name){var r=t.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(e.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(t.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(t.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(t){if(t)if("string"==typeof t){this.$keybindingId=t;var e=this;v.loadModule(["keybinding",t],function(n){e.$keybindingId==t&&e.keyBinding.setKeyboardHandler(n&&n.handler)})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t);else this.keyBinding.setKeyboardHandler(null)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(t){if(this.session!=t){if(this.session){var e=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener("changeCursor",this.$onCursorChange),n.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=t,this.$onDocumentChange=this.onDocumentChange.bind(this),t.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(t),this.$onChangeMode=this.onChangeMode.bind(this),t.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),t.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),t.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),t.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),t.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),t.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=t.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit("changeSession",{session:t,oldSession:e})}},this.getSession=function(){return this.session},this.setValue=function(t,e){return this.session.doc.setValue(t),e?1==e?this.navigateFileEnd():-1==e&&this.navigateFileStart():this.selectAll(),t},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(t){this.renderer.onResize(t)},this.setTheme=function(t){this.renderer.setTheme(t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(t){this.renderer.setStyle(t)},this.unsetStyle=function(t){this.renderer.unsetStyle(t)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(t){this.setOption("fontSize",t)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var t=this;this.$highlightPending=!0,setTimeout(function(){t.$highlightPending=!1;var e=t.session.findMatchingBracket(t.getCursorPosition());
if(e)var n=new f(e.row,e.column,e.row,e.column+1);else if(t.session.$mode.getMatching)var n=t.session.$mode.getMatching(t.session);n&&(t.session.$bracketHighlight=t.session.addMarker(n,"ace_bracket","text"))},50)}},this.focus=function(){var t=this;setTimeout(function(){t.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus"))},this.onBlur=function(){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur"))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(t){var e,n=t.data,i=n.range;e=i.start.row==i.end.row&&"insertLines"!=n.action&&"removeLines"!=n.action?i.end.row:1/0,this.renderer.updateLines(i.start.row,e),this._emit("change",t),this.$cursorChange()},this.onTokenizerUpdate=function(t){var e=t.data;this.renderer.updateLines(e.first,e.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$updateHighlightActiveLine(),this._emit("changeSelection")},this.$updateHighlightActiveLine=function(){var t,e=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(t=this.getCursorPosition()),this.renderer.$maxLines&&1===this.session.getLength()&&(t=!1)),e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new f(t.row,t.column,t.row,1/0);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._emit("changeBackMarker"))},this.onSelectionChange=function(t){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();e.$selectionMarker=e.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._emit("changeSelection")},this.$getSelectionHighLightRegexp=function(){var t=this.session,e=this.getSelectionRange();if(!e.isEmpty()&&!e.isMultiLine()){var n=e.start.column-1,i=e.end.column+1,r=t.getLine(e.start.row),o=r.length,s=r.substring(Math.max(n,0),Math.min(i,o));if(!(n>=0&&/^[\w\d]/.test(s)||o>=i&&/[\w\d]$/.test(s))&&(s=r.substring(e.start.column,e.end.column),/^[\w\d]+$/.test(s))){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s});return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(t){this.renderer.updateText(),this._emit("changeMode",t)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var t=this.getSelectedText();return this._signal("copy",t),t},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(t){this.$readOnly||(this._emit("paste",t),this.insert(t))},this.execCommand=function(t,e){this.commands.exec(t,this,e)},this.insert=function(t){var e=this.session,n=e.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()){var r=n.transformAction(e.getState(i.row),"insertion",this,e,t);r&&(t!==r.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),t=r.text)}if("	"==t&&(t=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var o=new f.fromPoints(i,i);o.end.column+=t.length,this.session.remove(o)}}else{var o=this.getSelectionRange();i=this.session.remove(o),this.clearSelection()}if("\n"==t||"\r\n"==t){var s=e.getLine(i.row);if(i.column>s.search(/\S|$/)){var a=s.substr(i.column).search(/\S|$/);e.doc.removeInLine(i.row,i.column,i.column+a)}}this.clearSelection();var l=i.column,c=e.getState(i.row),s=e.getLine(i.row),h=n.checkOutdent(c,s,t);e.insert(i,t);if(r&&r.selection&&(2==r.selection.length?this.selection.setSelectionRange(new f(i.row,l+r.selection[0],i.row,l+r.selection[1])):this.selection.setSelectionRange(new f(i.row+r.selection[0],r.selection[1],i.row+r.selection[2],r.selection[3]))),e.getDocument().isNewLine(t)){var u=n.getNextLineIndent(c,s.slice(0,i.column),e.getTabString());e.insert({row:i.row+1,column:0},u)}h&&n.autoOutdent(c,e,i.row)},this.onTextInput=function(t){this.keyBinding.onTextInput(t)},this.onCommandKey=function(t,e,n){this.keyBinding.onCommandKey(t,e,n)},this.setOverwrite=function(t){this.session.setOverwrite(t)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(t){this.setOption("scrollSpeed",t)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(t){this.setOption("dragDelay",t)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(t){this.setOption("selectionStyle",t)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(t){this.setOption("highlightActiveLine",t)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(t){this.setOption("highlightSelectedWord",t)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(t){this.renderer.setAnimatedScroll(t)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(t){this.renderer.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(t){this.renderer.setDisplayIndentGuides(t)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(t){this.renderer.setShowPrintMargin(t)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(t){this.renderer.setPrintMarginColumn(t)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(t){this.setOption("readOnly",t)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(t){this.setOption("behavioursEnabled",t)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(t){this.setOption("wrapBehavioursEnabled",t)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(t){this.setOption("showFoldWidgets",t)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(t){this.selection.isEmpty()&&("left"==t?this.selection.selectLeft():this.selection.selectRight());var e=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(e.start.row),r=n.getMode().transformAction(i,"deletion",this,n,e);if(0===e.end.column){var o=n.getTextRange(e);if("\n"==o[o.length-1]){var s=n.getLine(e.end.row);/^\s+$/.test(s)&&(e.end.column=s.length)}}r&&(e=r)}this.session.remove(e),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var t=this.getSelectionRange();t.start.column==t.end.column&&t.start.row==t.end.row&&(t.end.column=0,t.end.row++),this.session.remove(t),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var t=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(t)},this.transposeLetters=function(){if(this.selection.isEmpty()){var t=this.getCursorPosition(),e=t.column;if(0!==e){var n,i,r=this.session.getLine(t.row);e<r.length?(n=r.charAt(e)+r.charAt(e-1),i=new f(t.row,e-1,t.row,e+1)):(n=r.charAt(e-1)+r.charAt(e-2),i=new f(t.row,e-2,t.row,e)),this.session.replace(i,n)}}},this.toLowerCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),n=this.session.getTextRange(e);this.session.replace(e,n.toLowerCase()),this.selection.setSelectionRange(t)},this.toUpperCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),n=this.session.getTextRange(e);this.session.replace(e,n.toUpperCase()),this.selection.setSelectionRange(t)},this.indent=function(){var t=this.session,e=this.getSelectionRange();if(e.start.row<e.end.row){var n=this.$getSelectedRows();return void t.indentRows(n.first,n.last,"	")}if(e.start.column<e.end.column){var i=t.getTextRange(e);if(!/^\s+$/.test(i)){var n=this.$getSelectedRows();return void t.indentRows(n.first,n.last,"	")}}var r=t.getLine(e.start.row),s=e.start,a=t.getTabSize(),l=t.documentToScreenColumn(s.row,s.column);if(this.session.getUseSoftTabs())var c=a-l%a,h=o.stringRepeat(" ",c);else{for(var c=l%a;" "==r[e.start.column]&&c;)e.start.column--,c--;this.selection.setSelectionRange(e),h="	"}return this.insert(h)},this.blockIndent=function(){var t=this.$getSelectedRows();this.session.indentRows(t.first,t.last,"	")},this.blockOutdent=function(){var t=this.session.getSelection();this.session.outdentRows(t.getRange())},this.sortLines=function(){var t=this.$getSelectedRows(),e=this.session,n=[];for(r=t.first;r<=t.last;r++)n.push(e.getLine(r));n.sort(function(t,e){return t.toLowerCase()<e.toLowerCase()?-1:t.toLowerCase()>e.toLowerCase()?1:0});for(var i=new f(0,0,0,0),r=t.first;r<=t.last;r++){var o=e.getLine(r);i.start.row=r,i.end.row=r,i.end.column=o.length,e.replace(i,n[r-t.first])}},this.toggleCommentLines=function(){var t=this.session.getState(this.getCursorPosition().row),e=this.$getSelectedRows();this.session.getMode().toggleCommentLines(t,this.session,e.first,e.last)},this.toggleBlockComment=function(){var t=this.getCursorPosition(),e=this.session.getState(t.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(e,this.session,n,t)},this.getNumberAt=function(t,e){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(t);n.lastIndex<e;){var r=n.exec(i);if(r.index<=e&&r.index+r[0].length>=e){var o={value:r[0],start:r.index,end:r.index+r[0].length};return o}}return null},this.modifyNumber=function(t){var e=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new f(e,n-1,e,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(e,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,l=parseFloat(o.value);l*=Math.pow(10,a),t*=s!==o.end&&s>n?Math.pow(10,o.end-n-1):Math.pow(10,o.end-n),l+=t,l/=Math.pow(10,a);var c=l.toFixed(a),h=new f(e,o.start,e,o.end);this.session.replace(h,c),this.moveCursorTo(e,Math.max(o.start+1,n+c.length-o.value.length))}}},this.removeLines=function(){var t,e=this.$getSelectedRows();t=0===e.first||e.last+1<this.session.getLength()?new f(e.first,0,e.last+1,0):new f(e.first-1,this.session.getLine(e.first-1).length,e.last,this.session.getLine(e.last).length),this.session.remove(t),this.clearSelection()},this.duplicateSelection=function(){var t=this.selection,e=this.session,n=t.getRange(),i=t.isBackwards();if(n.isEmpty()){var r=n.start.row;e.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=e.insert(o,e.getTextRange(n),!1);n.start=o,n.end=s,t.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(function(t,e){return this.session.moveLinesDown(t,e)})},this.moveLinesUp=function(){this.$moveLines(function(t,e){return this.session.moveLinesUp(t,e)})},this.moveText=function(t,e,n){return this.session.moveText(t,e,n)},this.copyLinesUp=function(){this.$moveLines(function(t,e){return this.session.duplicateLines(t,e),0})},this.copyLinesDown=function(){this.$moveLines(function(t,e){return this.session.duplicateLines(t,e)})},this.$moveLines=function(t){var e=this.selection;if(!e.inMultiSelectMode||this.inVirtualSelectionMode){var n=e.toOrientedRange(),i=this.$getSelectedRows(n),r=t.call(this,i.first,i.last);n.moveBy(r,0),e.fromOrientedRange(n)}else{var o=e.rangeList.ranges;e.rangeList.detach(this.session);for(var s=o.length;s--;){for(var a=s,i=o[s].collapseRows(),l=i.end.row,c=i.start.row;s--&&(i=o[s].collapseRows(),c-i.end.row<=1);)c=i.end.row;s++;for(var r=t.call(this,c,l);a>=s;)o[a].moveBy(r,0),a--}e.fromOrientedRange(e.ranges[0]),e.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var t=this.getSelectionRange().collapseRows();return{first:this.session.getRowFoldStart(t.start.row),last:this.session.getRowFoldEnd(t.end.row)}},this.onCompositionStart=function(t){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(t){this.renderer.setCompositionText(t)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(t){return t>=this.getFirstVisibleRow()&&t<=this.getLastVisibleRow()},this.isRowFullyVisible=function(t){return t>=this.renderer.getFirstFullyVisibleRow()&&t<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(t,e){var n=this.renderer,i=this.renderer.layerConfig,r=t*Math.floor(i.height/i.lineHeight);this.$blockScrolling++,e===!0?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):e===!1&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=e&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(t){this.renderer.scrollToRow(t)},this.scrollToLine=function(t,e,n,i){this.renderer.scrollToLine(t,e,n,i)},this.centerSelection=function(){var t=this.getSelectionRange(),e={row:Math.floor(t.start.row+(t.end.row-t.start.row)/2),column:Math.floor(t.start.column+(t.end.column-t.start.column)/2)};this.renderer.alignCursor(e,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(t,e){this.selection.moveCursorTo(t,e)},this.moveCursorToPosition=function(t){this.selection.moveCursorToPosition(t)},this.jumpToMatching=function(t){var e=this.getCursorPosition(),n=this.session.getBracketRange(e);if(!n){if(n=this.find({needle:/[{}()\[\]]/g,preventScroll:!0,start:{row:e.row,column:e.column-1}}),!n)return;var i=n.start;i.row==e.row&&Math.abs(i.column-e.column)<2&&(n=this.session.getBracketRange(i))}i=n&&n.cursor||i,i&&(t?n&&n.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(i.row,i.column):(this.clearSelection(),this.moveCursorTo(i.row,i.column)))},this.gotoLine=function(t,e,n){this.selection.clearSelection(),this.session.unfold({row:t-1,column:e||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(t-1,e||0),this.$blockScrolling-=1,this.isRowFullyVisible(t-1)||this.scrollToLine(t-1,!0,n)},this.navigateTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},this.navigateUp=function(t){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),t=t||1,this.selection.moveCursorBy(-t,0)},this.navigateDown=function(t){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),t=t||1,this.selection.moveCursorBy(t,0)},this.navigateLeft=function(t){if(this.selection.isEmpty())for(t=t||1;t--;)this.selection.moveCursorLeft();else{var e=this.getSelectionRange().start;this.moveCursorToPosition(e)}this.clearSelection()},this.navigateRight=function(t){if(this.selection.isEmpty())for(t=t||1;t--;)this.selection.moveCursorRight();else{var e=this.getSelectionRange().end;this.moveCursorToPosition(e)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(t,e){e&&this.$search.set(e);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,t)&&(i=1),null!==n&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),i):i},this.replaceAll=function(t,e){e&&this.$search.set(e);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;this.$blockScrolling+=1;var r=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],t)&&i++;return this.selection.setSelectionRange(r),this.$blockScrolling-=1,i},this.$tryReplace=function(t,e){var n=this.session.getTextRange(t);return e=this.$search.replace(n,e),null!==e?(t.end=this.session.replace(t,e),t):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(t,e,n){e||(e={}),"string"==typeof t||t instanceof RegExp?e.needle=t:"object"==typeof t&&i.mixin(e,t);var r=this.selection.getRange();null==e.needle&&(t=this.session.getTextRange(r)||this.$search.$options.needle,t||(r=this.session.getWordRange(r.start.row,r.start.column),t=this.session.getTextRange(r)),this.$search.set({needle:t})),this.$search.set(e),e.start||this.$search.set({start:r});var o=this.$search.find(this.session);return e.preventScroll?o:o?(this.revealRange(o,n),o):(e.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(t,e){this.find({skipCurrent:!0,backwards:!1},t,e)},this.findPrevious=function(t,e){this.find(t,{skipCurrent:!0,backwards:!0},e)},this.revealRange=function(t,e){this.$blockScrolling+=1,this.session.unfold(t),this.selection.setSelectionRange(t),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(t.start,t.end,.5),e!==!1&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._emit("destroy",this)},this.setAutoScrollEditorIntoView=function(t){if(t!==!1){var e,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",function(){i=!0}),s=this.renderer.on("beforeRender",function(){i&&(e=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(i&&e&&n.isFocused()){var t=n.renderer,o=t.$cursorLayer.$pixelPos,s=t.layerConfig,a=o.top-s.offset;i=o.top>=0&&a+e.top<0?!0:o.top<s.height&&o.top+e.top+s.lineHeight>window.innerHeight?!1:null,null!=i&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=e=null}});this.setAutoScrollEditorIntoView=function(t){t!==!0&&(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",o),this.renderer.removeEventListener("afterRender",a),this.renderer.removeEventListener("beforeRender",s))}}},this.$resetCursorStyle=function(){var t=this.$cursorStyle||"ace",e=this.renderer.$cursorLayer;e&&(e.setSmoothBlinking("smooth"==t),e.isBlinking=!this.$readOnly&&"wide"!=t)}}).call(y.prototype),v.defineOptions(y.prototype,"editor",{selectionStyle:{set:function(t){this.onSelectionChange(),this._emit("changeSelectionStyle",{data:t})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(t){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(t){this.textInput.setReadOnly(t),this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(t){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session",mode:"session"}),e.Editor=y}),define("ace/lib/lang",["require","exports","module"],function(t,e,n){e.stringReverse=function(t){return t.split("").reverse().join("")},e.stringRepeat=function(t,e){for(var n="";e>0;)1&e&&(n+=t),(e>>=1)&&(t+=t);return n};var i=/^\s\s*/,r=/\s\s*$/;e.stringTrimLeft=function(t){return t.replace(i,"")},e.stringTrimRight=function(t){return t.replace(r,"")},e.copyObject=function(t){var e={};for(var n in t)e[n]=t[n];return e},e.copyArray=function(t){for(var e=[],n=0,i=t.length;i>n;n++)t[n]&&"object"==typeof t[n]?e[n]=this.copyObject(t[n]):e[n]=t[n];return e},e.deepCopy=function(t){if("object"!=typeof t||!t)return t;var n=t.constructor;if(n===RegExp)return t;var i=n();for(var r in t)"object"==typeof t[r]?i[r]=e.deepCopy(t[r]):i[r]=t[r];return i},e.arrayToMap=function(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=1;return e},e.createMap=function(t){var e=Object.create(null);for(var n in t)e[n]=t[n];return e},e.arrayRemove=function(t,e){for(var n=0;n<=t.length;n++)e===t[n]&&t.splice(n,1)},e.escapeRegExp=function(t){return t.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},e.escapeHTML=function(t){return t.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},e.getMatchOffsets=function(t,e){var n=[];return t.replace(e,function(t){n.push({offset:arguments[arguments.length-2],length:t.length})}),n},e.deferredCall=function(t){var e=null,n=function(){e=null,t()},i=function(t){return i.cancel(),e=setTimeout(n,t||0),i};return i.schedule=i,i.call=function(){return this.cancel(),t(),i},i.cancel=function(){return clearTimeout(e),e=null,i},i.isPending=function(){return e},i},e.delayedCall=function(t,e){var n=null,i=function(){n=null,t()},r=function(t){null==n&&(n=setTimeout(i,t||e))};return r.delay=function(t){n&&clearTimeout(n),n=setTimeout(i,t||e)},r.schedule=r,r.call=function(){this.cancel(),t()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r}}),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(t,e,n){var i=t("../lib/event"),r=t("../lib/useragent"),o=t("../lib/dom"),s=t("../lib/lang"),a=r.isChrome<18,l=function(t,e){function n(t){if(!g){if(D)e=0,n=t?0:h.value.length-1;else var e=t?2:1,n=2;try{h.setSelectionRange(e,n)}catch(i){}}}function l(){g||(h.value=u,r.isWebKit&&x.schedule())}function c(){setTimeout(function(){m&&(h.style.cssText=m,m=""),null==e.renderer.$keepTextAreaAtCursor&&(e.renderer.$keepTextAreaAtCursor=!0,e.renderer.$moveTextAreaToCursor())},0)}var h=o.createElement("textarea");h.className="ace_text-input",r.isTouchPad&&h.setAttribute("x-palm-disable-auto-cap",!0),h.wrap="off",h.autocorrect="off",h.autocapitalize="off",h.spellcheck=!1,h.style.opacity="0",t.insertBefore(h,t.firstChild);var u="",d=!1,f=!1,p=!1,g=!1,m="",v=!0;try{var y=document.activeElement===h}catch(w){}i.addListener(h,"blur",function(){e.onBlur(),y=!1}),i.addListener(h,"focus",function(){y=!0,e.onFocus(),n()}),this.focus=function(){h.focus()},this.blur=function(){h.blur()},this.isFocused=function(){return y};var b=s.delayedCall(function(){y&&n(v)}),x=s.delayedCall(function(){g||(h.value=u,y&&n())});r.isWebKit||e.addEventListener("changeSelection",function(){e.selection.isEmpty()!=v&&(v=!v,b.schedule())}),l(),y&&e.onFocus();var C=function(t){return 0===t.selectionStart&&t.selectionEnd===t.value.length};if(!h.setSelectionRange&&h.createTextRange&&(h.setSelectionRange=function(t,e){var n=this.createTextRange();n.collapse(!0),n.moveStart("character",t),n.moveEnd("character",e),n.select()},C=function(t){try{var e=t.ownerDocument.selection.createRange()}catch(n){}return e&&e.parentElement()==t?e.text==t.value:!1}),r.isOldIE){var A=!1,E=function(t){if(!A){var e=h.value;if(!g&&e&&e!=u){if(t&&e==u[0])return k.schedule();$(e),A=!0,l(),A=!1}}},k=s.delayedCall(E);i.addListener(h,"propertychange",E);var F={13:1,27:1};i.addListener(h,"keyup",function(t){return!g||h.value&&!F[t.keyCode]||setTimeout(P,0),(h.value.charCodeAt(0)||0)<129?k.call():void(g?I():R())}),i.addListener(h,"keydown",function(t){k.schedule(50)})}var _=function(t){d?d=!1:f?f=!1:C(h)?(e.selectAll(),n()):D&&n(e.selection.isEmpty())},D=null;this.setInputHandler=function(t){D=t},this.getInputHandler=function(){return D};var S=!1,$=function(t){D&&(t=D(t),D=null),p?(n(),t&&e.onPaste(t),p=!1):t==u.charAt(0)?S?e.execCommand("del",{source:"ace"}):e.execCommand("backspace",{source:"ace"}):(t.substring(0,2)==u?t=t.substr(2):t.charAt(0)==u.charAt(0)?t=t.substr(1):t.charAt(t.length-1)==u.charAt(0)&&(t=t.slice(0,-1)),t.charAt(t.length-1)==u.charAt(0)&&(t=t.slice(0,-1)),t&&e.onTextInput(t)),S&&(S=!1)},T=function(t){if(!g){var e=h.value;$(e),l()}},B=function(t){var r=e.getCopyText();if(!r)return void i.preventDefault(t);var o=t.clipboardData||window.clipboardData;if(o&&!a){var s=o.setData("Text",r);s&&(e.onCut(),i.preventDefault(t))}s||(d=!0,h.value=r,h.select(),setTimeout(function(){d=!1,l(),n(),e.onCut()}))},M=function(t){var r=e.getCopyText();if(!r)return void i.preventDefault(t);var o=t.clipboardData||window.clipboardData;if(o&&!a){var s=o.setData("Text",r);s&&(e.onCopy(),i.preventDefault(t))}s||(f=!0,h.value=r,h.select(),setTimeout(function(){f=!1,l(),n(),e.onCopy()}))},L=function(t){var o=t.clipboardData||window.clipboardData;if(o){var s=o.getData("Text");s&&e.onPaste(s),r.isIE&&setTimeout(n),i.preventDefault(t)}else h.value="",p=!0};i.addCommandKeyListener(h,e.onCommandKey.bind(e)),i.addListener(h,"select",_),i.addListener(h,"input",T),i.addListener(h,"cut",B),i.addListener(h,"copy",M),i.addListener(h,"paste",L),"oncut"in h&&"oncopy"in h&&"onpaste"in h||i.addListener(t,"keydown",function(t){if((!r.isMac||t.metaKey)&&t.ctrlKey)switch(t.keyCode){case 67:M(t);break;case 86:L(t);break;case 88:B(t)}});var R=function(t){g||(g={},e.onCompositionStart(),setTimeout(I,0),e.on("mousedown",P),e.selection.isEmpty()||(e.insert(""),e.session.markUndoGroup(),e.selection.clearSelection()),e.session.markUndoGroup())},I=function(){if(g){var t=h.value.replace(/\x01/g,"");if(g.lastValue!==t&&(e.onCompositionUpdate(t),g.lastValue&&e.undo(),g.lastValue=t,g.lastValue)){var n=e.selection.getRange();e.insert(g.lastValue),e.session.markUndoGroup(),g.range=e.selection.getRange(),e.selection.setRange(n),e.selection.clearSelection()}}},P=function(t){var n=g;g=!1;var i=setTimeout(function(){i=null;var t=h.value.replace(/\x01/g,"");g||(t==n.lastValue?l():!n.lastValue&&t&&(l(),$(t)))});D=function(t){return i&&clearTimeout(i),t=t.replace(/\x01/g,""),t==n.lastValue?"":(n.lastValue&&i&&e.undo(),t)},e.onCompositionEnd(),e.removeListener("mousedown",P),"compositionend"==t.type&&n.range&&e.selection.setRange(n.range)},N=s.delayedCall(I,50);if(i.addListener(h,"compositionstart",R),r.isGecko?i.addListener(h,"text",function(){N.schedule()}):(i.addListener(h,"keyup",function(){N.schedule()}),i.addListener(h,"keydown",function(){N.schedule()})),i.addListener(h,"compositionend",P),this.getElement=function(){return h},this.setReadOnly=function(t){h.readOnly=t},this.onContextMenu=function(t){S=!0,m||(m=h.style.cssText),h.style.cssText="z-index:100000;"+(r.isIE?"opacity:0.1;":""),n(e.selection.isEmpty()),e._emit("nativecontextmenu",{target:e,domEvent:t});var s=e.container.getBoundingClientRect(),a=o.computedStyle(e.container),l=s.top+(parseInt(a.borderTopWidth)||0),u=s.left+(parseInt(s.borderLeftWidth)||0),d=s.bottom-l-h.clientHeight,f=function(t){h.style.left=t.clientX-u-2+"px",h.style.top=Math.min(t.clientY-l-2,d)+"px"};f(t),"mousedown"==t.type&&(e.renderer.$keepTextAreaAtCursor&&(e.renderer.$keepTextAreaAtCursor=null),r.isWin&&i.capture(e.container,f,c))},this.onContextMenuClose=c,!r.isGecko||r.isMac){var O=function(t){e.textInput.onContextMenu(t),c()};i.addListener(e.renderer.scroller,"contextmenu",O),i.addListener(h,"contextmenu",O)}};e.TextInput=l}),define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(t,e,n){var i=t("../lib/event"),r=t("../lib/useragent"),o=t("./default_handlers").DefaultHandlers,s=t("./default_gutter_handler").GutterHandler,a=t("./mouse_event").MouseEvent,l=t("./dragdrop_handler").DragdropHandler,c=t("../config"),h=function(t){this.editor=t,new o(this),new s(this),new l(this);var e=t.renderer.getMouseEventTarget();i.addListener(e,"click",this.onMouseEvent.bind(this,"click")),i.addListener(e,"mousemove",this.onMouseMove.bind(this,"mousemove")),i.addMultiMouseDownListener(e,[300,300,250],this,"onMouseEvent"),t.renderer.scrollBarV&&(i.addMultiMouseDownListener(t.renderer.scrollBarV.inner,[300,300,250],this,"onMouseEvent"),i.addMultiMouseDownListener(t.renderer.scrollBarH.inner,[300,300,250],this,"onMouseEvent")),i.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"));
var n=t.renderer.$gutter;i.addListener(n,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),i.addListener(n,"click",this.onMouseEvent.bind(this,"gutterclick")),i.addListener(n,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),i.addListener(n,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),i.addListener(e,"mousedown",function(e){t.focus()}),i.addListener(n,"mousedown",function(e){return t.focus(),i.preventDefault(e)})};(function(){this.onMouseEvent=function(t,e){this.editor._emit(t,new a(e,this.editor))},this.onMouseMove=function(t,e){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(t,new a(e,this.editor))},this.onMouseWheel=function(t,e){var n=new a(e,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=e.wheelX,n.wheelY=e.wheelY,this.editor._emit(t,n)},this.setState=function(t){this.state=t},this.captureMouse=function(t,e){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var o=this,s=function(t){o.x=t.clientX,o.y=t.clientY,e&&e(t),o.mouseEvent=new a(t,o.editor),o.$mouseMoved=!0},l=function(t){clearInterval(h),c(),o[o.state+"End"]&&o[o.state+"End"](t),o.$clickSelection=null,null==n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,o.onMouseEvent("mouseup",t)},c=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==t.domEvent.type)return setTimeout(function(){l(t)});o.$onCaptureMouseMove=s,o.releaseMouse=i.capture(this.editor.container,s,l);var h=setInterval(c,20)},this.releaseMouse=null}).call(h.prototype),c.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:150},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0}}),e.MouseHandler=h}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,e,n){function i(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(e){t[e]=this[e]},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function r(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}function o(t,e){if(t.start.row==t.end.row)var n=2*e.column-t.start.column-t.end.column;else if(t.start.row!=t.end.row-1||t.start.column||t.end.column)var n=2*e.row-t.start.row-t.end.row;else var n=e.column-4;return 0>n?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}var s=(t("../lib/dom"),t("../lib/event"),t("../lib/useragent"),0);(function(){this.onMouseDown=function(t){var e=t.inSelection(),n=t.getDocumentPosition();this.mousedownEvent=t;var i=this.editor,r=t.getButton();if(0!==r){var o=i.getSelectionRange(),s=o.isEmpty();return s&&(i.moveCursorToPosition(n),i.selection.clearSelection()),void i.textInput.onContextMenu(t.domEvent)}return!e||i.isFocused()||(i.focus(),!this.$focusTimout||this.$clickSelection||i.inMultiSelectMode)?(!e||this.$clickSelection||t.getShiftKey()||i.inMultiSelectMode?this.startSelect(n):e&&(this.mousedownEvent.time=Date.now(),this.startSelect(n)),this.captureMouse(t),t.preventDefault()):(this.mousedownEvent.time=Date.now(),this.setState("focusWait"),void this.captureMouse(t))},this.startSelect=function(t){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor,n=this.mousedownEvent.getShiftKey();n?e.selection.selectToPosition(t):this.$clickSelection||(e.moveCursorToPosition(t),e.selection.clearSelection()),e.renderer.scroller.setCapture&&e.renderer.scroller.setCapture(),e.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)t=this.$clickSelection.end;else if(1==i)t=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,t=r.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(t){var e,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[t](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&0>=a)e=this.$clickSelection.end,(r.end.row!=i.row||r.end.column!=i.column)&&(i=r.start);else if(1==a&&s>=0)e=this.$clickSelection.start,(r.start.row!=i.row||r.start.column!=i.column)&&(i=r.end);else if(-1==s&&1==a)i=r.end,e=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,e=l.anchor}n.selection.setSelectionAnchor(e.row,e.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var t=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),e=Date.now();(t>s||e-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(t){var e=t.getDocumentPosition(),n=this.editor,i=n.session,r=i.getBracketRange(e);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState("select")):(r=n.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=r,this[this.state]&&this[this.state](t)},this.onTripleClick=function(t){var e=t.getDocumentPosition(),n=this.editor;this.setState("selectByLines"),this.$clickSelection=n.selection.getLineRange(e.row),this[this.state]&&this[this.state](t)},this.onQuadClick=function(t){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(t){if(!t.getShiftKey()&&!t.getAccelKey()){var e=t.domEvent.timeStamp,n=e-(this.$lastScrollTime||0),i=this.editor,r=i.renderer.isScrollableBy(t.wheelX*t.speed,t.wheelY*t.speed);return r||200>n?(this.$lastScrollTime=e,i.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()):void 0}}}).call(i.prototype),e.DefaultHandlers=i}),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event"],function(t,e,n){function i(t){function e(){u=r.createElement("div"),u.className="ace_gutter-tooltip",u.style.display="none",a.container.appendChild(u)}function n(){u||e();var t=h.getDocumentPosition().row,n=l.$annotations[t];if(!n)return i();var r=a.session.getLength();if(t==r){var o=a.renderer.pixelToScreenCoordinates(0,h.y).row,c=h.$pos;if(o>a.session.documentToScreenRow(c.row,c.column))return i()}d!=n&&(d=n.text.join("<br/>"),u.style.display="block",u.innerHTML=d,a.on("mousewheel",i),s(h))}function i(){c&&(c=clearTimeout(c)),d&&(u.style.display="none",d=null,a.removeEventListener("mousewheel",i))}function s(t){var e=a.renderer.$gutter.getBoundingClientRect();if(u.style.left=t.x+15+"px",t.y+3*a.renderer.lineHeight+15<e.bottom)u.style.bottom="",u.style.top=t.y+15+"px";else{u.style.top="";var n=window.innerHeight||document.documentElement.clientHeight;u.style.bottom=n-t.y+5+"px"}}var a=t.editor,l=a.renderer.$gutterLayer;t.editor.setDefaultHandler("guttermousedown",function(e){if(a.isFocused()&&0==e.getButton()){var n=l.getRegion(e);if("foldWidgets"!=n){var i=e.getDocumentPosition().row,r=a.session.selection;if(e.getShiftKey())r.selectTo(i,0);else{if(2==e.domEvent.detail)return a.selectAll(),e.preventDefault();t.$clickSelection=a.selection.getLineRange(i)}return t.setState("selectByLines"),t.captureMouse(e),e.preventDefault()}}});var c,h,u,d;t.editor.setDefaultHandler("guttermousemove",function(e){var o=e.domEvent.target||e.domEvent.srcElement;return r.hasCssClass(o,"ace_fold-widget")?i():(d&&s(e),h=e,void(c||(c=setTimeout(function(){c=null,h&&!t.isMousePressed?n():i()},50))))}),o.addListener(a.renderer.$gutter,"mouseout",function(t){h=null,d&&!c&&(c=setTimeout(function(){c=null,i()},50))}),a.on("changeSession",i)}var r=t("../lib/dom"),o=t("../lib/event");e.GutterHandler=i}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,e,n){var i=t("../lib/event"),r=t("../lib/useragent"),o=e.MouseEvent=function(t,e){this.domEvent=t,this.editor=e,this.x=this.clientX=t.clientX,this.y=this.clientY=t.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var t=this.editor,e=t.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=e.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,e,n){function i(t){function e(t,e){var n=Date.now(),i=!e||t.row!=e.row,o=!e||t.column!=e.column;if(!D||i||o)m.$blockScrolling+=1,m.moveCursorToPosition(t),m.$blockScrolling-=1,D=n,S={x:b,y:x};else{var s=r(S.x,S.y,b,x);s>h?D=null:n-D>=c&&(m.renderer.scrollCursorIntoView(),D=null)}}function n(t,e){var n=Date.now(),i=m.renderer.layerConfig.lineHeight,r=m.renderer.layerConfig.characterWidth,o=m.renderer.scroller.getBoundingClientRect(),s={x:{left:b-o.left,right:o.right-b},y:{top:x-o.top,bottom:o.bottom-x}},a=Math.min(s.x.left,s.x.right),c=Math.min(s.y.top,s.y.bottom),h={row:t.row,column:t.column};2>=a/r&&(h.column+=s.x.left<s.x.right?-3:2),1>=c/i&&(h.row+=s.y.top<s.y.bottom?-1:1);var u=t.row!=h.row,d=t.column!=h.column,f=!e||t.row!=e.row;u||d&&!f?_?n-_>=l&&m.renderer.scrollCursorIntoView(h):_=n:_=null}function i(){var t=E;E=m.renderer.screenToTextCoordinates(b,x),e(E,t),n(E,t)}function u(){A=m.selection.toOrientedRange(),w=m.session.addMarker(A,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),C=setInterval(i,20),T=0,s.addListener(document,"mousemove",f)}function d(){clearInterval(C),m.session.removeMarker(w),w=null,m.$blockScrolling+=1,m.selection.fromOrientedRange(A),m.$blockScrolling-=1,m.isFocused()&&!F&&m.renderer.$cursorLayer.setBlinking(!m.getReadOnly()),A=null,T=0,_=null,D=null,s.removeListener(document,"mousemove",f)}function f(){null==B&&(B=setTimeout(function(){null!=B&&w&&d()},20))}function p(t){var e=t.types;return!e||Array.prototype.some.call(e,function(t){return"text/plain"==t||"Text"==t})}function g(t){var e=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],i=a.isMac?t.altKey:t.ctrlKey,r="uninitialized";try{r=t.dataTransfer.effectAllowed.toLowerCase()}catch(t){}var o="none";return i&&e.indexOf(r)>=0?o="copy":n.indexOf(r)>=0?o="move":e.indexOf(r)>=0&&(o="copy"),o}var m=t.editor,v=o.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(v.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var y=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];y.forEach(function(e){t[e]=this[e]},this),m.addEventListener("mousedown",this.onMouseDown.bind(t));var w,b,x,C,A,E,k,F,_,D,S,$=m.container,T=0;this.onDragStart=function(t){if(this.cancelDrag||!$.draggable){var e=this;return setTimeout(function(){e.startSelect(),e.captureMouse(t)},0),t.preventDefault()}A=m.getSelectionRange();var n=t.dataTransfer;n.effectAllowed=m.getReadOnly()?"copy":"copyMove",a.isOpera&&(m.container.appendChild(v),v._top=v.offsetTop),n.setDragImage&&n.setDragImage(v,0,0),a.isOpera&&m.container.removeChild(v),n.clearData(),n.setData("Text",m.session.getTextRange()),F=!0,this.setState("drag")},this.onDragEnd=function(t){if($.draggable=!1,F=!1,this.setState(null),!m.getReadOnly()){var e=t.dataTransfer.dropEffect;k||"move"!=e||m.session.remove(m.getSelectionRange()),m.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging")},this.onDragEnter=function(t){return!m.getReadOnly()&&p(t.dataTransfer)?(w||u(),T++,t.dataTransfer.dropEffect=k=g(t),s.preventDefault(t)):void 0},this.onDragOver=function(t){return!m.getReadOnly()&&p(t.dataTransfer)?(w||(u(),T++),null!==B&&(B=null),b=t.clientX,x=t.clientY,t.dataTransfer.dropEffect=k=g(t),s.preventDefault(t)):void 0},this.onDragLeave=function(t){return T--,0>=T&&w?(d(),k=null,s.preventDefault(t)):void 0},this.onDrop=function(t){if(w){var e=t.dataTransfer;if(F)switch(k){case"move":A=A.contains(E.row,E.column)?{start:E,end:E}:m.moveText(A,E);break;case"copy":A=m.moveText(A,E,!0)}else{var n=e.getData("Text");A={start:E,end:m.session.insert(E,n)},m.focus(),k=null}return d(),s.preventDefault(t)}},s.addListener($,"dragstart",this.onDragStart.bind(t)),s.addListener($,"dragend",this.onDragEnd.bind(t)),s.addListener($,"dragenter",this.onDragEnter.bind(t)),s.addListener($,"dragover",this.onDragOver.bind(t)),s.addListener($,"dragleave",this.onDragLeave.bind(t)),s.addListener($,"drop",this.onDrop.bind(t));var B=null}function r(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}var o=t("../lib/dom"),s=t("../lib/event"),a=t("../lib/useragent"),l=200,c=200,h=5;(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor.container;t.draggable=!0,this.editor.renderer.$cursorLayer.setBlinking(!1),this.editor.setStyle("ace_dragging"),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(a.isIE&&"dragReady"==this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&e.dragDrop()}if("dragWait"===this.state){var n=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),i=t.getButton(),r=t.domEvent.detail||1;if(1===r&&0===i&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),e.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;var s=e.container;s.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(i.prototype),e.DragdropHandler=i}),define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/event_emitter"],function(t,e,n){"no use strict";function i(t){return t.replace(/-(.)/g,function(t,e){return e.toUpperCase()})}var r=t("./lib/lang"),o=t("./lib/oop"),s=t("./lib/net"),a=t("./lib/event_emitter").EventEmitter,l=function(){return this}(),c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};e.get=function(t){if(!c.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return c[t]},e.set=function(t,e){if(!c.hasOwnProperty(t))throw new Error("Unknown config key: "+t);c[t]=e},e.all=function(){return r.copyObject(c)},o.implement(e,a),e.moduleUrl=function(t,e){if(c.$moduleUrls[t])return c.$moduleUrls[t];var n=t.split("/");e=e||n[n.length-2]||"";var i="snippets"==e?"/":"-",r=n[n.length-1];if("-"==i){var o=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");r=r.replace(o,"")}(!r||r==e)&&n.length>1&&(r=n[n.length-2]);var s=c[e+"Path"];return null==s?s=c.basePath:"/"==i&&(e=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+e+i+r+this.get("suffix")},e.setModuleUrl=function(t,e){return c.$moduleUrls[t]=e},e.$loading={},e.loadModule=function(n,i){var r,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{r=t(n)}catch(a){}if(r&&!e.$loading[n])return i&&i(r);if(e.$loading[n]||(e.$loading[n]=[]),e.$loading[n].push(i),!(e.$loading[n].length>1)){var l=function(){t([n],function(t){e._emit("load.module",{name:n,module:t});var i=e.$loading[n];e.$loading[n]=null,i.forEach(function(e){e&&e(t)})})};return e.get("packaged")?void s.loadScript(e.moduleUrl(n,o),l):l()}},e.init=function(){if(c.packaged=t.packaged||n.packaged||l.define&&define.packaged,!l.document)return"";for(var r={},o="",s=document.getElementsByTagName("script"),a=0;a<s.length;a++){var h=s[a],u=h.src||h.getAttribute("src");if(u){for(var d=h.attributes,f=0,p=d.length;p>f;f++){var g=d[f];0===g.name.indexOf("data-ace-")&&(r[i(g.name.replace(/^data-ace-/,""))]=g.value)}var m=u.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);m&&(o=m[1])}}o&&(r.base=r.base||o,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var v in r)"undefined"!=typeof r[v]&&e.set(v,r[v])};var h={setOptions:function(t){Object.keys(t).forEach(function(e){this.setOption(e,t[e])},this)},getOptions:function(t){var e={};return t?Array.isArray(t)||(e=t,t=Object.keys(e)):t=Object.keys(this.$options),t.forEach(function(t){e[t]=this.getOption(t)},this),e},setOption:function(t,e){if(this["$"+t]!==e){var n=this.$options[t];if(!n)return void("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+t+'"'));if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(t,e);n.handlesSet||(this["$"+t]=e),n&&n.set&&n.set.call(this,e)}},getOption:function(t){var e=this.$options[t];return e?e.forwardTo?this[e.forwardTo]&&this[e.forwardTo].getOption(t):e&&e.get?e.get.call(this):this["$"+t]:void("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+t+'"'))}},u={};e.defineOptions=function(t,e,n){return t.$options||(u[e]=t.$options={}),Object.keys(n).forEach(function(e){var i=n[e];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=e),t.$options[i.name]=i,"initialValue"in i&&(t["$"+i.name]=i.initialValue)}),o.implement(t,h),this},e.resetOptions=function(t){Object.keys(t.$options).forEach(function(e){var n=t.$options[e];"value"in n&&t.setOption(e,n.value)})},e.setDefaultValue=function(t,n,i){var r=u[t]||(u[t]={});r[n]&&(r.forwardTo?e.setDefaultValue(r.forwardTo,n,i):r[n].value=i)},e.setDefaultValues=function(t,n){Object.keys(n).forEach(function(i){e.setDefaultValue(t,i,n[i])})}}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,e,n){var i=t("./dom");e.get=function(t,e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onreadystatechange=function(){4===n.readyState&&e(n.responseText)},n.send(null)},e.loadScript=function(t,e){var n=i.getDocumentHead(),r=document.createElement("script");r.src=t,n.appendChild(r),r.onload=r.onreadystatechange=function(t,n){(n||!r.readyState||"loaded"==r.readyState||"complete"==r.readyState)&&(r=r.onload=r.onreadystatechange=null,n||e())}}}),define("ace/lib/event_emitter",["require","exports","module"],function(t,e,n){var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(t,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[t]||[],i=this._defaultHandlers[t];if(n.length||i){"object"==typeof e&&e||(e={}),e.type||(e.type=t),e.stopPropagation||(e.stopPropagation=r),e.preventDefault||(e.preventDefault=o),n=n.slice();for(var s=0;s<n.length&&(n[s](e,this),!e.propagationStopped);s++);return i&&!e.defaultPrevented?i(e,this):void 0}},i._signal=function(t,e){var n=(this._eventRegistry||{})[t];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](e,this)}},i.once=function(t,e){var n=this;e&&this.addEventListener(t,function i(){n.removeEventListener(t,i),e.apply(null,arguments)})},i.setDefaultHandler=function(t,e){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[t]){var i=n[t],r=n._disabled_[t];r||(n._disabled_[t]=r=[]),r.push(i);var o=r.indexOf(e);-1!=o&&r.splice(o,1)}n[t]=e},i.removeDefaultHandler=function(t,e){var n=this._defaultHandlers;if(n){var i=n._disabled_[t];if(n[t]==e){n[t];i&&this.setDefaultHandler(t,i.pop())}else if(i){var r=i.indexOf(e);-1!=r&&i.splice(r,1)}}},i.on=i.addEventListener=function(t,e,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[t];return i||(i=this._eventRegistry[t]=[]),-1==i.indexOf(e)&&i[n?"unshift":"push"](e),e},i.off=i.removeListener=i.removeEventListener=function(t,e){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[t];if(n){var i=n.indexOf(e);-1!==i&&n.splice(i,1)}},i.removeAllListeners=function(t){this._eventRegistry&&(this._eventRegistry[t]=[])},e.EventEmitter=i}),define("ace/mouse/fold_handler",["require","exports","module"],function(t,e,n){function i(t){t.on("click",function(e){var n=e.getDocumentPosition(),i=t.session,r=i.getFoldAt(n.row,n.column,1);r&&(e.getAccelKey()?i.removeFold(r):i.expandFold(r),e.stop())}),t.on("gutterclick",function(e){var n=t.renderer.$gutterLayer.getRegion(e);if("foldWidgets"==n){var i=e.getDocumentPosition().row,r=t.session;r.foldWidgets&&r.foldWidgets[i]&&t.session.onFoldWidgetClick(i,e),t.isFocused()||t.focus(),e.stop()}}),t.on("gutterdblclick",function(e){var n=t.renderer.$gutterLayer.getRegion(e);if("foldWidgets"==n){var i=e.getDocumentPosition().row,r=t.session,o=r.getParentFoldRangeData(i,!0),s=o.range||o.firstRange;if(s){i=s.start.row;var a=r.getFoldAt(i,r.getLine(i).length,1);a?r.removeFold(a):(r.addFold("...",s),t.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}e.stop()}})}e.FoldHandler=i}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,e,n){var i=t("../lib/keys"),r=t("../lib/event"),o=function(t){this.$editor=t,this.$data={},this.$handlers=[],this.setDefaultHandler(t.commands)};(function(){this.setDefaultHandler=function(t){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=t,this.addKeyboardHandler(t,0),this.$data={editor:this.$editor}},this.setKeyboardHandler=function(t){var e=this.$handlers;if(e[e.length-1]!=t){for(;e[e.length-1]&&e[e.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(e[e.length-1]);this.addKeyboardHandler(t,1)}},this.addKeyboardHandler=function(t,e){if(t){var n=this.$handlers.indexOf(t);-1!=n&&this.$handlers.splice(n,1),void 0==e?this.$handlers.push(t):this.$handlers.splice(e,0,t),-1==n&&t.attach&&t.attach(this.$editor)}},this.removeKeyboardHandler=function(t){var e=this.$handlers.indexOf(t);return-1==e?!1:(this.$handlers.splice(e,1),t.detach&&t.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(t,e,n,i){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&(o=this.$handlers[l].handleKeyboard(this.$data,t,e,n,i),!(o&&o.command&&(s="null"==o.command?!0:a.exec(o.command,this.$editor,o.args,i),s&&i&&-1!=t&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),s))););return s},this.onCommandKey=function(t,e,n){var r=i.keyCodeToString(n);this.$callKeyboardHandlers(e,r,n,t)},this.onTextInput=function(t){var e=this.$callKeyboardHandlers(-1,t);e||this.$editor.commands.exec("insertstring",this.$editor,t)}}).call(o.prototype),e.KeyBinding=o}),define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(t,e,n){var i=t("./lib/oop"),r=t("./lib/lang"),o=t("./config"),s=t("./lib/event_emitter").EventEmitter,a=t("./selection").Selection,l=t("./mode/text").Mode,c=t("./range").Range,h=t("./document").Document,u=t("./background_tokenizer").BackgroundTokenizer,d=t("./search_highlight").SearchHighlight,f=function(t,e){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new h(t)),this.setDocument(t),this.selection=new a(this),o.resetOptions(this),this.setMode(e),o._emit("session",this)};(function(){function e(t){return 4352>t?!1:t>=4352&&4447>=t||t>=4515&&4519>=t||t>=4602&&4607>=t||t>=9001&&9002>=t||t>=11904&&11929>=t||t>=11931&&12019>=t||t>=12032&&12245>=t||t>=12272&&12283>=t||t>=12288&&12350>=t||t>=12353&&12438>=t||t>=12441&&12543>=t||t>=12549&&12589>=t||t>=12593&&12686>=t||t>=12688&&12730>=t||t>=12736&&12771>=t||t>=12784&&12830>=t||t>=12832&&12871>=t||t>=12880&&13054>=t||t>=13056&&19903>=t||t>=19968&&42124>=t||t>=42128&&42182>=t||t>=43360&&43388>=t||t>=44032&&55203>=t||t>=55216&&55238>=t||t>=55243&&55291>=t||t>=63744&&64255>=t||t>=65040&&65049>=t||t>=65072&&65106>=t||t>=65108&&65126>=t||t>=65128&&65131>=t||t>=65281&&65376>=t||t>=65504&&65510>=t}i.implement(this,s),this.setDocument=function(t){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=t,t.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(t){if(!t)return this.$docRowCache=[],void(this.$screenRowCache=[]);var e=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,t)+1;e>n&&(this.$docRowCache.splice(n,e),this.$screenRowCache.splice(n,e))},this.$getRowCacheIndex=function(t,e){for(var n=0,i=t.length-1;i>=n;){var r=n+i>>1,o=t[r];if(e>o)n=r+1;else{if(!(o>e))return r;i=r-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(t){var e=t.data;this.$resetRowCache(e.start.row)},this.onChange=function(t){var e=t.data;this.$modified=!0,this.$resetRowCache(e.range.start.row);var n=this.$updateInternalDataOnChange(t);this.$fromUndo||!this.$undoManager||e.ignore||(this.$deltasDoc.push(e),n&&0!=n.length&&this.$deltasFold.push({action:"removeFolds",folds:n}),this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._emit("change",t)},this.setValue=function(t){this.doc.setValue(t),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(t){return this.bgTokenizer.getState(t)},this.getTokens=function(t){return this.bgTokenizer.getTokens(t)},this.getTokenAt=function(t,e){var n,i=this.bgTokenizer.getTokens(t),r=0;if(null==e)o=i.length-1,r=this.getLine(t).length;else for(var o=0;o<i.length&&(r+=i[o].value.length,!(r>=e));o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(t){if(this.$undoManager=t,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),t){var e=this;this.$syncInformUndoManager=function(){e.$informUndoManager.cancel(),e.$deltasFold.length&&(e.$deltas.push({group:"fold",deltas:e.$deltasFold}),e.$deltasFold=[]),e.$deltasDoc.length&&(e.$deltas.push({group:"doc",deltas:e.$deltasDoc}),e.$deltasDoc=[]),e.$deltas.length>0&&t.execute({action:"aceupdate",args:[e.$deltas,e],merge:e.mergeUndoDeltas}),e.mergeUndoDeltas=!1,e.$deltas=[]},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"	"},this.setUseSoftTabs=function(t){this.setOption("useSoftTabs",t)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(t){this.setOption("tabSize",t)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(t){return this.$useSoftTabs&&t.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(t){this.setOption("overwrite",t)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(t,e){this.$decorations[t]||(this.$decorations[t]=""),this.$decorations[t]+=" "+e,this._emit("changeBreakpoint",{})},this.removeGutterDecoration=function(t,e){this.$decorations[t]=(this.$decorations[t]||"").replace(" "+e,""),this._emit("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(t){this.$breakpoints=[];for(var e=0;e<t.length;e++)this.$breakpoints[t[e]]="ace_breakpoint";this._emit("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit("changeBreakpoint",{})},this.setBreakpoint=function(t,e){void 0===e&&(e="ace_breakpoint"),e?this.$breakpoints[t]=e:delete this.$breakpoints[t],this._emit("changeBreakpoint",{})},this.clearBreakpoint=function(t){delete this.$breakpoints[t],this._emit("changeBreakpoint",{})},this.addMarker=function(t,e,n,i){var r=this.$markerId++,o={range:t,type:n||"line",renderer:"function"==typeof n?n:null,clazz:e,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=o,this._emit("changeFrontMarker")):(this.$backMarkers[r]=o,this._emit("changeBackMarker")),r},this.addDynamicMarker=function(t,e){if(t.update){var n=this.$markerId++;return t.id=n,t.inFront=!!e,e?(this.$frontMarkers[n]=t,this._emit("changeFrontMarker")):(this.$backMarkers[n]=t,this._emit("changeBackMarker")),t}},this.removeMarker=function(t){var e=this.$frontMarkers[t]||this.$backMarkers[t];if(e){var n=e.inFront?this.$frontMarkers:this.$backMarkers;e&&(delete n[t],this._emit(e.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(t){return t?this.$frontMarkers:this.$backMarkers},this.highlight=function(t){if(!this.$searchHighlight){var e=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(e)}this.$searchHighlight.setRegexp(t)},this.highlightLines=function(t,e,n,i){"number"!=typeof e&&(n=e,e=t),n||(n="ace_step");var r=new c(t,0,e,1/0);return r.id=this.addMarker(r,n,"fullLine",i),r},this.setAnnotations=function(t){this.$annotations=t,this._emit("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(t){var e=t.match(/^.*?(\r?\n)/m);e?this.$autoNewLine=e[1]:this.$autoNewLine="\n"},this.getWordRange=function(t,e){var n=this.getLine(t),i=!1;if(e>0&&(i=!!n.charAt(e-1).match(this.tokenRe)),i||(i=!!n.charAt(e).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(e-1,e+1)))var r=/\s/;else var r=this.nonTokenRe;var o=e;if(o>0){do o--;while(o>=0&&n.charAt(o).match(r));o++}for(var s=e;s<n.length&&n.charAt(s).match(r);)s++;return new c(t,o,t,s)},this.getAWordRange=function(t,e){for(var n=this.getWordRange(t,e),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(t){this.doc.setNewLineMode(t)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(t){this.setOption("useWorker",t);
},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(t){var e=t.data;this.bgTokenizer.start(e.first),this._emit("tokenizerUpdate",t)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(t,e){if(t&&"object"==typeof t){if(t.getTokenizer)return this.$onChangeMode(t);var n=t,i=n.path}else i=t||"ace/mode/text";return this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[i]&&!n?(this.$onChangeMode(this.$modes[i]),void(e&&e())):(this.$modeId=i,o.loadModule(["mode",i],function(t){return this.$modeId!==i?e&&e():this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):void(t&&t.Mode&&(t=new t.Mode(n),n||(this.$modes[i]=t,t.$id=i),this.$onChangeMode(t),e&&e()))}.bind(this)),void(this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)))},this.$onChangeMode=function(t,e){if(e||(this.$modeId=t.$id),this.$mode!==t){this.$mode=t,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=t.getTokenizer();if(void 0!==n.addEventListener){var i=this.onReloadTokenizer.bind(this);n.addEventListener("update",i)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(n);else{this.bgTokenizer=new u(n);var r=this;this.bgTokenizer.addEventListener("update",function(t){r._emit("tokenizerUpdate",t)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=t.tokenRe,this.nonTokenRe=t.nonTokenRe,e||(this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(t.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if("undefined"==typeof Worker||t.noWorker)this.$worker=null;else try{this.$worker=this.$mode.createWorker(this)}catch(e){console.log("Could not load worker"),console.log(e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(t){this.$scrollTop===t||isNaN(t)||(this.$scrollTop=t,this._signal("changeScrollTop",t))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(t){this.$scrollLeft===t||isNaN(t)||(this.$scrollLeft=t,this._signal("changeScrollLeft",t))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var t=0;return this.lineWidgets.forEach(function(e){e&&e.screenWidth>t&&(t=e.screenWidth)}),this.lineWidgetWidth=t},this.$computeWidth=function(t){if(this.$modified||t){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var e=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=e.length,l=0;a>l;l++){if(l>s){if(l=o.end.row+1,l>=a)break;o=this.$foldData[r++],s=o?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(e[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(t){return this.doc.getLine(t)},this.getLines=function(t,e){return this.doc.getLines(t,e)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(t){return this.doc.getTextRange(t||this.selection.getRange())},this.insert=function(t,e){return this.doc.insert(t,e)},this.remove=function(t){return this.doc.remove(t)},this.undoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=null,i=t.length-1;-1!=i;i--){var r=t[i];"doc"==r.group?(this.doc.revertDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!0,n)):r.deltas.forEach(function(t){this.addFolds(t.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!e&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=null,i=0;i<t.length;i++){var r=t[i];"doc"==r.group&&(this.doc.applyDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!e&&this.selection.setSelectionRange(n),n}},this.setUndoSelect=function(t){this.$undoSelect=t},this.$getUndoSelection=function(t,e,n){function i(t){var n="insertText"===t.action||"insertLines"===t.action;return e?!n:n}var r,o,s=t[0],a=!1;i(s)?(r=c.fromPoints(s.range.start,s.range.end),a=!0):(r=c.fromPoints(s.range.start,s.range.start),a=!1);for(var l=1;l<t.length;l++)s=t[l],i(s)?(o=s.range.start,-1==r.compare(o.row,o.column)&&r.setStart(s.range.start),o=s.range.end,1==r.compare(o.row,o.column)&&r.setEnd(s.range.end),a=!0):(o=s.range.start,-1==r.compare(o.row,o.column)&&(r=c.fromPoints(s.range.start,s.range.start)),a=!1);if(null!=n){0==c.comparePoints(n.start,r.start)&&(n.start.column+=r.end.column-r.start.column,n.end.column+=r.end.column-r.start.column);var h=n.compareRange(r);1==h?r.setStart(n.start):-1==h&&r.setEnd(n.end)}return r},this.replace=function(t,e){return this.doc.replace(t,e)},this.moveText=function(t,e,n){var i=this.getTextRange(t),r=this.getFoldsInRange(t),o=c.fromPoints(e,e);if(!n){this.remove(t);var s=t.start.row-t.end.row,a=s?-t.end.column:t.start.column-t.end.column;a&&(o.start.row==t.end.row&&o.start.column>t.end.column&&(o.start.column+=a),o.end.row==t.end.row&&o.end.column>t.end.column&&(o.end.column+=a)),s&&o.start.row>=t.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var l=t.start,h=o.start,s=h.row-l.row,a=h.column-l.column;this.addFolds(r.map(function(t){return t=t.clone(),t.start.row==l.row&&(t.start.column+=a),t.end.row==l.row&&(t.end.column+=a),t.start.row+=s,t.end.row+=s,t}))}return o},this.indentRows=function(t,e,n){n=n.replace(/\t/g,this.getTabString());for(var i=t;e>=i;i++)this.insert({row:i,column:0},n)},this.outdentRows=function(t){for(var e=t.collapseRows(),n=new c(0,0,0,0),i=this.getTabSize(),r=e.start.row;r<=e.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;i>s&&" "==o.charAt(s);++s);i>s&&"	"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},this.$moveLines=function(t,e,n){if(t=this.getRowFoldStart(t),e=this.getRowFoldEnd(e),0>n){var i=this.getRowFoldStart(t+n);if(0>i)return 0;var r=i-t}else if(n>0){var i=this.getRowFoldEnd(e+n);if(i>this.doc.getLength()-1)return 0;var r=i-e}else{t=this.$clipRowToDocument(t),e=this.$clipRowToDocument(e);var r=e-t+1}var o=new c(t,0,e,Number.MAX_VALUE),s=this.getFoldsInRange(o).map(function(t){return t=t.clone(),t.start.row+=r,t.end.row+=r,t}),a=0==n?this.doc.getLines(t,e):this.doc.removeLines(t,e);return this.doc.insertLines(t+r,a),s.length&&this.addFolds(s),r},this.moveLinesUp=function(t,e){return this.$moveLines(t,e,-1)},this.moveLinesDown=function(t,e){return this.$moveLines(t,e,1)},this.duplicateLines=function(t,e){return this.$moveLines(t,e,0)},this.$clipRowToDocument=function(t){return Math.max(0,Math.min(t,this.doc.getLength()-1))},this.$clipColumnToRow=function(t,e){return 0>e?0:Math.min(this.doc.getLine(t).length,e)},this.$clipPositionToDocument=function(t,e){if(e=Math.max(0,e),0>t)t=0,e=0;else{var n=this.doc.getLength();t>=n?(t=n-1,e=this.doc.getLine(n-1).length):e=Math.min(this.doc.getLine(t).length,e)}return{row:t,column:e}},this.$clipRangeToDocument=function(t){t.start.row<0?(t.start.row=0,t.start.column=0):t.start.column=this.$clipColumnToRow(t.start.row,t.start.column);var e=this.doc.getLength()-1;return t.end.row>e?(t.end.row=e,t.end.column=this.doc.getLine(e).length):t.end.column=this.$clipColumnToRow(t.end.row,t.end.column),t},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(t){if(t!=this.$useWrapMode){if(this.$useWrapMode=t,this.$modified=!0,this.$resetRowCache(0),t){var e=this.getLength();this.$wrapData=[];for(var n=0;e>n;n++)this.$wrapData.push([]);this.$updateWrapData(0,e-1)}this._emit("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(t,e){(this.$wrapLimitRange.min!==t||this.$wrapLimitRange.max!==e)&&(this.$wrapLimitRange={min:t,max:e},this.$modified=!0,this._emit("changeWrapMode"))},this.adjustWrapLimit=function(t,e){var n=this.$wrapLimitRange;n.max<0&&(n={min:e,max:e});var i=this.$constrainWrapLimit(t,n.min,n.max);return i!=this.$wrapLimit&&i>1?(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(t,e,n){return e&&(t=Math.max(e,t)),n&&(t=Math.min(n,t)),t},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(t){this.setWrapLimitRange(t,t)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(t){var e,n=this.$useWrapMode,i=t.data.action,r=t.data.range.start.row,o=t.data.range.end.row,s=t.data.range.start,a=t.data.range.end,l=null;if(-1!=i.indexOf("Lines")?(o="insertLines"==i?r+t.data.lines.length:r,e=t.data.lines?t.data.lines.length:o-r):e=o-r,this.$updating=!0,0!=e)if(-1!=i.indexOf("remove")){this[n?"$wrapData":"$rowLengthCache"].splice(r,e);var c=this.$foldData;l=this.getFoldsInRange(t.data.range),this.removeFolds(l);var h=this.getFoldLine(a.row),u=0;if(h){h.addRemoveChars(a.row,a.column,s.column-a.column),h.shiftRow(-e);var d=this.getFoldLine(r);d&&d!==h&&(d.merge(h),h=d),u=c.indexOf(h)+1}for(u;u<c.length;u++){var h=c[u];h.start.row>=a.row&&h.shiftRow(-e)}o=r}else{var f;if(n){f=[r,0];for(var p=0;e>p;p++)f.push([]);this.$wrapData.splice.apply(this.$wrapData,f)}else f=Array(e),f.unshift(r,0),this.$rowLengthCache.splice.apply(this.$rowLengthCache,f);var c=this.$foldData,h=this.getFoldLine(r),u=0;if(h){var g=h.range.compareInside(s.row,s.column);0==g?(h=h.split(s.row,s.column),h.shiftRow(e),h.addRemoveChars(o,0,a.column-s.column)):-1==g&&(h.addRemoveChars(r,0,a.column-s.column),h.shiftRow(e)),u=c.indexOf(h)+1}for(u;u<c.length;u++){var h=c[u];h.start.row>=r&&h.shiftRow(e)}}else{e=Math.abs(t.data.range.start.column-t.data.range.end.column),-1!=i.indexOf("remove")&&(l=this.getFoldsInRange(t.data.range),this.removeFolds(l),e=-e);var h=this.getFoldLine(r);h&&h.addRemoveChars(r,s.column,e)}return n&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,n?this.$updateWrapData(r,o):this.$updateRowLengthCache(r,o),l},this.$updateRowLengthCache=function(t,e,n){this.$rowLengthCache[t]=null,this.$rowLengthCache[e]=null},this.$updateWrapData=function(t,e){var n,i,r=this.doc.getAllLines(),o=this.getTabSize(),s=this.$wrapData,a=this.$wrapLimit,l=t;for(e=Math.min(e,r.length-1);e>=l;)i=this.getFoldLine(l,i),i?(n=[],i.walk(function(t,e,i,o){var s;if(null!=t){s=this.$getDisplayTokens(t,n.length),s[0]=h;for(var a=1;a<s.length;a++)s[a]=f}else s=this.$getDisplayTokens(r[e].substring(o,i),n.length);n=n.concat(s)}.bind(this),i.end.row,r[i.end.row].length+1),s[i.start.row]=this.$computeWrapSplits(n,a,o),l=i.end.row+1):(n=this.$getDisplayTokens(r[l]),s[l]=this.$computeWrapSplits(n,a,o),l++)};var n=1,a=2,h=3,f=4,p=9,g=10,m=11,v=12;this.$computeWrapSplits=function(t,e){function n(e){var n=t.slice(o,e),r=n.length;n.join("").replace(/12/g,function(){r-=1}).replace(/2/g,function(){r-=1}),s+=r,i.push(s),o=e}if(0==t.length)return[];for(var i=[],r=t.length,o=0,s=0,a=this.$wrapAsCode;r-o>e;){var l=o+e;if(t[l-1]>=g&&t[l]>=g)n(l);else if(t[l]!=h&&t[l]!=f){for(var c=Math.max(l-(a?10:e-(e>>2)),o-1);l>c&&t[l]<h;)l--;if(a){for(;l>c&&t[l]<h;)l--;for(;l>c&&t[l]==p;)l--}else for(;l>c&&t[l]<g;)l--;l>c?n(++l):(l=o+e,n(l))}else{for(l;l!=o-1&&t[l]!=h;l--);if(l>o){n(l);continue}for(l=o+e;l<t.length&&t[l]==f;l++);if(l==t.length)break;n(l)}}return i},this.$getDisplayTokens=function(t,i){var r,o=[];i=i||0;for(var s=0;s<t.length;s++){var l=t.charCodeAt(s);if(9==l){r=this.getScreenTabSize(o.length+i),o.push(m);for(var c=1;r>c;c++)o.push(v)}else 32==l?o.push(g):l>39&&48>l||l>57&&64>l?o.push(p):l>=4352&&e(l)?o.push(n,a):o.push(n)}return o},this.$getStringScreenWidth=function(t,n,i){if(0==n)return[0,0];null==n&&(n=1/0),i=i||0;var r,o;for(o=0;o<t.length&&(r=t.charCodeAt(o),i+=9==r?this.getScreenTabSize(i):r>=4352&&e(r)?2:1,!(i>n));o++);return[i,o]},this.lineWidgets=null,this.getRowLength=function(t){if(this.lineWidgets)var e=this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0;else e=0;return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1+e:1+e},this.getRowLineCount=function(t){return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1:1},this.getScreenLastRowColumn=function(t){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE);return this.documentToScreenColumn(e.row,e.column)},this.getDocumentLastRowColumn=function(t,e){var n=this.documentToScreenRow(t,e);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(t,e){var n=this.documentToScreenRow(t,e);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(t){return this.$useWrapMode?this.$wrapData[t]:void 0},this.getScreenTabSize=function(t){return this.$tabSize-t%this.$tabSize},this.screenToDocumentRow=function(t,e){return this.screenToDocumentPosition(t,e).row},this.screenToDocumentColumn=function(t,e){return this.screenToDocumentPosition(t,e).column},this.screenToDocumentPosition=function(t,e){if(0>t)return{row:0,column:0};var n,i,r=0,o=0,s=0,a=0,l=this.$screenRowCache,c=this.$getRowCacheIndex(l,t),h=l.length;if(h&&c>=0)var s=l[c],r=this.$docRowCache[c],u=t>l[h-1];else var u=!h;for(var d=this.getLength()-1,f=this.getNextFoldLine(r),p=f?f.start.row:1/0;t>=s&&(a=this.getRowLength(r),!(s+a>t||r>=d));)s+=a,r++,r>p&&(r=f.end.row+1,f=this.getNextFoldLine(r,f),p=f?f.start.row:1/0),u&&(this.$docRowCache.push(r),this.$screenRowCache.push(s));if(f&&f.start.row<=r)n=this.getFoldDisplayLine(f),r=f.start.row;else{if(t>=s+a||r>d)return{row:d,column:this.getLine(d).length};n=this.getLine(r),f=null}if(this.$useWrapMode){var g=this.$wrapData[r];if(g){var m=Math.floor(t-s);i=g[m],m>0&&g.length&&(o=g[m-1]||g[g.length-1],n=n.substring(o))}}return o+=this.$getStringScreenWidth(n,e)[1],this.$useWrapMode&&o>=i&&(o=i-1),f?f.idxToPosition(o):{row:r,column:o}},this.documentToScreenPosition=function(t,e){if("undefined"==typeof e)var n=this.$clipPositionToDocument(t.row,t.column);else n=this.$clipPositionToDocument(t,e);t=n.row,e=n.column;var i=0,r=null,o=null;o=this.getFoldAt(t,e,1),o&&(t=o.start.row,e=o.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,t),h=l.length;if(h&&c>=0)var a=l[c],i=this.$screenRowCache[c],u=t>l[h-1];else var u=!h;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;t>a;){if(a>=f){if(s=d.end.row+1,s>t)break;d=this.getNextFoldLine(s,d),f=d?d.start.row:1/0}else s=a+1;i+=this.getRowLength(a),a=s,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var p="";if(d&&a>=f?(p=this.getFoldDisplayLine(d,t,e),r=d.start.row):(p=this.getLine(t).substring(0,e),r=t),this.$useWrapMode){for(var g=this.$wrapData[r],m=0;p.length>=g[m];)i++,m++;p=p.substring(g[m-1]||0,p.length)}return{row:i,column:this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(t,e){return this.documentToScreenPosition(t,e).column},this.documentToScreenRow=function(t,e){return this.documentToScreenPosition(t,e).row},this.getScreenLength=function(){var t=0,e=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=0,e=this.$foldData[r++],o=e?e.start.row:1/0;n>i;)t+=this.$wrapData[i].length+1,i++,i>o&&(i=e.end.row+1,e=this.$foldData[r++],o=e?e.start.row:1/0);else{t=this.getLength();for(var s=this.$foldData,r=0;r<s.length;r++)e=s[r],t-=e.end.row-e.start.row}return this.lineWidgets&&(t+=this.$getWidgetScreenLength()),t}}).call(f.prototype),t("./edit_session/folding").Folding.call(f.prototype),t("./edit_session/bracket_match").BracketMatch.call(f.prototype),o.defineOptions(f.prototype,"session",{wrap:{set:function(t){if(t&&"off"!=t?"free"==t?t=!0:"printMargin"==t?t=-1:"string"==typeof t&&(t=parseInt(t,10)||!1):t=!1,this.$wrap!=t){if(t){var e="number"==typeof t?t:null;this.setWrapLimitRange(e,e),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1);this.$wrap=t}},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(t){t="auto"==t?"text"!=this.$mode.type:"text"!=t,t!=this.$wrapAsCode&&(this.$wrapAsCode=t,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},firstLineNumber:{set:function(){this._emit("changeBreakpoint")},initialValue:1},useWorker:{set:function(t){this.$useWorker=t,this.$stopWorker(),t&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(t){isNaN(t)||this.$tabSize===t||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=t,this._emit("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(t){this._emit("changeOverwrite")},initialValue:!1},newLineMode:{set:function(t){this.doc.setNewLineMode(t)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(t){this.setMode(t)},get:function(){return this.$modeId}}}),e.EditSession=f}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,e,n){var i=t("./lib/oop"),r=t("./lib/lang"),o=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,a=function(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var e=this;this.lead.on("change",function(t){e._emit("changeCursor"),e.$isEmpty||e._emit("changeSelection"),e.$keepDesiredColumnOnChange||t.old.column==t.value.column||(e.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){e.$isEmpty||e._emit("changeSelection")})};(function(){i.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(t,e){this.anchor.setPosition(t,e),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(t){if(this.$isEmpty)return void this.moveCursorTo(this.lead.row,this.lead.column+t);var e=this.getSelectionAnchor(),n=this.getSelectionLead(),i=this.isBackwards();i&&0===e.column||this.setSelectionAnchor(e.row,e.column+t),(i||0!==n.column)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+t)})},this.isBackwards=function(){var t=this.anchor,e=this.lead;return t.row>e.row||t.row==e.row&&t.column>e.column},this.getRange=function(){var t=this.anchor,e=this.lead;return this.isEmpty()?s.fromPoints(e,e):this.isBackwards()?s.fromPoints(e,t):s.fromPoints(t,e)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var t=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(t,this.doc.getLine(t).length)},this.setRange=this.setSelectionRange=function(t,e){e?(this.setSelectionAnchor(t.end.row,t.end.column),this.selectTo(t.start.row,t.start.column)):(this.setSelectionAnchor(t.start.row,t.start.column),this.selectTo(t.end.row,t.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},this.selectTo=function(t,e){this.$moveSelection(function(){this.moveCursorTo(t,e)})},this.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,e){if("undefined"==typeof e){var n=t||this.lead;t=n.row,e=n.column}return this.session.getWordRange(t,e)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},this.getLineRange=function(t,e){var n,i="number"==typeof t?t:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,e===!0?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(0==e.column)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column-n,e.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),e=this.lead;this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column,e.column+n).split(" ").length-1==n?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var t=this.lead.row,e=this.lead.column,n=this.session.documentToScreenRow(t,e),i=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(t,null,i.row,i.column),o=r.match(/^\s*/);o[0].length==e||this.session.$useEmacsStyleLineStart||(i.column+=o[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var t=this.lead,e=this.session.getDocumentLastRowColumnPosition(t.row,t.column);if(this.lead.column==e.column){var n=this.session.getLine(e.row);if(e.column==n.length){var i=n.search(/\s+$/);i>0&&(e.column=i)}}this.moveCursorTo(e.row,e.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t,e=this.lead.row,n=this.lead.column,i=this.doc.getLine(e),r=i.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,n,1);return o?void this.moveCursorTo(o.end.row,o.end.column):((t=this.session.nonTokenRe.exec(r))&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=i.substring(n)),n>=i.length?(this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight())):((t=this.session.tokenRe.exec(r))&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(e,n)))},this.moveCursorLongWordLeft=function(){var t,e=this.lead.row,n=this.lead.column;if(t=this.session.getFoldAt(e,n,-1))return void this.moveCursorTo(t.start.row,t.start.column);var i=this.session.getFoldStringAt(e,n,-1);null==i&&(i=this.doc.getLine(e).substring(0,n));var o,s=r.stringReverse(i);return this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,(o=this.session.nonTokenRe.exec(s))&&(n-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),0>=n?(this.moveCursorTo(e,0),this.moveCursorLeft(),void(e>0&&this.moveCursorWordLeft())):((o=this.session.tokenRe.exec(s))&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(e,n))},this.$shortWordEndIndex=function(t){var e,n,i=0,r=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,e=this.session.tokenRe.exec(t))i=this.session.tokenRe.lastIndex;else{for(;(n=t[i])&&r.test(n);)i++;if(1>i)for(o.lastIndex=0;(n=t[i])&&!o.test(n);)if(o.lastIndex=0,i++,r.test(n)){if(i>2){i--;break}for(;(n=t[i])&&r.test(n);)i++;if(i>2)break}}return o.lastIndex=0,i},this.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e),r=this.session.getFoldAt(t,e,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(e==n.length){var o=this.doc.getLength();do t++,i=this.doc.getLine(t);while(o>t&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),e=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(t,e+s)},this.moveCursorShortWordLeft=function(){var t,e=this.lead.row,n=this.lead.column;if(t=this.session.getFoldAt(e,n,-1))return this.moveCursorTo(t.start.row,t.start.column);var i=this.session.getLine(e).substring(0,n);if(0==n){do e--,i=this.doc.getLine(e);while(e>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(e,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,e){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===e&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var i=this.session.screenToDocumentPosition(n.row+t,n.column);0!==t&&0===e&&i.row===this.lead.row&&i.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[i.row]&&i.row++,this.moveCursorTo(i.row,i.column+e,0===e)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,e,n){var i=this.session.getFoldAt(t,e,1);i&&(t=i.start.row,e=i.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,e,n){var i=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(t){var e=t.clone();return e.isBackwards=t.cursor==t.start,e});else{var t=this.getRange();t.isBackwards=this.isBackwards()}return t},this.fromJSON=function(t){if(void 0==t.start){if(this.rangeList){this.toSingleRange(t[0]);for(var e=t.length;e--;){var n=s.fromPoints(t[e].start,t[e].end);t.isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0}}).call(a.prototype),e.Selection=a}),define("ace/range",["require","exports","module"],function(t,e,n){var i=function(t,e){return t.row-e.row||t.column-e.column},r=function(t,e,n,i){this.start={row:t,column:e},this.end={row:n,column:i}};(function(){this.isEqual=function(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(t,e){return 0==this.compare(t,e)},this.compareRange=function(t){var e,n=t.end,i=t.start;return e=this.compare(n.row,n.column),1==e?(e=this.compare(i.row,i.column),1==e?2:0==e?1:0):-1==e?-2:(e=this.compare(i.row,i.column),-1==e?-1:1==e?42:0)},this.comparePoint=function(t){return this.compare(t.row,t.column)},this.containsRange=function(t){return 0==this.comparePoint(t.start)&&0==this.comparePoint(t.end)},this.intersects=function(t){var e=this.compareRange(t);return-1==e||0==e||1==e},this.isEnd=function(t,e){return this.end.row==t&&this.end.column==e},this.isStart=function(t,e){return this.start.row==t&&this.start.column==e},this.setStart=function(t,e){"object"==typeof t?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=e)},this.setEnd=function(t,e){"object"==typeof t?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=e)},this.inside=function(t,e){return 0==this.compare(t,e)?this.isEnd(t,e)||this.isStart(t,e)?!1:!0:!1},this.insideStart=function(t,e){return 0==this.compare(t,e)?this.isEnd(t,e)?!1:!0:!1},this.insideEnd=function(t,e){return 0==this.compare(t,e)?this.isStart(t,e)?!1:!0:!1},this.compare=function(t,e){return this.isMultiLine()||t!==this.start.row?t<this.start.row?-1:t>this.end.row?1:this.start.row===t?e>=this.start.column?0:-1:this.end.row===t?e<=this.end.column?0:1:0:e<this.start.column?-1:e>this.end.column?1:0},this.compareStart=function(t,e){return this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.compareEnd=function(t,e){return this.end.row==t&&this.end.column==e?1:this.compare(t,e)},this.compareInside=function(t,e){return this.end.row==t&&this.end.column==e?1:this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.clipRows=function(t,e){if(this.end.row>e)var n={row:e+1,column:0};else if(this.end.row<t)var n={row:t,column:0};if(this.start.row>e)var i={row:e+1,column:0};else if(this.start.row<t)var i={row:t,column:0};return r.fromPoints(i||this.start,n||this.end)},this.extend=function(t,e){var n=this.compare(t,e);if(0==n)return this;if(-1==n)var i={row:t,column:e};else var o={row:t,column:e};return r.fromPoints(i||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return r.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},this.toScreenRange=function(t){var e=t.documentToScreenPosition(this.start),n=t.documentToScreenPosition(this.end);return new r(e.row,e.column,n.row,n.column)},this.moveBy=function(t,e){this.start.row+=t,this.start.column+=e,this.end.row+=t,this.end.column+=e}}).call(r.prototype),r.fromPoints=function(t,e){return new r(t.row,t.column,e.row,e.column)},r.comparePoints=i,r.comparePoints=function(t,e){return t.row-e.row||t.column-e.column},e.Range=r}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(t,e,n){var i=t("../tokenizer").Tokenizer,r=t("./text_highlight_rules").TextHighlightRules,o=t("./behaviour").Behaviour,s=t("../unicode"),a=t("../lib/lang"),l=t("../token_iterator").TokenIterator,c=t("../range").Range,h=function(){this.HighlightRules=r,this.$behaviour=new o};(function(){this.tokenRe=new RegExp("^["+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]|s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=new this.HighlightRules,this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(t,e,n,i){function r(t){for(var e=n;i>=e;e++)t(o.getLine(e),e)}var o=e.doc,s=!0,l=!0,c=1/0,h=e.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var d=this.lineCommentStart.map(a.escapeRegExp).join("|"),f=this.lineCommentStart[0];else var d=a.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;
d=new RegExp("^(\\s*)(?:"+d+") ?"),u=e.getUseSoftTabs();var p=function(t,e){var n=t.match(d);if(n){var i=n[1].length,r=n[0].length;y(t,i,r)||" "!=n[0][r-1]||r--,o.removeInLine(e,i,r)}},g=f+" ",m=function(t,e){(!s||/\S/.test(t))&&(y(t,c,c)?o.insertInLine({row:e,column:c},g):o.insertInLine({row:e,column:c},f))},v=function(t,e){return d.test(t)},y=function(t,e,n){for(var i=0;e--&&" "==t.charAt(e);)i++;if(i%h!=0)return!1;for(var i=0;" "==t.charAt(n++);)i++;return h>2?i%h!=h-1:i%h==0}}else{if(!this.blockComment)return!1;var f=this.blockComment.start,w=this.blockComment.end,d=new RegExp("^(\\s*)(?:"+a.escapeRegExp(f)+")"),b=new RegExp("(?:"+a.escapeRegExp(w)+")\\s*$"),m=function(t,e){v(t,e)||(!s||/\S/.test(t))&&(o.insertInLine({row:e,column:t.length},w),o.insertInLine({row:e,column:c},f))},p=function(t,e){var n;(n=t.match(b))&&o.removeInLine(e,t.length-n[0].length,t.length),(n=t.match(d))&&o.removeInLine(e,n[1].length,n[0].length)},v=function(t,n){if(d.test(t))return!0;for(var i=e.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}var x=1/0;r(function(t,e){var n=t.search(/\S/);-1!==n?(c>n&&(c=n),l&&!v(t,e)&&(l=!1)):x>t.length&&(x=t.length)}),c==1/0&&(c=x,s=!1,l=!1),u&&c%h!=0&&(c=Math.floor(c/h)*h),r(l?p:m)},this.toggleBlockComment=function(t,e,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=new l(e,i.row,i.column),h=a.getCurrentToken(),u=(e.selection,e.selection.toOrientedRange());if(h&&/comment/.test(h.type)){for(var d,f;h&&/comment/.test(h.type);){var p=h.value.indexOf(r.start);if(-1!=p){var g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+p;d=new c(g,m,g,m+r.start.length);break}h=a.stepBackward()}for(var a=new l(e,i.row,i.column),h=a.getCurrentToken();h&&/comment/.test(h.type);){var p=h.value.indexOf(r.end);if(-1!=p){var g=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+p;f=new c(g,m,g,m+r.end.length);break}h=a.stepForward()}f&&e.remove(f),d&&(e.remove(d),o=d.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,e.insert(n.end,r.end),e.insert(n.start,r.start);u.start.row==o&&(u.start.column+=s),u.end.row==o&&(u.end.column+=s),e.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(t,e,n){return this.$getIndent(e)},this.checkOutdent=function(t,e,n){return!1},this.autoOutdent=function(t,e,n){},this.$getIndent=function(t){return t.match(/^\s*/)[0]},this.createWorker=function(t){return null},this.createModeDelegates=function(t){this.$embeds=[],this.$modes={};for(var e in t)t[e]&&(this.$embeds.push(e),this.$modes[e]=new t[e]);for(var n=["toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],e=0;e<n.length;e++)!function(t){var i=n[e],r=t[i];t[n[e]]=function(){return this.$delegator(i,arguments,r)}}(this)},this.$delegator=function(t,e,n){var i=e[0];"string"!=typeof i&&(i=i[0]);for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var o=i.split(this.$embeds[r]);if(!o[0]&&o[1]){e[0]=o[1];var s=this.$modes[this.$embeds[r]];return s[t].apply(s,e)}}var a=n.apply(this,e);return n?a:void 0},this.transformAction=function(t,e,n,i,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][e]){var a=o[s][e].apply(this,arguments);if(a)return a}}},this.getKeywords=function(t){if(!this.completionKeywords){var e=this.$tokenizer.rules,n=[];for(var i in e)for(var r=e[i],o=0,s=r.length;s>o;o++)if("string"==typeof r[o].token)/keyword|support|storage/.test(r[o].token)&&n.push(r[o].regex);else if("object"==typeof r[o].token)for(var a=0,l=r[o].token.length;l>a;a++)if(/keyword|support|storage/.test(r[o].token[a])){var i=r[o].regex.match(/\(.+?\)/g)[a];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return t?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(t,e,n,i){var r=this.$keywordList||this.$createKeywordList();return r.map(function(t){return{name:t,value:t,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(h.prototype),e.Mode=h}),define("ace/tokenizer",["require","exports","module"],function(t,e,n){var i=1e3,r=function(t){this.states=t,this.regExps={},this.matchMappings={};for(var e in this.states){for(var n=this.states[e],i=[],r=0,o=this.matchMappings[e]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(o.defaultToken=c.defaultToken),c.caseInsensitive&&(s="gi"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var h=c.regex,u=new RegExp("(?:("+h+")|(.))").exec("a").length-2;if(Array.isArray(c.token))if(1==c.token.length||1==u)c.token=c.token[0];else{if(u-1!=c.token.length)throw new Error("number of classes and regexp groups in '"+c.token+"'\n'"+c.regex+"' doesn't match\n"+(u-1)+"!="+c.token.length);c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens}else"function"!=typeof c.token||c.onMatch||(u>1?c.onMatch=this.$applyToken:c.onMatch=c.token);u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,function(t,e){return"\\"+(parseInt(e,10)+r+1)}):(u=1,h=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),o[r]=l,r+=u,i.push(h),c.onMatch||(c.onMatch=null),c.__proto__=null}}a.forEach(function(t){t.splitRegex=this.createSplitterRegexp(t.regex,s)},this),this.regExps[e]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(t){i=0|t},this.$applyToken=function(t){var e=this.splitRegex.exec(t).slice(1),n=this.token.apply(this,e);if("string"==typeof n)return[{type:n,value:t}];for(var i=[],r=0,o=n.length;o>r;r++)e[r]&&(i[i.length]={type:n[r],value:e[r]});return i},this.$arrayTokens=function(t){if(!t)return[];var e=this.splitRegex.exec(t);if(!e)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;o>r;r++)e[r+1]&&(n[n.length]={type:i[r],value:e[r+1]});return n},this.removeCapturingGroups=function(t){var e=t.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(t,e){return e?"(?:":t});return e},this.createSplitterRegexp=function(t,e){if(-1!=t.indexOf("(?=")){var n=0,i=!1,r={};t.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(t,e,o,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):o&&(n++,1!=o.length&&(r.stack=n,r.start=l)),t}),null!=r.end&&/^\)*$/.test(t.substr(r.end))&&(t=t.substring(0,r.start)+t.substr(r.end))}return new RegExp(t,(e||"").replace("g",""))},this.getLineTokens=function(t,e){if(e&&"string"!=typeof e){var n=e.slice(0);e=n[0]}else var n=[];var r=e||"start",o=this.states[r];o||(r="start",o=this.states[r]);var s=this.matchMappings[r],a=this.regExps[r];a.lastIndex=0;for(var l,c=[],h=0,u={type:null,value:""};l=a.exec(t);){var d=s.defaultToken,f=null,p=l[0],g=a.lastIndex;if(g-p.length>h){var m=t.substring(h,g-p.length);u.type==d?u.value+=m:(u.type&&c.push(u),u={type:d,value:m})}for(var v=0;v<l.length-2;v++)if(void 0!==l[v+1]){f=o[s[v]],d=f.onMatch?f.onMatch(p,r,n):f.token,f.next&&(r="string"==typeof f.next?f.next:f.next(r,n),o=this.states[r],o||(window.console&&console.error&&console.error(r,"doesn't exist"),r="start",o=this.states[r]),s=this.matchMappings[r],h=g,a=this.regExps[r],a.lastIndex=g);break}if(p)if("string"==typeof d)f&&f.merge===!1||u.type!==d?(u.type&&c.push(u),u={type:d,value:p}):u.value+=p;else if(d){u.type&&c.push(u),u={type:null,value:""};for(var v=0;v<d.length;v++)c.push(d[v])}if(h==t.length)break;if(h=g,c.length>i){for(;h<t.length;)u.type&&c.push(u),u={value:t.substring(h,h+=2e3),type:"overflow"};r="start",n=[];break}}return u.type&&c.push(u),n.length>1&&n[0]!==r&&n.unshift(r),{tokens:c,state:n.length?n:r}}}).call(r.prototype),e.Tokenizer=r}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(t,e,n){var i=t("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(t,e){if(e)for(var n in t){for(var i=t[n],r=0;r<i.length;r++){var o=i[r];o.next&&("string"!=typeof o.next?o.nextState&&0!==o.nextState.indexOf(e)&&(o.nextState=e+o.nextState):0!==o.next.indexOf(e)&&(o.next=e+o.next))}this.$rules[e+n]=i}else for(var n in t)this.$rules[n]=t[n]},this.getRules=function(){return this.$rules},this.embedRules=function(t,e,n,r,o){var s=(new t).getRules();if(r)for(var a=0;a<r.length;a++)r[a]=e+r[a];else{r=[];for(var l in s)r.push(e+l)}if(this.addRules(s,e),n)for(var c=Array.prototype[o?"push":"unshift"],a=0;a<r.length;a++)c.apply(this.$rules[r[a]],i.deepCopy(n));this.$embeds||(this.$embeds=[]),this.$embeds.push(e)},this.getEmbeds=function(){return this.$embeds};var t=function(t,e){return"start"!=t&&e.unshift(this.nextState,t),this.nextState},e=function(t,e){return e[0]!==t?"start":(e.shift(),e.shift())};this.normalizeRules=function(){function n(o){var s=r[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a];!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var c=l.next||l.push;if(c&&Array.isArray(c)){var h=l.stateName;h||(h=l.token,"string"!=typeof h&&(h=h[0]||""),r[h]&&(h+=i++)),r[h]=c,l.next=h,n(h)}else"pop"==c&&(l.next=e);if(l.push&&(l.nextState=l.next||l.push,l.next=t,delete l.push),l.rules)for(var u in l.rules)r[u]?r[u].push&&r[u].push.apply(r[u],l.rules[u]):r[u]=l.rules[u];if(l.include||"string"==typeof l)var d=l.include||l,f=r[d];else Array.isArray(l)&&(f=l);if(f){var p=[a,1].concat(f);l.noEscape&&(p=p.filter(function(t){return!t.next})),s.splice.apply(s,p),a--,f=null}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}var i=0,r=this.$rules;Object.keys(r).forEach(n,this)},this.createKeywordMapper=function(t,e,n,i){var r=Object.create(null);return Object.keys(t).forEach(function(e){var o=t[e];n&&(o=o.toLowerCase());for(var s=o.split(i||"|"),a=s.length;a--;)r[s[a]]=e}),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),t=null,n?function(t){return r[t.toLowerCase()]||e}:function(t){return r[t]||e}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),e.TextHighlightRules=r}),define("ace/mode/behaviour",["require","exports","module"],function(t,e,n){var i=function(){this.$behaviours={}};(function(){this.add=function(t,e,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[t]:this.$behaviours[t]={}}this.$behaviours[t][e]=n},this.addBehaviours=function(t){for(var e in t)for(var n in t[e])this.add(e,n,t[e][n])},this.remove=function(t){this.$behaviours&&this.$behaviours[t]&&delete this.$behaviours[t]},this.inherit=function(t,e){if("function"==typeof t)var n=(new t).getBehaviours(e);else var n=t.getBehaviours(e);this.addBehaviours(n)},this.getBehaviours=function(t){if(t){for(var e={},n=0;n<t.length;n++)this.$behaviours[t[n]]&&(e[t[n]]=this.$behaviours[t[n]]);return e}return this.$behaviours}}).call(i.prototype),e.Behaviour=i}),define("ace/unicode",["require","exports","module"],function(t,e,n){function i(t){var n=/\w{4}/g;for(var i in t)e.packages[i]=t[i].replace(n,"\\u$&")}e.packages={},i({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",
Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),define("ace/token_iterator",["require","exports","module"],function(t,e,n){var i=function(t,e,n){this.$session=t,this.$row=e,this.$rowTokens=t.getTokens(e);var i=t.getTokenAt(e,n);this.$tokenIndex=i?i.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var t;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,t||(t=this.$session.getLength()),this.$row>=t)return this.$row=t-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var t=this.$rowTokens,e=this.$tokenIndex,n=t[e].start;if(void 0!==n)return n;for(n=0;e>0;)e-=1,n+=t[e].value.length;return n}}).call(i.prototype),e.TokenIterator=i}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,e,n){var i=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,s=t("./anchor").Anchor,a=function(t){this.$lines=[],0==t.length?this.$lines=[""]:Array.isArray(t)?this._insertLines(0,t):this.insert({row:0,column:0},t)};(function(){i.implement(this,r),this.setValue=function(t){var e=this.getLength();this.remove(new o(0,0,e,this.getLine(e-1).length)),this.insert({row:0,column:0},t)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(t,e){return new s(this,t,e)},0=="aaa".split(/a/).length?this.$split=function(t){return t.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(t){return t.split(/\r\n|\r|\n/)},this.$detectNewLine=function(t){var e=t.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t)},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(t){return"\r\n"==t||"\r"==t||"\n"==t},this.getLine=function(t){return this.$lines[t]||""},this.getLines=function(t,e){return this.$lines.slice(t,e+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(t){if(t.start.row==t.end.row)return this.getLine(t.start.row).substring(t.start.column,t.end.column);var e=this.getLines(t.start.row,t.end.row);e[0]=(e[0]||"").substring(t.start.column);var n=e.length-1;return t.end.row-t.start.row==n&&(e[n]=e[n].substring(0,t.end.column)),e.join(this.getNewLineCharacter())},this.$clipPosition=function(t){var e=this.getLength();return t.row>=e?(t.row=Math.max(0,e-1),t.column=this.getLine(e-1).length):t.row<0&&(t.row=0),t},this.insert=function(t,e){if(!e||0===e.length)return t;t=this.$clipPosition(t),this.getLength()<=1&&this.$detectNewLine(e);var n=this.$split(e),i=n.splice(0,1)[0],r=0==n.length?null:n.splice(n.length-1,1)[0];return t=this.insertInLine(t,i),null!==r&&(t=this.insertNewLine(t),t=this._insertLines(t.row,n),t=this.insertInLine(t,r||"")),t},this.insertLines=function(t,e){return t>=this.getLength()?this.insert({row:t,column:0},"\n"+e.join("\n")):this._insertLines(Math.max(t,0),e)},this._insertLines=function(t,e){if(0==e.length)return{row:t,column:0};if(e.length>65535){var n=this._insertLines(t,e.slice(65535));e=e.slice(0,65535)}var i=[t,0];i.push.apply(i,e),this.$lines.splice.apply(this.$lines,i);var r=new o(t,0,t+e.length,0),s={action:"insertLines",range:r,lines:e};return this._emit("change",{data:s}),n||r.end},this.insertNewLine=function(t){t=this.$clipPosition(t);var e=this.$lines[t.row]||"";this.$lines[t.row]=e.substring(0,t.column),this.$lines.splice(t.row+1,0,e.substring(t.column,e.length));var n={row:t.row+1,column:0},i={action:"insertText",range:o.fromPoints(t,n),text:this.getNewLineCharacter()};return this._emit("change",{data:i}),n},this.insertInLine=function(t,e){if(0==e.length)return t;var n=this.$lines[t.row]||"";this.$lines[t.row]=n.substring(0,t.column)+e+n.substring(t.column);var i={row:t.row,column:t.column+e.length},r={action:"insertText",range:o.fromPoints(t,i),text:e};return this._emit("change",{data:r}),i},this.remove=function(t){if(!t instanceof o&&(t=o.fromPoints(t.start,t.end)),t.start=this.$clipPosition(t.start),t.end=this.$clipPosition(t.end),t.isEmpty())return t.start;var e=t.start.row,n=t.end.row;if(t.isMultiLine()){var i=0==t.start.column?e:e+1,r=n-1;t.end.column>0&&this.removeInLine(n,0,t.end.column),r>=i&&this._removeLines(i,r),i!=e&&(this.removeInLine(e,t.start.column,this.getLine(e).length),this.removeNewLine(t.start.row))}else this.removeInLine(e,t.start.column,t.end.column);return t.start},this.removeInLine=function(t,e,n){if(e!=n){var i=new o(t,e,t,n),r=this.getLine(t),s=r.substring(e,n),a=r.substring(0,e)+r.substring(n,r.length);this.$lines.splice(t,1,a);var l={action:"removeText",range:i,text:s};return this._emit("change",{data:l}),i.start}},this.removeLines=function(t,e){return 0>t||e>=this.getLength()?this.remove(new o(t,0,e+1,0)):this._removeLines(t,e)},this._removeLines=function(t,e){var n=new o(t,0,e+1,0),i=this.$lines.splice(t,e-t+1),r={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:i};return this._emit("change",{data:r}),i},this.removeNewLine=function(t){var e=this.getLine(t),n=this.getLine(t+1),i=new o(t,e.length,t+1,0),r=e+n;this.$lines.splice(t,2,r);var s={action:"removeText",range:i,text:this.getNewLineCharacter()};this._emit("change",{data:s})},this.replace=function(t,e){if(!t instanceof o&&(t=o.fromPoints(t.start,t.end)),0==e.length&&t.isEmpty())return t.start;if(e==this.getTextRange(t))return t.end;if(this.remove(t),e)var n=this.insert(t.start,e);else n=t.start;return n},this.applyDeltas=function(t){for(var e=0;e<t.length;e++){var n=t[e],i=o.fromPoints(n.range.start,n.range.end);"insertLines"==n.action?this.insertLines(i.start.row,n.lines):"insertText"==n.action?this.insert(i.start,n.text):"removeLines"==n.action?this._removeLines(i.start.row,i.end.row-1):"removeText"==n.action&&this.remove(i)}},this.revertDeltas=function(t){for(var e=t.length-1;e>=0;e--){var n=t[e],i=o.fromPoints(n.range.start,n.range.end);"insertLines"==n.action?this._removeLines(i.start.row,i.end.row-1):"insertText"==n.action?this.remove(i):"removeLines"==n.action?this._insertLines(i.start.row,n.lines):"removeText"==n.action&&this.insert(i.start,n.text)}},this.indexToPosition=function(t,e){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=e||0,o=n.length;o>r;r++)if(t-=n[r].length+i,0>t)return{row:r,column:t+n[r].length+i};return{row:o-1,column:n[o-1].length}},this.positionToIndex=function(t,e){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(t.row,n.length),s=e||0;o>s;++s)r+=n[s].length+i;return r+t.column}}).call(a.prototype),e.Document=a}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,e,n){var i=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,o=e.Anchor=function(t,e,n){this.$onChange=this.onChange.bind(this),this.attach(t),"undefined"==typeof n?this.setPosition(e.row,e.column):this.setPosition(e,n)};(function(){i.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){var e=t.data,n=e.range;if((n.start.row!=n.end.row||n.start.row==this.row)&&!(n.start.row>this.row||n.start.row==this.row&&n.start.column>this.column)){var i=this.row,r=this.column,o=n.start,s=n.end;"insertText"===e.action?o.row===i&&o.column<=r?o.column===r&&this.$insertRight||(o.row===s.row?r+=s.column-o.column:(r-=o.column,i+=s.row-o.row)):o.row!==s.row&&o.row<i&&(i+=s.row-o.row):"insertLines"===e.action?o.row<=i&&(i+=s.row-o.row):"removeText"===e.action?o.row===i&&o.column<r?r=s.column>=r?o.column:Math.max(0,r-(s.column-o.column)):o.row!==s.row&&o.row<i?(s.row===i&&(r=Math.max(0,r-s.column)+o.column),i-=s.row-o.row):s.row===i&&(i-=s.row-o.row,r=Math.max(0,r-s.column)+o.column):"removeLines"==e.action&&o.row<=i&&(s.row<=i?i-=s.row-o.row:(i=o.row,r=0)),this.setPosition(i,r,!0)}},this.setPosition=function(t,e,n){var i;if(i=n?{row:t,column:e}:this.$clipPositionToDocument(t,e),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._emit("change",{old:r,value:i})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(t,e){var n={};return t>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):0>t?(n.row=0,n.column=0):(n.row=t,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,e))),0>e&&(n.column=0),n}}).call(o.prototype)}),define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,e,n){var i=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,o=function(t,e){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=t;var n=this;this.$worker=function(){if(n.running){for(var t=new Date,e=n.currentLine,i=-1,r=n.doc;n.lines[e];)e++;var o=e,s=r.getLength(),a=0;for(n.running=!1;s>e;){n.$tokenizeRow(e),i=e;do e++;while(n.lines[e]);if(a++,a%5==0&&new Date-t>20)return n.running=setTimeout(n.$worker,20),void(n.currentLine=e)}n.currentLine=e,i>=o&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(t){this.tokenizer=t,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(t){this.doc=t,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(t,e){var n={first:t,last:e};this._emit("update",{data:n})},this.start=function(t){this.currentLine=Math.min(t||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(t){var e=t.range,n=e.start.row,i=e.end.row-n;if(0===i)this.lines[n]=null;else if("removeText"==t.action||"removeLines"==t.action)this.lines.splice(n,i+1,null),this.states.splice(n,i+1,null);else{var r=Array(i+1);r.unshift(n,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(t){return this.lines[t]||this.$tokenizeRow(t)},this.getState=function(t){return this.currentLine==t&&this.$tokenizeRow(t),this.states[t]||"start"},this.$tokenizeRow=function(t){var e=this.doc.getLine(t),n=this.states[t-1],i=this.tokenizer.getLineTokens(e,n,t);return this.states[t]+""!=i.state+""?(this.states[t]=i.state,this.lines[t+1]=null,this.currentLine>t+1&&(this.currentLine=t+1)):this.currentLine==t&&(this.currentLine=t+1),this.lines[t]=i.tokens}}).call(o.prototype),e.BackgroundTokenizer=o}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,e,n){var i=t("./lib/lang"),r=(t("./lib/oop"),t("./range").Range),o=function(t,e,n){this.setRegexp(t),this.clazz=e,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(t){this.regExp+""!=t+""&&(this.regExp=t,this.cache=[])},this.update=function(t,e,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l=s;a>=l;l++){var c=this.cache[l];null==c&&(c=i.getMatchOffsets(n.getLine(l),this.regExp),c.length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(t){return new r(l,t.offset,l,t.offset+t.length)}),this.cache[l]=c.length?c:"");for(var h=c.length;h--;)e.drawSingleLineMarker(t,c[h].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),e.SearchHighlight=o}),define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(t,e,n){function i(){this.getFoldAt=function(t,e,n){var i=this.getFoldLine(t);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var s=r[o];if(s.range.contains(t,e)){if(1==n&&s.range.isEnd(t,e))continue;if(-1==n&&s.range.isStart(t,e))continue;return s}}},this.getFoldsInRange=function(t){var e=t.start,n=t.end,i=this.$foldData,r=[];e.column+=1,n.column-=1;for(var o=0;o<i.length;o++){var s=i[o].range.compareRange(t);if(2!=s){if(-2==s)break;for(var a=i[o].folds,l=0;l<a.length;l++){var c=a[l];if(s=c.range.compareRange(t),-2==s)break;if(2!=s){if(42==s)break;r.push(c)}}}}return e.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(t){if(Array.isArray(t)){var e=[];t.forEach(function(t){e=e.concat(this.getFoldsInRange(t))},this)}else var e=this.getFoldsInRange(t);return e},this.getAllFolds=function(){for(var t=[],e=this.$foldData,n=0;n<e.length;n++)for(var i=0;i<e[n].folds.length;i++)t.push(e[n].folds[i]);return t},this.getFoldStringAt=function(t,e,n,i){if(i=i||this.getFoldLine(t),!i)return null;for(var r,o,s={end:{column:0}},a=0;a<i.folds.length;a++){o=i.folds[a];var l=o.range.compareEnd(t,e);if(-1==l){r=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===l)return null;s=o}return r||(r=this.getLine(o.start.row).substring(s.end.column)),-1==n?r.substring(0,e-s.end.column):1==n?r.substring(e-s.end.column):r},this.getFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.start.row<=t&&r.end.row>=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0),i;i<n.length;i++){var r=n[i];if(r.end.row>=t)return r}return null},this.getFoldedRowCount=function(t,e){for(var n=this.$foldData,i=e-t+1,r=0;r<n.length;r++){var o=n[r],s=o.end.row,a=o.start.row;if(s>=e){e>a&&(a>=t?i-=e-a:i=0);break}s>=t&&(i-=a>=t?s-a:s-t+1)}return i},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(t,e){return t.start.row-e.start.row}),t},this.addFold=function(t,e){var n,i=this.$foldData,r=!1;t instanceof s?n=t:(n=new s(e,t),n.collapseChildren=e.collapseChildren),this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,h=n.end.column;if(!(c>a||a==c&&h-2>=l))throw new Error("The range has to be at least 2 characters width");var u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(n);if(u&&!u.range.isStart(a,l)||d&&!d.range.isEnd(c,h))throw new Error("A fold can't intersect already existing fold"+n.range+u.range);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),f.forEach(function(t){n.addSubFold(t)}));for(var p=0;p<i.length;p++){var g=i[p];if(c==g.start.row){g.addFold(n),r=!0;break}if(a==g.end.row){if(g.addFold(n),r=!0,!n.sameRow){var m=i[p+1];if(m&&m.start.row==c){g.merge(m);break}}break}if(c<=g.start.row)break}return r||(g=this.$addFoldLine(new o(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(g.start.row,g.start.row):this.$updateRowLengthCache(g.start.row,g.start.row),this.$modified=!0,this._emit("changeFold",{data:n,action:"add"}),n},this.addFolds=function(t){t.forEach(function(t){this.addFold(t)},this)},this.removeFold=function(t){var e=t.foldLine,n=e.start.row,i=e.end.row,r=this.$foldData,o=e.folds;if(1==o.length)r.splice(r.indexOf(e),1);else if(e.range.isEnd(t.end.row,t.end.column))o.pop(),e.end.row=o[o.length-1].end.row,e.end.column=o[o.length-1].end.column;else if(e.range.isStart(t.start.row,t.start.column))o.shift(),e.start.row=o[0].start.row,e.start.column=o[0].start.column;else if(t.sameRow)o.splice(o.indexOf(t),1);else{var s=e.split(t.start.row,t.start.column);o=s.folds,o.shift(),s.start.row=o[0].start.row,s.start.column=o[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._emit("changeFold",{data:t,action:"remove"})},this.removeFolds=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);e.forEach(function(t){this.removeFold(t)},this),this.$modified=!0},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach(function(e){t.restoreRange(e),this.addFold(e)},this),t.collapseChildren>0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(t){this.expandFold(t)},this)},this.unfold=function(t,e){var n,i;if(null==t?(n=new r(0,0,this.getLength(),0),e=!0):n="number"==typeof t?new r(t,0,t,this.getLine(t).length):"row"in t?r.fromPoints(t,t):t,i=this.getFoldsInRangeList(n),e)this.removeFolds(i);else for(var o=i;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);return i.length?i:void 0},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var n=this.getFoldLine(t,e);return n?n.end.row:t},this.getRowFoldStart=function(t,e){var n=this.getFoldLine(t,e);return n?n.start.row:t},this.getFoldDisplayLine=function(t,e,n,i,r){null==i&&(i=t.start.row,r=0),null==e&&(e=t.end.row,n=this.getLine(e).length);var o=this.doc,s="";return t.walk(function(t,e,n,a){if(!(i>e)){if(e==i){if(r>n)return;a=Math.max(r,a)}s+=null!=t?t:o.getLine(e).substring(a,n)}},e,n),s},this.getDisplayLine=function(t,e,n,i){var r=this.getFoldLine(t);if(r)return this.getFoldDisplayLine(r,t,e,n,i);var o;return o=this.doc.getLine(t),o.substring(i||0,e||o.length)},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map(function(e){var n=e.folds.map(function(t){return t.clone()});return new o(t,n)})},this.toggleFold=function(t){var e,n,i=this.selection,r=i.getRange();if(r.isEmpty()){var o=r.start;if(e=this.getFoldAt(o.row,o.column))return void this.expandFold(e);(n=this.findMatchingBracket(o))?1==r.comparePoint(n)?r.end=n:(r.start=n,r.start.column++,r.end.column--):(n=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==r.comparePoint(n)?r.end=n:r.start=n,r.start.column++):r=this.getCommentFoldRange(o.row,o.column)||r}else{var s=this.getFoldsInRange(r);if(t&&s.length)return void this.expandFolds(s);1==s.length&&(e=s[0])}if(e||(e=this.getFoldAt(r.start.row,r.start.column)),e&&e.range.toString()==r.toString())return void this.expandFold(e);var a="...";if(!r.isMultiLine()){if(a=this.getTextRange(r),a.length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,r)},this.getCommentFoldRange=function(t,e,n){var i=new a(this,t,e),o=i.getCurrentToken();if(o&&/^comment|string/.test(o.type)){var s=new r,l=new RegExp(o.type.replace(/\..*/,"\\."));if(1!=n){do o=i.stepBackward();while(o&&l.test(o.type));i.stepForward()}if(s.start.row=i.getCurrentTokenRow(),s.start.column=i.getCurrentTokenColumn()+2,i=new a(this,t,e),-1!=n){do o=i.stepForward();while(o&&l.test(o.type));o=i.stepBackward()}else o=i.getCurrentToken();return s.end.row=i.getCurrentTokenRow(),s.end.column=i.getCurrentTokenColumn()+o.value.length-2,s}},this.foldAll=function(t,e,n){void 0==n&&(n=1e5);var i=this.foldWidgets;if(i){e=e||this.getLength(),t=t||0;for(var r=t;e>r;r++)if(null==i[r]&&(i[r]=this.getFoldWidget(r)),"start"==i[r]){var o=this.getFoldWidgetRange(r);if(o&&o.isMultiLine()&&o.end.row<=e&&o.start.row>=t){r=o.end.row;try{var s=this.addFold("...",o);s&&(s.collapseChildren=n)}catch(a){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(t){if(!this.$foldStyles[t])throw new Error("invalid fold style: "+t+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=t){this.$foldStyle=t,"manual"==t&&this.unfold();var e=this.$foldMode;this.$setFolding(null),this.$setFolding(e)}},this.$setFolding=function(t){if(this.$foldMode!=t){if(this.$foldMode=t,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!t||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=t.getFoldWidget.bind(t,this,this.$foldStyle),this.getFoldWidgetRange=t.getFoldWidgetRange.bind(t,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(t,e){var n=this.foldWidgets;if(!n||e&&n[t])return{};for(var i,r=t-1;r>=0;){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var s=this.getFoldWidgetRange(r);if(i||(i=s),s&&s.end.row>=t)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(t,e){e=e.domEvent;var n={children:e.shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey},i=this.$toggleFoldWidget(t,n);if(!i){var r=e.target||e.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var n=this.getFoldWidget(t),i=this.getLine(t),r="end"===n?-1:1,o=this.getFoldAt(t,-1===r?0:i.length,r);if(o)return void(e.children||e.all?this.removeFold(o):this.expandFold(o));var s=this.getFoldWidgetRange(t,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1),o&&s.isEqual(o.range)))return void this.removeFold(o);if(e.siblings){var a=this.getParentFoldRangeData(t);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,e.all?1e4:0)}else e.children?(c=s?s.end.row:this.getLength(),this.foldAll(t+1,s.end.row,e.all?1e4:0)):s&&(e.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var n=this.$toggleFoldWidget(e,{});if(!n){var i=this.getParentFoldRangeData(e,!0);if(n=i.range||i.firstRange){e=n.start.row;var r=this.getFoldAt(e,this.getLine(e).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(t){var e=t.data,n=e.range,i=n.start.row,r=n.end.row-i;if(0===r)this.foldWidgets[i]=null;else if("removeText"==e.action||"removeLines"==e.action)this.foldWidgets.splice(i,r+1,null);else{var o=Array(r+1);o.unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}}}var r=t("../range").Range,o=t("./fold_line").FoldLine,s=t("./fold").Fold,a=t("../token_iterator").TokenIterator;e.Folding=i}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,e,n){function i(t,e){this.foldData=t,Array.isArray(e)?this.folds=e:e=this.folds=[e];var n=e[e.length-1];this.range=new r(e[0].start.row,e[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(t){t.setFoldLine(this)},this)}var r=t("../range").Range;(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},this.addFold=function(t){if(t.sameRow){if(t.start.row<this.startRow||t.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(t),this.folds.sort(function(t,e){return-t.range.compareEnd(e.start.row,e.start.column)}),this.range.compareEnd(t.start.row,t.start.column)>0?(this.end.row=t.end.row,this.end.column=t.end.column):this.range.compareStart(t.end.row,t.end.column)<0&&(this.start.row=t.start.row,this.start.column=t.start.column)}else if(t.start.row==this.end.row)this.folds.push(t),this.end.row=t.end.row,this.end.column=t.end.column;else{if(t.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(t),this.start.row=t.start.row,this.start.column=t.start.column}t.foldLine=this},this.containsRow=function(t){return t>=this.start.row&&t<=this.end.row},this.walk=function(t,e,n){var i,r,o,s=0,a=this.folds,l=!0;null==e&&(e=this.end.row,n=this.end.column);for(var c=0;c<a.length;c++){if(i=a[c],r=i.range.compareStart(e,n),-1==r)return void t(null,e,n,s,l);if(o=t(null,i.start.row,i.start.column,s,l),o=!o&&t(i.placeholder,i.start.row,i.start.column,s),o||0==r)return;l=!i.sameRow,s=i.end.column}t(null,e,n,s,l)},this.getNextFoldTo=function(t,e){for(var n,i,r=0;r<this.folds.length;r++){if(n=this.folds[r],i=n.range.compareEnd(t,e),-1==i)return{fold:n,kind:"after"};if(0==i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(t,e,n){var i,r,o=this.getNextFoldTo(t,e);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=e&&i.start.row!=t)window.console&&window.console.log(t,e,i);else if(i.start.row==t){r=this.folds;var s=r.indexOf(i);for(0==s&&(this.start.column+=n),s;s<r.length;s++){if(i=r[s],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(t,e){var n=this.getNextFoldTo(t,e).fold,r=this.folds,o=this.foldData;if(!n)return null;var s=r.indexOf(n),a=r[s-1];this.end.row=a.end.row,this.end.column=a.end.column,r=r.splice(s,r.length-s);var l=new i(o,r);return o.splice(o.indexOf(this)+1,0,l),l},this.merge=function(t){for(var e=t.folds,n=0;n<e.length;n++)this.addFold(e[n]);var i=this.foldData;i.splice(i.indexOf(t),1)},this.toString=function(){var t=[this.range.toString()+": ["];return this.folds.forEach(function(e){t.push("  "+e.toString())}),t.push("]"),t.join("\n")},this.idxToPosition=function(t){for(var e,n=0,i=0;i<this.folds.length;i++){var e=this.folds[i];if(t-=e.start.column-n,0>t)return{row:e.start.row,column:e.start.column+t};if(t-=e.placeholder.length,0>t)return e.start;n=e.end.column}return{row:this.end.row,column:this.end.column+t}}}).call(i.prototype),e.FoldLine=i}),define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(t,e,n){function i(t,e){t.row-=e.row,0==t.row&&(t.column-=e.column)}function r(t,e){i(t.start,e),i(t.end,e)}function o(t,e){0==t.row&&(t.column+=e.column),t.row+=e.row}function s(t,e){o(t.start,e),o(t.end,e)}var a=(t("../range").Range,t("../range_list").RangeList),l=t("../lib/oop"),c=e.Fold=function(t,e){this.foldLine=null,this.placeholder=e,this.range=t,this.start=t.start,this.end=t.end,this.sameRow=t.start.row==t.end.row,this.subFolds=this.ranges=[]};l.inherits(c,a),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(t){this.foldLine=t,this.subFolds.forEach(function(e){e.setFoldLine(t)})},this.clone=function(){var t=this.range.clone(),e=new c(t,this.placeholder);return this.subFolds.forEach(function(t){e.subFolds.push(t.clone())}),e.collapseChildren=this.collapseChildren,e},this.addSubFold=function(t){if(!this.range.isEqual(t)){if(!this.range.containsRange(t))throw new Error("A fold can't intersect already existing fold"+t.range+this.range);r(t,this.start);for(var e=t.start.row,n=t.start.column,i=0,o=-1;i<this.subFolds.length&&(o=this.subFolds[i].range.compare(e,n),1==o);i++);var s=this.subFolds[i];if(0==o)return s.addSubFold(t);for(var e=t.range.end.row,n=t.range.end.column,a=i,o=-1;a<this.subFolds.length&&(o=this.subFolds[a].range.compare(e,n),1==o);a++);this.subFolds[a];if(0==o)throw new Error("A fold can't intersect already existing fold"+t.range+this.range);this.subFolds.splice(i,a-i,t);return t.setFoldLine(this.foldLine),t}},this.restoreRange=function(t){return s(t,this.start)}}.call(c.prototype)}),define("ace/range_list",["require","exports","module","ace/range"],function(t,e,n){var i=t("./range").Range,r=i.comparePoints,o=function(){this.ranges=[]};(function(){this.comparePoints=r,this.pointIndex=function(t,e,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var s=i[o],a=r(t,s.end);if(!(a>0)){var l=r(t,s.start);return 0===a?e&&0!==l?-o-2:o:l>0||0===l&&!e?o:-o-1}}return-o-1},this.add=function(t){var e=!t.isEmpty(),n=this.pointIndex(t.start,e);0>n&&(n=-n-1);var i=this.pointIndex(t.end,e,n);return 0>i?i=-i-1:i++,this.ranges.splice(n,i-n,t)},this.addList=function(t){for(var e=[],n=t.length;n--;)e.push.call(e,this.add(t[n]));return e},this.substractPoint=function(t){var e=this.pointIndex(t);return e>=0?this.ranges.splice(e,1):void 0},this.merge=function(){var t=[],e=this.ranges;e=e.sort(function(t,e){return r(t.start,e.start)});for(var n,i=e[0],o=1;o<e.length;o++){n=i,i=e[o];var s=r(n.end,i.start);0>s||(0!=s||n.isEmpty()||i.isEmpty())&&(r(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),e.splice(o,1),t.push(i),i=n,o--)}return this.ranges=e,t},this.contains=function(t,e){return this.pointIndex({row:t,column:e})>=0},this.containsPoint=function(t){return this.pointIndex(t)>=0},this.rangeAtPoint=function(t){var e=this.pointIndex(t);return e>=0?this.ranges[e]:void 0},this.clipRows=function(t,e){var n=this.ranges;if(n[0].start.row>e||n[n.length-1].start.row<t)return[];var i=this.pointIndex({row:t,column:0});0>i&&(i=-i-1);var r=this.pointIndex({row:e,column:0},i);0>r&&(r=-r-1);for(var o=[],s=i;r>s;s++)o.push(n[s]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(t){this.session&&this.detach(),this.session=t,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(t){var e=t.data.range;if("i"==t.data.action[0])var n=e.start,i=e.end;else var i=e.start,n=e.end;for(var r=n.row,o=i.row,s=o-r,a=-n.column+i.column,l=this.ranges,c=0,h=l.length;h>c;c++){var u=l[c];if(!(u.end.row<r)){if(u.start.row>r)break;if(u.start.row==r&&u.start.column>=n.column&&(u.start.column==n.column&&this.$insertRight||(u.start.column+=a,u.start.row+=s)),u.end.row==r&&u.end.column>=n.column){if(u.end.column==n.column&&this.$insertRight)continue;u.end.column==n.column&&a>0&&h-1>c&&u.end.column>u.start.column&&u.end.column==l[c+1].start.column&&(u.end.column-=a),
u.end.column+=a,u.end.row+=s}}}if(0!=s&&h>c)for(;h>c;c++){var u=l[c];u.start.row+=s,u.end.row+=s}}}).call(o.prototype),e.RangeList=o}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,e,n){function i(){this.findMatchingBracket=function(t,e){if(0==t.column)return null;var n=e||this.getLine(t.row).charAt(t.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t):null},this.getBracketRange=function(t){var e,n=this.getLine(t.row),i=!0,r=n.charAt(t.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=n.charAt(t.column),t={row:t.row,column:t.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){var a=this.$findClosingBracket(s[1],t);if(!a)return null;e=o.fromPoints(t,a),i||(e.end.column++,e.start.column--),e.cursor=e.end}else{var a=this.$findOpeningBracket(s[2],t);if(!a)return null;e=o.fromPoints(a,t),i||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(t,e,n){var i=this.$brackets[t],o=1,s=new r(this,e.row,e.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren")+")+"));for(var l=e.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var h=c.charAt(l);if(h==i){if(o-=1,0==o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==t&&(o+=1);l-=1}do a=s.stepBackward();while(a&&!n.test(a.type));if(null==a)break;c=a.value,l=c.length-1}return null}},this.$findClosingBracket=function(t,e,n){var i=this.$brackets[t],o=1,s=new r(this,e.row,e.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren")+")+"));for(var l=e.column-s.getCurrentTokenColumn();;){for(var c=a.value,h=c.length;h>l;){var u=c.charAt(l);if(u==i){if(o-=1,0==o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==t&&(o+=1);l+=1}do a=s.stepForward();while(a&&!n.test(a.type));if(null==a)break;l=0}return null}}}var r=t("../token_iterator").TokenIterator,o=t("../range").Range;e.BracketMatch=i}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,e,n){var i=t("./lib/lang"),r=t("./lib/oop"),o=t("./range").Range,s=function(){this.$options={}};(function(){this.set=function(t){return r.mixin(this.$options,t),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var e=this.$matchIterator(t,this.$options);if(!e)return!1;var n=null;return e.forEach(function(t,e,i){if(t.start)n=t;else{var r=t.offset+(i||0);n=new o(e,r,e,r+t.length)}return!0}),n},this.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,r=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),s=[],a=e.re;if(e.$isMultiLine)for(var l=a.length,c=r.length-l,h=a.offset||0;c>=h;h++){for(var u=0;l>u&&-1!=r[h+u].search(a[u]);u++);var d=r[h],f=r[h+l-1],p=d.match(a[0])[0].length,g=f.match(a[l-1])[0].length;s.push(new o(h,d.length-p,h+l-1,g))}else for(var m=0;m<r.length;m++)for(var v=i.getMatchOffsets(r[m],a),u=0;u<v.length;u++){var y=v[u];s.push(new o(m,y.offset,m,y.offset+y.length))}if(n){for(var w=n.start.column,b=n.start.column,m=0,u=s.length-1;u>m&&s[m].start.column<w&&s[m].start.row==n.start.row;)m++;for(;u>m&&s[u].end.column>b&&s[u].end.row==n.end.row;)u--;for(s=s.slice(m,u+1),m=0,u=s.length;u>m;m++)s[m].start.row+=n.start.row,s[m].end.row+=n.start.row}return s},this.replace=function(t,e){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return e;if(i){var r=i.exec(t);if(!r||r[0].length!=t.length)return null;if(e=t.replace(i,e),n.preserveCase){e=e.split("");for(var o=Math.min(t.length,t.length);o--;){var s=t[o];s&&s.toLowerCase()!=s?e[o]=e[o].toUpperCase():e[o]=e[o].toLowerCase()}e=e.join("")}return e}},this.$matchIterator=function(t,e){var n=this.$assembleRegExp(e);if(!n)return!1;var r,s=this,a=e.backwards;if(e.$isMultiLine)var l=n.length,c=function(e,i,s){var a=e.search(n[0]);if(-1!=a){for(var c=1;l>c;c++)if(e=t.getLine(i+c),-1==e.search(n[c]))return;var h=e.match(n[l-1])[0].length,u=new o(i,a,i+l-1,h);return 1==n.offset?(u.start.row--,u.start.column=Number.MAX_VALUE):s&&(u.start.column+=s),r(u)?!0:void 0}};else if(a)var c=function(t,e,o){for(var s=i.getMatchOffsets(t,n),a=s.length-1;a>=0;a--)if(r(s[a],e,o))return!0};else var c=function(t,e,o){for(var s=i.getMatchOffsets(t,n),a=0;a<s.length;a++)if(r(s[a],e,o))return!0};return{forEach:function(n){r=n,s.$lineIterator(t,e).forEach(c)}}},this.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var n=t.needle;if(!t.needle)return t.re=!1;t.regExp||(n=i.escapeRegExp(n)),t.wholeWord&&(n="\\b"+n+"\\b");var r=t.caseSensitive?"g":"gi";if(t.$isMultiLine=!e&&/[\n\r]/.test(n),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(s){o=!1}return t.re=o},this.$assembleMultilineRegExp=function(t,e){for(var n=t.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],e))}catch(o){return!1}return""==n[0]?(i.shift(),i.offset=1):i.offset=0,i},this.$lineIterator=function(t,e){var n=1==e.backwards,i=0!=e.skipCurrent,r=e.range,o=e.start;o||(o=r?r[n?"end":"start"]:t.selection.getRange()),o.start&&(o=o[i!=n?"end":"start"]);var s=r?r.start.row:0,a=r?r.end.row:t.getLength()-1,l=n?function(n){var i=o.row,r=t.getLine(i).substring(0,o.column);if(!n(r,i)){for(i--;i>=s;i--)if(n(t.getLine(i),i))return;if(0!=e.wrap)for(i=a,s=o.row;i>=s;i--)if(n(t.getLine(i),i))return}}:function(n){var i=o.row,r=t.getLine(i).substr(o.column);if(!n(r,i,o.column)){for(i+=1;a>=i;i++)if(n(t.getLine(i),i))return;if(0!=e.wrap)for(i=s,a=o.row;a>=i;i++)if(n(t.getLine(i),i))return}};return{forEach:l}}}).call(s.prototype),e.Search=s}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,e,n){var i=t("../lib/oop"),r=t("../keyboard/hash_handler").HashHandler,o=t("../lib/event_emitter").EventEmitter,s=function(t,e){r.call(this,e,t),this.byName=this.commands,this.setDefaultHandler("exec",function(t){return t.command.exec(t.editor,t.args||{})})};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(t,e,n){if("string"==typeof t&&(t=this.commands[t]),!t)return!1;if(e&&e.$readOnly&&!t.readOnly)return!1;var i={editor:e,command:t,args:n},r=this._emit("exec",i);return this._signal("afterExec",i),r===!1?!1:!0},this.toggleRecording=function(t){return this.$inReplay?void 0:(t&&t._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach(function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(t){return t.map(function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]||(t=t[0]),t})}}.call(s.prototype),e.CommandManager=s}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,e,n){function i(t,e){if(this.platform=e||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.__defineGetter__&&this.__defineSetter__&&"undefined"!=typeof console&&console.error){var n=!1,i=function(){n||(n=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return i(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(t){return i(),this.commandKeyBinding=t})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(t)}var r=t("../lib/keys"),o=t("../lib/useragent");(function(){this.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},this.removeCommand=function(t){var e="string"==typeof t?t:t.name;t=this.commands[e],delete this.commands[e];var n=this.commandKeyBinding;for(var i in n)for(var r in n[i])n[i][r]==t&&delete n[i][r]},this.bindKey=function(t,e){if(t){if("function"==typeof e)return void this.addCommand({exec:e,bindKey:t,name:e.name||t});var n=this.commandKeyBinding;t.split("|").forEach(function(t){var i=this.parseKeys(t,e),r=i.hashId;(n[r]||(n[r]={}))[i.key]=e},this)}},this.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var n=t[e];if(n){if("string"==typeof n)return this.bindKey(n,e);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=e),this.addCommand(n))}},this)},this.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},this.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},this._buildKeyHash=function(t){var e=t.bindKey;if(e){var n="string"==typeof e?e:e[this.platform];this.bindKey(n,t)}},this.parseKeys=function(t){-1!=t.indexOf(" ")&&(t=t.split(/\s+/).pop());var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(t){return t}),n=e.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!e.length)return{key:n,hashId:-1};if(1==e.length&&"shift"==e[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=e.length;s--;){var a=r.KEY_MODS[e[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+e[s]+" in "+t),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(t,e){var n=this.commandKeyBinding;return n[t]&&n[t][e]},this.handleKeyboard=function(t,e,n,i){return{command:this.findKeyCommand(e,n)}}}).call(i.prototype),e.HashHandler=i}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config"],function(t,e,n){function i(t,e){return{win:t,mac:e}}var r=t("../lib/lang"),o=t("../config");e.commands=[{name:"showSettingsMenu",bindKey:i("Ctrl-,","Command-,"),exec:function(t){o.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:i("Alt-E","Ctrl-E"),exec:function(t){o.loadModule("ace/ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"center",readOnly:!0},{name:"goToPreviousError",bindKey:i("Alt-Shift-E","Ctrl-Shift-E"),exec:function(t){o.loadModule("ace/ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"center",readOnly:!0},{name:"selectall",bindKey:i("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",bindKey:i(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:i("Ctrl-L","Command-L"),exec:function(t){var e=parseInt(prompt("Enter line number:"),10);isNaN(e)||t.gotoLine(e)},readOnly:!0},{name:"fold",bindKey:i("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:i("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:i("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:i("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:i("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:i("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:i("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:i("Ctrl-K","Command-G"),exec:function(t){t.findNext()},readOnly:!0},{name:"findprevious",bindKey:i("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},readOnly:!0},{name:"selectOrFindNext",bindKey:i("ALt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:i("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",bindKey:i("Ctrl-F","Command-F"),exec:function(t){o.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:i("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:i("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:i("Shift-Up","Shift-Up"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:i("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:i("Ctrl-Shift-End","Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:i("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:i("Shift-Down","Shift-Down"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:i("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:i("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:i("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:i("Alt-Shift-Left","Command-Shift-Left"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:i("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:i("Shift-Left","Shift-Left"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:i("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:i("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:i("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:i("Alt-Shift-Right","Command-Shift-Right"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:i("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:i("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:i("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:i(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:i("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:i(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:i("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:i("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"togglerecording",bindKey:i("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",bindKey:i("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",bindKey:i("Ctrl-P","Ctrl-Shift-P"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:i("Ctrl-Shift-P",null),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"cut",exec:function(t){var e=t.getSelectionRange();t._emit("cut",e),t.selection.isEmpty()||(t.session.remove(e),t.clearSelection())},multiSelectAction:"forEach"},{name:"removeline",bindKey:i("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:i("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},multiSelectAction:"forEach"},{name:"sortlines",bindKey:i("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:i("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:i("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach"},{name:"modifyNumberUp",bindKey:i("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:i("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:i("Ctrl-H","Command-Option-F"),exec:function(t){o.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",bindKey:i("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",bindKey:i("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",bindKey:i("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()}},{name:"movelinesup",bindKey:i("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()}},{name:"copylinesdown",bindKey:i("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()}},{name:"movelinesdown",bindKey:i("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()}},{name:"del",bindKey:i("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach"},{name:"backspace",bindKey:i("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach"},{name:"cut_or_delete",bindKey:i("Shift-Delete",null),exec:function(t){return t.selection.isEmpty()?void t.remove("left"):!1},multiSelectAction:"forEach"},{name:"removetolinestart",bindKey:i("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach"},{name:"removetolineend",bindKey:i("Alt-Delete","Ctrl-K"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach"},{name:"removewordleft",bindKey:i("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach"},{name:"removewordright",bindKey:i("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach"},{name:"outdent",bindKey:i("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:i("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:i("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:i("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(t,e){t.insert(r.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach"},{name:"splitline",bindKey:i(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach"},{name:"transposeletters",bindKey:i("Ctrl-T","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)}},{name:"touppercase",bindKey:i("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach"},{name:"tolowercase",bindKey:i("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach"}]}),define("ace/undomanager",["require","exports","module"],function(t,e,n){var i=function(){this.reset()};(function(){this.execute=function(t){var e=t.args[0];this.$doc=t.args[1],t.merge&&this.hasUndo()&&(e=this.$undoStack.pop().concat(e)),this.$undoStack.push(e),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(t){var e=this.$undoStack.pop(),n=null;return e&&(n=this.$doc.undoChanges(e,t),this.$redoStack.push(e),this.dirtyCounter--),n},this.redo=function(t){var e=this.$redoStack.pop(),n=null;return e&&(n=this.$doc.redoChanges(e,t),this.$undoStack.push(e),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}).call(i.prototype),e.UndoManager=i}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/useragent","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","ace/lib/event_emitter"],function(t,e,n){var i=t("./lib/oop"),r=t("./lib/dom"),o=(t("./lib/useragent"),t("./config")),s=t("./layer/gutter").Gutter,a=t("./layer/marker").Marker,l=t("./layer/text").Text,c=t("./layer/cursor").Cursor,h=t("./scrollbar").HScrollBar,u=t("./scrollbar").VScrollBar,d=t("./renderloop").RenderLoop,f=t("./lib/event_emitter").EventEmitter,p=".ace_editor {position: relative;overflow: hidden;font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;font-size: 12px;line-height: normal;color: black;}.ace_editor .ace_line {direction: ltr;unicode-bidi: bidi-override;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;min-width: 100%;}.ace_dragging, .ace_dragging * {cursor: move !important;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: '';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;}.ace_text-input.ace_composition {background: #f8f8f8;color: #111;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0px;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_cursor[style*=\"opacity: 0\"]{-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;}.ace_gutter-tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: inline-block;max-width: 500px;padding: 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre-line;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block;   }.ace_fold-widget.ace_end {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget.ace_closed {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");}.ace_dark .ace_fold-widget.ace_end {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget.ace_closed {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}";
r.importCssString(p,"ace_editor");var g=function(t,e){var n=this;this.container=t||r.createElement("div"),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.container,"ace_editor"),this.setTheme(e),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new u(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",function(t){n.$scrollAnimation||n.session.setScrollTop(t.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(t){n.$scrollAnimation||n.session.setScrollLeft(t.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize")}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,f),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(t){this.session=t,this.scrollMargin.top&&t.getScrollTop()<=0&&t.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(t),this.$markerBack.setSession(t),this.$markerFront.setSession(t),this.$gutterLayer.setSession(t),this.$textLayer.setSession(t),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(t,e){void 0===e&&(e=1/0),this.$changedLines?(this.$changedLines.firstRow>t&&(this.$changedLines.firstRow=t),this.$changedLines.lastRow<e&&(this.$changedLines.lastRow=e)):this.$changedLines={firstRow:t,lastRow:e},this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow<this.layerConfig.firstRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(t){t?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(t,e,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=t?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(t,e,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;t&&(this.$gutterLayer.$padding=null),t?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0)}},this.$updateCachedSize=function(t,e,n,i){i-=this.$extraHeight||0;var r=0,o=this.$size,s={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return i&&(t||o.height!=i)&&(o.height=i,r=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",this.session&&(r|=this.CHANGE_SCROLL)),n&&(t||o.width!=n)&&(r=this.CHANGE_SIZE,o.width=n,null==e&&(e=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=e,this.scrollBarH.element.style.left=this.scroller.style.left=e+"px",o.scrollerWidth=Math.max(0,n-e-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||t)&&(r|=this.CHANGE_FULL)),o.$dirty=!n||!i,r&&this._signal("resize",s),r},this.onGutterResize=function(){var t=this.$showGutter?this.$gutter.offsetWidth:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var t=this.$size.scrollerWidth-2*this.$padding,e=Math.floor(t/this.characterWidth);return this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(t){this.setOption("animatedScroll",t)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(t){this.setOption("showInvisibles",t)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(t){this.setOption("displayIndentGuides",t)},this.setShowPrintMargin=function(t){this.setOption("showPrintMargin",t)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(t){this.setOption("printMarginColumn",t)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(t){return this.setOption("showGutter",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var t=this.$cursorLayer.$pixelPos,e=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,t=this.$cursorLayer.getPixelPosition(n,!0),e*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=t.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=e+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var t=r.createElement("div");t.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",t.appendChild(this.$printMarginEl),this.content.insertBefore(t,this.content.firstChild)}var e=this.$printMarginEl.style;e.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var t=this.layerConfig,e=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;e-=t.offset;var i=this.lineHeight;if(!(0>e||e>t.height-i)){var r=this.characterWidth;if(this.$composition){var o=this.textarea.value.replace(/^\x01+/,"");r*=this.session.$getStringScreenWidth(o)[0]+2,i+=2,e-=1}n-=this.scrollLeft,n>this.$size.scrollerWidth-r&&(n=this.$size.scrollerWidth-r),n-=this.scrollBar.width,this.textarea.style.height=i+"px",this.textarea.style.width=r+"px",this.textarea.style.right=Math.max(0,this.$size.scrollerWidth-n-r)+"px",this.textarea.style.bottom=Math.max(0,this.$size.height-e-i)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var t=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(t){this.$padding=t,this.$textLayer.setPadding(t),this.$cursorLayer.setPadding(t),this.$markerFront.setPadding(t),this.$markerBack.setPadding(t),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(t,e,n,i){var r=this.scrollMargin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(r.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(t){this.setOption("hScrollBarAlwaysVisible",t)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(t){this.setOption("vScrollBarAlwaysVisible",t)},this.$updateScrollBarV=function(){this.scrollBarV.setScrollHeight(this.layerConfig.maxHeight+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(t,e){if(this.$changes&&(t|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!t&&!e)return void(this.$changes|=t);if(this.$size.$dirty)return this.$changes|=t,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var n=this.layerConfig;return(t&this.CHANGE_FULL||t&this.CHANGE_SIZE||t&this.CHANGE_TEXT||t&this.CHANGE_LINES||t&this.CHANGE_SCROLL||t&this.CHANGE_H_SCROLL)&&(t|=this.$computeLayerConfig(),n=this.layerConfig,this.$updateScrollBarV(),t&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px"),t&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),t&this.CHANGE_FULL?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):t&this.CHANGE_SCROLL?(t&this.CHANGE_TEXT||t&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(t&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):t&this.CHANGE_LINES?(this.$updateLines()||t&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(t&this.CHANGE_TEXT||t&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),t&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),void this._signal("afterRender"))},this.$autosize=function(){var t=this.session.getScreenLength()*this.lineHeight,e=this.$maxLines*this.lineHeight,n=Math.max((this.$minLines||1)*this.lineHeight,Math.min(e,t))+this.scrollMargin.v+(this.$extraHeight||0),i=t>e;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var t=this.session,e=this.$size.height<=2*this.lineHeight,n=this.session.getScreenLength(),i=n*this.lineHeight,r=this.scrollTop%this.lineHeight,o=this.$size.scrollerHeight+this.lineHeight,s=this.$getLongestLine(),a=!e&&(this.$hScrollBarAlwaysVisible||this.$size.scrollerWidth-s-2*this.$padding<0),l=this.$horizScroll!==a;l&&(this.$horizScroll=a,this.scrollBarH.setVisible(a)),!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>i-this.$size.scrollerHeight&&(i+=Math.min((this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd,this.scrollTop-i+this.$size.scrollerHeight));var c=!e&&(this.$vScrollBarAlwaysVisible||this.$size.scrollerHeight-i<0),h=this.$vScroll!==c;h&&(this.$vScroll=c,this.scrollBarV.setVisible(c)),this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,i-this.$size.scrollerHeight+this.scrollMargin.v))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,s+2*this.$padding-this.$size.scrollerWidth+this.scrollMargin.h)));var u,d,f=Math.ceil(o/this.lineHeight)-1,p=Math.max(0,Math.round((this.scrollTop-r)/this.lineHeight)),g=p+f,m=this.lineHeight;p=t.screenToDocumentRow(p,0);var v=t.getFoldLine(p);v&&(p=v.start.row),u=t.documentToScreenRow(p,0),d=t.getRowLength(p)*m,g=Math.min(t.screenToDocumentRow(g,0),t.getLength()-1),o=this.$size.scrollerHeight+t.getRowLength(g)*m+d,r=this.scrollTop-u*m;var y=0;return(l||h)&&(y=this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this._signal("scrollbarVisibilityChanged"),h&&(s=this.$getLongestLine())),this.layerConfig={width:s,padding:this.$padding,firstRow:p,firstRowScreen:u,lastRow:g,lineHeight:m,characterWidth:this.characterWidth,minHeight:o,maxHeight:i,offset:r,height:this.$size.scrollerHeight},y},this.$updateLines=function(){var t=this.$changedLines.firstRow,e=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;return t>n.lastRow+1||e<n.firstRow?void 0:e===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,t,e),!0)},this.$getLongestLine=function(){var t=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(t+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(t*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(t,e){this.$gutterLayer.addGutterDecoration(t,e)},this.removeGutterDecoration=function(t,e){this.$gutterLayer.removeGutterDecoration(t,e)},this.updateBreakpoints=function(t){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(t){this.$gutterLayer.setAnnotations(t),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(t,e,n){this.scrollCursorIntoView(t,n),this.scrollCursorIntoView(e,n)},this.scrollCursorIntoView=function(t,e){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(t),i=n.left,r=n.top,o=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;o>r?(e&&(r-=e*this.$size.scrollerHeight),0==r?r=-this.scrollMargin.top:0==r&&(r=+this.scrollMargin.bottom),this.session.setScrollTop(r)):o+this.$size.scrollerHeight<r+this.lineHeight&&(e&&(r+=e*this.$size.scrollerHeight),this.session.setScrollTop(r+this.lineHeight-this.$size.scrollerHeight));var s=this.scrollLeft;s>i?(i<this.$padding+2*this.layerConfig.characterWidth&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):s+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):s<=this.$padding&&i-s<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(t){this.session.setScrollTop(t*this.lineHeight)},this.alignCursor=function(t,e){"number"==typeof t&&(t={row:t,column:0});var n=this.$cursorLayer.getPixelPosition(t),i=this.$size.scrollerHeight-this.lineHeight,r=n.top-i*(e||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(t,e){var n=0,i=this.STEPS,r=[],o=function(t,e,n){return n*(Math.pow(t-1,3)+1)+e};for(n=0;i>n;++n)r.push(o(n/this.STEPS,t,e-t));return r},this.scrollToLine=function(t,e,n,i){var r=this.$cursorLayer.getPixelPosition({row:t,column:0}),o=r.top;e&&(o-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(o),n!==!1&&this.animateScrolling(s,i)},this.animateScrolling=function(t,e){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(t!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(t=r[0],t==n))return}var o=i.$calcSteps(t,n);this.$scrollAnimation={from:t,to:n,steps:o},clearInterval(this.$timer),i.session.setScrollTop(o.shift()),i.session.$scrollTop=n,this.$timer=setInterval(function(){o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):(i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,e&&e())},10)}}},this.scrollToY=function(t){this.scrollTop!==t&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=t)},this.scrollToX=function(t){this.scrollLeft!==t&&(this.scrollLeft=t),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(t,e){this.session.setScrollTop(e),this.session.setScrollLeft(e)},this.scrollBy=function(t,e){e&&this.session.setScrollTop(this.session.getScrollTop()+e),t&&this.session.setScrollLeft(this.session.getScrollLeft()+t)},this.isScrollableBy=function(t,e){return 0>e&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:e>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight-(this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd<-1+this.scrollMargin.bottom?!0:0>t&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:t>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(t,e){var n=this.scroller.getBoundingClientRect(),i=(t+this.scrollLeft-n.left-this.$padding)/this.characterWidth,r=Math.floor((e+this.scrollTop-n.top)/this.lineHeight),o=Math.round(i);return{row:r,column:o,side:i-o>0?1:-1}},this.screenToTextCoordinates=function(t,e){var n=this.scroller.getBoundingClientRect(),i=Math.round((t+this.scrollLeft-n.left-this.$padding)/this.characterWidth),r=(e+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(r,Math.max(i,0))},this.textToScreenCoordinates=function(t,e){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(t,e),r=this.$padding+Math.round(i.column*this.characterWidth),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(t){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(t){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(r.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(t,e){function n(n){if(i.$themeId!=t)return e&&e();if(n.cssClass){r.importCssString(n.cssText,n.cssClass,i.container.ownerDocument),i.theme&&r.removeCssClass(i.container,i.theme.cssClass);var o="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&o!=i.$padding&&i.setPadding(o),i.$theme=n.cssClass,i.theme=n,r.addCssClass(i.container,n.cssClass),r.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),e&&e()}}var i=this;if(this.$themeId=t,i._dispatchEvent("themeChange",{theme:t}),t&&"string"!=typeof t)n(t);else{var s=t||this.$options.theme.initialValue;o.loadModule(["theme",s],n)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(t,e){r.setCssClass(this.container,t,e!==!1)},this.unsetStyle=function(t){r.removeCssClass(this.container,t)},this.setCursorStyle=function(t){this.content.style.cursor!=t&&(this.content.style.cursor=t)},this.setMouseCursor=function(t){this.content.style.cursor=t},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),o.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(t){this.$textLayer.setShowInvisibles(t)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(t){"number"==typeof t&&(this.$printMarginColumn=t),this.$showPrintMargin=!!t,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(t){this.$gutter.style.display=t?"block":"none",this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(t){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",t)},initialValue:!1},showFoldWidgets:{set:function(t){this.$gutterLayer.setShowFoldWidgets(t)},initialValue:!0},displayIndentGuides:{set:function(t){this.$textLayer.setDisplayIndentGuides(t)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(t){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=t?"":"none",void(this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight())):(this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight))},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(t){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(t){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(t){"number"==typeof t&&(t+="px"),this.container.style.fontSize=t,this.updateFontSize()},initialValue:12},fontFamily:{set:function(t){this.container.style.fontFamily=t,this.updateFontSize()}},maxLines:{set:function(t){this.updateFull()}},minLines:{set:function(t){this.updateFull()}},scrollPastEnd:{set:function(t){t=+t||0,this.$scrollPastEnd!=t&&(this.$scrollPastEnd=t,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(t){this.$gutterLayer.$fixedWidth=!!t,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(t){this.setTheme(t)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),e.VirtualRenderer=g}),define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(t,e,n){var i=t("../lib/dom"),r=t("../lib/oop"),o=t("../lib/lang"),s=t("../lib/event_emitter").EventEmitter,a=function(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",t.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){r.implement(this,s),this.setSession=function(t){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=t,t.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(t,e)},this.removeGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(t,e)},this.setAnnotations=function(t){this.$annotations=[];for(var e=0;e<t.length;e++){var n=t[e],i=n.row,r=this.$annotations[i];r||(r=this.$annotations[i]={text:[]});var s=n.text;s=s?o.escapeHTML(s):n.html||"",-1===r.text.indexOf(s)&&r.text.push(s);var a=n.type;"error"==a?r.className=" ace_error":"warning"==a&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=a||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(t){if(this.$annotations.length){var e=t.data,n=e.range,i=n.start.row,r=n.end.row-i;if(0===r);else if("removeText"==e.action||"removeLines"==e.action)this.$annotations.splice(i,r+1,null);else{var o=new Array(r+1);o.unshift(i,1),this.$annotations.splice.apply(this.$annotations,o)}}},this.update=function(t){for(var e=t.firstRow,n=t.lastRow,r=this.session,o=r.getNextFoldLine(e),s=o?o.start.row:1/0,a=this.$showFoldWidgets&&r.foldWidgets,l=r.$breakpoints,c=r.$decorations,h=r.$firstLineNumber,u=0,d=r.gutterRenderer,f=null,p=-1,g=e;;){if(g>s&&(g=o.end.row+1,o=r.getNextFoldLine(g,o),s=o?o.start.row:1/0),g>n){for(;this.$cells.length>p+1;)f=this.$cells.pop(),this.element.removeChild(f.element);break}f=this.$cells[++p],f||(f={element:null,textNode:null,foldWidget:null},f.element=i.createElement("div"),f.textNode=document.createTextNode(""),f.element.appendChild(f.textNode),this.element.appendChild(f.element),this.$cells[p]=f);var m="ace_gutter-cell ";l[g]&&(m+=l[g]),c[g]&&(m+=c[g]),this.$annotations[g]&&(m+=this.$annotations[g].className),f.element.className!=m&&(f.element.className=m);var v=r.getRowLength(g)*t.lineHeight+"px";if(v!=f.element.style.height&&(f.element.style.height=v),a){var y=a[g];null==y&&(y=a[g]=r.getFoldWidget(g))}if(y){f.foldWidget||(f.foldWidget=i.createElement("span"),f.element.appendChild(f.foldWidget));var m="ace_fold-widget ace_"+y;m+="start"==y&&g==s&&g<o.end.row?" ace_closed":" ace_open",f.foldWidget.className!=m&&(f.foldWidget.className=m);var v=t.lineHeight+"px";f.foldWidget.style.height!=v&&(f.foldWidget.style.height=v)}else f.foldWidget&&(f.element.removeChild(f.foldWidget),f.foldWidget=null);var w=u=d?d.getText(r,g):g+h;w!=f.textNode.data&&(f.textNode.data=w),g++}this.element.style.height=t.minHeight+"px",(this.$fixedWidth||r.$useWrapMode)&&(u=r.getLength()+h);var b=d?d.getWidth(r,u,t):u.toString().length*t.characterWidth,x=this.$padding||this.$computePadding();b+=x.left+x.right,b===this.gutterWidth||isNaN(b)||(this.gutterWidth=b,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",b))},this.$fixedWidth=!1,this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(t){t?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=t,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var t=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(t.paddingLeft)+1||0,this.$padding.right=parseInt(t.paddingRight)||0,this.$padding},this.getRegion=function(t){var e=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return t.x<e.left+n.left?"markers":this.$showFoldWidgets&&t.x>n.right-e.right?"foldWidgets":void 0}}).call(a.prototype),e.Gutter=a}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,e,n){var i=t("../range").Range,r=t("../lib/dom"),o=function(t){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setMarkers=function(t){this.markers=t},this.update=function(t){var t=t||this.config;if(t){this.config=t;var e=[];for(var n in this.markers){var i=this.markers[n];if(i.range){var o=i.range.clipRows(t.firstRow,t.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),i.renderer){var s=this.$getTop(o.start.row,t),a=this.$padding+o.start.column*t.characterWidth;i.renderer(e,o,a,s,t)}else"fullLine"==i.type?this.drawFullLineMarker(e,o,i.clazz,t):"screenLine"==i.type?this.drawScreenLineMarker(e,o,i.clazz,t):o.isMultiLine()?"text"==i.type?this.drawTextMarker(e,o,i.clazz,t):this.drawMultiLineMarker(e,o,i.clazz,t):this.drawSingleLineMarker(e,o,i.clazz+" ace_start",t)}else i.update(e,this,this.session,t)}this.element=r.setInnerHtml(this.element,e.join(""))}},this.$getTop=function(t,e){return(t-e.firstRowScreen)*e.lineHeight},this.drawTextMarker=function(t,e,n,r,o){var s=e.start.row,a=new i(s,e.start.column,s,this.session.getScreenLastRowColumn(s));for(this.drawSingleLineMarker(t,a,n+" ace_start",r,1,o),s=e.end.row,a=new i(s,0,s,e.end.column),this.drawSingleLineMarker(t,a,n,r,0,o),s=e.start.row+1;s<e.end.row;s++)a.start.row=s,a.end.row=s,a.end.column=this.session.getScreenLastRowColumn(s),this.drawSingleLineMarker(t,a,n,r,1,o)},this.drawMultiLineMarker=function(t,e,n,i,r){var o=this.$padding,s=i.lineHeight,a=this.$getTop(e.start.row,i),l=o+e.start.column*i.characterWidth;r=r||"",t.push("<div class='",n," ace_start' style='","height:",s,"px;","right:0;","top:",a,"px;","left:",l,"px;",r,"'></div>"),a=this.$getTop(e.end.row,i);var c=e.end.column*i.characterWidth;t.push("<div class='",n,"' style='","height:",s,"px;","width:",c,"px;","top:",a,"px;","left:",o,"px;",r,"'></div>"),s=(e.end.row-e.start.row-1)*i.lineHeight,0>s||(a=this.$getTop(e.start.row+1,i),t.push("<div class='",n,"' style='","height:",s,"px;","right:0;","top:",a,"px;","left:",o,"px;",r,"'></div>"))},this.drawSingleLineMarker=function(t,e,n,i,r,o){var s=i.lineHeight,a=(e.end.column+(r||0)-e.start.column)*i.characterWidth,l=this.$getTop(e.start.row,i),c=this.$padding+e.start.column*i.characterWidth;t.push("<div class='",n,"' style='","height:",s,"px;","width:",a,"px;","top:",l,"px;","left:",c,"px;",o||"","'></div>")},this.drawFullLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i),s=i.lineHeight;e.start.row!=e.end.row&&(s+=this.$getTop(e.end.row,i)-o),t.push("<div class='",n,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")},this.drawScreenLineMarker=function(t,e,n,i,r){var o=this.$getTop(e.start.row,i),s=i.lineHeight;t.push("<div class='",n,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")}}).call(o.prototype),e.Marker=o}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(t,e,n){
var i=t("../lib/oop"),r=t("../lib/dom"),o=t("../lib/lang"),s=t("../lib/useragent"),a=t("../lib/event_emitter").EventEmitter,l=function(t){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};(function(){i.implement(this,a),this.EOF_CHAR="\xb6",this.EOL_CHAR="\xac",this.TAB_CHAR="\u2192",this.SPACE_CHAR="\xb7",this.$padding=0,this.setPadding=function(t){this.$padding=t,this.element.style.padding="0 "+t+"px"},this.getLineHeight=function(){return this.$characterSize.height||0},this.getCharacterWidth=function(){return this.$characterSize.width||0},this.checkForSizeChanges=function(){var t=this.$measureSizes();if(t&&(this.$characterSize.width!==t.width||this.$characterSize.height!==t.height)){this.$measureNode.style.fontWeight="bold";var e=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=t,this.allowBoldFonts=e&&e.width===t.width&&e.height===t.height,this._emit("changeCharacterSize",{data:t})}},this.$pollSizeChanges=function(){var t=this;this.$pollSizeChangesTimer=setInterval(function(){t.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=s.isIE||s.isOldGecko?function(){var t=1e3;if(!this.$measureNode){var e=this.$measureNode=r.createElement("div"),n=e.style;if(n.width=n.height="auto",n.left=n.top=40*-t+"px",n.visibility="hidden",n.position="fixed",n.overflow="visible",n.whiteSpace="nowrap",e.innerHTML=o.stringRepeat("Xy",t),this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(e);else{for(var i=this.element.parentNode;!r.hasCssClass(i,"ace_editor");)i=i.parentNode;i.appendChild(e)}}if(!this.element.offsetWidth)return null;var n=this.$measureNode.style,s=r.computedStyle(this.element);for(var a in this.$fontStyles)n[a]=s[a];var l={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(2*t)};return 0==l.width||0==l.height?null:l}:function(){if(!this.$measureNode){var t=this.$measureNode=r.createElement("div"),e=t.style;e.width=e.height="auto",e.left=e.top="-100px",e.visibility="hidden",e.position="fixed",e.overflow="visible",e.whiteSpace="nowrap",t.innerHTML=o.stringRepeat("X",100);for(var n=this.element.parentNode;n&&!r.hasCssClass(n,"ace_editor");)n=n.parentNode;if(!n)return this.$measureNode=null;n.appendChild(t)}var i=this.$measureNode.getBoundingClientRect(),s={height:i.height,width:i.width/100};return 0==s.width||0==s.height?null:s},this.setSession=function(t){this.session=t,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(t){return this.showInvisibles==t?!1:(this.showInvisibles=t,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(t){return this.displayIndentGuides==t?!1:(this.displayIndentGuides=t,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var t=this.session.getTabSize();this.tabSize=t;for(var e=this.$tabStrings=[0],n=1;t+1>n;n++)this.showInvisibles?e.push("<span class='ace_invisible'>"+this.TAB_CHAR+o.stringRepeat("\xa0",n-1)+"</span>"):e.push(o.stringRepeat("\xa0",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i="ace_indent-guide";if(this.showInvisibles){i+=" ace_invisible";var r=o.stringRepeat(this.SPACE_CHAR,this.tabSize),s=this.TAB_CHAR+o.stringRepeat("\xa0",this.tabSize-1)}else var r=o.stringRepeat("\xa0",this.tabSize),s=r;this.$tabStrings[" "]="<span class='"+i+"'>"+r+"</span>",this.$tabStrings["	"]="<span class='"+i+"'>"+s+"</span>"}},this.updateLines=function(t,e,n){(this.config.lastRow!=t.lastRow||this.config.firstRow!=t.firstRow)&&this.scrollLines(t),this.config=t;for(var i=Math.max(e,t.firstRow),o=Math.min(n,t.lastRow),s=this.element.childNodes,a=0,l=t.firstRow;i>l;l++){var c=this.session.getFoldLine(l);if(c){if(c.containsRow(i)){i=c.start.row;break}l=c.end.row}a++}for(var l=i,c=this.session.getNextFoldLine(l),h=c?c.start.row:1/0;;){if(l>h&&(l=c.end.row+1,c=this.session.getNextFoldLine(l,c),h=c?c.start.row:1/0),l>o)break;var u=s[a++];if(u){var d=[];this.$renderLine(d,l,!this.$useLineGroups(),l==h?c:!1),u.style.height=t.lineHeight*this.session.getRowLength(l)+"px",r.setInnerHtml(u,d.join(""))}l++}},this.scrollLines=function(t){var e=this.config;if(this.config=t,!e||e.lastRow<t.firstRow)return this.update(t);if(t.lastRow<e.firstRow)return this.update(t);var n=this.element;if(e.firstRow<t.firstRow)for(var i=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);i>0;i--)n.removeChild(n.firstChild);if(e.lastRow>t.lastRow)for(var i=this.session.getFoldedRowCount(t.lastRow+1,e.lastRow);i>0;i--)n.removeChild(n.lastChild);if(t.firstRow<e.firstRow){var r=this.$renderLinesFragment(t,t.firstRow,e.firstRow-1);n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)}if(t.lastRow>e.lastRow){var r=this.$renderLinesFragment(t,e.lastRow+1,t.lastRow);n.appendChild(r)}},this.$renderLinesFragment=function(t,e,n){for(var i=this.element.ownerDocument.createDocumentFragment(),o=e,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;;){if(o>a&&(o=s.end.row+1,s=this.session.getNextFoldLine(o,s),a=s?s.start.row:1/0),o>n)break;var l=r.createElement("div"),c=[];if(this.$renderLine(c,o,!1,o==a?s:!1),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",i.appendChild(l),l.style.height=t.lineHeight*this.session.getRowLength(o)+"px";else for(var h=l.childNodes;h.length;)i.appendChild(h[0]);o++}return i},this.update=function(t){this.config=t;for(var e=[],n=t.firstRow,i=t.lastRow,o=n,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;;){if(o>a&&(o=s.end.row+1,s=this.session.getNextFoldLine(o,s),a=s?s.start.row:1/0),o>i)break;this.$useLineGroups()&&e.push("<div class='ace_line_group' style='height:",t.lineHeight*this.session.getRowLength(o),"px'>"),this.$renderLine(e,o,!1,o==a?s:!1),this.$useLineGroups()&&e.push("</div>"),o++}this.element=r.setInnerHtml(this.element,e.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(t,e,n,i){var r=this,s=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,a=function(t,n,i,s,a){if(n)return r.showInvisibles?"<span class='ace_invisible'>"+o.stringRepeat(r.SPACE_CHAR,t.length)+"</span>":o.stringRepeat("\xa0",t.length);if("&"==t)return"&#38;";if("<"==t)return"&#60;";if("	"==t){var l=r.session.getScreenTabSize(e+s);return e+=l-1,r.$tabStrings[l]}if("\u3000"==t){var c=r.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",h=r.showInvisibles?r.SPACE_CHAR:"";return e+=1,"<span class='"+c+"' style='width:"+2*r.config.characterWidth+"px'>"+h+"</span>"}return i?"<span class='ace_invisible ace_invalid'>"+r.SPACE_CHAR+"</span>":(e+=1,"<span class='ace_cjk' style='width:"+2*r.config.characterWidth+"px'>"+t+"</span>")},l=i.replace(s,a);if(this.$textToken[n.type])t.push(l);else{var c="ace_"+n.type.replace(/\./g," ace_"),h="";"fold"==n.type&&(h=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),t.push("<span class='",c,"'",h,">",l,"</span>")}return e+i.length},this.renderIndentGuide=function(t,e,n){var i=e.search(this.$indentGuideRe);return 0>=i||i>=n?e:" "==e[0]?(i-=i%this.tabSize,t.push(o.stringRepeat(this.$tabStrings[" "],i/this.tabSize)),e.substr(i)):"	"==e[0]?(t.push(o.stringRepeat(this.$tabStrings["	"],i)),e.substr(i)):e},this.$renderWrappedLine=function(t,e,n,i){for(var r=0,o=0,s=n[0],a=0,l=0;l<e.length;l++){var c=e[l],h=c.value;if(0==l&&this.displayIndentGuides){if(r=h.length,h=this.renderIndentGuide(t,h,s),!h)continue;r-=h.length}if(r+h.length<s)a=this.$renderToken(t,a,c,h),r+=h.length;else{for(;r+h.length>=s;)a=this.$renderToken(t,a,c,h.substring(0,s-r)),h=h.substring(s-r),r=s,i||t.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),o++,a=0,s=n[o]||Number.MAX_VALUE;0!=h.length&&(r+=h.length,a=this.$renderToken(t,a,c,h))}}},this.$renderSimpleLine=function(t,e){var n=0,i=e[0],r=i.value;this.displayIndentGuides&&(r=this.renderIndentGuide(t,r)),r&&(n=this.$renderToken(t,n,i,r));for(var o=1;o<e.length;o++)i=e[o],r=i.value,n=this.$renderToken(t,n,i,r)},this.$renderLine=function(t,e,n,i){if(i||0==i||(i=this.session.getFoldLine(e)),i)var r=this.$getFoldLineTokens(e,i);else var r=this.session.getTokens(e);if(n||t.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(e)),"px'>"),r.length){var o=this.session.getRowSplitData(e);o&&o.length?this.$renderWrappedLine(t,r,o,n):this.$renderSimpleLine(t,r)}this.showInvisibles&&(i&&(e=i.end.row),t.push("<span class='ace_invisible'>",e==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||t.push("</div>")},this.$getFoldLineTokens=function(t,e){function n(t,e,n){for(var i=0,o=0;o+t[i].value.length<e;)if(o+=t[i].value.length,i++,i==t.length)return;if(o!=e){var s=t[i].value.substring(e-o);s.length>n-e&&(s=s.substring(0,n-e)),r.push({type:t[i].type,value:s}),o=e+s.length,i+=1}for(;n>o&&i<t.length;){var s=t[i].value;s.length+o>n?r.push({type:t[i].type,value:s.substring(0,n-o)}):r.push(t[i]),o+=s.length,i+=1}}var i=this.session,r=[],o=i.getTokens(t);return e.walk(function(t,e,s,a,l){null!=t?r.push({type:"fold",value:t}):(l&&(o=i.getTokens(e)),o.length&&n(o,a,s))},e.end.row,this.session.getLine(e.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(l.prototype),e.Text=l}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,e,n){var i=t("../lib/dom"),r=function(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",t.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors")};(function(){this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setBlinking=function(t){t!=this.isBlinking&&(this.isBlinking=t,this.restartTimer())},this.setBlinkInterval=function(t){t!=this.blinkInterval&&(this.blinkInterval=t,this.restartTimer())},this.setSmoothBlinking=function(t){t!=this.smoothBlinking&&(this.smoothBlinking=t,t?i.addCssClass(this.element,"ace_smooth-blinking"):i.removeCssClass(this.element,"ace_smooth-blinking"),this.restartTimer())},this.addCursor=function(){var t=i.createElement("div");return t.className="ace_cursor",this.element.appendChild(t),this.cursors.push(t),t},this.removeCursor=function(){if(this.cursors.length>1){var t=this.cursors.pop();return t.parentNode.removeChild(t),t}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking");for(var t=this.cursors.length;t--;)this.cursors[t].style.opacity="";if(this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var e=function(){this.timeoutId=setTimeout(function(){for(var t=this.cursors.length;t--;)this.cursors[t].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var t=this.cursors.length;t--;)this.cursors[t].style.opacity="";e()}.bind(this),this.blinkInterval),e()}},this.getPixelPosition=function(t,e){if(!this.config||!this.session)return{left:0,top:0};t||(t=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(t),i=this.$padding+n.column*this.config.characterWidth,r=(n.row-(e?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:r}},this.update=function(t){this.config=t;var e=this.session.$selectionMarkers,n=0,i=0;(void 0===e||0===e.length)&&(e=[{cursor:null}]);for(var n=0,r=e.length;r>n;n++){var o=this.getPixelPosition(e[n].cursor,!0);if(!((o.top>t.height+t.offset||o.top<-t.offset)&&n>1)){var s=(this.cursors[i++]||this.addCursor()).style;s.left=o.left+"px",s.top=o.top+"px",s.width=t.characterWidth+"px",s.height=t.lineHeight+"px"}}for(;this.cursors.length>i;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,this.restartTimer()},this.$setOverwrite=function(t){t!=this.overwrite&&(this.overwrite=t,t?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),e.Cursor=r}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,e,n){var i=t("./lib/oop"),r=t("./lib/dom"),o=t("./lib/event"),s=t("./lib/event_emitter").EventEmitter,a=function(t){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){i.implement(this,s),this.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t}}).call(a.prototype);var l=function(t,e){a.call(this,t),this.scrollTop=0,e.$scrollbarWidth=this.width=r.scrollbarWidth(t.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};i.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(t){this.element.style.height=t+"px"},this.setInnerHeight=function(t){this.inner.style.height=t+"px"},this.setScrollHeight=function(t){this.inner.style.height=t+"px"},this.setScrollTop=function(t){this.scrollTop!=t&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=t)}}.call(l.prototype);var c=function(t,e){a.call(this,t),this.scrollLeft=0,this.height=e.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(c,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(t){this.element.style.width=t+"px"},this.setInnerWidth=function(t){this.inner.style.width=t+"px"},this.setScrollWidth=function(t){this.inner.style.width=t+"px"},this.setScrollLeft=function(t){this.scrollLeft!=t&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=t)}}.call(c.prototype),e.ScrollBar=l,e.ScrollBarV=l,e.ScrollBarH=c,e.VScrollBar=l,e.HScrollBar=c}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,e,n){var i=t("./lib/event"),r=function(t,e){this.onRender=t,this.pending=!1,this.changes=0,this.window=e||window};(function(){this.schedule=function(t){if(this.changes=this.changes|t,!this.pending&&this.changes){this.pending=!0;var e=this;i.nextFrame(function(){e.pending=!1;for(var t;t=e.changes;)e.changes=0,e.onRender(t)},this.window)}}}).call(r.prototype),e.RenderLoop=r}),define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,e,n){function i(t,e,n){return g.$options.wrap=!0,g.$options.needle=e,g.$options.backwards=-1==n,g.find(t)}function r(t,e){return t.row==e.row&&t.column==e.column}function o(t){t.$multiselectOnSessionChange||(t.$onAddRange=t.$onAddRange.bind(t),t.$onRemoveRange=t.$onRemoveRange.bind(t),t.$onMultiSelect=t.$onMultiSelect.bind(t),t.$onSingleSelect=t.$onSingleSelect.bind(t),t.$multiselectOnSessionChange=e.onSessionChange.bind(t),t.$multiselectOnSessionChange(t),t.on("changeSession",t.$multiselectOnSessionChange),t.on("mousedown",h),t.commands.addCommands(f.defaultCommands),s(t))}function s(t){function e(e){i&&(t.renderer.setMouseCursor(""),i=!1)}var n=t.textInput.getElement(),i=!1;u.addListener(n,"keydown",function(n){18!=n.keyCode||n.ctrlKey||n.shiftKey||n.metaKey?i&&e():i||(t.renderer.setMouseCursor("crosshair"),i=!0)}),u.addListener(n,"keyup",e),u.addListener(n,"blur",e)}var a=t("./range_list").RangeList,l=t("./range").Range,c=t("./selection").Selection,h=t("./mouse/multi_select_handler").onMouseDown,u=t("./lib/event"),d=t("./lib/lang"),f=t("./commands/multi_select_commands");e.commands=f.defaultCommands.concat(f.multiSelectCommands);var p=t("./search").Search,g=new p,m=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(m.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(t,e){if(t){if(!this.inMultiSelectMode&&0==this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(t),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),e||this.fromOrientedRange(t);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}t.cursor||(t.cursor=t.end);var i=this.rangeList.add(t);return this.$onAddRange(t),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),e||this.fromOrientedRange(t)}},this.toSingleRange=function(t){t=t||this.ranges[0];var e=this.rangeList.removeAll();e.length&&this.$onRemoveRange(e),t&&this.fromOrientedRange(t)},this.substractPoint=function(t){var e=this.rangeList.substractPoint(t);return e?(this.$onRemoveRange(e),e[0]):void 0},this.mergeOverlappingRanges=function(){var t=this.rangeList.merge();t.length?this.$onRemoveRange(t):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(t){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(t),this._emit("addRange",{range:t})},this.$onRemoveRange=function(t){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var e=this.rangeList.ranges.pop();t.push(e),this.rangeCount=0}for(var n=t.length;n--;){var i=this.ranges.indexOf(t[n]);this.ranges.splice(i,1)}this._emit("removeRange",{ranges:t}),0==this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),e=e||this.ranges[0],e&&!e.isEqual(this.getRange())&&this.fromOrientedRange(e)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new a,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var t=this.rangeList.ranges,e=t[t.length-1],n=l.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)}else{var n=this.getRange(),i=this.isBackwards(),r=n.start.row,o=n.end.row;if(r==o){if(i)var s=n.end,a=n.start;else var s=n.start,a=n.end;return this.addRange(l.fromPoints(a,a)),void this.addRange(l.fromPoints(s,s))}var c=[],h=this.getLineRange(r,!0);h.start.column=n.start.column,c.push(h);for(var u=r+1;o>u;u++)c.push(this.getLineRange(u,!0));h=this.getLineRange(o,!0),h.end.column=n.end.column,c.push(h),c.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var t=this.rangeList.ranges,e=t[t.length-1],n=l.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)}else{var i=this.session.documentToScreenPosition(this.selectionLead),r=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(i,r);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(t,e,n){var i=[],o=t.column<e.column;if(o)var s=t.column,a=e.column;else var s=e.column,a=t.column;var c=t.row<e.row;if(c)var h=t.row,u=e.row;else var h=e.row,u=t.row;0>s&&(s=0),0>h&&(h=0),h==u&&(n=!0);for(var d=h;u>=d;d++){var f=l.fromPoints(this.session.screenToDocumentPosition(d,s),this.session.screenToDocumentPosition(d,a));if(f.isEmpty()){if(p&&r(f.end,p))break;var p=f.end}f.cursor=o?f.start:f.end,i.push(f)}if(c&&i.reverse(),!n){for(var g=i.length-1;i[g].isEmpty()&&g>0;)g--;if(g>0)for(var m=0;i[m].isEmpty();)m++;for(var v=g;v>=m;v--)i[v].isEmpty()&&i.splice(v,1)}return i}}.call(c.prototype);var v=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(t){t.cursor||(t.cursor=t.end);var e=this.getSelectionStyle();return t.marker=this.session.addMarker(t,"ace_selection",e),this.session.$selectionMarkers.push(t),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,t},this.removeSelectionMarker=function(t){if(t.marker){this.session.removeMarker(t.marker);var e=this.session.$selectionMarkers.indexOf(t);-1!=e&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(t){for(var e=this.session.$selectionMarkers,n=t.length;n--;){var i=t[n];if(i.marker){this.session.removeMarker(i.marker);var r=e.indexOf(i);-1!=r&&e.splice(r,1)}}this.session.selectionMarkerCount=e.length},this.$onAddRange=function(t){this.addSelectionMarker(t.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(t){this.removeSelectionMarkers(t.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(t){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(f.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(t){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onMultiSelectExec=function(t){var e=t.command,n=t.editor;if(n.multiSelect){if(e.multiSelectAction)"forEach"==e.multiSelectAction?i=n.forEachSelection(e,t.args):"forEachLine"==e.multiSelectAction?i=n.forEachSelection(e,t.args,!0):"single"==e.multiSelectAction?(n.exitMultiSelectMode(),i=e.exec(n,t.args||{})):i=e.multiSelectAction(n,t.args||{});else{var i=e.exec(n,t.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(t,e,n){if(!this.inVirtualSelectionMode){var i,r=this.session,o=this.selection,s=o.rangeList,a=o._eventRegistry;o._eventRegistry={};var l=new c(r);this.inVirtualSelectionMode=!0;for(var h=s.ranges.length;h--;){if(n)for(;h>0&&s.ranges[h].start.row==s.ranges[h-1].end.row;)h--;l.fromOrientedRange(s.ranges[h]),this.selection=r.selection=l;var u=t.exec(this,e||{});void 0==!i&&(i=u),l.toOrientedRange(s.ranges[h])}l.detach(),this.selection=r.selection=o,this.inVirtualSelectionMode=!1,o._eventRegistry=a,o.mergeOverlappingRanges();var d=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),d&&d.from==d.to&&this.renderer.animateScrolling(d.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var t="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var e=this.multiSelect.rangeList.ranges,n=[],i=0;i<e.length;i++)n.push(this.session.getTextRange(e[i]));var r=this.session.getDocument().getNewLineCharacter();t=n.join(r),t.length==(n.length-1)*r.length&&(t="")}else this.selection.isEmpty()||(t=this.session.getTextRange(this.getSelectionRange()));return t},this.onPaste=function(t){if(!this.$readOnly){if(this._signal("paste",t),!this.inMultiSelectMode||this.inVirtualSelectionMode)return this.insert(t);var e=t.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(e.length>n.length||e.length<2||!e[1])return this.commands.exec("insertstring",this,t);for(var i=n.length;i--;){var r=n[i];r.isEmpty()||this.session.remove(r),this.session.insert(r.start,e[i])}}},this.findAll=function(t,e,n){e=e||{},e.needle=t||e.needle,this.$search.set(e);var i=this.$search.findAll(this.session);if(!i.length)return 0;this.$blockScrolling+=1;var r=this.multiSelect;n||r.toSingleRange(i[0]);for(var o=i.length;o--;)r.addRange(i[o],!0);return this.$blockScrolling-=1,i.length},this.selectMoreLines=function(t,e){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,r=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(r.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(r.row+t,r.column);if(n.isEmpty())var s=o;else var a=this.session.documentToScreenPosition(i?n.end:n.start),s=this.session.screenToDocumentPosition(a.row+t,a.column);if(i){var c=l.fromPoints(o,s);c.cursor=c.start}else{var c=l.fromPoints(s,o);c.cursor=c.end}if(c.desiredColumn=r.column,this.selection.inMultiSelectMode){if(e)var h=n.cursor}else this.selection.addRange(n);this.selection.addRange(c),h&&this.selection.substractPoint(h)},this.transposeSelections=function(t){for(var e=this.session,n=e.multiSelect,i=n.ranges,r=i.length;r--;){var o=i[r];if(o.isEmpty()){var s=e.getWordRange(o.start.row,o.start.column);o.start.row=s.start.row,o.start.column=s.start.column,o.end.row=s.end.row,o.end.column=s.end.column}}n.mergeOverlappingRanges();for(var a=[],r=i.length;r--;){var o=i[r];a.unshift(e.getTextRange(o))}0>t?a.unshift(a.pop()):a.push(a.shift());for(var r=i.length;r--;){var o=i[r],s=o.clone();e.replace(o,a[r]),o.start.row=s.start.row,o.start.column=s.start.column}},this.selectMore=function(t,e){var n=this.session,r=n.multiSelect,o=r.toOrientedRange();o.isEmpty()&&(o=n.getWordRange(o.start.row,o.start.column),o.cursor=-1==t?o.start:o.end,this.multiSelect.addRange(o));var s=n.getTextRange(o),a=i(n,s,t);a&&(a.cursor=-1==t?a.start:a.end,this.$blockScrolling+=1,this.session.unfold(a),this.multiSelect.addRange(a),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),e&&this.multiSelect.substractPoint(o.cursor)},this.alignCursors=function(){var t=this.session,e=t.multiSelect,n=e.ranges;if(n.length){var i=-1,r=n.filter(function(t){return t.cursor.row==i?!0:void(i=t.cursor.row)});e.$onRemoveRange(r);var o=0,s=1/0,a=n.map(function(e){var n=e.cursor,i=t.getLine(n.row),r=i.substr(n.column).search(/\S/g);return-1==r&&(r=0),n.column>o&&(o=n.column),s>r&&(s=r),r});n.forEach(function(e,n){var i=e.cursor,r=o-i.column,c=a[n]-s;r>c?t.insert(i,d.stringRepeat(" ",r-c)):t.remove(new l(i.row,i.column,i.row,i.column-r+c)),e.start.column=e.end.column=o,e.start.row=e.end.row=i.row,e.cursor=e.end}),e.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),h=c.start.row,u=c.end.row,f=h==u;if(f){var p,g=this.session.getLength();do p=this.session.getLine(u);while(/[=:]/.test(p)&&++u<g);do p=this.session.getLine(h);while(/[=:]/.test(p)&&--h>0);0>h&&(h=0),u>=g&&(u=g-1)}var m=this.session.doc.removeLines(h,u);m=this.$reAlignText(m,f),this.session.doc.insert({row:h,column:0},m.join("\n")+"\n"),f||(c.start.column=0,c.end.column=m[m.length-1].length),this.selection.setRange(c)}},this.$reAlignText=function(t,e){function n(t){return d.stringRepeat(" ",t)}function i(t){return t[2]?n(s)+t[2]+n(a-t[2].length+l)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}function r(t){return t[2]?n(s+a-t[2].length)+t[2]+n(l," ")+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}function o(t){return t[2]?n(s)+t[2]+n(l)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}var s,a,l,c=!0,h=!0;return t.map(function(t){var e=t.match(/(\s*)(.*?)(\s*)([=:].*)/);return e?null==s?(s=e[1].length,a=e[2].length,l=e[3].length,e):(s+a+l!=e[1].length+e[2].length+e[3].length&&(h=!1),s!=e[1].length&&(c=!1),s>e[1].length&&(s=e[1].length),a<e[2].length&&(a=e[2].length),l>e[3].length&&(l=e[3].length),e):[t]}).map(e?i:c?h?r:i:o)}}).call(v.prototype),e.onSessionChange=function(t){var e=t.session;e.multiSelect||(e.$selectionMarkers=[],e.selection.$initRangeList(),e.multiSelect=e.selection),this.multiSelect=e.multiSelect;var n=t.oldSession;n&&(n.multiSelect.removeEventListener("addRange",this.$onAddRange),n.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),n.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),n.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),e.multiSelect.on("addRange",this.$onAddRange),e.multiSelect.on("removeRange",this.$onRemoveRange),e.multiSelect.on("multiSelect",this.$onMultiSelect),e.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=e.selection.inMultiSelectMode&&(e.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},e.MultiSelect=o,t("./config").defineOptions(v.prototype,"editor",{enableMultiselect:{set:function(t){o(this),t?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",h)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",h))},value:!0}})}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event"],function(t,e,n){function i(t,e){return t.row==e.row&&t.column==e.column}function r(t){var e=t.domEvent,n=e.altKey,r=e.shiftKey,s=t.getAccelKey(),a=t.getButton();if(t.editor.inMultiSelectMode&&2==a)return void t.editor.textInput.onContextMenu(t.domEvent);if(!s&&!n)return void(0==a&&t.editor.inMultiSelectMode&&t.editor.exitMultiSelectMode());var l=t.editor,c=l.selection,h=l.inMultiSelectMode,u=t.getDocumentPosition(),d=c.getCursor(),f=t.inSelection()||c.isEmpty()&&i(u,d),p=t.x,g=t.y,m=function(t){p=t.clientX,g=t.clientY},v=function(){var t=l.renderer.pixelToScreenCoordinates(p,g),e=y.screenToDocumentPosition(t.row,t.column);i(b,t)&&i(e,c.selectionLead)||(b=t,l.selection.moveCursorToPosition(e),l.selection.clearSelection(),l.renderer.scrollCursorIntoView(),l.removeSelectionMarkers(x),x=c.rectangularRangeBlock(b,w),x.forEach(l.addSelectionMarker,l),l.updateSelectionMarkers())},y=l.session,w=l.renderer.pixelToScreenCoordinates(p,g),b=w;if(!s||r||n||0!=a){if(n&&0==a){t.stop(),h&&!s?c.toSingleRange():!h&&s&&c.addRange();var x=[];r?(w=y.documentToScreenPosition(c.lead),v()):(c.moveCursorToPosition(u),c.clearSelection());var C=function(t){clearInterval(E),l.removeSelectionMarkers(x);for(var e=0;e<x.length;e++)c.addRange(x[e])},A=v;o.capture(l.container,m,C);var E=setInterval(function(){A()},20);return t.preventDefault()}}else{if(!h&&f)return;if(!h){var k=c.toOrientedRange();l.addSelectionMarker(k)}var F=c.rangeList.rangeAtPoint(u);l.$blockScrolling++,l.once("mouseup",function(){var t=c.toOrientedRange();F&&t.isEmpty()&&i(F.cursor,t.cursor)?c.substractPoint(t.cursor):(k&&(l.removeSelectionMarker(k),c.addRange(k)),c.addRange(t)),l.$blockScrolling--})}}var o=t("../lib/event");e.onMouseDown=r}),define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(t,e,n){e.defaultCommands=[{name:"addCursorAbove",exec:function(t){t.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(t){t.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(t){t.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(t){t.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",
mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(t){t.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(t){t.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(t){t.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(t){t.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(t){t.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(t){t.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}}],e.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(t){t.exitMultiSelectMode()},readonly:!0,isAvailable:function(t){return t&&t.inMultiSelectMode}}];var i=t("../keyboard/hash_handler").HashHandler;e.keyboardHandler=new i(e.multiSelectCommands)}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/config"],function(t,e,n){var i=t("../lib/oop"),r=t("../lib/event_emitter").EventEmitter,o=t("../config"),s=function(e,n,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl);var r;if(o.get("packaged")||!t.toUrl)r=o.moduleUrl(n,"worker");else{var s=this.$normalizePath;r=s(t.toUrl("ace/worker/worker.js",null,"_"));var a={};e.forEach(function(e){a[e]=s(t.toUrl(e,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=new Worker(r),this.$worker.postMessage({init:!0,tlns:a,module:n,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,r),this.onMessage=function(t){var e=t.data;switch(e.type){case"log":window.console&&console.log&&console.log.apply(console,e.data);break;case"event":this._emit(e.name,{data:e.data});break;case"call":var n=this.callbacks[e.id];n&&(n(e.data),delete this.callbacks[e.id])}},this.$normalizePath=function(t){return location.host?(t=t.replace(/^[a-z]+:\/\/[^\/]+/,""),t=location.protocol+"//"+location.host+("/"==t.charAt(0)?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+t.replace(/^[\/]+/,"")):t},this.terminate=function(){this._emit("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,e.push(i)}this.send(t,e)},this.emit=function(t,e){try{this.$worker.postMessage({event:t,data:{data:e.data}})}catch(n){}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener)},this.changeListener=function(t){this.deltaQueue?this.deltaQueue.push(t.data):(this.deltaQueue=[t.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>20&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(s.prototype);var a=function(t,e,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var i=null,s=Object.create(r),a=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(t){a.messageBuffer.push(t),i&&setTimeout(l)};var l=function(){var t=a.messageBuffer.shift();t.command?i[t.command].apply(i,t.args):t.event&&s._emit(t.event,t.data)};s.postMessage=function(t){a.onMessage({data:t})},s.callback=function(t,e){this.postMessage({type:"call",id:e,data:t})},s.emit=function(t,e){this.postMessage({type:"event",name:t,data:e})},o.loadModule(["worker",e],function(t){for(i=new t[n](s);a.messageBuffer.length;)l()})};a.prototype=s.prototype,e.UIWorkerClient=a,e.WorkerClient=s}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,e,n){var i=t("./range").Range,r=t("./lib/event_emitter").EventEmitter,o=t("./lib/oop"),s=function(t,e,n,i,r,o){var s=this;this.length=e,this.session=t,this.doc=t.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var a=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var t=this,e=this.doc,n=this.session,r=this.$pos;this.pos=e.createAnchor(r.row,r.column),this.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(e){n.removeMarker(t.markerId),t.markerId=n.addMarker(new i(e.value.row,e.value.column,e.value.row,e.value.column+t.length),t.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(n){var i=e.createAnchor(n.row,n.column);t.others.push(i)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,e=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),e.othersClass,null,!1),n.on("change",function(r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(r.value.row,r.value.column,r.value.row,r.value.column+e.length),e.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},this.onUpdate=function(t){var e=t.data,n=e.range;if(n.start.row===n.end.row&&n.start.row===this.pos.row&&!this.$updating){this.$updating=!0;var r="insertText"===e.action?n.end.column-n.start.column:n.start.column-n.end.column;if(n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1){var o=n.start.column-this.pos.column;if(this.length+=r,!this.session.$fromUndo){if("insertText"===e.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+o};a.row===n.start.row&&n.start.column<a.column&&(l.column+=r),this.doc.insert(l,e.text)}else if("removeText"===e.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+o};a.row===n.start.row&&n.start.column<a.column&&(l.column+=r),this.doc.remove(new i(l.row,l.column,l.row,l.column-r))}n.start.column===this.pos.column&&"insertText"===e.action?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-r);for(var t=0;t<this.others.length;t++){var e=this.others[t],i={row:e.row,column:e.column-r};e.row===n.start.row&&n.start.column<e.column&&(i.column+=r),e.setPosition(i.row,i.column)}}.bind(this),0):n.start.column===this.pos.column&&"removeText"===e.action&&setTimeout(function(){for(var t=0;t<this.others.length;t++){var e=this.others[t];e.row===n.start.row&&n.start.column<e.column&&e.setPosition(e.row,e.column-r)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var s=0;s<this.others.length;s++)this.others[s]._emit("change",{value:this.others[s]})}this.$updating=!1}},this.onCursorChange=function(t){if(!this.$updating){var e=this.session.selection.getCursor();e.row===this.pos.row&&e.column>=this.pos.column&&e.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var t=0;t<this.others.length;t++)this.others[t].detach();this.session.setUndoSelect(!0)},this.cancel=function(){if(-1===this.$undoStackDepth)throw Error("Canceling placeholders only supported with undo manager attached to session.");for(var t=this.session.getUndoManager(),e=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,n=0;e>n;n++)t.undo(!0)}}).call(s.prototype),e.PlaceHolder=s}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,e,n){var i=t("../../range").Range,r=e.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(t,e,n){var i=t.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==e&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(t,e,n){return null},this.indentationBlock=function(t,e,n){var r=/\S/,o=t.getLine(e),s=o.search(r);if(-1!=s){for(var a=n||o.length,l=t.getLength(),c=e,h=e;++e<l;){var u=t.getLine(e).search(r);if(-1!=u){if(s>=u)break;h=e}}if(h>c){var d=t.getLine(h).length;return new i(c,a,h,d)}}},this.openingBracketBlock=function(t,e,n,r,o){var s={row:n,column:r+1},a=t.$findClosingBracket(e,s,o);if(a){var l=t.foldWidgets[a.row];return null==l&&(l=t.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=t.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(t,e,n,r,o){var s={row:n,column:r},a=t.$findOpeningBracket(e,s);return a?(a.column++,s.column--,i.fromPoints(a,s)):void 0}}).call(r.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(t,e,n){e.isDark=!1,e.cssClass="ace-tm",e.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var i=t("../lib/dom");i.importCssString(e.cssText,e.cssClass)}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(t,e,n){function i(t,e,n){for(var i=0,r=t.length-1;r>=i;){var o=i+r>>1,s=n(e,t[o]);if(s>0)i=o+1;else{if(!(0>s))return o;r=o-1}}return-(i+1)}function r(t,e,n){var r=t.getAnnotations().sort(a.comparePoints);if(r.length){var o=i(r,{row:e,column:-1},a.comparePoints);0>o&&(o=-o-1),o>=r.length-1?o=n>0?0:r.length-1:0===o&&0>n&&(o=r.length-1);var s=r[o];if(s&&n){if(s.row===e){do s=r[o+=n];while(s&&s.row===e);if(!s)return r.slice()}var l=[];e=s.row;do l[0>n?"unshift":"push"](s),s=r[o+=n];while(s&&s.row==e);return l.length&&l}}}var o=t("ace/line_widgets").LineWidgets,s=t("ace/lib/dom"),a=t("ace/range").Range;e.showErrorMarker=function(t,e){var n=t.session;n.widgetManager||(n.widgetManager=new o(n),n.widgetManager.attach(t));var i=t.getCursorPosition(),a=i.row,l=n.lineWidgets&&n.lineWidgets[a];l?l.destroy():a-=e;var c,h=r(n,a,e);if(h){var u=h[0];u.pos&&null==u.column&&(i.column=u.pos.sc),i.row=u.row,c=t.renderer.$gutterLayer.$annotations[i.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(i.row),t.selection.moveCursorToPosition(i),t.selection.clearSelection();var d={row:i.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div")},f=d.el.appendChild(s.createElement("div")),p=d.el.appendChild(s.createElement("div"));p.className="error_widget_arrow "+c.className;var g=t.renderer.$cursorLayer.getPixelPosition(i).left;p.style.left=g+t.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("<br>");var m={handleKeyboard:function(t,e,n){return 0===e&&"esc"===n?(d.destroy(),!0):void 0}};d.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),t.off("changeSelection",d.destroy),t.off("changeSession",d.destroy),t.off("mouseup",d.destroy),t.off("change",d.destroy))},t.keyBinding.addKeyboardHandler(m),t.on("changeSelection",d.destroy),t.on("changeSession",d.destroy),t.on("mouseup",d.destroy),t.on("change",d.destroy),t.session.widgetManager.addLineWidget(d),d.el.onmousedown=t.focus.bind(t)},s.importCssString("    .error_widget_wrapper {        background: inherit;        color: inherit;        border:none    }    .error_widget {        border-top: solid 2px;        border-bottom: solid 2px;        margin: 5px 0;        padding: 10px 40px;        white-space: pre-wrap;    }    .error_widget.ace_error, .error_widget_arrow.ace_error{        border-color: #ff5a5a    }    .error_widget.ace_warning, .error_widget_arrow.ace_warning{        border-color: #F1D817    }    .error_widget.ace_info, .error_widget_arrow.ace_info{        border-color: #5a5a5a    }    .error_widget.ace_ok, .error_widget_arrow.ace_ok{        border-color: #5aaa5a    }    .error_widget_arrow {        position: absolute;        border: solid 5px;        border-top-color: transparent!important;        border-right-color: transparent!important;        border-left-color: transparent!important;        top: -5px;    }","")}),define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(t,e,n){function i(t){this.session=t,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.detach=this.detach.bind(this),this.session.on("change",this.updateOnChange)}var r=(t("./lib/oop"),t("./lib/dom"));t("./range").Range;(function(){this.getRowLength=function(t){var e;return e=this.lineWidgets?this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0:0,this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1+e:1+e},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&(t+=e.rowCount)}),t},this.attach=function(t){t.widgetManager&&t.widgetManager!=this&&t.widgetManager.detach(),this.editor!=t&&(this.detach(),this.editor=t,this.editor.on("changeSession",this.detach),t.widgetManager=this,t.setOption("enableLineWidgets",!0),t.renderer.on("beforeRender",this.measureWidgets),t.renderer.on("afterRender",this.renderWidgets))},this.detach=function(t){if(!t||t.session!=this.session){var e=this.editor;if(e){e.off("changeSession",this.detach),this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))})}}},this.updateOnChange=function(t){var e=this.session.lineWidgets;if(e){var n=t.data,i=n.range,r=i.start.row,o=i.end.row-r;if(0===o);else if("removeText"==n.action||"removeLines"==n.action){var s=e.splice(r+1,o);s.forEach(function(t){t&&this.removeLineWidget(t)},this),this.$updateRows()}else{var a=new Array(o);a.unshift(r,0),e.splice.apply(e,a),this.$updateRows()}}},this.$updateRows=function(){var t=this.session.lineWidgets;if(t){var e=!0;t.forEach(function(t,n){t&&(e=!1,t.row=n)}),e&&(this.session.lineWidgets=null)}},this.addLineWidget=function(t){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[t.row]=t;var e=this.editor.renderer;return t.html&&!t.el&&(t.el=r.createElement("div"),t.el.innerHTML=t.html),t.el&&(r.addCssClass(t.el,"ace_lineWidgetContainer"),t.el.style.position="absolute",t.el.style.zIndex=5,e.container.appendChild(t.el),t._inDocument=!0),t.coverGutter||(t.el.style.zIndex=3),t.pixelHeight||(t.pixelHeight=t.el.offsetHeight),null==t.rowCount&&(t.rowCount=t.pixelHeight/e.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows(),this.renderWidgets(null,e),t},this.removeLineWidget=function(t){if(t._inDocument=!1,t.el&&t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.editor&&t.editor.destroy)try{t.editor.destroy()}catch(e){}this.session.lineWidgets&&(this.session.lineWidgets[t.row]=void 0),this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows()},this.onWidgetChanged=function(t){this.session._changedWidgets.push(t),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(t,e){var n=this.session._changedWidgets,i=e.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var s=n[o];s._inDocument||(s._inDocument=!0,e.container.appendChild(s.el)),s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row),0>a&&(a=0)),s.rowCount!=a&&(s.rowCount=a,s.row<r&&(r=s.row))}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(t,e){var n=e.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,i.length);r>0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,e.$cursorLayer.config=n;for(var s=r;o>=s;s++){var a=i[s];if(a&&a.el){a._inDocument||(a._inDocument=!0,e.container.appendChild(a.el));var l=e.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:e.gutterWidth;a.fixedWidth||(c-=e.scrollLeft),a.el.style.left=c+"px",a.fixedWidth?a.el.style.right=e.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(i.prototype),e.LineWidgets=i}),function(){window.require(["ace/ace"],function(t){t&&t.config.init(),window.ace||(window.ace={});for(var e in t)t.hasOwnProperty(e)&&(ace[e]=t[e])})}(),/* ***** BEGIN LICENSE BLOCK *****
 * Distributed under the BSD license:
 *
 * Copyright (c) 2010, Ajax.org B.V.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of Ajax.org B.V. nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ***** END LICENSE BLOCK ***** */
define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(t,e,n){var i=t("../lib/dom"),r=t("../lib/lang"),o=t("../lib/event"),s="/* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 297px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;display: block;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;display: block;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);    }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);    }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;display: block;float: right;font-family: Arial;font-size: 16px;height: 14px;line-height: 16px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing:    border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",a=t("../keyboard/hash_handler").HashHandler,l=t("../lib/keys");i.importCssString(s,"ace_searchbox");var c='<div class="ace_search right">    <button type="button" action="hide" class="ace_searchbtn_close"></button>    <div class="ace_search_form">        <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>        <button type="button" action="findNext" class="ace_searchbtn next"></button>        <button type="button" action="findPrev" class="ace_searchbtn prev"></button>    </div>    <div class="ace_replace_form">        <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>        <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>        <button type="button" action="replaceAll" class="ace_replacebtn">All</button>    </div>    <div class="ace_search_options">        <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>        <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>        <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>    </div></div>'.replace(/>\s+/g,">"),h=function(t,e,n){var r=i.createElement("div");r.innerHTML=c,this.element=r.firstChild,this.$init(),this.setEditor(t)};(function(){this.setEditor=function(t){t.searchBox=this,t.container.appendChild(this.element),this.editor=t},this.$initElements=function(t){this.searchBox=t.querySelector(".ace_search_form"),this.replaceBox=t.querySelector(".ace_replace_form"),this.searchOptions=t.querySelector(".ace_search_options"),this.regExpOption=t.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=t.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=t.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var t=this.element;this.$initElements(t);var e=this;o.addListener(t,"mousedown",function(t){setTimeout(function(){e.activeInput.focus()},0),o.stopPropagation(t)}),o.addListener(t,"click",function(t){var n=t.target||t.srcElement,i=n.getAttribute("action");i&&e[i]?e[i]():e.$searchBarKb.commands[i]&&e.$searchBarKb.commands[i].exec(e),o.stopPropagation(t)}),o.addCommandKeyListener(t,function(t,n,i){var r=l.keyCodeToString(i),s=e.$searchBarKb.findKeyCommand(n,r);s&&s.exec&&(s.exec(e),o.stopEvent(t))}),this.$onChange=r.delayedCall(function(){e.find(!1,!1)}),o.addListener(this.searchInput,"input",function(){e.$onChange.schedule(20)}),o.addListener(this.searchInput,"focus",function(){e.activeInput=e.searchInput,e.searchInput.value&&e.highlight()}),o.addListener(this.replaceInput,"focus",function(){e.activeInput=e.replaceInput,e.searchInput.value&&e.highlight()})},this.$closeSearchBarKb=new a([{bindKey:"Esc",name:"closeSearchBar",exec:function(t){t.searchBox.hide()}}]),this.$searchBarKb=new a,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(t){var e=t.isReplace=!t.isReplace;t.replaceBox.style.display=e?"":"none",t[e?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(t){t.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(t){t.findPrev()},esc:function(t){setTimeout(function(){t.hide()})},Return:function(t){t.activeInput==t.replaceInput&&t.replace(),t.findNext()},"Shift-Return":function(t){t.activeInput==t.replaceInput&&t.replace(),t.findPrev()},Tab:function(t){(t.activeInput==t.replaceInput?t.searchInput:t.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(t){t.regExpOption.checked=!t.regExpOption.checked,t.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(t){t.caseSensitiveOption.checked=!t.caseSensitiveOption.checked,t.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(t){t.wholeWordOption.checked=!t.wholeWordOption.checked,t.$syncOptions()}}]),this.$syncOptions=function(){i.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),i.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),i.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(t){this.editor.session.highlight(t||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(t,e){var n=this.editor.find(this.searchInput.value,{skipCurrent:t,backwards:e,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),r=!n&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",r),this.editor._emit("findSearchBox",{match:!r}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(t,e){this.element.style.display="",this.replaceBox.style.display=e?"":"none",this.isReplace=e,t&&(this.searchInput.value=t),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)}}).call(h.prototype),e.SearchBox=h,e.Search=function(t,e){var n=t.searchBox||new h(t);n.show(t.session.getTextRange(),e)}}),function(){function t(t){function e(e,n,i,r,o,s){for(;o>=0&&s>o;o+=t){var a=r?r[o]:o;i=n(i,e[a],a,e)}return i}return function(n,i,r,o){i=w(i,o,4);var s=!F(n)&&y.keys(n),a=(s||n).length,l=t>0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function e(t){return function(e,n,i){n=b(n,i);for(var r=k(e),o=t>0?0:r-1;o>=0&&r>o;o+=t)if(n(e[o],o,e))return o;return-1}}function n(t,e,n){return function(i,r,o){var s=0,a=k(i);if("number"==typeof o)t>0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(h.call(i,s,a),y.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&a>o;o+=t)if(i[o]===r)return o;return-1}}function i(t,e){var n=T.length,i=t.constructor,r=y.isFunction(i)&&i.prototype||a,o="constructor";for(y.has(t,o)&&!y.contains(e,o)&&e.push(o);n--;)o=T[n],o in t&&t[o]!==r[o]&&!y.contains(e,o)&&e.push(o)}var r=this,o=r._,s=Array.prototype,a=Object.prototype,l=Function.prototype,c=s.push,h=s.slice,u=a.toString,d=a.hasOwnProperty,f=Array.isArray,p=Object.keys,g=l.bind,m=Object.create,v=function(){},y=function(t){return t instanceof y?t:this instanceof y?void(this._wrapped=t):new y(t)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=y),exports._=y):r._=y,y.VERSION="1.8.3";var w=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)};case 4:return function(n,i,r,o){return t.call(e,n,i,r,o)}}return function(){return t.apply(e,arguments)}},b=function(t,e,n){return null==t?y.identity:y.isFunction(t)?w(t,e,n):y.isObject(t)?y.matcher(t):y.property(t)};y.iteratee=function(t,e){return b(t,e,1/0)};var x=function(t,e){return function(n){var i=arguments.length;if(2>i||null==n)return n;for(var r=1;i>r;r++)for(var o=arguments[r],s=t(o),a=s.length,l=0;a>l;l++){var c=s[l];e&&void 0!==n[c]||(n[c]=o[c])}return n}},C=function(t){if(!y.isObject(t))return{};if(m)return m(t);v.prototype=t;var e=new v;return v.prototype=null,e},A=function(t){return function(e){return null==e?void 0:e[t]}},E=Math.pow(2,53)-1,k=A("length"),F=function(t){var e=k(t);return"number"==typeof e&&e>=0&&E>=e};y.each=y.forEach=function(t,e,n){e=w(e,n);var i,r;if(F(t))for(i=0,r=t.length;r>i;i++)e(t[i],i,t);else{var o=y.keys(t);for(i=0,r=o.length;r>i;i++)e(t[o[i]],o[i],t)}return t},y.map=y.collect=function(t,e,n){e=b(e,n);for(var i=!F(t)&&y.keys(t),r=(i||t).length,o=Array(r),s=0;r>s;s++){var a=i?i[s]:s;o[s]=e(t[a],a,t)}return o},y.reduce=y.foldl=y.inject=t(1),y.reduceRight=y.foldr=t(-1),y.find=y.detect=function(t,e,n){var i;return i=F(t)?y.findIndex(t,e,n):y.findKey(t,e,n),void 0!==i&&-1!==i?t[i]:void 0},y.filter=y.select=function(t,e,n){var i=[];return e=b(e,n),y.each(t,function(t,n,r){e(t,n,r)&&i.push(t)}),i},y.reject=function(t,e,n){return y.filter(t,y.negate(b(e)),n)},y.every=y.all=function(t,e,n){e=b(e,n);for(var i=!F(t)&&y.keys(t),r=(i||t).length,o=0;r>o;o++){var s=i?i[o]:o;if(!e(t[s],s,t))return!1}return!0},y.some=y.any=function(t,e,n){e=b(e,n);for(var i=!F(t)&&y.keys(t),r=(i||t).length,o=0;r>o;o++){var s=i?i[o]:o;if(e(t[s],s,t))return!0}return!1},y.contains=y.includes=y.include=function(t,e,n,i){return F(t)||(t=y.values(t)),("number"!=typeof n||i)&&(n=0),y.indexOf(t,e,n)>=0},y.invoke=function(t,e){var n=h.call(arguments,2),i=y.isFunction(e);return y.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},y.pluck=function(t,e){return y.map(t,y.property(e))},y.where=function(t,e){return y.filter(t,y.matcher(e))},y.findWhere=function(t,e){return y.find(t,y.matcher(e))},y.max=function(t,e,n){var i,r,o=-(1/0),s=-(1/0);if(null==e&&null!=t){t=F(t)?t:y.values(t);for(var a=0,l=t.length;l>a;a++)i=t[a],i>o&&(o=i)}else e=b(e,n),y.each(t,function(t,n,i){r=e(t,n,i),(r>s||r===-(1/0)&&o===-(1/0))&&(o=t,s=r)});return o},y.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=F(t)?t:y.values(t);for(var a=0,l=t.length;l>a;a++)i=t[a],o>i&&(o=i)}else e=b(e,n),y.each(t,function(t,n,i){r=e(t,n,i),(s>r||r===1/0&&o===1/0)&&(o=t,s=r)});return o},y.shuffle=function(t){for(var e,n=F(t)?t:y.values(t),i=n.length,r=Array(i),o=0;i>o;o++)e=y.random(0,o),e!==o&&(r[o]=r[e]),r[e]=n[o];return r},y.sample=function(t,e,n){return null==e||n?(F(t)||(t=y.values(t)),t[y.random(t.length-1)]):y.shuffle(t).slice(0,Math.max(0,e))},y.sortBy=function(t,e,n){return e=b(e,n),y.pluck(y.map(t,function(t,n,i){return{value:t,index:n,criteria:e(t,n,i)}}).sort(function(t,e){var n=t.criteria,i=e.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(i>n||void 0===i)return-1}return t.index-e.index}),"value")};var _=function(t){return function(e,n,i){var r={};return n=b(n,i),y.each(e,function(i,o){var s=n(i,o,e);t(r,i,s)}),r}};y.groupBy=_(function(t,e,n){y.has(t,n)?t[n].push(e):t[n]=[e]}),y.indexBy=_(function(t,e,n){t[n]=e}),y.countBy=_(function(t,e,n){y.has(t,n)?t[n]++:t[n]=1}),y.toArray=function(t){return t?y.isArray(t)?h.call(t):F(t)?y.map(t,y.identity):y.values(t):[]},y.size=function(t){return null==t?0:F(t)?t.length:y.keys(t).length},y.partition=function(t,e,n){e=b(e,n);var i=[],r=[];return y.each(t,function(t,n,o){(e(t,n,o)?i:r).push(t)}),[i,r]},y.first=y.head=y.take=function(t,e,n){return null==t?void 0:null==e||n?t[0]:y.initial(t,t.length-e)},y.initial=function(t,e,n){return h.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},y.last=function(t,e,n){return null==t?void 0:null==e||n?t[t.length-1]:y.rest(t,Math.max(0,t.length-e))},y.rest=y.tail=y.drop=function(t,e,n){return h.call(t,null==e||n?1:e)},y.compact=function(t){return y.filter(t,y.identity)};var D=function(t,e,n,i){for(var r=[],o=0,s=i||0,a=k(t);a>s;s++){var l=t[s];if(F(l)&&(y.isArray(l)||y.isArguments(l))){e||(l=D(l,e,n));var c=0,h=l.length;for(r.length+=h;h>c;)r[o++]=l[c++]}else n||(r[o++]=l)}return r};y.flatten=function(t,e){return D(t,e,!1)},y.without=function(t){return y.difference(t,h.call(arguments,1))},y.uniq=y.unique=function(t,e,n,i){y.isBoolean(e)||(i=n,n=e,e=!1),null!=n&&(n=b(n,i));for(var r=[],o=[],s=0,a=k(t);a>s;s++){var l=t[s],c=n?n(l,s,t):l;e?(s&&o===c||r.push(l),o=c):n?y.contains(o,c)||(o.push(c),r.push(l)):y.contains(r,l)||r.push(l)}return r},y.union=function(){return y.uniq(D(arguments,!0,!0))},y.intersection=function(t){for(var e=[],n=arguments.length,i=0,r=k(t);r>i;i++){var o=t[i];if(!y.contains(e,o)){for(var s=1;n>s&&y.contains(arguments[s],o);s++);s===n&&e.push(o)}}return e},y.difference=function(t){var e=D(arguments,!0,!0,1);return y.filter(t,function(t){return!y.contains(e,t)})},y.zip=function(){return y.unzip(arguments)},y.unzip=function(t){for(var e=t&&y.max(t,k).length||0,n=Array(e),i=0;e>i;i++)n[i]=y.pluck(t,i);return n},y.object=function(t,e){for(var n={},i=0,r=k(t);r>i;i++)e?n[t[i]]=e[i]:n[t[i][0]]=t[i][1];return n},y.findIndex=e(1),y.findLastIndex=e(-1),y.sortedIndex=function(t,e,n,i){n=b(n,i,1);for(var r=n(e),o=0,s=k(t);s>o;){var a=Math.floor((o+s)/2);n(t[a])<r?o=a+1:s=a}return o},y.indexOf=n(1,y.findIndex,y.sortedIndex),y.lastIndexOf=n(-1,y.findLastIndex),y.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var i=Math.max(Math.ceil((e-t)/n),0),r=Array(i),o=0;i>o;o++,t+=n)r[o]=t;return r};var S=function(t,e,n,i,r){if(!(i instanceof e))return t.apply(n,r);var o=C(t.prototype),s=t.apply(o,r);return y.isObject(s)?s:o};y.bind=function(t,e){if(g&&t.bind===g)return g.apply(t,h.call(arguments,1));if(!y.isFunction(t))throw new TypeError("Bind must be called on a function");var n=h.call(arguments,2),i=function(){return S(t,i,e,this,n.concat(h.call(arguments)))};return i},y.partial=function(t){var e=h.call(arguments,1),n=function(){for(var i=0,r=e.length,o=Array(r),s=0;r>s;s++)o[s]=e[s]===y?arguments[i++]:e[s];for(;i<arguments.length;)o.push(arguments[i++]);return S(t,n,this,this,o)};return n},y.bindAll=function(t){var e,n,i=arguments.length;if(1>=i)throw new Error("bindAll must be passed function names");for(e=1;i>e;e++)n=arguments[e],t[n]=y.bind(t[n],t);return t},y.memoize=function(t,e){var n=function(i){var r=n.cache,o=""+(e?e.apply(this,arguments):i);return y.has(r,o)||(r[o]=t.apply(this,arguments)),r[o]};return n.cache={},n},y.delay=function(t,e){var n=h.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},y.defer=y.partial(y.delay,y,1),y.throttle=function(t,e,n){var i,r,o,s=null,a=0;n||(n={});var l=function(){a=n.leading===!1?0:y.now(),s=null,o=t.apply(i,r),s||(i=r=null)};return function(){var c=y.now();a||n.leading!==!1||(a=c);var h=e-(c-a);return i=this,r=arguments,0>=h||h>e?(s&&(clearTimeout(s),s=null),a=c,o=t.apply(i,r),s||(i=r=null)):s||n.trailing===!1||(s=setTimeout(l,h)),o}},y.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=y.now()-s;e>c&&c>=0?i=setTimeout(l,e-c):(i=null,n||(a=t.apply(o,r),i||(o=r=null)))};return function(){o=this,r=arguments,s=y.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},y.wrap=function(t,e){return y.partial(e,t)},y.negate=function(t){return function(){return!t.apply(this,arguments)}},y.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},y.after=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}},y.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),1>=t&&(e=null),n}},y.once=y.partial(y.before,2);var $=!{toString:null}.propertyIsEnumerable("toString"),T=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];y.keys=function(t){if(!y.isObject(t))return[];if(p)return p(t);var e=[];for(var n in t)y.has(t,n)&&e.push(n);return $&&i(t,e),e},y.allKeys=function(t){if(!y.isObject(t))return[];var e=[];for(var n in t)e.push(n);return $&&i(t,e),e},y.values=function(t){for(var e=y.keys(t),n=e.length,i=Array(n),r=0;n>r;r++)i[r]=t[e[r]];return i},y.mapObject=function(t,e,n){e=b(e,n);for(var i,r=y.keys(t),o=r.length,s={},a=0;o>a;a++)i=r[a],s[i]=e(t[i],i,t);return s},y.pairs=function(t){for(var e=y.keys(t),n=e.length,i=Array(n),r=0;n>r;r++)i[r]=[e[r],t[e[r]]];return i},y.invert=function(t){for(var e={},n=y.keys(t),i=0,r=n.length;r>i;i++)e[t[n[i]]]=n[i];return e},y.functions=y.methods=function(t){var e=[];for(var n in t)y.isFunction(t[n])&&e.push(n);return e.sort()},y.extend=x(y.allKeys),y.extendOwn=y.assign=x(y.keys),y.findKey=function(t,e,n){e=b(e,n);for(var i,r=y.keys(t),o=0,s=r.length;s>o;o++)if(i=r[o],e(t[i],i,t))return i},y.pick=function(t,e,n){var i,r,o={},s=t;if(null==s)return o;y.isFunction(e)?(r=y.allKeys(s),i=w(e,n)):(r=D(arguments,!1,!1,1),i=function(t,e,n){return e in n},s=Object(s));for(var a=0,l=r.length;l>a;a++){var c=r[a],h=s[c];i(h,c,s)&&(o[c]=h)}return o},y.omit=function(t,e,n){if(y.isFunction(e))e=y.negate(e);else{var i=y.map(D(arguments,!1,!1,1),String);e=function(t,e){return!y.contains(i,e)}}return y.pick(t,e,n)},y.defaults=x(y.allKeys,!0),y.create=function(t,e){var n=C(t);return e&&y.extendOwn(n,e),n},y.clone=function(t){return y.isObject(t)?y.isArray(t)?t.slice():y.extend({},t):t},y.tap=function(t,e){return e(t),t},y.isMatch=function(t,e){var n=y.keys(e),i=n.length;if(null==t)return!i;for(var r=Object(t),o=0;i>o;o++){var s=n[o];if(e[s]!==r[s]||!(s in r))return!1}return!0};var B=function(t,e,n,i){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;t instanceof y&&(t=t._wrapped),e instanceof y&&(e=e._wrapped);var r=u.call(t);if(r!==u.call(e))return!1;switch(r){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}var o="[object Array]"===r;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var s=t.constructor,a=e.constructor;if(s!==a&&!(y.isFunction(s)&&s instanceof s&&y.isFunction(a)&&a instanceof a)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],i=i||[];for(var l=n.length;l--;)if(n[l]===t)return i[l]===e;if(n.push(t),i.push(e),o){if(l=t.length,l!==e.length)return!1;for(;l--;)if(!B(t[l],e[l],n,i))return!1}else{var c,h=y.keys(t);if(l=h.length,y.keys(e).length!==l)return!1;for(;l--;)if(c=h[l],!y.has(e,c)||!B(t[c],e[c],n,i))return!1}return n.pop(),i.pop(),!0};y.isEqual=function(t,e){return B(t,e)},y.isEmpty=function(t){return null==t?!0:F(t)&&(y.isArray(t)||y.isString(t)||y.isArguments(t))?0===t.length:0===y.keys(t).length},y.isElement=function(t){return!(!t||1!==t.nodeType)},y.isArray=f||function(t){return"[object Array]"===u.call(t)},y.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},y.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){y["is"+t]=function(e){return u.call(e)==="[object "+t+"]"}}),y.isArguments(arguments)||(y.isArguments=function(t){return y.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(y.isFunction=function(t){return"function"==typeof t||!1}),y.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},y.isNaN=function(t){return y.isNumber(t)&&t!==+t},y.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===u.call(t)},y.isNull=function(t){return null===t},y.isUndefined=function(t){return void 0===t},y.has=function(t,e){return null!=t&&d.call(t,e)},y.noConflict=function(){return r._=o,this},y.identity=function(t){return t},y.constant=function(t){return function(){return t}},y.noop=function(){},y.property=A,y.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},y.matcher=y.matches=function(t){return t=y.extendOwn({},t),function(e){return y.isMatch(e,t)}},y.times=function(t,e,n){var i=Array(Math.max(0,t));e=w(e,n,1);for(var r=0;t>r;r++)i[r]=e(r);return i},y.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},y.now=Date.now||function(){return(new Date).getTime()};var M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},L=y.invert(M),R=function(t){var e=function(e){return t[e]},n="(?:"+y.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};y.escape=R(M),y.unescape=R(L),y.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),y.isFunction(i)?i.call(t):i};var I=0;y.uniqueId=function(t){var e=++I+"";return t?t+e:e},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var P=/(.)^/,N={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,j=function(t){return"\\"+N[t]};y.template=function(t,e,n){!e&&n&&(e=n),e=y.defaults({},e,y.templateSettings);var i=RegExp([(e.escape||P).source,(e.interpolate||P).source,(e.evaluate||P).source].join("|")+"|$","g"),r=0,o="__p+='";t.replace(i,function(e,n,i,s,a){return o+=t.slice(r,a).replace(O,j),r=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(a){throw a.source=o,a}var l=function(t){return s.call(this,t,y)},c=e.variable||"obj";return l.source="function("+c+"){\n"+o+"}",l},y.chain=function(t){var e=y(t);return e._chain=!0,e};var z=function(t,e){return t._chain?y(e).chain():e};y.mixin=function(t){y.each(y.functions(t),function(e){var n=y[e]=t[e];y.prototype[e]=function(){var t=[this._wrapped];return c.apply(t,arguments),z(this,n.apply(y,t))}})},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=s[t];y.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],z(this,n)}}),y.each(["concat","join","slice"],function(t){var e=s[t];y.prototype[t]=function(){return z(this,e.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return y})}.call(this),/*
 *
 * More info at [www.dropzonejs.com](http://www.dropzonejs.com)
 *
 * Copyright (c) 2012, Matias Meno
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 */
function(){var t,e,n,i,r,o,s,a,l=[].slice,c={}.hasOwnProperty,h=function(t,e){function n(){this.constructor=t}for(var i in e)c.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};s=function(){},e=function(){function t(){}return t.prototype.addEventListener=t.prototype.on,t.prototype.on=function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this},t.prototype.emit=function(){var t,e,n,i,r,o;if(i=arguments[0],t=2<=arguments.length?l.call(arguments,1):[],this._callbacks=this._callbacks||{},n=this._callbacks[i])for(r=0,o=n.length;o>r;r++)e=n[r],e.apply(this,t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.off=function(t,e){var n,i,r,o,s;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(i=this._callbacks[t],!i)return this;if(1===arguments.length)return delete this._callbacks[t],this;for(r=o=0,s=i.length;s>o;r=++o)if(n=i[r],n===e){i.splice(r,1);break}return this},t}(),t=function(t){function n(t,e){var r,o,s;if(this.element=t,this.version=n.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(n.instances.push(this),this.element.dropzone=this,r=null!=(s=n.optionsForElement(this.element))?s:{},this.options=i({},this.defaultOptions,r,null!=e?e:{}),this.options.forceFallback||!n.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(o=this.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),this.options.previewsContainer!==!1&&(this.options.previewsContainer?this.previewsContainer=n.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(this.options.clickable===!0?this.clickableElements=[this.element]:this.clickableElements=n.getElements(this.options.clickable,"clickable")),this.init()}var i,r;return h(n,t),n.prototype.Emitter=e,n.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],n.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(t,e){return e()},init:function(){return s},forceFallback:!1,fallback:function(){var t,e,i,r,o,s;for(this.element.className=""+this.element.className+" dz-browser-not-supported",s=this.element.getElementsByTagName("div"),r=0,o=s.length;o>r;r++)t=s[r],/(^| )dz-message($| )/.test(t.className)&&(e=t,t.className="dz-message");return e||(e=n.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e)),i=e.getElementsByTagName("span")[0],i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t){var e,n,i;return e={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},n=t.width/t.height,e.optWidth=this.options.thumbnailWidth,e.optHeight=this.options.thumbnailHeight,null==e.optWidth&&null==e.optHeight?(e.optWidth=e.srcWidth,e.optHeight=e.srcHeight):null==e.optWidth?e.optWidth=n*e.optHeight:null==e.optHeight&&(e.optHeight=1/n*e.optWidth),i=e.optWidth/e.optHeight,t.height<e.optHeight||t.width<e.optWidth?(e.trgHeight=e.srcHeight,e.trgWidth=e.srcWidth):n>i?(e.srcHeight=t.height,e.srcWidth=e.srcHeight*i):(e.srcWidth=t.width,e.srcHeight=e.srcWidth/i),e.srcX=(t.width-e.srcWidth)/2,e.srcY=(t.height-e.srcHeight)/2,e},drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:s,dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:s,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var e,i,r,o,s,a,l,c,h,u,d,f,p;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(t.previewElement=n.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),u=t.previewElement.querySelectorAll("[data-dz-name]"),o=0,l=u.length;l>o;o++)e=u[o],e.textContent=t.name;for(d=t.previewElement.querySelectorAll("[data-dz-size]"),s=0,c=d.length;c>s;s++)e=d[s],e.innerHTML=this.filesize(t.size);for(this.options.addRemoveLinks&&(t._removeLink=n.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),t.previewElement.appendChild(t._removeLink)),i=function(e){return function(i){return i.preventDefault(),i.stopPropagation(),t.status===n.UPLOADING?n.confirm(e.options.dictCancelUploadConfirmation,function(){return e.removeFile(t)}):e.options.dictRemoveFileConfirmation?n.confirm(e.options.dictRemoveFileConfirmation,function(){return e.removeFile(t)}):e.removeFile(t)}}(this),f=t.previewElement.querySelectorAll("[data-dz-remove]"),p=[],a=0,h=f.length;h>a;a++)r=f[a],p.push(r.addEventListener("click",i));return p}},removedfile:function(t){var e;return t.previewElement&&null!=(e=t.previewElement)&&e.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){var n,i,r,o;if(t.previewElement){for(t.previewElement.classList.remove("dz-file-preview"),o=t.previewElement.querySelectorAll("[data-dz-thumbnail]"),i=0,r=o.length;r>i;i++)n=o[i],n.alt=t.name,n.src=e;return setTimeout(function(e){return function(){return t.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(t,e){var n,i,r,o,s;if(t.previewElement){for(t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error),o=t.previewElement.querySelectorAll("[data-dz-errormessage]"),s=[],i=0,r=o.length;r>i;i++)n=o[i],s.push(n.textContent=e);return s}},errormultiple:s,processing:function(t){return t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink)?t._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:s,uploadprogress:function(t,e,n){var i,r,o,s,a;if(t.previewElement){for(s=t.previewElement.querySelectorAll("[data-dz-uploadprogress]"),a=[],r=0,o=s.length;o>r;r++)i=s[r],"PROGRESS"===i.nodeName?a.push(i.value=e):a.push(i.style.width=""+e+"%");return a}},totaluploadprogress:s,sending:s,sendingmultiple:s,success:function(t){return t.previewElement?t.previewElement.classList.add("dz-success"):void 0},successmultiple:s,canceled:function(t){return this.emit("error",t,"Upload canceled.")},canceledmultiple:s,complete:function(t){return t._removeLink&&(t._removeLink.textContent=this.options.dictRemoveFile),t.previewElement?t.previewElement.classList.add("dz-complete"):void 0},completemultiple:s,maxfilesexceeded:s,maxfilesreached:s,queuecomplete:s,addedfiles:s,previewTemplate:'<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail /></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size></span></div>\n    <div class="dz-filename"><span data-dz-name></span></div>\n  </div>\n  <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n  <div class="dz-error-message"><span data-dz-errormessage></span></div>\n  <div class="dz-success-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Check</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>\n      </g>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Error</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n          <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" sketch:type="MSShapeGroup"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>'},i=function(){var t,e,n,i,r,o,s;for(i=arguments[0],n=2<=arguments.length?l.call(arguments,1):[],o=0,s=n.length;s>o;o++){e=n[o];for(t in e)r=e[t],i[t]=r}return i},n.prototype.getAcceptedFiles=function(){var t,e,n,i,r;for(i=this.files,r=[],e=0,n=i.length;n>e;e++)t=i[e],t.accepted&&r.push(t);return r},n.prototype.getRejectedFiles=function(){var t,e,n,i,r;for(i=this.files,r=[],e=0,n=i.length;n>e;e++)t=i[e],t.accepted||r.push(t);return r},n.prototype.getFilesWithStatus=function(t){var e,n,i,r,o;for(r=this.files,o=[],n=0,i=r.length;i>n;n++)e=r[n],e.status===t&&o.push(e);return o},n.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(n.QUEUED)},n.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(n.UPLOADING)},n.prototype.getAddedFiles=function(){return this.getFilesWithStatus(n.ADDED)},n.prototype.getActiveFiles=function(){var t,e,i,r,o;for(r=this.files,o=[],e=0,i=r.length;i>e;e++)t=r[e],(t.status===n.UPLOADING||t.status===n.QUEUED)&&o.push(t);return o},n.prototype.init=function(){var t,e,i,r,o,s,a;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(n.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length&&(i=function(t){return function(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null==t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!=t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!=t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",document.querySelector(t.options.hiddenInputContainer).appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var e,n,r,o;if(n=t.hiddenFileInput.files,n.length)for(r=0,o=n.length;o>r;r++)e=n[r],t.addFile(e);return t.emit("addedfiles",n),i()})}}(this))(),this.URL=null!=(s=window.URL)?s:window.webkitURL,a=this.events,r=0,o=a.length;o>r;r++)t=a[r],this.on(t,this.options[t]);return this.on("uploadprogress",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("canceled",function(t){return function(e){return t.emit("complete",e)}}(this)),this.on("complete",function(t){return function(e){return 0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length?setTimeout(function(){return t.emit("queuecomplete")},0):void 0}}(this)),e=function(t){return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(t){return function(e){return t.emit("dragstart",e)}}(this),dragenter:function(t){return function(n){return e(n),t.emit("dragenter",n)}}(this),dragover:function(t){return function(n){var i;try{i=n.dataTransfer.effectAllowed}catch(r){}return n.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",e(n),t.emit("dragover",n)}}(this),dragleave:function(t){return function(e){return t.emit("dragleave",e)}}(this),drop:function(t){return function(n){return e(n),t.drop(n)}}(this),dragend:function(t){return function(e){return t.emit("dragend",e)}}(this)}}],this.clickableElements.forEach(function(t){return function(e){return t.listeners.push({element:e,events:{click:function(i){return(e!==t.element||i.target===t.element||n.elementInside(i.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},n.prototype.destroy=function(){var t;return this.disable(),this.removeAllFiles(!0),(null!=(t=this.hiddenFileInput)?t.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,n.instances.splice(n.instances.indexOf(this),1)},n.prototype.updateTotalUploadProgress=function(){var t,e,n,i,r,o,s,a;if(i=0,n=0,t=this.getActiveFiles(),t.length){for(a=this.getActiveFiles(),o=0,s=a.length;s>o;o++)e=a[o],i+=e.upload.bytesSent,n+=e.upload.total;r=100*i/n}else r=100;return this.emit("totaluploadprogress",r,n,i)},n.prototype._getParamName=function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):""+this.options.paramName+(this.options.uploadMultiple?"["+t+"]":"")},n.prototype.getFallbackForm=function(){var t,e,i,r;return(t=this.getExistingFallback())?t:(i='<div class="dz-fallback">',this.options.dictFallbackText&&(i+="<p>"+this.options.dictFallbackText+"</p>"),i+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>',e=n.createElement(i),"FORM"!==this.element.tagName?(r=n.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>'),r.appendChild(e)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=r?r:e)},n.prototype.getExistingFallback=function(){var t,e,n,i,r,o;for(e=function(t){var e,n,i;for(n=0,i=t.length;i>n;n++)if(e=t[n],/(^| )fallback($| )/.test(e.className))return e},o=["div","form"],i=0,r=o.length;r>i;i++)if(n=o[i],t=e(this.element.getElementsByTagName(n)))return t},n.prototype.setupEventListeners=function(){var t,e,n,i,r,o,s;for(o=this.listeners,s=[],i=0,r=o.length;r>i;i++)t=o[i],s.push(function(){var i,r;i=t.events,r=[];for(e in i)n=i[e],r.push(t.element.addEventListener(e,n,!1));return r}());return s},n.prototype.removeEventListeners=function(){var t,e,n,i,r,o,s;for(o=this.listeners,s=[],i=0,r=o.length;r>i;i++)t=o[i],s.push(function(){var i,r;i=t.events,r=[];for(e in i)n=i[e],r.push(t.element.removeEventListener(e,n,!1));return r}());return s},n.prototype.disable=function(){var t,e,n,i,r;for(this.clickableElements.forEach(function(t){return t.classList.remove("dz-clickable")}),this.removeEventListeners(),i=this.files,r=[],e=0,n=i.length;n>e;e++)t=i[e],r.push(this.cancelUpload(t));return r},n.prototype.enable=function(){return this.clickableElements.forEach(function(t){return t.classList.add("dz-clickable")}),this.setupEventListeners()},n.prototype.filesize=function(t){var e,n,i,r,o,s,a,l;if(i=0,r="b",t>0){for(s=["TB","GB","MB","KB","b"],n=a=0,l=s.length;l>a;n=++a)if(o=s[n],e=Math.pow(this.options.filesizeBase,4-n)/10,t>=e){i=t/Math.pow(this.options.filesizeBase,4-n),r=o;break}i=Math.round(10*i)/10}return"<strong>"+i+"</strong> "+r},n.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},n.prototype.drop=function(t){var e,n;t.dataTransfer&&(this.emit("drop",t),e=t.dataTransfer.files,this.emit("addedfiles",e),e.length&&(n=t.dataTransfer.items,n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(e)))},n.prototype.paste=function(t){var e,n;if(null!=(null!=t&&null!=(n=t.clipboardData)?n.items:void 0))return this.emit("paste",t),e=t.clipboardData.items,e.length?this._addFilesFromItems(e):void 0},n.prototype.handleFiles=function(t){var e,n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(this.addFile(e));return r},n.prototype._addFilesFromItems=function(t){var e,n,i,r,o;for(o=[],i=0,r=t.length;r>i;i++)n=t[i],null!=n.webkitGetAsEntry&&(e=n.webkitGetAsEntry())?e.isFile?o.push(this.addFile(n.getAsFile())):e.isDirectory?o.push(this._addFilesFromDirectory(e,e.name)):o.push(void 0):null!=n.getAsFile&&(null==n.kind||"file"===n.kind)?o.push(this.addFile(n.getAsFile())):o.push(void 0);return o},n.prototype._addFilesFromDirectory=function(t,e){var n,i;return n=t.createReader(),i=function(t){return function(n){var i,r,o;for(r=0,o=n.length;o>r;r++)i=n[r],i.isFile?i.file(function(n){return t.options.ignoreHiddenFiles&&"."===n.name.substring(0,1)?void 0:(n.fullPath=""+e+"/"+n.name,t.addFile(n))}):i.isDirectory&&t._addFilesFromDirectory(i,""+e+"/"+i.name)}}(this),n.readEntries(i,function(t){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(t):void 0})},n.prototype.accept=function(t,e){return t.size>1024*this.options.maxFilesize*1024?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)},n.prototype.addFile=function(t){return t.upload={progress:0,total:t.size,bytesSent:0},this.files.push(t),t.status=n.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){return function(n){return n?(t.accepted=!1,e._errorProcessing([t],n)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}}(this))},n.prototype.enqueueFiles=function(t){var e,n,i;for(n=0,i=t.length;i>n;n++)e=t[n],this.enqueueFile(e);return null},n.prototype.enqueueFile=function(t){if(t.status!==n.ADDED||t.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return t.status=n.QUEUED,this.options.autoProcessQueue?setTimeout(function(t){return function(){return t.processQueue()}}(this),0):void 0},n.prototype._thumbnailQueue=[],n.prototype._processingThumbnail=!1,n.prototype._enqueueThumbnail=function(t){return this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(t),setTimeout(function(t){return function(){return t._processThumbnailQueue()}}(this),0)):void 0},n.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(t){return function(){return t._processingThumbnail=!1,t._processThumbnailQueue()}}(this)))},n.prototype.removeFile=function(t){return t.status===n.UPLOADING&&this.cancelUpload(t),this.files=a(this.files,t),this.emit("removedfile",t),0===this.files.length?this.emit("reset"):void 0},n.prototype.removeAllFiles=function(t){var e,i,r,o;for(null==t&&(t=!1),o=this.files.slice(),i=0,r=o.length;r>i;i++)e=o[i],(e.status!==n.UPLOADING||t)&&this.removeFile(e);return null},n.prototype.createThumbnail=function(t,e){var n;return n=new FileReader,n.onload=function(i){return function(){return"image/svg+xml"===t.type?(i.emit("thumbnail",t,n.result),void(null!=e&&e())):i.createThumbnailFromUrl(t,n.result,e)}}(this),n.readAsDataURL(t)},n.prototype.createThumbnailFromUrl=function(t,e,n,i){var r;return r=document.createElement("img"),i&&(r.crossOrigin=i),r.onload=function(e){return function(){var i,s,a,l,c,h,u,d;return t.width=r.width,t.height=r.height,a=e.options.resize.call(e,t),null==a.trgWidth&&(a.trgWidth=a.optWidth),null==a.trgHeight&&(a.trgHeight=a.optHeight),i=document.createElement("canvas"),s=i.getContext("2d"),i.width=a.trgWidth,i.height=a.trgHeight,o(s,r,null!=(c=a.srcX)?c:0,null!=(h=a.srcY)?h:0,a.srcWidth,a.srcHeight,null!=(u=a.trgX)?u:0,null!=(d=a.trgY)?d:0,a.trgWidth,a.trgHeight),l=i.toDataURL("image/png"),e.emit("thumbnail",t,l),null!=n?n():void 0}}(this),null!=n&&(r.onerror=n),r.src=e},n.prototype.processQueue=function(){var t,e,n,i;if(e=this.options.parallelUploads,n=this.getUploadingFiles().length,t=n,!(n>=e)&&(i=this.getQueuedFiles(),i.length>0)){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,e-n));for(;e>t;){if(!i.length)return;this.processFile(i.shift()),t++}}},n.prototype.processFile=function(t){return this.processFiles([t])},n.prototype.processFiles=function(t){var e,i,r;for(i=0,r=t.length;r>i;i++)e=t[i],e.processing=!0,e.status=n.UPLOADING,this.emit("processing",e);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)},n.prototype._getFilesWithXhr=function(t){var e,n;return n=function(){var n,i,r,o;for(r=this.files,o=[],n=0,i=r.length;i>n;n++)e=r[n],e.xhr===t&&o.push(e);return o}.call(this)},n.prototype.cancelUpload=function(t){var e,i,r,o,s,a,l;if(t.status===n.UPLOADING){for(i=this._getFilesWithXhr(t.xhr),r=0,s=i.length;s>r;r++)e=i[r],e.status=n.CANCELED;for(t.xhr.abort(),o=0,a=i.length;a>o;o++)e=i[o],this.emit("canceled",e);this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else((l=t.status)===n.ADDED||l===n.QUEUED)&&(t.status=n.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));return this.options.autoProcessQueue?this.processQueue():void 0},r=function(){var t,e;return e=arguments[0],t=2<=arguments.length?l.call(arguments,1):[],"function"==typeof e?e.apply(this,t):e},n.prototype.uploadFile=function(t){return this.uploadFiles([t])},n.prototype.uploadFiles=function(t){var e,o,s,a,l,c,h,u,d,f,p,g,m,v,y,w,b,x,C,A,E,k,F,_,D,S,$,T,B,M,L,R,I,P;for(C=new XMLHttpRequest,A=0,_=t.length;_>A;A++)e=t[A],e.xhr=C;g=r(this.options.method,t),b=r(this.options.url,t),C.open(g,b,!0),C.withCredentials=!!this.options.withCredentials,y=null,s=function(n){return function(){var i,r,o;for(o=[],i=0,r=t.length;r>i;i++)e=t[i],o.push(n._errorProcessing(t,y||n.options.dictResponseError.replace("{{statusCode}}",C.status),C));return o}}(this),w=function(n){return function(i){var r,o,s,a,l,c,h,u,d;if(null!=i)for(o=100*i.loaded/i.total,s=0,c=t.length;c>s;s++)e=t[s],e.upload={progress:o,total:i.total,bytesSent:i.loaded};else{for(r=!0,o=100,a=0,h=t.length;h>a;a++)e=t[a],(100!==e.upload.progress||e.upload.bytesSent!==e.upload.total)&&(r=!1),e.upload.progress=o,e.upload.bytesSent=e.upload.total;if(r)return}for(d=[],l=0,u=t.length;u>l;l++)e=t[l],d.push(n.emit("uploadprogress",e,o,e.upload.bytesSent));return d}}(this),C.onload=function(e){return function(i){var r;if(t[0].status!==n.CANCELED&&4===C.readyState){if(y=C.responseText,C.getResponseHeader("content-type")&&~C.getResponseHeader("content-type").indexOf("application/json"))try{y=JSON.parse(y)}catch(o){i=o,y="Invalid JSON response from server."}return w(),200<=(r=C.status)&&300>r?e._finished(t,y,i):s()}}}(this),C.onerror=function(e){return function(){return t[0].status!==n.CANCELED?s():void 0}}(this),v=null!=(B=C.upload)?B:C,v.onprogress=w,c={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&i(c,this.options.headers);for(a in c)l=c[a],l&&C.setRequestHeader(a,l);if(o=new FormData,this.options.params){M=this.options.params;for(p in M)x=M[p],o.append(p,x)}for(E=0,D=t.length;D>E;E++)e=t[E],this.emit("sending",e,C,o);if(this.options.uploadMultiple&&this.emit("sendingmultiple",t,C,o),"FORM"===this.element.tagName)for(L=this.element.querySelectorAll("input, textarea, select, button"),k=0,S=L.length;S>k;k++)if(u=L[k],d=u.getAttribute("name"),f=u.getAttribute("type"),"SELECT"===u.tagName&&u.hasAttribute("multiple"))for(R=u.options,F=0,$=R.length;$>F;F++)m=R[F],m.selected&&o.append(d,m.value);else(!f||"checkbox"!==(I=f.toLowerCase())&&"radio"!==I||u.checked)&&o.append(d,u.value);for(h=T=0,P=t.length-1;P>=0?P>=T:T>=P;h=P>=0?++T:--T)o.append(this._getParamName(h),t[h],t[h].name);return this.submitRequest(C,o,t)},n.prototype.submitRequest=function(t,e,n){return t.send(e)},n.prototype._finished=function(t,e,i){var r,o,s;for(o=0,s=t.length;s>o;o++)r=t[o],r.status=n.SUCCESS,this.emit("success",r,e,i),this.emit("complete",r);return this.options.uploadMultiple&&(this.emit("successmultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue?this.processQueue():void 0},n.prototype._errorProcessing=function(t,e,i){var r,o,s;for(o=0,s=t.length;s>o;o++)r=t[o],r.status=n.ERROR,this.emit("error",r,e,i),this.emit("complete",r);return this.options.uploadMultiple&&(this.emit("errormultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue?this.processQueue():void 0},n}(e),t.version="4.2.0",t.options={},t.optionsForElement=function(e){return e.getAttribute("id")?t.options[n(e.getAttribute("id"))]:void 0},t.instances=[],t.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},t.autoDiscover=!0,t.discover=function(){var e,n,i,r,o,s;for(document.querySelectorAll?i=document.querySelectorAll(".dropzone"):(i=[],e=function(t){var e,n,r,o;for(o=[],n=0,r=t.length;r>n;n++)e=t[n],/(^| )dropzone($| )/.test(e.className)?o.push(i.push(e)):o.push(void 0);return o},e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))),s=[],r=0,o=i.length;o>r;r++)n=i[r],t.optionsForElement(n)!==!1?s.push(new t(n)):s.push(void 0);return s},t.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],t.isBrowserSupported=function(){var e,n,i,r,o;if(e=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(o=t.blacklistedBrowsers,i=0,r=o.length;r>i;i++)n=o[i],n.test(navigator.userAgent)&&(e=!1);else e=!1;else e=!1;return e},a=function(t,e){var n,i,r,o;for(o=[],i=0,r=t.length;r>i;i++)n=t[i],n!==e&&o.push(n);return o},n=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})},t.createElement=function(t){var e;return e=document.createElement("div"),e.innerHTML=t,e.childNodes[0]},t.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},t.getElement=function(t,e){var n;if("string"==typeof t?n=document.querySelector(t):null!=t.nodeType&&(n=t),null==n)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},t.getElements=function(t,e){var n,i,r,o,s,a,l,c;if(t instanceof Array){r=[];try{for(o=0,a=t.length;a>o;o++)i=t[o],r.push(this.getElement(i,e))}catch(h){n=h,r=null}}else if("string"==typeof t)for(r=[],c=document.querySelectorAll(t),s=0,l=c.length;l>s;s++)i=c[s],r.push(i);else null!=t.nodeType&&(r=[t]);if(null==r||!r.length)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return r},t.confirm=function(t,e,n){return window.confirm(t)?e():null!=n?n():void 0},t.isValidFile=function(t,e){var n,i,r,o,s;if(!e)return!0;for(e=e.split(","),i=t.type,n=i.replace(/\/.*$/,""),o=0,s=e.length;s>o;o++)if(r=e[o],r=r.trim(),"."===r.charAt(0)){if(-1!==t.name.toLowerCase().indexOf(r.toLowerCase(),t.name.length-r.length))return!0}else if(/\/\*$/.test(r)){if(n===r.replace(/\/.*$/,""))return!0}else if(i===r)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each(function(){return new t(this,e)})}),"undefined"!=typeof module&&null!==module?module.exports=t:window.Dropzone=t,t.ADDED="added",t.QUEUED="queued",t.ACCEPTED=t.QUEUED,t.UPLOADING="uploading",t.PROCESSING=t.UPLOADING,t.CANCELED="canceled",t.ERROR="error",t.SUCCESS="success",r=function(t){var e,n,i,r,o,s,a,l,c,h;for(a=t.naturalWidth,s=t.naturalHeight,n=document.createElement("canvas"),n.width=1,n.height=s,i=n.getContext("2d"),i.drawImage(t,0,0),r=i.getImageData(0,0,1,s).data,h=0,o=s,l=s;l>h;)e=r[4*(l-1)+3],0===e?o=l:h=l,l=o+h>>1;return c=l/s,0===c?1:c},o=function(t,e,n,i,o,s,a,l,c,h){var u;return u=r(e),t.drawImage(e,n,i,o,s,a,l,c,h/u)},i=function(t,e){var n,i,r,o,s,a,l,c,h;if(r=!1,h=!0,i=t.document,c=i.documentElement,n=i.addEventListener?"addEventListener":"attachEvent",
l=i.addEventListener?"removeEventListener":"detachEvent",a=i.addEventListener?"":"on",o=function(n){return"readystatechange"!==n.type||"complete"===i.readyState?(("load"===n.type?t:i)[l](a+n.type,o,!1),!r&&(r=!0)?e.call(t,n.type||n):void 0):void 0},s=function(){var t;try{c.doScroll("left")}catch(e){return t=e,void setTimeout(s,50)}return o("poll")},"complete"!==i.readyState){if(i.createEventObject&&c.doScroll){try{h=!t.frameElement}catch(u){}h&&s()}return i[n](a+"DOMContentLoaded",o,!1),i[n](a+"readystatechange",o,!1),t[n](a+"load",o,!1)}},t._autoDiscoverFunction=function(){return t.autoDiscover?t.discover():void 0},i(window,t._autoDiscoverFunction)}.call(this),/**
 * Copyright 2013 Craig Campbell
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Mousetrap is a simple keyboard shortcut library for Javascript with
 * no external dependencies
 *
 * @version 1.4.6
 * @url craig.is/killing/mice
 */
function(t,e,n){function i(t,e,n){return t.addEventListener?void t.addEventListener(e,n,!1):void t.attachEvent("on"+e,n)}function r(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return k[t.which]?k[t.which]:F[t.which]?F[t.which]:String.fromCharCode(t.which).toLowerCase()}function o(t,e){return t.sort().join(",")===e.sort().join(",")}function s(t){t=t||{};var e,n=!1;for(e in T)t[e]?n=!0:T[e]=0;n||(L=!1)}function a(t,e,n,i,r,s){var a,l,c=[],h=n.type;if(!S[t])return[];for("keyup"==h&&p(t)&&(e=[t]),a=0;a<S[t].length;++a)if(l=S[t][a],(i||!l.seq||T[l.seq]==l.level)&&h==l.action&&("keypress"==h&&!n.metaKey&&!n.ctrlKey||o(e,l.modifiers))){var u=!i&&l.combo==r,d=i&&l.seq==i&&l.level==s;(u||d)&&S[t].splice(a,1),c.push(l)}return c}function l(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}function c(t){return t.preventDefault?void t.preventDefault():void(t.returnValue=!1)}function h(t){return t.stopPropagation?void t.stopPropagation():void(t.cancelBubble=!0)}function u(t,e,n,i){I.stopCallback(e,e.target||e.srcElement,n,i)||t(e,n)===!1&&(c(e),h(e))}function d(t,e,n){var i,r=a(t,e,n),o={},l=0,c=!1;for(i=0;i<r.length;++i)r[i].seq&&(l=Math.max(l,r[i].level));for(i=0;i<r.length;++i)if(r[i].seq){if(r[i].level!=l)continue;c=!0,o[r[i].seq]=1,u(r[i].callback,n,r[i].combo,r[i].seq)}else c||u(r[i].callback,n,r[i].combo);var h="keypress"==n.type&&M;n.type!=L||p(t)||h||s(o),M=c&&"keydown"==n.type}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var e=r(t);if(e)return"keyup"==t.type&&B===e?void(B=!1):void I.handleKey(e,l(t),t)}function p(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function g(){clearTimeout(E),E=setTimeout(s,1e3)}function m(){if(!A){A={};for(var t in k)t>95&&112>t||k.hasOwnProperty(t)&&(A[k[t]]=t)}return A}function v(t,e,n){return n||(n=m()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function y(t,e,n,i){function o(e){return function(){L=e,++T[t],g()}}function a(e){u(n,e,t),"keyup"!==i&&(B=r(e)),setTimeout(s,10)}T[t]=0;for(var l=0;l<e.length;++l){var c=l+1===e.length,h=c?a:o(i||b(e[l+1]).action);x(e[l],h,i,t,l)}}function w(t){return"+"===t?["+"]:t.split("+")}function b(t,e){var n,i,r,o=[];for(n=w(t),r=0;r<n.length;++r)i=n[r],D[i]&&(i=D[i]),e&&"keypress"!=e&&_[i]&&(i=_[i],o.push("shift")),p(i)&&o.push(i);return e=v(i,o,e),{key:i,modifiers:o,action:e}}function x(t,e,n,i,r){$[t+":"+n]=e,t=t.replace(/\s+/g," ");var o,s=t.split(" ");return s.length>1?void y(t,s,e,n):(o=b(t,n),S[o.key]=S[o.key]||[],a(o.key,o.modifiers,{type:o.action},i,t,r),void S[o.key][i?"unshift":"push"]({callback:e,modifiers:o.modifiers,action:o.action,seq:i,level:r,combo:t}))}function C(t,e,n){for(var i=0;i<t.length;++i)x(t[i],e,n)}for(var A,E,k={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},F={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},_={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},D={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},S={},$={},T={},B=!1,M=!1,L=!1,R=1;20>R;++R)k[111+R]="f"+R;for(R=0;9>=R;++R)k[R+96]=R;i(e,"keypress",f),i(e,"keydown",f),i(e,"keyup",f);var I={bind:function(t,e,n){return t=t instanceof Array?t:[t],C(t,e,n),this},unbind:function(t,e){return I.bind(t,function(){},e)},trigger:function(t,e){return $[t+":"+e]&&$[t+":"+e]({},t),this},reset:function(){return S={},$={},this},stopCallback:function(t,e){return(" "+e.className+" ").indexOf(" mousetrap ")>-1?!1:"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},handleKey:d};t.Mousetrap=I,"function"==typeof define&&define.amd&&define(I)}(window,document),Mousetrap=function(t){var e=t,n=e.stopCallback,i=!0;return e.stopCallback=function(t,e,r){return i?n(t,e,r):!0},e.pause=function(){i=!1},e.unpause=function(){i=!0},e}(Mousetrap),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.Shortcuts=function(){function e(){this.toggleMarkdownPreview=t(this.toggleMarkdownPreview,this),this.selectiveHelp=t(this.selectiveHelp,this),this.enabledHelp=[],Mousetrap.reset(),Mousetrap.bind("?",this.selectiveHelp),Mousetrap.bind("s",e.focusSearch),Mousetrap.bind(["ctrl+shift+p","command+shift+p"],this.toggleMarkdownPreview),"undefined"!=typeof findFileURL&&null!==findFileURL&&Mousetrap.bind("t",function(){return Turbolinks.visit(findFileURL)})}return e.prototype.selectiveHelp=function(t){return e.showHelp(t,this.enabledHelp)},e.prototype.toggleMarkdownPreview=function(t){return $(document).triggerHandler("markdown-preview:toggle",[t])},e.showHelp=function(t,e){var n;return $("#modal-shortcuts").length>0?$("#modal-shortcuts").modal("show"):(n="/help/shortcuts",null!=gon.relative_url_root&&(n=gon.relative_url_root+n),$.ajax({url:n,dataType:"script",success:function(t){var n,i,r,o;if(e&&e.length>0){for(o=[],n=0,r=e.length;r>n;n++)i=e[n],o.push($(i).show());return o}return $(".hidden-shortcut").show(),$(".js-more-help-button").remove()}}),t.preventDefault())},e.focusSearch=function(t){return $("#search").focus(),t.preventDefault()},e}(),$(document).on("click.more_help",".js-more-help-button",function(t){return $(this).remove(),$(".hidden-shortcut").show(),t.preventDefault()}),Mousetrap.stopCallback=function(){var t;return t=Mousetrap.stopCallback,function(e,n,i){return-1!==["ctrl+shift+p","command+shift+p"].indexOf(i)?!1:t.apply(this,arguments)}}()}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.ShortcutsNavigation=function(e){function n(){n.__super__.constructor.call(this),Mousetrap.bind("g p",function(){return n.findAndFollowLink(".shortcuts-project")}),Mousetrap.bind("g e",function(){return n.findAndFollowLink(".shortcuts-project-activity")}),Mousetrap.bind("g f",function(){return n.findAndFollowLink(".shortcuts-tree")}),Mousetrap.bind("g c",function(){return n.findAndFollowLink(".shortcuts-commits")}),Mousetrap.bind("g b",function(){return n.findAndFollowLink(".shortcuts-builds")}),Mousetrap.bind("g n",function(){return n.findAndFollowLink(".shortcuts-network")}),Mousetrap.bind("g g",function(){return n.findAndFollowLink(".shortcuts-graphs")}),Mousetrap.bind("g i",function(){return n.findAndFollowLink(".shortcuts-issues")}),Mousetrap.bind("g m",function(){return n.findAndFollowLink(".shortcuts-merge_requests")}),Mousetrap.bind("g w",function(){return n.findAndFollowLink(".shortcuts-wiki")}),Mousetrap.bind("g s",function(){return n.findAndFollowLink(".shortcuts-snippets")}),this.enabledHelp.push(".hidden-shortcut.project")}return t(n,e),n.findAndFollowLink=function(t){var e;return e=$(t).attr("href"),e?window.location=e:void 0},n}(Shortcuts)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.ShortcutsDashboardNavigation=function(e){function n(){n.__super__.constructor.call(this),Mousetrap.bind("g a",function(){return n.findAndFollowLink(".shortcuts-activity")}),Mousetrap.bind("g i",function(){return n.findAndFollowLink(".shortcuts-issues")}),Mousetrap.bind("g m",function(){return n.findAndFollowLink(".shortcuts-merge_requests")}),Mousetrap.bind("g p",function(){return n.findAndFollowLink(".shortcuts-projects")})}return t(n,e),n.findAndFollowLink=function(t){var e;return e=$(t).attr("href"),e?window.location=e:void 0},n}(Shortcuts)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.ShortcutsIssuable=function(e){function n(t){n.__super__.constructor.call(this),Mousetrap.bind("a",function(){return $(".block.assignee .edit-link").trigger("click"),!1}),Mousetrap.bind("m",function(){return $(".block.milestone .edit-link").trigger("click"),!1}),Mousetrap.bind("r",function(t){return function(){return t.replyWithSelectedText(),!1}}(this)),Mousetrap.bind("j",function(t){return function(){return t.prevIssue(),!1}}(this)),Mousetrap.bind("k",function(t){return function(){return t.nextIssue(),!1}}(this)),Mousetrap.bind("e",function(t){return function(){return t.editIssue(),!1}}(this)),t?this.enabledHelp.push(".hidden-shortcut.merge_requests"):this.enabledHelp.push(".hidden-shortcut.issues")}return t(n,e),n.prototype.prevIssue=function(){var t;return t=$(".prev-btn"),t.hasClass("disabled")?void 0:Turbolinks.visit(t.attr("href"))},n.prototype.nextIssue=function(){var t;return t=$(".next-btn"),t.hasClass("disabled")?void 0:Turbolinks.visit(t.attr("href"))},n.prototype.replyWithSelectedText=function(){var t,e,n,i;if(window.getSelection){if(n=window.getSelection().toString(),e=$(".js-main-target-form #note_note"),""===n.trim())return;return t=_.map(n.split("\n"),function(t){return""!==t.trim()?"> "+t+"\n":void 0}),i=""!==e.val().trim()&&"\n"||"",e.val(function(e,n){return n+i+t.join("")+"\n"}),e.trigger("input"),e.focus()}},n.prototype.editIssue=function(){var t;return t=$(".issuable-edit"),Turbolinks.visit(t.attr("href"))},n}(ShortcutsNavigation)}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.ShortcutsNetwork=function(e){function n(t){this.graph=t,n.__super__.constructor.call(this),Mousetrap.bind(["left","h"],this.graph.scrollLeft),Mousetrap.bind(["right","l"],this.graph.scrollRight),Mousetrap.bind(["up","k"],this.graph.scrollUp),Mousetrap.bind(["down","j"],this.graph.scrollDown),Mousetrap.bind(["shift+up","shift+k"],this.graph.scrollTop),Mousetrap.bind(["shift+down","shift+j"],this.graph.scrollBottom),this.enabledHelp.push(".hidden-shortcut.network")}return t(n,e),n}(ShortcutsNavigation)}.call(this),/* jquery.nicescroll
-- version 3.6.0
-- copyright 2014-11-21 InuYaksa*2014
-- licensed under the MIT
--
-- http://nicescroll.areaaperta.com/
-- https://github.com/inuyaksa/jquery.nicescroll
--
*/
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){"use strict";function e(){var t=document.getElementsByTagName("script"),e=t[t.length-1].src.split("?")[0];return e.split("/").length>0?e.split("/").slice(0,-1).join("/")+"/":""}function n(t,e,n){for(var i=0;i<e.length;i++)n(t,e[i])}var i=!1,r=!1,o=0,s=2e3,a=0,l=t,c=["webkit","ms","moz","o"],h=window.requestAnimationFrame||!1,u=window.cancelAnimationFrame||!1;if(!h)for(var d in c){var f=c[d];h||(h=window[f+"RequestAnimationFrame"]),u||(u=window[f+"CancelAnimationFrame"]||window[f+"CancelRequestAnimationFrame"])}var p=window.MutationObserver||window.WebKitMutationObserver||!1,g={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:e(),preventmultitouchscrolling:!0},m=!1,v=function(){function t(){var t=["-webkit-grab","-moz-grab","grab"];(o.ischrome&&!o.ischrome22||o.isie)&&(t=[]);for(var e=0;e<t.length;e++){var i=t[e];if(n.cursor=i,n.cursor==i)return i}return"url(//mail.google.com/mail/images/2/openhand.cur),n-resize"}if(m)return m;var e=document.createElement("DIV"),n=e.style,i=navigator.userAgent,r=navigator.platform,o={};o.haspointerlock="pointerLockElement"in document||"webkitPointerLockElement"in document||"mozPointerLockElement"in document,o.isopera="opera"in window,o.isopera12=o.isopera&&"getUserMedia"in navigator,o.isoperamini="[object OperaMini]"===Object.prototype.toString.call(window.operamini),o.isie="all"in document&&"attachEvent"in e&&!o.isopera,o.isieold=o.isie&&!("msInterpolationMode"in n),o.isie7=o.isie&&!o.isieold&&(!("documentMode"in document)||7==document.documentMode),o.isie8=o.isie&&"documentMode"in document&&8==document.documentMode,o.isie9=o.isie&&"performance"in window&&document.documentMode>=9,o.isie10=o.isie&&"performance"in window&&10==document.documentMode,o.isie11="msRequestFullscreen"in e&&document.documentMode>=11,o.isie9mobile=/iemobile.9/i.test(i),o.isie9mobile&&(o.isie9=!1),o.isie7mobile=!o.isie9mobile&&o.isie7&&/iemobile/i.test(i),o.ismozilla="MozAppearance"in n,o.iswebkit="WebkitAppearance"in n,o.ischrome="chrome"in window,o.ischrome22=o.ischrome&&o.haspointerlock,o.ischrome26=o.ischrome&&"transition"in n,o.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window,o.hasmstouch=window.MSPointerEvent||!1,o.hasw3ctouch=window.PointerEvent||!1,o.ismac=/^mac$/i.test(r),o.isios=o.cantouch&&/iphone|ipad|ipod/i.test(r),o.isios4=o.isios&&!("seal"in Object),o.isios7=o.isios&&"webkitHidden"in document,o.isandroid=/android/i.test(i),o.haseventlistener="addEventListener"in e,o.trstyle=!1,o.hastransform=!1,o.hastranslate3d=!1,o.transitionstyle=!1,o.hastransition=!1,o.transitionend=!1;var s,a=["transform","msTransform","webkitTransform","MozTransform","OTransform"];for(s=0;s<a.length;s++)if("undefined"!=typeof n[a[s]]){o.trstyle=a[s];break}o.hastransform=!!o.trstyle,o.hastransform&&(n[o.trstyle]="translate3d(1px,2px,3px)",o.hastranslate3d=/translate3d/.test(n[o.trstyle])),o.transitionstyle=!1,o.prefixstyle="",o.transitionend=!1,a=["transition","webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"];var l=["","-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],c=["transitionend","webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"];for(s=0;s<a.length;s++)if(a[s]in n){o.transitionstyle=a[s],o.prefixstyle=l[s],o.transitionend=c[s];break}return o.ischrome26&&(o.prefixstyle=l[1]),o.hastransition=o.transitionstyle,o.cursorgrabvalue=t(),o.hasmousecapture="setCapture"in e,o.hasMutationObserver=p!==!1,e=null,m=o,o},y=function(t,e){function n(){var t=y.doc.css(x.trstyle);return t&&"matrix"==t.substr(0,6)?t.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function c(){var t=y.win;if("zIndex"in t)return t.zIndex();for(;t.length>0;){if(9==t[0].nodeType)return!1;var e=t.css("zIndex");if(!isNaN(e)&&0!=e)return parseInt(e);t=t.parent()}return!1}function d(t,e,n){var i=t.css(e),r=parseFloat(i);if(isNaN(r)){r=k[i]||0;var o=3==r?n?y.win.outerHeight()-y.win.innerHeight():y.win.outerWidth()-y.win.innerWidth():1;return y.isie8&&r&&(r+=1),o?r:0}return r}function f(t,e,n,i){y._bind(t,e,function(i){var i=i?i:window.event,r={original:i,target:i.target||i.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==i.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return i.preventDefault?i.preventDefault():i.returnValue=!1,!1},stopImmediatePropagation:function(){i.stopImmediatePropagation?i.stopImmediatePropagation():i.cancelBubble=!0}};return"mousewheel"==e?(r.deltaY=-1/40*i.wheelDelta,i.wheelDeltaX&&(r.deltaX=-1/40*i.wheelDeltaX)):r.deltaY=i.detail,n.call(t,r)},i)}function m(t,e,n){var i,r;if(0==t.deltaMode?(i=-Math.floor(t.deltaX*(y.opt.mousescrollstep/54)),r=-Math.floor(t.deltaY*(y.opt.mousescrollstep/54))):1==t.deltaMode&&(i=-Math.floor(t.deltaX*y.opt.mousescrollstep),r=-Math.floor(t.deltaY*y.opt.mousescrollstep)),e&&y.opt.oneaxismousemode&&0==i&&r&&(i=r,r=0,n)){var o=0>i?y.getScrollLeft()>=y.page.maxw:y.getScrollLeft()<=0;o&&(r=i,i=0)}if(i&&(y.scrollmom&&y.scrollmom.stop(),y.lastdeltax+=i,y.debounced("mousewheelx",function(){var t=y.lastdeltax;y.lastdeltax=0,y.rail.drag||y.doScrollLeftBy(t)},15)),r){if(y.opt.nativeparentscrolling&&n&&!y.ispage&&!y.zoomactive)if(0>r){if(y.getScrollTop()>=y.page.maxh)return!0}else if(y.getScrollTop()<=0)return!0;y.scrollmom&&y.scrollmom.stop(),y.lastdeltay+=r,y.debounced("mousewheely",function(){var t=y.lastdeltay;y.lastdeltay=0,y.rail.drag||y.doScrollBy(t)},15)}return t.stopImmediatePropagation(),t.preventDefault()}var y=this;if(this.version="3.6.0",this.name="nicescroll",this.me=e,this.opt={doc:l("body"),win:!1},l.extend(this.opt,g),this.opt.snapbackspeed=80,t)for(var b in y.opt)"undefined"!=typeof t[b]&&(y.opt[b]=t[b]);this.doc=y.opt.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(y.opt.win?y.opt.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=y.opt.win!==!1,this.win=y.opt.win||(this.ispage?l(window):this.doc),this.docscroll=this.ispage&&!this.haswrapper?l(window):this.win,this.body=l("body"),this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=y.opt.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,this.isrtlmode="auto"==this.opt.rtlmode?"rtl"==(this.win[0]==window?this.body:this.win).css("direction"):this.opt.rtlmode===!0,this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1;do this.id="ascrail"+s++;while(document.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.visibility=!0,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=y.opt.overflowx,this.overflowy=y.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=v();var x=l.extend({},this.detected);this.canhwscroll=x.hastransform&&y.opt.hwacceleration,this.ishwscroll=this.canhwscroll&&y.haswrapper,this.hasreversehr=this.isrtlmode&&!x.iswebkit,this.istouchcapable=!1,!x.cantouch||x.isios||x.isandroid||!x.iswebkit&&!x.ismozilla||(this.istouchcapable=!0,x.cantouch=!1),y.opt.enablemouselockapi||(x.hasmousecapture=!1,x.haspointerlock=!1),this.debounced=function(t,e,n){var i=y.delaylist[t];y.delaylist[t]=e,i||setTimeout(function(){var e=y.delaylist[t];y.delaylist[t]=!1,e.call(y)},n)};var C=!1;this.synched=function(t,e){function n(){C||(h(function(){C=!1;for(var t in y.synclist){var e=y.synclist[t];e&&e.call(y),y.synclist[t]=!1}}),C=!0)}return y.synclist[t]=e,n(),t},this.unsynched=function(t){y.synclist[t]&&(y.synclist[t]=!1)},this.css=function(t,e){for(var n in e)y.saved.css.push([t,n,t.css(n)]),t.css(n,e[n])},this.scrollTop=function(t){return"undefined"==typeof t?y.getScrollTop():y.setScrollTop(t)},this.scrollLeft=function(t){return"undefined"==typeof t?y.getScrollLeft():y.setScrollLeft(t)};var A=function(t,e,n,i,r,o,s){this.st=t,this.ed=e,this.spd=n,this.p1=i||0,this.p2=r||1,this.p3=o||0,this.p4=s||1,this.ts=(new Date).getTime(),this.df=this.ed-this.st};if(A.prototype={B2:function(t){return 3*t*t*(1-t)},B3:function(t){return 3*t*(1-t)*(1-t)},B4:function(t){return(1-t)*(1-t)*(1-t)},getNow:function(){var t=(new Date).getTime(),e=1-(t-this.ts)/this.spd,n=this.B2(e)+this.B3(e)+this.B4(e);return 0>e?this.ed:this.st+Math.round(this.df*n)},update:function(t,e){return this.st=this.getNow(),this.ed=t,this.spd=e,this.ts=(new Date).getTime(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},x.hastranslate3d&&x.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(t){if(!t){var e=n();if(e)return 16==e.length?-e[13]:-e[5];if(y.timerscroll&&y.timerscroll.bz)return y.timerscroll.bz.getNow()}return y.doc.translate.y},this.getScrollLeft=function(t){if(!t){var e=n();if(e)return 16==e.length?-e[12]:-e[4];if(y.timerscroll&&y.timerscroll.bh)return y.timerscroll.bh.getNow()}return y.doc.translate.x},this.notifyScrollEvent=function(t){var e=document.createEvent("UIEvents");e.initUIEvent("scroll",!1,!0,window,1),e.niceevent=!0,t.dispatchEvent(e)};var E=this.isrtlmode?1:-1;x.hastranslate3d&&y.opt.enabletranslate3d?(this.setScrollTop=function(t,e){y.doc.translate.y=t,y.doc.translate.ty=-1*t+"px",y.doc.css(x.trstyle,"translate3d("+y.doc.translate.tx+","+y.doc.translate.ty+",0px)"),e||y.notifyScrollEvent(y.win[0])},this.setScrollLeft=function(t,e){y.doc.translate.x=t,y.doc.translate.tx=t*E+"px",y.doc.css(x.trstyle,"translate3d("+y.doc.translate.tx+","+y.doc.translate.ty+",0px)"),e||y.notifyScrollEvent(y.win[0])}):(this.setScrollTop=function(t,e){y.doc.translate.y=t,y.doc.translate.ty=-1*t+"px",y.doc.css(x.trstyle,"translate("+y.doc.translate.tx+","+y.doc.translate.ty+")"),e||y.notifyScrollEvent(y.win[0])},this.setScrollLeft=function(t,e){y.doc.translate.x=t,y.doc.translate.tx=t*E+"px",y.doc.css(x.trstyle,"translate("+y.doc.translate.tx+","+y.doc.translate.ty+")"),e||y.notifyScrollEvent(y.win[0])})}else this.getScrollTop=function(){return y.docscroll.scrollTop()},this.setScrollTop=function(t){return y.docscroll.scrollTop(t)},this.getScrollLeft=function(){return y.detected.ismozilla&&y.isrtlmode?Math.abs(y.docscroll.scrollLeft()):y.docscroll.scrollLeft()},this.setScrollLeft=function(t){return y.docscroll.scrollLeft(y.detected.ismozilla&&y.isrtlmode?-t:t)};this.getTarget=function(t){return t?t.target?t.target:t.srcElement?t.srcElement:!1:!1},this.hasParent=function(t,e){if(!t)return!1;for(var n=t.target||t.srcElement||t||!1;n&&n.id!=e;)n=n.parentNode||!1;return n!==!1};var k={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:window.pageYOffset||document.documentElement.scrollTop,left:window.pageXOffset||document.documentElement.scrollLeft}},this.getOffset=function(){if(y.isfixed){var t=y.win.offset(),e=y.getDocumentScrollOffset();return t.top-=e.top,t.left-=e.left,t}var n=y.win.offset();if(!y.viewport)return n;var i=y.viewport.offset();return{top:n.top-i.top,left:n.left-i.left}},this.updateScrollBar=function(t){if(y.ishwscroll)y.rail.css({height:y.win.innerHeight()-(y.opt.railpadding.top+y.opt.railpadding.bottom)}),y.railh&&y.railh.css({width:y.win.innerWidth()-(y.opt.railpadding.left+y.opt.railpadding.right)});else{var e=y.getOffset(),n={top:e.top,left:e.left-(y.opt.railpadding.left+y.opt.railpadding.right)};n.top+=d(y.win,"border-top-width",!0),n.left+=y.rail.align?y.win.outerWidth()-d(y.win,"border-right-width")-y.rail.width:d(y.win,"border-left-width");var i=y.opt.railoffset;if(i&&(i.top&&(n.top+=i.top),y.rail.align&&i.left&&(n.left+=i.left)),y.railslocked||y.rail.css({top:n.top,left:n.left,height:(t?t.h:y.win.innerHeight())-(y.opt.railpadding.top+y.opt.railpadding.bottom)}),y.zoom&&y.zoom.css({top:n.top+1,left:1==y.rail.align?n.left-20:n.left+y.rail.width+4}),y.railh&&!y.railslocked){var n={top:e.top,left:e.left},i=y.opt.railhoffset;i&&(i.top&&(n.top+=i.top),i.left&&(n.left+=i.left));var r=y.railh.align?n.top+d(y.win,"border-top-width",!0)+y.win.innerHeight()-y.railh.height:n.top+d(y.win,"border-top-width",!0),o=n.left+d(y.win,"border-left-width");y.railh.css({top:r-(y.opt.railpadding.top+y.opt.railpadding.bottom),left:o,width:y.railh.width})}}},this.doRailClick=function(t,e,n){var i,r,o,s;y.railslocked||(y.cancelEvent(t),e?(i=n?y.doScrollLeft:y.doScrollTop,o=n?(t.pageX-y.railh.offset().left-y.cursorwidth/2)*y.scrollratio.x:(t.pageY-y.rail.offset().top-y.cursorheight/2)*y.scrollratio.y,i(o)):(i=n?y.doScrollLeftBy:y.doScrollBy,o=n?y.scroll.x:y.scroll.y,s=n?t.pageX-y.railh.offset().left:t.pageY-y.rail.offset().top,r=n?y.view.w:y.view.h,i(o>=s?r:-r)))},y.hasanimationframe=h,y.hascancelanimationframe=u,y.hasanimationframe?y.hascancelanimationframe||(u=function(){y.cancelAnimationFrame=!0}):(h=function(t){return setTimeout(t,15-Math.floor(+new Date/1e3)%16)},u=clearInterval),this.init=function(){if(y.saved.css=[],x.isie7mobile)return!0;if(x.isoperamini)return!0;if(x.hasmstouch&&y.css(y.ispage?l("html"):y.win,{"-ms-touch-action":"none"}),y.zindex="auto",y.ispage||"auto"!=y.opt.zindex?y.zindex=y.opt.zindex:y.zindex=c()||"auto",y.ispage||"auto"==y.zindex||y.zindex>a&&(a=y.zindex),y.isie&&0==y.zindex&&"auto"==y.opt.zindex&&(y.zindex="auto"),!y.ispage||!x.cantouch&&!x.isieold&&!x.isie9mobile){var t=y.docscroll;y.ispage&&(t=y.haswrapper?y.win:y.doc),x.isie9mobile||y.css(t,{"overflow-y":"hidden"}),y.ispage&&x.isie7&&("BODY"==y.doc[0].nodeName?y.css(l("html"),{"overflow-y":"hidden"}):"HTML"==y.doc[0].nodeName&&y.css(l("body"),{"overflow-y":"hidden"})),!x.isios||y.ispage||y.haswrapper||y.css(l("body"),{"-webkit-overflow-scrolling":"touch"});var e=l(document.createElement("div"));e.css({position:"relative",top:0,"float":"right",width:y.opt.cursorwidth,height:"0px","background-color":y.opt.cursorcolor,border:y.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":y.opt.cursorborderradius,"-moz-border-radius":y.opt.cursorborderradius,"border-radius":y.opt.cursorborderradius}),e.hborder=parseFloat(e.outerHeight()-e.innerHeight()),e.addClass("nicescroll-cursors"),y.cursor=e;var n=l(document.createElement("div"));n.attr("id",y.id),n.addClass("nicescroll-rails nicescroll-rails-vr");var s,h,u=["left","right","top","bottom"];for(var d in u)h=u[d],s=y.opt.railpadding[h],s?n.css("padding-"+h,s+"px"):y.opt.railpadding[h]=0;n.append(e),n.width=Math.max(parseFloat(y.opt.cursorwidth),e.outerWidth()),n.css({width:n.width+"px",zIndex:y.zindex,background:y.opt.background,cursor:"default"}),n.visibility=!0,n.scrollable=!0,n.align="left"==y.opt.railalign?0:1,y.rail=n,y.rail.drag=!1;var f=!1;!y.opt.boxzoom||y.ispage||x.isieold||(f=document.createElement("div"),y.bind(f,"click",y.doZoom),y.bind(f,"mouseenter",function(){y.zoom.css("opacity",y.opt.cursoropacitymax)}),y.bind(f,"mouseleave",function(){y.zoom.css("opacity",y.opt.cursoropacitymin)}),y.zoom=l(f),y.zoom.css({cursor:"pointer","z-index":y.zindex,backgroundImage:"url("+y.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),y.opt.dblclickzoom&&y.bind(y.win,"dblclick",y.doZoom),x.cantouch&&y.opt.gesturezoom&&(y.ongesturezoom=function(t){return t.scale>1.5&&y.doZoomIn(t),t.scale<.8&&y.doZoomOut(t),y.cancelEvent(t)},y.bind(y.win,"gestureend",y.ongesturezoom))),y.railh=!1;var g;if(y.opt.horizrailenabled){y.css(t,{"overflow-x":"hidden"});var e=l(document.createElement("div"));e.css({position:"absolute",top:0,height:y.opt.cursorwidth,width:"0px","background-color":y.opt.cursorcolor,border:y.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":y.opt.cursorborderradius,"-moz-border-radius":y.opt.cursorborderradius,"border-radius":y.opt.cursorborderradius}),x.isieold&&e.css({overflow:"hidden"}),e.wborder=parseFloat(e.outerWidth()-e.innerWidth()),e.addClass("nicescroll-cursors"),y.cursorh=e,g=l(document.createElement("div")),g.attr("id",y.id+"-hr"),g.addClass("nicescroll-rails nicescroll-rails-hr"),g.height=Math.max(parseFloat(y.opt.cursorwidth),e.outerHeight()),g.css({height:g.height+"px",zIndex:y.zindex,background:y.opt.background}),g.append(e),g.visibility=!0,g.scrollable=!0,g.align="top"==y.opt.railvalign?0:1,y.railh=g,y.railh.drag=!1}if(y.ispage)n.css({position:"fixed",top:"0px",height:"100%"}),n.align?n.css({right:"0px"}):n.css({left:"0px"}),y.body.append(n),y.railh&&(g.css({position:"fixed",left:"0px",width:"100%"}),g.align?g.css({bottom:"0px"}):g.css({top:"0px"}),y.body.append(g));else{if(y.ishwscroll){"static"==y.win.css("position")&&y.css(y.win,{position:"relative"});var m="HTML"==y.win[0].nodeName?y.body:y.win;l(m).scrollTop(0).scrollLeft(0),y.zoom&&(y.zoom.css({position:"absolute",top:1,right:0,"margin-right":n.width+4}),m.append(y.zoom)),n.css({position:"absolute",top:0}),n.align?n.css({right:0}):n.css({left:0}),m.append(n),g&&(g.css({position:"absolute",left:0,bottom:0}),g.align?g.css({bottom:0}):g.css({top:0}),m.append(g))}else{y.isfixed="fixed"==y.win.css("position");var v=y.isfixed?"fixed":"absolute";y.isfixed||(y.viewport=y.getViewport(y.win[0])),y.viewport&&(y.body=y.viewport,0==/fixed|absolute/.test(y.viewport.css("position"))&&y.css(y.viewport,{position:"relative"})),n.css({position:v}),y.zoom&&y.zoom.css({position:v}),y.updateScrollBar(),y.body.append(n),y.zoom&&y.body.append(y.zoom),y.railh&&(g.css({position:v}),y.body.append(g))}x.isios&&y.css(y.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),x.isie&&y.opt.disableoutline&&y.win.attr("hideFocus","true"),x.iswebkit&&y.opt.disableoutline&&y.win.css({outline:"none"})}if(y.opt.autohidemode===!1?(y.autohidedom=!1,y.rail.css({opacity:y.opt.cursoropacitymax}),y.railh&&y.railh.css({opacity:y.opt.cursoropacitymax})):y.opt.autohidemode===!0||"leave"===y.opt.autohidemode?(y.autohidedom=l().add(y.rail),x.isie8&&(y.autohidedom=y.autohidedom.add(y.cursor)),y.railh&&(y.autohidedom=y.autohidedom.add(y.railh)),y.railh&&x.isie8&&(y.autohidedom=y.autohidedom.add(y.cursorh))):"scroll"==y.opt.autohidemode?(y.autohidedom=l().add(y.rail),y.railh&&(y.autohidedom=y.autohidedom.add(y.railh))):"cursor"==y.opt.autohidemode?(y.autohidedom=l().add(y.cursor),y.railh&&(y.autohidedom=y.autohidedom.add(y.cursorh))):"hidden"==y.opt.autohidemode&&(y.autohidedom=!1,y.hide(),y.railslocked=!1),x.isie9mobile){y.scrollmom=new w(y),y.onmangotouch=function(){var t=y.getScrollTop(),e=y.getScrollLeft();if(t==y.scrollmom.lastscrolly&&e==y.scrollmom.lastscrollx)return!0;var n=t-y.mangotouch.sy,i=e-y.mangotouch.sx,r=Math.round(Math.sqrt(Math.pow(i,2)+Math.pow(n,2)));if(0!=r){var o=0>n?-1:1,s=0>i?-1:1,a=+new Date;if(y.mangotouch.lazy&&clearTimeout(y.mangotouch.lazy),a-y.mangotouch.tm>80||y.mangotouch.dry!=o||y.mangotouch.drx!=s)y.scrollmom.stop(),y.scrollmom.reset(e,t),y.mangotouch.sy=t,y.mangotouch.ly=t,y.mangotouch.sx=e,y.mangotouch.lx=e,y.mangotouch.dry=o,y.mangotouch.drx=s,y.mangotouch.tm=a;else{y.scrollmom.stop(),y.scrollmom.update(y.mangotouch.sx-i,y.mangotouch.sy-n),y.mangotouch.tm=a;var l=Math.max(Math.abs(y.mangotouch.ly-t),Math.abs(y.mangotouch.lx-e));y.mangotouch.ly=t,y.mangotouch.lx=e,l>2&&(y.mangotouch.lazy=setTimeout(function(){y.mangotouch.lazy=!1,y.mangotouch.dry=0,y.mangotouch.drx=0,y.mangotouch.tm=0,y.scrollmom.doMomentum(30)},100))}}};var b=y.getScrollTop(),C=y.getScrollLeft();y.mangotouch={sy:b,ly:b,dry:0,sx:C,lx:C,drx:0,lazy:!1,tm:0},y.bind(y.docscroll,"scroll",y.onmangotouch)}else{if(x.cantouch||y.istouchcapable||y.opt.touchbehavior||x.hasmstouch){y.scrollmom=new w(y),y.ontouchstart=function(t){if(t.pointerType&&2!=t.pointerType&&"touch"!=t.pointerType)return!1;if(y.hasmoving=!1,!y.railslocked){var e;if(x.hasmstouch)for(e=t.target?t.target:!1;e;){var n=l(e).getNiceScroll();if(n.length>0&&n[0].me==y.me)break;if(n.length>0)return!1;if("DIV"==e.nodeName&&e.id==y.id)break;e=e.parentNode?e.parentNode:!1}if(y.cancelScroll(),e=y.getTarget(t)){var i=/INPUT/i.test(e.nodeName)&&/range/i.test(e.type);if(i)return y.stopPropagation(t)}if(!("clientX"in t)&&"changedTouches"in t&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY),y.forcescreen){var r=t;t={original:t.original?t.original:t},t.clientX=r.screenX,t.clientY=r.screenY}if(y.rail.drag={x:t.clientX,y:t.clientY,sx:y.scroll.x,sy:y.scroll.y,st:y.getScrollTop(),sl:y.getScrollLeft(),pt:2,dl:!1},y.ispage||!y.opt.directionlockdeadzone)y.rail.drag.dl="f";else{var o={w:l(window).width(),h:l(window).height()},s={w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},a=Math.max(0,s.h-o.h),c=Math.max(0,s.w-o.w);!y.rail.scrollable&&y.railh.scrollable?y.rail.drag.ck=a>0?"v":!1:y.rail.scrollable&&!y.railh.scrollable?y.rail.drag.ck=c>0?"h":!1:y.rail.drag.ck=!1,y.rail.drag.ck||(y.rail.drag.dl="f")}if(y.opt.touchbehavior&&y.isiframe&&x.isie){var h=y.win.position();y.rail.drag.x+=h.left,y.rail.drag.y+=h.top}if(y.hasmoving=!1,y.lastmouseup=!1,y.scrollmom.reset(t.clientX,t.clientY),!x.cantouch&&!this.istouchcapable&&!t.pointerType){var u=e?/INPUT|SELECT|TEXTAREA/i.test(e.nodeName):!1;if(!u)return!y.ispage&&x.hasmousecapture&&e.setCapture(),y.opt.touchbehavior?(e.onclick&&!e._onclick&&(e._onclick=e.onclick,e.onclick=function(t){return y.hasmoving?!1:void e._onclick.call(this,t)}),y.cancelEvent(t)):y.stopPropagation(t);/SUBMIT|CANCEL|BUTTON/i.test(l(e).attr("type"))&&(pc={tg:e,click:!1},y.preventclick=pc)}}},y.ontouchend=function(t){if(!y.rail.drag)return!0;if(2==y.rail.drag.pt){if(t.pointerType&&2!=t.pointerType&&"touch"!=t.pointerType)return!1;if(y.scrollmom.doMomentum(),y.rail.drag=!1,y.hasmoving&&(y.lastmouseup=!0,y.hideCursor(),x.hasmousecapture&&document.releaseCapture(),!x.cantouch))return y.cancelEvent(t)}else if(1==y.rail.drag.pt)return y.onmouseup(t)};var A=y.opt.touchbehavior&&y.isiframe&&!x.hasmousecapture;y.ontouchmove=function(t,e){if(!y.rail.drag)return!1;if(t.targetTouches&&y.opt.preventmultitouchscrolling&&t.targetTouches.length>1)return!1;if(t.pointerType&&2!=t.pointerType&&"touch"!=t.pointerType)return!1;if(2==y.rail.drag.pt){if(x.cantouch&&x.isios&&"undefined"==typeof t.original)return!0;y.hasmoving=!0,y.preventclick&&!y.preventclick.click&&(y.preventclick.click=y.preventclick.tg.onclick||!1,y.preventclick.tg.onclick=y.onpreventclick);var n=l.extend({original:t},t);if(t=n,"changedTouches"in t&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY),y.forcescreen){var i=t;t={original:t.original?t.original:t},t.clientX=i.screenX,t.clientY=i.screenY}var r,o;if(o=r=0,A&&!e){var s=y.win.position();o=-s.left,r=-s.top}var a=t.clientY+r,c=a-y.rail.drag.y,h=t.clientX+o,u=h-y.rail.drag.x,d=y.rail.drag.st-c;y.ishwscroll&&y.opt.bouncescroll?0>d?d=Math.round(d/2):d>y.page.maxh&&(d=y.page.maxh+Math.round((d-y.page.maxh)/2)):(0>d&&(d=0,a=0),d>y.page.maxh&&(d=y.page.maxh,a=0));var f;y.railh&&y.railh.scrollable&&(f=y.isrtlmode?u-y.rail.drag.sl:y.rail.drag.sl-u,y.ishwscroll&&y.opt.bouncescroll?0>f?f=Math.round(f/2):f>y.page.maxw&&(f=y.page.maxw+Math.round((f-y.page.maxw)/2)):(0>f&&(f=0,h=0),f>y.page.maxw&&(f=y.page.maxw,h=0)));var p=!1;if(y.rail.drag.dl)p=!0,"v"==y.rail.drag.dl?f=y.rail.drag.sl:"h"==y.rail.drag.dl&&(d=y.rail.drag.st);else{var g=Math.abs(c),m=Math.abs(u),v=y.opt.directionlockdeadzone;if("v"==y.rail.drag.ck){if(g>v&&.3*g>=m)return y.rail.drag=!1,!0;m>v&&(y.rail.drag.dl="f",l("body").scrollTop(l("body").scrollTop()))}else if("h"==y.rail.drag.ck){if(m>v&&.3*m>=g)return y.rail.drag=!1,!0;g>v&&(y.rail.drag.dl="f",l("body").scrollLeft(l("body").scrollLeft()))}}if(y.synched("touchmove",function(){y.rail.drag&&2==y.rail.drag.pt&&(y.prepareTransition&&y.prepareTransition(0),y.rail.scrollable&&y.setScrollTop(d),y.scrollmom.update(h,a),y.railh&&y.railh.scrollable?(y.setScrollLeft(f),y.showCursor(d,f)):y.showCursor(d),x.isie10&&document.selection.clear())}),x.ischrome&&y.istouchcapable&&(p=!1),p)return y.cancelEvent(t)}else if(1==y.rail.drag.pt)return y.onmousemove(t)}}if(y.onmousedown=function(t,e){if(!y.rail.drag||1==y.rail.drag.pt){if(y.railslocked)return y.cancelEvent(t);y.cancelScroll(),y.rail.drag={x:t.clientX,y:t.clientY,sx:y.scroll.x,sy:y.scroll.y,pt:1,hr:!!e};var n=y.getTarget(t);return!y.ispage&&x.hasmousecapture&&n.setCapture(),y.isiframe&&!x.hasmousecapture&&(y.saved.csspointerevents=y.doc.css("pointer-events"),y.css(y.doc,{"pointer-events":"none"})),y.hasmoving=!1,y.cancelEvent(t)}},y.onmouseup=function(t){return y.rail.drag?1!=y.rail.drag.pt?!0:(x.hasmousecapture&&document.releaseCapture(),y.isiframe&&!x.hasmousecapture&&y.doc.css("pointer-events",y.saved.csspointerevents),y.rail.drag=!1,y.hasmoving&&y.triggerScrollEnd(),y.cancelEvent(t)):void 0},y.onmousemove=function(t){if(y.rail.drag){if(1!=y.rail.drag.pt)return;if(x.ischrome&&0==t.which)return y.onmouseup(t);if(y.cursorfreezed=!0,y.hasmoving=!0,y.rail.drag.hr){y.scroll.x=y.rail.drag.sx+(t.clientX-y.rail.drag.x),y.scroll.x<0&&(y.scroll.x=0);var e=y.scrollvaluemaxw;y.scroll.x>e&&(y.scroll.x=e)}else{y.scroll.y=y.rail.drag.sy+(t.clientY-y.rail.drag.y),y.scroll.y<0&&(y.scroll.y=0);var n=y.scrollvaluemax;y.scroll.y>n&&(y.scroll.y=n)}return y.synched("mousemove",function(){y.rail.drag&&1==y.rail.drag.pt&&(y.showCursor(),y.rail.drag.hr?y.hasreversehr?y.doScrollLeft(y.scrollvaluemaxw-Math.round(y.scroll.x*y.scrollratio.x),y.opt.cursordragspeed):y.doScrollLeft(Math.round(y.scroll.x*y.scrollratio.x),y.opt.cursordragspeed):y.doScrollTop(Math.round(y.scroll.y*y.scrollratio.y),y.opt.cursordragspeed))}),y.cancelEvent(t)}},x.cantouch||y.opt.touchbehavior)y.onpreventclick=function(t){return y.preventclick?(y.preventclick.tg.onclick=y.preventclick.click,y.preventclick=!1,y.cancelEvent(t)):void 0},y.bind(y.win,"mousedown",y.ontouchstart),y.onclick=x.isios?!1:function(t){return y.lastmouseup?(y.lastmouseup=!1,y.cancelEvent(t)):!0},y.opt.grabcursorenabled&&x.cursorgrabvalue&&(y.css(y.ispage?y.doc:y.win,{cursor:x.cursorgrabvalue}),y.css(y.rail,{cursor:x.cursorgrabvalue}));else{var E=function(t){if(y.selectiondrag){if(t){var e=y.win.outerHeight(),n=t.pageY-y.selectiondrag.top;n>0&&e>n&&(n=0),n>=e&&(n-=e),y.selectiondrag.df=n}if(0!=y.selectiondrag.df){var i=2*-Math.floor(y.selectiondrag.df/6);y.doScrollBy(i),y.debounced("doselectionscroll",function(){E()},50)}}};"getSelection"in document?y.hasTextSelected=function(){return document.getSelection().rangeCount>0}:"selection"in document?y.hasTextSelected=function(){return"None"!=document.selection.type}:y.hasTextSelected=function(){return!1},y.onselectionstart=function(t){y.ispage||(y.selectiondrag=y.win.offset())},y.onselectionend=function(t){y.selectiondrag=!1},y.onselectiondrag=function(t){y.selectiondrag&&y.hasTextSelected()&&y.debounced("selectionscroll",function(){E(t)},250)}}x.hasw3ctouch?(y.css(y.rail,{"touch-action":"none"}),y.css(y.cursor,{"touch-action":"none"}),y.bind(y.win,"pointerdown",y.ontouchstart),y.bind(document,"pointerup",y.ontouchend),y.bind(document,"pointermove",y.ontouchmove)):x.hasmstouch?(y.css(y.rail,{"-ms-touch-action":"none"}),y.css(y.cursor,{"-ms-touch-action":"none"}),y.bind(y.win,"MSPointerDown",y.ontouchstart),y.bind(document,"MSPointerUp",y.ontouchend),y.bind(document,"MSPointerMove",y.ontouchmove),y.bind(y.cursor,"MSGestureHold",function(t){t.preventDefault()}),y.bind(y.cursor,"contextmenu",function(t){t.preventDefault()})):this.istouchcapable&&(y.bind(y.win,"touchstart",y.ontouchstart),y.bind(document,"touchend",y.ontouchend),y.bind(document,"touchcancel",y.ontouchend),y.bind(document,"touchmove",y.ontouchmove)),(y.opt.cursordragontouch||!x.cantouch&&!y.opt.touchbehavior)&&(y.rail.css({cursor:"default"}),y.railh&&y.railh.css({cursor:"default"}),y.jqbind(y.rail,"mouseenter",function(){return y.ispage||y.win.is(":visible")?(y.canshowonmouseevent&&y.showCursor(),void(y.rail.active=!0)):!1}),y.jqbind(y.rail,"mouseleave",function(){y.rail.active=!1,y.rail.drag||y.hideCursor()}),y.opt.sensitiverail&&(y.bind(y.rail,"click",function(t){y.doRailClick(t,!1,!1)}),y.bind(y.rail,"dblclick",function(t){y.doRailClick(t,!0,!1)}),y.bind(y.cursor,"click",function(t){y.cancelEvent(t)}),y.bind(y.cursor,"dblclick",function(t){y.cancelEvent(t)})),y.railh&&(y.jqbind(y.railh,"mouseenter",function(){return y.ispage||y.win.is(":visible")?(y.canshowonmouseevent&&y.showCursor(),void(y.rail.active=!0)):!1}),y.jqbind(y.railh,"mouseleave",function(){y.rail.active=!1,y.rail.drag||y.hideCursor()}),y.opt.sensitiverail&&(y.bind(y.railh,"click",function(t){y.doRailClick(t,!1,!0)}),y.bind(y.railh,"dblclick",function(t){y.doRailClick(t,!0,!0)}),y.bind(y.cursorh,"click",function(t){y.cancelEvent(t)}),y.bind(y.cursorh,"dblclick",function(t){y.cancelEvent(t)})))),x.cantouch||y.opt.touchbehavior?(y.bind(x.hasmousecapture?y.win:document,"mouseup",y.ontouchend),y.bind(document,"mousemove",y.ontouchmove),y.onclick&&y.bind(document,"click",y.onclick),y.opt.cursordragontouch&&(y.bind(y.cursor,"mousedown",y.onmousedown),y.bind(y.cursor,"mouseup",y.onmouseup),y.cursorh&&y.bind(y.cursorh,"mousedown",function(t){y.onmousedown(t,!0)}),y.cursorh&&y.bind(y.cursorh,"mouseup",y.onmouseup))):(y.bind(x.hasmousecapture?y.win:document,"mouseup",y.onmouseup),y.bind(document,"mousemove",y.onmousemove),y.onclick&&y.bind(document,"click",y.onclick),y.bind(y.cursor,"mousedown",y.onmousedown),y.bind(y.cursor,"mouseup",y.onmouseup),y.railh&&(y.bind(y.cursorh,"mousedown",function(t){y.onmousedown(t,!0)}),y.bind(y.cursorh,"mouseup",y.onmouseup)),!y.ispage&&y.opt.enablescrollonselection&&(y.bind(y.win[0],"mousedown",y.onselectionstart),y.bind(document,"mouseup",y.onselectionend),y.bind(y.cursor,"mouseup",y.onselectionend),y.cursorh&&y.bind(y.cursorh,"mouseup",y.onselectionend),y.bind(document,"mousemove",y.onselectiondrag)),y.zoom&&(y.jqbind(y.zoom,"mouseenter",function(){y.canshowonmouseevent&&y.showCursor(),y.rail.active=!0}),y.jqbind(y.zoom,"mouseleave",function(){y.rail.active=!1,y.rail.drag||y.hideCursor()}))),y.opt.enablemousewheel&&(y.isiframe||y.bind(x.isie&&y.ispage?document:y.win,"mousewheel",y.onmousewheel),y.bind(y.rail,"mousewheel",y.onmousewheel),y.railh&&y.bind(y.railh,"mousewheel",y.onmousewheelhr)),y.ispage||x.cantouch||/HTML|^BODY/.test(y.win[0].nodeName)||(y.win.attr("tabindex")||y.win.attr({tabindex:o++}),y.jqbind(y.win,"focus",function(t){i=y.getTarget(t).id||!0,y.hasfocus=!0,y.canshowonmouseevent&&y.noticeCursor()}),y.jqbind(y.win,"blur",function(t){i=!1,y.hasfocus=!1}),y.jqbind(y.win,"mouseenter",function(t){r=y.getTarget(t).id||!0,y.hasmousefocus=!0,y.canshowonmouseevent&&y.noticeCursor()}),y.jqbind(y.win,"mouseleave",function(){r=!1,y.hasmousefocus=!1,y.rail.drag||y.hideCursor()}))}if(y.onkeypress=function(t){if(y.railslocked&&0==y.page.maxh)return!0;t=t?t:window.e;var e=y.getTarget(t);if(e&&/INPUT|TEXTAREA|SELECT|OPTION/.test(e.nodeName)){var n=e.getAttribute("type")||e.type||!1;if(!n||!/submit|button|cancel/i.tp)return!0}if(l(e).attr("contenteditable"))return!0;if(y.hasfocus||y.hasmousefocus&&!i||y.ispage&&!i&&!r){var o=t.keyCode;if(y.railslocked&&27!=o)return y.cancelEvent(t);var s=t.ctrlKey||!1,a=t.shiftKey||!1,c=!1;switch(o){case 38:case 63233:y.doScrollBy(72),c=!0;break;case 40:case 63235:y.doScrollBy(-72),c=!0;break;case 37:case 63232:y.railh&&(s?y.doScrollLeft(0):y.doScrollLeftBy(72),c=!0);break;case 39:case 63234:y.railh&&(s?y.doScrollLeft(y.page.maxw):y.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:y.doScrollBy(y.view.h),
c=!0;break;case 34:case 63277:y.doScrollBy(-y.view.h),c=!0;break;case 36:case 63273:y.railh&&s?y.doScrollPos(0,0):y.doScrollTo(0),c=!0;break;case 35:case 63275:y.railh&&s?y.doScrollPos(y.page.maxw,y.page.maxh):y.doScrollTo(y.page.maxh),c=!0;break;case 32:y.opt.spacebarenabled&&(a?y.doScrollBy(y.view.h):y.doScrollBy(-y.view.h),c=!0);break;case 27:y.zoomactive&&(y.doZoom(),c=!0)}if(c)return y.cancelEvent(t)}},y.opt.enablekeyboard&&y.bind(document,x.isopera&&!x.isopera12?"keypress":"keydown",y.onkeypress),y.bind(document,"keydown",function(t){var e=t.ctrlKey||!1;e&&(y.wheelprevented=!0)}),y.bind(document,"keyup",function(t){var e=t.ctrlKey||!1;e||(y.wheelprevented=!1)}),y.bind(window,"blur",function(t){y.wheelprevented=!1}),y.bind(window,"resize",y.lazyResize),y.bind(window,"orientationchange",y.lazyResize),y.bind(window,"load",y.lazyResize),x.ischrome&&!y.ispage&&!y.haswrapper){var k=y.win.attr("style"),F=parseFloat(y.win.css("width"))+1;y.win.css("width",F),y.synched("chromefix",function(){y.win.attr("style",k)})}y.onAttributeChange=function(t){y.lazyResize(y.isieold?250:30)},p!==!1&&(y.observerbody=new p(function(t){return t.forEach(function(t){return"attributes"==t.type?l("body").hasClass("modal-open")?y.hide():y.show():void 0}),document.body.scrollHeight!=y.page.maxh?y.lazyResize(30):void 0}),y.observerbody.observe(document.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),y.ispage||y.haswrapper||(p!==!1?(y.observer=new p(function(t){t.forEach(y.onAttributeChange)}),y.observer.observe(y.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),y.observerremover=new p(function(t){t.forEach(function(t){if(t.removedNodes.length>0)for(var e in t.removedNodes)if(y&&t.removedNodes[e]==y.win[0])return y.remove()})}),y.observerremover.observe(y.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(y.bind(y.win,x.isie&&!x.isie9?"propertychange":"DOMAttrModified",y.onAttributeChange),x.isie9&&y.win[0].attachEvent("onpropertychange",y.onAttributeChange),y.bind(y.win,"DOMNodeRemoved",function(t){t.target==y.win[0]&&y.remove()}))),!y.ispage&&y.opt.boxzoom&&y.bind(window,"resize",y.resizeZoom),y.istextarea&&y.bind(y.win,"mouseup",y.lazyResize),y.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var _=function(){y.iframexd=!1;var t;try{t="contentDocument"in this?this.contentDocument:this.contentWindow.document;t.domain}catch(e){y.iframexd=!0,t=!1}if(y.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;if(y.forcescreen=!0,y.isiframe&&(y.iframe={doc:l(t),html:y.doc.contents().find("html")[0],body:y.doc.contents().find("body")[0]},y.getContentSize=function(){return{w:Math.max(y.iframe.html.scrollWidth,y.iframe.body.scrollWidth),h:Math.max(y.iframe.html.scrollHeight,y.iframe.body.scrollHeight)}},y.docscroll=l(y.iframe.body)),!x.isios&&y.opt.iframeautoresize&&!y.isiframe){y.win.scrollTop(0),y.doc.height("");var n=Math.max(t.getElementsByTagName("html")[0].scrollHeight,t.body.scrollHeight);y.doc.height(n)}y.lazyResize(30),x.isie7&&y.css(l(y.iframe.html),{"overflow-y":"hidden"}),y.css(l(y.iframe.body),{"overflow-y":"hidden"}),x.isios&&y.haswrapper&&y.css(l(t.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?y.bind(this.contentWindow,"scroll",y.onscroll):y.bind(t,"scroll",y.onscroll),y.opt.enablemousewheel&&y.bind(t,"mousewheel",y.onmousewheel),y.opt.enablekeyboard&&y.bind(t,x.isopera?"keypress":"keydown",y.onkeypress),(x.cantouch||y.opt.touchbehavior)&&(y.bind(t,"mousedown",y.ontouchstart),y.bind(t,"mousemove",function(t){return y.ontouchmove(t,!0)}),y.opt.grabcursorenabled&&x.cursorgrabvalue&&y.css(l(t.body),{cursor:x.cursorgrabvalue})),y.bind(t,"mouseup",y.ontouchend),y.zoom&&(y.opt.dblclickzoom&&y.bind(t,"dblclick",y.doZoom),y.ongesturezoom&&y.bind(t,"gestureend",y.ongesturezoom))};this.doc[0].readyState&&"complete"==this.doc[0].readyState&&setTimeout(function(){_.call(y.doc[0],!1)},500),y.bind(this.doc,"load",_)}},this.showCursor=function(t,e){if(y.cursortimeout&&(clearTimeout(y.cursortimeout),y.cursortimeout=0),y.rail){if(y.autohidedom&&(y.autohidedom.stop().css({opacity:y.opt.cursoropacitymax}),y.cursoractive=!0),y.rail.drag&&1==y.rail.drag.pt||("undefined"!=typeof t&&t!==!1&&(y.scroll.y=Math.round(1*t/y.scrollratio.y)),"undefined"!=typeof e&&(y.scroll.x=Math.round(1*e/y.scrollratio.x))),y.cursor.css({height:y.cursorheight,top:y.scroll.y}),y.cursorh){var n=y.hasreversehr?y.scrollvaluemaxw-y.scroll.x:y.scroll.x;!y.rail.align&&y.rail.visibility?y.cursorh.css({width:y.cursorwidth,left:n+y.rail.width}):y.cursorh.css({width:y.cursorwidth,left:n}),y.cursoractive=!0}y.zoom&&y.zoom.stop().css({opacity:y.opt.cursoropacitymax})}},this.hideCursor=function(t){y.cursortimeout||y.rail&&y.autohidedom&&(y.hasmousefocus&&"leave"==y.opt.autohidemode||(y.cursortimeout=setTimeout(function(){y.rail.active&&y.showonmouseevent||(y.autohidedom.stop().animate({opacity:y.opt.cursoropacitymin}),y.zoom&&y.zoom.stop().animate({opacity:y.opt.cursoropacitymin}),y.cursoractive=!1),y.cursortimeout=0},t||y.opt.hidecursordelay)))},this.noticeCursor=function(t,e,n){y.showCursor(e,n),y.rail.active||y.hideCursor(t)},this.getContentSize=y.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:y.haswrapper?function(){return{w:y.doc.outerWidth()+parseInt(y.win.css("paddingLeft"))+parseInt(y.win.css("paddingRight")),h:y.doc.outerHeight()+parseInt(y.win.css("paddingTop"))+parseInt(y.win.css("paddingBottom"))}}:function(){return{w:y.docscroll[0].scrollWidth,h:y.docscroll[0].scrollHeight}},this.onResize=function(t,e){if(!y||!y.win)return!1;if(!y.haswrapper&&!y.ispage){if("none"==y.win.css("display"))return y.visibility&&y.hideRail().hideRailHr(),!1;y.hidden||y.visibility||y.showRail().showRailHr()}var n=y.page.maxh,i=y.page.maxw,r={h:y.view.h,w:y.view.w};if(y.view={w:y.ispage?y.win.width():parseInt(y.win[0].clientWidth),h:y.ispage?y.win.height():parseInt(y.win[0].clientHeight)},y.page=e?e:y.getContentSize(),y.page.maxh=Math.max(0,y.page.h-y.view.h),y.page.maxw=Math.max(0,y.page.w-y.view.w),y.page.maxh==n&&y.page.maxw==i&&y.view.w==r.w&&y.view.h==r.h){if(y.ispage)return y;var o=y.win.offset();if(y.lastposition){var s=y.lastposition;if(s.top==o.top&&s.left==o.left)return y}y.lastposition=o}if(0==y.page.maxh?(y.hideRail(),y.scrollvaluemax=0,y.scroll.y=0,y.scrollratio.y=0,y.cursorheight=0,y.setScrollTop(0),y.rail.scrollable=!1):(y.page.maxh-=y.opt.railpadding.top+y.opt.railpadding.bottom,y.rail.scrollable=!0),0==y.page.maxw?(y.hideRailHr(),y.scrollvaluemaxw=0,y.scroll.x=0,y.scrollratio.x=0,y.cursorwidth=0,y.setScrollLeft(0),y.railh.scrollable=!1):(y.page.maxw-=y.opt.railpadding.left+y.opt.railpadding.right,y.railh.scrollable=!0),y.railslocked=y.locked||0==y.page.maxh&&0==y.page.maxw,y.railslocked)return y.ispage||y.updateScrollBar(y.view),!1;y.hidden||y.visibility?y.hidden||y.railh.visibility||y.showRailHr():y.showRail().showRailHr(),y.istextarea&&y.win.css("resize")&&"none"!=y.win.css("resize")&&(y.view.h-=20),y.cursorheight=Math.min(y.view.h,Math.round(y.view.h*(y.view.h/y.page.h))),y.cursorheight=y.opt.cursorfixedheight?y.opt.cursorfixedheight:Math.max(y.opt.cursorminheight,y.cursorheight),y.cursorwidth=Math.min(y.view.w,Math.round(y.view.w*(y.view.w/y.page.w))),y.cursorwidth=y.opt.cursorfixedheight?y.opt.cursorfixedheight:Math.max(y.opt.cursorminheight,y.cursorwidth),y.scrollvaluemax=y.view.h-y.cursorheight-y.cursor.hborder-(y.opt.railpadding.top+y.opt.railpadding.bottom),y.railh&&(y.railh.width=y.page.maxh>0?y.view.w-y.rail.width:y.view.w,y.scrollvaluemaxw=y.railh.width-y.cursorwidth-y.cursorh.wborder-(y.opt.railpadding.left+y.opt.railpadding.right)),y.ispage||y.updateScrollBar(y.view),y.scrollratio={x:y.page.maxw/y.scrollvaluemaxw,y:y.page.maxh/y.scrollvaluemax};var a=y.getScrollTop();return a>y.page.maxh?y.doScrollTop(y.page.maxh):(y.scroll.y=Math.round(y.getScrollTop()*(1/y.scrollratio.y)),y.scroll.x=Math.round(y.getScrollLeft()*(1/y.scrollratio.x)),y.cursoractive&&y.noticeCursor()),y.scroll.y&&0==y.getScrollTop()&&y.doScrollTo(Math.floor(y.scroll.y*y.scrollratio.y)),y},this.resize=y.onResize,this.lazyResize=function(t){return t=isNaN(t)?30:t,y.debounced("resize",y.resize,t),y},this.jqbind=function(t,e,n){y.events.push({e:t,n:e,f:n,q:!0}),l(t).bind(e,n)},this.bind=function(t,e,n,i){var r="jquery"in t?t[0]:t;if("mousewheel"==e)if(window.addEventListener||"onwheel"in document)y._bind(r,"wheel",n,i||!1);else{var o="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll";f(r,o,n,i||!1),"DOMMouseScroll"==o&&f(r,"MozMousePixelScroll",n,i||!1)}else if(r.addEventListener){if(x.cantouch&&/mouseup|mousedown|mousemove/.test(e)){var s="mousedown"==e?"touchstart":"mouseup"==e?"touchend":"touchmove";y._bind(r,s,function(t){if(t.touches){if(t.touches.length<2){var e=t.touches.length?t.touches[0]:t;e.original=t,n.call(this,e)}}else if(t.changedTouches){var e=t.changedTouches[0];e.original=t,n.call(this,e)}},i||!1)}y._bind(r,e,n,i||!1),x.cantouch&&"mouseup"==e&&y._bind(r,"touchcancel",n,i||!1)}else y._bind(r,e,function(t){return t=t||window.event||!1,t&&t.srcElement&&(t.target=t.srcElement),"pageY"in t||(t.pageX=t.clientX+document.documentElement.scrollLeft,t.pageY=t.clientY+document.documentElement.scrollTop),n.call(r,t)===!1||i===!1?y.cancelEvent(t):!0})},x.haseventlistener?(this._bind=function(t,e,n,i){y.events.push({e:t,n:e,f:n,b:i,q:!1}),t.addEventListener(e,n,i||!1)},this.cancelEvent=function(t){if(!t)return!1;var t=t.original?t.original:t;return t.preventDefault(),t.stopPropagation(),t.preventManipulation&&t.preventManipulation(),!1},this.stopPropagation=function(t){if(!t)return!1;var t=t.original?t.original:t;return t.stopPropagation(),!1},this._unbind=function(t,e,n,i){t.removeEventListener(e,n,i)}):(this._bind=function(t,e,n,i){y.events.push({e:t,n:e,f:n,b:i,q:!1}),t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n},this.cancelEvent=function(t){var t=window.event||!1;return t?(t.cancelBubble=!0,t.cancel=!0,t.returnValue=!1,!1):!1},this.stopPropagation=function(t){var t=window.event||!1;return t?(t.cancelBubble=!0,!1):!1},this._unbind=function(t,e,n,i){t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=!1}),this.unbindAll=function(){for(var t=0;t<y.events.length;t++){var e=y.events[t];e.q?e.e.unbind(e.n,e.f):y._unbind(e.e,e.n,e.f,e.b)}},this.showRail=function(){return 0==y.page.maxh||!y.ispage&&"none"==y.win.css("display")||(y.visibility=!0,y.rail.visibility=!0,y.rail.css("display","block")),y},this.showRailHr=function(){return y.railh?(0==y.page.maxw||!y.ispage&&"none"==y.win.css("display")||(y.railh.visibility=!0,y.railh.css("display","block")),y):y},this.hideRail=function(){return y.visibility=!1,y.rail.visibility=!1,y.rail.css("display","none"),y},this.hideRailHr=function(){return y.railh?(y.railh.visibility=!1,y.railh.css("display","none"),y):y},this.show=function(){return y.hidden=!1,y.railslocked=!1,y.showRail().showRailHr()},this.hide=function(){return y.hidden=!0,y.railslocked=!0,y.hideRail().hideRailHr()},this.toggle=function(){return y.hidden?y.show():y.hide()},this.remove=function(){y.stop(),y.cursortimeout&&clearTimeout(y.cursortimeout),y.doZoomOut(),y.unbindAll(),x.isie9&&y.win[0].detachEvent("onpropertychange",y.onAttributeChange),y.observer!==!1&&y.observer.disconnect(),y.observerremover!==!1&&y.observerremover.disconnect(),y.observerbody!==!1&&y.observerbody.disconnect(),y.events=null,y.cursor&&y.cursor.remove(),y.cursorh&&y.cursorh.remove(),y.rail&&y.rail.remove(),y.railh&&y.railh.remove(),y.zoom&&y.zoom.remove();for(var t=0;t<y.saved.css.length;t++){var e=y.saved.css[t];e[0].css(e[1],"undefined"==typeof e[2]?"":e[2])}y.saved=!1,y.me.data("__nicescroll","");var n=l.nicescroll;n.each(function(t){if(this&&this.id===y.id){delete n[t];for(var e=++t;e<n.length;e++,t++)n[t]=n[e];n.length--,n.length&&delete n[n.length]}});for(var i in y)y[i]=null,delete y[i];y=null},this.scrollstart=function(t){return this.onscrollstart=t,y},this.scrollend=function(t){return this.onscrollend=t,y},this.scrollcancel=function(t){return this.onscrollcancel=t,y},this.zoomin=function(t){return this.onzoomin=t,y},this.zoomout=function(t){return this.onzoomout=t,y},this.isScrollable=function(t){var e=t.target?t.target:t;if("OPTION"==e.nodeName)return!0;for(;e&&1==e.nodeType&&!/^BODY|HTML/.test(e.nodeName);){var n=l(e),i=n.css("overflowY")||n.css("overflowX")||n.css("overflow")||"";if(/scroll|auto/.test(i))return e.clientHeight!=e.scrollHeight;e=e.parentNode?e.parentNode:!1}return!1},this.getViewport=function(t){for(var e=t&&t.parentNode?t.parentNode:!1;e&&1==e.nodeType&&!/^BODY|HTML/.test(e.nodeName);){var n=l(e);if(/fixed|absolute/.test(n.css("position")))return n;var i=n.css("overflowY")||n.css("overflowX")||n.css("overflow")||"";if(/scroll|auto/.test(i)&&e.clientHeight!=e.scrollHeight)return n;if(n.getNiceScroll().length>0)return n;e=e.parentNode?e.parentNode:!1}return!1},this.triggerScrollEnd=function(){if(y.onscrollend){var t=y.getScrollLeft(),e=y.getScrollTop(),n={type:"scrollend",current:{x:t,y:e},end:{x:t,y:e}};y.onscrollend.call(y,n)}},this.onmousewheel=function(t){if(!y.wheelprevented){if(y.railslocked)return y.debounced("checkunlock",y.resize,250),!0;if(y.rail.drag)return y.cancelEvent(t);if("auto"==y.opt.oneaxismousemode&&0!=t.deltaX&&(y.opt.oneaxismousemode=!1),y.opt.oneaxismousemode&&0==t.deltaX&&!y.rail.scrollable)return y.railh&&y.railh.scrollable?y.onmousewheelhr(t):!0;var e=+new Date,n=!1;if(y.opt.preservenativescrolling&&y.checkarea+600<e&&(y.nativescrollingarea=y.isScrollable(t),n=!0),y.checkarea=e,y.nativescrollingarea)return!0;var i=m(t,!1,n);return i&&(y.checkarea=0),i}},this.onmousewheelhr=function(t){if(!y.wheelprevented){if(y.railslocked||!y.railh.scrollable)return!0;if(y.rail.drag)return y.cancelEvent(t);var e=+new Date,n=!1;return y.opt.preservenativescrolling&&y.checkarea+600<e&&(y.nativescrollingarea=y.isScrollable(t),n=!0),y.checkarea=e,y.nativescrollingarea?!0:y.railslocked?y.cancelEvent(t):m(t,!0,n)}},this.stop=function(){return y.cancelScroll(),y.scrollmon&&y.scrollmon.stop(),y.cursorfreezed=!1,y.scroll.y=Math.round(y.getScrollTop()*(1/y.scrollratio.y)),y.noticeCursor(),y},this.getTransitionSpeed=function(t){var e=Math.round(10*y.opt.scrollspeed),n=Math.min(e,Math.round(t/20*y.opt.scrollspeed));return n>20?n:0},y.opt.smoothscroll?y.ishwscroll&&x.hastransition&&y.opt.usetransition&&y.opt.smoothscroll?(this.prepareTransition=function(t,e){var n=e?t>20?t:0:y.getTransitionSpeed(t),i=n?x.prefixstyle+"transform "+n+"ms ease-out":"";return y.lasttransitionstyle&&y.lasttransitionstyle==i||(y.lasttransitionstyle=i,y.doc.css(x.transitionstyle,i)),n},this.doScrollLeft=function(t,e){var n=y.scrollrunning?y.newscrolly:y.getScrollTop();y.doScrollPos(t,n,e)},this.doScrollTop=function(t,e){var n=y.scrollrunning?y.newscrollx:y.getScrollLeft();y.doScrollPos(n,t,e)},this.doScrollPos=function(t,e,n){var i=y.getScrollTop(),r=y.getScrollLeft();return((y.newscrolly-i)*(e-i)<0||(y.newscrollx-r)*(t-r)<0)&&y.cancelScroll(),0==y.opt.bouncescroll&&(0>e?e=0:e>y.page.maxh&&(e=y.page.maxh),0>t?t=0:t>y.page.maxw&&(t=y.page.maxw)),y.scrollrunning&&t==y.newscrollx&&e==y.newscrolly?!1:(y.newscrolly=e,y.newscrollx=t,y.newscrollspeed=n||!1,y.timer?!1:void(y.timer=setTimeout(function(){var n=y.getScrollTop(),i=y.getScrollLeft(),r={};r.x=t-i,r.y=e-n,r.px=i,r.py=n;var o=Math.round(Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))),s=y.newscrollspeed&&y.newscrollspeed>1?y.newscrollspeed:y.getTransitionSpeed(o);if(y.newscrollspeed&&y.newscrollspeed<=1&&(s*=y.newscrollspeed),y.prepareTransition(s,!0),y.timerscroll&&y.timerscroll.tm&&clearInterval(y.timerscroll.tm),s>0){if(!y.scrollrunning&&y.onscrollstart){var a={type:"scrollstart",current:{x:i,y:n},request:{x:t,y:e},end:{x:y.newscrollx,y:y.newscrolly},speed:s};y.onscrollstart.call(y,a)}x.transitionend?y.scrollendtrapped||(y.scrollendtrapped=!0,y.bind(y.doc,x.transitionend,y.onScrollTransitionEnd,!1)):(y.scrollendtrapped&&clearTimeout(y.scrollendtrapped),y.scrollendtrapped=setTimeout(y.onScrollTransitionEnd,s));var l=n,c=i;y.timerscroll={bz:new A(l,y.newscrolly,s,0,0,.58,1),bh:new A(c,y.newscrollx,s,0,0,.58,1)},y.cursorfreezed||(y.timerscroll.tm=setInterval(function(){y.showCursor(y.getScrollTop(),y.getScrollLeft())},60))}y.synched("doScroll-set",function(){y.timer=0,y.scrollendtrapped&&(y.scrollrunning=!0),y.setScrollTop(y.newscrolly),y.setScrollLeft(y.newscrollx),y.scrollendtrapped||y.onScrollTransitionEnd()})},50)))},this.cancelScroll=function(){if(!y.scrollendtrapped)return!0;var t=y.getScrollTop(),e=y.getScrollLeft();return y.scrollrunning=!1,x.transitionend||clearTimeout(x.transitionend),y.scrollendtrapped=!1,y._unbind(y.doc[0],x.transitionend,y.onScrollTransitionEnd),y.prepareTransition(0),y.setScrollTop(t),y.railh&&y.setScrollLeft(e),y.timerscroll&&y.timerscroll.tm&&clearInterval(y.timerscroll.tm),y.timerscroll=!1,y.cursorfreezed=!1,y.showCursor(t,e),y},this.onScrollTransitionEnd=function(){y.scrollendtrapped&&y._unbind(y.doc[0],x.transitionend,y.onScrollTransitionEnd),y.scrollendtrapped=!1,y.prepareTransition(0),y.timerscroll&&y.timerscroll.tm&&clearInterval(y.timerscroll.tm),y.timerscroll=!1;var t=y.getScrollTop(),e=y.getScrollLeft();return y.setScrollTop(t),y.railh&&y.setScrollLeft(e),y.noticeCursor(!1,t,e),y.cursorfreezed=!1,0>t?t=0:t>y.page.maxh&&(t=y.page.maxh),0>e?e=0:e>y.page.maxw&&(e=y.page.maxw),t!=y.newscrolly||e!=y.newscrollx?y.doScrollPos(e,t,y.opt.snapbackspeed):(y.onscrollend&&y.scrollrunning&&y.triggerScrollEnd(),void(y.scrollrunning=!1))}):(this.doScrollLeft=function(t,e){var n=y.scrollrunning?y.newscrolly:y.getScrollTop();y.doScrollPos(t,n,e)},this.doScrollTop=function(t,e){var n=y.scrollrunning?y.newscrollx:y.getScrollLeft();y.doScrollPos(n,t,e)},this.doScrollPos=function(t,e,n){function i(){if(y.cancelAnimationFrame)return!0;if(y.scrollrunning=!0,d=1-d)return y.timer=h(i)||1;var t,e,n=0,r=e=y.getScrollTop();if(y.dst.ay){r=y.bzscroll?y.dst.py+y.bzscroll.getNow()*y.dst.ay:y.newscrolly;var o=r-e;(0>o&&r<y.newscrolly||o>0&&r>y.newscrolly)&&(r=y.newscrolly),y.setScrollTop(r),r==y.newscrolly&&(n=1)}else n=1;var s=t=y.getScrollLeft();if(y.dst.ax){s=y.bzscroll?y.dst.px+y.bzscroll.getNow()*y.dst.ax:y.newscrollx;var o=s-t;(0>o&&s<y.newscrollx||o>0&&s>y.newscrollx)&&(s=y.newscrollx),y.setScrollLeft(s),s==y.newscrollx&&(n+=1)}else n+=1;2==n?(y.timer=0,y.cursorfreezed=!1,y.bzscroll=!1,y.scrollrunning=!1,0>r?r=0:r>y.page.maxh&&(r=y.page.maxh),0>s?s=0:s>y.page.maxw&&(s=y.page.maxw),s!=y.newscrollx||r!=y.newscrolly?y.doScrollPos(s,r):y.onscrollend&&y.triggerScrollEnd()):y.timer=h(i)||1}var e="undefined"==typeof e||e===!1?y.getScrollTop(!0):e;if(y.timer&&y.newscrolly==e&&y.newscrollx==t)return!0;y.timer&&u(y.timer),y.timer=0;var r=y.getScrollTop(),o=y.getScrollLeft();((y.newscrolly-r)*(e-r)<0||(y.newscrollx-o)*(t-o)<0)&&y.cancelScroll(),y.newscrolly=e,y.newscrollx=t,y.bouncescroll&&y.rail.visibility||(y.newscrolly<0?y.newscrolly=0:y.newscrolly>y.page.maxh&&(y.newscrolly=y.page.maxh)),y.bouncescroll&&y.railh.visibility||(y.newscrollx<0?y.newscrollx=0:y.newscrollx>y.page.maxw&&(y.newscrollx=y.page.maxw)),y.dst={},y.dst.x=t-o,y.dst.y=e-r,y.dst.px=o,y.dst.py=r;var s=Math.round(Math.sqrt(Math.pow(y.dst.x,2)+Math.pow(y.dst.y,2)));y.dst.ax=y.dst.x/s,y.dst.ay=y.dst.y/s;var a=0,l=s;0==y.dst.x?(a=r,l=e,y.dst.ay=1,y.dst.py=0):0==y.dst.y&&(a=o,l=t,y.dst.ax=1,y.dst.px=0);var c=y.getTransitionSpeed(s);if(n&&1>=n&&(c*=n),c>0?y.bzscroll=y.bzscroll?y.bzscroll.update(l,c):new A(a,l,c,0,1,0,1):y.bzscroll=!1,!y.timer){(r==y.page.maxh&&e>=y.page.maxh||o==y.page.maxw&&t>=y.page.maxw)&&y.checkContentSize();var d=1;if(y.cancelAnimationFrame=!1,y.timer=1,y.onscrollstart&&!y.scrollrunning){var f={type:"scrollstart",current:{x:o,y:r},request:{x:t,y:e},end:{x:y.newscrollx,y:y.newscrolly},speed:c};y.onscrollstart.call(y,f)}i(),(r==y.page.maxh&&e>=r||o==y.page.maxw&&t>=o)&&y.checkContentSize(),y.noticeCursor()}},this.cancelScroll=function(){return y.timer&&u(y.timer),y.timer=0,y.bzscroll=!1,y.scrollrunning=!1,y}):(this.doScrollLeft=function(t,e){var n=y.getScrollTop();y.doScrollPos(t,n,e)},this.doScrollTop=function(t,e){var n=y.getScrollLeft();y.doScrollPos(n,t,e)},this.doScrollPos=function(t,e,n){var i=t>y.page.maxw?y.page.maxw:t;0>i&&(i=0);var r=e>y.page.maxh?y.page.maxh:e;0>r&&(r=0),y.synched("scroll",function(){y.setScrollTop(r),y.setScrollLeft(i)})},this.cancelScroll=function(){}),this.doScrollBy=function(t,e){var n=0;if(e)n=Math.floor((y.scroll.y-t)*y.scrollratio.y);else{var i=y.timer?y.newscrolly:y.getScrollTop(!0);n=i-t}if(y.bouncescroll){var r=Math.round(y.view.h/2);-r>n?n=-r:n>y.page.maxh+r&&(n=y.page.maxh+r)}y.cursorfreezed=!1;var o=y.getScrollTop(!0);return 0>n&&0>=o?y.noticeCursor():n>y.page.maxh&&o>=y.page.maxh?(y.checkContentSize(),y.noticeCursor()):void y.doScrollTop(n)},this.doScrollLeftBy=function(t,e){var n=0;if(e)n=Math.floor((y.scroll.x-t)*y.scrollratio.x);else{var i=y.timer?y.newscrollx:y.getScrollLeft(!0);n=i-t}if(y.bouncescroll){var r=Math.round(y.view.w/2);-r>n?n=-r:n>y.page.maxw+r&&(n=y.page.maxw+r)}y.cursorfreezed=!1;var o=y.getScrollLeft(!0);return 0>n&&0>=o?y.noticeCursor():n>y.page.maxw&&o>=y.page.maxw?y.noticeCursor():void y.doScrollLeft(n)},this.doScrollTo=function(t,e){var n=e?Math.round(t*y.scrollratio.y):t;0>n?n=0:n>y.page.maxh&&(n=y.page.maxh),y.cursorfreezed=!1,y.doScrollTop(t)},this.checkContentSize=function(){var t=y.getContentSize();(t.h!=y.page.h||t.w!=y.page.w)&&y.resize(!1,t)},y.onscroll=function(t){y.rail.drag||y.cursorfreezed||y.synched("scroll",function(){y.scroll.y=Math.round(y.getScrollTop()*(1/y.scrollratio.y)),y.railh&&(y.scroll.x=Math.round(y.getScrollLeft()*(1/y.scrollratio.x))),y.noticeCursor()})},y.bind(y.docscroll,"scroll",y.onscroll),this.doZoomIn=function(t){if(!y.zoomactive){y.zoomactive=!0,y.zoomrestore={style:{}};var e=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],n=y.win[0].style;for(var i in e){var r=e[i];y.zoomrestore.style[r]="undefined"!=typeof n[r]?n[r]:""}y.zoomrestore.style.width=y.win.css("width"),y.zoomrestore.style.height=y.win.css("height"),y.zoomrestore.padding={w:y.win.outerWidth()-y.win.width(),h:y.win.outerHeight()-y.win.height()},x.isios4&&(y.zoomrestore.scrollTop=l(window).scrollTop(),l(window).scrollTop(0)),y.win.css({position:x.isios4?"absolute":"fixed",top:0,left:0,"z-index":a+100,margin:"0px"});var o=y.win.css("backgroundColor");return(""==o||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(o))&&y.win.css("backgroundColor","#fff"),y.rail.css({"z-index":a+101}),y.zoom.css({"z-index":a+102}),y.zoom.css("backgroundPosition","0px -18px"),y.resizeZoom(),y.onzoomin&&y.onzoomin.call(y),y.cancelEvent(t)}},this.doZoomOut=function(t){return y.zoomactive?(y.zoomactive=!1,y.win.css("margin",""),y.win.css(y.zoomrestore.style),x.isios4&&l(window).scrollTop(y.zoomrestore.scrollTop),y.rail.css({"z-index":y.zindex}),y.zoom.css({"z-index":y.zindex}),y.zoomrestore=!1,y.zoom.css("backgroundPosition","0px 0px"),y.onResize(),y.onzoomout&&y.onzoomout.call(y),y.cancelEvent(t)):void 0},this.doZoom=function(t){return y.zoomactive?y.doZoomOut(t):y.doZoomIn(t)},this.resizeZoom=function(){if(y.zoomactive){var t=y.getScrollTop();y.win.css({width:l(window).width()-y.zoomrestore.padding.w+"px",height:l(window).height()-y.zoomrestore.padding.h+"px"}),y.onResize(),y.setScrollTop(Math.min(y.page.maxh,t))}},this.init(),l.nicescroll.push(this)},w=function(t){var e=this;this.nc=t,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.time=function(){return+new Date},this.reset=function(t,n){e.stop();var i=e.time();e.steptime=0,e.lasttime=i,e.speedx=0,e.speedy=0,e.lastx=t,e.lasty=n,e.lastscrollx=-1,e.lastscrolly=-1},this.update=function(t,n){var i=e.time();e.steptime=i-e.lasttime,e.lasttime=i;var r=n-e.lasty,o=t-e.lastx,s=e.nc.getScrollTop(),a=e.nc.getScrollLeft(),l=s+r,c=a+o;e.snapx=0>c||c>e.nc.page.maxw,e.snapy=0>l||l>e.nc.page.maxh,e.speedx=o,e.speedy=r,e.lastx=t,e.lasty=n},this.stop=function(){e.nc.unsynched("domomentum2d"),e.timer&&clearTimeout(e.timer),e.timer=0,e.lastscrollx=-1,e.lastscrolly=-1},this.doSnapy=function(t,n){var i=!1;0>n?(n=0,i=!0):n>e.nc.page.maxh&&(n=e.nc.page.maxh,i=!0),0>t?(t=0,i=!0):t>e.nc.page.maxw&&(t=e.nc.page.maxw,i=!0),i?e.nc.doScrollPos(t,n,e.nc.opt.snapbackspeed):e.nc.triggerScrollEnd()},this.doMomentum=function(t){var n=e.time(),i=t?n+t:e.lasttime,r=e.nc.getScrollLeft(),o=e.nc.getScrollTop(),s=e.nc.page.maxh,a=e.nc.page.maxw;e.speedx=a>0?Math.min(60,e.speedx):0,e.speedy=s>0?Math.min(60,e.speedy):0;var l=i&&60>=n-i;(0>o||o>s||0>r||r>a)&&(l=!1);var c=e.speedy&&l?e.speedy:!1,h=e.speedx&&l?e.speedx:!1;if(c||h){var u=Math.max(16,e.steptime);if(u>50){var d=u/50;e.speedx*=d,e.speedy*=d,u=50}e.demulxy=0,e.lastscrollx=e.nc.getScrollLeft(),e.chkx=e.lastscrollx,e.lastscrolly=e.nc.getScrollTop(),e.chky=e.lastscrolly;var f=e.lastscrollx,p=e.lastscrolly,g=function(){var t=e.time()-n>600?.04:.02;e.speedx&&(f=Math.floor(e.lastscrollx-e.speedx*(1-e.demulxy)),e.lastscrollx=f,(0>f||f>a)&&(t=.1)),e.speedy&&(p=Math.floor(e.lastscrolly-e.speedy*(1-e.demulxy)),e.lastscrolly=p,(0>p||p>s)&&(t=.1)),e.demulxy=Math.min(1,e.demulxy+t),e.nc.synched("domomentum2d",function(){if(e.speedx){var t=e.nc.getScrollLeft();t!=e.chkx&&e.stop(),e.chkx=f,e.nc.setScrollLeft(f)}if(e.speedy){var n=e.nc.getScrollTop();n!=e.chky&&e.stop(),e.chky=p,e.nc.setScrollTop(p)}e.timer||(e.nc.hideCursor(),e.doSnapy(f,p))}),e.demulxy<1?e.timer=setTimeout(g,u):(e.stop(),e.nc.hideCursor(),e.doSnapy(f,p))};g()}else e.doSnapy(e.nc.getScrollLeft(),e.nc.getScrollTop())}},b=t.fn.scrollTop;t.cssHooks.pageYOffset={get:function(t,e,n){var i=l.data(t,"__nicescroll")||!1;return i&&i.ishwscroll?i.getScrollTop():b.call(t)},set:function(t,e){var n=l.data(t,"__nicescroll")||!1;return n&&n.ishwscroll?n.setScrollTop(parseInt(e)):b.call(t,e),this}},t.fn.scrollTop=function(t){if("undefined"==typeof t){var e=this[0]?l.data(this[0],"__nicescroll")||!1:!1;return e&&e.ishwscroll?e.getScrollTop():b.call(this)}return this.each(function(){var e=l.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollTop(parseInt(t)):b.call(l(this),t)})};var x=t.fn.scrollLeft;l.cssHooks.pageXOffset={get:function(t,e,n){var i=l.data(t,"__nicescroll")||!1;return i&&i.ishwscroll?i.getScrollLeft():x.call(t)},set:function(t,e){var n=l.data(t,"__nicescroll")||!1;return n&&n.ishwscroll?n.setScrollLeft(parseInt(e)):x.call(t,e),this}},t.fn.scrollLeft=function(t){if("undefined"==typeof t){var e=this[0]?l.data(this[0],"__nicescroll")||!1:!1;return e&&e.ishwscroll?e.getScrollLeft():x.call(this)}return this.each(function(){var e=l.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollLeft(parseInt(t)):x.call(l(this),t)})};var C=function(t){var e=this;if(this.length=0,this.name="nicescrollarray",this.each=function(t){for(var n=0,i=0;n<e.length;n++)t.call(e[n],i++);return e},this.push=function(t){e[e.length]=t,e.length++},this.eq=function(t){return e[t]},t)for(var n=0;n<t.length;n++){var i=l.data(t[n],"__nicescroll")||!1;i&&(this[this.length]=i,this.length++)}return this};n(C.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(t,e){t[e]=function(){var t=arguments;return this.each(function(){this[e].apply(this,t)})}}),t.fn.getNiceScroll=function(t){if("undefined"==typeof t)return new C(this);var e=this[t]&&l.data(this[t],"__nicescroll")||!1;return e},t.extend(t.expr[":"],{nicescroll:function(t){return l.data(t,"__nicescroll")?!0:!1}}),l.fn.niceScroll=function(t,e){"undefined"==typeof e&&("object"!=typeof t||"jquery"in t||(e=t,t=!1)),e=l.extend({},e);var n=new C;"undefined"==typeof e&&(e={}),t&&(e.doc=l(t),e.win=l(this));var i=!("doc"in e);return i||"win"in e||(e.win=l(this)),this.each(function(){var t=l(this).data("__nicescroll")||!1;t||(e.doc=i?l(this):e.doc,t=new y(e,l(this)),l(this).data("__nicescroll",t)),n.push(t)}),1==n.length?n[0]:n},window.NiceScroll={getjQuery:function(){return t}},l.nicescroll||(l.nicescroll=new C,l.nicescroll.options=g)});var dateFormat=function(){var t=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,i=function(t,e){for(t=String(t),e=e||2;t.length<e;)t="0"+t;return t};return function(r,o,s){var a=dateFormat;if(1!=arguments.length||"[object String]"!=Object.prototype.toString.call(r)||/\d/.test(r)||(o=r,r=void 0),r=r?new Date(r):new Date,isNaN(r))throw SyntaxError("invalid date");o=String(a.masks[o]||o||a.masks["default"]),"UTC:"==o.slice(0,4)&&(o=o.slice(4),s=!0);var l=s?"getUTC":"get",c=r[l+"Date"](),h=r[l+"Day"](),u=r[l+"Month"](),d=r[l+"FullYear"](),f=r[l+"Hours"](),p=r[l+"Minutes"](),g=r[l+"Seconds"](),m=r[l+"Milliseconds"](),v=s?0:r.getTimezoneOffset(),y={d:c,dd:i(c),ddd:a.i18n.dayNames[h],dddd:a.i18n.dayNames[h+7],m:u+1,mm:i(u+1),mmm:a.i18n.monthNames[u],mmmm:a.i18n.monthNames[u+12],yy:String(d).slice(2),yyyy:d,h:f%12||12,hh:i(f%12||12),H:f,HH:i(f),M:p,MM:i(p),s:g,ss:i(g),l:i(m,3),L:i(m>99?Math.round(m/10):m),t:12>f?"a":"p",tt:12>f?"am":"pm",T:12>f?"A":"P",TT:12>f?"AM":"PM",Z:s?"UTC":(String(r).match(e)||[""]).pop().replace(n,""),o:(v>0?"-":"+")+i(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][c%10>3?0:(c%100-c%10!=10)*c%10]};return o.replace(t,function(t){return t in y?y[t]:t.slice(1,t.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"},dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},Date.prototype.format=function(t,e){return dateFormat(this,t,e)},function(){this.Activities=function(){function t(){Pager.init(20,!0),$(".event-filter-link").on("click",function(t){return function(e){return e.preventDefault(),t.toggleFilter($(e.currentTarget)),t.reloadActivities()}}(this))}return t.prototype.reloadActivities=function(){return $(".content_list").html(""),Pager.init(20,!0)},t.prototype.toggleFilter=function(t){var e,n;return $(".event-filter .active").removeClass("active"),e=$.cookie("event_filter"),n=t.attr("id").split("_")[0],$.cookie("event_filter",e!==n?n:"",{path:"/"}),e!==n?t.closest("li").toggleClass("active"):void 0},t}()}.call(this),function(){this.Admin=function(){function t(){var t;$("input#user_force_random_password").on("change",function(t){var e;return e=$("#user_password, #user_password_confirmation"),$(this).attr("checked")?e.val("").attr("disabled",!0):e.removeAttr("disabled")}),$("body").on("click",".js-toggle-colors-link",function(t){return t.preventDefault(),$(".js-toggle-colors-container").toggle()}),$(".log-tabs a").click(function(t){return t.preventDefault(),$(this).tab("show")}),$(".log-bottom").click(function(t){var e;return t.preventDefault(),e=$(".file-content:visible"),e.animate({scrollTop:e.find("ol").height()},"fast")}),t=$(".change-owner-holder"),$(".change-owner-link").bind("click",function(e){return e.preventDefault(),$(this).hide(),t.show()}),$(".change-owner-cancel-link").bind("click",function(e){return e.preventDefault(),t.hide(),$(".change-owner-link").show()}),$("li.project_member").bind("ajax:success",function(){return Turbolinks.visit(location.href)}),$("li.group_member").bind("ajax:success",function(){return Turbolinks.visit(location.href)})}return t}()}.call(this),function(){this.Api={groups_path:"/api/:version/groups.json",group_path:"/api/:version/groups/:id.json",namespaces_path:"/api/:version/namespaces.json",group_projects_path:"/api/:version/groups/:id/projects.json",projects_path:"/api/:version/projects.json",labels_path:"/api/:version/projects/:id/labels",license_path:"/api/:version/licenses/:key",group:function(t,e){var n;return n=Api.buildUrl(Api.group_path),n=n.replace(":id",t),$.ajax({url:n,data:{private_token:gon.api_token},dataType:"json"}).done(function(t){return e(t)})},groups:function(t,e,n){var i;return i=Api.buildUrl(Api.groups_path),$.ajax({url:i,data:{private_token:gon.api_token,search:t,per_page:20},dataType:"json"}).done(function(t){
return n(t)})},namespaces:function(t,e){var n;return n=Api.buildUrl(Api.namespaces_path),$.ajax({url:n,data:{private_token:gon.api_token,search:t,per_page:20},dataType:"json"}).done(function(t){return e(t)})},projects:function(t,e,n){var i;return i=Api.buildUrl(Api.projects_path),$.ajax({url:i,data:{private_token:gon.api_token,search:t,order_by:e,per_page:20},dataType:"json"}).done(function(t){return n(t)})},newLabel:function(t,e,n){var i;return i=Api.buildUrl(Api.labels_path),i=i.replace(":id",t),e.private_token=gon.api_token,$.ajax({url:i,type:"POST",data:e,dataType:"json"}).done(function(t){return n(t)}).error(function(t){return n(t.responseJSON)})},groupProjects:function(t,e,n){var i;return i=Api.buildUrl(Api.group_projects_path),i=i.replace(":id",t),$.ajax({url:i,data:{private_token:gon.api_token,search:e,per_page:20},dataType:"json"}).done(function(t){return n(t)})},licenseText:function(t,e,n){var i;return i=Api.buildUrl(Api.license_path).replace(":key",t),$.ajax({url:i,data:e}).done(function(t){return n(t)})},buildUrl:function(t){return null!=gon.relative_url_root&&(t=gon.relative_url_root+t),t.replace(":version",gon.api_version)}}}.call(this),function(){this.Aside=function(){function t(){$(document).off("click","a.show-aside"),$(document).on("click","a.show-aside",function(t){var e,n;return t.preventDefault(),e=$(t.currentTarget),n=e.find("i"),n.hasClass("fa-angle-left")?(e.parent().find("section").hide(),e.parent().find("aside").fadeIn(),n.removeClass("fa-angle-left").addClass("fa-angle-right")):(e.parent().find("aside").hide(),e.parent().find("section").fadeIn(),n.removeClass("fa-angle-right").addClass("fa-angle-left"))})}return t}()}.call(this),function(){this.AwardsHandler=function(){function t(t,e,n,i,r){this.get_emojis_url=t,this.post_emoji_url=e,this.noteable_type=n,this.noteable_id=i,this.unicodes=r,$(".js-add-award").on("click",function(t){return function(e){return e.stopPropagation(),e.preventDefault(),t.showEmojiMenu()}}(this)),$("html").on("click",function(t){return!$(t.target).closest(".emoji-menu").length&&$(".emoji-menu").is(":visible")?$(".emoji-menu").removeClass("is-visible"):void 0}),$(".awards").off("click").on("click",".js-emoji-btn",this.handleClick),this.renderFrequentlyUsedBlock()}return t.prototype.handleClick=function(t){var e;return t.preventDefault(),e=$(this).find(".icon").data("emoji"),"thumbsup"===e&&awards_handler.didUserClickEmoji($(this),"thumbsdown")?awards_handler.addAward("thumbsdown"):"thumbsdown"===e&&awards_handler.didUserClickEmoji($(this),"thumbsup")&&awards_handler.addAward("thumbsup"),awards_handler.addAward(e),$(this).trigger("blur")},t.prototype.didUserClickEmoji=function(t,e){return $(t).siblings("button:has([data-emoji="+e+"])").attr("data-original-title")?$(t).siblings("button:has([data-emoji="+e+"])").attr("data-original-title").indexOf("me")>-1:void 0},t.prototype.showEmojiMenu=function(){return $(".emoji-menu").length?$(".emoji-menu").is(".is-visible")?($(".emoji-menu").removeClass("is-visible"),$("#emoji_search").blur()):($(".emoji-menu").addClass("is-visible"),$("#emoji_search").focus()):($(".js-add-award").addClass("is-loading"),$.get(this.get_emojis_url,function(t){return function(e){return $(".js-add-award").removeClass("is-loading"),$(".js-award-holder").append(e),setTimeout(function(){return $(".emoji-menu").addClass("is-visible"),$("#emoji_search").focus(),t.setupSearch()},200)}}(this)))},t.prototype.addAward=function(t){return this.postEmoji(t,function(e){return function(){return e.addAwardToEmojiBar(t)}}(this)),$(".emoji-menu").removeClass("is-visible")},t.prototype.addAwardToEmojiBar=function(t){var e;return this.addEmojiToFrequentlyUsedList(t),this.exist(t)?this.isActive(t)?this.decrementCounter(t):(e=this.findEmojiIcon(t).siblings(".js-counter"),e.text(parseInt(e.text())+1),e.parent().addClass("active"),this.addMeToAuthorList(t)):this.createEmoji(t)},t.prototype.exist=function(t){return this.findEmojiIcon(t).length>0},t.prototype.isActive=function(t){return this.findEmojiIcon(t).parent().hasClass("active")},t.prototype.decrementCounter=function(t){var e,n;return e=this.findEmojiIcon(t).siblings(".js-counter"),n=e.parent(),parseInt(e.text())>1?(e.text(parseInt(e.text())-1),n.removeClass("active"),this.removeMeFromAuthorList(t)):"thumbsup"===t||"thumbsdown"===t?(n.tooltip("destroy"),e.text(0),n.removeClass("active"),this.removeMeFromAuthorList(t)):(n.tooltip("destroy"),n.remove())},t.prototype.removeMeFromAuthorList=function(t){var e,n;return n=this.findEmojiIcon(t).parent(),e=n.attr("data-original-title").split(", "),e.splice(e.indexOf("me"),1),n.closest(".js-emoji-btn").attr("data-original-title",e.join(", ")),this.resetTooltip(n)},t.prototype.addMeToAuthorList=function(t){var e,n,i;return n=this.findEmojiIcon(t).parent(),i=n.attr("data-original-title").trim(),e=[],i&&(e=i.split(", ")),e.push("me"),n.attr("data-original-title",e.join(", ")),this.resetTooltip(n)},t.prototype.resetTooltip=function(t){return t.tooltip("destroy"),setTimeout(function(){return t.tooltip()},200)},t.prototype.createEmoji=function(t){var e,n,i;return e=this.resolveNameToCssClass(t),i=[],i.push("<button class='btn award-control js-emoji-btn has-tooltip active' data-original-title='me'>","<div class='icon emoji-icon "+e+"' data-emoji='"+t+"'></div>","<span class='award-control-text js-counter'>1</span>","</button>"),n=$(i.join("\n")).insertBefore(".js-award-holder").find(".emoji-icon").data("emoji",t),$(".award-control").tooltip()},t.prototype.resolveNameToCssClass=function(t){return"emoji-"+this.unicodes[t]},t.prototype.postEmoji=function(t,e){return $.post(this.post_emoji_url,{note:{note:":"+t+":",noteable_type:this.noteable_type,noteable_id:this.noteable_id}},function(t){return t.ok?e.call():void 0})},t.prototype.findEmojiIcon=function(t){return $(".awards > .js-emoji-btn [data-emoji='"+t+"']")},t.prototype.scrollToAwards=function(){return $("body, html").animate({scrollTop:$(".awards").offset().top-80},200)},t.prototype.addEmojiToFrequentlyUsedList=function(t){var e;return e=this.getFrequentlyUsedEmojis(),e.push(t),$.cookie("frequently_used_emojis",e.join(","),{expires:365})},t.prototype.getFrequentlyUsedEmojis=function(){var t;return t=($.cookie("frequently_used_emojis")||"").split(","),_.compact(_.uniq(t))},t.prototype.renderFrequentlyUsedBlock=function(){var t,e,n,i,r,o;if($.cookie("frequently_used_emojis")){for(n=this.getFrequentlyUsedEmojis(),o=$("<ul>"),e=function(t){return $(".emoji-menu-content [data-emoji='"+t+"']").closest("li").clone().appendTo(o)},i=0,r=n.length;r>i;i++)t=n[i],e(t);return $("input.emoji-search").after(o).after($("<h5>").text("Frequently used"))}},t.prototype.setupSearch=function(){return $("input.emoji-search").keyup(function(t){return function(e){var n,i,r,o;return r=$(e.target).val(),$("ul.emoji-menu-search, h5.emoji-search").remove(),r?(i=$("<h5>").text("Search results").addClass("emoji-search"),n=t.searchEmojis(r).show(),o=$("<ul>").addClass("emoji-menu-list emoji-menu-search").append(n),$(".emoji-menu-content ul, .emoji-menu-content h5").hide(),$(".emoji-menu-content").append(i).append(o)):$(".emoji-menu-content").children().show()}}(this))},t.prototype.searchEmojis=function(t){return $(".emoji-menu-content [data-emoji*='"+t+"']").closest("li").clone()},t}()}.call(this),/*!
 * jQuery resize event - v1.1 - 3/14/2010
 * http://benalman.com/projects/jquery-resize-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
// Copyright (c) 2010 "Cowboy" Ben Alman,
function(t,e,n){"$:nomunge";function i(){r=e[a](function(){o.each(function(){var e=t(this),n=e.width(),i=e.height(),r=t.data(this,c);(n!==r.w||i!==r.h)&&e.trigger(l,[r.w=n,r.h=i])}),i()},s[h])}var r,o=t([]),s=t.resize=t.extend(t.resize,{}),a="setTimeout",l="resize",c=l+"-special-event",h="delay",u="throttleWindow";s[h]=250,s[u]=!0,t.event.special[l]={setup:function(){if(!s[u]&&this[a])return!1;var e=t(this);o=o.add(e),t.data(this,c,{w:e.width(),h:e.height()}),1===o.length&&i()},teardown:function(){if(!s[u]&&this[a])return!1;var e=t(this);o=o.not(e),e.removeData(c),o.length||clearTimeout(r)},add:function(e){function i(e,i,o){var s=t(this),a=t.data(this,c);a.w=i!==n?i:s.width(),a.h=o!==n?o:s.height(),r.apply(this,arguments)}if(!s[u]&&this[a])return!1;var r;return t.isFunction(e)?(r=e,i):(r=e.handler,void(e.handler=i))}}}(jQuery,this),/*!
	Autosize 3.0.14
	license: MIT
	http://www.jacklmoore.com/autosize
*/
function(t,e){if("function"==typeof define&&define.amd)define(["exports","module"],e);else if("undefined"!=typeof exports&&"undefined"!=typeof module)e(exports,module);else{var n={exports:{}};e(n.exports,n),t.autosize=n.exports}}(this,function(t,e){"use strict";function n(t){function e(){var e=window.getComputedStyle(t,null);d=e.overflowY,"vertical"===e.resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),u="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(u)&&(u=0),r()}function n(e){var n=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=n,d=e,h&&(t.style.overflowY=e),i()}function i(){var e=window.pageYOffset,n=document.body.scrollTop,i=t.style.height;t.style.height="auto";var r=t.scrollHeight+u;return 0===t.scrollHeight?void(t.style.height=i):(t.style.height=r+"px",f=t.clientWidth,document.documentElement.scrollTop=e,void(document.body.scrollTop=n))}function r(){var e=t.style.height;i();var r=window.getComputedStyle(t,null);if(r.height!==t.style.height?"visible"!==d&&n("visible"):"hidden"!==d&&n("hidden"),e!==t.style.height){var o=document.createEvent("Event");o.initEvent("autosize:resized",!0,!1),t.dispatchEvent(o)}}var s=void 0===arguments[1]?{}:arguments[1],a=s.setOverflowX,l=void 0===a?!0:a,c=s.setOverflowY,h=void 0===c?!0:c;if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!o.has(t)){var u=null,d=null,f=t.clientWidth,p=function(){t.clientWidth!==f&&r()},g=function(e){window.removeEventListener("resize",p,!1),t.removeEventListener("input",r,!1),t.removeEventListener("keyup",r,!1),t.removeEventListener("autosize:destroy",g,!1),t.removeEventListener("autosize:update",r,!1),o["delete"](t),Object.keys(e).forEach(function(n){t.style[n]=e[n]})}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",g,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",r,!1),window.addEventListener("resize",p,!1),t.addEventListener("input",r,!1),t.addEventListener("autosize:update",r,!1),o.add(t),l&&(t.style.overflowX="hidden",t.style.wordWrap="break-word"),e()}}function i(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName){var e=document.createEvent("Event");e.initEvent("autosize:destroy",!0,!1),t.dispatchEvent(e)}}function r(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName){var e=document.createEvent("Event");e.initEvent("autosize:update",!0,!1),t.dispatchEvent(e)}}var o="function"==typeof Set?new Set:function(){var t=[];return{has:function(e){return Boolean(t.indexOf(e)>-1)},add:function(e){t.push(e)},"delete":function(e){t.splice(t.indexOf(e),1)}}}(),s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(s=function(t){return t},s.destroy=function(t){return t},s.update=function(t){return t}):(s=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return n(t,e)}),t},s.destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],i),t},s.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],r),t}),e.exports=s}),function(){$(function(){var t;return t=$(".js-autosize"),t.on("autosize:resized",function(){var t;return t=$(this),t.data("height",t.outerHeight())}),t.on("resize.autosize",function(){var t;return t=$(this),t.data("height")!==t.outerHeight()?(t.data("height",t.outerHeight()),autosize.destroy(t),t.css("max-height",window.outerHeight)):void 0}),autosize(t),autosize.update(t),t.css("resize","vertical")})}.call(this),function(){$(function(){return $("body").on("click",".js-details-target",function(){var t;return t=$(this).closest(".js-details-container"),t.toggleClass("open")}),$("body").on("click",".js-details-expand",function(t){return $(this).next(".js-details-content").removeClass("hide"),$(this).hide(),t.preventDefault()})})}.call(this),function(){$.fn.extend({disable:function(){return $(this).attr("disabled","disabled").addClass("disabled")}}),$.fn.extend({enable:function(){return $(this).removeAttr("disabled").removeClass("disabled")}})}.call(this),function(){var t,e;t=function(){return navigator.userAgent.match(/Macintosh/)},e=function(t,e){return t.originalEvent&&t.originalEvent.repeat||t.repeat?!1:t.keyCode===e},$(document).on("keydown.quick_submit",".js-quick-submit",function(t){var n,i;if(e(t,13)&&(t.metaKey&&!t.altKey&&!t.ctrlKey&&!t.shiftKey||t.ctrlKey&&!t.altKey&&!t.metaKey&&!t.shiftKey)&&(t.preventDefault(),n=$(t.target).closest("form"),i=n.find("input[type=submit], button[type=submit]"),!i.attr("disabled")))return i.disable(),n.submit()}),$(document).on("keyup.quick_submit",".js-quick-submit input[type=submit], .js-quick-submit button[type=submit]",function(n){var i,r;if(e(n,9))return r=t()?"You can also press &#8984;-Enter":"You can also press Ctrl-Enter",i=$(this),i.tooltip({container:"body",html:"true",placement:"auto top",title:r,trigger:"manual"}).tooltip("show").one("blur",function(){return i.tooltip("hide")})})}.call(this),function(){$.fn.requiresInput=function(){var t,e,n,i,r;return e=$(this),t=$("button[type=submit], input[type=submit]",e),r="[required=required]",n="input"+r+", select"+r+", textarea"+r,i=function(){var i;return i=_.map($(n,e),function(t){return t.value}),i.length&&_.any(i,_.isEmpty)?t.disable():t.enable()},i(),e.on("change input",n,i)},$(function(){var t,e;return t=$("form.js-requires-input"),t.requiresInput(),e=function(t){var e;return e=$(".js-select-namespace option:selected"),e.length&&"groups"===e.data("options-parent")?t.find(".help-block").hide():e.length?t.find(".help-block").show():void 0},e(t),$(".select2.js-select-namespace").change(function(){return e(t)})})}.call(this),function(){$(function(){return $("body").on("click",".js-toggle-button",function(t){return $(this).find("i").toggleClass("fa fa-chevron-down").toggleClass("fa fa-chevron-up"),$(this).closest(".js-toggle-container").find(".js-toggle-content").toggle(),t.preventDefault()})})}.call(this),function(){this.BlobFileDropzone=function(){function t(t,e){var n,i,r;i=t.find(".dropzone"),Dropzone.autoDiscover=!1,n=i.dropzone({autoDiscover:!1,autoProcessQueue:!1,url:t.attr("action"),method:e,clickable:!0,uploadMultiple:!1,paramName:"file",maxFilesize:gon.max_file_size||10,parallelUploads:1,maxFiles:1,addRemoveLinks:!0,previewsContainer:".dropzone-previews",headers:{"X-CSRF-Token":$('meta[name="csrf-token"]').attr("content")},init:function(){return this.on("addedfile",function(t){$(".dropzone-alerts").html("").hide()}),this.on("success",function(t,e){window.location.href=e.filePath}),this.on("maxfilesexceeded",function(t){this.removeFile(t)}),this.on("sending",function(e,n,i){i.append("target_branch",t.find(".js-target-branch").val()),i.append("create_merge_request",t.find(".js-create-merge-request").val()),i.append("commit_message",t.find(".js-commit-message").val())})},error:function(t,e){var n;n=$("<div/>").html(e).text(),$(".dropzone-alerts").html('Error uploading file: "'+n+'"').show(),this.removeFile(t)}}),r=t.find("#submit-all")[0],r.addEventListener("click",function(t){return t.preventDefault(),t.stopPropagation(),0===n[0].dropzone.getQueuedFiles().length&&alert("Please select a file"),n[0].dropzone.processQueue(),!1})}return t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.BlobLicenseSelector=function(){function e(e){this.toggleLicenseSelector=t(this.toggleLicenseSelector,this);var n,i;this.$licenseSelector=$(".js-license-selector"),n=$("#file_name"),i=n.length?n.val():$(".editor-file-name").length?$(".editor-file-name").text().trim():void 0,this.toggleLicenseSelector(i),n&&n.on("keyup blur",function(t){return function(e){return t.toggleLicenseSelector($(e.target).val())}}(this)),$("select.license-select").on("change",function(t){var n;return n={project:$(this).data("project"),fullname:$(this).data("fullname")},Api.licenseText($(this).val(),n,function(t){return e.setValue(t.content,-1)})})}return e.prototype.licenseRegex=/^(.+\/)?(licen[sc]e|copying)($|\.)/i,e.prototype.toggleLicenseSelector=function(t){return this.licenseRegex.test(t)?this.$licenseSelector.show():this.$licenseSelector.hide()},e}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.EditBlob=function(){function e(e,n){null==n&&(n=null),this.editModeLinkClickHandler=t(this.editModeLinkClickHandler,this),ace.config.set("modePath",e+"/ace"),ace.config.loadModule("ace/ext/searchbox"),this.editor=ace.edit("editor"),this.editor.focus(),n&&this.editor.getSession().setMode("ace/mode/"+n),$("form").submit(function(t){return function(){return $("#file-content").val(t.editor.getValue())}}(this)),this.initModePanesAndLinks(),new BlobLicenseSelector(this.editor)}return e.prototype.initModePanesAndLinks=function(){return this.$editModePanes=$(".js-edit-mode-pane"),this.$editModeLinks=$(".js-edit-mode a"),this.$editModeLinks.click(this.editModeLinkClickHandler)},e.prototype.editModeLinkClickHandler=function(t){var e,n,i;return t.preventDefault(),e=$(t.target),i=e.attr("href"),n=this.$editModePanes.filter(i),this.$editModeLinks.parent().removeClass("active hover"),e.parent().addClass("active hover"),this.$editModePanes.hide(),n.fadeIn(200),"#preview"===i?$.post(e.data("preview-url"),{content:this.editor.getValue()},function(t){return n.empty().append(t),n.syntaxHighlight()}):this.editor.focus()},e}()}.call(this),function(){this.Breakpoints=function(){function t(){}var e,n;return n=null,e=function(){function t(){this.setup()}var e;return e=["xs","sm","md","lg"],t.prototype.setup=function(){var t,n;return t=e.map(function(t){return".device-"+t}),$(t.join(",")).length?void 0:(n=$.map(e,function(t){return"<div class='device-"+t+" visible-"+t+"'></div>"}),$("body").append(n.join("")))},t.prototype.visibleDevice=function(){var t;return t=e.map(function(t){return".device-"+t}),$(t.join(",")).filter(":visible")},t.prototype.getBreakpointSize=function(){var t;return t=this.visibleDevice,t().length||this.setup(),t=this.visibleDevice(),t.attr("class").split("visible-")[1]},t}(),t.get=function(){return null!=n?n:n=new e},t}(),$(function(t){return function(){return t.bp=Breakpoints.get()}}(this))}.call(this),function(){$(function(){var t;return $("input#broadcast_message_color").on("input",function(){var t;return t=$(this).val(),$("div.broadcast-message-preview").css("background-color",t)}),$("input#broadcast_message_font").on("input",function(){var t;return t=$(this).val(),$("div.broadcast-message-preview").css("color",t)}),t=$("textarea#broadcast_message_message").data("preview-path"),$("textarea#broadcast_message_message").on("input",function(){var e;return e=$(this).val(),""===e?$(".js-broadcast-message-preview").text("Your message here"):$.ajax({url:t,type:"POST",data:{broadcast_message:{message:e}}})})})}.call(this),function(){this.BuildArtifacts=function(){function t(){this.disablePropagation(),this.setupEntryClick()}return t.prototype.disablePropagation=function(){return $(".top-block").on("click",".download",function(t){return t.stopPropagation()}),$(".tree-holder").on("click","tr[data-link] a",function(t){return t.stopImmediatePropagation()})},t.prototype.setupEntryClick=function(){return $(".tree-holder").on("click","tr[data-link]",function(t){return window.location=this.dataset.link})},t}()}.call(this),function(){this.Calendar=function(){function t(t,e,n,i){var r;r=new CalHeatMap,r.init({itemName:["contribution"],data:t,start:new Date(e,n),domainLabelFormat:"%b",id:"cal-heatmap",domain:"month",subDomain:"day",range:12,tooltip:!0,label:{position:"top"},legend:[0,10,20,30],legendCellPadding:3,cellSize:$(".user-calendar").width()/73,onClick:function(t,e){var n;return n=t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate(),$.ajax({url:i,data:{date:n},cache:!1,dataType:"html",success:function(t){return $(".user-calendar-activities").html(t)}})}})}return t}()}.call(this),function(){this.Pager={init:function(t,e,n){return this.limit=null!=t?t:0,this.disable=null!=n?n:!1,this.loading=$(".loading").first(),e?(this.offset=0,this.getOld()):this.offset=this.limit,this.initLoadMore()},getOld:function(){return this.loading.show(),$.ajax({type:"GET",url:$(".content_list").data("href")||location.href,data:"limit="+this.limit+"&offset="+this.offset,complete:function(t){return function(){return t.loading.hide()}}(this),success:function(t){return Pager.append(t.count,t.html)},dataType:"json"})},append:function(t,e){return $(".content_list").append(e),t>0?this.offset+=t:this.disable=!0},initLoadMore:function(){return $(document).unbind("scroll"),$(document).endlessScroll({bottomPixels:400,fireDelay:1e3,fireOnce:!0,ceaseFire:function(){return Pager.disable},callback:function(t){return function(e){return t.loading.is(":visible")?void 0:(t.loading.show(),Pager.getOld())}}(this)})}}}.call(this),function(t){window.NestedFormEvents=function(){this.addFields=t.proxy(this.addFields,this),this.removeFields=t.proxy(this.removeFields,this)},NestedFormEvents.prototype={addFields:function(e){var n=e.currentTarget,i=t(n).data("association"),r=t("#"+t(n).data("blueprint-id")),o=r.data("blueprint"),s=(t(n).closest(".fields").closestChild("input, textarea, select").eq(0).attr("name")||"").replace(new RegExp("[[a-z_]+]$"),"");if(s)for(var a=s.match(/[a-z_]+_attributes(?=\]\[(new_)?\d+\])/g)||[],l=s.match(/[0-9]+/g)||[],c=0;c<a.length;c++)l[c]&&(o=o.replace(new RegExp("(_"+a[c]+")_.+?_","g"),"$1_"+l[c]+"_"),o=o.replace(new RegExp("(\\["+a[c]+"\\])\\[.+?\\]","g"),"$1["+l[c]+"]"));var h=new RegExp("new_"+i,"g"),u=this.newId();o=t.trim(o.replace(h,u));var d=this.insertFields(o,i,n);return d.trigger({type:"nested:fieldAdded",field:d}).trigger({type:"nested:fieldAdded:"+i,field:d}),!1},newId:function(){return(new Date).getTime()},insertFields:function(e,n,i){var r=t(i).data("target");return r?t(e).appendTo(t(r)):t(e).insertBefore(i)},removeFields:function(e){var n=t(e.currentTarget),i=n.data("association"),r=n.prev("input[type=hidden]");r.val("1");var o=n.closest(".fields");return o.hide(),o.trigger({type:"nested:fieldRemoved",field:o}).trigger({type:"nested:fieldRemoved:"+i,field:o}),!1}},window.nestedFormEvents=new NestedFormEvents,t(document).delegate("form a.add_nested_fields","click",nestedFormEvents.addFields).delegate("form a.remove_nested_fields","click",nestedFormEvents.removeFields)}(jQuery),/*
 * Copyright 2011, Tobias Lindig
 *
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 */
function(t){t.fn.closestChild=function(e){if(e&&""!=e){var n=[];for(n.push(this);n.length>0;)for(var i=n.shift(),r=i.children(),o=0;o<r.length;++o){var s=t(r[o]);if(s.is(e))return s;n.push(s)}}return t()}}(jQuery),function(){var t;t=function(){function t(e,n){clearInterval(t.interval),this.initScrollButtonAffix(),("running"===n||"pending"===n)&&($("#autoscroll-button").bind("click",function(){var t;return t=$(this).data("state"),"enabled"===t?($(this).data("state","disabled"),$(this).text("enable autoscroll")):($(this).data("state","enabled"),$(this).text("disable autoscroll"))}),t.interval=setInterval(function(t){return function(){return window.location.href.split("#").first()===e?$.ajax({url:e,dataType:"json",success:function(i){return"running"===i.status?($("#build-trace code").html(i.trace_html),$("#build-trace code").append('<i class="fa fa-refresh fa-spin"/>'),t.checkAutoscroll()):i.status!==n?Turbolinks.visit(e):void 0}}):void 0}}(this),4e3))}return t.interval=null,t.prototype.checkAutoscroll=function(){return"enabled"===$("#autoscroll-button").data("state")?$("html,body").scrollTop($("#build-trace").height()):void 0},t.prototype.initScrollButtonAffix=function(){var t,e,n;return e=$("#js-build-scroll"),t=$("body"),n=$("#build-trace"),e.affix({offset:{bottom:function(){return t.outerHeight()-(n.outerHeight()+n.offset().top)}}})},t}(),this.CiBuild=t}.call(this),function(){$(document).on("click",".badge-codes-toggle",function(){return $(".badge-codes-block").toggleClass("hide"),!1})}.call(this),function(){$(document).on("click",".edit-runner-link",function(t){var e,n,i,r;return t.preventDefault(),e=$(this).closest(".runner-description").first(),e.addClass("hide"),i=e.next(".runner-description-form"),n=i.find("input.description"),r=n.val(),i.removeClass("hide"),i.find(".cancel").on("click",function(t){return t.preventDefault(),i.addClass("hide"),n.val(r),e.removeClass("hide")})}),$(document).on("click",".assign-all-runner",function(){return $(this).replaceWith('<i class="fa fa-refresh fa-spin"></i> Assign in progress..')}),window.unbindEvents=function(){return $(document).unbind("scroll"),$(document).off("scroll")},document.addEventListener("page:fetch",unbindEvents)}.call(this),function(){this.Commit=function(){function t(){$(".files .diff-file").each(function(){return new CommitFile(this)})}return t}()}.call(this),function(){this.CommitFile=function(){function t(t){$(".image",t).length&&new ImageFile(t)}return t}()}.call(this),function(){this.ImageFile=function(){function t(t){this.file=t,this.requestImageInfo($(".two-up.view .frame.deleted img",this.file),function(t){return function(e,n){return t.requestImageInfo($(".two-up.view .frame.added img",t.file),function(i,r){return i===e&&r===n?t.initViewModes():t.initView("two-up")})}}(this))}var e;return t.availWidth=900,t.viewModes=["two-up","swipe"],t.prototype.initViewModes=function(){var e;return e=t.viewModes[0],$(".view-modes",this.file).removeClass("hide"),$(".view-modes-menu",this.file).on("click","li",function(t){return function(e){return $(e.currentTarget).hasClass("active")?void 0:t.activateViewMode(e.currentTarget.className)}}(this)),this.activateViewMode(e)},t.prototype.activateViewMode=function(t){return $(".view-modes-menu li",this.file).removeClass("active").filter("."+t).addClass("active"),$(".view:visible:not(."+t+")",this.file).fadeOut(200,function(e){return function(){return $(".view."+t,e.file).fadeIn(200),e.initView(t)}}(this))},t.prototype.initView=function(t){return this.views[t].call(this)},e=function(t){var e,n;return n=0,e=0,$(".frame",t).each(function(t){return function(t,i){var r,o;return o=$(i).width(),r=$(i).height(),n=o>n?o:n,e=r>e?r:e}}(this)).css({width:n,height:e}),[n,e]},t.prototype.views={"two-up":function(){return $(".two-up.view .wrap",this.file).each(function(e){return function(n,i){return $("img",i).each(function(){var e;return e=$(this).width(),e>t.availWidth/2?$(this).width(t.availWidth/2):void 0}),e.requestImageInfo($("img",i),function(t,e){return $(".image-info .meta-width",i).text(t+"px"),$(".image-info .meta-height",i).text(e+"px"),$(".image-info",i).removeClass("hide")})}}(this))},swipe:function(){var t,n;return n=0,t=0,$(".swipe.view",this.file).each(function(i){return function(i,r){var o;return o=e(r),n=o[0],t=o[1],$(".swipe-frame",r).css({width:n+16,height:t+28}),$(".swipe-wrap",r).css({width:n+1,height:t+2}),$(".swipe-bar",r).css({left:0}).draggable({axis:"x",containment:"parent",drag:function(t){return $(".swipe-wrap",r).width(n+1-$(this).position().left)},stop:function(t){return $(".swipe-wrap",r).width(n+1-$(this).position().left)}})}}(this))},"onion-skin":function(){var t,n,i;return i=0,n=0,t=$(".drag-track",this.file).width()-$(".dragger",this.file).width(),$(".onion-skin.view",this.file).each(function(r){return function(r,o){var s;return s=e(o),i=s[0],n=s[1],$(".onion-skin-frame",o).css({width:i+16,height:n+28}),$(".swipe-wrap",o).css({width:i+1,height:n+2}),$(".dragger",o).css({left:t}).draggable({axis:"x",containment:"parent",drag:function(e){return $(".frame.added",o).css("opacity",$(this).position().left/t)},stop:function(e){return $(".frame.added",o).css("opacity",$(this).position().left/t)}})}}(this))}},t.prototype.requestImageInfo=function(t,e){var n;return n=t.get(0),n?n.complete?e.call(this,n.naturalWidth,n.naturalHeight):t.on("load",function(t){return function(){return e.call(t,n.naturalWidth,n.naturalHeight)}}(this)):void 0},t}()}.call(this),function(){this.CommitsList=function(){function t(){}return t.timer=null,t.init=function(t){return $("body").on("click",".day-commits-table li.commit",function(t){return"A"!==t.target.nodeName?(location.href=$(this).attr("url"),e.stopPropagation(),!1):void 0}),Pager.init(t,!1),this.content=$("#commits-list"),this.searchField=$("#commits-search"),this.initSearch()},t.initSearch=function(){return this.timer=null,this.searchField.keyup(function(t){return function(){return clearTimeout(t.timer),t.timer=setTimeout(t.filterResults,500)}}(this))},t.filterResults=function(){var e,n,i;return n=$(".commits-search-form"),i=t.searchField.val(),e=n.attr("action")+"?"+n.serialize(),t.content.fadeTo("fast",.5),$.ajax({type:"GET",url:n.attr("action"),data:n.serialize(),complete:function(){return t.content.fadeTo("fast",1)},success:function(n){return t.content.html(n.html),history.replaceState({page:e},document.title,e)},dataType:"json"})},t}()}.call(this),function(){this.Compare=function(){function t(t){this.opts=t,this.source_loading=$(".js-source-loading"),this.target_loading=$(".js-target-loading"),$(".js-compare-dropdown").each(function(t){return function(e,n){var i;return i=$(n),i.glDropdown({selectable:!0,fieldName:i.data("field-name"),filterable:!0,id:function(t,e){return e.data("id")},toggleLabel:function(t,e){return e.text().trim()},clicked:function(e,n){return i.is(".js-target-branch")?t.getTargetHtml():i.is(".js-source-branch")?t.getSourceHtml():i.is(".js-target-project")?t.getTargetProject():void 0}})}}(this)),this.initialState()}return t.prototype.initialState=function(){return this.getSourceHtml(),this.getTargetHtml()},t.prototype.getTargetProject=function(){return $.ajax({url:this.opts.targetProjectUrl,data:{target_project_id:$("input[name='merge_request[target_project_id]']").val()},beforeSend:function(){return $(".mr_target_commit").empty()},success:function(t){return $(".js-target-branch-dropdown .dropdown-content").html(t)}})},t.prototype.getSourceHtml=function(){return this.sendAjax(this.opts.sourceBranchUrl,this.source_loading,".mr_source_commit",{ref:$("input[name='merge_request[source_branch]']").val()})},t.prototype.getTargetHtml=function(){return this.sendAjax(this.opts.targetBranchUrl,this.target_loading,".mr_target_commit",{target_project_id:$("input[name='merge_request[target_project_id]']").val(),ref:$("input[name='merge_request[target_branch]']").val()})},t.prototype.sendAjax=function(t,e,n,i){var r;return r=$(n),$.ajax({url:t,data:i,beforeSend:function(){return e.show(),r.empty()},success:function(t){return e.hide(),r.html(t),$(".js-timeago",r).timeago()}})},t}()}.call(this),function(){this.ConfirmDangerModal=function(){function t(t,e){var n,i;this.form=t,$(".js-confirm-text").text(e||""),$(".js-confirm-danger-input").val(""),$("#modal-confirm-danger").modal("show"),n=$(".js-confirm-danger-match").text(),i=$(".js-confirm-danger-submit"),i.disable(),$(".js-confirm-danger-input").off("input"),$(".js-confirm-danger-input").on("input",function(){return rstrip($(this).val())===n?i.enable():i.disable()}),$(".js-confirm-danger-submit").off("click"),$(".js-confirm-danger-submit").on("click",function(t){return function(){return t.form.submit()}}(this))}return t}()}.call(this),/*!
 * clipboard.js v1.4.2
 * https://zenorocha.github.io/clipboard.js
 *
 * Licensed MIT © Zeno Rocha
 */
function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){return function t(e,n,i){function r(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=n[s]={exports:{}};e[s][0].call(h.exports,function(t){var n=e[s][1][t];return r(n?n:t)},h,h.exports,t,e,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(t,e,n){var i=t("closest"),r=t("component-event"),o=["focus","blur"];n.bind=function(t,e,n,s,a){return-1!==o.indexOf(n)&&(a=!0),r.bind(t,n,function(n){var r=n.target||n.srcElement;n.delegateTarget=i(r,e,!0,t),n.delegateTarget&&s.call(t,n)},a)},n.unbind=function(t,e,n,i){-1!==o.indexOf(e)&&(i=!0),r.unbind(t,e,n,i)}},{closest:2,"component-event":4}],2:[function(t,e,n){var i=t("matches-selector");e.exports=function(t,e,n){for(var r=n?t:t.parentNode;r&&r!==document;){if(i(r,e))return r;r=r.parentNode}}},{"matches-selector":3}],3:[function(t,e,n){function i(t,e){if(o)return o.call(t,e);for(var n=t.parentNode.querySelectorAll(e),i=0;i<n.length;++i)if(n[i]==t)return!0;return!1}var r=Element.prototype,o=r.matchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector;e.exports=i},{}],4:[function(t,e,n){var i=window.addEventListener?"addEventListener":"attachEvent",r=window.removeEventListener?"removeEventListener":"detachEvent",o="addEventListener"!==i?"on":"";n.bind=function(t,e,n,r){return t[i](o+e,n,r||!1),n},n.unbind=function(t,e,n,i){return t[r](o+e,n,i||!1),n}},{}],5:[function(t,e,n){function i(){}i.prototype={on:function(t,e,n){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var i=this,r=function(){i.off(t,r),e.apply(n,arguments)};return this.on(t,r,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,r=n.length;for(i;r>i;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],r=[];if(i&&e)for(var o=0,s=i.length;s>o;o++)i[o].fn!==e&&r.push(i[o]);return r.length?n[t]=r:delete n[t],this}},e.exports=i},{}],6:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){i(this,t),this.resolveOptions(e),this.initSelection()}return t.prototype.resolveOptions=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""},t.prototype.initSelection=function(){if(this.text&&this.target)throw new Error('Multiple attributes declared, use either "target" or "text"');if(this.text)this.selectFake();else{if(!this.target)throw new Error('Missing required attributes, use either "target" or "text"');this.selectTarget()}},t.prototype.selectFake=function(){var t=this;this.removeFake(),this.fakeHandler=document.body.addEventListener("click",function(){return t.removeFake()}),this.fakeElem=document.createElement("textarea"),this.fakeElem.style.position="absolute",this.fakeElem.style.left="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.selectedText=this.text,document.body.appendChild(this.fakeElem),this.fakeElem.select(),this.copyText()},t.prototype.removeFake=function(){this.fakeHandler&&(document.body.removeEventListener("click"),this.fakeHandler=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},t.prototype.selectTarget=function(){if("INPUT"===this.target.nodeName||"TEXTAREA"===this.target.nodeName)this.target.select(),this.selectedText=this.target.value;else{var t=document.createRange(),e=window.getSelection();e.removeAllRanges(),t.selectNodeContents(this.target),e.addRange(t),this.selectedText=e.toString()}this.copyText()},t.prototype.copyText=function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)},t.prototype.handleResult=function(t){t?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},t.prototype.clearSelection=function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},t.prototype.destroy=function(){this.removeFake()},r(t,[{key:"action",set:function(){var t=arguments.length<=0||void 0===arguments[0]?"copy":arguments[0];if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!=typeof t||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');this._target=t}},get:function(){return this._target}}]),t}();n["default"]=o,e.exports=n["default"]},{}],7:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}n.__esModule=!0;var a=t("./clipboard-action"),l=i(a),c=t("delegate-events"),h=i(c),u=t("tiny-emitter"),d=i(u),f=function(t){function e(n,i){r(this,e),t.call(this),this.resolveOptions(i),this.delegateClick(n)}return o(e,t),e.prototype.resolveOptions=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText},e.prototype.delegateClick=function(t){var e=this;this.binding=h["default"].bind(document.body,t,"click",function(t){return e.onClick(t)})},e.prototype.undelegateClick=function(){h["default"].unbind(document.body,"click",this.binding)},e.prototype.onClick=function(t){this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l["default"]({action:this.action(t.delegateTarget),target:this.target(t.delegateTarget),text:this.text(t.delegateTarget),trigger:t.delegateTarget,emitter:this})},e.prototype.defaultAction=function(t){return s("action",t)},e.prototype.defaultTarget=function(t){var e=s("target",t);return e?document.querySelector(e):void 0},e.prototype.defaultText=function(t){return s("text",t)},e.prototype.destroy=function(){this.undelegateClick(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},e}(d["default"]);n["default"]=f,e.exports=n["default"]},{"./clipboard-action":6,"delegate-events":1,"tiny-emitter":5}]},{},[7])(7)}),function(){var t,e,n;e=function(t){return n(t.trigger,"Copied!"),t.clearSelection(),$(t.trigger).blur()},t=function(t){var e;return e=/Mac/i.test(navigator.userAgent)?"&#8984;":"Ctrl",n(t.trigger,"Press "+e+"-C to copy")},n=function(t,e){return $(t).tooltip({container:"body",html:"true",placement:"auto bottom",title:e,trigger:"manual"}).tooltip("show").one("mouseleave",function(){return $(this).tooltip("hide")})},$(function(){var n;return n=new Clipboard("[data-clipboard-target], [data-clipboard-text]"),n.on("success",e),n.on("error",t)})}.call(this),function(){this.Diff=function(){function t(){$(document).off("click",".js-unfold"),$(document).on("click",".js-unfold",function(t){return function(n){var i,r,o,s,a,l,c,h,u,d,f,p,g,m;return f=$(n.target),m=f.hasClass("js-unfold-bottom"),g=!0,h=t.lineNumbers(f.parent()),s=h[0],i=h[1],o=i-s,m?(i+=1,d=i,p=i+e):(u=t.lineNumbers(f.parent().prev()),c=u[0],l=u[1],i-=1,p=i,i-e>l+1?d=i-e:(d=l+1,g=!1)),r=f.parents(".diff-file").attr("data-blob-diff-path"),a={since:d,to:p,bottom:m,offset:o,unfold:g,indent:1},$.get(r,a,function(t){return f.parent().replaceWith(t)})}}(this))}var e;return e=20,t.prototype.lineNumbers=function(t){var e,n,i,r,o,s,a;if(!t.children().length)return[0,0];for(s=t.children().slice(0,2),o=function(){var t,e,i;for(i=[],t=0,e=s.length;e>t;t++)n=s[t],i.push($(n).attr("data-linenumber"));return i}(),a=[],e=0,i=o.length;i>e;e++)r=o[e],a.push(parseInt(r));return a},t}()}.call(this),function(){var t;$(function(){return new t}),t=function(){function t(){this.initSearch(),this.initPageScripts()}return t.prototype.initPageScripts=function(){var t,e,n;if(t=$("body").attr("data-page"),!t)return!1;switch(e=t.split(":"),n=null,t){case"projects:issues:index":Issues.init(),Issuable.init(),n=new ShortcutsNavigation;break;case"projects:issues:show":new Issue,n=new ShortcutsIssuable,new ZenMode;break;case"projects:milestones:show":case"groups:milestones:show":case"dashboard:milestones:show":new Milestone;break;case"dashboard:todos:index":new Todos;break;case"projects:milestones:new":case"projects:milestones:edit":new ZenMode,new GLForm($(".milestone-form"));break;case"groups:milestones:new":new ZenMode;break;case"projects:compare:show":new Diff;break;case"projects:issues:new":case"projects:issues:edit":n=new ShortcutsNavigation,new GLForm($(".issue-form")),new IssuableForm($(".issue-form"));break;case"projects:merge_requests:new":case"projects:merge_requests:edit":new Diff,n=new ShortcutsNavigation,new GLForm($(".merge-request-form")),new IssuableForm($(".merge-request-form"));break;case"projects:tags:new":new ZenMode,new GLForm($(".tag-form"));break;case"projects:releases:edit":new ZenMode,new GLForm($(".release-form"));break;case"projects:merge_requests:show":new Diff,n=new ShortcutsIssuable(!0),new ZenMode;break;case"projects:merge_requests:diffs":new Diff,new ZenMode;break;case"projects:merge_requests:index":n=new ShortcutsNavigation,Issuable.init();break;case"dashboard:activity":new Activities;break;case"dashboard:projects:starred":new Activities;break;case"projects:commit:show":new Commit,new Diff,new ZenMode,n=new ShortcutsNavigation;break;case"projects:commits:show":n=new ShortcutsNavigation;break;case"projects:activity":n=new ShortcutsNavigation;break;case"projects:show":n=new ShortcutsNavigation,$("#tree-slider").length&&new TreeView;break;case"groups:activity":new Activities;break;case"groups:show":n=new ShortcutsNavigation;break;case"groups:group_members:index":new GroupMembers,new UsersSelect;break;case"projects:project_members:index":new ProjectMembers,new UsersSelect;break;case"groups:new":case"groups:edit":case"admin:groups:edit":case"admin:groups:new":new GroupAvatar;break;case"projects:tree:show":n=new ShortcutsNavigation,new TreeView;break;case"projects:find_file:show":n=!0;break;case"projects:blob:show":case"projects:blame:show":new LineHighlighter,n=new ShortcutsNavigation;break;case"projects:labels:new":case"projects:labels:edit":new Labels;break;case"projects:network:show":n=!0;break;case"projects:forks:new":new ProjectFork;break;case"projects:artifacts:browse":new BuildArtifacts;break;case"projects:group_links:index":new GroupsSelect}switch(e.first()){case"admin":switch(new Admin,e[1]){case"groups":new UsersSelect;break;case"projects":new NamespaceSelect}break;case"dashboard":n=new ShortcutsDashboardNavigation;break;case"profiles":new Profile;break;case"projects":switch(new Project,new ProjectAvatar,e[1]){case"compare":n=new ShortcutsNavigation;break;case"edit":n=new ShortcutsNavigation,new ProjectNew;break;case"new":new ProjectNew;break;case"show":new ProjectShow;break;case"wikis":new Wikis,n=new ShortcutsNavigation,new ZenMode,new GLForm($(".wiki-form"));break;case"snippets":n=new ShortcutsNavigation,"show"===e[2]&&new ZenMode;break;case"labels":case"graphs":n=new ShortcutsNavigation;break;case"project_members":case"deploy_keys":case"hooks":case"services":case"protected_branches":n=new ShortcutsNavigation}}return n?void 0:new Shortcuts},t.prototype.initSearch=function(){return $(".search").length?new SearchAutocomplete:void 0},t}()}.call(this),function(){var t,e,n,i;this.MarkdownPreview=function(){function t(){}return t.prototype.referenceThreshold=10,t.prototype.ajaxCache={},t.prototype.showPreview=function(t){var e,n;return n=t.find(".js-md-preview"),e=t.find("textarea.markdown-area").val(),0===e.trim().length?(n.text("Nothing to preview."),this.hideReferencedUsers(t)):(n.text("Loading..."),this.renderMarkdown(e,function(e){return function(i){return n.html(i.body),n.syntaxHighlight(),e.renderReferencedUsers(i.references.users,t)}}(this)))},t.prototype.renderMarkdown=function(t,e){return window.markdown_preview_path?t===this.ajaxCache.text?e(this.ajaxCache.response):$.ajax({type:"POST",url:window.markdown_preview_path,data:{text:t},dataType:"json",success:function(n){return function(i){return n.ajaxCache={text:t,response:i},e(i)}}(this)}):void 0},t.prototype.hideReferencedUsers=function(t){var e;return e=t.find(".referenced-users"),e.hide()},t.prototype.renderReferencedUsers=function(t,e){var n;return n=e.find(".referenced-users"),n.length?t.length>=this.referenceThreshold?(n.show(),n.find(".js-referenced-users-count").text(t.length)):n.hide():void 0},t}(),e=new MarkdownPreview,n=".js-md-preview-button",i=".js-md-write-button",t=null,$.fn.setupMarkdownPreview=function(){var t,n;return t=$(this),n=t.find("textarea.markdown-area"),n.on("input",function(){return e.hideReferencedUsers(t)}),n.on("blur",function(){return e.showPreview(t)})},$(document).on("markdown-preview:show",function(r,o){return o?(t=o.find("textarea.markdown-area"),o.find(i).parent().removeClass("active"),o.find(n).parent().addClass("active"),o.find(".md-write-holder").hide(),o.find(".md-preview-holder").show(),e.showPreview(o)):void 0}),$(document).on("markdown-preview:hide",function(e,r){return r?(t=null,r.find(i).parent().addClass("active"),r.find(n).parent().removeClass("active"),r.find(".md-write-holder").show(),r.find("textarea.markdown-area").focus(),r.find(".md-preview-holder").hide()):void 0}),$(document).on("markdown-preview:toggle",function(e,n){var i;return i=$(n.target),i.is("textarea.markdown-area")?($(document).triggerHandler("markdown-preview:show",[i.closest("form")]),n.preventDefault()):t?(i=t,$(document).triggerHandler("markdown-preview:hide",[i.closest("form")]),n.preventDefault()):void 0}),$(document).on("click",n,function(t){var e;return t.preventDefault(),e=$(this).closest("form"),$(document).triggerHandler("markdown-preview:show",[e])}),$(document).on("click",i,function(t){var e;return t.preventDefault(),e=$(this).closest("form"),$(document).triggerHandler("markdown-preview:hide",[e])})}.call(this),function(){this.DropzoneInput=function(){function t(t){var e,n,i,r,o,s,a,l,c,h,u,d,f,p,g,m,v,y,w,b,x,C,A,E,k,F,_;Dropzone.autoDiscover=!1,i="alert alert-danger alert-dismissable div-dropzone-alert",n='class="close" data-dismiss="alert"aria-hidden="true"',h='<div class="div-dropzone-hover"></div>',u='<div class="div-dropzone-spinner"></div>',c='<div class="'+i+'"></div>',v='<i class="fa fa-paperclip div-dropzone-icon"></i>',y='<i class="fa fa-spinner fa-spin div-dropzone-icon"></i>',_=$('<div class="div-dropzone-progress"></div>'),o='<button type="button"'+n+">&times;</button>",A=window.project_uploads_path||null,x=gon.max_file_size||10,p=$(t).find(".js-gfm-input"),p.wrap('<div class="div-dropzone"></div>'),p.on("paste",function(t){return function(t){return m(t)}}(this)),e=$(p).closest(".md-area"),$(t).setupMarkdownPreview(),f=$(t).find(".div-dropzone"),f.parent().addClass("div-dropzone-wrapper"),f.append(h),f.find(".div-dropzone-hover").append(v),f.append(u),f.find(".div-dropzone-spinner").append(y),f.find(".div-dropzone-spinner").append(_),f.find(".div-dropzone-spinner").css({opacity:0,display:"none"}),d=f.dropzone({url:A,dictDefaultMessage:"",clickable:!0,paramName:"file",maxFilesize:x,uploadMultiple:!1,headers:{"X-CSRF-Token":$('meta[name="csrf-token"]').attr("content")},previewContainer:!1,processing:function(){return $(".div-dropzone-alert").alert("close")},dragover:function(){e.addClass("is-dropzone-hover"),t.find(".div-dropzone-hover").css("opacity",.7)},dragleave:function(){e.removeClass("is-dropzone-hover"),t.find(".div-dropzone-hover").css("opacity",0)},drop:function(){e.removeClass("is-dropzone-hover"),t.find(".div-dropzone-hover").css("opacity",0),p.focus()},success:function(t,e){C(e.link.markdown)},error:function(e,n){var i,r;r=$(t).find(".error-alert"),i=r.children().length,0===i&&(r.append(c),$(".div-dropzone-alert").append(o+n))},totaluploadprogress:function(t){_.text(Math.round(t)+"%")},sending:function(){f.find(".div-dropzone-spinner").css({opacity:.7,display:"inherit"})},queuecomplete:function(){_.text(""),$(".dz-preview").remove(),$(".markdown-area").trigger("input"),$(".div-dropzone-spinner").css({opacity:0,display:"none"})}}),s=$(d[0]).children("textarea"),m=function(t){var e,n,i,r;return i=t.originalEvent,i.clipboardData&&i.clipboardData.items&&(n=b(i))?(t.preventDefault(),e=g(i)||"image.png",r="{{"+e+"}}",C(r),F(n.getAsFile(),e)):void 0},b=function(t){var e,n;for(e=0;e<t.clipboardData.items.length;){if(n=t.clipboardData.items[e],-1!==n.type.indexOf("image"))return n;e++}return!1},C=function(t){var e,n,i,r,o;return r=$(s)[0].selectionStart,i=$(s)[0].selectionEnd,o=$(s).val().length,n=$(s).val().substring(0,r),e=$(s).val().substring(i,o),$(s).val(n+t+e),s.get(0).setSelectionRange(r+t.length,i+t.length),p.trigger("input")},g=function(t){var e;return window.clipboardData&&window.clipboardData.getData?e=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData&&(e=t.clipboardData.getData("text/plain")),e=e.split("\r"),e.first()},F=function(t,e){var n;return n=new FormData,n.append("file",t,e),$.ajax({url:A,type:"POST",data:n,dataType:"json",processData:!1,contentType:!1,headers:{"X-CSRF-Token":$('meta[name="csrf-token"]').attr("content")},beforeSend:function(){return k(),a()},success:function(t,n,i){return w(e,i.responseJSON.link.markdown)},error:function(t){return E(t.responseJSON.message)},complete:function(){return l()}})},w=function(t,e){return $(s).val(function(n,i){return i.replace("{{"+t+"}}",e+"\n")})},r=function(t){return $(s).val(function(e,n){return n+t+"\n"})},k=function(e){return t.find(".div-dropzone-spinner").css({opacity:.7,display:"inherit"})},l=function(){return t.find(".div-dropzone-spinner").css({opacity:0,display:"none"})},E=function(e){var n,i;return i=$(t).find(".error-alert"),n=i.children().length,0===n?(i.append(c),$(".div-dropzone-alert").append(o+e)):void 0},a=function(){return t.find(".div-dropzone-alert").alert("close")},t.find(".markdown-selector").click(function(t){t.preventDefault(),$(this).closest(".gfm-form").find(".div-dropzone").click()})}return t}()}.call(this),function(){this.DueDateSelect=function(){function t(){var t;t=$(".js-issuable-update .due_date").find(".block-loading").hide(),$(".js-due-date-select").each(function(e,n){var i,r,o,s,a,l,c,h,u,d,f;return o=$(n),s=o.closest(".dropdown"),r=s.find(".js-due-date-calendar"),i=o.closest(".block"),a=o.closest(".selectbox"),c=i.find(".value"),l=$(".js-due-date-sidebar-value",i),d=o.data("field-name"),h=o.data("ability-name"),f=o.data("issue-update"),o.glDropdown({hidden:function(){return a.hide(),c.removeAttr("style")}}),u=function(){var e,n,i,r;return r=$("input[name='"+d+"']").val(),n=new Date(r.replace(new RegExp("-","g"),",")),i=$.datepicker.formatDate("M d, yy",n),e={},e[h]={},e[h].due_date=r,$.ajax({type:"PUT",url:f,data:e,beforeSend:function(){return t.fadeIn(),o.trigger("loading.gl.dropdown"),a.hide(),c.removeAttr("style"),c.html(i),l.html(i)}}).done(function(e){return o.trigger("loaded.gl.dropdown"),o.dropdown("toggle"),t.fadeOut()})},r.datepicker({dateFormat:"yy-mm-dd",defaultDate:$("input[name='"+d+"']").val(),altField:"input[name='"+d+"']",onSelect:function(){return u()}})}),$(document).off("click",".ui-datepicker-header a").on("click",".ui-datepicker-header a",function(t){return t.stopImmediatePropagation()})}return t}()}.call(this),Array.prototype.first=function(){return this[0]},Array.prototype.last=function(){return this[this.length-1]},function(){this.Flash=function(){function t(t,e){var n;this.flash=$(".flash-container"),this.flash.html(""),n=$("<div/>",{"class":"flash-"+e,text:t}),n.appendTo(".flash-container"),this.flash.click(function(){return $(this).fadeOut()}),this.flash.show()}return t.prototype.pinTo=function(t){return this.flash.detach().appendTo(t)},t}()}.call(this),function(){null==window.GitLab&&(window.GitLab={}),GitLab.GfmAutoComplete={dataLoading:!1,dataSource:"",Emoji:{template:'<li>${name} <img alt="${name}" height="20" src="${path}" width="20" /></li>'},Members:{template:"<li>${username} <small>${title}</small></li>"},Issues:{template:"<li><small>${id}</small> ${title}</li>"},setup:function(t){return this.input=$(".js-gfm-input"),this.destroyAtWho(),this.setupAtWho(),this.dataSource&&!this.dataLoading?(this.dataLoading=!0,setTimeout(function(t){return function(){var e;return e=t.fetchData(t.dataSource),e.done(function(e){return t.dataLoading=!1,t.loadData(e)})}}(this),1e3)):void 0},setupAtWho:function(){return this.input.atwho({at:":",displayTpl:this.Emoji.template,insertTpl:":${name}:"}),this.input.atwho({at:"@",displayTpl:this.Members.template,insertTpl:"${atwho-at}${username}",searchKey:"search",callbacks:{beforeSave:function(t){return $.map(t,function(t){var e;return e=t.name,t.count&&(e+=" ("+t.count+")"),{username:t.username,title:sanitize(e),search:sanitize(t.username+" "+t.name)}})}}}),this.input.atwho({at:"#",alias:"issues",searchKey:"search",displayTpl:this.Issues.template,insertTpl:"${atwho-at}${id}",callbacks:{beforeSave:function(t){return $.map(t,function(t){return{id:t.iid,title:sanitize(t.title),search:t.iid+" "+t.title}})}}}),this.input.atwho({at:"!",alias:"mergerequests",searchKey:"search",displayTpl:this.Issues.template,insertTpl:"${atwho-at}${id}",callbacks:{beforeSave:function(t){return $.map(t,function(t){return{id:t.iid,title:sanitize(t.title),search:t.iid+" "+t.title}})}}})},destroyAtWho:function(){return this.input.atwho("destroy")},fetchData:function(t){return $.getJSON(t)},loadData:function(t){return this.input.atwho("load","@",t.members),this.input.atwho("load","issues",t.issues),this.input.atwho("load","mergerequests",t.mergerequests),this.input.atwho("load",":",t.emojis)}}}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=function(){function t(t,n){var i,r,o,s,a;null==n&&(n={}),this.onUploadImageBtnClick=e(this.onUploadImageBtnClick,this),this.onModalHide=e(this.onModalHide,this),this.onModalShow=e(this.onModalShow,this),this.onPickImageClick=e(this.onPickImageClick,this),this.fileInput=$(t),this.fileInput.attr("name",this.fileInput.attr("name")+"-trigger").attr("id",this.fileInput.attr("id")+"-trigger"),this.exportWidth=null!=(i=n.exportWidth)?i:200,this.exportHeight=null!=(r=n.exportHeight)?r:200,this.cropBoxWidth=null!=(o=n.cropBoxWidth)?o:200,this.cropBoxHeight=null!=(s=n.cropBoxHeight)?s:200,this.form=null!=(a=n.form)?a:this.fileInput.parents("form"),this.filename=n.filename,this.previewImage=n.previewImage,this.modalCrop=n.modalCrop,this.pickImageEl=n.pickImageEl,this.uploadImageBtn=n.uploadImageBtn,this.modalCropImg=n.modalCropImg,this.filename=this.getElement(this.filename),this.previewImage=this.getElement(this.previewImage),this.pickImageEl=this.getElement(this.pickImageEl),this.modalCrop=_.isString(this.modalCrop)?$(this.modalCrop):this.modalCrop,this.uploadImageBtn=_.isString(this.uploadImageBtn)?$(this.uploadImageBtn):this.uploadImageBtn,this.modalCropImg=_.isString(this.modalCropImg)?$(this.modalCropImg):this.modalCropImg,this.cropActionsBtn=this.modalCrop.find("[data-method]"),this.bindEvents()}var n;return n=/^.*[\\\/]/,t.prototype.getElement=function(t){return $(t,this.form)},t.prototype.bindEvents=function(){var t;return t=this,this.fileInput.on("change",function(e){return t.onFileInputChange(e,this)}),this.pickImageEl.on("click",this.onPickImageClick),this.modalCrop.on("shown.bs.modal",this.onModalShow),this.modalCrop.on("hidden.bs.modal",this.onModalHide),this.uploadImageBtn.on("click",this.onUploadImageBtnClick),this.cropActionsBtn.on("click",function(e){var n;return n=this,t.onActionBtnClick(n)}),this.croppedImageBlob=null},t.prototype.onPickImageClick=function(){return this.fileInput.trigger("click")},t.prototype.onModalShow=function(){var t;return t=this,this.modalCropImg.cropper({viewMode:1,center:!1,aspectRatio:1,modal:!0,scalable:!1,rotatable:!1,zoomable:!0,dragMode:"move",guides:!1,zoomOnTouch:!1,zoomOnWheel:!1,cropBoxMovable:!1,cropBoxResizable:!1,toggleDragModeOnDblclick:!1,built:function(){var e,n,i,r;return e=$(this),n=e.cropper("getContainerData"),r=t.cropBoxWidth,i=t.cropBoxHeight,e.cropper("setCropBoxData",{width:r,height:i,left:(n.width-r)/2,top:(n.height-i)/2})}})},t.prototype.onModalHide=function(){return this.modalCropImg.attr("src","").cropper("destroy")},t.prototype.onUploadImageBtnClick=function(t){return t.preventDefault(),this.setBlob(),this.setPreview(),this.modalCrop.modal("hide"),this.fileInput.val("")},t.prototype.onActionBtnClick=function(t){var e,n;return e=$(t).data(),this.modalCropImg.data("cropper")&&e.method?n=this.modalCropImg.cropper(e.method,e.option):void 0},t.prototype.onFileInputChange=function(t,e){return this.readFile(e)},t.prototype.readFile=function(t){var e,n;return e=this,n=new FileReader,n.onload=function(){return e.modalCropImg.attr("src",n.result),e.modalCrop.modal("show")},n.readAsDataURL(t.files[0])},t.prototype.dataURLtoBlob=function(t){var e,n,i,r,o,s;for(n=atob(t.split(",")[1]),e=[],r=i=0,o=n.length;o>i;r=++i)s=n[r],e.push(n.charCodeAt(r));return new Blob([new Uint8Array(e)],{type:"image/png"})},t.prototype.setPreview=function(){var t;return this.previewImage.attr("src",this.dataURL),t=this.fileInput.val().replace(n,""),this.filename.text(t)},t.prototype.setBlob=function(){return this.dataURL=this.modalCropImg.cropper("getCroppedCanvas",{width:200,height:200}).toDataURL("image/png"),this.croppedImageBlob=this.dataURLtoBlob(this.dataURL)},t.prototype.getBlob=function(){return this.croppedImageBlob},t}(),$.fn.glCrop=function(e){return this.each(function(){return $(this).data("glcrop",new t(this,e))})}}.call(this),function(){var t,e,n,i=function(t,e){return function(){return t.apply(e,arguments)}},r=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};e=function(){function t(t,n){var r,o,s,a;this.input=t,this.options=n,this.filterInputBlur=null!=(s=this.options.filterInputBlur)?s:!0,o=this.input.parent(),r=o.find(".js-dropdown-input-clear"),r.on("click",function(t){return function(e){return e.preventDefault(),e.stopPropagation(),t.input.val("").trigger("keyup").focus()}}(this)),a="",this.input.on("keyup",function(t){return function(n){var r;return r=n.which,e.indexOf(r)>=0?void 0:(""===t.input.val()||o.hasClass(i)?""===t.input.val()&&o.hasClass(i)&&o.removeClass(i):o.addClass(i),13===r?!1:(clearTimeout(a),a=setTimeout(function(){var e,n;return e=t.shouldBlur(r),n=t.input.val(),e&&t.filterInputBlur&&t.input.blur(),t.options.remote?t.options.query(n,function(e){return t.options.callback(e)}):t.filter(n)},250)))}}(this))}var e,n,i;return n=[27,40],e=[38,40],i="has-value",t.prototype.shouldBlur=function(t){return n.indexOf(t)>=0},t.prototype.filter=function(t){var e,n,i;return e=this.options.data(),null!=e?(i=e,""!==t&&(i=fuzzaldrinPlus.filter(e,t,{key:this.options.keys})),this.options.callback(i)):(n=this.options.elements(),t?n.each(function(){var e,n;return e=$(this),n=fuzzaldrinPlus.match(e.text().trim(),t),n.length?e.show():e.hide()}):n.show())},t}(),n=function(){function t(t,e){this.dataEndpoint=t,this.options=e}return t.prototype.execute=function(){return"string"==typeof this.dataEndpoint?this.fetchData():"function"==typeof this.dataEndpoint?(this.options.beforeSend&&this.options.beforeSend(),this.dataEndpoint("",function(t){return function(e){return t.options.success&&t.options.success(e),t.options.beforeSend?t.options.beforeSend():void 0}}(this))):void 0},t.prototype.fetchData=function(){return $.ajax({url:this.dataEndpoint,dataType:this.options.dataType,beforeSend:function(t){return function(){return t.options.beforeSend?t.options.beforeSend():void 0}}(this),success:function(t){return function(e){return t.options.success?t.options.success(e):void 0}}(this)})},t}(),t=function(){function t(t,r){var o,a,l,h,u,d,f;this.el=t,this.options=r,this.hidden=i(this.hidden,this),this.opened=i(this.opened,this),this.shouldPropagate=i(this.shouldPropagate,this),f=this,d=$(this.el).data("target"),this.dropdown=null!=d?$(d):$(this.el).parent(),o=this.options,this.filterInput=null!=(a=o.filterInput)?a:this.getElement(s),this.highlight=null!=(l=o.highlight)?l:!1,this.filterInputBlur=null!=(h=o.filterInputBlur)?h:!0,f=this,_.isString(this.filterInput)&&(this.filterInput=this.getElement(this.filterInput)),u=this.options.search?this.options.search.fields:[],this.options.data&&(_.isArray(this.options.data)?(this.fullData=this.options.data,this.parseData(this.options.data)):this.remote=new n(this.options.data,{dataType:this.options.dataType,beforeSend:this.toggleLoading.bind(this),success:function(t){return function(e){return t.fullData=e,t.parseData(t.fullData),t.options.filterable?t.filterInput.trigger("keyup"):void 0}}(this)})),this.options.filterable&&(this.filter=new e(this.filterInput,{filterInputBlur:this.filterInputBlur,remote:this.options.filterRemote,query:this.options.data,keys:u,elements:function(t){return function(){return d=".dropdown-content li:not(.divider)",t.dropdown.find(".dropdown-toggle-page").length&&(d=".dropdown-page-one "+d),$(d)}}(this),data:function(t){return function(){return t.fullData}}(this),callback:function(t){return function(e){return c=-1,t.parseData(e)}}(this)})),this.dropdown.on("shown.bs.dropdown",this.opened),this.dropdown.on("hidden.bs.dropdown",this.hidden),this.dropdown.on("click",".dropdown-menu, .dropdown-menu-close",this.shouldPropagate),this.dropdown.find(".dropdown-toggle-page").length&&this.dropdown.find(".dropdown-toggle-page, .dropdown-menu-back").on("click",function(t){return function(e){return e.preventDefault(),e.stopPropagation(),t.togglePage()}}(this)),this.options.selectable&&(d=".dropdown-content a",this.dropdown.find(".dropdown-toggle-page").length&&(d=".dropdown-page-one .dropdown-content a"),this.dropdown.on("click",d,function(t){var e,n;return e=$(this),n=f.rowClicked(e),f.options.clicked?f.options.clicked(n,e,t):void 0}))}var o,s,a,l,c;return a="is-loading",l="is-page-two",o="is-active",c=-1,s=".dropdown-input .dropdown-input-field",t.prototype.getElement=function(t){return this.dropdown.find(t)},t.prototype.toggleLoading=function(){return $(".dropdown-menu",this.dropdown).toggleClass(a)},t.prototype.togglePage=function(){var t;return t=$(".dropdown-menu",this.dropdown),t.hasClass(l)&&this.remote&&this.remote.execute(),t.toggleClass(l),this.dropdown.find('[class^="dropdown-page-"]:visible :text:visible:first').focus()},t.prototype.parseData=function(t){var e,n;return this.renderedData=t,n=$.map(t,function(t){return function(e){return t.renderItem(e)}}(this)),this.options.filterable&&0===t.length&&(n=[this.noResults()]),e=this.renderMenu(n.join("")),this.appendMenu(e)},t.prototype.shouldPropagate=function(t){var e;return this.options.multiSelect?(e=$(t.target),e.hasClass("dropdown-menu-close")||e.hasClass("dropdown-menu-close-icon")||e.data("is-link")?!0:(t.stopPropagation(),!1)):void 0},t.prototype.opened=function(){var t;return this.addArrowKeyEvent(),t=$(".dropdown-content",this.dropdown).html(),this.remote&&""===t&&this.remote.execute(),this.options.filterable&&this.filterInput.focus(),this.dropdown.trigger("shown.gl.dropdown")},t.prototype.hidden=function(t){return this.removeArrayKeyEvent(),this.options.filterable&&this.dropdown.find(".dropdown-input-field").blur().val("").trigger("keyup"),this.dropdown.find(".dropdown-toggle-page").length&&$(".dropdown-menu",this.dropdown).removeClass(l),
this.options.hidden&&this.options.hidden.call(this,t),this.dropdown.trigger("hidden.gl.dropdown")},t.prototype.renderMenu=function(t){var e;return e="",e=this.options.renderMenu?this.options.renderMenu(t):"<ul>"+t+"</ul>"},t.prototype.appendMenu=function(t){var e;return e=".dropdown-content",this.dropdown.find(".dropdown-toggle-page").length&&(e=".dropdown-page-one .dropdown-content"),$(e,this.dropdown).html(t)},t.prototype.renderItem=function(t){var e,n,i,r,o,s,a,l;return r="","divider"===t?"<li class='divider'></li>":"separator"===t?"<li class='separator'></li>":null!=t.header?"<li class='dropdown-header'>"+t.header+"</li>":(this.options.renderRow?r=this.options.renderRow(t):(o||(l=this.options.id?this.options.id(t):t.id,i=this.options.fieldName,n=this.dropdown.parent().find("input[name='"+i+"'][value='"+l+"']"),n.length&&(o=!0)),a=null!=this.options.url?this.options.url(t):null!=t.url?t.url:"#",s=null!=this.options.text?this.options.text(t):null!=t.text?t.text:"",e="",o&&(e="is-active"),this.highlight&&(s=this.highlightTextMatches(s,this.filterInput.val())),r="<li> <a href='"+a+"' class='"+e+"'> "+s+" </a> </li>"),r)},t.prototype.highlightTextMatches=function(t,e){var n;return n=fuzzaldrinPlus.match(t,e),t.split("").map(function(t,e){return r.call(n,e)>=0?"<b>"+t+"</b>":t}).join("")},t.prototype.noResults=function(){var t;return t="<li class='dropdown-menu-empty-link'> <a href='#' class='is-focused'> No matching results. </a> </li>"},t.prototype.highlightRow=function(t){var e;return""!==this.filterInput.val()?(e=".dropdown-content li:first-child a",this.dropdown.find(".dropdown-toggle-page").length&&(e=".dropdown-page-one .dropdown-content li:first-child a"),this.getElement(e).addClass("is-focused")):void 0},t.prototype.rowClicked=function(t){var e,n,i,r,s,a;return n=this.options.fieldName,r=t.parent().index(),this.renderedData&&(s=this.renderedData[r]),a=this.options.id?this.options.id(s,t):s.id,e=this.dropdown.parent().find("input[name='"+n+"'][value='"+a+"']"),t.hasClass(o)?(t.removeClass(o),e.remove(),this.options.toggleLabel?$(this.el).find(".dropdown-toggle-text").text(this.options.toggleLabel):s):((!this.options.multiSelect||t.hasClass("dropdown-clear-active"))&&(this.dropdown.find("."+o).removeClass(o),this.dropdown.parent().find("input[name='"+n+"']").remove()),null==a&&e.remove(),t.addClass(o),this.options.toggleLabel&&$(this.el).find(".dropdown-toggle-text").text(this.options.toggleLabel(s,t)),null!=a&&(!e.length&&n?(i="<input type='hidden' name='"+n+"' value='"+a+"' />",null!=this.options.inputId&&(i=$(i).attr("id",this.options.inputId)),this.dropdown.before(i)):e.val(a)),s)},t.prototype.selectRowAtIndex=function(t){var e;return e=".dropdown-content li:not(.divider):eq("+t+") a",this.dropdown.find(".dropdown-toggle-page").length&&(e=".dropdown-page-one "+e),$(e,this.dropdown).trigger("click")},t.prototype.addArrowKeyEvent=function(){var t,e,n;return e=[38,40],t=this.dropdown.find(".dropdown-input-field"),n=".dropdown-content li:not(.divider)",this.dropdown.find(".dropdown-toggle-page").length&&(n=".dropdown-page-one "+n),$("body").on("keydown",function(t){return function(i){var r,o,s;return s=i.which,e.indexOf(s)>=0?(i.preventDefault(),i.stopImmediatePropagation(),o=c,r=$(n,t.dropdown),40===s?c<r.length-1&&(c+=1):38===s&&c>0&&(c-=1),c!==o&&t.highlightRowAtIndex(r,c),!1):13===s?t.selectRowAtIndex(c):void 0}}(this))},t.prototype.removeArrayKeyEvent=function(){return $("body").off("keydown")},t.prototype.highlightRowAtIndex=function(t,e){var n,i,r,o,s,a,l,c,h;return $(".is-focused",this.dropdown).removeClass("is-focused"),i=t.eq(e),i.find("a:first-child").addClass("is-focused"),n=i.closest(".dropdown-content"),a=n.scrollTop(),o=n.outerHeight(),s=n.prop("offsetTop"),r=s+o,c=i.outerHeight(),h=i.prop("offsetTop"),l=h+c,l>r+a?n.scrollTop(l-r):s+a>h?n.scrollTop(h-s):void 0},t}(),$.fn.glDropdown=function(e){return this.each(function(){return $.data(this,"glDropdown")?void 0:$.data(this,"glDropdown",new t(this,e))})}}.call(this),function(){this.GLForm=function(){function t(t){this.form=t,this.textarea=this.form.find("textarea.js-gfm-input"),this.destroy(),this.setupForm(),this.form.data("gl-form",this)}return t.prototype.destroy=function(){return this.clearEventListeners(),this.form.data("gl-form",null)},t.prototype.setupForm=function(){var t;return t=this.form.is(":not(.gfm-form)"),this.form.removeClass("js-new-note-form"),t&&(this.form.find(".div-dropzone").remove(),this.form.addClass("gfm-form"),disableButtonIfEmptyField(this.form.find(".js-note-text"),this.form.find(".js-comment-button")),GitLab.GfmAutoComplete.setup(),new DropzoneInput(this.form),autosize(this.textarea),this.addEventListeners()),this.form.find(".js-note-discard").hide(),this.form.show()},t.prototype.clearEventListeners=function(){return this.textarea.off("focus"),this.textarea.off("blur")},t.prototype.addEventListeners=function(){return this.textarea.on("focus",function(){return $(this).closest(".md-area").addClass("is-focused")}),this.textarea.on("blur",function(){return $(this).closest(".md-area").removeClass("is-focused")})},t}()}.call(this),function(){this.GroupAvatar=function(){function t(){$(".js-choose-group-avatar-button").bind("click",function(){var t;return t=$(this).closest("form"),t.find(".js-group-avatar-input").click()}),$(".js-group-avatar-input").bind("change",function(){var t,e;return e=$(this).closest("form"),t=$(this).val().replace(/^.*[\\\/]/,""),e.find(".js-avatar-filename").text(t)})}return t}()}.call(this),function(){this.GroupMembers=function(){function t(){$("li.group_member").bind("ajax:success",function(){return $(this).fadeOut()})}return t}()}.call(this),function(){var t=[].slice;this.GroupsSelect=function(){function e(){$(".ajax-groups-select").each(function(e){return function(n,i){var r;return r=$(i).hasClass("skip_ldap"),$(i).select2({placeholder:"Search for a group",multiple:$(i).hasClass("multiselect"),minimumInputLength:0,query:function(t){return Api.groups(t.term,r,function(e){var n;return n={results:e},t.callback(n)})},initSelection:function(t,e){var n;return n=$(t).val(),""!==n?Api.group(n,e):void 0},formatResult:function(){var n;return n=1<=arguments.length?t.call(arguments,0):[],e.formatResult.apply(e,n)},formatSelection:function(){var n;return n=1<=arguments.length?t.call(arguments,0):[],e.formatSelection.apply(e,n)},dropdownCssClass:"ajax-groups-dropdown",escapeMarkup:function(t){return t}})}}(this))}return e.prototype.formatResult=function(t){var e;return e=t.avatar_url?t.avatar_url:gon.default_avatar_url,"<div class='group-result'> <div class='group-name'>"+t.name+"</div> <div class='group-path'>"+t.path+"</div> </div>"},e.prototype.formatSelection=function(t){return t.name},e}()}.call(this),function(){this.ImporterStatus=function(){function t(t,e){this.jobs_url=t,this.import_url=e,this.initStatusPage(),this.setAutoUpdate()}return t.prototype.initStatusPage=function(){return $(".js-add-to-import").off("click").on("click",function(t){return function(e){var n,i,r,o;return o=null,n=$(e.currentTarget),i=n.closest("tr"),r=i.attr("id").replace("repo_",""),i.find(".import-target input").length>0&&(o=i.find(".import-target input").prop("value"),i.find(".import-target").empty().append(o+" / "+i.find(".import-target").data("project_name"))),n.disable().addClass("is-loading"),$.post(t.import_url,{repo_id:r,new_namespace:o},{dataType:"script"})}}(this)),$(".js-import-all").off("click").on("click",function(t){var e;return e=$(this),e.disable().addClass("is-loading"),$(".js-add-to-import").each(function(){return $(this).trigger("click")})})},t.prototype.setAutoUpdate=function(){return setInterval(function(t){return function(){return $.get(t.jobs_url,function(t){return $.each(t,function(t,e){var n,i;return n=$("#project_"+e.id),i=n.find(".job-status"),"finished"===e.import_status?(n.removeClass("active").addClass("success"),i.html('<span><i class="fa fa-check"></i> done</span>')):"started"===e.import_status?i.html("<i class='fa fa-spinner fa-spin'></i> started"):i.html(e.import_status)})})}}(this),4e3)},t}()}.call(this),function(){this.Issuable={init:function(){return Issuable.initTemplates(),Issuable.initSearch()},initTemplates:function(){return Issuable.labelRow=_.template('<% _.each(labels, function(label){ %> <span class="label-row"> <a href="#"><span class="label color-label has-tooltip" style="background-color: <%= label.color %>; color: <%= label.text_color %>" title="<%= _.escape(label.description) %>" data-container="body"><%= _.escape(label.title) %></span></a> </span> <% }); %>')},initSearch:function(){return this.timer=null,$("#issue_search").off("keyup").on("keyup",function(){return clearTimeout(this.timer),this.timer=setTimeout(function(){return Issuable.filterResults($("#issue_search_form"))},500)})},toggleLabelFilters:function(){var t;return t=$(".filtered-labels"),t.find(".label-row").length>0?t.removeClass("hidden"):t.addClass("hidden")},filterResults:function(t){return function(t){var e,n,i;return n=t.serialize(),$(".issues-holder, .merge-requests-holder").css("opacity","0.5"),e=t.attr("action"),i=e,i+=""+(e.indexOf("?")<0?"?":"&"),i+=n,$.ajax({type:"GET",url:e,data:n,complete:function(){return $(".issues-holder, .merge-requests-holder").css("opacity","1.0")},success:function(t){var e;return $(".issues-holder, .merge-requests-holder").html(t.html),history.replaceState({page:i},document.title,i),Issuable.reload(),Issuable.updateStateFilters(),e=$(".filtered-labels"),"function"==typeof Issuable.labelRow&&e.html(Issuable.labelRow(t)),Issuable.toggleLabelFilters()},dataType:"json"})}}(this),reload:function(){return Issues.created&&Issues.initChecks(),$("#filter_issue_search").val($("#issue_search").val())},updateStateFilters:function(){var t,e,n,i,r,o;for(o=$(".issues-state-filters"),n={},r=["author_id","milestone_title","assignee_id","issue_search"],t=0,e=r.length;e>t;t++)i=r[t],n[i]=gl.utils.getParameterValues(i)[0]||"";return o.length?o.find("a").each(function(){var t,e,i,r,o;return t=gl.utils.removeParamQueryString($(this).attr("href"),"label_name[]"),i=gl.utils.getParameterValues("label_name[]"),i?(e=function(){var t,e,n;for(n=[],t=0,e=i.length;e>t;t++)o=i[t],n.push("label_name[]="+o);return n}().join("&"),r=gl.utils.mergeUrlParams(n,t)+"&"+e):r=gl.utils.mergeUrlParams(n,t),$(this).attr("href",r)}):void 0}}}.call(this),function(){this.IssuableContext=function(){function t(t){this.initParticipants(),new UsersSelect(t),$("select.select2").select2({width:"resolve",dropdownAutoWidth:!0}),$(".issuable-sidebar .inline-update").on("change","select",function(){return $(this).submit()}),$(".issuable-sidebar .inline-update").on("change",".js-assignee",function(){return $(this).submit()}),$(document).off("click",".issuable-sidebar .dropdown-content a").on("click",".issuable-sidebar .dropdown-content a",function(t){return t.preventDefault()}),$(document).off("click",".edit-link").on("click",".edit-link",function(t){var e,n;return t.preventDefault(),e=$(this).parents(".block"),n=e.find(".selectbox"),n.is(":visible")?(n.hide(),e.find(".value").show()):(n.show(),e.find(".value").hide()),n.is(":visible")?setTimeout(function(){return e.find(".dropdown-menu-toggle").trigger("click")},0):void 0}),$(".right-sidebar").niceScroll()}return t.prototype.initParticipants=function(){var t;return t=this,$(document).on("click",".js-participants-more",this.toggleHiddenParticipants),$(".js-participants-author").each(function(e){return e>=t.PARTICIPANTS_ROW_COUNT?$(this).addClass("js-participants-hidden").hide():void 0})},t.prototype.toggleHiddenParticipants=function(t){var e,n,i;return t.preventDefault(),e=$(this).text().trim(),n=$(this).data("less-text"),i=$(this).data("original-text"),e===i?$(this).text(n):$(this).text(i),$(".js-participants-hidden").toggle()},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.IssuableForm=function(){function e(e){this.form=e,this.toggleWip=t(this.toggleWip,this),this.renderWipExplanation=t(this.renderWipExplanation,this),this.resetAutosave=t(this.resetAutosave,this),this.handleSubmit=t(this.handleSubmit,this),GitLab.GfmAutoComplete.setup(),new UsersSelect,new ZenMode,this.titleField=this.form.find("input[name*='[title]']"),this.descriptionField=this.form.find("textarea[name*='[description]']"),this.issueMoveField=this.form.find("#move_to_project_id"),this.titleField.length&&this.descriptionField.length&&(this.initAutosave(),this.form.on("submit",this.handleSubmit),this.form.on("click",".btn-cancel",this.resetAutosave),this.initWip())}return e.prototype.issueMoveConfirmMsg="Are you sure you want to move this issue to another project?",e.prototype.wipRegex=/^\s*(\[WIP\]\s*|WIP:\s*|WIP\s+)+\s*/i,e.prototype.initAutosave=function(){return new Autosave(this.titleField,[document.location.pathname,document.location.search,"title"]),new Autosave(this.descriptionField,[document.location.pathname,document.location.search,"description"])},e.prototype.handleSubmit=function(){var t,e;return(null!=(t=parseInt(null!=(e=this.issueMoveField)?e.val():void 0))?t:0)>0&&!confirm(this.issueMoveConfirmMsg)?!1:this.resetAutosave()},e.prototype.resetAutosave=function(){return this.titleField.data("autosave").reset(),this.descriptionField.data("autosave").reset()},e.prototype.initWip=function(){return this.$wipExplanation=this.form.find(".js-wip-explanation"),this.$noWipExplanation=this.form.find(".js-no-wip-explanation"),this.$wipExplanation.length&&this.$noWipExplanation.length?(this.form.on("click",".js-toggle-wip",this.toggleWip),this.titleField.on("keyup blur",this.renderWipExplanation),this.renderWipExplanation()):void 0},e.prototype.workInProgress=function(){return this.wipRegex.test(this.titleField.val())},e.prototype.renderWipExplanation=function(){return this.workInProgress()?(this.$wipExplanation.show(),this.$noWipExplanation.hide()):(this.$wipExplanation.hide(),this.$noWipExplanation.show())},e.prototype.toggleWip=function(t){return t.preventDefault(),this.workInProgress()?this.removeWip():this.addWip(),this.renderWipExplanation()},e.prototype.removeWip=function(){return this.titleField.val(this.titleField.val().replace(this.wipRegex,""))},e.prototype.addWip=function(){return this.titleField.val("WIP: "+this.titleField.val())},e}()}.call(this),function(){var t,e,n,i,r,o,s,a,l,c,h,u,d,f,p=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};l="[ ]",e="[x]",a=function(t){return t.replace(/([\[\]])/g,"\\$1").replace(/\s/,"\\s").replace("x","[xX]")},c=RegExp(""+a(l)),n=RegExp(""+a(e)),h=RegExp("^(?:\\s*(?:>\\s*)*(?:[-+*]|(?:\\d+\\.)))\\s*("+a(e)+"|"+a(l)+")\\s+(?!\\(.*?\\))(?=(?:\\[.*?\\]\\s*(?:\\[.*?\\]|\\(.*?\\))\\s*)*(?:[^\\[]|$))"),t=/^`{3}(?:\s*\w+)?[\S\s].*[\S\s]^`{3}$/gm,u=RegExp("^("+a(e)+"|"+a(l)+").+$","g"),f=function(i,r,o){var s,a,d,f;return s=i.replace(/\r/g,"").replace(t,"").replace(u,"").split("\n"),a=0,f=function(){var t,u,f,g;for(f=i.split("\n"),g=[],t=0,u=f.length;u>t;t++)d=f[t],p.call(s,d)>=0&&d.match(h)&&(a+=1,a===r&&(d=o?d.replace(c,e):d.replace(n,l))),g.push(d);return g}(),f.join("\n")},d=function(t){var e,n,i,r,o;return e=t.closest(".js-task-list-container"),n=e.find(".js-task-list-field"),o=1+e.find(".task-list-item-checkbox").index(t),i=t.prop("checked"),r=$.Event("tasklist:change"),n.trigger(r,[o,i]),r.isDefaultPrevented()?void 0:(n.val(f(n.val(),o,i)),n.trigger("change"),n.trigger("tasklist:changed",[o,i]))},$(document).on("change",".task-list-item-checkbox",function(){return d($(this))}),o=function(t){return t.find(".js-task-list-field").length>0?(t.find(".task-list-item").addClass("enabled").find(".task-list-item-checkbox").attr("disabled",null),t.addClass("is-task-list-enabled").trigger("tasklist:enabled")):void 0},s=function(t){var e,n,i,r;for(r=[],n=0,i=t.length;i>n;n++)e=t[n],r.push(o($(e)));return r},i=function(t){return t.find(".task-list-item").removeClass("enabled").find(".task-list-item-checkbox").attr("disabled","disabled"),t.removeClass("is-task-list-enabled").trigger("tasklist:disabled")},r=function(t){var e,n,r,o;for(o=[],n=0,r=t.length;r>n;n++)e=t[n],o.push(i($(e)));return o},$.fn.taskList=function(t){var e,n;return e=$(this).closest(".js-task-list-container"),n={enable:s,disable:r},n[t||"enable"](e)}}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.Issue=function(){function e(){this.submitNoteForm=t(this.submitNoteForm,this),this.disableTaskList(),$("a.btn-close").length&&(this.initTaskList(),this.initIssueBtnEventListeners()),this.initMergeRequests(),this.initRelatedBranches(),this.initCanCreateBranch()}return e.prototype.initTaskList=function(){return $(".detail-page-description .js-task-list-container").taskList("enable"),$(document).on("tasklist:changed",".detail-page-description .js-task-list-container",this.updateTaskList)},e.prototype.initIssueBtnEventListeners=function(){var t,e;return t=this,e="Unable to update this issue at this time.",$("a.btn-close, a.btn-reopen").on("click",function(n){var i,r,o,s;return n.preventDefault(),n.stopImmediatePropagation(),i=$(this),r=i.hasClass("btn-close"),o=i.hasClass("btn-comment"),o&&t.submitNoteForm(i.closest("form")),i.prop("disabled",!0),s=i.attr("href"),$.ajax({type:"PUT",url:s,error:function(t,n,i){var o;return o=r?"close":"open",new Flash(e,"alert")},success:function(t,n,o){return"id"in t?($(document).trigger("issuable:change"),r?($("a.btn-close").addClass("hidden"),$("a.btn-reopen").removeClass("hidden"),$("div.status-box-closed").removeClass("hidden"),$("div.status-box-open").addClass("hidden")):($("a.btn-reopen").addClass("hidden"),$("a.btn-close").removeClass("hidden"),$("div.status-box-closed").addClass("hidden"),$("div.status-box-open").removeClass("hidden"))):new Flash(e,"alert"),i.prop("disabled",!1)}})})},e.prototype.submitNoteForm=function(t){var e;return e=t.find("textarea.js-note-text").val(),e.trim().length>0?t.submit():void 0},e.prototype.disableTaskList=function(){return $(".detail-page-description .js-task-list-container").taskList("disable"),$(document).off("tasklist:changed",".detail-page-description .js-task-list-container")},e.prototype.updateTaskList=function(){var t;return t={},t.issue={description:$(".js-task-list-field",this).val()},$.ajax({type:"PATCH",url:$("form.js-issuable-update").attr("action"),data:t})},e.prototype.initMergeRequests=function(){var t;return t=$("#merge-requests"),$.getJSON(t.data("url")).error(function(){return new Flash("Failed to load referenced merge requests","alert")}).success(function(e){return"html"in e?t.html(e.html):void 0})},e.prototype.initRelatedBranches=function(){var t;return t=$("#related-branches"),$.getJSON(t.data("url")).error(function(){return new Flash("Failed to load related branches","alert")}).success(function(e){return"html"in e?t.html(e.html):void 0})},e.prototype.initCanCreateBranch=function(){var t;return(t=$("div#new-branch"))?$.getJSON(t.data("path")).error(function(){return t.find(".checking").hide(),t.find(".unavailable").show(),new Flash("Failed to check if a new branch can be created.","alert")}).success(function(e){return e.can_create_branch?(t.find(".checking").hide(),t.find(".available").show(),t.find("a").attr("disabled",!1)):(t.find(".checking").hide(),t.find(".unavailable").show())}):void 0},e}()}.call(this),function(){this.IssueStatusSelect=function(){function t(){$(".js-issue-status").each(function(t,e){var n;return n=$(e).data("field-name"),$(e).glDropdown({selectable:!0,fieldName:n,id:function(t,e){return $(e).data("id")}})})}return t}()}.call(this),function(){this.Issues={init:function(){return Issues.created=!0,Issues.initChecks(),$("body").on("ajax:success",".close_issue, .reopen_issue",function(){var t,e,n;return e=$(this),n=void 0,t=e.hasClass("reopen_issue"),$(".issue_counter").each(function(){var e;return e=$(this),n=parseInt($(this).html(),10),t&&e.closest(".main_menu").length?$(this).html(n+1):$(this).html(n-1)})})},initChecks:function(){return $(".check_all_issues").click(function(){return $(".selected_issue").prop("checked",this.checked),Issues.checkChanged()}),$(".selected_issue").bind("change",Issues.checkChanged)},checkChanged:function(){var t,e;return t=$(".selected_issue:checked"),t.length>0?(e=[],$.each(t,function(t,n){return e.push($(n).attr("data-id"))}),$("#update_issues_ids").val(e),$(".issues-other-filters").hide(),$(".issues_bulk_update").show()):($("#update_issues_ids").val([]),$(".issues_bulk_update").hide(),$(".issues-other-filters").show())}}}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.Labels=function(){function e(){this.setSuggestedColor=t(this.setSuggestedColor,this),this.updateColorPreview=t(this.updateColorPreview,this);var e;e=$(".label-form"),this.cleanBinding(),this.addBinding(),this.updateColorPreview()}return e.prototype.addBinding=function(){return $(document).on("click",".suggest-colors a",this.setSuggestedColor),$(document).on("input","input#label_color",this.updateColorPreview)},e.prototype.cleanBinding=function(){return $(document).off("click",".suggest-colors a"),$(document).off("input","input#label_color")},e.prototype.updateColorPreview=function(){var t;return t=$("input#label_color").val(),$("div.label-color-preview").css("background-color",t)},e.prototype.setSuggestedColor=function(t){var e;return e=$(t.currentTarget).data("color"),$("input#label_color").val(e),this.updateColorPreview(),$(".label-form").trigger("keyup"),t.preventDefault()},e}()}.call(this),function(){this.LabelsSelect=function(){function t(){$(".js-label-select").each(function(t,e){var n,i,r,o,s,a,l,c,h,u,d,f,p,g,m,v,y,w,b,x,C,A,E,k,F,D,S;return r=$(e),C=r.data("project-id"),w=r.data("labels"),m=r.data("issueUpdate"),F=r.data("selected"),null==F||r.hasClass("js-multiselect")||(F=F.split(",")),x=$("#new_label_name"),b=$("#new_label_color"),S=r.data("show-no"),D=r.data("show-any"),f=r.data("default-label"),d=r.data("ability-name"),c=r.closest(".selectbox"),n=c.closest(".block"),o=r.closest("form"),h=n.find(".sidebar-collapsed-icon span"),u=n.find(".value"),l=$(".js-label-error"),i=$(".js-dropdown-label-color-preview"),a=$(".js-new-label-btn"),l.hide(),s=n.find(".block-loading").fadeOut(),null!=m&&(g=m.split("/")),m&&(v=_.template('<% _.each(labels, function(label){ %> <a href="<%= ["",issueURLSplit[1], issueURLSplit[2],""].join("/") %>issues?label_name[]=<%= _.escape(label.title) %>"> <span class="label has-tooltip color-label" title="<%= _.escape(label.description) %>" style="background-color: <%= label.color %>; color: <%= label.text_color %>;"> <%= _.escape(label.title) %> </span> </a> <% }); %>'),y=_.template('<div class="light">None</div>')),x.length&&($(".suggest-colors-dropdown a").on("click",function(t){return t.preventDefault(),t.stopPropagation(),b.val($(this).data("color")).trigger("change"),i.css("background-color",$(this).data("color")).parent().addClass("is-active")}),A=function(){return x.val("").trigger("change"),b.val("").trigger("change"),i.css("background-color","").parent().removeClass("is-active")},$(".dropdown-menu-back").on("click",function(){return A()}),$(".js-cancel-label-btn").on("click",function(t){return t.preventDefault(),t.stopPropagation(),A(),$(".dropdown-menu-back",r.parent()).trigger("click")}),p=function(){return""!==x.val()&&""!==b.val()?(l.hide(),a.enable()):a.disable()},E=function(){return Api.newLabel(C,{name:x.val(),color:b.val()},function(t){return a.enable(),null!=t.message?l.text(t.message).show():$(".dropdown-menu-back",r.parent()).trigger("click")})},x.on("keyup change",p),b.on("keyup change",p),a.disable().on("click",function(t){return t.preventDefault(),t.stopPropagation(),E()})),k=function(){var t,e;return e=r.closest(".selectbox").find("input[name='"+r.data("field-name")+"']").map(function(){return this.value}).get(),t={},t[d]={},t[d].label_ids=e,e.length||(t[d].label_ids=[""]),s.fadeIn(),r.trigger("loading.gl.dropdown"),$.ajax({type:"PUT",url:m,dataType:"JSON",data:t}).done(function(t){var e,n;return s.fadeOut(),r.trigger("loaded.gl.dropdown"),c.hide(),t.issueURLSplit=g,e=0,t.labels.length?(n=v(t),e=t.labels.length):n=y(),u.removeAttr("style").html(n),h.text(e),$(".has-tooltip",u).tooltip({container:"body"}),u.find("a").each(function(t){return setTimeout(function(t){return function(){return gl.animate.animate($(t),"pulse")}}(this),200*t)})})},r.glDropdown({data:function(t,e){return $.ajax({url:w}).done(function(t){return r.hasClass("js-extra-options")&&(S&&t.unshift({id:0,title:"No Label"}),D&&t.unshift({isAny:!0,title:"Any Label"}),t.length>2&&t.splice(2,0,"divider")),e(t)})},renderRow:function(t){var e,n,i;return n=0===t.id||null==t.id,i=[],o.find("input[type='hidden'][name='"+r.data("fieldName")+"'][value='"+this.id(t)+"']").length&&i.push("is-active"),r.hasClass("js-multiselect")&&n&&i.push("dropdown-clear-active"),e=null!=t.color?"<span class='dropdown-label-box' style='background-color: "+t.color+"'></span>":"","<li> <a href='#' class='"+i.join(" ")+"'> "+e+" "+_.escape(t.title)+" </a> </li>"},filterable:!0,search:{fields:["title"]},selectable:!0,toggleLabel:function(t,e){var n;return n=$(".js-label-select").siblings(".dropdown-menu-labels").find(".is-active"),t&&null!=t.title?n.length>1?t.title+" +"+(n.length-1)+" more":t.title:t||0===n.length?f:n.length>1?$(n[0]).text()+" +"+(n.length-1)+" more":1===n.length?$(n).text():void 0},fieldName:r.data("field-name"),id:function(t){return r.hasClass("js-filter-submit")&&null==t.isAny?_.escape(t.title):t.id},hidden:function(){var t,e,n,i;return n=$("body").data("page"),t="projects:issues:index"===n,e="projects:merge_requests:index"===n,c.hide(),u.removeAttr("style"),r.hasClass("js-multiselect")?r.hasClass("js-filter-submit")&&(t||e)?(i=r.closest("form").find("input:hidden[name='"+r.data("fieldName")+"']"),Issuable.filterResults(r.closest("form"))):r.hasClass("js-filter-submit")?r.closest("form").submit():k():void 0},multiSelect:r.hasClass("js-multiselect"),clicked:function(t){var e,n,i;if(i=$("body").data("page"),e="projects:issues:index"===i,n="projects:merge_requests:index"===i,r.hasClass("js-filter-submit")&&(e||n)){if(!r.hasClass("js-multiselect"))return F=t.title,Issuable.filterResults(r.closest("form"))}else{if(r.hasClass("js-filter-submit"))return r.closest("form").submit();if(!r.hasClass("js-multiselect"))return k()}}})})}return t}()}.call(this),function(){!function(t){null==t.gl&&(t.gl={}),null==gl.animate&&(gl.animate={}),gl.animate.animate=function(t,e,n,i){null!=(null!=n?n.cssStart:void 0)&&t.css(n.cssStart),t.removeClass(e+" animated").addClass(e+" animated").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass(e+" animated"),null!=i&&i(),null!=(null!=n?n.cssEnd:void 0)&&t.css(n.cssEnd)})},gl.animate.animateEach=function(t,e,n,i,r){var o;return o=$.Deferred(),t.length||o.resolve(),t.each(function(s){setTimeout(function(n){return function(){var a;return a=$(n),gl.animate.animate(a,e,i,function(){return s===t.length-1&&(o.resolve(),null!=r)?r():void 0})}}(this),n*s)}),o.promise()}}(window)}.call(this),function(){!function(t){var e;return null==t.gl&&(t.gl={}),null==(e=t.gl).utils&&(e.utils={}),t.gl.utils.formatDate=function(t){return dateFormat(t,"mmm d, yyyy h:MMtt Z")},t.gl.utils.localTimeAgo=function(t,e){return null==e&&(e=!0),t.each(function(){var t;return t=$(this),t.attr("title",gl.utils.formatDate(t.attr("datetime")))}),e?t.timeago():void 0}}(window)}.call(this),/**
 * Timeago is a jQuery plugin that makes it easy to support automatically
 * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
 *
 * @name timeago
 * @version 1.1.0
 * @requires jQuery v1.2.3+
 * @author Ryan McGeary
 * @license MIT License - http://www.opensource.org/licenses/mit-license.php
 *
 * For usage and examples, visit:
 * http://timeago.yarp.com/
 *
 * Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(){var e=n(this);return isNaN(e.datetime)||t(this).text(i(e.datetime)),this}function n(e){if(e=t(e),!e.data("timeago")){e.data("timeago",{datetime:o.datetime(e)});var n=t.trim(e.text());!(n.length>0)||o.isTime(e)&&e.attr("title")||e.attr("title",n)}return e.data("timeago")}function i(t){return o.inWords(r(t))}function r(t){return(new Date).getTime()-t.getTime()}t.timeago=function(e){return i(e instanceof Date?e:"string"==typeof e?t.timeago.parse(e):"number"==typeof e?new Date(e):t.timeago.datetime(e))};var o=t.timeago;t.extend(t.timeago,{settings:{refreshMillis:6e4,allowFuture:!1,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(e){function n(n,r){var o=t.isFunction(n)?n(r,e):n,s=i.numbers&&i.numbers[r]||r;return o.replace(/%d/i,s)}var i=this.settings.strings,r=i.prefixAgo,o=i.suffixAgo;this.settings.allowFuture&&0>e&&(r=i.prefixFromNow,o=i.suffixFromNow);var s=Math.abs(e)/1e3,a=s/60,l=a/60,c=l/24,h=c/365,u=45>s&&n(i.seconds,Math.round(s))||90>s&&n(i.minute,1)||45>a&&n(i.minutes,Math.round(a))||90>a&&n(i.hour,1)||24>l&&n(i.hours,Math.round(l))||42>l&&n(i.day,1)||30>c&&n(i.days,Math.round(c))||45>c&&n(i.month,1)||365>c&&n(i.months,Math.round(c/30))||1.5>h&&n(i.year,1)||n(i.years,Math.round(h)),d=i.wordSeparator||"";return void 0===i.wordSeparator&&(d=" "),t.trim([r,u,o].join(d))},parse:function(e){var n=t.trim(e);return n=n.replace(/\.\d+/,""),n=n.replace(/-/,"/").replace(/-/,"/"),n=n.replace(/T/," ").replace(/Z/," UTC"),n=n.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(n)},datetime:function(e){var n=o.isTime(e)?t(e).attr("datetime"):t(e).attr("title");return o.parse(n)},isTime:function(e){return"time"===t(e).get(0).tagName.toLowerCase()}});var s={init:function(){var n=t.proxy(e,this);n();var i=o.settings;i.refreshMillis>0&&setInterval(n,i.refreshMillis)},update:function(n){t(this).data("timeago",{datetime:o.parse(n)}),e.apply(this)}};t.fn.timeago=function(t,e){var n=t?s[t]:s.init;if(!n)throw new Error("Unknown function name '"+t+"' for timeago");return this.each(function(){n.call(this,e)}),this},document.createElement("abbr"),document.createElement("time")}),function(){!function(t){var e,n,i;return e=function(t,e,n){var i;return i=new Notification(t,e),setTimeout(function(){return i.close()},8e3),n?i.onclick=n:void 0},i=function(){return"Notification"in window?Notification.requestPermission():void 0},n=function(t,n,i,r){var o;if(o={body:n,icon:i},"Notification"in window){if("granted"===Notification.permission)return e(t,o,r);if("denied"!==Notification.permission)return Notification.requestPermission(function(n){return"granted"===n?e(t,o,r):void 0})}else;},t.notify=n,t.notifyPermissions=i}(window)}.call(this),function(){!function(t){var e;return null==t.gl&&(t.gl={}),null==(e=t.gl).utils&&(e.utils={}),t.gl.utils.getParameterValues=function(t){var e,n,i,r,o;for(n=decodeURIComponent(window.location.search.substring(1)),r=n.split("&"),i=void 0,o=[],e=0;e<r.length;)i=r[e].split("="),i[0]===t&&o.push(i[1]),e++;return o},t.gl.utils.mergeUrlParams=function(t,e){var n,i,r,o;n=decodeURIComponent(e);for(i in t)r=t[i],o=new RegExp("\\b("+i+"=).*?(&|$)"),n=e.search(o)>=0?n.replace(o,"$1"+r+"$2"):""+n+(n.indexOf("?")>0?"&":"?")+i+"="+r;return n},t.gl.utils.removeParamQueryString=function(t,e){var n,i;return t=decodeURIComponent(t),n=t.split("&"),function(){var t,r,o;for(o=[],t=0,r=n.length;r>t;t++)i=n[t],-1===i.indexOf(e)&&o.push(i);return o}().join("&")}}(window)}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.LineHighlighter=function(){function e(e){var n;null==e&&(e=location.hash),this.setHash=t(this.setHash,this),this.highlightLine=t(this.highlightLine,this),this.clickHandler=t(this.clickHandler,this),this._hash=e,this.bindEvents(),""!==e&&(n=this.hashToRange(e),n[0]&&(this.highlightRange(n),$.scrollTo("#L"+n[0],{offset:-150})))}return e.prototype.highlightClass="hll",e.prototype._hash="",e.prototype.bindEvents=function(){return $("#blob-content-holder").on("mousedown","a[data-line-number]",this.clickHandler),$("#blob-content-holder").on("click","a[data-line-number]",function(t){return t.preventDefault()})},e.prototype.clickHandler=function(t){var e,n,i;return t.preventDefault(),this.clearHighlight(),n=$(t.target).closest("a").data("line-number"),e=this.hashToRange(this._hash),e[0]&&t.shiftKey?t.shiftKey?(i=n<e[0]?[n,e[0]]:[e[0],n],this.setHash(i[0],i[1]),this.highlightRange(i)):void 0:(this.setHash(n),this.highlightLine(n))},e.prototype.clearHighlight=function(){return $("."+this.highlightClass).removeClass(this.highlightClass)},e.prototype.hashToRange=function(t){var e,n,i;return i=t.match(/^#?L(\d+)(?:-(\d+))?$/),i&&i.length?(e=parseInt(i[1]),n=i[2]?parseInt(i[2]):null,[e,n]):[null,null]},e.prototype.highlightLine=function(t){return $("#LC"+t).addClass(this.highlightClass)},e.prototype.highlightRange=function(t){var e,n,i,r,o;if(t[1]){for(o=[],n=e=i=t[0],r=t[1];r>=i?r>=e:e>=r;n=r>=i?++e:--e)o.push(this.highlightLine(n));return o}return this.highlightLine(t[0])},e.prototype.setHash=function(t,e){var n;return n=e?"#L"+t+"-"+e:"#L"+t,this._hash=n,this.__setLocationHash__(n)},e.prototype.__setLocationHash__=function(t){return history.pushState({turbolinks:!1,url:t},document.title,t)},e}()}.call(this),function(){var t,e,n,i,r,o,s,a,l,c;Turbolinks.enableProgressBar(),n="tanuki-shape",s=["path#tanuki-right-cheek","path#tanuki-right-eye, path#tanuki-right-ear","path#tanuki-nose","path#tanuki-left-eye, path#tanuki-left-ear","path#tanuki-left-cheek"],o=0,r=s[0],e=null,i=150,t=function(){return $("."+n+".highlight").attr("class",n)},a=function(){return t(),o=0,s[0]!==r&&s.reverse(),e&&clearInterval(e),e=setInterval(c,i)},l=function(){return clearInterval(e),t()},c=function(){return t(),$(s[o]).attr("class",n+" highlight"),o===s.length-1?(o=0,s.reverse()):o++},$(document).on("page:fetch",a),$(document).on("page:change",l),$(function(){return $("#logo").on("click",function(){return $("#js-shortcuts-home").get(0).click()})})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.MergeRequestTabs=function(){function e(e){this.opts=null!=e?e:{},this.setCurrentAction=t(this.setCurrentAction,this),this.tabShown=t(this.tabShown,this),this.showTab=t(this.showTab,this),this._location=location,this.bindEvents(),this.activateTab(this.opts.action)}return e.prototype.diffsLoaded=!1,e.prototype.buildsLoaded=!1,e.prototype.commitsLoaded=!1,e.prototype.bindEvents=function(){return $(document).on("shown.bs.tab",'.merge-request-tabs a[data-toggle="tab"]',this.tabShown),$(document).on("click",".js-show-tab",this.showTab)},e.prototype.showTab=function(t){return t.preventDefault(),this.activateTab($(t.target).data("action"))},e.prototype.tabShown=function(t){var e,n;return e=$(t.target),n=e.data("action"),"commits"===n?(this.loadCommits(e.attr("href")),this.expandView()):"diffs"===n?(this.loadDiff(e.attr("href")),"undefined"!=typeof bp&&null!==bp&&"lg"!==bp.getBreakpointSize()&&this.shrinkView()):"builds"===n?(this.loadBuilds(e.attr("href")),this.expandView()):this.expandView(),this.setCurrentAction(n)},e.prototype.scrollToElement=function(t){var e,n;return window.location.hash&&(n=$(".navbar-gitlab").outerHeight(),e=$(t+" "+window.location.hash),e.length)?$.scrollTo(t+" "+window.location.hash,{offset:-n}):void 0},e.prototype.activateTab=function(t){return"show"===t&&(t="notes"),$(".merge-request-tabs a[data-action='"+t+"']").tab("show")},e.prototype.setCurrentAction=function(t){var e;return"show"===t&&(t="notes"),e=this._location.pathname.replace(/\/(commits|diffs|builds)(\.html)?\/?$/,""),"notes"!==t&&(e+="/"+t),e+=this._location.search+this._location.hash,history.replaceState({turbolinks:!0,url:e},document.title,e),e},e.prototype.loadCommits=function(t){return this.commitsLoaded?void 0:this._get({url:t+".json",success:function(t){return function(e){return document.querySelector("div#commits").innerHTML=e.html,gl.utils.localTimeAgo($(".js-timeago","div#commits")),t.commitsLoaded=!0,t.scrollToElement("#commits")}}(this)})},e.prototype.loadDiff=function(t){return this.diffsLoaded?void 0:this._get({url:t+".json"+this._location.search,success:function(t){return function(e){return $("#diffs").html(e.html),gl.utils.localTimeAgo($(".js-timeago","div#diffs")),$("#diffs .js-syntax-highlight").syntaxHighlight(),"parallel"===t.diffViewType()&&t.expandViewContainer(),t.diffsLoaded=!0,t.scrollToElement("#diffs"),t.highlighSelectedLine(),$(document).off("click",".diff-line-num a").on("click",".diff-line-num a",function(e){return e.preventDefault(),window.location.hash=$(e.currentTarget).attr("href"),t.highlighSelectedLine(),t.scrollToElement("#diffs")})}}(this)})},e.prototype.highlighSelectedLine=function(){var t,e,n,i,r;return $(".hll").removeClass("hll"),i=window.location.hash,""!==i&&(n="."+i.replace("#",""),t=$(i),t=t.is(":not(tr)")?$("td"+i+", td"+n):$("td",t),t.length)?(t.addClass("hll"),e=t.offset().top,r=$(".navbar-gitlab").outerHeight()):void 0},e.prototype.loadBuilds=function(t){return this.buildsLoaded?void 0:this._get({url:t+".json",success:function(t){return function(e){return document.querySelector("div#builds").innerHTML=e.html,gl.utils.localTimeAgo($(".js-timeago","div#builds")),t.buildsLoaded=!0,t.scrollToElement("#builds")}}(this)})},e.prototype.toggleLoading=function(t){return $(".mr-loading-status .loading").toggle(t)},e.prototype._get=function(t){var e;return e={beforeSend:function(t){return function(){return t.toggleLoading(!0)}}(this),complete:function(t){return function(){return t.toggleLoading(!1)}}(this),dataType:"json",type:"GET"},t=$.extend({},e,t),$.ajax(t)},e.prototype.diffViewType=function(){return $(".inline-parallel-buttons a.active").data("view-type")},e.prototype.expandViewContainer=function(){return $(".container-fluid").removeClass("container-limited")},e.prototype.shrinkView=function(){var t;return t=$(".js-sidebar-toggle i:visible"),setTimeout(function(){return t.is(".fa-angle-double-right")?t.closest("a").trigger("click",[!0]):void 0},0)},e.prototype.expandView=function(){var t;if("true"!==$.cookie("collapsed_gutter"))return t=$(".js-sidebar-toggle i:visible"),setTimeout(function(){return t.is(".fa-angle-double-left")?t.closest("a").trigger("click",[!0]):void 0},0)},e}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.MergeRequest=function(){function e(e){this.opts=e,this.submitNoteForm=t(this.submitNoteForm,this),this.$el=$(".merge-request"),this.$(".show-all-commits").on("click",function(t){return function(){return t.showAllCommits()}}(this)),this.initTabs(),this.disableTaskList(),this.initMRBtnListeners(),$("a.btn-close").length&&this.initTaskList()}return e.prototype.$=function(t){return this.$el.find(t)},e.prototype.initTabs=function(){return"new"!==this.opts.action?new MergeRequestTabs(this.opts):$('.merge-request-tabs a[data-toggle="tab"]:first').tab("show")},e.prototype.showAllCommits=function(){return this.$(".first-commits").remove(),this.$(".all-commits").removeClass("hide")},e.prototype.initTaskList=function(){return $(".detail-page-description .js-task-list-container").taskList("enable"),$(document).on("tasklist:changed",".detail-page-description .js-task-list-container",this.updateTaskList)},e.prototype.initMRBtnListeners=function(){var t;return t=this,$("a.btn-close, a.btn-reopen").on("click",function(e){var n,i;return n=$(this),i=n.hasClass("btn-comment"),i&&n.data("submitted")?void 0:i&&(n.hasClass("btn-comment-and-close")||n.hasClass("btn-comment-and-reopen"))?(e.preventDefault(),e.stopImmediatePropagation(),t.submitNoteForm(n.closest("form"),n)):void 0})},e.prototype.submitNoteForm=function(t,e){var n;return n=t.find("textarea.js-note-text").val(),n.trim().length>0?(t.submit(),e.data("submitted",!0),e.trigger("click")):void 0},e.prototype.disableTaskList=function(){return $(".detail-page-description .js-task-list-container").taskList("disable"),$(document).off("tasklist:changed",".detail-page-description .js-task-list-container")},e.prototype.updateTaskList=function(){var t;return t={},t.merge_request={description:$(".js-task-list-field",this).val()},$.ajax({type:"PATCH",url:$("form.js-issuable-update").attr("action"),data:t})},e}()}.call(this),function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};this.MergeRequestWidget=function(){function e(t){this.opts=t,$("#modal_merge_info").modal({show:!1}),this.firstCICheck=!0,this.readyForCICheck=!0,clearInterval(this.fetchBuildStatusInterval),this.clearEventListeners(),this.addEventListeners(),this.pollCIStatus(),notifyPermissions()}return e.prototype.clearEventListeners=function(){return $(document).off("page:change.merge_request")},e.prototype.addEventListeners=function(){return $(document).on("page:change.merge_request",function(t){return function(){return"projects:merge_requests:show"!==$("body").data("page")?(clearInterval(t.fetchBuildStatusInterval),t.clearEventListeners()):void 0}}(this))},e.prototype.mergeInProgress=function(t){return null==t&&(t=!1),$.ajax({type:"GET",url:$(".merge-request").data("url"),success:function(e){return function(e){var n,i;return"merged"===e.state?(i=t?"?delete_source=true":"",window.location.href=window.location.pathname+i):e.merge_error?$(".mr-widget-body").html("<h4>"+e.merge_error+"</h4>"):(n=function(){return merge_request_widget.mergeInProgress(t)},setTimeout(n,2e3))}}(this),dataType:"json"})},e.prototype.getMergeStatus=function(){return $.get(this.opts.merge_check_url,function(t){return $(".mr-state-widget").replaceWith(t)})},e.prototype.ciLabelForStatus=function(t){return"success"===t?"passed":t},e.prototype.pollCIStatus=function(){return this.fetchBuildStatusInterval=setInterval(function(t){return function(){return t.readyForCICheck?(t.getCIStatus(!0),t.readyForCICheck=!1):void 0}}(this),1e4)},e.prototype.getCIStatus=function(t){var e;return e=this,$(".ci-widget-fetching").show(),$.getJSON(this.opts.ci_status_url,function(e){return function(n){var i,r,o;return e.readyForCICheck=!0,""!==n.status&&(e.firstCiCheck||n.status!==e.opts.ci_status&&null!=n.status)?(e.opts.ci_status=n.status,e.showCIStatus(n.status),n.coverage&&e.showCICoverage(n.coverage),t&&!e.firstCiCheck&&(r=e.ciLabelForStatus(n.status),"preparing"===r?(o=e.opts.ci_title.preparing,r=r.charAt(0).toUpperCase()+r.slice(1),i=e.opts.ci_message.preparing.replace("{{status}}",r)):(o=e.opts.ci_title.normal,i=e.opts.ci_message.normal.replace("{{status}}",r)),o=o.replace("{{status}}",r),i=i.replace("{{sha}}",n.sha),i=i.replace("{{title}}",n.title),notify(o,i,e.opts.gitlab_icon,function(){return this.close(),Turbolinks.visit(e.opts.builds_path)})),e.firstCiCheck=!1):void 0}}(this))},e.prototype.showCIStatus=function(e){var n;if($(".ci_widget").hide(),n=["failed","canceled","running","pending","success","skipped","not_found"],!(t.call(n,e)>=0))return $(".ci_widget.ci-error").show(),this.setMergeButtonClass("btn-danger");switch($(".ci_widget.ci-"+e).show(),e){case"failed":case"canceled":case"not_found":return this.setMergeButtonClass("btn-danger");case"running":case"pending":return this.setMergeButtonClass("btn-warning");case"success":return this.setMergeButtonClass("btn-create")}},e.prototype.showCICoverage=function(t){var e;return e="Coverage "+t+"%",$(".ci_widget:visible .ci-coverage").text(e)},e.prototype.setMergeButtonClass=function(t){return $(".accept_merge_request").removeClass("btn-danger btn-warning btn-create").addClass(t)},e}()}.call(this),function(){this.Milestone=function(){function t(){var t;t=$.ui.sortable.prototype._mouseStart,$.ui.sortable.prototype._mouseStart=function(e,n,i){return this._trigger("beforeStart",e,this._uiHash()),t.apply(this,[e,n,i])},this.bindIssuesSorting(),this.bindMergeRequestSorting(),this.bindTabsSwitching()}return t.updateIssue=function(t,e,n){return $.ajax({type:"PUT",url:e,data:n,success:function(e){var n;return e.saved===!0?(e.assignee_avatar_url?(n=$("<img/>"),n.attr("src",e.assignee_avatar_url),n.addClass("avatar s16"),$(t).find(".assignee-icon").html(n)):$(t).find(".assignee-icon").html(""),$(t).effect("highlight")):new Flash("Issue update failed","alert")},dataType:"json"})},t.sortIssues=function(t){var e;return e=location.href+"/sort_issues",$.ajax({type:"PUT",url:e,data:t,success:function(t){return t.saved!==!0?new Flash("Issues update failed","alert"):void 0},dataType:"json"})},t.sortMergeRequests=function(t){var e;return e=location.href+"/sort_merge_requests",$.ajax({type:"PUT",url:e,data:t,success:function(t){return t.saved!==!0?new Flash("MR update failed","alert"):void 0},dataType:"json"})},t.updateMergeRequest=function(t,e,n){return $.ajax({type:"PUT",url:e,data:n,success:function(e){var n;return e.saved===!0?(e.assignee_avatar_url?(n=$("<img/>"),n.attr("src",e.assignee_avatar_url),n.addClass("avatar s16"),$(t).find(".assignee-icon").html(n)):$(t).find(".assignee-icon").html(""),$(t).effect("highlight")):new Flash("Issue update failed","alert")},dataType:"json"})},t.prototype.bindIssuesSorting=function(){return $("#issues-list-unassigned, #issues-list-ongoing, #issues-list-closed").sortable({connectWith:".issues-sortable-list",dropOnEmpty:!0,items:"li:not(.ui-sort-disabled)",beforeStart:function(t,e){return $(".issues-sortable-list").css("min-height",e.item.outerHeight())},stop:function(t,e){return $(".issues-sortable-list").css("min-height","0px")},update:function(e,n){var i;return i=$(this).sortable("serialize"),t.sortIssues(i)},receive:function(e,n){var i,r,o,s;return s=$(this).data("state"),r=n.item.data("iid"),o=n.item.data("url"),i=function(){switch(s){case"ongoing":return"issue[assignee_id]="+gon.current_user_id;case"unassigned":return"issue[assignee_id]=";case"closed":return"issue[state_event]=close"}}(),"closed"===$(n.sender).data("state")&&(i+="&issue[state_event]=reopen"),t.updateIssue(n.item,o,i)}}).disableSelection()},t.prototype.bindTabsSwitching=function(){return $('a[data-toggle="tab"]').on("show.bs.tab",function(t){var e,n;return e=$(t.target).data("show"),n=$(t.relatedTarget).data("show"),$(n).hide(),$(e).removeClass("hidden"),$(e).show()})},t.prototype.bindMergeRequestSorting=function(){return $("#merge_requests-list-unassigned, #merge_requests-list-ongoing, #merge_requests-list-closed").sortable({connectWith:".merge_requests-sortable-list",dropOnEmpty:!0,items:"li:not(.ui-sort-disabled)",beforeStart:function(t,e){return $(".merge_requests-sortable-list").css("min-height",e.item.outerHeight())},stop:function(t,e){return $(".merge_requests-sortable-list").css("min-height","0px")},update:function(e,n){var i;return i=$(this).sortable("serialize"),t.sortMergeRequests(i)},receive:function(e,n){var i,r,o,s;return s=$(this).data("state"),r=n.item.data("iid"),o=n.item.data("url"),i=function(){switch(s){case"ongoing":return"merge_request[assignee_id]="+gon.current_user_id;case"unassigned":return"merge_request[assignee_id]=";case"closed":return"merge_request[state_event]=close"}}(),"closed"===$(n.sender).data("state")&&(i+="&merge_request[state_event]=reopen"),t.updateMergeRequest(n.item,o,i)}}).disableSelection()},t}()}.call(this),function(){this.MilestoneSelect=function(){function t(t){var e;null!=t&&(e=this,this.currentProject=JSON.parse(t)),$(".js-milestone-select").each(function(t,n){var i,r,o,s,a,l,c,h,u,d,f,p,g,m,v,y,w,b,x;return r=$(n),m=r.data("project-id"),g=r.data("milestones"),d=r.data("issueUpdate"),v=r.data("selected"),w=r.data("show-no"),y=r.data("show-any"),b=r.data("show-upcoming"),x=r.data("use-id"),h=r.data("default-label"),u=r.data("issuable-id"),c=r.data("ability-name"),s=r.closest(".selectbox"),i=s.closest(".block"),a=i.find(".sidebar-collapsed-icon"),l=i.find(".value"),o=i.find(".block-loading").fadeOut(),d&&(p=_.template('<a href="/<%= namespace %>/<%= path %>/milestones/<%= iid %>"><%= _.escape(title) %></a>'),f='<div class="light">None</div>'),r.glDropdown({data:function(t,e){return $.ajax({url:g}).done(function(t){var n;return n=[],y&&n.push({id:0,name:"",title:"Any Milestone"}),w&&n.push({id:-1,name:"No Milestone",title:"No Milestone"}),b&&n.push({id:-2,name:"#upcoming",title:"Upcoming"}),n.length>2&&n.push("divider"),e(n.concat(t))})},filterable:!0,search:{fields:["title"]},selectable:!0,toggleLabel:function(t){return t&&"id"in t?t.title:h},fieldName:r.data("field-name"),text:function(t){return _.escape(t.title)},id:function(t){return x?t.id:t.name},isSelected:function(t){return t.name===v},hidden:function(){return s.hide(),l.removeAttr("style")},clicked:function(t){var n,i,h,u;return u=$("body").data("page"),i="projects:issues:index"===u,h=u===u&&"projects:merge_requests:index"===u,r.hasClass("js-filter-bulk-update")?void 0:r.hasClass("js-filter-submit")&&(i||h)?(v=null!=t.name?t.name:"",Issuable.filterResults(r.closest("form"))):r.hasClass("js-filter-submit")?r.closest("form").submit():(t=s.find('input[type="hidden"]').val(),n={},n[c]={},n[c].milestone_id=t,o.fadeIn(),r.trigger("loading.gl.dropdown"),$.ajax({type:"PUT",url:d,data:n}).done(function(t){return r.trigger("loaded.gl.dropdown"),o.fadeOut(),s.hide(),l.removeAttr("style"),null!=t.milestone?(t.milestone.namespace=e.currentProject.namespace,t.milestone.path=e.currentProject.path,l.html(p(t.milestone)),a.find("span").text(t.milestone.title)):(l.html(f),a.find("span").text("No"))}))}})})}return t}()}.call(this),function(){this.NamespaceSelect=function(){function t(){var t,e;e=function(t){var e;return e="<div class='namespace-result'>",e+="<span class='namespace-kind'>"+t.kind+"</span>",e+="<span class='namespace-path'>"+t.path+"</span>",e+="</div>"},t=function(t){return t.kind+": "+t.path},$(".ajax-namespace-select").each(function(n,i){return $(i).select2({placeholder:"Search for namespace",multiple:$(i).hasClass("multiselect"),minimumInputLength:0,query:function(t){return Api.namespaces(t.term,function(e){var n;return n={results:e},t.callback(n)})},dropdownCssClass:"ajax-namespace-dropdown",formatResult:e,formatSelection:t})})}return t}()}.call(this),function(){this.Network=function(){function t(t){var e;$("#filter_ref").click(function(){return $(this).closest("form").submit()}),this.branch_graph=new BranchGraph($(".network-graph"),t),e=$(window).height()-250,$(".network-graph").css({height:e+"px"})}return t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};this.NewBranchForm=function(){function n(e,n){this.validate=t(this.validate,this),this.branchNameError=e.find(".js-branch-name-error"),this.name=e.find(".js-branch-name"),this.ref=e.find("#ref"),this.setupAvailableRefs(n),this.setupRestrictions(),this.addBinding(),this.init()}return n.prototype.addBinding=function(){return this.name.on("blur",this.validate)},n.prototype.init=function(){return this.name.val().length>0?this.name.trigger("blur"):void 0},n.prototype.setupAvailableRefs=function(t){return this.ref.autocomplete({source:t,minLength:1})},n.prototype.setupRestrictions=function(){var t,e,n,i;return i={pattern:/^(\/|\.)/g,prefix:"can't start with",conjunction:"or"},t={pattern:/(\/|\.|\.lock)$/g,prefix:"can't end in",conjunction:"or"},e={pattern:/(\s|~|\^|:|\?|\*|\[|\\|\.\.|@\{|\/{2,}){1}/g,prefix:"can't contain",conjunction:", "},n={pattern:/^@+$/g,prefix:"can't be",conjunction:"or"},this.restrictions=[i,e,t,n]},n.prototype.validate=function(){var t,n,i,r,o;return this.branchNameError.empty(),r=function(t,n){return e.call(t,n)<0&&t.push(n),t},i=function(t,e){var n;return n=t.map(function(t){switch(!1){case!/\s/.test(t):return"spaces";case!/\/{2,}/g.test(t):return"consecutive slashes";default:return"'"+t+"'"}}),e.prefix+" "+n.join(e.conjunction)},o=function(t){return function(e,n){var o;return o=t.name.val().match(n.pattern),o?e.concat(i(o.reduce(r,[]),n)):e}}(this),n=this.restrictions.reduce(o,[]),n.length>0?(t=$("<span/>").text(n.join(", ")),this.branchNameError.append(t)):void 0},n}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.NewCommitForm=function(){function e(e){this.renderDestination=t(this.renderDestination,this),this.newBranch=e.find(".js-target-branch"),this.originalBranch=e.find(".js-original-branch"),this.createMergeRequest=e.find(".js-create-merge-request"),this.createMergeRequestContainer=e.find(".js-create-merge-request-container"),this.renderDestination(),this.newBranch.keyup(this.renderDestination)}return e.prototype.renderDestination=function(){var t;return t=this.newBranch.val()!==this.originalBranch.val(),t?(this.createMergeRequestContainer.show(),this.wasDifferent||this.createMergeRequest.prop("checked",!0)):(this.createMergeRequestContainer.hide(),this.createMergeRequest.prop("checked",!1)),this.wasDifferent=t},e}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.Notes=function(){function e(e,n,i,r){this.updateTargetButtons=t(this.updateTargetButtons,this),this.updateCloseButton=t(this.updateCloseButton,this),this.visibilityChange=t(this.visibilityChange,this),this.cancelDiscussionForm=t(this.cancelDiscussionForm,this),this.addDiffNote=t(this.addDiffNote,this),this.setupDiscussionNoteForm=t(this.setupDiscussionNoteForm,this),this.replyToDiscussionNote=t(this.replyToDiscussionNote,this),this.removeNote=t(this.removeNote,this),this.updateNote=t(this.updateNote,this),this.addDiscussionNote=t(this.addDiscussionNote,this),this.addNoteError=t(this.addNoteError,this),this.addNote=t(this.addNote,this),this.resetMainTargetForm=t(this.resetMainTargetForm,this),this.notes_url=e,this.note_ids=n,this.last_fetched_at=i,this.view=r,this.noteable_url=document.URL,this.notesCountBadge||(this.notesCountBadge=$(".issuable-details").find(".notes-tab .badge")),this.basePollingInterval=15e3,this.maxPollingSteps=4,this.cleanBinding(),this.addBinding(),this.setPollingInterval(),this.setupMainTargetNoteForm(),this.initTaskList()}return e.interval=null,e.prototype.addBinding=function(){return $(document).on("ajax:success",".js-main-target-form",this.addNote),$(document).on("ajax:success",".js-discussion-note-form",this.addDiscussionNote),$(document).on("ajax:error",".js-main-target-form",this.addNoteError),$(document).on("ajax:success","form.edit-note",this.updateNote),$(document).on("click",".js-note-edit",this.showEditForm),$(document).on("click",".note-edit-cancel",this.cancelEdit),$(document).on("click",".js-comment-button",this.updateCloseButton),$(document).on("keyup input",".js-note-text",this.updateTargetButtons),$(document).on("click",".js-note-delete",this.removeNote),$(document).on("click",".js-note-attachment-delete",this.removeAttachment),$(document).on("ajax:complete",".js-main-target-form",this.reenableTargetFormSubmitButton),$(document).on("ajax:success",".js-main-target-form",this.resetMainTargetForm),$(document).on("click",".js-note-discard",this.resetMainTargetForm),$(document).on("change",".js-note-attachment-input",this.updateFormAttachment),$(document).on("click",".js-discussion-reply-button",this.replyToDiscussionNote),$(document).on("click",".js-add-diff-note-button",this.addDiffNote),$(document).on("click",".js-close-discussion-note-form",this.cancelDiscussionForm),$(document).on("visibilitychange",this.visibilityChange),$(document).on("issuable:change",this.refresh),$(document).on("keydown",".js-note-text",this.keydownNoteText)},e.prototype.cleanBinding=function(){return $(document).off("ajax:success",".js-main-target-form"),$(document).off("ajax:success",".js-discussion-note-form"),$(document).off("ajax:success","form.edit-note"),$(document).off("click",".js-note-edit"),$(document).off("click",".note-edit-cancel"),$(document).off("click",".js-note-delete"),$(document).off("click",".js-note-attachment-delete"),$(document).off("ajax:complete",".js-main-target-form"),$(document).off("ajax:success",".js-main-target-form"),$(document).off("click",".js-discussion-reply-button"),$(document).off("click",".js-add-diff-note-button"),$(document).off("visibilitychange"),$(document).off("keyup",".js-note-text"),$(document).off("click",".js-note-target-reopen"),$(document).off("click",".js-note-target-close"),$(document).off("click",".js-note-discard"),$(document).off("keydown",".js-note-text"),$(".note .js-task-list-container").taskList("disable"),$(document).off("tasklist:changed",".note .js-task-list-container")},e.prototype.keydownNoteText=function(t){var e,n,i;return e=$(this),""===e.val()&&38===t.which&&(n=$("li.note[data-author-id='"+gon.current_user_id+"'][data-editable]:last"),n.length)?(i=n.find(".js-note-edit"),i.trigger("click",[!0,n])):void 0},e.prototype.initRefresh=function(){return clearInterval(e.interval),e.interval=setInterval(function(t){return function(){return t.refresh()}}(this),this.pollingInterval)},e.prototype.refresh=function(){var t;if(this.refreshing!==!0)return t=!0,document.hidden||0!==document.URL.indexOf(this.noteable_url)?void 0:this.getContent()},e.prototype.getContent=function(){return $.ajax({url:this.notes_url,data:"last_fetched_at="+this.last_fetched_at,dataType:"json",success:function(t){return function(e){var n;return n=e.notes,t.last_fetched_at=e.last_fetched_at,t.setPollingInterval(e.notes.length),$.each(n,function(e,n){return null!=n.discussion_with_diff_html?t.renderDiscussionNote(n):t.renderNote(n)})}}(this),always:function(t){return function(){return t.refreshing=!1}}(this)})},e.prototype.setPollingInterval=function(t){var e;return null==t&&(t=!0),e=this.basePollingInterval*Math.pow(2,this.maxPollingSteps-1),t?this.pollingInterval=this.basePollingInterval:this.pollingInterval<e&&(this.pollingInterval*=2),this.initRefresh()},e.prototype.renderNote=function(t){var e,n;return t.valid?t.award?(awards_handler.addAwardToEmojiBar(t.note),awards_handler.scrollToAwards()):this.isNewNote(t)?(this.note_ids.push(t.id),e=$("ul.main-notes-list"),e.append(t.html).syntaxHighlight(),gl.utils.localTimeAgo(e.find("#note_"+t.id+" .js-timeago"),!1),this.initTaskList(),this.updateNotesCount(1)):void 0:void(t.award&&(n=new Flash("You have already used this award emoji!","alert"),n.pinTo(".header-content")))},e.prototype.isNewNote=function(t){return-1===$.inArray(t.id,this.note_ids)},e.prototype.isParallelView=function(){return"parallel"===this.view},e.prototype.renderDiscussionNote=function(t){var e,n,i,r;if(this.isNewNote(t))return this.note_ids.push(t.id),n=$("#new-discussion-note-form-"+t.discussion_id),r=n.closest("tr"),i=$(t.html),i.syntaxHighlight(),e=$(".notes[data-discussion-id='"+t.discussion_id+"']"),0===e.length?(r.after(t.discussion_html),r.next().find(".note").remove(),e=$(".notes[data-discussion-id='"+t.discussion_id+"']"),e.append(i),0===$("body").attr("data-page").indexOf("projects:merge_request")&&$("ul.main-notes-list").append(t.discussion_with_diff_html).syntaxHighlight()):e.append(i),gl.utils.localTimeAgo($(".js-timeago",i),!1),this.updateNotesCount(1)},e.prototype.resetMainTargetForm=function(t){var e;return e=$(".js-main-target-form"),e.find(".js-errors").remove(),e.find(".js-md-write-button").click(),e.find(".js-note-text").val("").trigger("input"),e.find(".js-note-text").data("autosave").reset(),this.updateTargetButtons(t)},e.prototype.reenableTargetFormSubmitButton=function(){var t;return t=$(".js-main-target-form"),t.find(".js-note-text").trigger("input")},e.prototype.setupMainTargetNoteForm=function(){var t;return t=$(".js-new-note-form"),this.formClone=t.clone(),this.setupNoteForm(t),t.removeClass("js-new-note-form"),t.addClass("js-main-target-form"),t.find("#note_line_code").remove()},e.prototype.setupNoteForm=function(t){var e;return new GLForm(t),e=t.find(".js-note-text"),new Autosave(e,["Note",t.find("#note_commit_id").val(),t.find("#note_line_code").val(),t.find("#note_noteable_type").val(),t.find("#note_noteable_id").val()])},e.prototype.addNote=function(t,e,n){return this.renderNote(e)},e.prototype.addNoteError=function(t,e,n){var i;return i=new Flash("Your comment could not be submitted! Please check your network connection and try again.","alert"),i.pinTo(".md-area")},e.prototype.addDiscussionNote=function(t,e,n){return this.renderDiscussionNote(e),this.removeDiscussionNoteForm($("#new-discussion-note-form-"+e.discussion_id))},e.prototype.updateNote=function(t,e,n){var i,r;return i=$(e.html),gl.utils.localTimeAgo($(".js-timeago",i)),i.syntaxHighlight(),i.find(".js-task-list-container").taskList("enable"),
r=$(".note-row-"+e.id),r.replaceWith(i)},e.prototype.showEditForm=function(t,e,n){var i,r,o,s;return t.preventDefault(),s=$(this).closest(".note"),s.addClass("is-editting"),o=s.find(".note-edit-form"),o.addClass("current-note-edit-form"),s.find(".js-note-attachment-delete").show(),r=function(t){var e;return e=t.val(),t.val("").val(e)},new GLForm(o),null!=e&&null!=n?($("html, body").scrollTop($(document).height()),$("html, body").animate({scrollTop:n.offset().top-150},500,function(){var t;return t=o.find(".js-note-text"),t.focus(),r(t)})):(i=o.find(".js-note-text"),i.focus(),r(i))},e.prototype.cancelEdit=function(t){var e;return t.preventDefault(),e=$(this).closest(".note"),e.removeClass("is-editting"),e.find(".current-note-edit-form").removeClass("current-note-edit-form")},e.prototype.removeNote=function(t){var e;return e=$(t.currentTarget).closest(".note").attr("id"),$(".note[id='"+e+"']").each(function(t){return function(t,e){var n,i;return n=$(e),i=n.closest(".notes"),1===i.find(".note").length&&(i.closest(".timeline-entry").remove(),i.closest("tr").remove()),n.remove()}}(this)),this.updateNotesCount(-1)},e.prototype.removeAttachment=function(){var t;return t=$(this).closest(".note"),t.find(".note-attachment").remove(),t.find(".note-body > .note-text").show(),t.find(".note-header").show(),t.find(".current-note-edit-form").remove()},e.prototype.replyToDiscussionNote=function(t){var e,n;return e=this.formClone.clone(),n=$(t.target).closest(".js-discussion-reply-button"),n.hide(),n.after(e),this.setupDiscussionNoteForm(n,e)},e.prototype.setupDiscussionNoteForm=function(t,e){return e.attr("id","new-discussion-note-form-"+t.data("discussionId")),e.find("#line_type").val(t.data("lineType")),e.find("#note_commit_id").val(t.data("commitId")),e.find("#note_line_code").val(t.data("lineCode")),e.find("#note_noteable_type").val(t.data("noteableType")),e.find("#note_noteable_id").val(t.data("noteableId")),e.find(".js-note-discard").show().removeClass("js-note-discard").addClass("js-close-discussion-note-form").text(e.find(".js-close-discussion-note-form").data("cancel-text")),this.setupNoteForm(e),e.find(".js-note-text").focus(),e.removeClass("js-main-target-form").addClass("discussion-form js-discussion-note-form")},e.prototype.addDiffNote=function(t){var e,n,i,r,o,s,a,l,c,h,u,d;return t.preventDefault(),e=$(t.currentTarget),h=e.closest("tr"),s=h.next(),i=s.is(".notes_holder"),n=!1,d=".notes_content",u='<tr class="notes_holder js-temp-notes-holder"><td class="notes_line" colspan="2"></td><td class="notes_content"></td></tr>',this.isParallelView()&&(r=e.data("lineType"),d+="."+r,u='<tr class="notes_holder js-temp-notes-holder"><td class="notes_line"></td><td class="notes_content parallel old"></td><td class="notes_line"></td><td class="notes_content parallel new"></td></tr>'),i?(l=s.find(d),l.length&&(c=l.find(".js-discussion-reply-button:visible"),c.length?(t.target=c[0],$.proxy(this.replyToDiscussionNote,c[0],t).call()):(a=l.find(".js-discussion-note-form"),0===a.length&&(n=!0)))):(h.after(u),n=!0),n?(o=this.formClone.clone(),o.appendTo(h.next().find(d)),this.setupDiscussionNoteForm(e,o)):void 0},e.prototype.removeDiscussionNoteForm=function(t){var e,n;return n=t.closest("tr"),e=t.data("gl-form"),e.destroy(),t.find(".js-note-text").data("autosave").reset(),t.prev(".js-discussion-reply-button").show(),n.is(".js-temp-notes-holder")?n.remove():t.remove()},e.prototype.cancelDiscussionForm=function(t){var e;return t.preventDefault(),e=$(t.target).closest(".js-discussion-note-form"),this.removeDiscussionNoteForm(e)},e.prototype.updateFormAttachment=function(){var t,e;return e=$(this).closest("form"),t=$(this).val().replace(/^.*[\\\/]/,""),e.find(".js-attachment-filename").text(t)},e.prototype.visibilityChange=function(){return this.refresh()},e.prototype.updateCloseButton=function(t){var e,n,i;return i=$(t.target),n=i.parents("form"),e=n.find(".js-note-target-close"),e.text(e.data("original-text"))},e.prototype.updateTargetButtons=function(t){var e,n,i,r,o,s,a;if(a=$(t.target),r=a.parents("form"),o=r.find(".js-note-target-reopen"),e=r.find(".js-note-target-close"),i=r.find(".js-note-discard"),a.val().trim().length>0){if(s=o.data("alternative-text"),n=e.data("alternative-text"),o.text()!==s&&o.text(s),e.text()!==n&&e.text(n),o.is(":not(.btn-comment-and-reopen)")&&o.addClass("btn-comment-and-reopen"),e.is(":not(.btn-comment-and-close)")&&e.addClass("btn-comment-and-close"),i.is(":hidden"))return i.show()}else if(s=o.data("original-text"),n=e.data("original-text"),o.text()!==s&&o.text(s),e.text()!==n&&e.text(n),o.is(".btn-comment-and-reopen")&&o.removeClass("btn-comment-and-reopen"),e.is(".btn-comment-and-close")&&e.removeClass("btn-comment-and-close"),i.is(":visible"))return i.hide()},e.prototype.initTaskList=function(){return this.enableTaskList(),$(document).on("tasklist:changed",".note .js-task-list-container",this.updateTaskList)},e.prototype.enableTaskList=function(){return $(".note .js-task-list-container").taskList("enable")},e.prototype.updateTaskList=function(){return $("form",this).submit()},e.prototype.updateNotesCount=function(t){return this.notesCountBadge.text(parseInt(this.notesCountBadge.text())+t)},e}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.Profile=function(){function e(e){var n,i;null==e&&(e={}),this.onSubmitForm=t(this.onSubmitForm,this),this.form=null!=(i=e.form)?i:$(".edit-user"),$(".js-preferences-form").on("change.preference","input[type=radio]",function(){return $(this).parents("form").submit()}),$(".update-username").on("ajax:before",function(){return $(".loading-username").show(),$(this).find(".update-success").hide(),$(this).find(".update-failed").hide()}),$(".update-username").on("ajax:complete",function(){return $(".loading-username").hide(),$(this).find(".btn-save").enable(),$(this).find(".loading-gif").hide()}),$(".update-notifications").on("ajax:success",function(t,e){return e.saved?new Flash("Notification settings saved","notice"):new Flash("Failed to save new settings","alert")}),this.bindEvents(),n={filename:".js-avatar-filename",previewImage:".avatar-image .avatar",modalCrop:".modal-profile-crop",pickImageEl:".js-choose-user-avatar-button",uploadImageBtn:".js-upload-user-avatar",modalCropImg:".modal-profile-crop-image"},this.avatarGlCrop=$(".js-user-avatar-input").glCrop(n).data("glcrop")}return e.prototype.bindEvents=function(){return this.form.on("submit",this.onSubmitForm)},e.prototype.onSubmitForm=function(t){return t.preventDefault(),this.saveForm()},e.prototype.saveForm=function(){var t,e,n;return n=this,e=new FormData(this.form[0]),t=this.avatarGlCrop.getBlob(),null!=t&&e.append("user[avatar]",t,"avatar.png"),$.ajax({url:this.form.attr("action"),type:this.form.attr("method"),data:e,dataType:"json",processData:!1,contentType:!1,success:function(t){return new Flash(t.message,"notice")},error:function(t){return new Flash(t.responseJSON.message,"alert")},complete:function(){return window.scrollTo(0,0),n.form.find(":input[disabled]").enable()}})},e}(),$(function(){return $(document).on("focusout.ssh_key","#key_key",function(){var t,e;return t=$("#key_title"),e=$(this).val().match(/^\S+ \S+ (.+)\n?$/),e&&e.length>1&&""===t.val()?t.val(e[1]).change():void 0})})}.call(this),function(){this.Project=function(){function t(){$("ul.clone-options-dropdown a").click(function(){var t;if(!$(this).hasClass("active"))return $(".active").not($(this)).removeClass("active"),$(this).toggleClass("active"),t=$("#project_clone").val(),$("#project_clone").val(t),$(".clone").text(t)}),$(".project-refs-select").on("change",function(){return $(this).parents("form").submit()}),$(".hide-no-ssh-message").on("click",function(t){var e;return e="/",$.cookie("hide_no_ssh_message","false",{path:e}),$(this).parents(".no-ssh-key-message").remove(),t.preventDefault()}),$(".hide-no-password-message").on("click",function(t){var e;return e="/",$.cookie("hide_no_password_message","false",{path:e}),$(this).parents(".no-password-message").remove(),t.preventDefault()}),$(".update-notification").on("click",function(t){var e,n;return t.preventDefault(),n=$(this).data("notification-level"),e=$(this).data("notification-title"),$("#notification_setting_level").val(n),$("#notification-form").submit(),$("#notifications-button").empty().append("<i class='fa fa-bell'></i>"+e+"<i class='fa fa-angle-down'></i>"),$(this).parents("ul").find("li.active").removeClass("active"),$(this).parent().addClass("active")}),$("#notification-form").on("ajax:success",function(t,e){return e.saved?new Flash("Notification settings saved","notice"):new Flash("Failed to save new settings","alert")}),this.projectSelectDropdown()}return t.prototype.projectSelectDropdown=function(){return new ProjectSelect,$(".project-item-select").on("click",function(t){return function(e){return t.changeProject($(e.currentTarget).val())}}(this)),$(".js-projects-dropdown-toggle").on("click",function(t){return t.preventDefault(),$(".js-projects-dropdown").select2("open")})},t.prototype.changeProject=function(t){return window.location=t},t}()}.call(this),function(){this.ProjectAvatar=function(){function t(){$(".js-choose-project-avatar-button").bind("click",function(){var t;return t=$(this).closest("form"),t.find(".js-project-avatar-input").click()}),$(".js-project-avatar-input").bind("change",function(){var t,e;return e=$(this).closest("form"),t=$(this).val().replace(/^.*[\\\/]/,""),e.find(".js-avatar-filename").text(t)})}return t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.ProjectFindFile=function(){function e(e,n){this.element=e,this.options=n,this.goToBlob=t(this.goToBlob,this),this.goToTree=t(this.goToTree,this),this.selectRowDown=t(this.selectRowDown,this),this.selectRowUp=t(this.selectRowUp,this),this.filePaths={},this.inputElement=this.element.find(".file-finder-input"),this.initEvent(),this.inputElement.focus(),this.load(this.options.url)}var n;return e.prototype.initEvent=function(){return this.inputElement.off("keyup"),this.inputElement.on("keyup",function(t){return function(e){var n,i,r,o;return r=$(e.target),o=r.val(),n=null!=(i=r.data("oldValue"))?i:"",o!==n?(r.data("oldValue",o),t.findFile(),t.element.find("tr.tree-item").eq(0).addClass("selected").focus()):void 0}}(this)),this.element.find(".tree-content-holder .tree-table").on("click",function(t){var e;return"A"!==t.target.nodeName&&(e=this.element.find(".tree-item-file-name a",this).attr("href"))?location.href=e:void 0})},e.prototype.findFile=function(){var t,e;return e=this.inputElement.val(),t=e.length>0?fuzzaldrinPlus.filter(this.filePaths,e):this.filePaths,this.renderList(t,e)},e.prototype.load=function(t){return $.ajax({url:t,method:"get",dataType:"json",success:function(t){return function(e){return t.element.find(".loading").hide(),t.filePaths=e,t.findFile(),t.element.find(".files-slider tr.tree-item").eq(0).addClass("selected").focus()}}(this)})},e.prototype.renderList=function(t,e){var n,i,r,o,s,a,l,c;for(this.element.find(".tree-table > tbody").empty(),c=[],o=s=0,a=t.length;a>s&&(i=t[o],20!==o);o=++s)e&&(l=fuzzaldrinPlus.match(i,e)),n=this.options.blobUrlTemplate+"/"+i,r=this.makeHtml(i,l,n),c.push(this.element.find(".tree-table > tbody").append(r));return c},n=function(t,e,n){var i,r,o,s,a,l,c;for(o=0,i="",l=[],r=0,s=n.length;s>r;r++)a=n[r],c=e.substring(o,a),c&&(l.length&&t.append(l.join("").bold()),l=[],t.append(document.createTextNode(c))),l.push(e[a]),o=a+1;return l.length&&t.append(l.join("").bold()),t.append(document.createTextNode(e.substring(o)))},e.prototype.makeHtml=function(t,e,i){var r;return r=$("<tr class='tree-item'><td class='tree-item-file-name'><i class='fa fa-file-text-o fa-fw'></i><span class='str-truncated'><a></a></span></td></tr>"),e?r.find("a").replaceWith(n(r.find("a"),t,e).attr("href",i)):r.find("a").attr("href",i).text(t),r},e.prototype.selectRow=function(t){var e,n,i;return n=this.element.find(".files-slider tr.tree-item"),i=this.element.find(".files-slider tr.tree-item.selected"),n&&n.length>0?(i&&i.length>0?("UP"===t?e=i.prev():"DOWN"===t&&(e=i.next()),e.length>0&&(i.removeClass("selected"),i=e)):i=n.eq(0),i.addClass("selected").focus()):void 0},e.prototype.selectRowUp=function(){return this.selectRow("UP")},e.prototype.selectRowDown=function(){return this.selectRow("DOWN")},e.prototype.goToTree=function(){return location.href=this.options.treeUrl},e.prototype.goToBlob=function(){var t;return t=this.element.find(".tree-item.selected .tree-item-file-name a").attr("href"),t?location.href=t:void 0},e}()}.call(this),function(){this.ProjectFork=function(){function t(){$(".fork-thumbnail a").on("click",function(){return $(".fork-namespaces").hide(),$(".save-project-loader").show()})}return t}()}.call(this),function(){this.ProjectImport=function(){function t(){setTimeout(function(){return Turbolinks.visit(location.href)},5e3)}return t}()}.call(this),function(){this.ProjectMembers=function(){function t(){$("li.project_member").bind("ajax:success",function(){return $(this).fadeOut()})}return t}()}.call(this),function(){this.ProjectNew=function(){function t(){$(".project-edit-container").on("ajax:before",function(t){return function(){return $(".project-edit-container").hide(),$(".save-project-loader").show()}}(this)),this.toggleSettings(),this.toggleSettingsOnclick()}return t.prototype.toggleSettings=function(){var t;return t=$("#project_builds_enabled").prop("checked"),t?$(".builds-feature").show():$(".builds-feature").hide()},t.prototype.toggleSettingsOnclick=function(){return $("#project_builds_enabled").on("click",this.toggleSettings)},t}()}.call(this),function(){this.ProjectSelect=function(){function t(){$(".js-projects-dropdown-toggle").each(function(t,e){var n;return n=$(e),n.glDropdown({filterable:!0,filterRemote:!0,search:{fields:["name_with_namespace"]},data:function(t,e){var n,i;return n=function(t){return e(t)},i=this.includeGroups?function(e){var i;return i=function(t){var i;return i=t.concat(e),n(i)},Api.groups(t,!1,i)}:n,this.groupId?Api.groupProjects(this.groupId,t,i):Api.projects(t,this.orderBy,i)},url:function(t){return t.web_url},text:function(t){return t.name_with_namespace}})}),$(".ajax-project-select").each(function(t,e){var n;return this.groupId=$(e).data("group-id"),this.includeGroups=$(e).data("include-groups"),this.orderBy=$(e).data("order-by")||"id",n="Search for project",this.includeGroups&&(n+=" or group"),$(e).select2({placeholder:n,minimumInputLength:0,query:function(t){return function(e){var n,i;return n=function(t){var n;return n={results:t},e.callback(n)},i=t.includeGroups?function(t){var i;return i=function(e){var i;return i=e.concat(t),n(i)},Api.groups(e.term,!1,i)}:n,t.groupId?Api.groupProjects(t.groupId,e.term,i):Api.projects(e.term,t.orderBy,i)}}(this),id:function(t){return t.web_url},text:function(t){return t.name_with_namespace||t.name},dropdownCssClass:"ajax-project-dropdown"})})}return t}()}.call(this),function(){this.ProjectShow=function(){function t(){}return t}()}.call(this),function(){this.ProjectsList={init:function(){return $(".projects-list-filter").off("keyup"),this.initSearch(),this.initPagination()},initSearch:function(){return this.timer=null,$(".projects-list-filter").on("keyup",function(){return clearTimeout(this.timer),this.timer=setTimeout(ProjectsList.filterResults,500)})},filterResults:function(t){return function(){var t,e,n;return $(".projects-list-holder").fadeTo(250,.5),t=null,t=$("form#project-filter-form"),n=$(".projects-list-filter").val(),e=t.attr("action")+"?"+t.serialize(),$.ajax({type:"GET",url:t.attr("action"),data:t.serialize(),complete:function(){return $(".projects-list-holder").fadeTo(250,1)},success:function(t){return $(".projects-list-holder").replaceWith(t.html),history.replaceState({page:e},document.title,e)},dataType:"json"})}}(this),initPagination:function(){return $(".projects-list-holder .pagination").on("ajax:success",function(t,e){return $(".projects-list-holder").replaceWith(e.html)})}}}.call(this),function(){$(function(){return $(".protected-branches-list :checkbox").change(function(t){var e,n,i,r;return i=$(this).attr("name"),"developers_can_push"===i?(n=$(this).val(),e=$(this).is(":checked"),r=$(this).data("url"),$.ajax({type:"PUT",url:r,dataType:"json",data:{id:n,developers_can_push:e},success:function(){var e;return e=$(t.target),e.closest("tr").effect("highlight")},error:function(){return new Flash("Failed to update branch!","alert")}})):void 0})})}.call(this),function(){this.Sidebar=function(){function t(t){this.addEventListeners()}return t.prototype.addEventListeners=function(){return $("aside").on("click",".sidebar-collapsed-icon",this.sidebarCollapseClicked),$(".dropdown").on("hidden.gl.dropdown",this.sidebarDropdownHidden),$(".dropdown").on("loading.gl.dropdown",this.sidebarDropdownLoading),$(".dropdown").on("loaded.gl.dropdown",this.sidebarDropdownLoaded)},t.prototype.sidebarDropdownLoading=function(t){var e,n,i,r;return n=$(this).closest(".block").find(".sidebar-collapsed-icon"),r=n.find("img"),i=n.find("i"),e=$('<i class="fa fa-spinner fa-spin"></i>'),r.length?(r.before(e),r.hide()):i.length?(i.before(e),i.hide()):void 0},t.prototype.sidebarDropdownLoaded=function(t){var e,n,i;return e=$(this).closest(".block").find(".sidebar-collapsed-icon"),i=e.find("img"),e.find("i.fa-spin").remove(),n=e.find("i"),i.length?i.show():n.show()},t.prototype.sidebarCollapseClicked=function(t){var e,n;return t.preventDefault(),e=$(this).closest(".block"),$("aside").find(".gutter-toggle").trigger("click"),n=e.find(".edit-link"),n.length?(n.trigger("click"),e.addClass("collapse-after-update"),$(".page-with-sidebar").addClass("with-overlay")):void 0},t.prototype.sidebarDropdownHidden=function(t){var e;return e=$(this).closest(".block"),e.hasClass("collapse-after-update")?(e.removeClass("collapse-after-update"),$(".page-with-sidebar").removeClass("with-overlay"),$("aside").find(".gutter-toggle").trigger("click")):void 0},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.SearchAutocomplete=function(){function e(e){var n,i,r,o,s;null==e&&(e={}),this.onSearchInputBlur=t(this.onSearchInputBlur,this),this.onClearInputClick=t(this.onClearInputClick,this),this.onSearchInputFocus=t(this.onSearchInputFocus,this),this.onSearchInputClick=t(this.onSearchInputClick,this),this.onSearchInputKeyUp=t(this.onSearchInputKeyUp,this),this.onSearchInputKeyDown=t(this.onSearchInputKeyDown,this),this.onDocumentClick=t(this.onDocumentClick,this),this.wrap=null!=(n=e.wrap)?n:$(".search"),this.optsEl=null!=(i=e.optsEl)?i:this.wrap.find(".search-autocomplete-opts"),this.autocompletePath=null!=(r=e.autocompletePath)?r:this.optsEl.data("autocomplete-path"),this.projectId=null!=(o=e.projectId)?o:this.optsEl.data("autocomplete-project-id")||"",this.projectRef=null!=(s=e.projectRef)?s:this.optsEl.data("autocomplete-project-ref")||"",this.dropdown=this.wrap.find(".dropdown"),this.dropdownContent=this.dropdown.find(".dropdown-content"),this.locationBadgeEl=this.getElement(".search-location-badge"),this.locationText=this.getElement(".location-text"),this.scopeInputEl=this.getElement("#scope"),this.searchInput=this.getElement(".search-input"),this.projectInputEl=this.getElement("#search_project_id"),this.groupInputEl=this.getElement("#group_id"),this.searchCodeInputEl=this.getElement("#search_code"),this.repositoryInputEl=this.getElement("#repository_ref"),this.clearInput=this.getElement(".js-clear-input"),this.saveOriginalState(),gon.current_user_id&&this.createAutocomplete(),this.searchInput.addClass("disabled"),this.saveTextLength(),this.bindEvents()}var n;return n={ESCAPE:27,BACKSPACE:8,ENTER:13},e.prototype.getElement=function(t){return this.wrap.find(t)},e.prototype.saveOriginalState=function(){return this.originalState=this.serializeState()},e.prototype.saveTextLength=function(){return this.lastTextLength=this.searchInput.val().length},e.prototype.createAutocomplete=function(){return this.searchInput.glDropdown({filterInputBlur:!1,filterable:!0,filterRemote:!0,highlight:!0,enterCallback:!1,filterInput:"input#search",search:{fields:["text"]},data:this.getData.bind(this),selectable:!0,clicked:this.onClick.bind(this)})},e.prototype.getData=function(t,e){var n,i;return n=this,""===this.searchInput.val()||this.loadingSuggestions?void 0:(this.loadingSuggestions=!0,i=$.get(this.autocompletePath,{project_id:this.projectId,project_ref:this.projectRef,term:t},function(i){var r,o,s,a,l,c;if(!i.length)return void n.disableAutocomplete();for(r=[],o=!0,s=0,l=i.length;l>s;s++)c=i[s],a!==c.category&&(o||r.push("separator"),o&&(o=!1),r.push({header:c.category}),a=c.category),r.push({id:c.category.toLowerCase()+"-"+c.id,category:c.category,text:c.label,url:c.url});return r.length&&(r.push("separator"),r.push({text:'Result name contains "'+t+'"',url:"/search?search="+t+"&project_id="+n.projectInputEl.val()+"&group_id="+n.groupInputEl.val()})),e(r)}).always(function(){return n.loadingSuggestions=!1}))},e.prototype.serializeState=function(){return{search_project_id:this.projectInputEl.val(),group_id:this.groupInputEl.val(),search_code:this.searchCodeInputEl.val(),repository_ref:this.repositoryInputEl.val(),scope:this.scopeInputEl.val(),_location:this.locationText.text()}},e.prototype.bindEvents=function(){return $(document).on("click",this.onDocumentClick),this.searchInput.on("keydown",this.onSearchInputKeyDown),this.searchInput.on("keyup",this.onSearchInputKeyUp),this.searchInput.on("click",this.onSearchInputClick),this.searchInput.on("focus",this.onSearchInputFocus),this.clearInput.on("click",this.onClearInputClick)},e.prototype.onDocumentClick=function(t){return $.contains(this.dropdown[0],t.target)||!this.isFocused||$(t.target).parents("ul").length?void 0:this.onSearchInputBlur()},e.prototype.enableAutocomplete=function(){var t;if(gon.current_user_id)return t=this,this.loadingSuggestions=!1,this.dropdown.addClass("open"),this.searchInput.removeClass("disabled")},e.prototype.onSearchInputKeyDown=function(){return this.saveTextLength()},e.prototype.onSearchInputKeyUp=function(t){switch(t.keyCode){case n.BACKSPACE:0===this.lastTextLength&&this.badgePresent()&&this.removeLocationBadge(),1===this.lastTextLength&&this.disableAutocomplete(),this.lastTextLength>1&&this.enableAutocomplete();break;case n.ESCAPE:this.restoreOriginalState();break;default:""===this.searchInput.val()?this.disableAutocomplete():this.enableAutocomplete()}this.wrap.toggleClass("has-value",!!t.target.value)},e.prototype.onSearchInputClick=function(t){return t.stopImmediatePropagation()},e.prototype.onSearchInputFocus=function(){return this.isFocused=!0,this.wrap.addClass("search-active")},e.prototype.onClearInputClick=function(t){return t.preventDefault(),this.searchInput.val("").focus()},e.prototype.onSearchInputBlur=function(t){return this.isFocused=!1,this.wrap.removeClass("search-active"),""===this.searchInput.val()?this.restoreOriginalState():void 0},e.prototype.addLocationBadge=function(t){var e,n,i;return e=null!=t.category?t.category+": ":"",i=null!=t.value?t.value:"",n="<span class='location-badge'> <i class='location-text'>"+e+i+"</i> </span>",this.locationBadgeEl.html(n),this.wrap.addClass("has-location-badge")},e.prototype.restoreOriginalState=function(){var t,e,n,i;for(n=Object.keys(this.originalState),t=0,i=n.length;i>t;t++)e=n[t],this.getElement("#"+e).val(this.originalState[e]);return""===this.originalState._location?this.locationBadgeEl.empty():this.addLocationBadge({value:this.originalState._location}),this.dropdown.removeClass("open")},e.prototype.badgePresent=function(){return this.locationBadgeEl.children().length},e.prototype.resetSearchState=function(){var t,e,n,i,r;for(n=Object.keys(this.originalState),r=[],t=0,i=n.length;i>t&&(e=n[t],"_location"!==e);t++)r.push(this.getElement("#"+e).val(""));return r},e.prototype.removeLocationBadge=function(){return this.locationBadgeEl.empty(),this.resetSearchState(),this.wrap.removeClass("has-location-badge")},e.prototype.disableAutocomplete=function(){return this.searchInput.addClass("disabled"),this.dropdown.removeClass("open"),this.restoreMenu()},e.prototype.restoreMenu=function(){var t;return t="<ul> <li><a class='dropdown-menu-empty-link is-focused'>Loading...</a></li> </ul>",this.dropdownContent.html(t)},e.prototype.onClick=function(t,e,n){return-1!==location.pathname.indexOf(t.url)?(n.preventDefault(),this.badgePresent||("Projects"===t.category&&(this.projectInputEl.val(t.id),this.addLocationBadge({value:"This project"})),"Groups"===t.category&&(this.groupInputEl.val(t.id),this.addLocationBadge({value:"This group"}))),e.removeClass("is-active"),this.disableAutocomplete(),this.searchInput.val("").focus()):void 0},e}()}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.ShortcutsFindFile=function(e){function n(t){var e;this.projectFindFile=t,n.__super__.constructor.call(this),e=Mousetrap.stopCallback,Mousetrap.stopCallback=function(t){return function(n,i,r){return i!==t.projectFindFile.inputElement[0]||"up"!==r&&"down"!==r&&"esc"!==r&&"enter"!==r?e(n,i,r):(n.preventDefault(),!1)}}(this),Mousetrap.bind("up",this.projectFindFile.selectRowUp),Mousetrap.bind("down",this.projectFindFile.selectRowDown),Mousetrap.bind("esc",this.projectFindFile.goToTree),Mousetrap.bind("enter",this.projectFindFile.goToBlob)}return t(n,e),n}(ShortcutsNavigation)}.call(this),function(){var t,e,n;t="page-sidebar-collapsed",e="page-sidebar-expanded",n=function(){return $(".page-with-sidebar").toggleClass(t+" "+e),$("header").toggleClass("header-collapsed header-expanded"),$(".toggle-nav-collapse i").toggleClass("fa-angle-right fa-angle-left"),$.cookie("collapsed_nav",$(".page-with-sidebar").hasClass(t),{path:"/"}),setTimeout(function(){var t;return t=$(".nicescroll").niceScroll(),t.updateScrollBar()},300)},$(document).on("click",".toggle-nav-collapse",function(t){return t.preventDefault(),n()}),$(function(){var t;return t=bp.getBreakpointSize(),"xs"!==t&&"sm"!==t||!$(".page-with-sidebar").hasClass(e)?void 0:n()})}.call(this),function(){this.Star=function(){function t(){$(".project-home-panel .toggle-star").on("ajax:success",function(t,e,n,i){var r,o,s,a;s=$(this),o=s.find("span"),r=s.find("i"),(a=function(t){s.parent().find(".star-count").text(e.star_count),t?(o.removeClass("starred").text("Star"),r.removeClass("fa-star").addClass("fa-star-o")):(o.addClass("starred").text("Unstar"),r.removeClass("fa-star-o").addClass("fa-star"))})(o.hasClass("starred"))}).on("ajax:error",function(t,e,n,i){new Flash("Star toggle failed. Try again later.","alert")})}return t}()}.call(this),function(){this.StatGraph=function(){function t(){}return t.log={},t.get_log=function(){return this.log},t.set_log=function(t){return this.log=t},t}()}.call(this),function(){window.ContributorsStatGraphUtil={parse_log:function(t){var e,n,i,r,o,s,a;for(a={},e={},n={},o=0,s=t.length;s>o;o++)r=t[o],null==a[r.date]&&this.add_date(r.date,a),i=e[r.author_name]||n[r.author_email],null==i&&(i=this.add_author(r,e,n)),i[r.date]||this.add_date(r.date,i),this.store_data(r,a[r.date],i[r.date]);return a=_.toArray(a),e=_.toArray(e),{total:a,by_author:e}},add_date:function(t,e){return e[t]={},e[t].date=t},add_author:function(t,e,n){var i;return i={},i.author_name=t.author_name,i.author_email=t.author_email,e[t.author_name]=i,n[t.author_email]=i},store_data:function(t,e,n){return this.store_commits(e,n),this.store_additions(t,e,n),this.store_deletions(t,e,n)},store_commits:function(t,e){return this.add(t,"commits",1),this.add(e,"commits",1)},add:function(t,e,n){return null==t[e]&&(t[e]=0),t[e]+=n},store_additions:function(t,e,n){return null==t.additions&&(t.additions=0),this.add(e,"additions",t.additions),this.add(n,"additions",t.additions)},store_deletions:function(t,e,n){return null==t.deletions&&(t.deletions=0),this.add(e,"deletions",t.deletions),this.add(n,"deletions",t.deletions)},get_total_data:function(t,e){var n,i;return n=t.total,i=this.pick_field(n,e),_.sortBy(i,function(t){return t.date})},pick_field:function(t,e){var n;return n=[],_.each(t,function(t){return n.push(_.pick(t,[e,"date"]))}),n},get_author_data:function(t,e,n){var i,r;return null==n&&(n=null),r=t.by_author,i=[],_.each(r,function(t){return function(r){var o;return o=t.parse_log_entry(r,e,n),_.isEmpty(o.dates)?void 0:i.push(o)}}(this)),_.sortBy(i,function(t){return t[e]}).reverse()},parse_log_entry:function(t,e,n){var i;return i={},i.author_name=t.author_name,i.author_email=t.author_email,i.dates={},i.commits=i.additions=i.deletions=0,_.each(_.omit(t,"author_name","author_email"),function(t){return function(r,o){return t.in_range(r.date,n)?(i.dates[r.date]=r[e],i.commits+=r.commits,i.additions+=r.additions,i.deletions+=r.deletions):void 0}}(this)),i},in_range:function(t,e){var n;return null===e||e[0]<=(n=new Date(t))&&n<=e[1]?!0:!1}}}.call(this),function(){this.ContributorsStatGraph=function(){function t(){}return t.prototype.init=function(t){var e,n;return this.parsed_log=ContributorsStatGraphUtil.parse_log(t),this.set_current_field("commits"),n=ContributorsStatGraphUtil.get_total_data(this.parsed_log,this.field),e=ContributorsStatGraphUtil.get_author_data(this.parsed_log,this.field),this.add_master_graph(n),this.add_authors_graph(e),this.change_date_header()},t.prototype.add_master_graph=function(t){return this.master_graph=new ContributorsMasterGraph(t),this.master_graph.draw()},t.prototype.add_authors_graph=function(t){var e;return this.authors=[],e=t.slice(0,100),_.each(e,function(t){return function(e){var n,i;return i=t.create_author_header(e),$(".contributors-list").append(i),t.authors[e.author_name]=n=new ContributorsAuthorGraph(e.dates),n.draw()}}(this))},t.prototype.format_author_commit_info=function(t){var e;return e=$("<span/>",{"class":"graph-author-commits-count"}),e.text(t.commits+" commits"),$("<span/>").append(e)},t.prototype.create_author_header=function(t){var e,n,i,r,o;return o=$("<li/>",{"class":"person",style:"display: block;"}),r=$("<h4>"+t.author_name+"</h4>"),i=$('<p class="graph-author-email">'+t.author_email+"</p>"),n=$("<span/>",{"class":"commits"}),e=this.format_author_commit_info(t),n.html(e),o.append(r),o.append(i),o.append(n),o},t.prototype.redraw_master=function(){var t;return t=ContributorsStatGraphUtil.get_total_data(this.parsed_log,this.field),this.master_graph.set_data(t),this.master_graph.redraw()},t.prototype.redraw_authors=function(){var t,e;return $("ol").html(""),e=ContributorsGraph.prototype.x_domain,t=ContributorsStatGraphUtil.get_author_data(this.parsed_log,this.field,e),_.each(t,function(t){return function(e){return t.redraw_author_commit_info(e),$(t.authors[e.author_name].list_item).appendTo("ol"),t.authors[e.author_name].set_data(e.dates),t.authors[e.author_name].redraw()}}(this))},t.prototype.set_current_field=function(t){return this.field=t},t.prototype.change_date_header=function(){var t,e,n;return n=ContributorsGraph.prototype.x_domain,e=d3.time.format("%B %e %Y"),t=e(n[0])+" - "+e(n[1]),$("#date_header").text(t)},t.prototype.redraw_author_commit_info=function(t){var e,n;return n=$(this.authors[t.author_name].list_item),e=this.format_author_commit_info(t),n.find("span").html(e)},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e=function(t,e){function i(){this.constructor=t}for(var r in e)n.call(e,r)&&(t[r]=e[r]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},n={}.hasOwnProperty;this.ContributorsGraph=function(){function t(){}return t.prototype.MARGIN={top:20,right:20,bottom:30,left:50},t.prototype.x_domain=null,t.prototype.y_domain=null,t.prototype.dates=[],t.set_x_domain=function(e){return t.prototype.x_domain=e},t.set_y_domain=function(e){return t.prototype.y_domain=[0,d3.max(e,function(t){var e,n;return t.commits=null!=(e=null!=(n=t.commits)?n:t.additions)?e:t.deletions})]},t.init_x_domain=function(e){return t.prototype.x_domain=d3.extent(e,function(t){return t.date})},t.init_y_domain=function(e){return t.prototype.y_domain=[0,d3.max(e,function(t){var e,n;return t.commits=null!=(e=null!=(n=t.commits)?n:t.additions)?e:t.deletions})]},t.init_domain=function(e){return t.init_x_domain(e),t.init_y_domain(e)},t.set_dates=function(e){return t.prototype.dates=e},t.prototype.set_x_domain=function(){return this.x.domain(this.x_domain)},t.prototype.set_y_domain=function(){return this.y.domain(this.y_domain)},t.prototype.set_domain=function(){return this.set_x_domain(),this.set_y_domain()},t.prototype.create_scale=function(t,e){return this.x=d3.time.scale().range([0,t]).clamp(!0),this.y=d3.scale.linear().range([e,0]).nice();
},t.prototype.draw_x_axis=function(){return this.svg.append("g").attr("class","x axis").attr("transform","translate(0, "+this.height+")").call(this.x_axis)},t.prototype.draw_y_axis=function(){return this.svg.append("g").attr("class","y axis").call(this.y_axis)},t.prototype.set_data=function(t){return this.data=t},t}(),this.ContributorsMasterGraph=function(n){function i(e){this.data=e,this.update_content=t(this.update_content,this),this.width=$(".content").width()-70,this.height=200,this.x=null,this.y=null,this.x_axis=null,this.y_axis=null,this.area=null,this.svg=null,this.brush=null,this.x_max_domain=null}return e(i,n),i.prototype.process_dates=function(t){var e;return e=this.get_dates(t),this.parse_dates(t),ContributorsGraph.set_dates(e)},i.prototype.get_dates=function(t){return _.pluck(t,"date")},i.prototype.parse_dates=function(t){var e;return e=d3.time.format("%Y-%m-%d").parse,t.forEach(function(t){return t.date=e(t.date)})},i.prototype.create_scale=function(){return i.__super__.create_scale.call(this,this.width,this.height)},i.prototype.create_axes=function(){return this.x_axis=d3.svg.axis().scale(this.x).orient("bottom"),this.y_axis=d3.svg.axis().scale(this.y).orient("left").ticks(5)},i.prototype.create_svg=function(){return this.svg=d3.select("#contributors-master").append("svg").attr("width",this.width+this.MARGIN.left+this.MARGIN.right).attr("height",this.height+this.MARGIN.top+this.MARGIN.bottom).attr("class","tint-box").append("g").attr("transform","translate("+this.MARGIN.left+","+this.MARGIN.top+")")},i.prototype.create_area=function(t,e){return this.area=d3.svg.area().x(function(e){return t(e.date)}).y0(this.height).y1(function(t){var n,i,r;return r=t.commits=null!=(n=null!=(i=t.commits)?i:t.additions)?n:t.deletions,e(r)}).interpolate("basis")},i.prototype.create_brush=function(){return this.brush=d3.svg.brush().x(this.x).on("brushend",this.update_content)},i.prototype.draw_path=function(t){return this.svg.append("path").datum(t).attr("class","area").attr("d",this.area)},i.prototype.add_brush=function(){return this.svg.append("g").attr("class","selection").call(this.brush).selectAll("rect").attr("height",this.height)},i.prototype.update_content=function(){return ContributorsGraph.set_x_domain(this.brush.empty()?this.x_max_domain:this.brush.extent()),$("#brush_change").trigger("change")},i.prototype.draw=function(){return this.process_dates(this.data),this.create_scale(),this.create_axes(),ContributorsGraph.init_domain(this.data),this.x_max_domain=this.x_domain,this.set_domain(),this.create_area(this.x,this.y),this.create_svg(),this.create_brush(),this.draw_path(this.data),this.draw_x_axis(),this.draw_y_axis(),this.add_brush()},i.prototype.redraw=function(){return this.process_dates(this.data),ContributorsGraph.set_y_domain(this.data),this.set_y_domain(),this.svg.select("path").datum(this.data),this.svg.select("path").attr("d",this.area),this.svg.select(".y.axis").call(this.y_axis)},i}(ContributorsGraph),this.ContributorsAuthorGraph=function(t){function n(t){this.data=t,this.width=$(".content").width()/2-100,this.height=200,this.x=null,this.y=null,this.x_axis=null,this.y_axis=null,this.area=null,this.svg=null,this.list_item=null}return e(n,t),n.prototype.create_scale=function(){return n.__super__.create_scale.call(this,this.width,this.height)},n.prototype.create_axes=function(){return this.x_axis=d3.svg.axis().scale(this.x).orient("bottom").ticks(8),this.y_axis=d3.svg.axis().scale(this.y).orient("left").ticks(5)},n.prototype.create_area=function(t,e){return this.area=d3.svg.area().x(function(e){var n;return n=d3.time.format("%Y-%m-%d").parse,t(n(e))}).y0(this.height).y1(function(t){return function(n){return e(null!=t.data[n]?t.data[n]:0)}}(this)).interpolate("basis")},n.prototype.create_svg=function(){return this.list_item=d3.selectAll(".person")[0].pop(),this.svg=d3.select(this.list_item).append("svg").attr("width",this.width+this.MARGIN.left+this.MARGIN.right).attr("height",this.height+this.MARGIN.top+this.MARGIN.bottom).attr("class","spark").append("g").attr("transform","translate("+this.MARGIN.left+","+this.MARGIN.top+")")},n.prototype.draw_path=function(t){return this.svg.append("path").datum(t).attr("class","area-contributor").attr("d",this.area)},n.prototype.draw=function(){return this.create_scale(),this.create_axes(),this.set_domain(),this.create_area(this.x,this.y),this.create_svg(),this.draw_path(this.dates),this.draw_x_axis(),this.draw_y_axis()},n.prototype.redraw=function(){return this.set_domain(),this.svg.select("path").datum(this.dates),this.svg.select("path").attr("d",this.area),this.svg.select(".x.axis").call(this.x_axis),this.svg.select(".y.axis").call(this.y_axis)},n}(ContributorsGraph)}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.Subscription=function(){function e(e){this.toggleSubscription=t(this.toggleSubscription,this);var n;n=$(e),this.url=n.attr("data-url"),this.subscribe_button=n.find(".js-subscribe-button"),this.subscription_status=n.find(".subscription-status"),this.subscribe_button.unbind("click").click(this.toggleSubscription)}return e.prototype.toggleSubscription=function(t){var e,n,i;return n=$(t.currentTarget),e=n.find("span").text(),i=this.subscription_status.attr("data-status"),n.addClass("disabled"),$.post(this.url,function(t){return function(){var r;return n.removeClass("disabled"),r="subscribed"===i?"unsubscribed":"subscribed",t.subscription_status.attr("data-status",r),e="subscribed"===r?"Unsubscribe":"Subscribe",n.find("span").text(e),t.subscription_status.find(">div").toggleClass("hidden")}}(this))},e}()}.call(this),function(){$.fn.syntaxHighlight=function(){var t;return $(this).hasClass("js-syntax-highlight")?$(this).addClass(gon.user_color_scheme):(t=$(this).find(".js-syntax-highlight"),t.length?t.syntaxHighlight():void 0)},$(document).on("ready page:load",function(){return $(".js-syntax-highlight").syntaxHighlight()})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.Todos=function(){function e(e){var n;null==e&&(e={}),this.allDoneClicked=t(this.allDoneClicked,this),this.doneClicked=t(this.doneClicked,this),this.el=null!=(n=e.el)?n:$(".js-todos-options"),this.perPage=this.el.data("perPage"),this.clearListeners(),this.initBtnListeners()}return e.prototype.clearListeners=function(){return $(".done-todo").off("click"),$(".js-todos-mark-all").off("click"),$(".todo").off("click")},e.prototype.initBtnListeners=function(){return $(".done-todo").on("click",this.doneClicked),$(".js-todos-mark-all").on("click",this.allDoneClicked),$(".todo").on("click",this.goToTodoUrl)},e.prototype.doneClicked=function(t){var e;return t.preventDefault(),t.stopImmediatePropagation(),e=$(t.currentTarget),e.disable(),$.ajax({type:"POST",url:e.attr("href"),dataType:"json",data:{_method:"delete"},success:function(t){return function(n){return t.redirectIfNeeded(n.count),t.clearDone(e.closest("li")),t.updateBadges(n)}}(this)})},e.prototype.allDoneClicked=function(t){var e;return t.preventDefault(),t.stopImmediatePropagation(),e=$(t.currentTarget),e.disable(),$.ajax({type:"POST",url:e.attr("href"),dataType:"json",data:{_method:"delete"},success:function(t){return function(n){return e.remove(),$(".js-todos-list").remove(),t.updateBadges(n)}}(this)})},e.prototype.clearDone=function(t){var e;return e=t.closest("ul"),t.remove(),e.find("li").length?void 0:e.parents(".panel").remove()},e.prototype.updateBadges=function(t){return $(".todos-pending .badge, .todos-pending-count").text(t.count),$(".todos-done .badge").text(t.done_count)},e.prototype.getTotalPages=function(){return this.el.data("totalPages")},e.prototype.getCurrentPage=function(){return this.el.data("currentPage")},e.prototype.getTodosPerPage=function(){return this.el.data("perPage")},e.prototype.redirectIfNeeded=function(t){var e,n,i,r,o;return n=this.getTotalPages(),e=this.getCurrentPage(),t?n?(i=Math.ceil(t/this.getTodosPerPage()),o=location.href,i!==n?(n>1&&e===n&&(r={page:n-1},o=gl.utils.mergeUrlParams(r,o)),Turbolinks.visit(o)):void 0):void 0:void location.reload()},e.prototype.goToTodoUrl=function(t){var e;return(e=$(this).data("url"))?t.metaKey||2===t.which?(t.preventDefault(),window.open(e,"_blank")):Turbolinks.visit(e):void 0},e}()}.call(this),function(){this.TreeView=function(){function t(){this.initKeyNav(),$(".tree-content-holder .tree-item").on("click",function(t){var e;return"A"!==t.target.nodeName?(e=$(".tree-item-file-name a",this).attr("href"),Turbolinks.visit(e)):void 0}),$("span.log_loading:first").removeClass("hide")}return t.prototype.initKeyNav=function(){var t,e;return t=$("tr.tree-item"),e=null,$("body").keydown(function(n){var i,r;return $("input:focus").length>0&&(38===n.which||40===n.which)?!1:40===n.which?(e?(i=e.next(),i.length>0&&(e.removeClass("selected"),e=i.addClass("selected"))):e=t.eq(0).addClass("selected"),$(e).focus()):38===n.which?(e?(i=e.prev(),i.length>0&&(e.removeClass("selected"),e=i.addClass("selected"))):e=t.last().addClass("selected"),$(e).focus()):13===n.which&&(r=$(".tree-item.selected .tree-item-file-name a").attr("href"))?Turbolinks.visit(r):void 0})},t}()}.call(this),function(){this.User=function(){function t(t){this.opts=t,$(".profile-groups-avatars").tooltip({placement:"top"}),this.initTabs(),$(".hide-project-limit-message").on("click",function(t){var e;return e="/",$.cookie("hide_project_limit_message","false",{path:e}),$(this).parents(".project-limit-message").remove(),t.preventDefault()})}return t.prototype.initTabs=function(){return new UserTabs({parentEl:".user-profile",action:this.opts.action})},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.UserTabs=function(){function e(e){this.tabShown=t(this.tabShown,this);var n,i,r,o,s,a,l;for(this.action=null!=(o=e.action)?o:"activity",this.defaultAction=null!=(s=e.defaultAction)?s:"activity",this.parentEl=null!=(a=e.parentEl)?a:$(document),"string"==typeof this.parentEl&&(this.parentEl=$(this.parentEl)),this._location=location,this.loaded={},l=this.parentEl.find(".nav-links a"),n=0,r=l.length;r>n;n++)i=l[n],this.loaded[$(i).attr("data-action")]=!1;this.actions=Object.keys(this.loaded),this.bindEvents(),"show"===this.action&&(this.action=this.defaultAction),this.activateTab(this.action)}return e.prototype.bindEvents=function(){return this.parentEl.off("shown.bs.tab",'.nav-links a[data-toggle="tab"]').on("shown.bs.tab",'.nav-links a[data-toggle="tab"]',this.tabShown)},e.prototype.tabShown=function(t){var e,n,i;return e=$(t.target),n=e.data("action"),i=e.attr("href"),this.setTab(i,n),this.setCurrentAction(n)},e.prototype.activateTab=function(t){return this.parentEl.find(".nav-links ."+t+"-tab a").tab("show")},e.prototype.setTab=function(t,e){return this.loaded[e]!==!0?("activity"===e&&this.loadActivities(t),"groups"===e||"contributed"===e||"projects"===e?this.loadTab(t,e):void 0):void 0},e.prototype.loadTab=function(t,e){return $.ajax({beforeSend:function(t){return function(){return t.toggleLoading(!0)}}(this),complete:function(t){return function(){return t.toggleLoading(!1)}}(this),dataType:"json",type:"GET",url:t+".json",success:function(t){return function(n){var i;return i="div#"+e,t.parentEl.find(i).html(n.html),t.loaded[e]=!0}}(this)})},e.prototype.loadActivities=function(t){var e;if(this.loaded.activity!==!0)return e=this.parentEl.find(".user-calendar"),e.load(e.data("href")),new Activities,this.loaded.activity=!0},e.prototype.toggleLoading=function(t){return this.parentEl.find(".loading-status .loading").toggle(t)},e.prototype.setCurrentAction=function(t){var e,n;return n=new RegExp("/("+this.actions.join("|")+")(.html)?/?$"),e=this._location.pathname,e=e.replace(/\/+$/,""),e=e.replace(n,""),t!==this.defaultAction&&(e+="/"+t),e+=this._location.search+this._location.hash,history.replaceState({turbolinks:!0,url:e},document.title,e),e},e}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},e=[].slice;this.UsersSelect=function(){function n(n){this.users=t(this.users,this),this.user=t(this.user,this),this.usersPath="/autocomplete/users.json",this.userPath="/autocomplete/users/:id.json",null!=n&&(this.currentUser=JSON.parse(n)),$(".js-user-search").each(function(t){return function(e,n){var i,r,o,s,a,l,c,h,u,d,f,p,g,m,v,y;return o=$(n),t.projectId=o.data("project-id"),t.showCurrentUser=o.data("current-user"),y=o.data("null-user"),v=o.data("any-user"),p=o.data("first-user"),t.authorId=o.data("author-id"),m=o.data("selected"),f=o.data("default-label"),g=o.data("issueUpdate"),a=o.closest(".selectbox"),i=a.closest(".block"),c=o.data("ability-name"),l=i.find(".value"),r=i.find(".sidebar-collapsed-user"),s=i.find(".block-loading").fadeOut(),i.on("click",".js-assign-yourself",function(e){return e.preventDefault(),h(t.currentUser.id)}),h=function(t){var e;return e={},e[c]={},e[c].assignee_id=t,s.fadeIn(),o.trigger("loading.gl.dropdown"),$.ajax({type:"PUT",dataType:"json",url:g,data:e}).done(function(t){var e;return o.trigger("loaded.gl.dropdown"),s.fadeOut(),a.hide(),e=t.assignee?{name:t.assignee.name,username:t.assignee.username,avatar:t.assignee.avatar_url}:{name:"Unassigned",username:"",avatar:""},l.html(u(e)),r.html(d(e))})},d=_.template('<% if( avatar ) { %> <a class="author_link" href="/u/<%= username %>"> <img width="24" class="avatar avatar-inline s24" alt="" src="<%= avatar %>"> <span class="author">Toni Boehm</span> </a> <% } else { %> <i class="fa fa-user"></i> <% } %>'),u=_.template('<% if (username) { %> <a class="author_link " href="/u/<%= username %>"> <% if( avatar ) { %> <img width="32" class="avatar avatar-inline s32" alt="" src="<%= avatar %>"> <% } %> <span class="author"><%= name %></span> <span class="username"> @<%= username %> </span> </a> <% } else { %> <span class="assign-yourself"> No assignee - <a href="#" class="js-assign-yourself"> assign yourself </a> </span> <% } %>'),o.glDropdown({data:function(e,n){return t.users(e,function(t){var i,r,o,s,a,l,c;if(0===e.length){if(c=0,p)for(r=o=0,s=t.length;s>o;r=++o)if(l=t[r],l.username===p){t.splice(r,1),t.unshift(l);break}y&&(c+=1,t.unshift({beforeDivider:!0,name:"Unassigned",id:0})),v&&(c+=1,a=v,a===!0&&(a="Any User"),i={beforeDivider:!0,name:a,id:null},t.unshift(i))}return c&&t.splice(c,0,"divider"),n(t)})},filterable:!0,filterRemote:!0,search:{fields:["name","username"]},selectable:!0,fieldName:o.data("field-name"),toggleLabel:function(t){return t&&"id"in t?t.name:f},inputId:"issue_assignee_id",hidden:function(t){return a.hide(),l.removeAttr("style")},clicked:function(t){var e,n,i,r;return i=$("body").data("page"),e="projects:issues:index"===i,n=i===i&&"projects:merge_requests:index"===i,o.hasClass("js-filter-bulk-update")?void 0:o.hasClass("js-filter-submit")&&(e||n)?(m=t.id,Issuable.filterResults(o.closest("form"))):o.hasClass("js-filter-submit")?o.closest("form").submit():(r=o.closest(".selectbox").find("input[name='"+o.data("field-name")+"']").val(),h(r))},renderRow:function(t){var e,n,i,r,o,s,a;return a=t.username?"@"+t.username:"",e=t.avatar_url?t.avatar_url:!1,s=t.id===m?"is-active":"",n="",null!=t.beforeDivider?"<li> <a href='#' class='"+s+"'> "+t.name+" </a> </li>":e&&(n="<img src='"+e+"' class='avatar avatar-inline' width='30' />"),r="<li> <a href='#' class='dropdown-menu-user-link "+s+"'> "+n+" <strong class='dropdown-menu-user-full-name'> "+t.name+" </strong>",o="<span class='dropdown-menu-user-username'> "+a+" </span>",i="</a> </li>",""===a&&(o=""),r+o+i}})}}(this)),$(".ajax-users-select").each(function(t){return function(n,i){var r,o,s,a;return t.projectId=$(i).data("project-id"),t.groupId=$(i).data("group-id"),t.showCurrentUser=$(i).data("current-user"),t.authorId=$(i).data("author-id"),a=$(i).data("null-user"),o=$(i).data("any-user"),s=$(i).data("email-user"),r=$(i).data("first-user"),$(i).select2({placeholder:"Search for a user",multiple:$(i).hasClass("multiselect"),minimumInputLength:0,query:function(e){return t.users(e.term,function(t){var n,i,l,c,h,u,d,f,p,g;if(i={results:t},0===e.term.length){if(r)for(g=i.results,c=h=0,u=g.length;u>h;c=++h)if(p=g[c],p.username===r){i.results.splice(c,1),i.results.unshift(p);break}a&&(f={name:"Unassigned",id:0},i.results.unshift(f)),o&&(d=o,d===!0&&(d="Any User"),n={name:d,id:null},i.results.unshift(n))}return s&&0===i.results.length&&e.term.match(/^[^@]+@[^@]+$/)&&(l={name:'Invite "'+e.term+'"',username:e.term,id:e.term},i.results.unshift(l)),e.callback(i)})},initSelection:function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],t.initSelection.apply(t,n)},formatResult:function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],t.formatResult.apply(t,n)},formatSelection:function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],t.formatSelection.apply(t,n)},dropdownCssClass:"ajax-users-dropdown",escapeMarkup:function(t){return t}})}}(this))}return n.prototype.initSelection=function(t,e){var n,i;return n=$(t).val(),"0"===n?(i={name:"Unassigned"},e(i)):""!==n?this.user(n,e):void 0},n.prototype.formatResult=function(t){var e;return e=t.avatar_url?t.avatar_url:gon.default_avatar_url,"<div class='user-result "+(t.username?void 0:"no-username")+"'> <div class='user-image'><img class='avatar s24' src='"+e+"'></div> <div class='user-name'>"+t.name+"</div> <div class='user-username'>"+(t.username||"")+"</div> </div>"},n.prototype.formatSelection=function(t){return t.name},n.prototype.user=function(t,e){var n;return n=this.buildUrl(this.userPath),n=n.replace(":id",t),$.ajax({url:n,dataType:"json"}).done(function(t){return e(t)})},n.prototype.users=function(t,e){var n;return n=this.buildUrl(this.usersPath),$.ajax({url:n,data:{search:t,per_page:20,active:!0,project_id:this.projectId,group_id:this.groupId,current_user:this.showCurrentUser,author_id:this.authorId},dataType:"json"}).done(function(t){return e(t)})},n.prototype.buildUrl=function(t){return null!=gon.relative_url_root&&(t=gon.relative_url_root.replace(/\/$/,"")+t),t},n}()}.call(this);var Latinise={map:{"\xc1":"A","\u0102":"A","\u1eae":"A","\u1eb6":"A","\u1eb0":"A","\u1eb2":"A","\u1eb4":"A","\u01cd":"A","\xc2":"A","\u1ea4":"A","\u1eac":"A","\u1ea6":"A","\u1ea8":"A","\u1eaa":"A","\xc4":"A","\u01de":"A","\u0226":"A","\u01e0":"A","\u1ea0":"A","\u0200":"A","\xc0":"A","\u1ea2":"A","\u0202":"A","\u0100":"A","\u0104":"A","\xc5":"A","\u01fa":"A","\u1e00":"A","\u023a":"A","\xc3":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u1e02":"B","\u1e04":"B","\u0181":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0106":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0108":"C","\u010a":"C","\u0187":"C","\u023b":"C","\u010e":"D","\u1e10":"D","\u1e12":"D","\u1e0a":"D","\u1e0c":"D","\u018a":"D","\u1e0e":"D","\u01f2":"D","\u01c5":"D","\u0110":"D","\u018b":"D","\u01f1":"DZ","\u01c4":"DZ","\xc9":"E","\u0114":"E","\u011a":"E","\u0228":"E","\u1e1c":"E","\xca":"E","\u1ebe":"E","\u1ec6":"E","\u1ec0":"E","\u1ec2":"E","\u1ec4":"E","\u1e18":"E","\xcb":"E","\u0116":"E","\u1eb8":"E","\u0204":"E","\xc8":"E","\u1eba":"E","\u0206":"E","\u0112":"E","\u1e16":"E","\u1e14":"E","\u0118":"E","\u0246":"E","\u1ebc":"E","\u1e1a":"E","\ua76a":"ET","\u1e1e":"F","\u0191":"F","\u01f4":"G","\u011e":"G","\u01e6":"G","\u0122":"G","\u011c":"G","\u0120":"G","\u0193":"G","\u1e20":"G","\u01e4":"G","\u1e2a":"H","\u021e":"H","\u1e28":"H","\u0124":"H","\u2c67":"H","\u1e26":"H","\u1e22":"H","\u1e24":"H","\u0126":"H","\xcd":"I","\u012c":"I","\u01cf":"I","\xce":"I","\xcf":"I","\u1e2e":"I","\u0130":"I","\u1eca":"I","\u0208":"I","\xcc":"I","\u1ec8":"I","\u020a":"I","\u012a":"I","\u012e":"I","\u0197":"I","\u0128":"I","\u1e2c":"I","\ua779":"D","\ua77b":"F","\ua77d":"G","\ua782":"R","\ua784":"S","\ua786":"T","\ua76c":"IS","\u0134":"J","\u0248":"J","\u1e30":"K","\u01e8":"K","\u0136":"K","\u2c69":"K","\ua742":"K","\u1e32":"K","\u0198":"K","\u1e34":"K","\ua740":"K","\ua744":"K","\u0139":"L","\u023d":"L","\u013d":"L","\u013b":"L","\u1e3c":"L","\u1e36":"L","\u1e38":"L","\u2c60":"L","\ua748":"L","\u1e3a":"L","\u013f":"L","\u2c62":"L","\u01c8":"L","\u0141":"L","\u01c7":"LJ","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u0143":"N","\u0147":"N","\u0145":"N","\u1e4a":"N","\u1e44":"N","\u1e46":"N","\u01f8":"N","\u019d":"N","\u1e48":"N","\u0220":"N","\u01cb":"N","\xd1":"N","\u01ca":"NJ","\xd3":"O","\u014e":"O","\u01d1":"O","\xd4":"O","\u1ed0":"O","\u1ed8":"O","\u1ed2":"O","\u1ed4":"O","\u1ed6":"O","\xd6":"O","\u022a":"O","\u022e":"O","\u0230":"O","\u1ecc":"O","\u0150":"O","\u020c":"O","\xd2":"O","\u1ece":"O","\u01a0":"O","\u1eda":"O","\u1ee2":"O","\u1edc":"O","\u1ede":"O","\u1ee0":"O","\u020e":"O","\ua74a":"O","\ua74c":"O","\u014c":"O","\u1e52":"O","\u1e50":"O","\u019f":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\xd5":"O","\u1e4c":"O","\u1e4e":"O","\u022c":"O","\u01a2":"OI","\ua74e":"OO","\u0190":"E","\u0186":"O","\u0222":"OU","\u1e54":"P","\u1e56":"P","\ua752":"P","\u01a4":"P","\ua754":"P","\u2c63":"P","\ua750":"P","\ua758":"Q","\ua756":"Q","\u0154":"R","\u0158":"R","\u0156":"R","\u1e58":"R","\u1e5a":"R","\u1e5c":"R","\u0210":"R","\u0212":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua73e":"C","\u018e":"E","\u015a":"S","\u1e64":"S","\u0160":"S","\u1e66":"S","\u015e":"S","\u015c":"S","\u0218":"S","\u1e60":"S","\u1e62":"S","\u1e68":"S","\u1e9e":"SS","\u0164":"T","\u0162":"T","\u1e70":"T","\u021a":"T","\u023e":"T","\u1e6a":"T","\u1e6c":"T","\u01ac":"T","\u1e6e":"T","\u01ae":"T","\u0166":"T","\u2c6f":"A","\ua780":"L","\u019c":"M","\u0245":"V","\ua728":"TZ","\xda":"U","\u016c":"U","\u01d3":"U","\xdb":"U","\u1e76":"U","\xdc":"U","\u01d7":"U","\u01d9":"U","\u01db":"U","\u01d5":"U","\u1e72":"U","\u1ee4":"U","\u0170":"U","\u0214":"U","\xd9":"U","\u1ee6":"U","\u01af":"U","\u1ee8":"U","\u1ef0":"U","\u1eea":"U","\u1eec":"U","\u1eee":"U","\u0216":"U","\u016a":"U","\u1e7a":"U","\u0172":"U","\u016e":"U","\u0168":"U","\u1e78":"U","\u1e74":"U","\ua75e":"V","\u1e7e":"V","\u01b2":"V","\u1e7c":"V","\ua760":"VY","\u1e82":"W","\u0174":"W","\u1e84":"W","\u1e86":"W","\u1e88":"W","\u1e80":"W","\u2c72":"W","\u1e8c":"X","\u1e8a":"X","\xdd":"Y","\u0176":"Y","\u0178":"Y","\u1e8e":"Y","\u1ef4":"Y","\u1ef2":"Y","\u01b3":"Y","\u1ef6":"Y","\u1efe":"Y","\u0232":"Y","\u024e":"Y","\u1ef8":"Y","\u0179":"Z","\u017d":"Z","\u1e90":"Z","\u2c6b":"Z","\u017b":"Z","\u1e92":"Z","\u0224":"Z","\u1e94":"Z","\u01b5":"Z","\u0132":"IJ","\u0152":"OE","\u1d00":"A","\u1d01":"AE","\u0299":"B","\u1d03":"B","\u1d04":"C","\u1d05":"D","\u1d07":"E","\ua730":"F","\u0262":"G","\u029b":"G","\u029c":"H","\u026a":"I","\u0281":"R","\u1d0a":"J","\u1d0b":"K","\u029f":"L","\u1d0c":"L","\u1d0d":"M","\u0274":"N","\u1d0f":"O","\u0276":"OE","\u1d10":"O","\u1d15":"OU","\u1d18":"P","\u0280":"R","\u1d0e":"N","\u1d19":"R","\ua731":"S","\u1d1b":"T","\u2c7b":"E","\u1d1a":"R","\u1d1c":"U","\u1d20":"V","\u1d21":"W","\u028f":"Y","\u1d22":"Z","\xe1":"a","\u0103":"a","\u1eaf":"a","\u1eb7":"a","\u1eb1":"a","\u1eb3":"a","\u1eb5":"a","\u01ce":"a","\xe2":"a","\u1ea5":"a","\u1ead":"a","\u1ea7":"a","\u1ea9":"a","\u1eab":"a","\xe4":"a","\u01df":"a","\u0227":"a","\u01e1":"a","\u1ea1":"a","\u0201":"a","\xe0":"a","\u1ea3":"a","\u0203":"a","\u0101":"a","\u0105":"a","\u1d8f":"a","\u1e9a":"a","\xe5":"a","\u01fb":"a","\u1e01":"a","\u2c65":"a","\xe3":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u1e03":"b","\u1e05":"b","\u0253":"b","\u1e07":"b","\u1d6c":"b","\u1d80":"b","\u0180":"b","\u0183":"b","\u0275":"o","\u0107":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0109":"c","\u0255":"c","\u010b":"c","\u0188":"c","\u023c":"c","\u010f":"d","\u1e11":"d","\u1e13":"d","\u0221":"d","\u1e0b":"d","\u1e0d":"d","\u0257":"d","\u1d91":"d","\u1e0f":"d","\u1d6d":"d","\u1d81":"d","\u0111":"d","\u0256":"d","\u018c":"d","\u0131":"i","\u0237":"j","\u025f":"j","\u0284":"j","\u01f3":"dz","\u01c6":"dz","\xe9":"e","\u0115":"e","\u011b":"e","\u0229":"e","\u1e1d":"e","\xea":"e","\u1ebf":"e","\u1ec7":"e","\u1ec1":"e","\u1ec3":"e","\u1ec5":"e","\u1e19":"e","\xeb":"e","\u0117":"e","\u1eb9":"e","\u0205":"e","\xe8":"e","\u1ebb":"e","\u0207":"e","\u0113":"e","\u1e17":"e","\u1e15":"e","\u2c78":"e","\u0119":"e","\u1d92":"e","\u0247":"e","\u1ebd":"e","\u1e1b":"e","\ua76b":"et","\u1e1f":"f","\u0192":"f","\u1d6e":"f","\u1d82":"f","\u01f5":"g","\u011f":"g","\u01e7":"g","\u0123":"g","\u011d":"g","\u0121":"g","\u0260":"g","\u1e21":"g","\u1d83":"g","\u01e5":"g","\u1e2b":"h","\u021f":"h","\u1e29":"h","\u0125":"h","\u2c68":"h","\u1e27":"h","\u1e23":"h","\u1e25":"h","\u0266":"h","\u1e96":"h","\u0127":"h","\u0195":"hv","\xed":"i","\u012d":"i","\u01d0":"i","\xee":"i","\xef":"i","\u1e2f":"i","\u1ecb":"i","\u0209":"i","\xec":"i","\u1ec9":"i","\u020b":"i","\u012b":"i","\u012f":"i","\u1d96":"i","\u0268":"i","\u0129":"i","\u1e2d":"i","\ua77a":"d","\ua77c":"f","\u1d79":"g","\ua783":"r","\ua785":"s","\ua787":"t","\ua76d":"is","\u01f0":"j","\u0135":"j","\u029d":"j","\u0249":"j","\u1e31":"k","\u01e9":"k","\u0137":"k","\u2c6a":"k","\ua743":"k","\u1e33":"k","\u0199":"k","\u1e35":"k","\u1d84":"k","\ua741":"k","\ua745":"k","\u013a":"l","\u019a":"l","\u026c":"l","\u013e":"l","\u013c":"l","\u1e3d":"l","\u0234":"l","\u1e37":"l","\u1e39":"l","\u2c61":"l","\ua749":"l","\u1e3b":"l","\u0140":"l","\u026b":"l","\u1d85":"l","\u026d":"l","\u0142":"l","\u01c9":"lj","\u017f":"s","\u1e9c":"s","\u1e9b":"s","\u1e9d":"s","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u1d6f":"m","\u1d86":"m","\u0144":"n","\u0148":"n","\u0146":"n","\u1e4b":"n","\u0235":"n","\u1e45":"n","\u1e47":"n","\u01f9":"n","\u0272":"n","\u1e49":"n","\u019e":"n","\u1d70":"n","\u1d87":"n","\u0273":"n","\xf1":"n","\u01cc":"nj","\xf3":"o","\u014f":"o","\u01d2":"o","\xf4":"o","\u1ed1":"o","\u1ed9":"o","\u1ed3":"o","\u1ed5":"o","\u1ed7":"o","\xf6":"o","\u022b":"o","\u022f":"o","\u0231":"o","\u1ecd":"o","\u0151":"o","\u020d":"o","\xf2":"o","\u1ecf":"o","\u01a1":"o","\u1edb":"o","\u1ee3":"o","\u1edd":"o","\u1edf":"o","\u1ee1":"o","\u020f":"o","\ua74b":"o","\ua74d":"o","\u2c7a":"o","\u014d":"o","\u1e53":"o","\u1e51":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\xf5":"o","\u1e4d":"o","\u1e4f":"o","\u022d":"o","\u01a3":"oi","\ua74f":"oo","\u025b":"e","\u1d93":"e","\u0254":"o","\u1d97":"o","\u0223":"ou","\u1e55":"p","\u1e57":"p","\ua753":"p","\u01a5":"p","\u1d71":"p","\u1d88":"p","\ua755":"p","\u1d7d":"p","\ua751":"p","\ua759":"q","\u02a0":"q","\u024b":"q","\ua757":"q","\u0155":"r","\u0159":"r","\u0157":"r","\u1e59":"r","\u1e5b":"r","\u1e5d":"r","\u0211":"r","\u027e":"r","\u1d73":"r","\u0213":"r","\u1e5f":"r","\u027c":"r","\u1d72":"r","\u1d89":"r","\u024d":"r","\u027d":"r","\u2184":"c","\ua73f":"c","\u0258":"e","\u027f":"r","\u015b":"s","\u1e65":"s","\u0161":"s","\u1e67":"s","\u015f":"s","\u015d":"s","\u0219":"s","\u1e61":"s","\u1e63":"s","\u1e69":"s","\u0282":"s","\u1d74":"s","\u1d8a":"s","\u023f":"s","\u0261":"g","\xdf":"ss","\u1d11":"o","\u1d13":"o","\u1d1d":"u","\u0165":"t","\u0163":"t","\u1e71":"t","\u021b":"t","\u0236":"t","\u1e97":"t","\u2c66":"t","\u1e6b":"t","\u1e6d":"t","\u01ad":"t","\u1e6f":"t","\u1d75":"t","\u01ab":"t","\u0288":"t","\u0167":"t","\u1d7a":"th","\u0250":"a","\u1d02":"ae","\u01dd":"e","\u1d77":"g","\u0265":"h","\u02ae":"h","\u02af":"h","\u1d09":"i","\u029e":"k","\ua781":"l","\u026f":"m","\u0270":"m","\u1d14":"oe","\u0279":"r","\u027b":"r","\u027a":"r","\u2c79":"r","\u0287":"t","\u028c":"v","\u028d":"w","\u028e":"y","\ua729":"tz","\xfa":"u","\u016d":"u","\u01d4":"u","\xfb":"u","\u1e77":"u","\xfc":"u","\u01d8":"u","\u01da":"u","\u01dc":"u","\u01d6":"u","\u1e73":"u","\u1ee5":"u","\u0171":"u","\u0215":"u","\xf9":"u","\u1ee7":"u","\u01b0":"u","\u1ee9":"u","\u1ef1":"u","\u1eeb":"u","\u1eed":"u","\u1eef":"u","\u0217":"u","\u016b":"u","\u1e7b":"u","\u0173":"u","\u1d99":"u","\u016f":"u","\u0169":"u","\u1e79":"u","\u1e75":"u","\u1d6b":"ue","\ua778":"um","\u2c74":"v","\ua75f":"v","\u1e7f":"v","\u028b":"v","\u1d8c":"v","\u2c71":"v","\u1e7d":"v","\ua761":"vy","\u1e83":"w","\u0175":"w","\u1e85":"w","\u1e87":"w","\u1e89":"w","\u1e81":"w","\u2c73":"w","\u1e98":"w","\u1e8d":"x","\u1e8b":"x","\u1d8d":"x","\xfd":"y","\u0177":"y","\xff":"y","\u1e8f":"y","\u1ef5":"y","\u1ef3":"y","\u01b4":"y","\u1ef7":"y","\u1eff":"y","\u0233":"y","\u1e99":"y","\u024f":"y","\u1ef9":"y","\u017a":"z","\u017e":"z","\u1e91":"z","\u0291":"z","\u2c6c":"z","\u017c":"z","\u1e93":"z","\u0225":"z","\u1e95":"z","\u1d76":"z","\u1d8e":"z","\u0290":"z","\u01b6":"z","\u0240":"z","\ufb00":"ff","\ufb03":"ffi","\ufb04":"ffl","\ufb01":"fi","\ufb02":"fl","\u0133":"ij","\u0153":"oe","\ufb06":"st","\u2090":"a","\u2091":"e","\u1d62":"i","\u2c7c":"j","\u2092":"o","\u1d63":"r","\u1d64":"u","\u1d65":"v","\u2093":"x"}};String.prototype.latinise=function(){return this.replace(/[^A-Za-z0-9]/g,function(t){return Latinise.map[t]||t})},function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};this.Wikis=function(){function e(){this.slugify=t(this.slugify,this),$(".new-wiki-page").on("submit",function(t){return function(e){var n,i,r;return $("[data-error~=slug]").addClass("hidden"),n=$("#new_wiki_path"),r=t.slugify(n.val()),r.length>0?(i=n.attr("data-wikis-path"),location.href=i+"/"+r,e.preventDefault()):void 0}}(this))}return e.prototype.dasherize=function(t){return t.replace(/[_\s]+/g,"-")},e.prototype.slugify=function(t){return this.dasherize(t.trim().toLowerCase().latinise())},e}()}.call(this),function(){this.ZenMode=function(){function t(){this.active_backdrop=null,this.active_textarea=null,$(document).on("click",".js-zen-enter",function(t){return t.preventDefault(),$(t.currentTarget).trigger("zen_mode:enter")}),$(document).on("click",".js-zen-leave",function(t){return t.preventDefault(),$(t.currentTarget).trigger("zen_mode:leave")}),$(document).on("zen_mode:enter",function(t){return function(e){return t.enter($(e.target).closest(".md-area").find(".zen-backdrop"))}}(this)),$(document).on("zen_mode:leave",function(t){return function(e){return t.exit()}}(this)),$(document).on("keydown",function(t){return 27===t.keyCode?(t.preventDefault(),$(document).trigger("zen_mode:leave")):void 0})}return t.prototype.enter=function(t){return Mousetrap.pause(),this.active_backdrop=$(t),this.active_backdrop.addClass("fullscreen"),this.active_textarea=this.active_backdrop.find("textarea"),this.active_textarea.removeAttr("style"),this.active_textarea.focus()},t.prototype.exit=function(){return this.active_textarea?(Mousetrap.unpause(),this.active_textarea.closest(".zen-backdrop").removeClass("fullscreen"),this.scrollTo(this.active_textarea),this.active_textarea=null,this.active_backdrop=null,Dropzone.forElement(".div-dropzone").enable()):void 0},t.prototype.scrollTo=function(t){return $.scrollTo(t,0,{offset:-150})},t}()}.call(this),/*!
 * fuzzaldrin-plus.js - 0.3.1
 * https://github.com/jeancroy/fuzzaldrin-plus
 *
 * Copyright 2016 - Jean Christophe Roy
 * Released under the MIT license
 * https://github.com/jeancroy/fuzzaldrin-plus/raw/master/LICENSE.md
 */
function t(e,n,i){function r(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=n[s]={exports:{}};e[s][0].call(h.exports,function(t){var n=e[s][1][t];return r(n?n:t)},h,h.exports,t,e,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(t,e,n){fuzzaldrinPlus=t("fuzzaldrin-plus")},{"fuzzaldrin-plus":3}],2:[function(t,e,n){(function(){var n,i,r,o,s;o=t("./scorer"),i=t("./legacy"),r=function(t){return t.candidate},s=function(t,e){return e.score-t.score},n=t("path").sep,e.exports=function(t,e,n){var a,l,c,h,u,d,f,p,g,m,v,y,w,b,x,C,A,E,k,F;if(F=null!=n?n:{},d=F.key,g=F.maxResults,p=F.maxInners,a=F.allowErrors,f=F.legacy,w=[],b=null!=p&&p>0?p:t.length,l=!!a,c=null!=d,m=o.prepQuery(e),f)for(v=m.depth>0,u=m.core,A=0,k=t.length;k>A;A++)h=t[A],x=null!=d?h[d]:h,x&&(y=i.score(x,u,v),v||(y=i.basenameScore(x,u,y)),y>0&&w.push({candidate:h,score:y}));else for(C=0,E=t.length;E>C&&(h=t[C],x=c?h[d]:h,!(x&&(y=o.score(x,e,m,l),y>0&&(w.push({candidate:h,score:y}),!--b))));C++);return w.sort(s),t=w.map(r),null!=g&&(t=t.slice(0,g)),t}}).call(this)},{"./legacy":4,"./scorer":6,path:7}],3:[function(t,e,n){(function(){var n,i,r,o,s,a;a=t("./scorer"),r=t("./legacy"),i=t("./filter"),o=t("./matcher"),n=t("path").sep,s=null,e.exports={filter:function(t,e,n){return(null!=e?e.length:void 0)&&(null!=t?t.length:void 0)?i(t,e,n):[]},prepQuery:function(t){return a.prepQuery(t)},score:function(t,e,n,i){var o,l,c,h,u,d;return d=null!=i?i:{},o=d.allowErrors,c=d.legacy,(null!=t?t.length:void 0)&&(null!=e?e.length:void 0)?(null==n&&(n=s&&s.query===e?s:s=a.prepQuery(e)),c?(h=n.depth>0,l=n.core,u=r.score(t,l,h),h||(u=r.basenameScore(t,l,u))):u=a.score(t,e,n,!!o),u):0},match:function(t,e,i,r){var l,c,h,u,d,f;return l=(null!=r?r:{}).allowErrors,t&&e?t===e?function(){f=[];for(var e=0,n=t.length;n>=0?n>e:e>n;n>=0?e++:e--)f.push(e);return f}.apply(this):(null==i&&(i=s&&s.query===e?s:s=a.prepQuery(e)),l||a.isMatch(t,i.core_lw,i.core_up)?(d=t.toLowerCase(),u=i.query_lw,h=o.match(t,d,i),0===h.length?h:(t.indexOf(n)>-1&&(c=o.basenameMatch(t,d,i),h=o.mergeMatches(h,c)),h)):[]):[]}}}).call(this)},{"./filter":2,"./legacy":4,"./matcher":5,"./scorer":6,path:7}],4:[function(t,e,n){(function(){var e,i;e=t("path").sep,n.basenameScore=function(t,i,r){var o,s,a,l,c,h;for(a=t.length-1;t[a]===e;)a--;for(h=0,l=a,o=null;a>=0;)t[a]===e?(h++,null==o&&(o=t.substring(a+1,l+1))):0===a&&(l<t.length-1?null==o&&(o=t.substring(0,l+1)):null==o&&(o=t)),a--;return o===t?r*=2:o&&(r+=n.score(o,i)),c=h+1,s=Math.max(1,10-c),r*=.01*s},n.score=function(t,n){var r,o,s,a,l,c,h,u,d,f,p,g;if(t===n)return 1;if(i(t,n))return 1;for(f=0,h=n.length,d=t.length,s=0,a=0;h>s;){if(r=n[s++],l=t.indexOf(r.toLowerCase()),p=t.indexOf(r.toUpperCase()),c=Math.min(l,p),-1===c&&(c=Math.max(l,p)),a=c,-1===a)return 0;o=.1,t[a]===r&&(o+=.1),0===a||t[a-1]===e?o+=.8:("-"===(g=t[a-1])||"_"===g||" "===g)&&(o+=.7),t=t.substring(a+1,d),f+=o}return u=f/h,(u*(h/d)+u)/2},i=function(t,n){return t[t.length-n.length-1]===e?t.lastIndexOf(n)===t.length-n.length:void 0},n.match=function(t,e,n){var i,r,o,s,a,l,c,h,u,d;if(null==n&&(n=0),t===e)return function(){d=[];for(var e=n,i=n+t.length;i>=n?i>e:e>i;i>=n?e++:e--)d.push(e);return d}.apply(this);for(c=e.length,h=t.length,r=0,o=0,a=[];c>r;){if(i=e[r++],s=t.indexOf(i.toLowerCase()),u=t.indexOf(i.toUpperCase()),l=Math.min(s,u),-1===l&&(l=Math.max(s,u)),o=l,-1===o)return[];a.push(n+o),n+=o+1,t=t.substring(o+1,h)}return a}}).call(this)},{path:7}],5:[function(t,e,n){(function(){var e,i;e=t("path").sep,i=t("./scorer"),n.basenameMatch=function(t,i,r){var o,s,a;for(a=t.length-1;t[a]===e;)a--;if(o=t.lastIndexOf(e,a),-1===o)return[];for(s=r.depth;s-->0;)if(o=t.lastIndexOf(e,o-1),-1===o)return[];return o++,a++,n.match(t.slice(o,a),i.slice(o,a),r,o)},n.mergeMatches=function(t,e){var n,i,r,o,s,a,l;if(s=t.length,a=e.length,0===a)return t.slice();if(0===s)return e.slice();for(r=-1,o=0,i=e[o],l=[];++r<s;){for(n=t[r];n>=i&&++o<a;)n>i&&l.push(i),i=e[o];l.push(n)}for(;a>o;)l.push(e[o++]);return l},n.match=function(t,e,n,r){var o,s,a,l,c,h,u,d,f,p,g,m,v,y,w,b,x,C,A,E,k,F,_,D,S,$;for(null==r&&(r=0),C=n.query,A=n.query_lw,v=t.length,b=C.length,c=i.scoreAcronyms(t,e,C,A).score,F=new Array(b),f=new Array(b),a=0,l=1,s=2,o=3,$=new Array(v*b),x=-1,m=-1;++m<b;)F[m]=0,f[m]=0;for(g=-1;++g<v;)for(E=0,_=0,d=0,D=e[g],m=-1;++m<b;)p=0,h=0,k=_,A[m]===D&&(S=i.isWordStart(g,t,e),p=d>0?d:i.scoreConsecutives(t,e,C,A,g,m,S),h=k+i.scoreCharacter(g,m,S,c,p)),_=F[m],d=f[m],E>_?w=s:(E=_,w=l),h>E?(E=h,w=o):p=0,F[m]=E,f[m]=p,$[++x]=E>0?w:a;for(g=v-1,m=b-1,x=g*b+m,u=!0,y=[];u&&g>=0&&m>=0;)switch($[x]){case l:g--,x-=b;break;case s:m--,x--;break;case o:y.push(g+r),m--,g--,x-=b+1;break;default:u=!1}return y.reverse(),y}}).call(this)},{"./scorer":6,path:7}],6:[function(t,e,n){(function(){var e,i,r,o,s,a,l,c,h,u,d,f,p,g,m,v,y,w,b,x,C,A,E,k,F,_,D,S;i=t("path").sep,S=150,v=20,F=13,_=85,h=1.2,g=.75,m=/[ _\-:\/\\]/g,n.coreChars=s=function(t){return t.replace(m,"")},n.score=function(t,e,n,i){var s,a;return null==n&&(n=new r(e)),null==i&&(i=!1),i||u(t,n.core_lw,n.core_up)?(a=t.toLowerCase(),s=l(t,a,n),Math.ceil(o(t,a,n,s))):0},r=function(){function t(t){return(null!=t?t.length:void 0)?(this.query=t,this.query_lw=t.toLowerCase(),this.core=s(t),this.core_lw=this.core.toLowerCase(),this.core_up=D(this.core),void(this.depth=a(t,t.length))):null}return t}(),n.prepQuery=function(t){return new r(t)},n.isMatch=u=function(t,e,n){var i,r,o,s,a,l,c;if(o=t.length,s=e.length,!o||s>o)return!1;for(i=-1,r=-1;++r<s;){for(a=e[r],l=n[r];++i<o&&(c=t[i],c!==a&&c!==l););if(i===o)return!1}return!0},l=function(t,e,n){var i,r,o,s,a,l,c,h,u,d,f,m,v,A,E,F,_,D,S,$,T,B,M,L;if(E=n.query,F=n.query_lw,u=t.length,v=E.length,i=y(t,e,E,F),r=i.score,i.count===v)return x(v,u,r,i.pos);if(A=e.indexOf(F),A>-1)return C(t,e,E,F,A,v,u);for($=new Array(v),a=new Array(v),L=k(v,u),d=Math.ceil(g*v)+5,f=d,h=-1;++h<v;)$[h]=0,a[h]=0;for(c=e.indexOf(F[0]),c>-1&&c--,m=e.lastIndexOf(F[v-1],u),m>c&&(u=m+1);++c<u;)for(D=0,S=0,s=0,B=e[c],_=!0,h=-1;++h<v;){if(T=$[h],T>D&&(D=T),l=0,F[h]===B)if(M=p(c,t,e),l=s>0?s:b(t,e,E,F,c,h,M),o=S+w(c,h,M,r,l),o>D)D=o,f=d;else{if(_&&--f<=0)return $[v-1]*L;_=!1}S=T,s=a[h],a[h]=l,$[h]=D}return D*L},n.isWordStart=p=function(t,e,n){var i,r;return 0===t?!0:(i=e[t],r=e[t-1],d(i)||d(r)||i!==n[t]&&r===n[t-1])},n.isWordEnd=f=function(t,e,n,i){var r,o;return t===i-1?!0:(r=e[t],o=e[t+1],d(r)||d(o)||r===n[t]&&o!==n[t+1])},d=function(t){return" "===t||"."===t||"-"===t||"_"===t||"/"===t||"\\"===t},E=function(t){var e;return v>t?(e=v-t,100+e*e):Math.max(100+v-t,0)},k=function(t,e){return _/(_+Math.abs(e-t))},x=function(t,e,n,i){return 2*t*(S*n+E(i))*k(t,e)},n.scorePattern=A=function(t,e,n,i,r){var o,s;return s=t,o=6,n===t&&(o+=2),i&&(o+=3),r&&(o+=1),t===e&&(i&&(s+=n===e?2:1),r&&(o+=1)),n+s*(s+o)},n.scoreCharacter=w=function(t,e,n,i,r){var o;return o=E(t),n?o+S*((i>r?i:r)+10):o+S*r},n.scoreConsecutives=b=function(t,e,n,i,r,o,s){var a,l,c,h,u,d,p,g;for(l=t.length,h=n.length,c=l-r,u=h-o,a=u>c?c:u,p=r,d=0,g=0,n[o]===t[r]&&d++;++g<a&&i[++o]===e[++r];)n[o]===t[r]&&d++;return 1===g?1+2*d:A(g,h,d,s,f(r,t,e,l))},n.scoreExactMatch=C=function(t,e,n,i,r,o,s){var a,l,c,h,u;for(u=p(r,t,e),u||(c=e.indexOf(i,r+1),c>-1&&(u=p(c,t,e),u&&(r=c))),l=-1,h=0;++l<o;)n[r+l]===t[l]&&h++;return a=f(r+o-1,t,e,s),x(o,s,A(o,o,h,u,a),r)},e=function(){function t(t,e,n){this.score=t,this.pos=e,this.count=n}return t}(),c=new e(0,.1,0),n.scoreAcronyms=y=function(t,n,i,r){var o,s,a,l,h,u,d,f,g;if(l=t.length,h=i.length,!(l>1&&h>1))return c;for(o=0,u=0,f=0,s=-1,a=-1;++a<h;){for(d=r[a];++s<l;)if(d===n[s]&&p(s,t,n)){i[a]===t[s]&&f++,u+=s,o++;break}if(s===l)break}return 2>o?c:(g=A(o,h,f,!0,!1),new e(g,u/o,o))},o=function(t,e,n,r){var o,s,c,u,d;if(0===r)return 0;for(d=t.length-1;t[d]===i;)d--;if(c=t.lastIndexOf(i,d),-1===c)return r;for(u=n.depth;u-->0;)if(c=t.lastIndexOf(i,c-1),-1===c)return r;return c++,d++,s=l(t.slice(c,d),e.slice(c,d),n),o=.5*F/(F+a(t,d+1)),o*s+(1-o)*r*k(0,h*(d-c))},n.countDir=a=function(t,e){var n,r;if(1>e)return 0;for(n=0,r=-1;++r<e&&t[r]===i;);for(;++r<e;)if(t[r]===i)for(n++;++r<e&&t[r]===i;);return n},D=function(t){var e,n,i,r;for(n="",i=0,r=t.length;r>i;i++)e=t[i],n+=e.toUpperCase()[0];return n}}).call(this)},{path:7}],7:[function(t,e,n){(function(t){
// Copyright Joyent, Inc. and other Node contributors.
// The above copyright notice and this permission notice shall be included
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
function e(t,e){for(var n=0,i=t.length-1;i>=0;i--){var r=t[i];"."===r?t.splice(i,1):".."===r?(t.splice(i,1),n++):n&&(t.splice(i,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function i(t,e){if(t.filter)return t.filter(e);for(var n=[],i=0;i<t.length;i++)e(t[i],i,t)&&n.push(t[i]);return n}var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(t){return r.exec(t).slice(1)};n.resolve=function(){for(var n="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(n=s+"/"+n,r="/"===s.charAt(0))}return n=e(i(n.split("/"),function(t){return!!t}),!r).join("/"),(r?"/":"")+n||"."},n.normalize=function(t){var r=n.isAbsolute(t),o="/"===s(t,-1);return t=e(i(t.split("/"),function(t){return!!t}),!r).join("/"),t||r||(t="."),t&&o&&(t+="/"),(r?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(i(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function i(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var r=i(t.split("/")),o=i(e.split("/")),s=Math.min(r.length,o.length),a=s,l=0;s>l;l++)if(r[l]!==o[l]){a=l;break}for(var c=[],l=a;l<r.length;l++)c.push("..");return c=c.concat(o.slice(a)),c.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){var e=o(t),n=e[0],i=e[1];return n||i?(i&&(i=i.substr(0,i.length-1)),n+i):"."},n.basename=function(t,e){var n=o(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){return o(t)[3]};var s="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return 0>e&&(e=t.length+e),t.substr(e,n)}}).call(this,t("_process"))},{_process:8}],8:[function(t,e,n){function i(){h=!1,a.length?c=a.concat(c):u=-1,c.length&&r()}function r(){if(!h){var t=setTimeout(i);h=!0;for(var e=c.length;e;){for(a=c,c=[];++u<e;)a&&a[u].run();u=-1,e=c.length}a=null,h=!1,clearTimeout(t)}}function o(t,e){this.fun=t,this.array=e}function s(){}var a,l=e.exports={},c=[],h=!1,u=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new o(t,e)),1!==c.length||h||setTimeout(r,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=s,l.addListener=s,l.once=s,l.off=s,l.removeListener=s,l.removeAllListeners=s,l.emit=s,l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}]},{},[1]),/*!
 * Cropper v2.3.0
 * https://github.com/fengyuanchen/cropper
 *
 * Copyright (c) 2014-2016 Fengyuan Chen and contributors
 * Released under the MIT license
 *
 * Date: 2016-02-22T02:13:13.332Z
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){"use strict";function e(t){return"number"==typeof t&&!isNaN(t)}function n(t){return"undefined"==typeof t}function i(t,n){var i=[];return e(n)&&i.push(n),i.slice.apply(t,i)}function r(t,e){var n=i(arguments,2);return function(){return t.apply(e,n.concat(i(arguments)))}}function o(t){var e=t.match(/^(https?:)\/\/([^\:\/\?#]+):?(\d*)/i);return e&&(e[1]!==b.protocol||e[2]!==b.hostname||e[3]!==b.port)}function s(t){var e="timestamp="+(new Date).getTime();return t+(-1===t.indexOf("?")?"?":"&")+e}function a(t){return t?' crossOrigin="'+t+'"':""}function l(t,e){var n;return t.naturalWidth&&!mt?e(t.naturalWidth,t.naturalHeight):(n=document.createElement("img"),n.onload=function(){e(this.width,this.height)},void(n.src=t.src))}function c(t){var n=[],i=t.rotate,r=t.scaleX,o=t.scaleY;return e(i)&&n.push("rotate("+i+"deg)"),e(r)&&e(o)&&n.push("scale("+r+","+o+")"),n.length?n.join(" "):"none"}function h(t,e){var n,i,r=bt(t.degree)%180,o=(r>90?180-r:r)*Math.PI/180,s=xt(o),a=Ct(o),l=t.width,c=t.height,h=t.aspectRatio;return e?(n=l/(a+s/h),i=n/h):(n=l*a+c*s,i=l*s+c*a),{width:n,height:i}}function u(n,i){var r,o,s,a=t("<canvas>")[0],l=a.getContext("2d"),c=0,u=0,d=i.naturalWidth,f=i.naturalHeight,p=i.rotate,g=i.scaleX,m=i.scaleY,v=e(g)&&e(m)&&(1!==g||1!==m),y=e(p)&&0!==p,w=y||v,b=d*bt(g||1),x=f*bt(m||1);return v&&(r=b/2,o=x/2),y&&(s=h({width:b,height:x,degree:p}),b=s.width,x=s.height,r=b/2,o=x/2),a.width=b,a.height=x,w&&(c=-d/2,u=-f/2,l.save(),l.translate(r,o)),y&&l.rotate(p*Math.PI/180),v&&l.scale(g,m),l.drawImage(n,kt(c),kt(u),kt(d),kt(f)),w&&l.restore(),a}function d(e){var n=e.length,i=0,r=0;return n&&(t.each(e,function(t,e){i+=e.pageX,r+=e.pageY}),i/=n,r/=n),{pageX:i,pageY:r}}function f(t,e,n){var i,r="";for(i=e,n+=e;n>i;i++)r+=Ft(t.getUint8(i));return r}function p(t){var e,n,i,r,o,s,a,l,c,h,u=new E(t),d=u.byteLength;if(255===u.getUint8(0)&&216===u.getUint8(1))for(c=2;d>c;){if(255===u.getUint8(c)&&225===u.getUint8(c+1)){a=c;break}c++}if(a&&(n=a+4,i=a+10,"Exif"===f(u,n,4)&&(s=u.getUint16(i),o=18761===s,(o||19789===s)&&42===u.getUint16(i+2,o)&&(r=u.getUint32(i+4,o),r>=8&&(l=i+r)))),l)for(d=u.getUint16(l,o),h=0;d>h;h++)if(c=l+12*h+2,274===u.getUint16(c,o)){c+=8,e=u.getUint16(c,o),mt&&u.setUint16(c,1,o);break}return e}function g(t){var e,n=t.replace(Q,""),i=atob(n),r=i.length,o=new C(r),s=new A(o);for(e=0;r>e;e++)s[e]=i.charCodeAt(e);return o}function m(t){var e,n=new A(t),i=n.length,r="";for(e=0;i>e;e++)r+=Ft(n[e]);return"data:image/jpeg;base64,"+k(r)}function v(e,n){this.$element=t(e),this.options=t.extend({},v.DEFAULTS,t.isPlainObject(n)&&n),this.isLoaded=!1,this.isBuilt=!1,this.isCompleted=!1,this.isRotated=!1,this.isCropped=!1,this.isDisabled=!1,this.isReplaced=!1,this.isLimited=!1,this.wheeling=!1,this.isImg=!1,this.originalUrl="",this.canvas=null,this.cropBox=null,this.init()}var y=t(window),w=t(document),b=window.location,x=window.navigator,C=window.ArrayBuffer,A=window.Uint8Array,E=window.DataView,k=window.btoa,F="cropper",_="cropper-modal",D="cropper-hide",S="cropper-hidden",$="cropper-invisible",T="cropper-move",B="cropper-crop",M="cropper-disabled",L="cropper-bg",R="mousedown touchstart pointerdown MSPointerDown",I="mousemove touchmove pointermove MSPointerMove",P="mouseup touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel",N="wheel mousewheel DOMMouseScroll",O="dblclick",j="load."+F,z="error."+F,H="resize."+F,W="build."+F,U="built."+F,q="cropstart."+F,Y="cropmove."+F,G="cropend."+F,V="crop."+F,K="zoom."+F,X=/e|w|s|n|se|sw|ne|nw|all|crop|move|zoom/,Z=/^data\:/,Q=/^data\:([^\;]+)\;base64,/,J=/^data\:image\/jpeg.*;base64,/,tt="preview",et="action",nt="e",it="w",rt="s",ot="n",st="se",at="sw",lt="ne",ct="nw",ht="all",ut="crop",dt="move",ft="zoom",pt="none",gt=t.isFunction(t("<canvas>")[0].getContext),mt=x&&/safari/i.test(x.userAgent)&&/apple computer/i.test(x.vendor),vt=Number,yt=Math.min,wt=Math.max,bt=Math.abs,xt=Math.sin,Ct=Math.cos,At=Math.sqrt,Et=Math.round,kt=Math.floor,Ft=String.fromCharCode;v.prototype={constructor:v,init:function(){var t,e=this.$element;if(e.is("img")){if(this.isImg=!0,this.originalUrl=t=e.attr("src"),!t)return;t=e.prop("src")}else e.is("canvas")&&gt&&(t=e[0].toDataURL());this.load(t)},trigger:function(e,n){var i=t.Event(e,n);return this.$element.trigger(i),i},load:function(e){var n,i,r=this.options,o=this.$element;if(e&&(o.one(W,r.build),!this.trigger(W).isDefaultPrevented())){if(this.url=e,this.image={},!r.checkOrientation||!C)return this.clone();if(n=t.proxy(this.read,this),Z.test(e))return J.test(e)?n(g(e)):this.clone();i=new XMLHttpRequest,i.onerror=i.onabort=t.proxy(function(){this.clone()},this),i.onload=function(){n(this.response)},i.open("get",e),i.responseType="arraybuffer",i.send()}},read:function(t){var e,n,i,r=this.options,o=p(t),s=this.image;if(o>1)switch(this.url=m(t),o){case 2:n=-1;break;case 3:e=-180;break;case 4:i=-1;break;case 5:e=90,i=-1;break;case 6:e=90;break;case 7:e=90,n=-1;break;case 8:e=-90}r.rotatable&&(s.rotate=e),r.scalable&&(s.scaleX=n,s.scaleY=i),this.clone()},clone:function(){var e,n,i=this.options,r=this.$element,l=this.url,c="";i.checkCrossOrigin&&o(l)&&(c=r.prop("crossOrigin"),c?e=l:(c="anonymous",e=s(l))),this.crossOrigin=c,this.crossOriginUrl=e,this.$clone=n=t("<img"+a(c)+' src="'+(e||l)+'">'),this.isImg?r[0].complete?this.start():r.one(j,t.proxy(this.start,this)):n.one(j,t.proxy(this.start,this)).one(z,t.proxy(this.stop,this)).addClass(D).insertAfter(r)},start:function(){var e=this.$element,n=this.$clone;this.isImg||(n.off(z,this.stop),e=n),l(e[0],t.proxy(function(e,n){t.extend(this.image,{naturalWidth:e,naturalHeight:n,aspectRatio:e/n}),this.isLoaded=!0,this.build()},this))},stop:function(){this.$clone.remove(),this.$clone=null},build:function(){var e,n,i,r=this.options,o=this.$element,s=this.$clone;this.isLoaded&&(this.isBuilt&&this.unbuild(),this.$container=o.parent(),this.$cropper=e=t(v.TEMPLATE),this.$canvas=e.find(".cropper-canvas").append(s),this.$dragBox=e.find(".cropper-drag-box"),this.$cropBox=n=e.find(".cropper-crop-box"),this.$viewBox=e.find(".cropper-view-box"),this.$face=i=n.find(".cropper-face"),o.addClass(S).after(e),this.isImg||s.removeClass(D),this.initPreview(),this.bind(),r.aspectRatio=wt(0,r.aspectRatio)||NaN,r.viewMode=wt(0,yt(3,Et(r.viewMode)))||0,r.autoCrop?(this.isCropped=!0,r.modal&&this.$dragBox.addClass(_)):n.addClass(S),r.guides||n.find(".cropper-dashed").addClass(S),r.center||n.find(".cropper-center").addClass(S),r.cropBoxMovable&&i.addClass(T).data(et,ht),r.highlight||i.addClass($),r.background&&e.addClass(L),r.cropBoxResizable||n.find(".cropper-line, .cropper-point").addClass(S),this.setDragMode(r.dragMode),this.render(),this.isBuilt=!0,this.setData(r.data),o.one(U,r.built),setTimeout(t.proxy(function(){this.trigger(U),this.isCompleted=!0},this),0))},unbuild:function(){this.isBuilt&&(this.isBuilt=!1,this.isCompleted=!1,this.initialImage=null,this.initialCanvas=null,this.initialCropBox=null,this.container=null,this.canvas=null,this.cropBox=null,this.unbind(),this.resetPreview(),this.$preview=null,this.$viewBox=null,this.$cropBox=null,this.$dragBox=null,this.$canvas=null,this.$container=null,this.$cropper.remove(),this.$cropper=null)},render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.isCropped&&this.renderCropBox()},initContainer:function(){var t=this.options,e=this.$element,n=this.$container,i=this.$cropper;i.addClass(S),e.removeClass(S),i.css(this.container={width:wt(n.width(),vt(t.minContainerWidth)||200),height:wt(n.height(),vt(t.minContainerHeight)||100)}),e.addClass(S),i.removeClass(S)},initCanvas:function(){var e,n=this.options.viewMode,i=this.container,r=i.width,o=i.height,s=this.image,a=s.naturalWidth,l=s.naturalHeight,c=90===bt(s.rotate),h=c?l:a,u=c?a:l,d=h/u,f=r,p=o;o*d>r?3===n?f=o*d:p=r/d:3===n?p=r/d:f=o*d,e={naturalWidth:h,naturalHeight:u,aspectRatio:d,width:f,height:p},e.oldLeft=e.left=(r-f)/2,e.oldTop=e.top=(o-p)/2,this.canvas=e,this.isLimited=1===n||2===n,this.limitCanvas(!0,!0),this.initialImage=t.extend({},s),this.initialCanvas=t.extend({},e)},limitCanvas:function(t,e){var n,i,r,o,s=this.options,a=s.viewMode,l=this.container,c=l.width,h=l.height,u=this.canvas,d=u.aspectRatio,f=this.cropBox,p=this.isCropped&&f;t&&(n=vt(s.minCanvasWidth)||0,i=vt(s.minCanvasHeight)||0,a&&(a>1?(n=wt(n,c),i=wt(i,h),3===a&&(i*d>n?n=i*d:i=n/d)):n?n=wt(n,p?f.width:0):i?i=wt(i,p?f.height:0):p&&(n=f.width,i=f.height,i*d>n?n=i*d:i=n/d)),n&&i?i*d>n?i=n/d:n=i*d:n?i=n/d:i&&(n=i*d),u.minWidth=n,u.minHeight=i,u.maxWidth=1/0,u.maxHeight=1/0),e&&(a?(r=c-u.width,o=h-u.height,u.minLeft=yt(0,r),u.minTop=yt(0,o),u.maxLeft=wt(0,r),u.maxTop=wt(0,o),p&&this.isLimited&&(u.minLeft=yt(f.left,f.left+f.width-u.width),u.minTop=yt(f.top,f.top+f.height-u.height),u.maxLeft=f.left,u.maxTop=f.top,2===a&&(u.width>=c&&(u.minLeft=yt(0,r),u.maxLeft=wt(0,r)),u.height>=h&&(u.minTop=yt(0,o),u.maxTop=wt(0,o))))):(u.minLeft=-u.width,u.minTop=-u.height,u.maxLeft=c,u.maxTop=h))},renderCanvas:function(t){var e,n,i=this.canvas,r=this.image,o=r.rotate,s=r.naturalWidth,a=r.naturalHeight;this.isRotated&&(this.isRotated=!1,n=h({width:r.width,height:r.height,degree:o}),e=n.width/n.height,e!==i.aspectRatio&&(i.left-=(n.width-i.width)/2,i.top-=(n.height-i.height)/2,i.width=n.width,i.height=n.height,i.aspectRatio=e,i.naturalWidth=s,i.naturalHeight=a,o%180&&(n=h({width:s,height:a,degree:o}),i.naturalWidth=n.width,i.naturalHeight=n.height),this.limitCanvas(!0,!1))),(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=yt(wt(i.width,i.minWidth),i.maxWidth),i.height=yt(wt(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.oldLeft=i.left=yt(wt(i.left,i.minLeft),i.maxLeft),i.oldTop=i.top=yt(wt(i.top,i.minTop),i.maxTop),this.$canvas.css({width:i.width,height:i.height,left:i.left,top:i.top}),this.renderImage(),this.isCropped&&this.isLimited&&this.limitCropBox(!0,!0),t&&this.output()},renderImage:function(e){var n,i=this.canvas,r=this.image;r.rotate&&(n=h({width:i.width,height:i.height,degree:r.rotate,aspectRatio:r.aspectRatio},!0)),t.extend(r,n?{width:n.width,height:n.height,left:(i.width-n.width)/2,top:(i.height-n.height)/2}:{width:i.width,height:i.height,left:0,top:0}),this.$clone.css({width:r.width,height:r.height,marginLeft:r.left,marginTop:r.top,transform:c(r)}),e&&this.output()},initCropBox:function(){var e=this.options,n=this.canvas,i=e.aspectRatio,r=vt(e.autoCropArea)||.8,o={width:n.width,height:n.height};i&&(n.height*i>n.width?o.height=o.width/i:o.width=o.height*i),this.cropBox=o,this.limitCropBox(!0,!0),o.width=yt(wt(o.width,o.minWidth),o.maxWidth),o.height=yt(wt(o.height,o.minHeight),o.maxHeight),o.width=wt(o.minWidth,o.width*r),o.height=wt(o.minHeight,o.height*r),o.oldLeft=o.left=n.left+(n.width-o.width)/2,o.oldTop=o.top=n.top+(n.height-o.height)/2,this.initialCropBox=t.extend({},o)},limitCropBox:function(t,e){var n,i,r,o,s=this.options,a=s.aspectRatio,l=this.container,c=l.width,h=l.height,u=this.canvas,d=this.cropBox,f=this.isLimited;t&&(n=vt(s.minCropBoxWidth)||0,i=vt(s.minCropBoxHeight)||0,n=yt(n,c),i=yt(i,h),r=yt(c,f?u.width:c),o=yt(h,f?u.height:h),a&&(n&&i?i*a>n?i=n/a:n=i*a:n?i=n/a:i&&(n=i*a),o*a>r?o=r/a:r=o*a),d.minWidth=yt(n,r),d.minHeight=yt(i,o),d.maxWidth=r,d.maxHeight=o),e&&(f?(d.minLeft=wt(0,u.left),d.minTop=wt(0,u.top),d.maxLeft=yt(c,u.left+u.width)-d.width,d.maxTop=yt(h,u.top+u.height)-d.height):(d.minLeft=0,d.minTop=0,d.maxLeft=c-d.width,d.maxTop=h-d.height))},renderCropBox:function(){var t=this.options,e=this.container,n=e.width,i=e.height,r=this.cropBox;(r.width>r.maxWidth||r.width<r.minWidth)&&(r.left=r.oldLeft),(r.height>r.maxHeight||r.height<r.minHeight)&&(r.top=r.oldTop),r.width=yt(wt(r.width,r.minWidth),r.maxWidth),r.height=yt(wt(r.height,r.minHeight),r.maxHeight),this.limitCropBox(!1,!0),r.oldLeft=r.left=yt(wt(r.left,r.minLeft),r.maxLeft),r.oldTop=r.top=yt(wt(r.top,r.minTop),r.maxTop),t.movable&&t.cropBoxMovable&&this.$face.data(et,r.width===n&&r.height===i?dt:ht),this.$cropBox.css({width:r.width,height:r.height,left:r.left,top:r.top}),this.isCropped&&this.isLimited&&this.limitCanvas(!0,!0),this.isDisabled||this.output()},output:function(){this.preview(),this.isCompleted?this.trigger(V,this.getData()):this.isBuilt||this.$element.one(U,t.proxy(function(){this.trigger(V,this.getData())},this))},initPreview:function(){var e,n=a(this.crossOrigin),i=n?this.crossOriginUrl:this.url;this.$preview=t(this.options.preview),this.$clone2=e=t("<img"+n+' src="'+i+'">'),this.$viewBox.html(e),this.$preview.each(function(){var e=t(this);e.data(tt,{width:e.width(),height:e.height(),html:e.html()}),e.html("<img"+n+' src="'+i+'" style="display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;">')})},resetPreview:function(){this.$preview.each(function(){var e=t(this),n=e.data(tt);e.css({width:n.width,height:n.height}).html(n.html).removeData(tt)})},preview:function(){var e=this.image,n=this.canvas,i=this.cropBox,r=i.width,o=i.height,s=e.width,a=e.height,l=i.left-n.left-e.left,h=i.top-n.top-e.top;this.isCropped&&!this.isDisabled&&(this.$clone2.css({width:s,height:a,marginLeft:-l,marginTop:-h,transform:c(e)}),this.$preview.each(function(){var n=t(this),i=n.data(tt),u=i.width,d=i.height,f=u,p=d,g=1;r&&(g=u/r,p=o*g),o&&p>d&&(g=d/o,f=r*g,p=d),n.css({width:f,height:p}).find("img").css({width:s*g,height:a*g,marginLeft:-l*g,marginTop:-h*g,transform:c(e)})}))},bind:function(){var e=this.options,n=this.$element,i=this.$cropper;t.isFunction(e.cropstart)&&n.on(q,e.cropstart),t.isFunction(e.cropmove)&&n.on(Y,e.cropmove),t.isFunction(e.cropend)&&n.on(G,e.cropend),t.isFunction(e.crop)&&n.on(V,e.crop),t.isFunction(e.zoom)&&n.on(K,e.zoom),i.on(R,t.proxy(this.cropStart,this)),e.zoomable&&e.zoomOnWheel&&i.on(N,t.proxy(this.wheel,this)),e.toggleDragModeOnDblclick&&i.on(O,t.proxy(this.dblclick,this)),w.on(I,this._cropMove=r(this.cropMove,this)).on(P,this._cropEnd=r(this.cropEnd,this)),e.responsive&&y.on(H,this._resize=r(this.resize,this))},unbind:function(){var e=this.options,n=this.$element,i=this.$cropper;t.isFunction(e.cropstart)&&n.off(q,e.cropstart),t.isFunction(e.cropmove)&&n.off(Y,e.cropmove),t.isFunction(e.cropend)&&n.off(G,e.cropend),t.isFunction(e.crop)&&n.off(V,e.crop),t.isFunction(e.zoom)&&n.off(K,e.zoom),i.off(R,this.cropStart),e.zoomable&&e.zoomOnWheel&&i.off(N,this.wheel),e.toggleDragModeOnDblclick&&i.off(O,this.dblclick),w.off(I,this._cropMove).off(P,this._cropEnd),e.responsive&&y.off(H,this._resize)},resize:function(){var e,n,i,r=this.options.restore,o=this.$container,s=this.container;!this.isDisabled&&s&&(i=o.width()/s.width,(1!==i||o.height()!==s.height)&&(r&&(e=this.getCanvasData(),n=this.getCropBoxData()),this.render(),r&&(this.setCanvasData(t.each(e,function(t,n){e[t]=n*i})),this.setCropBoxData(t.each(n,function(t,e){n[t]=e*i})))))},dblclick:function(){this.isDisabled||(this.$dragBox.hasClass(B)?this.setDragMode(dt):this.setDragMode(ut))},wheel:function(e){var n=e.originalEvent||e,i=vt(this.options.wheelZoomRatio)||.1,r=1;this.isDisabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(t.proxy(function(){this.wheeling=!1},this),50),n.deltaY?r=n.deltaY>0?1:-1:n.wheelDelta?r=-n.wheelDelta/120:n.detail&&(r=n.detail>0?1:-1),this.zoom(-r*i,e)))},cropStart:function(e){var n,i,r=this.options,o=e.originalEvent,s=o&&o.touches,a=e;if(!this.isDisabled){if(s){if(n=s.length,n>1){if(!r.zoomable||!r.zoomOnTouch||2!==n)return;a=s[1],this.startX2=a.pageX,this.startY2=a.pageY,i=ft}a=s[0]}if(i=i||t(a.target).data(et),X.test(i)){if(this.trigger(q,{originalEvent:o,action:i}).isDefaultPrevented())return;e.preventDefault(),this.action=i,this.cropping=!1,this.startX=a.pageX||o&&o.pageX,this.startY=a.pageY||o&&o.pageY,i===ut&&(this.cropping=!0,this.$dragBox.addClass(_))}}},cropMove:function(t){var e,n=this.options,i=t.originalEvent,r=i&&i.touches,o=t,s=this.action;if(!this.isDisabled){if(r){if(e=r.length,e>1){if(!n.zoomable||!n.zoomOnTouch||2!==e)return;o=r[1],this.endX2=o.pageX,this.endY2=o.pageY}o=r[0]}if(s){if(this.trigger(Y,{originalEvent:i,action:s}).isDefaultPrevented())return;t.preventDefault(),this.endX=o.pageX||i&&i.pageX,this.endY=o.pageY||i&&i.pageY,this.change(o.shiftKey,s===ft?t:null)}}},cropEnd:function(t){var e=t.originalEvent,n=this.action;this.isDisabled||n&&(t.preventDefault(),this.cropping&&(this.cropping=!1,this.$dragBox.toggleClass(_,this.isCropped&&this.options.modal)),this.action="",this.trigger(G,{originalEvent:e,action:n}))},change:function(t,e){var n,i,r=this.options,o=r.aspectRatio,s=this.action,a=this.container,l=this.canvas,c=this.cropBox,h=c.width,u=c.height,d=c.left,f=c.top,p=d+h,g=f+u,m=0,v=0,y=a.width,w=a.height,b=!0;switch(!o&&t&&(o=h&&u?h/u:1),this.limited&&(m=c.minLeft,v=c.minTop,y=m+yt(a.width,l.left+l.width),w=v+yt(a.height,l.top+l.height)),i={x:this.endX-this.startX,y:this.endY-this.startY},o&&(i.X=i.y*o,i.Y=i.x/o),s){case ht:d+=i.x,f+=i.y;break;case nt:if(i.x>=0&&(p>=y||o&&(v>=f||g>=w))){b=!1;break}h+=i.x,o&&(u=h/o,f-=i.Y/2),0>h&&(s=it,h=0);break;case ot:if(i.y<=0&&(v>=f||o&&(m>=d||p>=y))){b=!1;break}u-=i.y,f+=i.y,o&&(h=u*o,d+=i.X/2),0>u&&(s=rt,u=0);break;case it:if(i.x<=0&&(m>=d||o&&(v>=f||g>=w))){b=!1;break}h-=i.x,d+=i.x,o&&(u=h/o,f+=i.Y/2),0>h&&(s=nt,h=0);break;case rt:if(i.y>=0&&(g>=w||o&&(m>=d||p>=y))){b=!1;break}u+=i.y,o&&(h=u*o,d-=i.X/2),0>u&&(s=ot,u=0);break;case lt:if(o){if(i.y<=0&&(v>=f||p>=y)){b=!1;break}u-=i.y,f+=i.y,h=u*o}else i.x>=0?y>p?h+=i.x:i.y<=0&&v>=f&&(b=!1):h+=i.x,i.y<=0?f>v&&(u-=i.y,f+=i.y):(u-=i.y,f+=i.y);0>h&&0>u?(s=at,u=0,h=0):0>h?(s=ct,h=0):0>u&&(s=st,u=0);break;case ct:if(o){if(i.y<=0&&(v>=f||m>=d)){b=!1;break}u-=i.y,f+=i.y,h=u*o,d+=i.X}else i.x<=0?d>m?(h-=i.x,d+=i.x):i.y<=0&&v>=f&&(b=!1):(h-=i.x,d+=i.x),i.y<=0?f>v&&(u-=i.y,f+=i.y):(u-=i.y,f+=i.y);0>h&&0>u?(s=st,u=0,h=0):0>h?(s=lt,h=0):0>u&&(s=at,u=0);break;case at:if(o){if(i.x<=0&&(m>=d||g>=w)){b=!1;break}h-=i.x,d+=i.x,u=h/o}else i.x<=0?d>m?(h-=i.x,d+=i.x):i.y>=0&&g>=w&&(b=!1):(h-=i.x,d+=i.x),i.y>=0?w>g&&(u+=i.y):u+=i.y;0>h&&0>u?(s=lt,u=0,h=0):0>h?(s=st,h=0):0>u&&(s=ct,u=0);break;case st:if(o){if(i.x>=0&&(p>=y||g>=w)){b=!1;break}h+=i.x,u=h/o}else i.x>=0?y>p?h+=i.x:i.y>=0&&g>=w&&(b=!1):h+=i.x,i.y>=0?w>g&&(u+=i.y):u+=i.y;0>h&&0>u?(s=ct,u=0,h=0):0>h?(s=at,h=0):0>u&&(s=lt,u=0);break;case dt:this.move(i.x,i.y),b=!1;break;case ft:this.zoom(function(t,e,n,i){var r=At(t*t+e*e),o=At(n*n+i*i);return(o-r)/r}(bt(this.startX-this.startX2),bt(this.startY-this.startY2),bt(this.endX-this.endX2),bt(this.endY-this.endY2)),e),this.startX2=this.endX2,this.startY2=this.endY2,b=!1;break;case ut:if(!i.x||!i.y){b=!1;break}n=this.$cropper.offset(),d=this.startX-n.left,f=this.startY-n.top,h=c.minWidth,u=c.minHeight,i.x>0?s=i.y>0?st:lt:i.x<0&&(d-=h,s=i.y>0?at:ct),i.y<0&&(f-=u),this.isCropped||(this.$cropBox.removeClass(S),this.isCropped=!0,this.limited&&this.limitCropBox(!0,!0))}b&&(c.width=h,c.height=u,c.left=d,c.top=f,this.action=s,this.renderCropBox()),this.startX=this.endX,this.startY=this.endY},crop:function(){this.isBuilt&&!this.isDisabled&&(this.isCropped||(this.isCropped=!0,this.limitCropBox(!0,!0),this.options.modal&&this.$dragBox.addClass(_),this.$cropBox.removeClass(S)),this.setCropBoxData(this.initialCropBox))},reset:function(){this.isBuilt&&!this.isDisabled&&(this.image=t.extend({},this.initialImage),this.canvas=t.extend({},this.initialCanvas),this.cropBox=t.extend({},this.initialCropBox),this.renderCanvas(),this.isCropped&&this.renderCropBox())},clear:function(){this.isCropped&&!this.isDisabled&&(t.extend(this.cropBox,{left:0,top:0,width:0,height:0}),this.isCropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),this.$dragBox.removeClass(_),this.$cropBox.addClass(S))},replace:function(t,e){!this.isDisabled&&t&&(this.isImg&&this.$element.attr("src",t),e?(this.url=t,this.$clone.attr("src",t),this.isBuilt&&this.$preview.find("img").add(this.$clone2).attr("src",t)):(this.isImg&&(this.isReplaced=!0),this.options.data=null,this.load(t)))},enable:function(){this.isBuilt&&(this.isDisabled=!1,this.$cropper.removeClass(M))},disable:function(){this.isBuilt&&(this.isDisabled=!0,this.$cropper.addClass(M))},destroy:function(){var t=this.$element;this.isLoaded?(this.isImg&&this.isReplaced&&t.attr("src",this.originalUrl),this.unbuild(),t.removeClass(S)):this.isImg?t.off(j,this.start):this.$clone&&this.$clone.remove(),t.removeData(F)},move:function(t,e){var i=this.canvas;this.moveTo(n(t)?t:i.left+vt(t),n(e)?e:i.top+vt(e))},moveTo:function(t,i){var r=this.canvas,o=!1;n(i)&&(i=t),t=vt(t),i=vt(i),this.isBuilt&&!this.isDisabled&&this.options.movable&&(e(t)&&(r.left=t,o=!0),e(i)&&(r.top=i,o=!0),o&&this.renderCanvas(!0))},zoom:function(t,e){var n=this.canvas;t=vt(t),t=0>t?1/(1-t):1+t,this.zoomTo(n.width*t/n.naturalWidth,e)},zoomTo:function(t,e){var n,i,r,o,s,a=this.options,l=this.canvas,c=l.width,h=l.height,u=l.naturalWidth,f=l.naturalHeight;if(t=vt(t),t>=0&&this.isBuilt&&!this.isDisabled&&a.zoomable){if(i=u*t,r=f*t,e&&(n=e.originalEvent),this.trigger(K,{originalEvent:n,oldRatio:c/u,ratio:i/u}).isDefaultPrevented())return;n?(o=this.$cropper.offset(),s=n.touches?d(n.touches):{pageX:e.pageX||n.pageX||0,pageY:e.pageY||n.pageY||0},l.left-=(i-c)*((s.pageX-o.left-l.left)/c),l.top-=(r-h)*((s.pageY-o.top-l.top)/h)):(l.left-=(i-c)/2,l.top-=(r-h)/2),l.width=i,l.height=r,this.renderCanvas(!0)}},rotate:function(t){this.rotateTo((this.image.rotate||0)+vt(t))},rotateTo:function(t){t=vt(t),e(t)&&this.isBuilt&&!this.isDisabled&&this.options.rotatable&&(this.image.rotate=t%360,this.isRotated=!0,this.renderCanvas(!0))},scale:function(t,i){var r=this.image,o=!1;n(i)&&(i=t),t=vt(t),i=vt(i),this.isBuilt&&!this.isDisabled&&this.options.scalable&&(e(t)&&(r.scaleX=t,o=!0),e(i)&&(r.scaleY=i,o=!0),o&&this.renderImage(!0))},scaleX:function(t){var n=this.image.scaleY;this.scale(t,e(n)?n:1)},scaleY:function(t){var n=this.image.scaleX;this.scale(e(n)?n:1,t)},getData:function(e){var n,i,r=this.options,o=this.image,s=this.canvas,a=this.cropBox;return this.isBuilt&&this.isCropped?(i={x:a.left-s.left,y:a.top-s.top,width:a.width,height:a.height},n=o.width/o.naturalWidth,t.each(i,function(t,r){r/=n,i[t]=e?Et(r):r})):i={x:0,y:0,width:0,height:0},r.rotatable&&(i.rotate=o.rotate||0),r.scalable&&(i.scaleX=o.scaleX||1,i.scaleY=o.scaleY||1),i},setData:function(n){var i,r,o,s=this.options,a=this.image,l=this.canvas,c={};t.isFunction(n)&&(n=n.call(this.element)),this.isBuilt&&!this.isDisabled&&t.isPlainObject(n)&&(s.rotatable&&e(n.rotate)&&n.rotate!==a.rotate&&(a.rotate=n.rotate,this.isRotated=i=!0),s.scalable&&(e(n.scaleX)&&n.scaleX!==a.scaleX&&(a.scaleX=n.scaleX,r=!0),e(n.scaleY)&&n.scaleY!==a.scaleY&&(a.scaleY=n.scaleY,r=!0)),i?this.renderCanvas():r&&this.renderImage(),o=a.width/a.naturalWidth,e(n.x)&&(c.left=n.x*o+l.left),e(n.y)&&(c.top=n.y*o+l.top),e(n.width)&&(c.width=n.width*o),e(n.height)&&(c.height=n.height*o),this.setCropBoxData(c))},getContainerData:function(){return this.isBuilt?this.container:{}},getImageData:function(){return this.isLoaded?this.image:{}},getCanvasData:function(){var e=this.canvas,n={};return this.isBuilt&&t.each(["left","top","width","height","naturalWidth","naturalHeight"],function(t,i){n[i]=e[i]}),n},setCanvasData:function(n){var i=this.canvas,r=i.aspectRatio;t.isFunction(n)&&(n=n.call(this.$element)),this.isBuilt&&!this.isDisabled&&t.isPlainObject(n)&&(e(n.left)&&(i.left=n.left),e(n.top)&&(i.top=n.top),e(n.width)?(i.width=n.width,i.height=n.width/r):e(n.height)&&(i.height=n.height,i.width=n.height*r),this.renderCanvas(!0))},getCropBoxData:function(){var t,e=this.cropBox;return this.isBuilt&&this.isCropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(n){var i,r,o=this.cropBox,s=this.options.aspectRatio;t.isFunction(n)&&(n=n.call(this.$element)),this.isBuilt&&this.isCropped&&!this.isDisabled&&t.isPlainObject(n)&&(e(n.left)&&(o.left=n.left),e(n.top)&&(o.top=n.top),e(n.width)&&(i=!0,o.width=n.width),e(n.height)&&(r=!0,o.height=n.height),s&&(i?o.height=o.width/s:r&&(o.width=o.height*s)),this.renderCropBox())},getCroppedCanvas:function(e){var n,i,r,o,s,a,l,c,h,d,f;return this.isBuilt&&this.isCropped&&gt?(t.isPlainObject(e)||(e={}),f=this.getData(),n=f.width,i=f.height,c=n/i,t.isPlainObject(e)&&(s=e.width,a=e.height,s?(a=s/c,l=s/n):a&&(s=a*c,l=a/i)),r=kt(s||n),o=kt(a||i),h=t("<canvas>")[0],h.width=r,h.height=o,d=h.getContext("2d"),e.fillColor&&(d.fillStyle=e.fillColor,d.fillRect(0,0,r,o)),d.drawImage.apply(d,function(){var t,e,r,o,s,a,c=u(this.$clone[0],this.image),h=c.width,d=c.height,p=this.canvas,g=[c],m=f.x+p.naturalWidth*(bt(f.scaleX||1)-1)/2,v=f.y+p.naturalHeight*(bt(f.scaleY||1)-1)/2;return-n>=m||m>h?m=t=r=s=0:0>=m?(r=-m,m=0,t=s=yt(h,n+m)):h>=m&&(r=0,t=s=yt(n,h-m)),0>=t||-i>=v||v>d?v=e=o=a=0:0>=v?(o=-v,v=0,e=a=yt(d,i+v)):d>=v&&(o=0,e=a=yt(i,d-v)),g.push(kt(m),kt(v),kt(t),kt(e)),l&&(r*=l,o*=l,s*=l,a*=l),s>0&&a>0&&g.push(kt(r),kt(o),kt(s),kt(a)),g}.call(this)),h):void 0},setAspectRatio:function(t){var e=this.options;this.isDisabled||n(t)||(e.aspectRatio=wt(0,t)||NaN,this.isBuilt&&(this.initCropBox(),this.isCropped&&this.renderCropBox()))},setDragMode:function(t){var e,n,i=this.options;this.isLoaded&&!this.isDisabled&&(e=t===ut,n=i.movable&&t===dt,t=e||n?t:pt,this.$dragBox.data(et,t).toggleClass(B,e).toggleClass(T,n),i.cropBoxMovable||this.$face.data(et,t).toggleClass(B,e).toggleClass(T,n))}},v.DEFAULTS={viewMode:0,dragMode:"crop",aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,build:null,built:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},v.setDefaults=function(e){t.extend(v.DEFAULTS,e)},v.TEMPLATE='<div class="cropper-container"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-action="e"></span><span class="cropper-line line-n" data-action="n"></span><span class="cropper-line line-w" data-action="w"></span><span class="cropper-line line-s" data-action="s"></span><span class="cropper-point point-e" data-action="e"></span><span class="cropper-point point-n" data-action="n"></span><span class="cropper-point point-w" data-action="w"></span><span class="cropper-point point-s" data-action="s"></span><span class="cropper-point point-ne" data-action="ne"></span><span class="cropper-point point-nw" data-action="nw"></span><span class="cropper-point point-sw" data-action="sw"></span><span class="cropper-point point-se" data-action="se"></span></div></div>',v.other=t.fn.cropper,t.fn.cropper=function(e){var r,o=i(arguments,1);return this.each(function(){var n,i,s=t(this),a=s.data(F);if(!a){if(/destroy/.test(e))return;n=t.extend({},s.data(),t.isPlainObject(e)&&e),s.data(F,a=new v(this,n))}"string"==typeof e&&t.isFunction(i=a[e])&&(r=i.apply(a,o))}),n(r)?this:r},t.fn.cropper.Constructor=v,t.fn.cropper.setDefaults=v.setDefaults,t.fn.cropper.noConflict=function(){return t.fn.cropper=v.other,this}}),function(){window.slugify=function(t){return t.replace(/[^-a-zA-Z0-9]+/g,"_").toLowerCase()},window.ajaxGet=function(t){return $.ajax({type:"GET",url:t,dataType:"script"})},window.split=function(t){return t.split(/,\s*/)},window.extractLast=function(t){return split(t).pop()},window.rstrip=function(t){return t?t.replace(/\s+$/,""):t},window.disableButtonIfEmptyField=function(t,e){var n,i;return i=$(t),n=i.closest("form").find(e),""===rstrip(i.val())&&n.disable(),i.on("input",function(){return""===rstrip($(this).val())?n.disable():n.enable()})},window.disableButtonIfAnyEmptyField=function(t,e,n){var i,r;return i=t.find(n),r=function(){var n;return n=!0,t.find("input").filter(e).each(function(){return n=""!==rstrip($(this).val())||!$(this).attr("required")}),n?i.enable():i.disable()},r(),t.keyup(r)},window.sanitize=function(t){return t.replace(/<(?:.|\n)*?>/gm,"")},window.unbindEvents=function(){return $(document).off("scroll")},window.shiftWindow=function(){return scrollBy(0,-100)},document.addEventListener("page:fetch",unbindEvents),window.addEventListener("hashchange",shiftWindow),window.onload=function(){return location.hash?setTimeout(shiftWindow,100):void 0},$(function(){var t,e,n,i,r,o;return n=bp.getBreakpointSize(),$(".nicescroll").niceScroll({cursoropacitymax:"0.4",cursorcolor:"#FFF",cursorborder:"1px solid #FFF"}),$(".js-select-on-focus").on("focusin",function(){return $(this).select().one("mouseup",function(t){return t.preventDefault()})}),$(".remove-row").bind("ajax:success",function(){return $(this).closest("li").fadeOut()}),$(".js-remove-tr").bind("ajax:before",function(){return $(this).hide()}),$(".js-remove-tr").bind("ajax:success",function(){return $(this).closest("tr").fadeOut()}),$("select.select2").select2({width:"resolve",dropdownAutoWidth:!0}),$(".js-select2").bind("select2-close",function(){return setTimeout(function(){return $(".select2-container-active").removeClass("select2-container-active"),$(":focus").blur()},1)}),$("body").tooltip({selector:'.has-tooltip, [data-toggle="tooltip"]',placement:function(t,e){var n;return n=$(e),n.data("placement")||"bottom"}}),$(".header-logo .home").tooltip({placement:function(t,e){var n;return n=$(e),$(".page-with-sidebar").hasClass("page-sidebar-collapsed")?"right":"bottom"},container:"body"}),$(".page-with-sidebar").tooltip({selector:".sidebar-collapsed .nav-sidebar a, .sidebar-collapsed a.sidebar-user",placement:"right",container:"body"}),$(".trigger-submit").on("change",function(){return $(this).parents("form").submit()}),gl.utils.localTimeAgo($("abbr.timeago, .js-timeago"),!0),(o=$(".flash-container")).length>0&&(o.click(function(){return $(this).fadeOut()}),o.show()),$("body").on("ajax:complete, ajax:beforeSend, submit","form",function(t){var e;switch(e=$('[type="submit"]',this),t.type){case"ajax:beforeSend":case"submit":return e.disable();default:return e.enable()}}),$(".account-box").hover(function(){return $(this).toggleClass("hover")}),$(document).on("click",".diff-content .js-show-suppressed-diff",function(){var t;return t=$(this).parent(),t.next("table").show(),t.remove()}),$(".navbar-toggle").on("click",function(){return $(".header-content .title").toggle(),$(".header-content .navbar-collapse").toggle(),$(".navbar-toggle").toggleClass("active")}),$("body").on("click",".js-toggle-diff-comments",function(t){return $(this).toggleClass("active"),$(this).closest(".diff-file").find(".notes_holder").toggle(),t.preventDefault()}),$(document).off("click",".js-confirm-danger"),$(document).on("click",".js-confirm-danger",function(t){var e,n,i;return t.preventDefault(),e=$(t.target),i=e.data("confirm-danger-message"),n=e.closest("form"),new ConfirmDangerModal(n,i)}),$('input[type="search"]').each(function(){var t;t=$(this),t.attr("value",t.val())}),$(document).off("keyup",'input[type="search"]').on("keyup",'input[type="search"]',function(t){var e;return e=$(this),e.attr("value",e.val())}),e=$(".js-sidebar-toggle"),t=$(".toggle-nav-collapse"),$(document).off("breakpoint:change").on("breakpoint:change",function(n,i){var r,o;return"sm"!==i&&"xs"!==i||(r=e.find("i"),r.hasClass("fa-angle-double-right")&&e.trigger("click"),o=t.find(".fa"),!o.hasClass("fa-angle-left"))?void 0:t.trigger("click")}),$(document).off("click",".js-sidebar-toggle").on("click",".js-sidebar-toggle",function(t,e){var n,i,r;return t.preventDefault(),i=$(this),r=i.find("i"),n=$(".js-sidebar-toggle i"),r.hasClass("fa-angle-double-right")?(n.removeClass("fa-angle-double-right").addClass("fa-angle-double-left"),$("aside.right-sidebar").removeClass("right-sidebar-expanded").addClass("right-sidebar-collapsed"),$(".page-with-sidebar").removeClass("right-sidebar-expanded").addClass("right-sidebar-collapsed")):(n.removeClass("fa-angle-double-left").addClass("fa-angle-double-right"),$("aside.right-sidebar").removeClass("right-sidebar-collapsed").addClass("right-sidebar-expanded"),$(".page-with-sidebar").removeClass("right-sidebar-collapsed").addClass("right-sidebar-expanded")),e?void 0:$.cookie("collapsed_gutter",$(".right-sidebar").hasClass("right-sidebar-collapsed"),{
path:"/"})}),r=function(){var t;return t=n,n=bp.getBreakpointSize(),n!==t?$(document).trigger("breakpoint:change",[n]):void 0},i=function(){return n=bp.getBreakpointSize(),$(document).trigger("breakpoint:change",[n])},$(window).off("resize").on("resize",function(t){return r()}),i(),new Aside})}.call(this);