mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 17:53:55 +01:00
a82ed16c34
Included 'vendor.bundle.js' as it is referenced. So this will give a baseline to compare against future builds. But ideally this will only change when updating dependency versions.
624 lines
1.5 MiB
624 lines
1.5 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,,,,,,,,,,,,function(e,t,n){var i,r;
|
||
/*! @preserve
|
||
* numeral.js
|
||
* version : 2.0.6
|
||
* author : Adam Draper
|
||
* license : MIT
|
||
* http://adamwdraper.github.com/Numeral-js/
|
||
*/void 0===(r="function"==typeof(i=function(){function e(e,t){this._input=e,this._value=t}var t,n,i={},r={},o={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:o.currentLocale,zeroFormat:o.zeroFormat,nullFormat:o.nullFormat,defaultFormat:o.defaultFormat,scalePercentBy100:o.scalePercentBy100};return(t=function(r){var o,a,c,l;if(t.isNumeral(r))o=r.value();else if(0===r||void 0===r)o=0;else if(null===r||n.isNaN(r))o=null;else if("string"==typeof r)if(s.zeroFormat&&r===s.zeroFormat)o=0;else if(s.nullFormat&&r===s.nullFormat||!r.replace(/[^0-9]+/g,"").length)o=null;else{for(a in i)if((l="function"==typeof i[a].regexps.unformat?i[a].regexps.unformat():i[a].regexps.unformat)&&r.match(l)){c=i[a].unformat;break}c=c||t._.stringToNumber,o=c(r)}else o=Number(r)||null;return new e(r,o)}).version="2.0.6",t.isNumeral=function(t){return t instanceof e},t._=n={numberToFormat:function(e,n,i){var o,s,a,c,l,u,h,d=r[t.options.currentLocale],f=!1,p=!1,g=0,m="",v=1e12,y="",b=!1;if(e=e||0,s=Math.abs(e),t._.includes(n,"(")?(f=!0,n=n.replace(/[\(|\)]/g,"")):(t._.includes(n,"+")||t._.includes(n,"-"))&&(l=t._.includes(n,"+")?n.indexOf("+"):0>e?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),t._.includes(n,"a")&&(o=!!(o=n.match(/a(k|m|b|t)?/))&&o[1],t._.includes(n," a")&&(m=" "),n=n.replace(new RegExp(m+"a[kmbt]?"),""),s>=v&&!o||"t"===o?(m+=d.abbreviations.trillion,e/=v):v>s&&s>=1e9&&!o||"b"===o?(m+=d.abbreviations.billion,e/=1e9):1e9>s&&s>=1e6&&!o||"m"===o?(m+=d.abbreviations.million,e/=1e6):(1e6>s&&s>=1e3&&!o||"k"===o)&&(m+=d.abbreviations.thousand,e/=1e3)),t._.includes(n,"[.]")&&(p=!0,n=n.replace("[.]",".")),a=e.toString().split(".")[0],c=n.split(".")[1],u=n.indexOf(","),g=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,c?(t._.includes(c,"[")?(c=(c=c.replace("]","")).split("["),y=t._.toFixed(e,c[0].length+c[1].length,i,c[1].length)):y=t._.toFixed(e,c.length,i),a=y.split(".")[0],y=t._.includes(y,".")?d.delimiters.decimal+y.split(".")[1]:"",p&&0===Number(y.slice(1))&&(y="")):a=t._.toFixed(e,0,i),m&&!o&&Number(a)>=1e3&&m!==d.abbreviations.trillion)switch(a=String(Number(a)/1e3),m){case d.abbreviations.thousand:m=d.abbreviations.million;break;case d.abbreviations.million:m=d.abbreviations.billion;break;case d.abbreviations.billion:m=d.abbreviations.trillion}if(t._.includes(a,"-")&&(a=a.slice(1),b=!0),a.length<g)for(var w=g-a.length;w>0;w--)a="0"+a;return u>-1&&(a=a.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),0===n.indexOf(".")&&(a=""),h=a+y+(m||""),f?h=(f&&b?"(":"")+h+(f&&b?")":""):l>=0?h=0===l?(b?"-":"+")+h:h+(b?"-":"+"):b&&(h="-"+h),h},stringToNumber:function(e){var t,n,i,o=r[s.currentLocale],a=e,c={thousand:3,million:6,billion:9,trillion:12};if(s.zeroFormat&&e===s.zeroFormat)n=0;else if(s.nullFormat&&e===s.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==o.delimiters.decimal&&(e=e.replace(/\./g,"").replace(o.delimiters.decimal,".")),c)if(i=new RegExp("[^a-zA-Z]"+o.abbreviations[t]+"(?:\\)|(\\"+o.currency.symbol+")?(?:\\))?)?$"),a.match(i)){n*=Math.pow(10,c[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,i=Object(e),r=i.length>>>0,o=0;if(3===arguments.length)n=arguments[2];else{for(;r>o&&!(o in i);)o++;if(o>=r)throw new TypeError("Reduce of empty array with no initial value");n=i[o++]}for(;r>o;o++)o in i&&(n=t(n,i[o],o,i));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,t){var i=n.multiplier(t);return e>i?e:i},1)},toFixed:function(e,t,n,i){var r,o,s,a,c=e.toString().split("."),l=t-(i||0);return r=2===c.length?Math.min(Math.max(c[1].length,l),t):l,s=Math.pow(10,r),a=(n(e+"e+"+r)/s).toFixed(r),i>t-r&&(o=new RegExp("\\.?0{1,"+(i-(t-r))+"}$"),a=a.replace(o,"")),a}},t.options=s,t.formats=i,t.locales=r,t.locale=function(e){return e&&(s.currentLocale=e.toLowerCase()),s.currentLocale},t.localeData=function(e){if(!e)return r[s.currentLocale];if(e=e.toLowerCase(),!r[e])throw new Error("Unknown locale : "+e);return r[e]},t.reset=function(){for(var e in o)s[e]=o[e]},t.zeroFormat=function(e){s.zeroFormat="string"==typeof e?e:null},t.nullFormat=function(e){s.nullFormat="string"==typeof e?e:null},t.defaultFormat=function(e){s.defaultFormat="string"==typeof e?e:"0.0"},t.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},t.validate=function(e,n){var i,r,o,s,a,c,l,u;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",e)),(e=e.trim()).match(/^\d+$/))return!0;if(""===e)return!1;try{l=t.localeData(n)}catch(e){l=t.localeData(t.locale())}return o=l.currency.symbol,a=l.abbreviations,i=l.delimiters.decimal,r="."===l.delimiters.thousands?"\\.":l.delimiters.thousands,!(null!==(u=e.match(/^[^\d]+/))&&(e=e.substr(1),u[0]!==o)||null!==(u=e.match(/[^\d]+$/))&&(e=e.slice(0,-1),u[0]!==a.thousand&&u[0]!==a.million&&u[0]!==a.billion&&u[0]!==a.trillion)||(c=new RegExp(r+"{2}"),e.match(/[^\d.,]/g)||(s=e.split(i)).length>2||(s.length<2?!s[0].match(/^\d+.*\d$/)||s[0].match(c):1===s[0].length?!s[0].match(/^\d+$/)||s[0].match(c)||!s[1].match(/^\d+$/):!s[0].match(/^\d+.*\d$/)||s[0].match(c)||!s[1].match(/^\d+$/))))},t.fn=e.prototype={clone:function(){return t(this)},format:function(e,n){var r,o,a,c=this._value,l=e||s.defaultFormat;if(n=n||Math.round,0===c&&null!==s.zeroFormat)o=s.zeroFormat;else if(null===c&&null!==s.nullFormat)o=s.nullFormat;else{for(r in i)if(l.match(i[r].regexps.format)){a=i[r].format;break}a=a||t._.numberToFormat,o=a(c,l,n)}return o},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var t=n.correctionFactor.call(null,this._value,e);return this._value=n.reduce([this._value,e],function(e,n,i,r){return e+Math.round(t*n)},0)/t,this},subtract:function(e){var t=n.correctionFactor.call(null,this._value,e);return this._value=n.reduce([e],function(e,n,i,r){return e-Math.round(t*n)},Math.round(this._value*t))/t,this},multiply:function(e){return this._value=n.reduce([this._value,e],function(e,t,i,r){var o=n.correctionFactor(e,t);return Math.round(e*o)*Math.round(t*o)/Math.round(o*o)},1),this},divide:function(e){return this._value=n.reduce([this._value,e],function(e,t,i,r){var o=n.correctionFactor(e,t);return Math.round(e*o)/Math.round(t*o)}),this},difference:function(e){return Math.abs(t(this._value).subtract(e).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(e,n,i){var r,o=t._.includes(n," BPS")?" ":"";return e*=1e4,n=n.replace(/\s?BPS/,""),r=t._.numberToFormat(e,n,i),t._.includes(r,")")?((r=r.split("")).splice(-1,0,o+"BPS"),r=r.join("")):r=r+o+"BPS",r},unformat:function(e){return+(1e-4*t._.stringToNumber(e)).toFixed(15)}}),function(){var e={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},n={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},i=e.suffixes.concat(n.suffixes.filter(function(t){return e.suffixes.indexOf(t)<0})),r=i.join("|");r="("+r.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(r)},format:function(i,r,o){var s,a,c,l=t._.includes(r,"ib")?n:e,u=t._.includes(r," b")||t._.includes(r," ib")?" ":"";for(r=r.replace(/\s?i?b/,""),s=0;s<=l.suffixes.length;s++)if(a=Math.pow(l.base,s),c=Math.pow(l.base,s+1),null===i||0===i||i>=a&&c>i){u+=l.suffixes[s],a>0&&(i/=a);break}return t._.numberToFormat(i,r,o)+u},unformat:function(i){var r,o,s=t._.stringToNumber(i);if(s){for(r=e.suffixes.length-1;r>=0;r--){if(t._.includes(i,e.suffixes[r])){o=Math.pow(e.base,r);break}if(t._.includes(i,n.suffixes[r])){o=Math.pow(n.base,r);break}}s*=o||1}return s}})}(),t.register("format","currency",{regexps:{format:/(\$)/},format:function(e,n,i){var r,o,s=t.locales[t.options.currentLocale],a={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),r=t._.numberToFormat(e,n,i),e>=0?(a.before=a.before.replace(/[\-\(]/,""),a.after=a.after.replace(/[\-\)]/,"")):0>e&&!t._.includes(a.before,"-")&&!t._.includes(a.before,"(")&&(a.before="-"+a.before),o=0;o<a.before.length;o++)switch(a.before[o]){case"$":r=t._.insert(r,s.currency.symbol,o);break;case" ":r=t._.insert(r," ",o+s.currency.symbol.length-1)}for(o=a.after.length-1;o>=0;o--)switch(a.after[o]){case"$":r=o===a.after.length-1?r+s.currency.symbol:t._.insert(r,s.currency.symbol,-(a.after.length-(1+o)));break;case" ":r=o===a.after.length-1?r+" ":t._.insert(r," ",-(a.after.length-(1+o)+s.currency.symbol.length-1))}return r}}),t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(e,n,i){var r="number"!=typeof e||t._.isNaN(e)?"0e+0":e.toExponential(),o=r.split("e");return n=n.replace(/e[\+|\-]{1}0/,""),t._.numberToFormat(Number(o[0]),n,i)+"e"+o[1]},unformat:function(e){var n=t._.includes(e,"e+")?e.split("e+"):e.split("e-"),i=Number(n[0]),r=Number(n[1]);return r=t._.includes(e,"e-")?r*=-1:r,t._.reduce([i,Math.pow(10,r)],function(e,n,i,r){var o=t._.correctionFactor(e,n);return e*o*(n*o)/(o*o)},1)}}),t.register("format","ordinal",{regexps:{format:/(o)/},format:function(e,n,i){var r=t.locales[t.options.currentLocale],o=t._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),o+=r.ordinal(e),t._.numberToFormat(e,n,i)+o}}),t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(e,n,i){var r,o=t._.includes(n," %")?" ":"";return t.options.scalePercentBy100&&(e*=100),n=n.replace(/\s?\%/,""),r=t._.numberToFormat(e,n,i),t._.includes(r,")")?((r=r.split("")).splice(-1,0,o+"%"),r=r.join("")):r=r+o+"%",r},unformat:function(e){var n=t._.stringToNumber(e);return t.options.scalePercentBy100?.01*n:n}}),t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var i=Math.floor(e/60/60),r=Math.floor((e-60*i*60)/60),o=Math.round(e-60*i*60-60*r);return i+":"+(10>r?"0"+r:r)+":"+(10>o?"0"+o:o)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),t})?i.call(t,n,t,e):i)||(e.exports=r)},,,,,,,,,,function(e,t,n){"use strict";var i,r,o,s,a,c=9e15,l=1e9,u="0123456789abcdef",h="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",d="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",f={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-c,maxE:c,crypto:!1},p=!0,g="[DecimalError] ",m=g+"Invalid argument: ",v=g+"Precision limit exceeded",y=g+"crypto unavailable",b=Math.floor,w=Math.pow,x=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,k=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,C=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,E=1e7,A=7,S=h.length-1,F=d.length-1,T={};function D(e){var t,n,i,r=e.length-1,o="",s=e[0];if(r>0){for(o+=s,t=1;t<r;t++)i=e[t]+"",(n=A-i.length)&&(o+=W(n)),o+=i;s=e[t],(n=A-(i=s+"").length)&&(o+=W(n))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function L(e,t,n){if(e!==~~e||e<t||e>n)throw Error(m+e)}function P(e,t,n,i){var r,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=A,r=0):(r=Math.ceil((t+1)/A),t%=A),o=w(10,A-t),a=e[r]%o|0,null==i?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),s=n<4&&99999==a||n>3&&49999==a||5e4==a||0==a):s=(n<4&&a+1==o||n>3&&a+1==o/2)&&(e[r+1]/o/100|0)==w(10,t-2)-1||(a==o/2||0==a)&&0==(e[r+1]/o/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),s=(i||n<4)&&9999==a||!i&&n>3&&4999==a):s=((i||n<4)&&a+1==o||!i&&n>3&&a+1==o/2)&&(e[r+1]/o/1e3|0)==w(10,t-3)-1,s}function R(e,t,n){for(var i,r,o=[0],s=0,a=e.length;s<a;){for(r=o.length;r--;)o[r]*=t;for(o[0]+=u.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>n-1&&(void 0===o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}T.absoluteValue=T.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),B(e)},T.ceil=function(){return B(new this.constructor(this),this.e+1,2)},T.comparedTo=T.cmp=function(e){var t,n,i,r,o=this,s=o.d,a=(e=new o.constructor(e)).d,c=o.s,l=e.s;if(!s||!a)return c&&l?c!==l?c:s===a?0:!s^c<0?1:-1:NaN;if(!s[0]||!a[0])return s[0]?c:a[0]?-l:0;if(c!==l)return c;if(o.e!==e.e)return o.e>e.e^c<0?1:-1;for(t=0,n=(i=s.length)<(r=a.length)?i:r;t<n;++t)if(s[t]!==a[t])return s[t]>a[t]^c<0?1:-1;return i===r?0:i>r^c<0?1:-1},T.cosine=T.cos=function(){var e,t,n=this,i=n.constructor;return n.d?n.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+A,i.rounding=1,n=function(e,t){var n,i,r=t.d.length;r<32?(n=Math.ceil(r/3),i=Math.pow(4,-n).toString()):(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=X(e,1,t.times(i),new e(1));for(var o=n;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=n,t}(i,Z(i,n)),i.precision=e,i.rounding=t,B(2==a||3==a?n.neg():n,e,t,!0)):new i(1):new i(NaN)},T.cubeRoot=T.cbrt=function(){var e,t,n,i,r,o,s,a,c,l,u=this,h=u.constructor;if(!u.isFinite()||u.isZero())return new h(u);for(p=!1,(o=u.s*Math.pow(u.s*u,1/3))&&Math.abs(o)!=1/0?i=new h(o.toString()):(n=D(u.d),(o=((e=u.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Math.pow(n,1/3),e=b((e+1)/3)-(e%3==(e<0?-1:2)),(i=new h(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=u.s),s=(e=h.precision)+3;;)if(l=(c=(a=i).times(a).times(a)).plus(u),i=M(l.plus(u).times(a),l.plus(c),s+2,1),D(a.d).slice(0,s)===(n=D(i.d)).slice(0,s)){if("9999"!=(n=n.slice(s-3,s+1))&&(r||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(B(i,e+1,1),t=!i.times(i).times(i).eq(u));break}if(!r&&(B(a,e+1,0),a.times(a).times(a).eq(u))){i=a;break}s+=4,r=1}return p=!0,B(i,e,h.rounding,t)},T.decimalPlaces=T.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-b(this.e/A))*A,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},T.dividedBy=T.div=function(e){return M(this,new this.constructor(e))},T.dividedToIntegerBy=T.divToInt=function(e){var t=this.constructor;return B(M(this,new t(e),0,1,1),t.precision,t.rounding)},T.equals=T.eq=function(e){return 0===this.cmp(e)},T.floor=function(){return B(new this.constructor(this),this.e+1,3)},T.greaterThan=T.gt=function(e){return this.cmp(e)>0},T.greaterThanOrEqualTo=T.gte=function(e){var t=this.cmp(e);return 1==t||0===t},T.hyperbolicCosine=T.cosh=function(){var e,t,n,i,r,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;n=s.precision,i=s.rounding,s.precision=n+Math.max(o.e,o.sd())+4,s.rounding=1,(r=o.d.length)<32?(e=Math.ceil(r/3),t=Math.pow(4,-e).toString()):(e=16,t="2.3283064365386962890625e-10"),o=X(s,1,o.times(t),new s(1),!0);for(var c,l=e,u=new s(8);l--;)c=o.times(o),o=a.minus(c.times(u.minus(c.times(u))));return B(o,s.precision=n,s.rounding=i,!0)},T.hyperbolicSine=T.sinh=function(){var e,t,n,i,r=this,o=r.constructor;if(!r.isFinite()||r.isZero())return new o(r);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(r.e,r.sd())+4,o.rounding=1,(i=r.d.length)<3)r=X(o,2,r,r,!0);else{e=(e=1.4*Math.sqrt(i))>16?16:0|e,r=X(o,2,r=r.times(Math.pow(5,-e)),r,!0);for(var s,a=new o(5),c=new o(16),l=new o(20);e--;)s=r.times(r),r=r.times(a.plus(s.times(c.times(s).plus(l))))}return o.precision=t,o.rounding=n,B(r,t,n,!0)},T.hyperbolicTangent=T.tanh=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,M(n.sinh(),n.cosh(),i.precision=e,i.rounding=t)):new i(n.s)},T.inverseCosine=T.acos=function(){var e,t=this,n=t.constructor,i=t.abs().cmp(1),r=n.precision,o=n.rounding;return-1!==i?0===i?t.isNeg()?$(n,r,o):new n(0):new n(NaN):t.isZero()?$(n,r+4,o).times(.5):(n.precision=r+6,n.rounding=1,t=t.asin(),e=$(n,r+4,o).times(.5),n.precision=r,n.rounding=o,e.minus(t))},T.inverseHyperbolicCosine=T.acosh=function(){var e,t,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,p=!1,n=n.times(n).minus(1).sqrt().plus(n),p=!0,i.precision=e,i.rounding=t,n.ln()):new i(n)},T.inverseHyperbolicSine=T.asinh=function(){var e,t,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,p=!1,n=n.times(n).plus(1).sqrt().plus(n),p=!0,i.precision=e,i.rounding=t,n.ln())},T.inverseHyperbolicTangent=T.atanh=function(){var e,t,n,i,r=this,o=r.constructor;return r.isFinite()?r.e>=0?new o(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=o.precision,t=o.rounding,i=r.sd(),Math.max(i,e)<2*-r.e-1?B(new o(r),e,t,!0):(o.precision=n=i-r.e,r=M(r.plus(1),new o(1).minus(r),n+e,1),o.precision=e+4,o.rounding=1,r=r.ln(),o.precision=e,o.rounding=t,r.times(.5))):new o(NaN)},T.inverseSine=T.asin=function(){var e,t,n,i,r=this,o=r.constructor;return r.isZero()?new o(r):(t=r.abs().cmp(1),n=o.precision,i=o.rounding,-1!==t?0===t?((e=$(o,n+4,i).times(.5)).s=r.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,r=r.div(new o(1).minus(r.times(r)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=i,r.times(2)))},T.inverseTangent=T.atan=function(){var e,t,n,i,r,o,s,a,c,l=this,u=l.constructor,h=u.precision,d=u.rounding;if(l.isFinite()){if(l.isZero())return new u(l);if(l.abs().eq(1)&&h+4<=F)return(s=$(u,h+4,d).times(.25)).s=l.s,s}else{if(!l.s)return new u(NaN);if(h+4<=F)return(s=$(u,h+4,d).times(.5)).s=l.s,s}for(u.precision=a=h+10,u.rounding=1,e=n=Math.min(28,a/A+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(p=!1,t=Math.ceil(a/A),i=1,c=l.times(l),s=new u(l),r=l;-1!==e;)if(r=r.times(c),o=s.minus(r.div(i+=2)),r=r.times(c),void 0!==(s=o.plus(r.div(i+=2))).d[t])for(e=t;s.d[e]===o.d[e]&&e--;);return n&&(s=s.times(2<<n-1)),p=!0,B(s,u.precision=h,u.rounding=d,!0)},T.isFinite=function(){return!!this.d},T.isInteger=T.isInt=function(){return!!this.d&&b(this.e/A)>this.d.length-2},T.isNaN=function(){return!this.s},T.isNegative=T.isNeg=function(){return this.s<0},T.isPositive=T.isPos=function(){return this.s>0},T.isZero=function(){return!!this.d&&0===this.d[0]},T.lessThan=T.lt=function(e){return this.cmp(e)<0},T.lessThanOrEqualTo=T.lte=function(e){return this.cmp(e)<1},T.logarithm=T.log=function(e){var t,n,i,r,o,s,a,c,l=this.constructor,u=l.precision,h=l.rounding;if(null==e)e=new l(10),t=!0;else{if(n=(e=new l(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new l(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(r=n[0];r%10==0;)r/=10;o=1!==r}if(p=!1,s=K(this,a=u+5),i=t?I(l,a+10):K(e,a),P((c=M(s,i,a,1)).d,r=u,h))do{if(s=K(this,a+=10),i=t?I(l,a+10):K(e,a),c=M(s,i,a,1),!o){+D(c.d).slice(r+1,r+15)+1==1e14&&(c=B(c,u+1,0));break}}while(P(c.d,r+=10,h));return p=!0,B(c,u,h)},T.minus=T.sub=function(e){var t,n,i,r,o,s,a,c,l,u,h,d,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return f.s&&e.s?f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN):e=new g(NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(l=f.d,d=e.d,a=g.precision,c=g.rounding,!l[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!l[0])return new g(3===c?-0:0);e=new g(f)}return p?B(e,a,c):e}if(n=b(e.e/A),u=b(f.e/A),l=l.slice(),o=u-n){for((h=o<0)?(t=l,o=-o,s=d.length):(t=d,n=u,s=l.length),o>(i=Math.max(Math.ceil(a/A),s)+2)&&(o=i,t.length=1),t.reverse(),i=o;i--;)t.push(0);t.reverse()}else{for((h=(i=l.length)<(s=d.length))&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){h=l[i]<d[i];break}o=0}for(h&&(t=l,l=d,d=t,e.s=-e.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>o;){if(l[--i]<d[i]){for(r=i;r&&0===l[--r];)l[r]=E-1;--l[r],l[i]+=E}l[i]-=d[i]}for(;0===l[--s];)l.pop();for(;0===l[0];l.shift())--n;return l[0]?(e.d=l,e.e=j(l,n),p?B(e,a,c):e):new g(3===c?-0:0)},T.modulo=T.mod=function(e){var t,n=this,i=n.constructor;return e=new i(e),!n.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||n.d&&!n.d[0]?B(new i(n),i.precision,i.rounding):(p=!1,9==i.modulo?(t=M(n,e.abs(),0,3,1)).s*=e.s:t=M(n,e,0,i.modulo,1),t=t.times(e),p=!0,n.minus(t))},T.naturalExponential=T.exp=function(){return U(this)},T.naturalLogarithm=T.ln=function(){return K(this)},T.negated=T.neg=function(){var e=new this.constructor(this);return e.s=-e.s,B(e)},T.plus=T.add=function(e){var t,n,i,r,o,s,a,c,l,u,h=this,d=h.constructor;if(e=new d(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new d(e.d||h.s===e.s?h:NaN)):e=new d(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(l=h.d,u=e.d,a=d.precision,c=d.rounding,!l[0]||!u[0])return u[0]||(e=new d(h)),p?B(e,a,c):e;if(o=b(h.e/A),i=b(e.e/A),l=l.slice(),r=o-i){for(r<0?(n=l,r=-r,s=u.length):(n=u,i=o,s=l.length),r>(s=(o=Math.ceil(a/A))>s?o+1:s+1)&&(r=s,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for((s=l.length)-(r=u.length)<0&&(r=s,n=u,u=l,l=n),t=0;r;)t=(l[--r]=l[r]+u[r]+t)/E|0,l[r]%=E;for(t&&(l.unshift(t),++i),s=l.length;0==l[--s];)l.pop();return e.d=l,e.e=j(l,i),p?B(e,a,c):e},T.precision=T.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(m+e);return n.d?(t=N(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},T.round=function(){var e=this,t=e.constructor;return B(new t(e),e.e+1,t.rounding)},T.sine=T.sin=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+A,i.rounding=1,n=function(e,t){var n,i=t.d.length;if(i<3)return X(e,2,t,t);n=(n=1.4*Math.sqrt(i))>16?16:0|n,t=t.times(Math.pow(5,-n)),t=X(e,2,t,t);for(var r,o=new e(5),s=new e(16),a=new e(20);n--;)r=t.times(t),t=t.times(o.plus(r.times(s.times(r).minus(a))));return t}(i,Z(i,n)),i.precision=e,i.rounding=t,B(a>2?n.neg():n,e,t,!0)):new i(NaN)},T.squareRoot=T.sqrt=function(){var e,t,n,i,r,o,s=this,a=s.d,c=s.e,l=s.s,u=s.constructor;if(1!==l||!a||!a[0])return new u(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(p=!1,0==(l=Math.sqrt(+s))||l==1/0?(((t=D(a)).length+c)%2==0&&(t+="0"),l=Math.sqrt(t),c=b((c+1)/2)-(c<0||c%2),i=new u(t=l==1/0?"1e"+c:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+c)):i=new u(l.toString()),n=(c=u.precision)+3;;)if(i=(o=i).plus(M(s,o,n+2,1)).times(.5),D(o.d).slice(0,n)===(t=D(i.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(B(i,c+1,1),e=!i.times(i).eq(s));break}if(!r&&(B(o,c+1,0),o.times(o).eq(s))){i=o;break}n+=4,r=1}return p=!0,B(i,c,u.rounding,e)},T.tangent=T.tan=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,(n=n.sin()).s=1,n=M(n,new i(1).minus(n.times(n)).sqrt(),e+10,0),i.precision=e,i.rounding=t,B(2==a||4==a?n.neg():n,e,t,!0)):new i(NaN)},T.times=T.mul=function(e){var t,n,i,r,o,s,a,c,l,u=this,h=u.constructor,d=u.d,f=(e=new h(e)).d;if(e.s*=u.s,!(d&&d[0]&&f&&f[0]))return new h(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*e.s:e.s/0);for(n=b(u.e/A)+b(e.e/A),(c=d.length)<(l=f.length)&&(o=d,d=f,f=o,s=c,c=l,l=s),o=[],i=s=c+l;i--;)o.push(0);for(i=l;--i>=0;){for(t=0,r=c+i;r>i;)a=o[r]+f[i]*d[r-i-1]+t,o[r--]=a%E|0,t=a/E|0;o[r]=(o[r]+t)%E|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=j(o,n),p?B(e,h.precision,h.rounding):e},T.toBinary=function(e,t){return Q(this,2,e,t)},T.toDecimalPlaces=T.toDP=function(e,t){var n=this,i=n.constructor;return n=new i(n),void 0===e?n:(L(e,0,l),void 0===t?t=i.rounding:L(t,0,8),B(n,e+n.e+1,t))},T.toExponential=function(e,t){var n,i=this,r=i.constructor;return void 0===e?n=O(i,!0):(L(e,0,l),void 0===t?t=r.rounding:L(t,0,8),n=O(i=B(new r(i),e+1,t),!0,e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},T.toFixed=function(e,t){var n,i,r=this,o=r.constructor;return void 0===e?n=O(r):(L(e,0,l),void 0===t?t=o.rounding:L(t,0,8),n=O(i=B(new o(r),e+r.e+1,t),!1,e+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},T.toFraction=function(e){var t,n,i,r,o,s,a,c,l,u,h,d,f=this,g=f.d,v=f.constructor;if(!g)return new v(f);if(l=n=new v(1),s=(o=(t=new v(i=c=new v(0))).e=N(g)-f.e-1)%A,t.d[0]=w(10,s<0?A+s:s),null==e)e=o>0?t:l;else{if(!(a=new v(e)).isInt()||a.lt(l))throw Error(m+a);e=a.gt(t)?o>0?t:l:a}for(p=!1,a=new v(D(g)),u=v.precision,v.precision=o=g.length*A*2;h=M(a,t,0,1,1),1!=(r=n.plus(h.times(i))).cmp(e);)n=i,i=r,r=l,l=c.plus(h.times(r)),c=r,r=t,t=a.minus(h.times(r)),a=r;return r=M(e.minus(n),i,0,1,1),c=c.plus(r.times(l)),n=n.plus(r.times(i)),c.s=l.s=f.s,d=M(l,i,o,1).minus(f).abs().cmp(M(c,n,o,1).minus(f).abs())<1?[l,i]:[c,n],v.precision=u,p=!0,d},T.toHexadecimal=T.toHex=function(e,t){return Q(this,16,e,t)},T.toNearest=function(e,t){var n=this,i=n.constructor;if(n=new i(n),null==e){if(!n.d)return n;e=new i(1),t=i.rounding}else{if(e=new i(e),void 0!==t&&L(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(p=!1,t<4&&(t=[4,5,7,8][t]),n=M(n,e,0,t,1).times(e),p=!0,B(n)):(e.s=n.s,n=e),n},T.toNumber=function(){return+this},T.toOctal=function(e,t){return Q(this,8,e,t)},T.toPower=T.pow=function(e){var t,n,i,r,o,s,a=this,c=a.constructor,l=+(e=new c(e));if(!(a.d&&e.d&&a.d[0]&&e.d[0]))return new c(w(+a,l));if((a=new c(a)).eq(1))return a;if(i=c.precision,o=c.rounding,e.eq(1))return B(a,i,o);if((t=b(e.e/A))>=e.d.length-1&&(n=l<0?-l:l)<=9007199254740991)return r=z(c,a,n,i),e.s<0?new c(1).div(r):B(r,i,o);if((s=a.s)<0){if(t<e.d.length-1)return new c(NaN);if(0==(1&e.d[t])&&(s=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=s,a}return(t=0!=(n=w(+a,l))&&isFinite(n)?new c(n+"").e:b(l*(Math.log("0."+D(a.d))/Math.LN10+a.e+1)))>c.maxE+1||t<c.minE-1?new c(t>0?s/0:0):(p=!1,c.rounding=a.s=1,n=Math.min(12,(t+"").length),(r=U(e.times(K(a,i+n)),i)).d&&P((r=B(r,i+5,1)).d,i,o)&&(t=i+10,+D((r=B(U(e.times(K(a,t+n)),t),t+5,1)).d).slice(i+1,i+15)+1==1e14&&(r=B(r,i+1,0))),r.s=s,p=!0,c.rounding=o,B(r,i,o))},T.toPrecision=function(e,t){var n,i=this,r=i.constructor;return void 0===e?n=O(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(L(e,1,l),void 0===t?t=r.rounding:L(t,0,8),n=O(i=B(new r(i),e,t),e<=i.e||i.e<=r.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+n:n},T.toSignificantDigits=T.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(L(e,1,l),void 0===t?t=n.rounding:L(t,0,8)),B(new n(this),e,t)},T.toString=function(){var e=this,t=e.constructor,n=O(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},T.truncated=T.trunc=function(){return B(new this.constructor(this),this.e+1,1)},T.valueOf=T.toJSON=function(){var e=this,t=e.constructor,n=O(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var M=function(){function e(e,t,n){var i,r=0,o=e.length;for(e=e.slice();o--;)i=e[o]*t+r,e[o]=i%n|0,r=i/n|0;return r&&e.unshift(r),e}function t(e,t,n,i){var r,o;if(n!=i)o=n>i?1:-1;else for(r=o=0;r<n;r++)if(e[r]!=t[r]){o=e[r]>t[r]?1:-1;break}return o}function n(e,t,n,i){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*i+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(i,r,o,a,c,l){var u,h,d,f,p,g,m,v,y,w,x,_,k,C,S,F,T,D,L,P,R=i.constructor,M=i.s==r.s?1:-1,O=i.d,j=r.d;if(!(O&&O[0]&&j&&j[0]))return new R(i.s&&r.s&&(O?!j||O[0]!=j[0]:j)?O&&0==O[0]||!j?0*M:M/0:NaN);for(l?(p=1,h=i.e-r.e):(l=E,p=A,h=b(i.e/p)-b(r.e/p)),L=j.length,T=O.length,w=(y=new R(M)).d=[],d=0;j[d]==(O[d]||0);d++);if(j[d]>(O[d]||0)&&h--,null==o?(C=o=R.precision,a=R.rounding):C=c?o+(i.e-r.e)+1:o,C<0)w.push(1),g=!0;else{if(C=C/p+2|0,d=0,1==L){for(f=0,j=j[0],C++;(d<T||f)&&C--;d++)S=f*l+(O[d]||0),w[d]=S/j|0,f=S%j|0;g=f||d<T}else{for((f=l/(j[0]+1)|0)>1&&(j=e(j,f,l),O=e(O,f,l),L=j.length,T=O.length),F=L,_=(x=O.slice(0,L)).length;_<L;)x[_++]=0;(P=j.slice()).unshift(0),D=j[0],j[1]>=l/2&&++D;do{f=0,(u=t(j,x,L,_))<0?(k=x[0],L!=_&&(k=k*l+(x[1]||0)),(f=k/D|0)>1?(f>=l&&(f=l-1),1==(u=t(m=e(j,f,l),x,v=m.length,_=x.length))&&(f--,n(m,L<v?P:j,v,l))):(0==f&&(u=f=1),m=j.slice()),(v=m.length)<_&&m.unshift(0),n(x,m,_,l),-1==u&&(u=t(j,x,L,_=x.length))<1&&(f++,n(x,L<_?P:j,_,l)),_=x.length):0===u&&(f++,x=[0]),w[d++]=f,u&&x[0]?x[_++]=O[F]||0:(x=[O[F]],_=1)}while((F++<T||void 0!==x[0])&&C--);g=void 0!==x[0]}w[0]||w.shift()}if(1==p)y.e=h,s=g;else{for(d=1,f=w[0];f>=10;f/=10)d++;y.e=d+h*p-1,B(y,c?o+y.e+1:o,a,g)}return y}}();function B(e,t,n,i){var r,o,s,a,c,l,u,h,d,f=e.constructor;e:if(null!=t){if(!(h=e.d))return e;for(r=1,a=h[0];a>=10;a/=10)r++;if((o=t-r)<0)o+=A,s=t,c=(u=h[d=0])/w(10,r-s-1)%10|0;else if((d=Math.ceil((o+1)/A))>=(a=h.length)){if(!i)break e;for(;a++<=d;)h.push(0);u=c=0,r=1,s=(o%=A)-A+1}else{for(u=a=h[d],r=1;a>=10;a/=10)r++;c=(s=(o%=A)-A+r)<0?0:u/w(10,r-s-1)%10|0}if(i=i||t<0||void 0!==h[d+1]||(s<0?u:u%w(10,r-s-1)),l=n<4?(c||i)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||i||6==n&&(o>0?s>0?u/w(10,r-s):0:h[d-1])%10&1||n==(e.s<0?8:7)),t<1||!h[0])return h.length=0,l?(t-=e.e+1,h[0]=w(10,(A-t%A)%A),e.e=-t||0):h[0]=e.e=0,e;if(0==o?(h.length=d,a=1,d--):(h.length=d+1,a=w(10,A-o),h[d]=s>0?(u/w(10,r-s)%w(10,s)|0)*a:0),l)for(;;){if(0==d){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==E&&(h[0]=1));break}if(h[d]+=a,h[d]!=E)break;h[d--]=0,a=1}for(o=h.length;0===h[--o];)h.pop()}return p&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e<f.minE&&(e.e=0,e.d=[0])),e}function O(e,t,n){if(!e.isFinite())return G(e);var i,r=e.e,o=D(e.d),s=o.length;return t?(n&&(i=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+W(i):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):r<0?(o="0."+W(-r-1)+o,n&&(i=n-s)>0&&(o+=W(i))):r>=s?(o+=W(r+1-s),n&&(i=n-r-1)>0&&(o=o+"."+W(i))):((i=r+1)<s&&(o=o.slice(0,i)+"."+o.slice(i)),n&&(i=n-s)>0&&(r+1===s&&(o+="."),o+=W(i))),o}function j(e,t){var n=e[0];for(t*=A;n>=10;n/=10)t++;return t}function I(e,t,n){if(t>S)throw p=!0,n&&(e.precision=n),Error(v);return B(new e(r),t,1,!0)}function $(e,t,n){if(t>F)throw Error(v);return B(new e(o),t,n,!0)}function N(e){var t=e.length-1,n=t*A+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function W(e){for(var t="";e--;)t+="0";return t}function z(e,t,n,i){var r,o=new e(1),s=Math.ceil(i/A+4);for(p=!1;;){if(n%2&&J((o=o.times(t)).d,s)&&(r=!0),0===(n=b(n/2))){n=o.d.length-1,r&&0===o.d[n]&&++o.d[n];break}J((t=t.times(t)).d,s)}return p=!0,o}function H(e){return 1&e.d[e.d.length-1]}function V(e,t,n){for(var i,r=new e(t[0]),o=0;++o<t.length;){if(!(i=new e(t[o])).s){r=i;break}r[n](i)&&(r=i)}return r}function U(e,t){var n,i,r,o,s,a,c,l=0,u=0,h=0,d=e.constructor,f=d.rounding,g=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(p=!1,c=g):c=t,a=new d(.03125);e.e>-2;)e=e.times(a),h+=5;for(c+=i=Math.log(w(2,h))/Math.LN10*2+5|0,n=o=s=new d(1),d.precision=c;;){if(o=B(o.times(e),c,1),n=n.times(++u),D((a=s.plus(M(o,n,c,1))).d).slice(0,c)===D(s.d).slice(0,c)){for(r=h;r--;)s=B(s.times(s),c,1);if(null!=t)return d.precision=g,s;if(!(l<3&&P(s.d,c-i,f,l)))return B(s,d.precision=g,f,p=!0);d.precision=c+=10,n=o=a=new d(1),u=0,l++}s=a}}function K(e,t){var n,i,r,o,s,a,c,l,u,h,d,f=1,g=e,m=g.d,v=g.constructor,y=v.rounding,b=v.precision;if(g.s<0||!m||!m[0]||!g.e&&1==m[0]&&1==m.length)return new v(m&&!m[0]?-1/0:1!=g.s?NaN:m?0:g);if(null==t?(p=!1,u=b):u=t,v.precision=u+=10,i=(n=D(m)).charAt(0),!(Math.abs(o=g.e)<15e14))return l=I(v,u+2,b).times(o+""),g=K(new v(i+"."+n.slice(1)),u-10).plus(l),v.precision=b,null==t?B(g,b,y,p=!0):g;for(;i<7&&1!=i||1==i&&n.charAt(1)>3;)i=(n=D((g=g.times(e)).d)).charAt(0),f++;for(o=g.e,i>1?(g=new v("0."+n),o++):g=new v(i+"."+n.slice(1)),h=g,c=s=g=M(g.minus(1),g.plus(1),u,1),d=B(g.times(g),u,1),r=3;;){if(s=B(s.times(d),u,1),D((l=c.plus(M(s,new v(r),u,1))).d).slice(0,u)===D(c.d).slice(0,u)){if(c=c.times(2),0!==o&&(c=c.plus(I(v,u+2,b).times(o+""))),c=M(c,new v(f),u,1),null!=t)return v.precision=b,c;if(!P(c.d,u-10,y,a))return B(c,v.precision=b,y,p=!0);v.precision=u+=10,l=s=g=M(h.minus(1),h.plus(1),u,1),d=B(g.times(g),u,1),r=a=1}c=l,r+=2}}function G(e){return String(e.s*e.s/0)}function q(e,t){var n,i,r;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;48===t.charCodeAt(i);i++);for(r=t.length;48===t.charCodeAt(r-1);--r);if(t=t.slice(i,r)){if(r-=i,e.e=n=n-i-1,e.d=[],i=(n+1)%A,n<0&&(i+=A),i<r){for(i&&e.d.push(+t.slice(0,i)),r-=A;i<r;)e.d.push(+t.slice(i,i+=A));t=t.slice(i),i=A-t.length}else i-=r;for(;i--;)t+="0";e.d.push(+t),p&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Y(e,t){var n,r,o,s,a,c,l,u,h;if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(_.test(t))n=16,t=t.toLowerCase();else if(x.test(t))n=2;else{if(!k.test(t))throw Error(m+t);n=8}for((s=t.search(/p/i))>0?(l=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),a=(s=t.indexOf("."))>=0,r=e.constructor,a&&(s=(c=(t=t.replace(".","")).length)-s,o=z(r,new r(n),s,2*s)),s=h=(u=R(t,n,E)).length-1;0===u[s];--s)u.pop();return s<0?new r(0*e.s):(e.e=j(u,h),e.d=u,p=!1,a&&(e=M(e,o,4*c)),l&&(e=e.times(Math.abs(l)<54?Math.pow(2,l):i.pow(2,l))),p=!0,e)}function X(e,t,n,i,r){var o,s,a,c,l=e.precision,u=Math.ceil(l/A);for(p=!1,c=n.times(n),a=new e(i);;){if(s=M(a.times(c),new e(t++*t++),l,1),a=r?i.plus(s):i.minus(s),i=M(s.times(c),new e(t++*t++),l,1),void 0!==(s=a.plus(i)).d[u]){for(o=u;s.d[o]===a.d[o]&&o--;);if(-1==o)break}o=a,a=i,i=s,s=o,0}return p=!0,s.d.length=u+1,s}function Z(e,t){var n,i=t.s<0,r=$(e,e.precision,1),o=r.times(.5);if((t=t.abs()).lte(o))return a=i?4:1,t;if((n=t.divToInt(r)).isZero())a=i?3:2;else{if((t=t.minus(n.times(r))).lte(o))return a=H(n)?i?2:3:i?4:1,t;a=H(n)?i?1:4:i?3:2}return t.minus(r).abs()}function Q(e,t,n,i){var r,o,a,c,h,d,f,p,g,m=e.constructor,v=void 0!==n;if(v?(L(n,1,l),void 0===i?i=m.rounding:L(i,0,8)):(n=m.precision,i=m.rounding),e.isFinite()){for(a=(f=O(e)).indexOf("."),v?(r=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):r=t,a>=0&&(f=f.replace(".",""),(g=new m(1)).e=f.length-a,g.d=R(O(g),10,r),g.e=g.d.length),o=h=(p=R(f,10,r)).length;0==p[--h];)p.pop();if(p[0]){if(a<0?o--:((e=new m(e)).d=p,e.e=o,p=(e=M(e,g,n,i,0,r)).d,o=e.e,d=s),a=p[n],c=r/2,d=d||void 0!==p[n+1],d=i<4?(void 0!==a||d)&&(0===i||i===(e.s<0?3:2)):a>c||a===c&&(4===i||d||6===i&&1&p[n-1]||i===(e.s<0?8:7)),p.length=n,d)for(;++p[--n]>r-1;)p[n]=0,n||(++o,p.unshift(1));for(h=p.length;!p[h-1];--h);for(a=0,f="";a<h;a++)f+=u.charAt(p[a]);if(v){if(h>1)if(16==t||8==t){for(a=16==t?4:3,--h;h%a;h++)f+="0";for(h=(p=R(f,r,t)).length;!p[h-1];--h);for(a=1,f="1.";a<h;a++)f+=u.charAt(p[a])}else f=f.charAt(0)+"."+f.slice(1);f=f+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)f="0"+f;f="0."+f}else if(++o>h)for(o-=h;o--;)f+="0";else o<h&&(f=f.slice(0,o)+"."+f.slice(o))}else f=v?"0p+0":"0";f=(16==t?"0x":2==t?"0b":8==t?"0o":"")+f}else f=G(e);return e.s<0?"-"+f:f}function J(e,t){if(e.length>t)return e.length=t,!0}function ee(e){return new this(e).abs()}function te(e){return new this(e).acos()}function ne(e){return new this(e).acosh()}function ie(e,t){return new this(e).plus(t)}function re(e){return new this(e).asin()}function oe(e){return new this(e).asinh()}function se(e){return new this(e).atan()}function ae(e){return new this(e).atanh()}function ce(e,t){e=new this(e),t=new this(t);var n,i=this.precision,r=this.rounding,o=i+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?$(this,i,r):new this(0)).s=e.s:!e.d||t.isZero()?(n=$(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(M(e,t,o,1)),t=$(this,o,1),this.precision=i,this.rounding=r,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(M(e,t,o,1)):(n=$(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function le(e){return new this(e).cbrt()}function ue(e){return B(e=new this(e),e.e+1,2)}function he(e){if(!e||"object"!=typeof e)throw Error(g+"Object expected");var t,n,i,r=["precision",1,l,"rounding",0,8,"toExpNeg",-c,0,"toExpPos",0,c,"maxE",0,c,"minE",-c,0,"modulo",0,9];for(t=0;t<r.length;t+=3)if(void 0!==(i=e[n=r[t]])){if(!(b(i)===i&&i>=r[t+1]&&i<=r[t+2]))throw Error(m+n+": "+i);this[n]=i}if(void 0!==(i=e[n="crypto"])){if(!0!==i&&!1!==i&&0!==i&&1!==i)throw Error(m+n+": "+i);if(i){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(y);this[n]=!0}else this[n]=!1}return this}function de(e){return new this(e).cos()}function fe(e){return new this(e).cosh()}function pe(e,t){return new this(e).div(t)}function ge(e){return new this(e).exp()}function me(e){return B(e=new this(e),e.e+1,3)}function ve(){var e,t,n=new this(0);for(p=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return p=!0,new this(1/0);n=t}return p=!0,n.sqrt()}function ye(e){return new this(e).ln()}function be(e,t){return new this(e).log(t)}function we(e){return new this(e).log(2)}function xe(e){return new this(e).log(10)}function _e(){return V(this,arguments,"lt")}function ke(){return V(this,arguments,"gt")}function Ce(e,t){return new this(e).mod(t)}function Ee(e,t){return new this(e).mul(t)}function Ae(e,t){return new this(e).pow(t)}function Se(e){var t,n,i,r,o=0,s=new this(1),a=[];if(void 0===e?e=this.precision:L(e,1,l),i=Math.ceil(e/A),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));o<i;)(r=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=r%1e7;else{if(!crypto.randomBytes)throw Error(y);for(t=crypto.randomBytes(i*=4);o<i;)(r=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(a.push(r%1e7),o+=4);o=i/4}else for(;o<i;)a[o++]=1e7*Math.random()|0;for(i=a[--o],e%=A,i&&e&&(r=w(10,A-e),a[o]=(i/r|0)*r);0===a[o];o--)a.pop();if(o<0)n=0,a=[0];else{for(n=-1;0===a[0];n-=A)a.shift();for(i=1,r=a[0];r>=10;r/=10)i++;i<A&&(n-=A-i)}return s.e=n,s.d=a,s}function Fe(e){return B(e=new this(e),e.e+1,this.rounding)}function Te(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function De(e){return new this(e).sin()}function Le(e){return new this(e).sinh()}function Pe(e){return new this(e).sqrt()}function Re(e,t){return new this(e).sub(t)}function Me(e){return new this(e).tan()}function Be(e){return new this(e).tanh()}function Oe(e){return B(e=new this(e),e.e+1,1)}i=function e(t){var n,i,r;function o(e){var t,n,i,r=this;if(!(r instanceof o))return new o(e);if(r.constructor=o,e instanceof o)return r.s=e.s,r.e=e.e,void(r.d=(e=e.d)?e.slice():e);if("number"==(i=typeof e)){if(0===e)return r.s=1/e<0?-1:1,r.e=0,void(r.d=[0]);if(e<0?(e=-e,r.s=-1):r.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return r.e=t,void(r.d=[e])}return 0*e!=0?(e||(r.s=NaN),r.e=NaN,void(r.d=null)):q(r,e.toString())}if("string"!==i)throw Error(m+e);return 45===e.charCodeAt(0)?(e=e.slice(1),r.s=-1):r.s=1,C.test(e)?q(r,e):Y(r,e)}if(o.prototype=T,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=he,o.clone=e,o.abs=ee,o.acos=te,o.acosh=ne,o.add=ie,o.asin=re,o.asinh=oe,o.atan=se,o.atanh=ae,o.atan2=ce,o.cbrt=le,o.ceil=ue,o.cos=de,o.cosh=fe,o.div=pe,o.exp=ge,o.floor=me,o.hypot=ve,o.ln=ye,o.log=be,o.log10=xe,o.log2=we,o.max=_e,o.min=ke,o.mod=Ce,o.mul=Ee,o.pow=Ae,o.random=Se,o.round=Fe,o.sign=Te,o.sin=De,o.sinh=Le,o.sqrt=Pe,o.sub=Re,o.tan=Me,o.tanh=Be,o.trunc=Oe,void 0===t&&(t={}),t)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<r.length;)t.hasOwnProperty(i=r[n++])||(t[i]=this[i]);return o.config(t),o}(f),r=new i(h),o=new i(d),t.a=i},,,,,,,,,,,,,,,,,,function(e,t,n){var i;
|
||
/*!
|
||
* jQuery JavaScript Library v3.3.1
|
||
* https://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright JS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://jquery.org/license
|
||
*
|
||
* Date: 2018-01-20T17:24Z
|
||
*/
|
||
/*!
|
||
* jQuery JavaScript Library v3.3.1
|
||
* https://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright JS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://jquery.org/license
|
||
*
|
||
* Date: 2018-01-20T17:24Z
|
||
*/
|
||
!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,r){"use strict";var o=[],s=n.document,a=Object.getPrototypeOf,c=o.slice,l=o.concat,u=o.push,h=o.indexOf,d={},f=d.toString,p=d.hasOwnProperty,g=p.toString,m=g.call(Object),v={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},b=function(e){return null!=e&&e===e.window},w={type:!0,src:!0,noModule:!0};function x(e,t,n){var i,r=(t=t||s).createElement("script");if(r.text=e,n)for(i in w)n[i]&&(r[i]=n[i]);t.head.appendChild(r).parentNode.removeChild(r)}function _(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[f.call(e)]||"object":typeof e}var k=function(e,t){return new k.fn.init(e,t)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function E(e){var t=!!e&&"length"in e&&e.length,n=_(e);return!y(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}k.fn=k.prototype={jquery:"3.3.1",constructor:k,length:0,toArray:function(){return c.call(this)},get:function(e){return null==e?c.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},k.extend=k.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,c=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||y(s)||(s={}),a===c&&(s=this,a--);a<c;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],s!==(i=e[t])&&(l&&i&&(k.isPlainObject(i)||(r=Array.isArray(i)))?(r?(r=!1,o=n&&Array.isArray(n)?n:[]):o=n&&k.isPlainObject(n)?n:{},s[t]=k.extend(l,o,i)):void 0!==i&&(s[t]=i));return s},k.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==f.call(e))&&(!(t=a(e))||"function"==typeof(n=p.call(t,"constructor")&&t.constructor)&&g.call(n)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){x(e)},each:function(e,t){var n,i=0;if(E(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:h.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,s=!n;r<o;r++)!t(e[r],r)!==s&&i.push(e[r]);return i},map:function(e,t,n){var i,r,o=0,s=[];if(E(e))for(i=e.length;o<i;o++)null!=(r=t(e[o],o,n))&&s.push(r);else for(o in e)null!=(r=t(e[o],o,n))&&s.push(r);return l.apply([],s)},guid:1,support:v}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=o[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()});var A=
|
||
/*!
|
||
* Sizzle CSS Selector Engine v2.3.3
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright jQuery Foundation and other contributors
|
||
* Released under the MIT license
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: 2016-08-08
|
||
*/
|
||
function(e){var t,n,i,r,o,s,a,c,l,u,h,d,f,p,g,m,v,y,b,w="sizzle"+1*new Date,x=e.document,_=0,k=0,C=se(),E=se(),A=se(),S=function(e,t){return e===t&&(h=!0),0},F={}.hasOwnProperty,T=[],D=T.pop,L=T.push,P=T.push,R=T.slice,M=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",O="[\\x20\\t\\r\\n\\f]",j="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+O+"*("+j+")(?:"+O+"*([*^$|!~]?=)"+O+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+j+"))|)"+O+"*\\]",$=":("+j+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",N=new RegExp(O+"+","g"),W=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),z=new RegExp("^"+O+"*,"+O+"*"),H=new RegExp("^"+O+"*([>+~]|"+O+")"+O+"*"),V=new RegExp("="+O+"*([^\\]'\"]*?)"+O+"*\\]","g"),U=new RegExp($),K=new RegExp("^"+j+"$"),G={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},q=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,J=new RegExp("\\\\([\\da-f]{1,6}"+O+"?|("+O+")|.)","ig"),ee=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){d()},re=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{P.apply(T=R.call(x.childNodes),x.childNodes),T[x.childNodes.length].nodeType}catch(e){P={apply:T.length?function(e,t){L.apply(e,R.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function oe(e,t,i,r){var o,a,l,u,h,p,v,y=t&&t.ownerDocument,_=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==_&&9!==_&&11!==_)return i;if(!r&&((t?t.ownerDocument||t:x)!==f&&d(t),t=t||f,g)){if(11!==_&&(h=Z.exec(e)))if(o=h[1]){if(9===_){if(!(l=t.getElementById(o)))return i;if(l.id===o)return i.push(l),i}else if(y&&(l=y.getElementById(o))&&b(t,l)&&l.id===o)return i.push(l),i}else{if(h[2])return P.apply(i,t.getElementsByTagName(e)),i;if((o=h[3])&&n.getElementsByClassName&&t.getElementsByClassName)return P.apply(i,t.getElementsByClassName(o)),i}if(n.qsa&&!A[e+" "]&&(!m||!m.test(e))){if(1!==_)y=t,v=e;else if("object"!==t.nodeName.toLowerCase()){for((u=t.getAttribute("id"))?u=u.replace(te,ne):t.setAttribute("id",u=w),a=(p=s(e)).length;a--;)p[a]="#"+u+" "+ve(p[a]);v=p.join(","),y=Q.test(e)&&ge(t.parentNode)||t}if(v)try{return P.apply(i,y.querySelectorAll(v)),i}catch(e){}finally{u===w&&t.removeAttribute("id")}}}return c(e.replace(W,"$1"),t,i,r)}function se(){var e=[];return function t(n,r){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function ae(e){return e[w]=!0,e}function ce(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=t}function ue(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function de(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function fe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&re(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function pe(e){return ae(function(t){return t=+t,ae(function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=oe.setDocument=function(e){var t,r,s=e?e.ownerDocument||e:x;return s!==f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,g=!o(f),x!==f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ie,!1):r.attachEvent&&r.attachEvent("onunload",ie)),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=X.test(f.getElementsByClassName),n.getById=ce(function(e){return p.appendChild(e).id=w,!f.getElementsByName||!f.getElementsByName(w).length}),n.getById?(i.filter.ID=function(e){var t=e.replace(J,ee);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(J,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=X.test(f.querySelectorAll))&&(ce(function(e){p.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+O+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+O+"*(?:value|"+B+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+O+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=X.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",$)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=X.test(p.compareDocumentPosition),b=t||X.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=t?function(e,t){if(e===t)return h=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e===f||e.ownerDocument===x&&b(x,e)?-1:t===f||t.ownerDocument===x&&b(x,t)?1:u?M(u,e)-M(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return h=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e===f?-1:t===f?1:r?-1:o?1:u?M(u,e)-M(u,t):0;if(r===o)return ue(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?ue(s[i],a[i]):s[i]===x?-1:a[i]===x?1:0},f):f},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&d(e),t=t.replace(V,"='$1']"),n.matchesSelector&&g&&!A[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var i=y.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return oe(t,f,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==f&&d(e),b(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==f&&d(e);var r=i.attrHandle[t.toLowerCase()],o=r&&F.call(i.attrHandle,t.toLowerCase())?r(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,i=[],r=0,o=0;if(h=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(S),h){for(;t=e[o++];)t===e[o]&&(r=i.push(o));for(;r--;)e.splice(i[r],1)}return u=null,e},r=oe.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=r(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=r(t);return n},(i=oe.selectors={cacheLength:50,createPseudo:ae,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(J,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var r=oe.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(N," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,c){var l,u,h,d,f,p,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!c&&!a,b=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(b=(f=(l=(u=(h=(d=m)[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===_&&l[1])&&l[2],d=f&&m.childNodes[f];d=++f&&d&&d[g]||(b=f=0)||p.pop();)if(1===d.nodeType&&++b&&d===t){u[e]=[_,f,b];break}}else if(y&&(b=f=(l=(u=(h=(d=t)[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]||[])[0]===_&&l[1]),!1===b)for(;(d=++f&&d&&d[g]||(b=f=0)||p.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&((u=(h=d[w]||(d[w]={}))[d.uniqueID]||(h[d.uniqueID]={}))[e]=[_,b]),d!==t)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return r[w]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,n){for(var i,o=r(e,t),s=o.length;s--;)e[i=M(e,o[s])]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ae(function(e){var t=[],n=[],i=a(e.replace(W,"$1"));return i[w]?ae(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:ae(function(e){return function(t){return oe(e,t).length>0}}),contains:ae(function(e){return e=e.replace(J,ee),function(t){return(t.textContent||t.innerText||r(t)).indexOf(e)>-1}}),lang:ae(function(e){return K.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(J,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:pe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:pe(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:pe(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=he(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=de(t);function me(){}function ve(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function ye(e,t,n){var i=t.dir,r=t.next,o=r||i,s=n&&"parentNode"===o,a=k++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||s)return e(t,n,r);return!1}:function(t,n,c){var l,u,h,d=[_,a];if(c){for(;t=t[i];)if((1===t.nodeType||s)&&e(t,n,c))return!0}else for(;t=t[i];)if(1===t.nodeType||s)if(u=(h=t[w]||(t[w]={}))[t.uniqueID]||(h[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((l=u[o])&&l[0]===_&&l[1]===a)return d[2]=l[2];if(u[o]=d,d[2]=e(t,n,c))return!0}return!1}}function be(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function we(e,t,n,i,r){for(var o,s=[],a=0,c=e.length,l=null!=t;a<c;a++)(o=e[a])&&(n&&!n(o,i,r)||(s.push(o),l&&t.push(a)));return s}function xe(e,t,n,i,r,o){return i&&!i[w]&&(i=xe(i)),r&&!r[w]&&(r=xe(r,o)),ae(function(o,s,a,c){var l,u,h,d=[],f=[],p=s.length,g=o||function(e,t,n){for(var i=0,r=t.length;i<r;i++)oe(e,t[i],n);return n}(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:we(g,d,e,a,c),v=n?r||(o?e:p||i)?[]:s:m;if(n&&n(m,v,a,c),i)for(l=we(v,f),i(l,[],a,c),u=l.length;u--;)(h=l[u])&&(v[f[u]]=!(m[f[u]]=h));if(o){if(r||e){if(r){for(l=[],u=v.length;u--;)(h=v[u])&&l.push(m[u]=h);r(null,v=[],l,c)}for(u=v.length;u--;)(h=v[u])&&(l=r?M(o,h):d[u])>-1&&(o[l]=!(s[l]=h))}}else v=we(v===s?v.splice(p,v.length):v),r?r(null,s,v,c):P.apply(s,v)})}function _e(e){for(var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],c=s?1:0,u=ye(function(e){return e===t},a,!0),h=ye(function(e){return M(t,e)>-1},a,!0),d=[function(e,n,i){var r=!s&&(i||n!==l)||((t=n).nodeType?u(e,n,i):h(e,n,i));return t=null,r}];c<o;c++)if(n=i.relative[e[c].type])d=[ye(be(d),n)];else{if((n=i.filter[e[c].type].apply(null,e[c].matches))[w]){for(r=++c;r<o&&!i.relative[e[r].type];r++);return xe(c>1&&be(d),c>1&&ve(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(W,"$1"),n,c<r&&_e(e.slice(c,r)),r<o&&_e(e=e.slice(r)),r<o&&ve(e))}d.push(n)}return be(d)}return me.prototype=i.filters=i.pseudos,i.setFilters=new me,s=oe.tokenize=function(e,t){var n,r,o,s,a,c,l,u=E[e+" "];if(u)return t?0:u.slice(0);for(a=e,c=[],l=i.preFilter;a;){for(s in n&&!(r=z.exec(a))||(r&&(a=a.slice(r[0].length)||a),c.push(o=[])),n=!1,(r=H.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),a=a.slice(n.length)),i.filter)!(r=G[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?oe.error(e):E(e,c).slice(0)},a=oe.compile=function(e,t){var n,r=[],o=[],a=A[e+" "];if(!a){for(t||(t=s(e)),n=t.length;n--;)(a=_e(t[n]))[w]?r.push(a):o.push(a);(a=A(e,function(e,t){var n=t.length>0,r=e.length>0,o=function(o,s,a,c,u){var h,p,m,v=0,y="0",b=o&&[],w=[],x=l,k=o||r&&i.find.TAG("*",u),C=_+=null==x?1:Math.random()||.1,E=k.length;for(u&&(l=s===f||s||u);y!==E&&null!=(h=k[y]);y++){if(r&&h){for(p=0,s||h.ownerDocument===f||(d(h),a=!g);m=e[p++];)if(m(h,s||f,a)){c.push(h);break}u&&(_=C)}n&&((h=!m&&h)&&v--,o&&b.push(h))}if(v+=y,n&&y!==v){for(p=0;m=t[p++];)m(b,w,s,a);if(o){if(v>0)for(;y--;)b[y]||w[y]||(w[y]=D.call(c));w=we(w)}P.apply(c,w),u&&!o&&w.length>0&&v+t.length>1&&oe.uniqueSort(c)}return u&&(_=C,l=x),b};return n?ae(o):o}(o,r))).selector=e}return a},c=oe.select=function(e,t,n,r){var o,c,l,u,h,d="function"==typeof e&&e,f=!r&&s(e=d.selector||e);if(n=n||[],1===f.length){if((c=f[0]=f[0].slice(0)).length>2&&"ID"===(l=c[0]).type&&9===t.nodeType&&g&&i.relative[c[1].type]){if(!(t=(i.find.ID(l.matches[0].replace(J,ee),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(c.shift().value.length)}for(o=G.needsContext.test(e)?0:c.length;o--&&(l=c[o],!i.relative[u=l.type]);)if((h=i.find[u])&&(r=h(l.matches[0].replace(J,ee),Q.test(c[0].type)&&ge(t.parentNode)||t))){if(c.splice(o,1),!(e=r.length&&ve(c)))return P.apply(n,r),n;break}}return(d||a(e,f))(r,t,!g,n,!t||Q.test(e)&&ge(t.parentNode)||t),n},n.sortStable=w.split("").sort(S).join("")===w,n.detectDuplicates=!!h,d(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||le(B,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),oe}(n);k.find=A,k.expr=A.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=A.uniqueSort,k.text=A.getText,k.isXMLDoc=A.isXML,k.contains=A.contains,k.escapeSelector=A.escape;var S=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&k(e).is(n))break;i.push(e)}return i},F=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},T=k.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var L=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(e,t,n){return y(t)?k.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?k.grep(e,function(e){return e===t!==n}):"string"!=typeof t?k.grep(e,function(e){return h.call(t,e)>-1!==n}):k.filter(t,e,n)}k.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?k.find.matchesSelector(i,e)?[i]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<i;t++)if(k.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)k.find(e,r[t],n);return i>1?k.uniqueSort(n):n},filter:function(e){return this.pushStack(P(this,e||[],!1))},not:function(e){return this.pushStack(P(this,e||[],!0))},is:function(e){return!!P(this,"string"==typeof e&&T.test(e)?k(e):e||[],!1).length}});var R,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||R,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:M.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:s,!0)),L.test(i[1])&&k.isPlainObject(t))for(i in t)y(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=s.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,R=k(s);var B=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,o=[],s="string"!=typeof e&&k(e);if(!T.test(e))for(;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?h.call(k(e),this[0]):h.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return S(e,"parentNode")},parentsUntil:function(e,t,n){return S(e,"parentNode",n)},next:function(e){return j(e,"nextSibling")},prev:function(e){return j(e,"previousSibling")},nextAll:function(e){return S(e,"nextSibling")},prevAll:function(e){return S(e,"previousSibling")},nextUntil:function(e,t,n){return S(e,"nextSibling",n)},prevUntil:function(e,t,n){return S(e,"previousSibling",n)},siblings:function(e){return F((e.parentNode||{}).firstChild,e)},children:function(e){return F(e.firstChild)},contents:function(e){return D(e,"iframe")?e.contentDocument:(D(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(e,t){k.fn[e]=function(n,i){var r=k.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=k.filter(i,r)),this.length>1&&(O[e]||k.uniqueSort(r),B.test(e)&&r.reverse()),this.pushStack(r)}});var I=/[^\x20\t\r\n\f]+/g;function $(e){return e}function N(e){throw e}function W(e,t,n,i){var r;try{e&&y(r=e.promise)?r.call(e).done(t).fail(n):e&&y(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(I)||[],function(e,n){t[n]=!0}),t}(e):k.extend({},e);var t,n,i,r,o=[],s=[],a=-1,c=function(){for(r=r||e.once,i=t=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=o.length,n=!1);e.memory||(n=!1),t=!1,r&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(a=o.length-1,s.push(n)),function t(n){k.each(n,function(n,i){y(i)?e.unique&&l.has(i)||o.push(i):i&&i.length&&"string"!==_(i)&&t(i)})}(arguments),n&&!t&&c()),this},remove:function(){return k.each(arguments,function(e,t){for(var n;(n=k.inArray(t,o,n))>-1;)o.splice(n,1),n<=a&&a--}),this},has:function(e){return e?k.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!i}};return l},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return k.Deferred(function(n){k.each(t,function(t,i){var r=y(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,i,r){var o=0;function s(e,t,i,r){return function(){var a=this,c=arguments,l=function(){var n,l;if(!(e<o)){if((n=i.apply(a,c))===t.promise())throw new TypeError("Thenable self-resolution");l=n&&("object"==typeof n||"function"==typeof n)&&n.then,y(l)?r?l.call(n,s(o,t,$,r),s(o,t,N,r)):(o++,l.call(n,s(o,t,$,r),s(o,t,N,r),s(o,t,$,t.notifyWith))):(i!==$&&(a=void 0,c=[n]),(r||t.resolveWith)(a,c))}},u=r?l:function(){try{l()}catch(n){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(n,u.stackTrace),e+1>=o&&(i!==N&&(a=void 0,c=[n]),t.rejectWith(a,c))}};e?u():(k.Deferred.getStackHook&&(u.stackTrace=k.Deferred.getStackHook()),n.setTimeout(u))}}return k.Deferred(function(n){t[0][3].add(s(0,n,y(r)?r:$,n.notifyWith)),t[1][3].add(s(0,n,y(e)?e:$)),t[2][3].add(s(0,n,y(i)?i:N))}).promise()},promise:function(e){return null!=e?k.extend(e,r):r}},o={};return k.each(t,function(e,n){var s=n[2],a=n[5];r[n[1]]=s.add,a&&s.add(function(){i=a},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=c.call(arguments),o=k.Deferred(),s=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?c.call(arguments):n,--t||o.resolveWith(i,r)}};if(t<=1&&(W(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||y(r[n]&&r[n].then)))return o.then();for(;n--;)W(r[n],s(n),o.reject);return o.promise()}});var z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&z.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){n.setTimeout(function(){throw e})};var H=k.Deferred();function V(){s.removeEventListener("DOMContentLoaded",V),n.removeEventListener("load",V),k.ready()}k.fn.ready=function(e){return H.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||H.resolveWith(s,[k]))}}),k.ready.then=H.then,"complete"===s.readyState||"loading"!==s.readyState&&!s.documentElement.doScroll?n.setTimeout(k.ready):(s.addEventListener("DOMContentLoaded",V),n.addEventListener("load",V));var U=function(e,t,n,i,r,o,s){var a=0,c=e.length,l=null==n;if("object"===_(n))for(a in r=!0,n)U(e,t,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,y(i)||(s=!0),l&&(s?(t.call(e,i),t=null):(l=t,t=function(e,t,n){return l.call(k(e),n)})),t))for(;a<c;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return r?e:l?t.call(e):c?t(e[0],n):o},K=/^-ms-/,G=/-([a-z])/g;function q(e,t){return t.toUpperCase()}function Y(e){return e.replace(K,"ms-").replace(G,q)}var X=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Z(){this.expando=k.expando+Z.uid++}Z.uid=1,Z.prototype={cache:function(e){var t=e[this.expando];return t||(t={},X(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[Y(t)]=n;else for(i in t)r[Y(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Y(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(Y):(t=Y(t))in i?[t]:t.match(I)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||k.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Z,J=new Z,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(e,t){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=Y(i.slice(5)),ne(o,i,r[i]));Q.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){J.set(this,e)}):U(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=J.get(o,e))?n:void 0!==(n=ne(o,e))?n:void 0;this.each(function(){J.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=Q.get(e,t),n&&(!i||Array.isArray(n)?i=Q.access(e,t,k.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),i=n.length,r=n.shift(),o=k._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,function(){k.dequeue(e,t)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?k.queue(this[0],e):void 0===t?this:this.each(function(){var n=k.queue(this,e,t);k._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&k.dequeue(this,e)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=k.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=Q.get(o[s],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(t)}});var ie=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re=new RegExp("^(?:([+-])=|)("+ie+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],se=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&k.contains(e.ownerDocument,e)&&"none"===k.css(e,"display")},ae=function(e,t,n,i){var r,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in r=n.apply(e,i||[]),t)e.style[o]=s[o];return r};function ce(e,t,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return k.css(e,t,"")},c=a(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),u=(k.cssNumber[t]||"px"!==l&&+c)&&re.exec(k.css(e,t));if(u&&u[3]!==l){for(c/=2,l=l||u[3],u=+c||1;s--;)k.style(e,t,u+l),(1-o)*(1-(o=a()/c||.5))<=0&&(s=0),u/=o;u*=2,k.style(e,t,u+l),n=n||[]}return n&&(u=+u||+c||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=l,i.start=u,i.end=r)),r}var le={};function ue(e){var t,n=e.ownerDocument,i=e.nodeName,r=le[i];return r||(t=n.body.appendChild(n.createElement(i)),r=k.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),le[i]=r,r)}function he(e,t){for(var n,i,r=[],o=0,s=e.length;o<s;o++)(i=e[o]).style&&(n=i.style.display,t?("none"===n&&(r[o]=Q.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&se(i)&&(r[o]=ue(i))):"none"!==n&&(r[o]="none",Q.set(i,"display",n)));for(o=0;o<s;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}k.fn.extend({show:function(){return he(this,!0)},hide:function(){return he(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){se(this)?k(this).show():k(this).hide()})}});var de=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,pe=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?k.merge([e],n):n}function ve(e,t){for(var n=0,i=e.length;n<i;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var ye,be,we=/<|&#?\w+;/;function xe(e,t,n,i,r){for(var o,s,a,c,l,u,h=t.createDocumentFragment(),d=[],f=0,p=e.length;f<p;f++)if((o=e[f])||0===o)if("object"===_(o))k.merge(d,o.nodeType?[o]:o);else if(we.test(o)){for(s=s||h.appendChild(t.createElement("div")),a=(fe.exec(o)||["",""])[1].toLowerCase(),c=ge[a]||ge._default,s.innerHTML=c[1]+k.htmlPrefilter(o)+c[2],u=c[0];u--;)s=s.lastChild;k.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(t.createTextNode(o));for(h.textContent="",f=0;o=d[f++];)if(i&&k.inArray(o,i)>-1)r&&r.push(o);else if(l=k.contains(o.ownerDocument,o),s=me(h.appendChild(o),"script"),l&&ve(s),n)for(u=0;o=s[u++];)pe.test(o.type||"")&&n.push(o);return h}ye=s.createDocumentFragment().appendChild(s.createElement("div")),(be=s.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),ye.appendChild(be),v.checkClone=ye.cloneNode(!0).cloneNode(!0).lastChild.checked,ye.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ye.cloneNode(!0).lastChild.defaultValue;var _e=s.documentElement,ke=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function Ae(){return!0}function Se(){return!1}function Fe(){try{return s.activeElement}catch(e){}}function Te(e,t,n,i,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)Te(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Se;else if(!r)return e;return 1===o&&(s=r,(r=function(e){return k().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=k.guid++)),e.each(function(){k.event.add(this,t,r,i,n)})}k.event={global:{},add:function(e,t,n,i,r){var o,s,a,c,l,u,h,d,f,p,g,m=Q.get(e);if(m)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&k.find.matchesSelector(_e,r),n.guid||(n.guid=k.guid++),(c=m.events)||(c=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;l--;)f=g=(a=Ee.exec(t[l])||[])[1],p=(a[2]||"").split(".").sort(),f&&(h=k.event.special[f]||{},f=(r?h.delegateType:h.bindType)||f,h=k.event.special[f]||{},u=k.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&k.expr.match.needsContext.test(r),namespace:p.join(".")},o),(d=c[f])||((d=c[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,i,p,s)||e.addEventListener&&e.addEventListener(f,s)),h.add&&(h.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,u):d.push(u),k.event.global[f]=!0)},remove:function(e,t,n,i,r){var o,s,a,c,l,u,h,d,f,p,g,m=Q.hasData(e)&&Q.get(e);if(m&&(c=m.events)){for(l=(t=(t||"").match(I)||[""]).length;l--;)if(f=g=(a=Ee.exec(t[l])||[])[1],p=(a[2]||"").split(".").sort(),f){for(h=k.event.special[f]||{},d=c[f=(i?h.delegateType:h.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)u=d[o],!r&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(o,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(e,u));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(e,p,m.handle)||k.removeEvent(e,f,m.handle),delete c[f])}else for(f in c)k.event.remove(e,f+t[l],n,i,!0);k.isEmptyObject(c)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=k.event.fix(e),c=new Array(arguments.length),l=(Q.get(this,"events")||{})[a.type]||[],u=k.event.special[a.type]||{};for(c[0]=a,t=1;t<arguments.length;t++)c[t]=arguments[t];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(s=k.event.handlers.call(this,a,l),t=0;(r=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(i=((k.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,c))&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,i,r,o,s,a=[],c=t.delegateCount,l=e.target;if(c&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],s={},n=0;n<c;n++)void 0===s[r=(i=t[n]).selector+" "]&&(s[r]=i.needsContext?k(r,this).index(l)>-1:k.find(r,this,null,[l]).length),s[r]&&o.push(i);o.length&&a.push({elem:l,handlers:o})}return l=this,c<t.length&&a.push({elem:l,handlers:t.slice(c)}),a},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:y(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Fe()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Fe()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&D(this,"input"))return this.click(),!1},_default:function(e){return D(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ae:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ae,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ae,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ae,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&ke.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ce.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){k.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,r=e.handleObj;return i&&(i===this||k.contains(this,i))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),k.fn.extend({on:function(e,t,n,i){return Te(this,e,t,n,i)},one:function(e,t,n,i){return Te(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,k(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Se),this.each(function(){k.event.remove(this,e,n,t)})}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Re=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Me(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,i,r,o,s,a,c,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),s=Q.set(t,o),l=o.events))for(r in delete s.handle,s.events={},l)for(n=0,i=l[r].length;n<i;n++)k.event.add(t,r,l[r][n]);J.hasData(e)&&(a=J.access(e),c=k.extend({},a),J.set(t,c))}}function Ie(e,t,n,i){t=l.apply([],t);var r,o,s,a,c,u,h=0,d=e.length,f=d-1,p=t[0],g=y(p);if(g||d>1&&"string"==typeof p&&!v.checkClone&&Pe.test(p))return e.each(function(r){var o=e.eq(r);g&&(t[0]=p.call(this,r,o.html())),Ie(o,t,n,i)});if(d&&(o=(r=xe(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(a=(s=k.map(me(r,"script"),Be)).length;h<d;h++)c=r,h!==f&&(c=k.clone(c,!0,!0),a&&k.merge(s,me(c,"script"))),n.call(e[h],c,h);if(a)for(u=s[s.length-1].ownerDocument,k.map(s,Oe),h=0;h<a;h++)c=s[h],pe.test(c.type||"")&&!Q.access(c,"globalEval")&&k.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?k._evalUrl&&k._evalUrl(c.src):x(c.textContent.replace(Re,""),u,c))}return e}function $e(e,t,n){for(var i,r=t?k.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||k.cleanData(me(i)),i.parentNode&&(n&&k.contains(i.ownerDocument,i)&&ve(me(i,"script")),i.parentNode.removeChild(i));return e}k.extend({htmlPrefilter:function(e){return e.replace(De,"<$1></$2>")},clone:function(e,t,n){var i,r,o,s,a,c,l,u=e.cloneNode(!0),h=k.contains(e.ownerDocument,e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(s=me(u),i=0,r=(o=me(e)).length;i<r;i++)a=o[i],c=s[i],void 0,"input"===(l=c.nodeName.toLowerCase())&&de.test(a.type)?c.checked=a.checked:"input"!==l&&"textarea"!==l||(c.defaultValue=a.defaultValue);if(t)if(n)for(o=o||me(e),s=s||me(u),i=0,r=o.length;i<r;i++)je(o[i],s[i]);else je(e,u);return(s=me(u,"script")).length>0&&ve(s,!h&&me(e,"script")),u},cleanData:function(e){for(var t,n,i,r=k.event.special,o=0;void 0!==(n=e[o]);o++)if(X(n)){if(t=n[Q.expando]){if(t.events)for(i in t.events)r[i]?k.event.remove(n,i):k.removeEvent(n,i,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return $e(this,e,!0)},remove:function(e){return $e(this,e)},text:function(e){return U(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Me(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Me(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return U(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!ge[(fe.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Ie(this,arguments,function(t){var n=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(me(this)),n&&n.replaceChild(t,this))},e)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){k.fn[e]=function(e){for(var n,i=[],r=k(e),o=r.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),k(r[s])[t](n),u.apply(i,n.get());return this.pushStack(i)}});var Ne=new RegExp("^("+ie+")(?!px)[a-z%]+$","i"),We=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},ze=new RegExp(oe.join("|"),"i");function He(e,t,n){var i,r,o,s,a=e.style;return(n=n||We(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||k.contains(e.ownerDocument,e)||(s=k.style(e,t)),!v.pixelBoxStyles()&&Ne.test(s)&&ze.test(t)&&(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}function Ve(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",_e.appendChild(l).appendChild(u);var e=n.getComputedStyle(u);i="1%"!==e.top,c=12===t(e.marginLeft),u.style.right="60%",a=36===t(e.right),r=36===t(e.width),u.style.position="absolute",o=36===u.offsetWidth||"absolute",_e.removeChild(l),u=null}}function t(e){return Math.round(parseFloat(e))}var i,r,o,a,c,l=s.createElement("div"),u=s.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===u.style.backgroundClip,k.extend(v,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),c},scrollboxSize:function(){return e(),o}}))}();var Ue=/^(none|table(?!-c[ea]).+)/,Ke=/^--/,Ge={position:"absolute",visibility:"hidden",display:"block"},qe={letterSpacing:"0",fontWeight:"400"},Ye=["Webkit","Moz","ms"],Xe=s.createElement("div").style;function Ze(e){var t=k.cssProps[e];return t||(t=k.cssProps[e]=function(e){if(e in Xe)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Ye.length;n--;)if((e=Ye[n]+t)in Xe)return e}(e)||e),t}function Qe(e,t,n){var i=re.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function Je(e,t,n,i,r,o){var s="width"===t?1:0,a=0,c=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=k.css(e,n+oe[s],!0,r)),i?("content"===n&&(c-=k.css(e,"padding"+oe[s],!0,r)),"margin"!==n&&(c-=k.css(e,"border"+oe[s]+"Width",!0,r))):(c+=k.css(e,"padding"+oe[s],!0,r),"padding"!==n?c+=k.css(e,"border"+oe[s]+"Width",!0,r):a+=k.css(e,"border"+oe[s]+"Width",!0,r));return!i&&o>=0&&(c+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-c-a-.5))),c}function et(e,t,n){var i=We(e),r=He(e,t,i),o="border-box"===k.css(e,"boxSizing",!1,i),s=o;if(Ne.test(r)){if(!n)return r;r="auto"}return s=s&&(v.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===k.css(e,"display",!1,i))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],s=!0),(r=parseFloat(r)||0)+Je(e,t,n||(o?"border":"content"),s,i,r)+"px"}function tt(e,t,n,i,r){return new tt.prototype.init(e,t,n,i,r)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=He(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,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:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=Y(t),c=Ke.test(t),l=e.style;if(c||(t=Ze(a)),s=k.cssHooks[t]||k.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:l[t];"string"===(o=typeof n)&&(r=re.exec(n))&&r[1]&&(n=ce(e,t,r),o="number"),null!=n&&n==n&&("number"===o&&(n+=r&&r[3]||(k.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(c?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,i){var r,o,s,a=Y(t);return Ke.test(t)||(t=Ze(a)),(s=k.cssHooks[t]||k.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,n)),void 0===r&&(r=He(e,t,i)),"normal"===r&&t in qe&&(r=qe[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),k.each(["height","width"],function(e,t){k.cssHooks[t]={get:function(e,n,i){if(n)return!Ue.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,i):ae(e,Ge,function(){return et(e,t,i)})},set:function(e,n,i){var r,o=We(e),s="border-box"===k.css(e,"boxSizing",!1,o),a=i&&Je(e,t,i,s,o);return s&&v.scrollboxSize()===o.position&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Je(e,t,"border",!1,o)-.5)),a&&(r=re.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),Qe(0,n,a)}}}),k.cssHooks.marginLeft=Ve(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(He(e,"marginLeft"))||e.getBoundingClientRect().left-ae(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(e,t){k.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+oe[i]+t]=o[i]||o[i-2]||o[0];return r}},"margin"!==e&&(k.cssHooks[e+t].set=Qe)}),k.fn.extend({css:function(e,t){return U(this,function(e,t,n){var i,r,o={},s=0;if(Array.isArray(t)){for(i=We(e),r=t.length;s<r;s++)o[t[s]]=k.css(e,t[s],!1,i);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,arguments.length>1)}}),k.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[k.cssProps[e.prop]]&&!k.cssHooks[e.prop]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=tt.prototype.init,k.fx.step={};var nt,it,rt=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function st(){it&&(!1===s.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(st):n.setTimeout(st,k.fx.interval),k.fx.tick())}function at(){return n.setTimeout(function(){nt=void 0}),nt=Date.now()}function ct(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=oe[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function lt(e,t,n){for(var i,r=(ut.tweeners[t]||[]).concat(ut.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,t,e))return i}function ut(e,t,n){var i,r,o=0,s=ut.prefilters.length,a=k.Deferred().always(function(){delete c.elem}),c=function(){if(r)return!1;for(var t=nt||at(),n=Math.max(0,l.startTime+l.duration-t),i=1-(n/l.duration||0),o=0,s=l.tweens.length;o<s;o++)l.tweens[o].run(i);return a.notifyWith(e,[l,i,n]),i<1&&s?n:(s||a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||at(),duration:n.duration,tweens:[],createTween:function(t,n){var i=k.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){var n=0,i=t?l.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)l.tweens[n].run(1);return t?(a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l,t])):a.rejectWith(e,[l,t]),this}}),u=l.props;for(!function(e,t){var n,i,r,o,s;for(n in e)if(r=t[i=Y(n)],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(s=k.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete e[i],o)n in e||(e[n]=o[n],t[n]=r);else t[i]=r}(u,l.opts.specialEasing);o<s;o++)if(i=ut.prefilters[o].call(l,e,u,l.opts))return y(i.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=i.stop.bind(i)),i;return k.map(u,lt,l),y(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(c,{elem:e,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(ut,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ce(n.elem,e,re.exec(t),n),n}]},tweener:function(e,t){y(e)?(t=e,e=["*"]):e=e.match(I);for(var n,i=0,r=e.length;i<r;i++)n=e[i],ut.tweeners[n]=ut.tweeners[n]||[],ut.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,r,o,s,a,c,l,u,h="width"in t||"height"in t,d=this,f={},p=e.style,g=e.nodeType&&se(e),m=Q.get(e,"fxshow");for(i in n.queue||(null==(s=k._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,k.queue(e,"fx").length||s.empty.fire()})})),t)if(r=t[i],rt.test(r)){if(delete t[i],o=o||"toggle"===r,r===(g?"hide":"show")){if("show"!==r||!m||void 0===m[i])continue;g=!0}f[i]=m&&m[i]||k.style(e,i)}if((c=!k.isEmptyObject(t))||!k.isEmptyObject(f))for(i in h&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=m&&m.display)&&(l=Q.get(e,"display")),"none"===(u=k.css(e,"display"))&&(l?u=l:(he([e],!0),l=e.style.display||l,u=k.css(e,"display"),he([e]))),("inline"===u||"inline-block"===u&&null!=l)&&"none"===k.css(e,"float")&&(c||(d.done(function(){p.display=l}),null==l&&(u=p.display,l="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),c=!1,f)c||(m?"hidden"in m&&(g=m.hidden):m=Q.access(e,"fxshow",{display:l}),o&&(m.hidden=!g),g&&he([e],!0),d.done(function(){for(i in g||he([e]),Q.remove(e,"fxshow"),f)k.style(e,i,f[i])})),c=lt(g?m[i]:0,i,d),i in m||(m[i]=c.start,g&&(c.end=c.start,c.start=0))}],prefilter:function(e,t){t?ut.prefilters.unshift(e):ut.prefilters.push(e)}}),k.speed=function(e,t,n){var i=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||y(e)&&e,duration:e,easing:n&&t||t&&!y(t)&&t};return k.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in k.fx.speeds?i.duration=k.fx.speeds[i.duration]:i.duration=k.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){y(i.old)&&i.old.call(this),i.queue&&k.dequeue(this,i.queue)},i},k.fn.extend({fadeTo:function(e,t,n,i){return this.filter(se).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=k.isEmptyObject(e),o=k.speed(t,n,i),s=function(){var t=ut(this,k.extend({},e),o);(r||Q.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=k.timers,s=Q.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&ot.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||k.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Q.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=k.timers,s=i?i.length:0;for(n.finish=!0,k.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),k.each(["toggle","show","hide"],function(e,t){var n=k.fn[t];k.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ct(t,!0),e,i,r)}}),k.each({slideDown:ct("show"),slideUp:ct("hide"),slideToggle:ct("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){k.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),nt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){it||(it=!0,st())},k.fx.stop=function(){it=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(e,t){return e=k.fx&&k.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,i){var r=n.setTimeout(t,e);i.stop=function(){n.clearTimeout(r)}})},function(){var e=s.createElement("input"),t=s.createElement("select").appendChild(s.createElement("option"));e.type="checkbox",v.checkOn=""!==e.value,v.optSelected=t.selected,(e=s.createElement("input")).value="t",e.type="radio",v.radioValue="t"===e.value}();var ht,dt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return U(this,k.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(r=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=k.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(I);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var n=dt[t]||k.find.attr;dt[t]=function(e,t,i){var r,o,s=t.toLowerCase();return i||(o=dt[s],dt[s]=r,r=null!=n(e,t,i)?s:null,dt[s]=o),r}});var ft=/^(?:input|select|textarea|button)$/i,pt=/^(?:a|area)$/i;function gt(e){return(e.match(I)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(I)||[]}k.fn.extend({prop:function(e,t){return U(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,r=k.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):ft.test(e.nodeName)||pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(e){var t,n,i,r,o,s,a,c=0;if(y(e))return this.each(function(t){k(this).addClass(e.call(this,t,mt(this)))});if((t=vt(e)).length)for(;n=this[c++];)if(r=mt(n),i=1===n.nodeType&&" "+gt(r)+" "){for(s=0;o=t[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=gt(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,r,o,s,a,c=0;if(y(e))return this.each(function(t){k(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=vt(e)).length)for(;n=this[c++];)if(r=mt(n),i=1===n.nodeType&&" "+gt(r)+" "){for(s=0;o=t[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(a=gt(i))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,i="string"===n||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):y(e)?this.each(function(n){k(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,r,o,s;if(i)for(r=0,o=k(this),s=vt(e);t=s[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=mt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+gt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var yt=/\r/g;k.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=y(e),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,k(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=k.map(r,function(e){return null==e?"":e+""})),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=k.valHooks[r.type]||k.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(yt,""):null==n?"":n:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:gt(k.text(e))}},select:{get:function(e){var t,n,i,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],c=s?o+1:r.length;for(i=o<0?c:s?o:0;i<c;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!D(n.parentNode,"optgroup"))){if(t=k(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=k.makeArray(t),s=r.length;s--;)((i=r[s]).selected=k.inArray(k.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},v.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in n;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,i,r){var o,a,c,l,u,h,d,f,g=[i||s],m=p.call(e,"type")?e.type:e,v=p.call(e,"namespace")?e.namespace.split("."):[];if(a=f=c=i=i||s,3!==i.nodeType&&8!==i.nodeType&&!bt.test(m+k.event.triggered)&&(m.indexOf(".")>-1&&(m=(v=m.split(".")).shift(),v.sort()),u=m.indexOf(":")<0&&"on"+m,(e=e[k.expando]?e:new k.Event(m,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:k.makeArray(t,[e]),d=k.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(i,t))){if(!r&&!d.noBubble&&!b(i)){for(l=d.delegateType||m,bt.test(l+m)||(a=a.parentNode);a;a=a.parentNode)g.push(a),c=a;c===(i.ownerDocument||s)&&g.push(c.defaultView||c.parentWindow||n)}for(o=0;(a=g[o++])&&!e.isPropagationStopped();)f=a,e.type=o>1?l:d.bindType||m,(h=(Q.get(a,"events")||{})[e.type]&&Q.get(a,"handle"))&&h.apply(a,t),(h=u&&a[u])&&h.apply&&X(a)&&(e.result=h.apply(a,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(g.pop(),t)||!X(i)||u&&y(i[m])&&!b(i)&&((c=i[u])&&(i[u]=null),k.event.triggered=m,e.isPropagationStopped()&&f.addEventListener(m,wt),i[m](),e.isPropagationStopped()&&f.removeEventListener(m,wt),k.event.triggered=void 0,c&&(i[u]=c)),e.result}},simulate:function(e,t,n){var i=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(i,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),v.focusin||k.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=Q.access(i,t);r||i.addEventListener(e,n,!0),Q.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Q.access(i,t)-1;r?Q.access(i,t,r):(i.removeEventListener(e,n,!0),Q.remove(i,t))}}});var xt=n.location,_t=Date.now(),kt=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Ct=/\[\]$/,Et=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,St=/^(?:input|select|textarea|keygen)/i;function Ft(e,t,n,i){var r;if(Array.isArray(t))k.each(t,function(t,r){n||Ct.test(e)?i(e,r):Ft(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==_(t))i(e,t);else for(r in t)Ft(e+"["+r+"]",t[r],n,i)}k.param=function(e,t){var n,i=[],r=function(e,t){var n=y(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){r(this.name,this.value)});else for(n in e)Ft(n,e[n],t,r);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&St.test(this.nodeName)&&!At.test(e)&&(this.checked||!de.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Tt=/%20/g,Dt=/#.*$/,Lt=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:GET|HEAD)$/,Mt=/^\/\//,Bt={},Ot={},jt="*/".concat("*"),It=s.createElement("a");function $t(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(I)||[];if(y(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Nt(e,t,n,i){var r={},o=e===Ot;function s(a){var c;return r[a]=!0,k.each(e[a]||[],function(e,a){var l=a(t,n,i);return"string"!=typeof l||o||r[l]?o?!(c=l):void 0:(t.dataTypes.unshift(l),s(l),!1)}),c}return s(t.dataTypes[0])||!r["*"]&&s("*")}function Wt(e,t){var n,i,r=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&k.extend(!0,e,i),e}It.href=xt.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":jt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Wt(Wt(e,k.ajaxSettings),t):Wt(k.ajaxSettings,e)},ajaxPrefilter:$t(Bt),ajaxTransport:$t(Ot),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,c,l,u,h,d,f,p=k.ajaxSetup({},t),g=p.context||p,m=p.context&&(g.nodeType||g.jquery)?k(g):k.event,v=k.Deferred(),y=k.Callbacks("once memory"),b=p.statusCode||{},w={},x={},_="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Pt.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)C.always(e[C.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||_;return i&&i.abort(t),E(0,t),this}};if(v.promise(C),p.url=((e||p.url||xt.href)+"").replace(Mt,xt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(I)||[""],null==p.crossDomain){l=s.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=It.protocol+"//"+It.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=k.param(p.data,p.traditional)),Nt(Bt,p,t,C),u)return C;for(d in(h=k.event&&p.global)&&0==k.active++&&k.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Rt.test(p.type),r=p.url.replace(Dt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Tt,"+")):(f=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(kt.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Lt,"$1"),f=(kt.test(r)?"&":"?")+"_="+_t+++f),p.url=r+f),p.ifModified&&(k.lastModified[r]&&C.setRequestHeader("If-Modified-Since",k.lastModified[r]),k.etag[r]&&C.setRequestHeader("If-None-Match",k.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+jt+"; q=0.01":""):p.accepts["*"]),p.headers)C.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(g,C,p)||u))return C.abort();if(_="abort",y.add(p.complete),C.done(p.success),C.fail(p.error),i=Nt(Ot,p,t,C)){if(C.readyState=1,h&&m.trigger("ajaxSend",[C,p]),u)return C;p.async&&p.timeout>0&&(c=n.setTimeout(function(){C.abort("timeout")},p.timeout));try{u=!1,i.send(w,E)}catch(e){if(u)throw e;E(-1,e)}}else E(-1,"No Transport");function E(e,t,s,a){var l,d,f,w,x,_=t;u||(u=!0,c&&n.clearTimeout(c),i=void 0,o=a||"",C.readyState=e>0?4:0,l=e>=200&&e<300||304===e,s&&(w=function(e,t,n){for(var i,r,o,s,a=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){c.unshift(r);break}if(c[0]in n)o=c[0];else{for(r in n){if(!c[0]||e.converters[r+" "+c[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==c[0]&&c.unshift(o),n[o]}(p,C,s)),w=function(e,t,n,i){var r,o,s,a,c,l={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!c&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=o,o=u.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(!(s=l[c+" "+o]||l["* "+o]))for(r in l)if((a=r.split(" "))[1]===o&&(s=l[c+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[r]:!0!==l[r]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+c+" to "+o}}}return{state:"success",data:t}}(p,w,C,l),l?(p.ifModified&&((x=C.getResponseHeader("Last-Modified"))&&(k.lastModified[r]=x),(x=C.getResponseHeader("etag"))&&(k.etag[r]=x)),204===e||"HEAD"===p.type?_="nocontent":304===e?_="notmodified":(_=w.state,d=w.data,l=!(f=w.error))):(f=_,!e&&_||(_="error",e<0&&(e=0))),C.status=e,C.statusText=(t||_)+"",l?v.resolveWith(g,[d,_,C]):v.rejectWith(g,[C,_,f]),C.statusCode(b),b=void 0,h&&m.trigger(l?"ajaxSuccess":"ajaxError",[C,p,l?d:f]),y.fireWith(g,[C,_]),h&&(m.trigger("ajaxComplete",[C,p]),--k.active||k.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,t){k[t]=function(e,n,i,r){return y(n)&&(r=r||i,i=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:r,data:n,success:i},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return y(e)?this.each(function(t){k(this).wrapInner(e.call(this,t))}):this.each(function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=y(e);return this.each(function(n){k(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var zt={0:200,1223:204},Ht=k.ajaxSettings.xhr();v.cors=!!Ht&&"withCredentials"in Ht,v.ajax=Ht=!!Ht,k.ajaxTransport(function(e){var t,i;if(v.cors||Ht&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);t=function(e){return function(){t&&(t=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(zt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),i=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&i()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(i,r){t=k("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),s.head.appendChild(t[0])},abort:function(){n&&n()}}});var Vt,Ut=[],Kt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ut.pop()||k.expando+"_"+_t++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,i){var r,o,s,a=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Kt,"$1"+r):!1!==e.jsonp&&(e.url+=(kt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||k.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=n[r],n[r]=function(){s=arguments},i.always(function(){void 0===o?k(n).removeProp(r):n[r]=o,e[r]&&(e.jsonpCallback=t.jsonpCallback,Ut.push(r)),s&&y(o)&&o(s[0]),s=o=void 0}),"script"}),v.createHTMLDocument=((Vt=s.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((i=(t=s.implementation.createHTMLDocument("")).createElement("base")).href=s.location.href,t.head.appendChild(i)):t=s),r=L.exec(e),o=!n&&[],r?[t.createElement(r[1])]:(r=xe([e],t,o),o&&o.length&&k(o).remove(),k.merge([],r.childNodes)));var i,r,o},k.fn.load=function(e,t,n){var i,r,o,s=this,a=e.indexOf(" ");return a>-1&&(i=gt(e.slice(a)),e=e.slice(0,a)),y(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),s.length>0&&k.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(i?k("<div>").append(k.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(e){return k.grep(k.timers,function(t){return e===t.elem}).length},k.offset={setOffset:function(e,t,n){var i,r,o,s,a,c,l=k.css(e,"position"),u=k(e),h={};"static"===l&&(e.style.position="relative"),a=u.offset(),o=k.css(e,"top"),c=k.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+c).indexOf("auto")>-1?(s=(i=u.position()).top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(c)||0),y(t)&&(t=t.call(e,n,k.extend({},a))),null!=t.top&&(h.top=t.top-a.top+s),null!=t.left&&(h.left=t.left-a.left+r),"using"in t?t.using.call(e,h):u.css(h)}},k.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){k.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===k.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),r.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-k.css(i,"marginTop",!0),left:t.left-r.left-k.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||_e})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;k.fn[e]=function(i){return U(this,function(e,i,r){var o;if(b(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r},e,i,arguments.length)}}),k.each(["top","left"],function(e,t){k.cssHooks[t]=Ve(v.pixelPosition,function(e,n){if(n)return n=He(e,t),Ne.test(n)?k(e).position()[t]+"px":n})}),k.each({Height:"height",Width:"width"},function(e,t){k.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){k.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===o?"margin":"border");return U(this,function(t,n,r){var o;return b(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?k.css(t,n,a):k.style(t,n,r,a)},t,s?r:void 0,s)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){k.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),y(e))return i=c.call(arguments,2),(r=function(){return e.apply(t||this,i.concat(c.call(arguments)))}).guid=e.guid=e.guid||k.guid++,r},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=D,k.isFunction=y,k.isWindow=b,k.camelCase=Y,k.type=_,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},void 0===(i=function(){return k}.apply(t,[]))||(e.exports=i);var Gt=n.jQuery,qt=n.$;return k.noConflict=function(e){return n.$===k&&(n.$=qt),e&&n.jQuery===k&&(n.jQuery=Gt),k},r||(n.jQuery=n.$=k),k})},function(e,t,n){"use strict";var i=n(56),r=n(131),o=n(81),s=n(222),a=n(68);function c(e){return e}function l(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}t.newBlob=function(e,n){t.checkSupport("blob");try{return new Blob([e],{type:n})}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(e),i.getBlob(n)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(e,t,n){var i=[],r=0,o=e.length;if(o<=n)return String.fromCharCode.apply(null,e);for(;r<o;)"array"===t||"nodebuffer"===t?i.push(String.fromCharCode.apply(null,e.slice(r,Math.min(r+n,o)))):i.push(String.fromCharCode.apply(null,e.subarray(r,Math.min(r+n,o)))),r+=n;return i.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function h(e){var n=65536,i=t.getTypeOf(e),r=!0;if("uint8array"===i?r=u.applyCanBeUsed.uint8array:"nodebuffer"===i&&(r=u.applyCanBeUsed.nodebuffer),r)for(;n>1;)try{return u.stringifyByChunk(e,i,n)}catch(e){n=Math.floor(n/2)}return u.stringifyByChar(e)}function d(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}t.applyFromCharCode=h;var f={};f.string={string:c,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,o.allocBuffer(e.length))}},f.array={string:h,array:c,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},f.arraybuffer={string:function(e){return h(new Uint8Array(e))},array:function(e){return d(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:c,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},f.uint8array={string:h,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:c,nodebuffer:function(e){return o.newBufferFrom(e)}},f.nodebuffer={string:h,array:function(e){return d(e,new Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return d(e,new Uint8Array(e.length))},nodebuffer:c},t.transformTo=function(e,n){if(n||(n=""),!e)return n;t.checkSupport(e);var i=t.getTypeOf(n);return f[i][e](n)},t.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":i.nodebuffer&&o.isBuffer(e)?"nodebuffer":i.uint8array&&e instanceof Uint8Array?"uint8array":i.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},t.checkSupport=function(e){if(!i[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},t.MAX_VALUE_16BITS=65535,t.MAX_VALUE_32BITS=-1,t.pretty=function(e){var t,n,i="";for(n=0;n<(e||"").length;n++)i+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return i},t.delay=function(e,t,n){s(function(){e.apply(n||null,t||[])})},t.inherits=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n},t.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},t.prepareContent=function(e,n,o,s,c){return a.Promise.resolve(n).then(function(e){return i.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise(function(t,n){var i=new FileReader;i.onload=function(e){t(e.target.result)},i.onerror=function(e){n(e.target.error)},i.readAsArrayBuffer(e)}):e}).then(function(n){var u,h=t.getTypeOf(n);return h?("arraybuffer"===h?n=t.transformTo("uint8array",n):"string"===h&&(c?n=r.decode(n):o&&!0!==s&&(n=l(u=n,i.uint8array?new Uint8Array(u.length):new Array(u.length)))),n):a.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},,,,,,,,function(e,t,n){"use strict";function i(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},e.exports=i},function(e,t){
|
||
/*!
|
||
* Chai - flag utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e,t,n){var i=e.__flags||(e.__flags=Object.create(null));if(3!==arguments.length)return i[t];i[t]=n}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,,function(e,t,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,i,r,o,s;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(s=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)o=e[t],s.set(o,r),r+=o.length;return s}},s={arraySet:function(e,t,n,i,r){for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(i)},function(e,t,n){"use strict";(function(e){if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,t.nodebuffer=void 0!==e,t.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)t.blob=!1;else{var i=new ArrayBuffer(0);try{t.blob=0===new Blob([i],{type:"application/zip"}).size}catch(e){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(i),t.blob=0===r.getBlob("application/zip").size}catch(e){t.blob=!1}}}try{t.nodestream=!!n(140).Readable}catch(e){t.nodestream=!1}}).call(this,n(71).Buffer)},function(e,t,n){var i;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};function o(e){return function(e,t){var n,i,s,a,c,l,u,h,d,f=1,p=e.length,g="";for(i=0;i<p;i++)if("string"==typeof e[i])g+=e[i];else if(Array.isArray(e[i])){if((a=e[i])[2])for(n=t[f],s=0;s<a[2].length;s++){if(!n.hasOwnProperty(a[2][s]))throw new Error(o('[sprintf] property "%s" does not exist',a[2][s]));n=n[a[2][s]]}else n=a[1]?t[a[1]]:t[f++];if(r.not_type.test(a[8])&&r.not_primitive.test(a[8])&&n instanceof Function&&(n=n()),r.numeric_arg.test(a[8])&&"number"!=typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(r.number.test(a[8])&&(h=n>=0),a[8]){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a[6]?parseInt(a[6]):0);break;case"e":n=a[7]?parseFloat(n).toExponential(a[7]):parseFloat(n).toExponential();break;case"f":n=a[7]?parseFloat(n).toFixed(a[7]):parseFloat(n);break;case"g":n=a[7]?String(Number(n.toPrecision(a[7]))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a[7]?n.substring(0,a[7]):n;break;case"t":n=String(!!n),n=a[7]?n.substring(0,a[7]):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a[7]?n.substring(0,a[7]):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a[7]?n.substring(0,a[7]):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}r.json.test(a[8])?g+=n:(!r.number.test(a[8])||h&&!a[3]?d="":(d=h?"+":"-",n=n.toString().replace(r.sign,"")),l=a[4]?"0"===a[4]?"0":a[4].charAt(1):" ",u=a[6]-(d+n).length,c=a[6]&&u>0?l.repeat(u):"",g+=a[5]?d+n+c:"0"===l?d+c+n:c+d+n)}return g}(function(e){if(a[e])return a[e];var t,n=e,i=[],o=0;for(;n;){if(null!==(t=r.text.exec(n)))i.push(t[0]);else if(null!==(t=r.modulo.exec(n)))i.push("%");else{if(null===(t=r.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var s=[],c=t[2],l=[];if(null===(l=r.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(l[1]);""!==(c=c.substring(l[0].length));)if(null!==(l=r.key_access.exec(c)))s.push(l[1]);else{if(null===(l=r.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(l[1])}t[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push(t)}n=n.substring(t[0].length)}return a[e]=i}(e),arguments)}function s(e,t){return o.apply(null,[e].concat(t||[]))}var a=Object.create(null);t.sprintf=o,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(i=function(){return{sprintf:o,vsprintf:s}}.call(t,n,t,e))||(e.exports=i))}()},function(e,t){
|
||
/*!
|
||
* Chai - transferFlags utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e,t,n){var i=e.__flags||(e.__flags=Object.create(null));for(var r in t.__flags||(t.__flags=Object.create(null)),n=3!==arguments.length||n,i)(n||"object"!==r&&"ssfi"!==r&&"lockSsfi"!==r&&"message"!=r)&&(t.__flags[r]=i[r])}},function(e,t){e.exports={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","inspect","toJSON"]}},function(e,t,n){
|
||
/*!
|
||
* chai
|
||
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
var i=[];
|
||
/*!
|
||
* Chai version
|
||
*/t.version="4.1.2",
|
||
/*!
|
||
* Assertion Error
|
||
*/
|
||
t.AssertionError=n(108);
|
||
/*!
|
||
* Utils for plugins (not exported)
|
||
*/
|
||
var r=n(179);t.use=function(e){return~i.indexOf(e)||(e(t,r),i.push(e)),t},
|
||
/*!
|
||
* Utility Functions
|
||
*/
|
||
t.util=r;
|
||
/*!
|
||
* Configuration
|
||
*/
|
||
var o=n(59);t.config=o;
|
||
/*!
|
||
* Primary `Assertion` prototype
|
||
*/
|
||
var s=n(163);t.use(s);
|
||
/*!
|
||
* Core Assertions
|
||
*/
|
||
var a=n(162);t.use(a);
|
||
/*!
|
||
* Expect interface
|
||
*/
|
||
var c=n(161);t.use(c);
|
||
/*!
|
||
* Should interface
|
||
*/
|
||
var l=n(160);t.use(l);
|
||
/*!
|
||
* Assert interface
|
||
*/
|
||
var u=n(159);t.use(u)},function(e,t,n){"use strict";var i=n(83).nextTick,r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=h;var o=n(69);o.inherits=n(66);var s=n(139),a=n(94);o.inherits(h,s);for(var c=r(a.prototype),l=0;l<c.length;l++){var u=c[l];h.prototype[u]||(h.prototype[u]=a.prototype[u])}function h(e){if(!(this instanceof h))return new h(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||i(f,this)}function f(e){e.end()}Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),h.prototype._destroy=function(e,t){this.push(null),this.end(),i(t,e)}},,,,,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";for(var i=n(42),r=n(56),o=n(81),s=n(50),a=new Array(256),c=0;c<256;c++)a[c]=c>=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;a[254]=a[254]=1;function l(){s.call(this,"utf-8 decode"),this.leftOver=null}function u(){s.call(this,"utf-8 encode")}t.utf8encode=function(e){return r.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,n,i,o,s,a=e.length,c=0;for(o=0;o<a;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=r.uint8array?new Uint8Array(c):new Array(c),s=0,o=0;s<c;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?t[s++]=n:n<2048?(t[s++]=192|n>>>6,t[s++]=128|63&n):n<65536?(t[s++]=224|n>>>12,t[s++]=128|n>>>6&63,t[s++]=128|63&n):(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63,t[s++]=128|n>>>6&63,t[s++]=128|63&n);return t}(e)},t.utf8decode=function(e){return r.nodebuffer?i.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,r,o,s=e.length,c=new Array(2*s);for(n=0,t=0;t<s;)if((r=e[t++])<128)c[n++]=r;else if((o=a[r])>4)c[n++]=65533,t+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&t<s;)r=r<<6|63&e[t++],o--;o>1?c[n++]=65533:r<65536?c[n++]=r:(r-=65536,c[n++]=55296|r>>10&1023,c[n++]=56320|1023&r)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),i.applyFromCharCode(c)}(e=i.transformTo(r.uint8array?"uint8array":"array",e))},i.inherits(l,s),l.prototype.processChunk=function(e){var n=i.transformTo(r.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=n;(n=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),n.set(o,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var s=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+a[e[n]]>t?n:t}(n),c=n;s!==n.length&&(r.uint8array?(c=n.subarray(0,s),this.leftOver=n.subarray(s,n.length)):(c=n.slice(0,s),this.leftOver=n.slice(s,n.length))),this.push({data:t.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=l,i.inherits(u,s),u.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=u},function(e,t,n){"use strict";var i=null;i="undefined"!=typeof Promise?Promise:n(208),e.exports={Promise:i}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(71).Buffer)},function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,l=[],u=!1,h=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&f())}function f(){if(!u){var e=a(d);u=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,u=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||u||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
var i=n(233),r=n(232),o=n(141);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return l(this,e,t,n)}function l(e,t,n,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);return e}(e,t,n,i):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(t,n),r=(e=a(e,i)).write(t,n);r!==i&&(e=e.slice(0,r));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|f(t.length);return 0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?a(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(u(t),e=a(e,t<0?0:0|f(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|f(t.length);e=a(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function f(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return N(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function m(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,i,r);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,i,r){var o,s=1,a=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var u=-1;for(o=n;o<a;o++)if(l(e,o)===l(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===c)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var h=!0,d=0;d<c;d++)if(l(e,o+d)!==l(t,d)){h=!1;break}if(h)return o}return-1}function y(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function b(e,t,n,i){return z(N(t,e.length-n),e,n,i)}function w(e,t,n,i){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function x(e,t,n,i){return w(e,t,n,i)}function _(e,t,n,i){return z(W(t),e,n,i)}function k(e,t,n,i){return z(function(e,t){for(var n,i,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),i=n>>8,r=n%256,o.push(r),o.push(i);return o}(t,e.length-n),e,n,i)}function C(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o,s,a,c,l=e[r],u=null,h=l>239?4:l>223?3:l>191?2:1;if(r+h<=n)switch(h){case 1:l<128&&(u=l);break;case 2:128==(192&(o=e[r+1]))&&(c=(31&l)<<6|63&o)>127&&(u=c);break;case 3:o=e[r+1],s=e[r+2],128==(192&o)&&128==(192&s)&&(c=(15&l)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:o=e[r+1],s=e[r+2],a=e[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(u=c)}null===u?(u=65533,h=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),r+=h}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=A));return n}(i)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return l(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,i){return u(t),t<=0?a(e,t):void 0!==n?"string"==typeof i?a(e,t).fill(n,i):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return h(null,e)},c.allocUnsafeSlow=function(e){return h(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r<o;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=c.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,r),r+=s.length}return i},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):function(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return F(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,i,r){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var o=r-i,s=n-t,a=Math.min(o,s),l=this.slice(i,r),u=e.slice(t,n),h=0;h<a;++h)if(l[h]!==u[h]){o=l[h],s=u[h];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},c.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function S(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function F(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function T(e,t,n){var i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=$(e[o]);return r}function D(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,i,r,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function R(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r<o;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function M(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r<o;++r)e[n+r]=t>>>8*(i?r:3-r)&255}function B(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,i,o){return o||B(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function j(e,t,n,i,o){return o||B(e,0,n,8),r.write(e,t,n,i,52,8),n+8}c.prototype.slice=function(e,t){var n,i=this.length;if(e=~~e,t=void 0===t?i:~~t,e<0?(e+=i)<0&&(e=0):e>i&&(e=i),t<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var r=t-e;n=new c(r,void 0);for(var o=0;o<r;++o)n[o]=this[o+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},c.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),r.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),r.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),r.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),r.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[t]=255&e;++o<n&&(r*=256);)this[t+o]=e/r&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);P(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);P(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var r,o=i-n;if(this===e&&n<t&&t<i)for(r=o-1;r>=0;--r)e[r+t]=this[r+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},c.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=c.isBuffer(e)?e:N(new c(e,i).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var I=/[^+\/0-9A-Za-z-_]/g;function $(e){return e<16?"0"+e.toString(16):e.toString(16)}function N(e,t){var n;t=t||1/0;for(var i=e.length,r=null,o=[],s=0;s<i;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(52))},,,,,function(e,t,n){var i=n(59),r=n(51),o=n(105),s=n(78),a=["__flags","__methods","_obj","assert"];function c(e,t,n){if(!n){n=[];for(var i=0;i<=e.length;i++)n[i]=[]}return n[e.length]&&n[e.length][t.length]||(0===e.length||0===t.length?n[e.length][t.length]=Math.max(e.length,t.length):n[e.length][t.length]=Math.min(c(e.slice(0,-1),t,n)+1,c(e,t.slice(0,-1),n)+1,c(e.slice(0,-1),t.slice(0,-1),n)+(e.slice(-1)===t.slice(-1)?0:1))),n[e.length][t.length]}e.exports=function(e,t){return s()?new Proxy(e,{get:function e(n,s){if("string"==typeof s&&-1===i.proxyExcludedKeys.indexOf(s)&&!Reflect.has(n,s)){if(t)throw Error("Invalid Chai property: "+t+"."+s+'. See docs for proper usage of "'+t+'".');var l=o(n).filter(function(e){return!Object.prototype.hasOwnProperty(e)&&-1===a.indexOf(e)}).sort(function(e,t){return c(s,e)-c(s,t)});throw l.length&&c(l[0],s)<4?Error("Invalid Chai property: "+s+'. Did you mean "'+l[0]+'"?'):Error("Invalid Chai property: "+s)}return-1!==a.indexOf(s)||r(n,"lockSsfi")||r(n,"ssfi",e),Reflect.get(n,s)}}):e}},function(e,t,n){n(59);var i=Object.getOwnPropertyDescriptor(function(){},"length");
|
||
/*!
|
||
* Chai - addLengthGuard utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e,t,n){return i.configurable?(Object.defineProperty(e,"length",{get:function(){if(n)throw Error("Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.');throw Error("Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')}}),e):e}},function(e,t,n){var i=n(59);
|
||
/*!
|
||
* Chai - isProxyEnabled helper
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/e.exports=function(){return i.useProxy&&"undefined"!=typeof Proxy&&"undefined"!=typeof Reflect}},function(e,t,n){var i=n(106),r=n(105),o=n(174),s=n(59);e.exports=function(e,t,n,i){return c({showHidden:t,seen:[],stylize:function(e){return e}},e,void 0===n?2:n)};var a=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&"nodeType"in e&&1===e.nodeType&&"string"==typeof e.nodeName};function c(e,n,g){if(n&&"function"==typeof n.inspect&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var m=n.inspect(g,e);return"string"!=typeof m&&(m=c(e,m,g)),m}var v=function(e,t){switch(typeof t){case"undefined":return e.stylize("undefined","undefined");case"string":var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string");case"number":return 0===t&&1/t==-1/0?e.stylize("-0","number"):e.stylize(""+t,"number");case"boolean":return e.stylize(""+t,"boolean");case"symbol":return e.stylize(t.toString(),"symbol")}if(null===t)return e.stylize("null","null")}(e,n);if(v)return v;if(a(n)){if("outerHTML"in n)return n.outerHTML;try{if(document.xmlVersion)return(new XMLSerializer).serializeToString(n);var y=document.createElementNS("http://www.w3.org/1999/xhtml","_");y.appendChild(n.cloneNode(!1));var b=y.innerHTML.replace("><",">"+n.innerHTML+"<");return y.innerHTML="",b}catch(e){}}var w,x,_=o(n),k=e.showHidden?r(n):_;if(0===k.length||f(n)&&(1===k.length&&"stack"===k[0]||2===k.length&&"description"===k[0]&&"stack"===k[1])){if("function"==typeof n)return x=(w=i(n))?": "+w:"",e.stylize("[Function"+x+"]","special");if(h(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(d(n))return e.stylize(Date.prototype.toUTCString.call(n),"date");if(f(n))return l(n)}var C,E,A="",S=!1,F=!1,T=["{","}"];if("object"==typeof(C=n)&&/\w+Array]$/.test(p(C))&&(F=!0,T=["[","]"]),function(e){return Array.isArray(e)||"object"==typeof e&&"[object Array]"===p(e)}(n)&&(S=!0,T=["[","]"]),"function"==typeof n&&(A=" [Function"+(x=(w=i(n))?": "+w:"")+"]"),h(n)&&(A=" "+RegExp.prototype.toString.call(n)),d(n)&&(A=" "+Date.prototype.toUTCString.call(n)),f(n))return l(n);if(0===k.length&&(!S||0==n.length))return T[0]+A+T[1];if(g<0)return h(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");if(e.seen.push(n),S)E=function(e,t,n,i,r){for(var o=[],s=0,a=t.length;s<a;++s)Object.prototype.hasOwnProperty.call(t,String(s))?o.push(u(e,t,n,i,String(s),!0)):o.push("");return r.forEach(function(r){r.match(/^\d+$/)||o.push(u(e,t,n,i,r,!0))}),o}(e,n,g,_,k);else{if(F)return function(e){for(var t="[ ",n=0;n<e.length;++n){if(t.length>=s.truncateThreshold-7){t+="...";break}t+=e[n]+", "}-1!==(t+=" ]").indexOf(", ]")&&(t=t.replace(", ]"," ]"));return t}(n);E=k.map(function(t){return u(e,n,g,_,t,S)})}return e.seen.pop(),function(e,t,n){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(E,A,T)}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,n,i,r,o){var s,a,l=Object.getOwnPropertyDescriptor(t,r);if(l&&(l.get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special"))),i.indexOf(r)<0&&(s="["+r+"]"),a||(e.seen.indexOf(t[r])<0?(a=c(e,t[r],null===n?null:n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),void 0===s){if(o&&r.match(/^\d+$/))return a;(s=JSON.stringify(""+r)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return"object"==typeof e&&"[object RegExp]"===p(e)}function d(e){return"object"==typeof e&&"[object Date]"===p(e)}function f(e){return"object"==typeof e&&"[object Error]"===p(e)}function p(e){return Object.prototype.toString.call(e)}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";(function(t){e.exports={isNode:void 0!==t,newBufferFrom:function(e,n){return new t(e,n)},allocBuffer:function(e){return t.alloc?t.alloc(e):new t(e)},isBuffer:function(e){return t.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}}).call(this,n(71).Buffer)},function(e,t,n){var i=n(71),r=i.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=i:(o(i,t),t.Buffer=s),o(r,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,i,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,i)});case 4:return t.nextTick(function(){e.call(null,n,i,r)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return t.nextTick(function(){e.apply(null,o)})}}}:e.exports=t}).call(this,n(70))},function(e,t,n){var i=n(184),r=n(183);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||r(s)}},function(e,t,n){var i,r=r||function(e){"use strict";if(!(void 0===e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=function(){return e.URL||e.webkitURL||e},n=e.document.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in n,r=/constructor/i.test(e.HTMLElement)||e.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},a=function(e){setTimeout(function(){"string"==typeof e?t().revokeObjectURL(e):e.remove()},4e4)},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},l=function(l,u,h){h||(l=c(l));var d,f=this,p="application/octet-stream"===l.type,g=function(){!function(e,t,n){for(var i=(t=[].concat(t)).length;i--;){var r=e["on"+t[i]];if("function"==typeof r)try{r.call(e,n||e)}catch(e){s(e)}}}(f,"writestart progress write writeend".split(" "))};if(f.readyState=f.INIT,i)return d=t().createObjectURL(l),void setTimeout(function(){var e,t;n.href=d,n.download=u,e=n,t=new MouseEvent("click"),e.dispatchEvent(t),g(),a(d),f.readyState=f.DONE});!function(){if((o||p&&r)&&e.FileReader){var n=new FileReader;return n.onloadend=function(){var t=o?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,f.readyState=f.DONE,g()},n.readAsDataURL(l),void(f.readyState=f.INIT)}d||(d=t().createObjectURL(l)),p?e.location.href=d:e.open(d,"_blank")||(e.location.href=d);f.readyState=f.DONE,g(),a(d)}()},u=l.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return t=t||e.name||"download",n||(e=c(e)),navigator.msSaveOrOpenBlob(e,t)}:(u.abort=function(){},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(e,t,n){return new l(e,t||e.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
||
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */void 0!==e&&e.exports?e.exports.saveAs=r:null!==n(101)&&null!==n(185)&&(void 0===(i=function(){return r}.call(t,n,t,e))||(e.exports=i))},function(e,t,n){"use strict";function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new i;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}i.prototype=n(234),i.prototype.loadAsync=n(190),i.support=n(56),i.defaults=n(125),i.version="3.1.5",i.loadAsync=function(e,t){return(new i).loadAsync(e,t)},i.external=n(68),e.exports=i},function(e,t,n){(function(t){var n;n=function(){"use strict";var e="function"==typeof Promise,n="object"==typeof self?self:t,i="undefined"!=typeof Symbol,r="undefined"!=typeof Map,o="undefined"!=typeof Set,s="undefined"!=typeof WeakMap,a="undefined"!=typeof WeakSet,c="undefined"!=typeof DataView,l=i&&void 0!==Symbol.iterator,u=i&&void 0!==Symbol.toStringTag,h=o&&"function"==typeof Set.prototype.entries,d=r&&"function"==typeof Map.prototype.entries,f=h&&Object.getPrototypeOf((new Set).entries()),p=d&&Object.getPrototypeOf((new Map).entries()),g=l&&"function"==typeof Array.prototype[Symbol.iterator],m=g&&Object.getPrototypeOf([][Symbol.iterator]()),v=l&&"function"==typeof String.prototype[Symbol.iterator],y=v&&Object.getPrototypeOf(""[Symbol.iterator]()),b=8,w=-1;return function(t){var i=typeof t;if("object"!==i)return i;if(null===t)return"null";if(t===n)return"global";if(Array.isArray(t)&&(!1===u||!(Symbol.toStringTag in t)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&t===window.location)return"Location";if("object"==typeof window.document&&t===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&t===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&t===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&t instanceof window.HTMLElement){if("BLOCKQUOTE"===t.tagName)return"HTMLQuoteElement";if("TD"===t.tagName)return"HTMLTableDataCellElement";if("TH"===t.tagName)return"HTMLTableHeaderCellElement"}}var l=u&&t[Symbol.toStringTag];if("string"==typeof l)return l;var h=Object.getPrototypeOf(t);return h===RegExp.prototype?"RegExp":h===Date.prototype?"Date":e&&h===Promise.prototype?"Promise":o&&h===Set.prototype?"Set":r&&h===Map.prototype?"Map":a&&h===WeakSet.prototype?"WeakSet":s&&h===WeakMap.prototype?"WeakMap":c&&h===DataView.prototype?"DataView":r&&h===p?"Map Iterator":o&&h===f?"Set Iterator":g&&h===m?"Array Iterator":v&&h===y?"String Iterator":null===h?"Object":Object.prototype.toString.call(t).slice(b,w)}},e.exports=n()}).call(this,n(52))},,function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){"use strict";var i=n(42);var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==i.getTypeOf(e)?function(e,t,n,i){var o=r,s=i+n;e^=-1;for(var a=i;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,n,i){var o=r,s=i+n;e^=-1;for(var a=i;a<s;a++)e=e>>>8^o[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},function(e,t,n){"use strict";var i=n(68),r=n(124),o=n(123),s=n(122);o=n(123);function a(e,t,n,i,r){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=i,this.compressedContent=r}a.prototype={getContentWorker:function(){var e=new r(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new r(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,n){return e.pipe(new s).pipe(new o("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},e.exports=a},function(e,t,n){e.exports=!n(128)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";(function(t,i,r){var o=n(83).nextTick;function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;e.entry=null;for(;i;){var r=i.callback;t.pendingcb--,r(n),i=i.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var a,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?i:o;y.WritableState=v;var l=n(69);l.inherits=n(66);var u={deprecate:n(228)},h=n(138),d=n(82).Buffer,f=r.Uint8Array||function(){};var p,g=n(135);function m(){}function v(e,t){a=a||n(61),e=e||{};var i=t instanceof a;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,l=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(l||0===l)?l:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,r=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,r){--t.pendingcb,n?(o(r,i),o(C,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(r(i),e._writableState.errorEmitted=!0,e.emit("error",i),C(e,t))}(e,n,i,t,r);else{var s=_(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||x(e,n),i?c(w,e,n,s,r):w(e,n,s,r)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||n(61),!(p.call(y,this)||this instanceof a))return new y(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function b(e,t,n,i,r,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function w(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),C(e,t)}function x(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,r=new Array(i),o=t.corkedRequestsFree;o.entry=n;for(var a=0,c=!0;n;)r[a]=n,n.isBuf||(c=!1),n=n.next,a+=1;r.allBuffers=c,b(e,t,!0,t.length,r,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,u=n.encoding,h=n.callback;if(b(e,t,!1,t.objectMode?1:l.length,l,u,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),C(e,t)})}function C(e,t){var n=_(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}l.inherits(y,h),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===y&&(e&&e._writableState instanceof v)}})):p=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var i,r=this._writableState,s=!1,a=!r.objectMode&&(i=e,d.isBuffer(i)||i instanceof f);return a&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=m),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o(t,n)}(this,n):(a||function(e,t,n,i){var r=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o(i,s),r=!1),r}(this,r,e,n))&&(r.pendingcb++,s=function(e,t,n,i,r,o){if(!n){var s=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,n));return t}(t,i,r);i!==s&&(n=!0,r="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:r,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,i,r,o);return c}(this,r,a,e,t,n)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||x(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,n){t.ending=!0,C(e,t),n&&(t.finished?o(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(70),n(134).setImmediate,n(52))},function(e,t,n){(t=e.exports=n(139)).Stream=t,t.Readable=t,t.Writable=n(94),t.Duplex=n(61),t.Transform=n(132),t.PassThrough=n(227)},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function r(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,s,a,c,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(o(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(r(n))for(a=Array.prototype.slice.call(arguments,1),s=(l=n.slice()).length,c=0;c<s;c++)l[c].apply(this,a);return!0},n.prototype.addListener=function(e,t){var s;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?r(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,r(this._events[e])&&!this._events[e].warned&&(s=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var n,o,s,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,o=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(r(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},,function(e,t){e.exports.id="ace/mode/javascript_worker",e.exports.src='"no use strict";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||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 Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&").replace(/"/g,""").replace(/\'/g,"'").replace(/</g,"<")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/javascript/jshint",["require","exports","module"],function(acequire,exports,module){module.exports=function outer(modules,cache,entry){function newRequire(name,jumped){if(!cache[name]){if(!modules[name]){var currentRequire="function"==typeof acequire&&acequire;if(!jumped&¤tRequire)return currentRequire(name,!0);if(previousRequire)return previousRequire(name,!0);var err=Error("Cannot find module \'"+name+"\'");throw err.code="MODULE_NOT_FOUND",err}var m=cache[name]={exports:{}};modules[name][0].call(m.exports,function(x){var id=modules[name][1][x];return newRequire(id?id:x)},m,m.exports,outer,modules,cache,entry)}return cache[name].exports}for(var previousRequire="function"==typeof acequire&&acequire,i=0;entry.length>i;i++)newRequire(entry[i]);return newRequire(entry[0])}({"/node_modules/browserify/node_modules/events/events.js":[function(_dereq_,module){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||0>n||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;throw TypeError(\'Uncaught, unspecified "error" event.\')}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];handler.apply(this,args)}else if(isObject(handler)){for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];for(listeners=handler.slice(),len=listeners.length,i=0;len>i;i++)listeners[i].apply(this,args)}return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned){var m;m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())}return this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i--\x3e0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(0>position)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this\n}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.listenerCount=function(emitter,type){var ret;return ret=emitter._events&&emitter._events[type]?isFunction(emitter._events[type])?1:emitter._events[type].length:0}},{}],"/node_modules/jshint/data/ascii-identifier-data.js":[function(_dereq_,module){for(var identifierStartTable=[],i=0;128>i;i++)identifierStartTable[i]=36===i||i>=65&&90>=i||95===i||i>=97&&122>=i;for(var identifierPartTable=[],i=0;128>i;i++)identifierPartTable[i]=identifierStartTable[i]||i>=48&&57>=i;module.exports={asciiIdentifierStartTable:identifierStartTable,asciiIdentifierPartTable:identifierPartTable}},{}],"/node_modules/jshint/lodash.js":[function(_dereq_,module,exports){(function(global){(function(){function baseFindIndex(array,predicate,fromRight){for(var length=array.length,index=fromRight?length:-1;fromRight?index--:length>++index;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){if(value!==value)return indexOfNaN(array,fromIndex);for(var index=fromIndex-1,length=array.length;length>++index;)if(array[index]===value)return index;return-1}function baseIsFunction(value){return"function"==typeof value||!1}function baseToString(value){return"string"==typeof value?value:null==value?"":value+""}function indexOfNaN(array,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?0:-1);fromRight?index--:length>++index;){var other=array[index];if(other!==other)return index}return-1}function isObjectLike(value){return!!value&&"object"==typeof value}function lodash(){}function arrayCopy(source,array){var index=-1,length=source.length;for(array||(array=Array(length));length>++index;)array[index]=source[index];return array}function arrayEach(array,iteratee){for(var index=-1,length=array.length;length>++index&&iteratee(array[index],index,array)!==!1;);return array}function arrayFilter(array,predicate){for(var index=-1,length=array.length,resIndex=-1,result=[];length>++index;){var value=array[index];predicate(value,index,array)&&(result[++resIndex]=value)}return result}function arrayMap(array,iteratee){for(var index=-1,length=array.length,result=Array(length);length>++index;)result[index]=iteratee(array[index],index,array);return result}function arrayMax(array){for(var index=-1,length=array.length,result=NEGATIVE_INFINITY;length>++index;){var value=array[index];value>result&&(result=value)}return result}function arraySome(array,predicate){for(var index=-1,length=array.length;length>++index;)if(predicate(array[index],index,array))return!0;return!1}function assignWith(object,source,customizer){var props=keys(source);push.apply(props,getSymbols(source));for(var index=-1,length=props.length;length>++index;){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);(result===result?result===value:value!==value)&&(value!==undefined||key in object)||(object[key]=result)}return object}function baseCopy(source,props,object){object||(object={});for(var index=-1,length=props.length;length>++index;){var key=props[index];object[key]=source[key]}return object}function baseCallback(func,thisArg,argCount){var type=typeof func;return"function"==type?thisArg===undefined?func:bindCallback(func,thisArg,argCount):null==func?identity:"object"==type?baseMatches(func):thisArg===undefined?property(func):baseMatchesProperty(func,thisArg)}function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer&&(result=object?customizer(value,key,object):customizer(value)),result!==undefined)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=initCloneArray(value),!isDeep)return arrayCopy(value,result)}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag!=objectTag&&tag!=argsTag&&(!isFunc||object))return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{};if(result=initCloneObject(isFunc?{}:value),!isDeep)return baseAssign(result,value)}stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==value)return stackB[length];return stackA.push(value),stackB.push(result),(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)}),result}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseGet(object,path,pathKey){if(null!=object){pathKey!==undefined&&pathKey in toObject(object)&&(path=[pathKey]);for(var index=-1,length=path.length;null!=object&&length>++index;)var result=object=object[path[index]];return result}}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){if(value===other)return 0!==value||1/value==1/other;var valType=typeof value,othType=typeof other;return"function"!=valType&&"object"!=valType&&"function"!=othType&&"object"!=othType||null==value||null==other?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=objToString.call(object),objTag==argsTag?objTag=objectTag:objTag!=objectTag&&(objIsArr=isTypedArray(object))),othIsArr||(othTag=objToString.call(other),othTag==argsTag?othTag=objectTag:othTag!=objectTag&&(othIsArr=isTypedArray(other)));var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!objIsArr&&!objIsObj)return equalByTag(object,other,objTag);if(!isLoose){var valWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(valWrapped||othWrapped)return equalFunc(valWrapped?object.value():object,othWrapped?other.value():other,customizer,isLoose,stackA,stackB)}if(!isSameTag)return!1;stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==object)return stackB[length]==other;stackA.push(object),stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);return stackA.pop(),stackB.pop(),result}function baseIsMatch(object,props,values,strictCompareFlags,customizer){for(var index=-1,length=props.length,noCustomizer=!customizer;length>++index;)if(noCustomizer&&strictCompareFlags[index]?values[index]!==object[props[index]]:!(props[index]in object))return!1;for(index=-1;length>++index;){var key=props[index],objValue=object[key],srcValue=values[index];if(noCustomizer&&strictCompareFlags[index])var result=objValue!==undefined||key in object;else result=customizer?customizer(objValue,srcValue,key):undefined,result===undefined&&(result=baseIsEqual(srcValue,objValue,customizer,!0));if(!result)return!1}return!0}function baseMatches(source){var props=keys(source),length=props.length;if(!length)return constant(!0);if(1==length){var key=props[0],value=source[key];if(isStrictComparable(value))return function(object){return null==object?!1:object[key]===value&&(value!==undefined||key in toObject(object))}}for(var values=Array(length),strictCompareFlags=Array(length);length--;)value=source[props[length]],values[length]=value,strictCompareFlags[length]=isStrictComparable(value);return function(object){return null!=object&&baseIsMatch(toObject(object),props,values,strictCompareFlags)}}function baseMatchesProperty(path,value){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(value),pathKey=path+"";return path=toPath(path),function(object){if(null==object)return!1;var key=pathKey;if(object=toObject(object),!(!isArr&&isCommon||key in object)){if(object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),null==object)return!1;key=last(path),object=toObject(object)}return object[key]===value?value!==undefined||key in object:baseIsEqual(value,object[key],null,!0)}}function baseMerge(object,source,customizer,stackA,stackB){if(!isObject(object))return object;var isSrcArr=isLength(source.length)&&(isArray(source)||isTypedArray(source));if(!isSrcArr){var props=keys(source);push.apply(props,getSymbols(source))}return arrayEach(props||source,function(srcValue,key){if(props&&(key=srcValue,srcValue=source[key]),isObjectLike(srcValue))stackA||(stackA=[]),stackB||(stackB=[]),baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB);else{var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue),!isSrcArr&&result===undefined||!isCommon&&(result===result?result===value:value!==value)||(object[key]=result)}}),object}function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){for(var length=stackA.length,srcValue=source[key];length--;)if(stackA[length]==srcValue)return object[key]=stackB[length],undefined;var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue,isLength(srcValue.length)&&(isArray(srcValue)||isTypedArray(srcValue))?result=isArray(value)?value:getLength(value)?arrayCopy(value):[]:isPlainObject(srcValue)||isArguments(srcValue)?result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}:isCommon=!1),stackA.push(srcValue),stackB.push(result),isCommon?object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB):(result===result?result!==value:value===value)&&(object[key]=result)}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyDeep(path){var pathKey=path+"";return path=toPath(path),function(object){return baseGet(object,path,pathKey)}}function baseSlice(array,start,end){var index=-1,length=array.length;start=null==start?0:+start||0,0>start&&(start=-start>length?0:length+start),end=end===undefined||end>length?length:+end||0,0>end&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);length>++index;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseValues(object,props){for(var index=-1,length=props.length,result=Array(length);length>++index;)result[index]=object[props[index]];return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if("number"==typeof value&&value===value&&HALF_MAX_ARRAY_LENGTH>=high){for(;high>low;){var mid=low+high>>>1,computed=array[mid];(retHighest?value>=computed:value>computed)?low=mid+1:high=mid}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);for(var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsUndef=value===undefined;high>low;){var mid=floor((low+high)/2),computed=iteratee(array[mid]),isReflexive=computed===computed;if(valIsNaN)var setLow=isReflexive||retHighest;else setLow=valIsUndef?isReflexive&&(retHighest||computed!==undefined):retHighest?value>=computed:value>computed;setLow?low=mid+1:high=mid}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if("function"!=typeof func)return identity;if(thisArg===undefined)return func;switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){return bufferSlice.call(buffer,0)}function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=null==object?0:sources.length,customizer=length>2&&sources[length-2],guard=length>2&&sources[2],thisArg=length>1&&sources[length-1];for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:null,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=3>length?null:customizer,length=1);length>++index;){var source=sources[index];source&&assigner(object,source,customizer)}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length))return eachFunc(collection,iteratee);for(var index=fromRight?length:-1,iterable=toObject(collection);(fromRight?index--:length>++index)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;fromRight?index--:length>++index;){var key=props[index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function createFindIndex(fromRight){return function(array,predicate,thisArg){return array&&array.length?(predicate=getCallback(predicate,thisArg,3),baseFindIndex(array,predicate,fromRight)):-1}}function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return"function"==typeof iteratee&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length,result=!0;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength))return!1;for(;result&&arrLength>++index;){var arrValue=array[index],othValue=other[index];if(result=undefined,customizer&&(result=isLoose?customizer(othValue,arrValue,index):customizer(arrValue,othValue,index)),result===undefined)if(isLoose)for(var othIndex=othLength;othIndex--&&(othValue=other[othIndex],!(result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))););else result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)}return!!result}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:0==object?1/object==1/other:object==+other;case regexpTag:case stringTag:return object==other+""}return!1}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose)return!1;for(var skipCtor=isLoose,index=-1;objLength>++index;){var key=objProps[index],result=isLoose?key in other:hasOwnProperty.call(other,key);if(result){var objValue=object[key],othValue=other[key];result=undefined,customizer&&(result=isLoose?customizer(othValue,objValue,key):customizer(objValue,othValue,key)),result===undefined&&(result=objValue&&objValue===othValue||equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB))}if(!result)return!1;skipCtor||(skipCtor="constructor"==key)}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor))return!1}return!0}function getCallback(func,thisArg,argCount){var result=lodash.callback||callback;return result=result===callback?baseCallback:result,argCount?result(func,thisArg,argCount):result}function getIndexOf(collection,target,fromIndex){var result=lodash.indexOf||indexOf;return result=result===indexOf?baseIndexOf:result,collection?result(collection,target,fromIndex):result}function initCloneArray(array){var length=array.length,result=new array.constructor(length);return length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input),result}function initCloneObject(object){var Ctor=object.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor||(Ctor=Object),new Ctor}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}function isIndex(value,length){return value=+value,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&0==value%1&&length>value}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;if("number"==type)var length=getLength(object),prereq=isLength(length)&&isIndex(index,length);else prereq="string"==type&&index in object;if(prereq){var other=object[index];return value===value?value===other:other!==other}return!1}function isKey(value,object){var type=typeof value;if("string"==type&&reIsPlainProp.test(value)||"number"==type)return!0;if(isArray(value))return!1;var result=!reIsDeepProp.test(value);return result||null!=object&&value in toObject(object)}function isLength(value){return"number"==typeof value&&value>-1&&0==value%1&&MAX_SAFE_INTEGER>=value}function isStrictComparable(value){return value===value&&(0===value?1/value>0:!isObject(value))}function shimIsPlainObject(value){var Ctor;if(lodash.support,!isObjectLike(value)||objToString.call(value)!=objectTag||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,"function"==typeof Ctor&&!(Ctor instanceof Ctor)))return!1;var result;return baseForIn(value,function(subValue,key){result=key}),result===undefined||hasOwnProperty.call(value,result)}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,support=lodash.support,allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object)),index=-1,result=[];propsLength>++index;){var key=props[index];(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key))&&result.push(key)}return result}function toObject(value){return isObject(value)?value:Object(value)}function toPath(value){if(isArray(value))return value;var result=[];return baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result}function indexOf(array,value,fromIndex){var length=array?array.length:0;if(!length)return-1;if("number"==typeof fromIndex)fromIndex=0>fromIndex?nativeMax(length+fromIndex,0):fromIndex;else if(fromIndex){var index=binaryIndex(array,value),other=array[index];return(value===value?value===other:other!==other)?index:-1}return baseIndexOf(array,value,fromIndex||0)}function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function slice(array,start,end){var length=array?array.length:0;return length?(end&&"number"!=typeof end&&isIterateeCall(array,start,end)&&(start=0,end=length),baseSlice(array,start,end)):[]}function unzip(array){for(var index=-1,length=(array&&array.length&&arrayMax(arrayMap(array,getLength)))>>>0,result=Array(length);length>++index;)result[index]=arrayMap(array,baseProperty(index));return result}function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;return isLength(length)||(collection=values(collection),length=collection.length),length?(fromIndex="number"!=typeof fromIndex||guard&&isIterateeCall(target,fromIndex,guard)?0:0>fromIndex?nativeMax(length+fromIndex,0):fromIndex||0,"string"==typeof collection||!isArray(collection)&&isString(collection)?length>fromIndex&&collection.indexOf(target,fromIndex)>-1:getIndexOf(collection,target,fromIndex)>-1):!1}function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;return predicate=getCallback(predicate,thisArg,3),func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;return thisArg&&isIterateeCall(collection,predicate,thisArg)&&(predicate=null),("function"!=typeof predicate||thisArg!==undefined)&&(predicate=getCallback(predicate,thisArg,3)),func(collection,predicate)}function restParam(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(start===undefined?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);length>++index;)rest[index]=args[start+index];switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);for(index=-1;start>++index;)otherArgs[index]=args[index];return otherArgs[start]=rest,func.apply(this,otherArgs)}}function clone(value,isDeep,customizer,thisArg){return isDeep&&"boolean"!=typeof isDeep&&isIterateeCall(value,isDeep,customizer)?isDeep=!1:"function"==typeof isDeep&&(thisArg=customizer,customizer=isDeep,isDeep=!1),customizer="function"==typeof customizer&&bindCallback(customizer,thisArg,1),baseClone(value,isDeep,customizer)}function isArguments(value){var length=isObjectLike(value)?value.length:undefined;return isLength(length)&&objToString.call(value)==argsTag}function isEmpty(value){if(null==value)return!0;var length=getLength(value);return isLength(length)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))?!length:!keys(value).length}function isObject(value){var type=typeof value;return"function"==type||!!value&&"object"==type}function isNative(value){return null==value?!1:objToString.call(value)==funcTag?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}function isNumber(value){return"number"==typeof value||isObjectLike(value)&&objToString.call(value)==numberTag}function isString(value){return"string"==typeof value||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function toPlainObject(value){return baseCopy(value,keysIn(value))}function has(object,path){if(null==object)return!1;var result=hasOwnProperty.call(object,path);return result||isKey(path)||(path=toPath(path),object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),path=last(path),result=null!=object&&hasOwnProperty.call(object,path)),result}function keysIn(object){if(null==object)return[];isObject(object)||(object=Object(object));var length=object.length;length=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object))&&length||0;for(var Ctor=object.constructor,index=-1,isProto="function"==typeof Ctor&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;length>++index;)result[index]=index+"";for(var key in object)skipIndexes&&isIndex(key,length)||"constructor"==key&&(isProto||!hasOwnProperty.call(object,key))||result.push(key);return result}function values(object){return baseValues(object,keys(object))}function escapeRegExp(string){return string=baseToString(string),string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\\\$&"):string}function callback(func,thisArg,guard){return guard&&isIterateeCall(func,thisArg,guard)&&(thisArg=null),baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}var undefined,VERSION="3.7.0",FUNC_ERROR_TEXT="Expected a function",argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reIsDeepProp=/\\.|\\[(?:[^[\\]]+|(["\'])(?:(?!\\1)[^\\n\\\\]|\\\\.)*?)\\1\\]/,reIsPlainProp=/^\\w*$/,rePropName=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\n\\\\]|\\\\.)*?)\\2)\\]/g,reRegExpChars=/[.*+?^${}()|[\\]\\/\\\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source),reEscapeChar=/\\\\(\\\\)?/g,reFlags=/\\w*$/,reIsHostCtor=/^\\[object .+?Constructor\\]$/,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=!1;var objectTypes={"function":!0,object:!0},freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports,freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module,freeGlobal=freeExports&&freeModule&&"object"==typeof global&&global&&global.Object&&global,freeSelf=objectTypes[typeof self]&&self&&self.Object&&self,freeWindow=objectTypes[typeof window]&&window&&window.Object&&window,moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports,root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this,arrayProto=Array.prototype,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+escapeRegExp(objToString).replace(/toString|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$"),ArrayBuffer=isNative(ArrayBuffer=root.ArrayBuffer)&&ArrayBuffer,bufferSlice=isNative(bufferSlice=ArrayBuffer&&new ArrayBuffer(0).slice)&&bufferSlice,floor=Math.floor,getOwnPropertySymbols=isNative(getOwnPropertySymbols=Object.getOwnPropertySymbols)&&getOwnPropertySymbols,getPrototypeOf=isNative(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf,push=arrayProto.push,preventExtensions=isNative(Object.preventExtensions=Object.preventExtensions)&&preventExtensions,propertyIsEnumerable=objectProto.propertyIsEnumerable,Uint8Array=isNative(Uint8Array=root.Uint8Array)&&Uint8Array,Float64Array=function(){try{var func=isNative(func=root.Float64Array)&&func,result=new func(new ArrayBuffer(10),0,1)&&func}catch(e){}return result}(),nativeAssign=function(){var object={1:0},func=preventExtensions&&isNative(func=Object.assign)&&func;try{func(preventExtensions(object),"xo")}catch(e){}return!object[1]&&func}(),nativeIsArray=isNative(nativeIsArray=Array.isArray)&&nativeIsArray,nativeKeys=isNative(nativeKeys=Object.keys)&&nativeKeys,nativeMax=Math.max,nativeMin=Math.min,NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,MAX_ARRAY_LENGTH=Math.pow(2,32)-1,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1,FLOAT64_BYTES_PER_ELEMENT=Float64Array?Float64Array.BYTES_PER_ELEMENT:0,MAX_SAFE_INTEGER=Math.pow(2,53)-1,support=lodash.support={};(function(x){var Ctor=function(){this.x=x},props=[];Ctor.prototype={valueOf:x,y:x};for(var key in new Ctor)props.push(key);support.funcDecomp=/\\bthis\\b/.test(function(){return this}),support.funcNames="string"==typeof Function.name;try{support.nonEnumArgs=!propertyIsEnumerable.call(arguments,1)}catch(e){support.nonEnumArgs=!0}})(1,0);var baseAssign=nativeAssign||function(object,source){return null==source?object:baseCopy(source,getSymbols(source),baseCopy(source,keys(source),object))},baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor();bufferSlice||(bufferClone=ArrayBuffer&&Uint8Array?function(buffer){var byteLength=buffer.byteLength,floatLength=Float64Array?floor(byteLength/FLOAT64_BYTES_PER_ELEMENT):0,offset=floatLength*FLOAT64_BYTES_PER_ELEMENT,result=new ArrayBuffer(byteLength);if(floatLength){var view=new Float64Array(result,0,floatLength);view.set(new Float64Array(buffer,0,floatLength))}return byteLength!=offset&&(view=new Uint8Array(result,offset),view.set(new Uint8Array(buffer,offset))),result}:constant(null));var getLength=baseProperty("length"),getSymbols=getOwnPropertySymbols?function(object){return getOwnPropertySymbols(toObject(object))}:constant([]),findLastIndex=createFindIndex(!0),zip=restParam(unzip),forEach=createForEach(arrayEach,baseEach),isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag},isFunction=baseIsFunction(/x/)||Uint8Array&&!baseIsFunction(Uint8Array)?function(value){return objToString.call(value)==funcTag}:baseIsFunction,isPlainObject=getPrototypeOf?function(value){if(!value||objToString.call(value)!=objectTag)return!1;var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)}:shimIsPlainObject,assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)}),keys=nativeKeys?function(object){if(object)var Ctor=object.constructor,length=object.length;return"function"==typeof Ctor&&Ctor.prototype===object||"function"!=typeof object&&isLength(length)?shimKeys(object):isObject(object)?nativeKeys(object):[]}:shimKeys,merge=createAssigner(baseMerge);lodash.assign=assign,lodash.callback=callback,lodash.constant=constant,lodash.forEach=forEach,lodash.keys=keys,lodash.keysIn=keysIn,lodash.merge=merge,lodash.property=property,lodash.reject=reject,lodash.restParam=restParam,lodash.slice=slice,lodash.toPlainObject=toPlainObject,lodash.unzip=unzip,lodash.values=values,lodash.zip=zip,lodash.each=forEach,lodash.extend=assign,lodash.iteratee=callback,lodash.clone=clone,lodash.escapeRegExp=escapeRegExp,lodash.findLastIndex=findLastIndex,lodash.has=has,lodash.identity=identity,lodash.includes=includes,lodash.indexOf=indexOf,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isEmpty=isEmpty,lodash.isFunction=isFunction,lodash.isNative=isNative,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isPlainObject=isPlainObject,lodash.isString=isString,lodash.isTypedArray=isTypedArray,lodash.last=last,lodash.some=some,lodash.any=some,lodash.contains=includes,lodash.include=includes,lodash.VERSION=VERSION,freeExports&&freeModule?moduleExports?(freeModule.exports=lodash)._=lodash:freeExports._=lodash:root._=lodash\n}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],"/node_modules/jshint/src/jshint.js":[function(_dereq_,module,exports){var _=_dereq_("../lodash"),events=_dereq_("events"),vars=_dereq_("./vars.js"),messages=_dereq_("./messages.js"),Lexer=_dereq_("./lex.js").Lexer,reg=_dereq_("./reg.js"),state=_dereq_("./state.js").state,style=_dereq_("./style.js"),options=_dereq_("./options.js"),scopeManager=_dereq_("./scope-manager.js"),JSHINT=function(){"use strict";function checkOption(name,t){return name=name.trim(),/^[+-]W\\d{3}$/g.test(name)?!0:-1!==options.validNames.indexOf(name)||"jslint"===t.type||_.has(options.removed,name)?!0:(error("E001",t,name),!1)}function isString(obj){return"[object String]"===Object.prototype.toString.call(obj)}function isIdentifier(tkn,value){return tkn?tkn.identifier&&tkn.value===value?!0:!1:!1}function isReserved(token){if(!token.reserved)return!1;var meta=token.meta;if(meta&&meta.isFutureReservedWord&&state.inES5()){if(!meta.es5)return!1;if(meta.strictOnly&&!state.option.strict&&!state.isStrict())return!1;if(token.isProperty)return!1}return!0}function supplant(str,data){return str.replace(/\\{([^{}]*)\\}/g,function(a,b){var r=data[b];return"string"==typeof r||"number"==typeof r?r:a})}function combine(dest,src){Object.keys(src).forEach(function(name){_.has(JSHINT.blacklist,name)||(dest[name]=src[name])})}function processenforceall(){if(state.option.enforceall){for(var enforceopt in options.bool.enforcing)void 0!==state.option[enforceopt]||options.noenforceall[enforceopt]||(state.option[enforceopt]=!0);for(var relaxopt in options.bool.relaxing)void 0===state.option[relaxopt]&&(state.option[relaxopt]=!1)}}function assume(){processenforceall(),state.option.esversion||state.option.moz||(state.option.esversion=state.option.es3?3:state.option.esnext?6:5),state.inES5()&&combine(predefined,vars.ecmaIdentifiers[5]),state.inES6()&&combine(predefined,vars.ecmaIdentifiers[6]),state.option.module&&(state.option.strict===!0&&(state.option.strict="global"),state.inES6()||warning("W134",state.tokens.next,"module",6)),state.option.couch&&combine(predefined,vars.couch),state.option.qunit&&combine(predefined,vars.qunit),state.option.rhino&&combine(predefined,vars.rhino),state.option.shelljs&&(combine(predefined,vars.shelljs),combine(predefined,vars.node)),state.option.typed&&combine(predefined,vars.typed),state.option.phantom&&(combine(predefined,vars.phantom),state.option.strict===!0&&(state.option.strict="global")),state.option.prototypejs&&combine(predefined,vars.prototypejs),state.option.node&&(combine(predefined,vars.node),combine(predefined,vars.typed),state.option.strict===!0&&(state.option.strict="global")),state.option.devel&&combine(predefined,vars.devel),state.option.dojo&&combine(predefined,vars.dojo),state.option.browser&&(combine(predefined,vars.browser),combine(predefined,vars.typed)),state.option.browserify&&(combine(predefined,vars.browser),combine(predefined,vars.typed),combine(predefined,vars.browserify),state.option.strict===!0&&(state.option.strict="global")),state.option.nonstandard&&combine(predefined,vars.nonstandard),state.option.jasmine&&combine(predefined,vars.jasmine),state.option.jquery&&combine(predefined,vars.jquery),state.option.mootools&&combine(predefined,vars.mootools),state.option.worker&&combine(predefined,vars.worker),state.option.wsh&&combine(predefined,vars.wsh),state.option.globalstrict&&state.option.strict!==!1&&(state.option.strict="global"),state.option.yui&&combine(predefined,vars.yui),state.option.mocha&&combine(predefined,vars.mocha)}function quit(code,line,chr){var percentage=Math.floor(100*(line/state.lines.length)),message=messages.errors[code].desc;throw{name:"JSHintError",line:line,character:chr,message:message+" ("+percentage+"% scanned).",raw:message,code:code}}function removeIgnoredMessages(){var ignored=state.ignoredLines;_.isEmpty(ignored)||(JSHINT.errors=_.reject(JSHINT.errors,function(err){return ignored[err.line]}))}function warning(code,t,a,b,c,d){var ch,l,w,msg;if(/^W\\d{3}$/.test(code)){if(state.ignored[code])return;msg=messages.warnings[code]}else/E\\d{3}/.test(code)?msg=messages.errors[code]:/I\\d{3}/.test(code)&&(msg=messages.info[code]);return t=t||state.tokens.next||{},"(end)"===t.id&&(t=state.tokens.curr),l=t.line||0,ch=t.from||0,w={id:"(error)",raw:msg.desc,code:msg.code,evidence:state.lines[l-1]||"",line:l,character:ch,scope:JSHINT.scope,a:a,b:b,c:c,d:d},w.reason=supplant(msg.desc,w),JSHINT.errors.push(w),removeIgnoredMessages(),JSHINT.errors.length>=state.option.maxerr&&quit("E043",l,ch),w}function warningAt(m,l,ch,a,b,c,d){return warning(m,{line:l,from:ch},a,b,c,d)}function error(m,t,a,b,c,d){warning(m,t,a,b,c,d)}function errorAt(m,l,ch,a,b,c,d){return error(m,{line:l,from:ch},a,b,c,d)}function addInternalSrc(elem,src){var i;return i={id:"(internal)",elem:elem,value:src},JSHINT.internals.push(i),i}function doOption(){var nt=state.tokens.next,body=nt.body.match(/(-\\s+)?[^\\s,:]+(?:\\s*:\\s*(-\\s+)?[^\\s,]+)?/g)||[],predef={};if("globals"===nt.type){body.forEach(function(g,idx){g=g.split(":");var key=(g[0]||"").trim(),val=(g[1]||"").trim();if("-"===key||!key.length){if(idx>0&&idx===body.length-1)return;return error("E002",nt),void 0}"-"===key.charAt(0)?(key=key.slice(1),val=!1,JSHINT.blacklist[key]=key,delete predefined[key]):predef[key]="true"===val}),combine(predefined,predef);for(var key in predef)_.has(predef,key)&&(declared[key]=nt)}"exported"===nt.type&&body.forEach(function(e,idx){if(!e.length){if(idx>0&&idx===body.length-1)return;return error("E002",nt),void 0}state.funct["(scope)"].addExported(e)}),"members"===nt.type&&(membersOnly=membersOnly||{},body.forEach(function(m){var ch1=m.charAt(0),ch2=m.charAt(m.length-1);ch1!==ch2||\'"\'!==ch1&&"\'"!==ch1||(m=m.substr(1,m.length-2).replace(\'\\\\"\',\'"\')),membersOnly[m]=!1}));var numvals=["maxstatements","maxparams","maxdepth","maxcomplexity","maxerr","maxlen","indent"];("jshint"===nt.type||"jslint"===nt.type)&&(body.forEach(function(g){g=g.split(":");var key=(g[0]||"").trim(),val=(g[1]||"").trim();if(checkOption(key,nt))if(numvals.indexOf(key)>=0)if("false"!==val){if(val=+val,"number"!=typeof val||!isFinite(val)||0>=val||Math.floor(val)!==val)return error("E032",nt,g[1].trim()),void 0;state.option[key]=val}else state.option[key]="indent"===key?4:!1;else{if("validthis"===key)return state.funct["(global)"]?void error("E009"):"true"!==val&&"false"!==val?void error("E002",nt):(state.option.validthis="true"===val,void 0);if("quotmark"!==key)if("shadow"!==key)if("unused"!==key)if("latedef"!==key)if("ignore"!==key)if("strict"!==key){"module"===key&&(hasParsedCode(state.funct)||error("E055",state.tokens.next,"module"));var esversions={es3:3,es5:5,esnext:6};if(!_.has(esversions,key)){if("esversion"===key){switch(val){case"5":state.inES5(!0)&&warning("I003");case"3":case"6":state.option.moz=!1,state.option.esversion=+val;break;case"2015":state.option.moz=!1,state.option.esversion=6;break;default:error("E002",nt)}return hasParsedCode(state.funct)||error("E055",state.tokens.next,"esversion"),void 0}var match=/^([+-])(W\\d{3})$/g.exec(key);if(match)return state.ignored[match[2]]="-"===match[1],void 0;var tn;return"true"===val||"false"===val?("jslint"===nt.type?(tn=options.renamed[key]||key,state.option[tn]="true"===val,void 0!==options.inverted[tn]&&(state.option[tn]=!state.option[tn])):state.option[key]="true"===val,"newcap"===key&&(state.option["(explicitNewcap)"]=!0),void 0):(error("E002",nt),void 0)}switch(val){case"true":state.option.moz=!1,state.option.esversion=esversions[key];break;case"false":state.option.moz||(state.option.esversion=5);break;default:error("E002",nt)}}else switch(val){case"true":state.option.strict=!0;break;case"false":state.option.strict=!1;break;case"func":case"global":case"implied":state.option.strict=val;break;default:error("E002",nt)}else switch(val){case"line":state.ignoredLines[nt.line]=!0,removeIgnoredMessages();break;default:error("E002",nt)}else switch(val){case"true":state.option.latedef=!0;break;case"false":state.option.latedef=!1;break;case"nofunc":state.option.latedef="nofunc";break;default:error("E002",nt)}else switch(val){case"true":state.option.unused=!0;break;case"false":state.option.unused=!1;break;case"vars":case"strict":state.option.unused=val;break;default:error("E002",nt)}else switch(val){case"true":state.option.shadow=!0;break;case"outer":state.option.shadow="outer";break;case"false":case"inner":state.option.shadow="inner";break;default:error("E002",nt)}else switch(val){case"true":case"false":state.option.quotmark="true"===val;break;case"double":case"single":state.option.quotmark=val;break;default:error("E002",nt)}}}),assume())}function peek(p){var t,i=p||0,j=lookahead.length;if(j>i)return lookahead[i];for(;i>=j;)t=lookahead[j],t||(t=lookahead[j]=lex.token()),j+=1;return t||"(end)"!==state.tokens.next.id?t:state.tokens.next}function peekIgnoreEOL(){var t,i=0;do t=peek(i++);while("(endline)"===t.id);return t}function advance(id,t){switch(state.tokens.curr.id){case"(number)":"."===state.tokens.next.id&&warning("W005",state.tokens.curr);break;case"-":("-"===state.tokens.next.id||"--"===state.tokens.next.id)&&warning("W006");break;case"+":("+"===state.tokens.next.id||"++"===state.tokens.next.id)&&warning("W007")}for(id&&state.tokens.next.id!==id&&(t?"(end)"===state.tokens.next.id?error("E019",t,t.id):error("E020",state.tokens.next,id,t.id,t.line,state.tokens.next.value):("(identifier)"!==state.tokens.next.type||state.tokens.next.value!==id)&&warning("W116",state.tokens.next,id,state.tokens.next.value)),state.tokens.prev=state.tokens.curr,state.tokens.curr=state.tokens.next;;){if(state.tokens.next=lookahead.shift()||lex.token(),state.tokens.next||quit("E041",state.tokens.curr.line),"(end)"===state.tokens.next.id||"(error)"===state.tokens.next.id)return;if(state.tokens.next.check&&state.tokens.next.check(),state.tokens.next.isSpecial)"falls through"===state.tokens.next.type?state.tokens.curr.caseFallsThrough=!0:doOption();else if("(endline)"!==state.tokens.next.id)break}}function isInfix(token){return token.infix||!token.identifier&&!token.template&&!!token.led}function isEndOfExpr(){var curr=state.tokens.curr,next=state.tokens.next;return";"===next.id||"}"===next.id||":"===next.id?!0:isInfix(next)===isInfix(curr)||"yield"===curr.id&&state.inMoz()?curr.line!==startLine(next):!1}function isBeginOfExpr(prev){return!prev.left&&"unary"!==prev.arity}function expression(rbp,initial){var left,isArray=!1,isObject=!1,isLetExpr=!1;state.nameStack.push(),initial||"let"!==state.tokens.next.value||"("!==peek(0).value||(state.inMoz()||warning("W118",state.tokens.next,"let expressions"),isLetExpr=!0,state.funct["(scope)"].stack(),advance("let"),advance("("),state.tokens.prev.fud(),advance(")")),"(end)"===state.tokens.next.id&&error("E006",state.tokens.curr);var isDangerous=state.option.asi&&state.tokens.prev.line!==startLine(state.tokens.curr)&&_.contains(["]",")"],state.tokens.prev.id)&&_.contains(["[","("],state.tokens.curr.id);if(isDangerous&&warning("W014",state.tokens.curr,state.tokens.curr.id),advance(),initial&&(state.funct["(verb)"]=state.tokens.curr.value,state.tokens.curr.beginsStmt=!0),initial===!0&&state.tokens.curr.fud)left=state.tokens.curr.fud();else for(state.tokens.curr.nud?left=state.tokens.curr.nud():error("E030",state.tokens.curr,state.tokens.curr.id);(state.tokens.next.lbp>rbp||"(template)"===state.tokens.next.type)&&!isEndOfExpr();)isArray="Array"===state.tokens.curr.value,isObject="Object"===state.tokens.curr.value,left&&(left.value||left.first&&left.first.value)&&("new"!==left.value||left.first&&left.first.value&&"."===left.first.value)&&(isArray=!1,left.value!==state.tokens.curr.value&&(isObject=!1)),advance(),isArray&&"("===state.tokens.curr.id&&")"===state.tokens.next.id&&warning("W009",state.tokens.curr),isObject&&"("===state.tokens.curr.id&&")"===state.tokens.next.id&&warning("W010",state.tokens.curr),left&&state.tokens.curr.led?left=state.tokens.curr.led(left):error("E033",state.tokens.curr,state.tokens.curr.id);return isLetExpr&&state.funct["(scope)"].unstack(),state.nameStack.pop(),left}function startLine(token){return token.startLine||token.line}function nobreaknonadjacent(left,right){left=left||state.tokens.curr,right=right||state.tokens.next,state.option.laxbreak||left.line===startLine(right)||warning("W014",right,right.value)}function nolinebreak(t){t=t||state.tokens.curr,t.line!==startLine(state.tokens.next)&&warning("E022",t,t.value)}function nobreakcomma(left,right){left.line!==startLine(right)&&(state.option.laxcomma||(comma.first&&(warning("I001"),comma.first=!1),warning("W014",left,right.value)))}function comma(opts){if(opts=opts||{},opts.peek?nobreakcomma(state.tokens.prev,state.tokens.curr):(nobreakcomma(state.tokens.curr,state.tokens.next),advance(",")),state.tokens.next.identifier&&(!opts.property||!state.inES5()))switch(state.tokens.next.value){case"break":case"case":case"catch":case"continue":case"default":case"do":case"else":case"finally":case"for":case"if":case"in":case"instanceof":case"return":case"switch":case"throw":case"try":case"var":case"let":case"while":case"with":return error("E024",state.tokens.next,state.tokens.next.value),!1}if("(punctuator)"===state.tokens.next.type)switch(state.tokens.next.value){case"}":case"]":case",":if(opts.allowTrailing)return!0;case")":return error("E024",state.tokens.next,state.tokens.next.value),!1}return!0}function symbol(s,p){var x=state.syntax[s];return x&&"object"==typeof x||(state.syntax[s]=x={id:s,lbp:p,value:s}),x}function delim(s){var x=symbol(s,0);return x.delim=!0,x}function stmt(s,f){var x=delim(s);return x.identifier=x.reserved=!0,x.fud=f,x}function blockstmt(s,f){var x=stmt(s,f);return x.block=!0,x}function reserveName(x){var c=x.id.charAt(0);return(c>="a"&&"z">=c||c>="A"&&"Z">=c)&&(x.identifier=x.reserved=!0),x}function prefix(s,f){var x=symbol(s,150);return reserveName(x),x.nud="function"==typeof f?f:function(){return this.arity="unary",this.right=expression(150),("++"===this.id||"--"===this.id)&&(state.option.plusplus?warning("W016",this,this.id):!this.right||this.right.identifier&&!isReserved(this.right)||"."===this.right.id||"["===this.right.id||warning("W017",this),this.right&&this.right.isMetaProperty?error("E031",this):this.right&&this.right.identifier&&state.funct["(scope)"].block.modify(this.right.value,this)),this},x}function type(s,f){var x=delim(s);return x.type=s,x.nud=f,x}function reserve(name,func){var x=type(name,func);return x.identifier=!0,x.reserved=!0,x}function FutureReservedWord(name,meta){var x=type(name,meta&&meta.nud||function(){return this});return meta=meta||{},meta.isFutureReservedWord=!0,x.value=name,x.identifier=!0,x.reserved=!0,x.meta=meta,x}function reservevar(s,v){return reserve(s,function(){return"function"==typeof v&&v(this),this})}function infix(s,f,p,w){var x=symbol(s,p);return reserveName(x),x.infix=!0,x.led=function(left){return w||nobreaknonadjacent(state.tokens.prev,state.tokens.curr),"in"!==s&&"instanceof"!==s||"!"!==left.id||warning("W018",left,"!"),"function"==typeof f?f(left,this):(this.left=left,this.right=expression(p),this)},x}function application(s){var x=symbol(s,42);return x.led=function(left){return nobreaknonadjacent(state.tokens.prev,state.tokens.curr),this.left=left,this.right=doFunction({type:"arrow",loneArg:left}),this},x}function relation(s,f){var x=symbol(s,100);return x.led=function(left){nobreaknonadjacent(state.tokens.prev,state.tokens.curr),this.left=left;var right=this.right=expression(100);return isIdentifier(left,"NaN")||isIdentifier(right,"NaN")?warning("W019",this):f&&f.apply(this,[left,right]),left&&right||quit("E041",state.tokens.curr.line),"!"===left.id&&warning("W018",left,"!"),"!"===right.id&&warning("W018",right,"!"),this},x}function isPoorRelation(node){return node&&("(number)"===node.type&&0===+node.value||"(string)"===node.type&&""===node.value||"null"===node.type&&!state.option.eqnull||"true"===node.type||"false"===node.type||"undefined"===node.type)}function isTypoTypeof(left,right,state){var values;return state.option.notypeof?!1:left&&right?(values=state.inES6()?typeofValues.es6:typeofValues.es3,"(identifier)"===right.type&&"typeof"===right.value&&"(string)"===left.type?!_.contains(values,left.value):!1):!1}function isGlobalEval(left,state){var isGlobal=!1;return"this"===left.type&&null===state.funct["(context)"]?isGlobal=!0:"(identifier)"===left.type&&(state.option.node&&"global"===left.value?isGlobal=!0:!state.option.browser||"window"!==left.value&&"document"!==left.value||(isGlobal=!0)),isGlobal}function findNativePrototype(left){function walkPrototype(obj){return"object"==typeof obj?"prototype"===obj.right?obj:walkPrototype(obj.left):void 0}function walkNative(obj){for(;!obj.identifier&&"object"==typeof obj.left;)obj=obj.left;return obj.identifier&&natives.indexOf(obj.value)>=0?obj.value:void 0}var natives=["Array","ArrayBuffer","Boolean","Collator","DataView","Date","DateTimeFormat","Error","EvalError","Float32Array","Float64Array","Function","Infinity","Intl","Int16Array","Int32Array","Int8Array","Iterator","Number","NumberFormat","Object","RangeError","ReferenceError","RegExp","StopIteration","String","SyntaxError","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError"],prototype=walkPrototype(left);return prototype?walkNative(prototype):void 0}function checkLeftSideAssign(left,assignToken,options){var allowDestructuring=options&&options.allowDestructuring;if(assignToken=assignToken||left,state.option.freeze){var nativeObject=findNativePrototype(left);nativeObject&&warning("W121",left,nativeObject)}return left.identifier&&!left.isMetaProperty&&state.funct["(scope)"].block.reassign(left.value,left),"."===left.id?((!left.left||"arguments"===left.left.value&&!state.isStrict())&&warning("E031",assignToken),state.nameStack.set(state.tokens.prev),!0):"{"===left.id||"["===left.id?(allowDestructuring&&state.tokens.curr.left.destructAssign?state.tokens.curr.left.destructAssign.forEach(function(t){t.id&&state.funct["(scope)"].block.modify(t.id,t.token)}):"{"!==left.id&&left.left?"arguments"!==left.left.value||state.isStrict()||warning("E031",assignToken):warning("E031",assignToken),"["===left.id&&state.nameStack.set(left.right),!0):left.isMetaProperty?(error("E031",assignToken),!0):left.identifier&&!isReserved(left)?("exception"===state.funct["(scope)"].labeltype(left.value)&&warning("W022",left),state.nameStack.set(left),!0):(left===state.syntax["function"]&&warning("W023",state.tokens.curr),!1)}function assignop(s,f,p){var x=infix(s,"function"==typeof f?f:function(left,that){return that.left=left,left&&checkLeftSideAssign(left,that,{allowDestructuring:!0})?(that.right=expression(10),that):(error("E031",that),void 0)},p);return x.exps=!0,x.assign=!0,x}function bitwise(s,f,p){var x=symbol(s,p);return reserveName(x),x.led="function"==typeof f?f:function(left){return state.option.bitwise&&warning("W016",this,this.id),this.left=left,this.right=expression(p),this},x}function bitwiseassignop(s){return assignop(s,function(left,that){return state.option.bitwise&&warning("W016",that,that.id),left&&checkLeftSideAssign(left,that)?(that.right=expression(10),that):(error("E031",that),void 0)},20)}function suffix(s){var x=symbol(s,150);return x.led=function(left){return state.option.plusplus?warning("W016",this,this.id):left.identifier&&!isReserved(left)||"."===left.id||"["===left.id||warning("W017",this),left.isMetaProperty?error("E031",this):left&&left.identifier&&state.funct["(scope)"].block.modify(left.value,left),this.left=left,this},x}function optionalidentifier(fnparam,prop,preserve){if(state.tokens.next.identifier){preserve||advance();var curr=state.tokens.curr,val=state.tokens.curr.value;return isReserved(curr)?prop&&state.inES5()?val:fnparam&&"undefined"===val?val:(warning("W024",state.tokens.curr,state.tokens.curr.id),val):val}}function identifier(fnparam,prop){var i=optionalidentifier(fnparam,prop,!1);if(i)return i;if("..."===state.tokens.next.value){if(state.inES6(!0)||warning("W119",state.tokens.next,"spread/rest operator","6"),advance(),checkPunctuator(state.tokens.next,"..."))for(warning("E024",state.tokens.next,"...");checkPunctuator(state.tokens.next,"...");)advance();return state.tokens.next.identifier?identifier(fnparam,prop):(warning("E024",state.tokens.curr,"..."),void 0)}error("E030",state.tokens.next,state.tokens.next.value),";"!==state.tokens.next.id&&advance()}function reachable(controlToken){var t,i=0;if(";"===state.tokens.next.id&&!controlToken.inBracelessBlock)for(;;){do t=peek(i),i+=1;while("(end)"!==t.id&&"(comment)"===t.id);if(t.reach)return;if("(endline)"!==t.id){if("function"===t.id){state.option.latedef===!0&&warning("W026",t);break}warning("W027",t,t.value,controlToken.value);break}}}function parseFinalSemicolon(){if(";"!==state.tokens.next.id){if(state.tokens.next.isUnclosed)return advance();var sameLine=startLine(state.tokens.next)===state.tokens.curr.line&&"(end)"!==state.tokens.next.id,blockEnd=checkPunctuator(state.tokens.next,"}");sameLine&&!blockEnd?errorAt("E058",state.tokens.curr.line,state.tokens.curr.character):state.option.asi||(blockEnd&&!state.option.lastsemic||!sameLine)&&warningAt("W033",state.tokens.curr.line,state.tokens.curr.character)}else advance(";")}function statement(){var r,i=indent,t=state.tokens.next,hasOwnScope=!1;if(";"===t.id)return advance(";"),void 0;var res=isReserved(t);if(res&&t.meta&&t.meta.isFutureReservedWord&&":"===peek().id&&(warning("W024",t,t.id),res=!1),t.identifier&&!res&&":"===peek().id&&(advance(),advance(":"),hasOwnScope=!0,state.funct["(scope)"].stack(),state.funct["(scope)"].block.addBreakLabel(t.value,{token:state.tokens.curr}),state.tokens.next.labelled||"{"===state.tokens.next.value||warning("W028",state.tokens.next,t.value,state.tokens.next.value),state.tokens.next.label=t.value,t=state.tokens.next),"{"===t.id){var iscase="case"===state.funct["(verb)"]&&":"===state.tokens.curr.value;return block(!0,!0,!1,!1,iscase),void 0}return r=expression(0,!0),!r||r.identifier&&"function"===r.value||"(punctuator)"===r.type&&r.left&&r.left.identifier&&"function"===r.left.value||state.isStrict()||"global"!==state.option.strict||warning("E007"),t.block||(state.option.expr||r&&r.exps?state.option.nonew&&r&&r.left&&"("===r.id&&"new"===r.left.id&&warning("W031",t):warning("W030",state.tokens.curr),parseFinalSemicolon()),indent=i,hasOwnScope&&state.funct["(scope)"].unstack(),r}function statements(){for(var p,a=[];!state.tokens.next.reach&&"(end)"!==state.tokens.next.id;)";"===state.tokens.next.id?(p=peek(),(!p||"("!==p.id&&"["!==p.id)&&warning("W032"),advance(";")):a.push(statement());return a}function directives(){for(var i,p,pn;"(string)"===state.tokens.next.id;){if(p=peek(0),"(endline)"===p.id){i=1;do pn=peek(i++);while("(endline)"===pn.id);if(";"===pn.id)p=pn;else{if("["===pn.value||"."===pn.value)break;state.option.asi&&"("!==pn.value||warning("W033",state.tokens.next)}}else{if("."===p.id||"["===p.id)break;";"!==p.id&&warning("W033",p)}advance();var directive=state.tokens.curr.value;(state.directive[directive]||"use strict"===directive&&"implied"===state.option.strict)&&warning("W034",state.tokens.curr,directive),state.directive[directive]=!0,";"===p.id&&advance(";")}state.isStrict()&&(state.option["(explicitNewcap)"]||(state.option.newcap=!0),state.option.undef=!0)}function block(ordinary,stmt,isfunc,isfatarrow,iscase){var a,m,t,line,d,b=inblock,old_indent=indent;inblock=ordinary,t=state.tokens.next;var metrics=state.funct["(metrics)"];if(metrics.nestedBlockDepth+=1,metrics.verifyMaxNestedBlockDepthPerFunction(),"{"===state.tokens.next.id){if(advance("{"),state.funct["(scope)"].stack(),line=state.tokens.curr.line,"}"!==state.tokens.next.id){for(indent+=state.option.indent;!ordinary&&state.tokens.next.from>indent;)indent+=state.option.indent;if(isfunc){m={};for(d in state.directive)_.has(state.directive,d)&&(m[d]=state.directive[d]);directives(),state.option.strict&&state.funct["(context)"]["(global)"]&&(m["use strict"]||state.isStrict()||warning("E007"))}a=statements(),metrics.statementCount+=a.length,indent-=state.option.indent}advance("}",t),isfunc&&(state.funct["(scope)"].validateParams(),m&&(state.directive=m)),state.funct["(scope)"].unstack(),indent=old_indent}else if(ordinary)state.funct["(noblockscopedvar)"]="for"!==state.tokens.next.id,state.funct["(scope)"].stack(),(!stmt||state.option.curly)&&warning("W116",state.tokens.next,"{",state.tokens.next.value),state.tokens.next.inBracelessBlock=!0,indent+=state.option.indent,a=[statement()],indent-=state.option.indent,state.funct["(scope)"].unstack(),delete state.funct["(noblockscopedvar)"];else if(isfunc){if(state.funct["(scope)"].stack(),m={},!stmt||isfatarrow||state.inMoz()||error("W118",state.tokens.curr,"function closure expressions"),!stmt)for(d in state.directive)_.has(state.directive,d)&&(m[d]=state.directive[d]);expression(10),state.option.strict&&state.funct["(context)"]["(global)"]&&(m["use strict"]||state.isStrict()||warning("E007")),state.funct["(scope)"].unstack()}else error("E021",state.tokens.next,"{",state.tokens.next.value);switch(state.funct["(verb)"]){case"break":case"continue":case"return":case"throw":if(iscase)break;default:state.funct["(verb)"]=null}return inblock=b,!ordinary||!state.option.noempty||a&&0!==a.length||warning("W035",state.tokens.prev),metrics.nestedBlockDepth-=1,a}function countMember(m){membersOnly&&"boolean"!=typeof membersOnly[m]&&warning("W036",state.tokens.curr,m),"number"==typeof member[m]?member[m]+=1:member[m]=1}function comprehensiveArrayExpression(){var res={};res.exps=!0,state.funct["(comparray)"].stack();var reversed=!1;return"for"!==state.tokens.next.value&&(reversed=!0,state.inMoz()||warning("W116",state.tokens.next,"for",state.tokens.next.value),state.funct["(comparray)"].setState("use"),res.right=expression(10)),advance("for"),"each"===state.tokens.next.value&&(advance("each"),state.inMoz()||warning("W118",state.tokens.curr,"for each")),advance("("),state.funct["(comparray)"].setState("define"),res.left=expression(130),_.contains(["in","of"],state.tokens.next.value)?advance():error("E045",state.tokens.curr),state.funct["(comparray)"].setState("generate"),expression(10),advance(")"),"if"===state.tokens.next.value&&(advance("if"),advance("("),state.funct["(comparray)"].setState("filter"),res.filter=expression(10),advance(")")),reversed||(state.funct["(comparray)"].setState("use"),res.right=expression(10)),advance("]"),state.funct["(comparray)"].unstack(),res}function isMethod(){return state.funct["(statement)"]&&"class"===state.funct["(statement)"].type||state.funct["(context)"]&&"class"===state.funct["(context)"]["(verb)"]}function isPropertyName(token){return token.identifier||"(string)"===token.id||"(number)"===token.id}function propertyName(preserveOrToken){var id,preserve=!0;return"object"==typeof preserveOrToken?id=preserveOrToken:(preserve=preserveOrToken,id=optionalidentifier(!1,!0,preserve)),id?"object"==typeof id&&("(string)"===id.id||"(identifier)"===id.id?id=id.value:"(number)"===id.id&&(id=""+id.value)):"(string)"===state.tokens.next.id?(id=state.tokens.next.value,preserve||advance()):"(number)"===state.tokens.next.id&&(id=""+state.tokens.next.value,preserve||advance()),"hasOwnProperty"===id&&warning("W001"),id}function functionparams(options){function addParam(addParamArgs){state.funct["(scope)"].addParam.apply(state.funct["(scope)"],addParamArgs)}var next,ident,t,paramsIds=[],tokens=[],pastDefault=!1,pastRest=!1,arity=0,loneArg=options&&options.loneArg;if(loneArg&&loneArg.identifier===!0)return state.funct["(scope)"].addParam(loneArg.value,loneArg),{arity:1,params:[loneArg.value]};if(next=state.tokens.next,options&&options.parsedOpening||advance("("),")"===state.tokens.next.id)return advance(")"),void 0;for(;;){arity++;var currentParams=[];if(_.contains(["{","["],state.tokens.next.id)){tokens=destructuringPattern();for(t in tokens)t=tokens[t],t.id&&(paramsIds.push(t.id),currentParams.push([t.id,t.token]))}else if(checkPunctuator(state.tokens.next,"...")&&(pastRest=!0),ident=identifier(!0))paramsIds.push(ident),currentParams.push([ident,state.tokens.curr]);else for(;!checkPunctuators(state.tokens.next,[",",")"]);)advance();if(pastDefault&&"="!==state.tokens.next.id&&error("W138",state.tokens.current),"="===state.tokens.next.id&&(state.inES6()||warning("W119",state.tokens.next,"default parameters","6"),advance("="),pastDefault=!0,expression(10)),currentParams.forEach(addParam),","!==state.tokens.next.id)return advance(")",next),{arity:arity,params:paramsIds};pastRest&&warning("W131",state.tokens.next),comma()}}function functor(name,token,overwrites){var funct={"(name)":name,"(breakage)":0,"(loopage)":0,"(tokens)":{},"(properties)":{},"(catch)":!1,"(global)":!1,"(line)":null,"(character)":null,"(metrics)":null,"(statement)":null,"(context)":null,"(scope)":null,"(comparray)":null,"(generator)":null,"(arrow)":null,"(params)":null};return token&&_.extend(funct,{"(line)":token.line,"(character)":token.character,"(metrics)":createMetrics(token)}),_.extend(funct,overwrites),funct["(context)"]&&(funct["(scope)"]=funct["(context)"]["(scope)"],funct["(comparray)"]=funct["(context)"]["(comparray)"]),funct}function isFunctor(token){return"(scope)"in token}function hasParsedCode(funct){return funct["(global)"]&&!funct["(verb)"]}function doTemplateLiteral(left){function end(){if(state.tokens.curr.template&&state.tokens.curr.tail&&state.tokens.curr.context===ctx)return!0;var complete=state.tokens.next.template&&state.tokens.next.tail&&state.tokens.next.context===ctx;return complete&&advance(),complete||state.tokens.next.isUnclosed}var ctx=this.context,noSubst=this.noSubst,depth=this.depth;if(!noSubst)for(;!end();)!state.tokens.next.template||state.tokens.next.depth>depth?expression(0):advance();return{id:"(template)",type:"(template)",tag:left}}function doFunction(options){var f,token,name,statement,classExprBinding,isGenerator,isArrow,ignoreLoopFunc,oldOption=state.option,oldIgnored=state.ignored;options&&(name=options.name,statement=options.statement,classExprBinding=options.classExprBinding,isGenerator="generator"===options.type,isArrow="arrow"===options.type,ignoreLoopFunc=options.ignoreLoopFunc),state.option=Object.create(state.option),state.ignored=Object.create(state.ignored),state.funct=functor(name||state.nameStack.infer(),state.tokens.next,{"(statement)":statement,"(context)":state.funct,"(arrow)":isArrow,"(generator)":isGenerator}),f=state.funct,token=state.tokens.curr,token.funct=state.funct,functions.push(state.funct),state.funct["(scope)"].stack("functionouter");var internallyAccessibleName=name||classExprBinding;internallyAccessibleName&&state.funct["(scope)"].block.add(internallyAccessibleName,classExprBinding?"class":"function",state.tokens.curr,!1),state.funct["(scope)"].stack("functionparams");var paramsInfo=functionparams(options);return paramsInfo?(state.funct["(params)"]=paramsInfo.params,state.funct["(metrics)"].arity=paramsInfo.arity,state.funct["(metrics)"].verifyMaxParametersPerFunction()):state.funct["(metrics)"].arity=0,isArrow&&(state.inES6(!0)||warning("W119",state.tokens.curr,"arrow function syntax (=>)","6"),options.loneArg||advance("=>")),block(!1,!0,!0,isArrow),!state.option.noyield&&isGenerator&&"yielded"!==state.funct["(generator)"]&&warning("W124",state.tokens.curr),state.funct["(metrics)"].verifyMaxStatementsPerFunction(),state.funct["(metrics)"].verifyMaxComplexityPerFunction(),state.funct["(unusedOption)"]=state.option.unused,state.option=oldOption,state.ignored=oldIgnored,state.funct["(last)"]=state.tokens.curr.line,state.funct["(lastcharacter)"]=state.tokens.curr.character,state.funct["(scope)"].unstack(),state.funct["(scope)"].unstack(),state.funct=state.funct["(context)"],ignoreLoopFunc||state.option.loopfunc||!state.funct["(loopage)"]||f["(isCapturing)"]&&warning("W083",token),f}function createMetrics(functionStartToken){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,arity:0,verifyMaxStatementsPerFunction:function(){state.option.maxstatements&&this.statementCount>state.option.maxstatements&&warning("W071",functionStartToken,this.statementCount)\n},verifyMaxParametersPerFunction:function(){_.isNumber(state.option.maxparams)&&this.arity>state.option.maxparams&&warning("W072",functionStartToken,this.arity)},verifyMaxNestedBlockDepthPerFunction:function(){state.option.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===state.option.maxdepth+1&&warning("W073",null,this.nestedBlockDepth)},verifyMaxComplexityPerFunction:function(){var max=state.option.maxcomplexity,cc=this.ComplexityCount;max&&cc>max&&warning("W074",functionStartToken,cc)}}}function increaseComplexityCount(){state.funct["(metrics)"].ComplexityCount+=1}function checkCondAssignment(expr){var id,paren;switch(expr&&(id=expr.id,paren=expr.paren,","===id&&(expr=expr.exprs[expr.exprs.length-1])&&(id=expr.id,paren=paren||expr.paren)),id){case"=":case"+=":case"-=":case"*=":case"%=":case"&=":case"|=":case"^=":case"/=":paren||state.option.boss||warning("W084")}}function checkProperties(props){if(state.inES5())for(var name in props)props[name]&&props[name].setterToken&&!props[name].getterToken&&warning("W078",props[name].setterToken)}function metaProperty(name,c){if(checkPunctuator(state.tokens.next,".")){var left=state.tokens.curr.id;advance(".");var id=identifier();return state.tokens.curr.isMetaProperty=!0,name!==id?error("E057",state.tokens.prev,left,id):c(),state.tokens.curr}}function destructuringPattern(options){var isAssignment=options&&options.assignment;return state.inES6()||warning("W104",state.tokens.curr,isAssignment?"destructuring assignment":"destructuring binding","6"),destructuringPatternRecursive(options)}function destructuringPatternRecursive(options){var ids,identifiers=[],openingParsed=options&&options.openingParsed,isAssignment=options&&options.assignment,recursiveOptions=isAssignment?{assignment:isAssignment}:null,firstToken=openingParsed?state.tokens.curr:state.tokens.next,nextInnerDE=function(){var ident;if(checkPunctuators(state.tokens.next,["[","{"])){ids=destructuringPatternRecursive(recursiveOptions);for(var id in ids)id=ids[id],identifiers.push({id:id.id,token:id.token})}else if(checkPunctuator(state.tokens.next,","))identifiers.push({id:null,token:state.tokens.curr});else{if(!checkPunctuator(state.tokens.next,"(")){var is_rest=checkPunctuator(state.tokens.next,"...");if(isAssignment){var identifierToken=is_rest?peek(0):state.tokens.next;identifierToken.identifier||warning("E030",identifierToken,identifierToken.value);var assignTarget=expression(155);assignTarget&&(checkLeftSideAssign(assignTarget),assignTarget.identifier&&(ident=assignTarget.value))}else ident=identifier();return ident&&identifiers.push({id:ident,token:state.tokens.curr}),is_rest}advance("("),nextInnerDE(),advance(")")}return!1},assignmentProperty=function(){var id;checkPunctuator(state.tokens.next,"[")?(advance("["),expression(10),advance("]"),advance(":"),nextInnerDE()):"(string)"===state.tokens.next.id||"(number)"===state.tokens.next.id?(advance(),advance(":"),nextInnerDE()):(id=identifier(),checkPunctuator(state.tokens.next,":")?(advance(":"),nextInnerDE()):id&&(isAssignment&&checkLeftSideAssign(state.tokens.curr),identifiers.push({id:id,token:state.tokens.curr})))};if(checkPunctuator(firstToken,"[")){openingParsed||advance("["),checkPunctuator(state.tokens.next,"]")&&warning("W137",state.tokens.curr);for(var element_after_rest=!1;!checkPunctuator(state.tokens.next,"]");)nextInnerDE()&&!element_after_rest&&checkPunctuator(state.tokens.next,",")&&(warning("W130",state.tokens.next),element_after_rest=!0),checkPunctuator(state.tokens.next,"=")&&(checkPunctuator(state.tokens.prev,"...")?advance("]"):advance("="),"undefined"===state.tokens.next.id&&warning("W080",state.tokens.prev,state.tokens.prev.value),expression(10)),checkPunctuator(state.tokens.next,"]")||advance(",");advance("]")}else if(checkPunctuator(firstToken,"{")){for(openingParsed||advance("{"),checkPunctuator(state.tokens.next,"}")&&warning("W137",state.tokens.curr);!checkPunctuator(state.tokens.next,"}")&&(assignmentProperty(),checkPunctuator(state.tokens.next,"=")&&(advance("="),"undefined"===state.tokens.next.id&&warning("W080",state.tokens.prev,state.tokens.prev.value),expression(10)),checkPunctuator(state.tokens.next,"}")||(advance(","),!checkPunctuator(state.tokens.next,"}"))););advance("}")}return identifiers}function destructuringPatternMatch(tokens,value){var first=value.first;first&&_.zip(tokens,Array.isArray(first)?first:[first]).forEach(function(val){var token=val[0],value=val[1];token&&value?token.first=value:token&&token.first&&!value&&warning("W080",token.first,token.first.value)})}function blockVariableStatement(type,statement,context){var tokens,lone,value,letblock,prefix=context&&context.prefix,inexport=context&&context.inexport,isLet="let"===type,isConst="const"===type;for(state.inES6()||warning("W104",state.tokens.curr,type,"6"),isLet&&"("===state.tokens.next.value?(state.inMoz()||warning("W118",state.tokens.next,"let block"),advance("("),state.funct["(scope)"].stack(),letblock=!0):state.funct["(noblockscopedvar)"]&&error("E048",state.tokens.curr,isConst?"Const":"Let"),statement.first=[];;){var names=[];_.contains(["{","["],state.tokens.next.value)?(tokens=destructuringPattern(),lone=!1):(tokens=[{id:identifier(),token:state.tokens.curr}],lone=!0),!prefix&&isConst&&"="!==state.tokens.next.id&&warning("E012",state.tokens.curr,state.tokens.curr.value);for(var t in tokens)tokens.hasOwnProperty(t)&&(t=tokens[t],state.funct["(scope)"].block.isGlobal()&&predefined[t.id]===!1&&warning("W079",t.token,t.id),t.id&&!state.funct["(noblockscopedvar)"]&&(state.funct["(scope)"].addlabel(t.id,{type:type,token:t.token}),names.push(t.token),lone&&inexport&&state.funct["(scope)"].setExported(t.token.value,t.token)));if("="===state.tokens.next.id&&(advance("="),prefix||"undefined"!==state.tokens.next.id||warning("W080",state.tokens.prev,state.tokens.prev.value),!prefix&&"="===peek(0).id&&state.tokens.next.identifier&&warning("W120",state.tokens.next,state.tokens.next.value),value=expression(prefix?120:10),lone?tokens[0].first=value:destructuringPatternMatch(names,value)),statement.first=statement.first.concat(names),","!==state.tokens.next.id)break;comma()}return letblock&&(advance(")"),block(!0,!0),statement.block=!0,state.funct["(scope)"].unstack()),statement}function classdef(isStatement){return state.inES6()||warning("W104",state.tokens.curr,"class","6"),isStatement?(this.name=identifier(),state.funct["(scope)"].addlabel(this.name,{type:"class",token:state.tokens.curr})):state.tokens.next.identifier&&"extends"!==state.tokens.next.value?(this.name=identifier(),this.namedExpr=!0):this.name=state.nameStack.infer(),classtail(this),this}function classtail(c){var wasInClassBody=state.inClassBody;"extends"===state.tokens.next.value&&(advance("extends"),c.heritage=expression(10)),state.inClassBody=!0,advance("{"),c.body=classbody(c),advance("}"),state.inClassBody=wasInClassBody}function classbody(c){for(var name,isStatic,isGenerator,getset,computed,props=Object.create(null),staticProps=Object.create(null),i=0;"}"!==state.tokens.next.id;++i)if(name=state.tokens.next,isStatic=!1,isGenerator=!1,getset=null,";"!==name.id){if("*"===name.id&&(isGenerator=!0,advance("*"),name=state.tokens.next),"["===name.id)name=computedPropertyName(),computed=!0;else{if(!isPropertyName(name)){warning("W052",state.tokens.next,state.tokens.next.value||state.tokens.next.type),advance();continue}advance(),computed=!1,name.identifier&&"static"===name.value&&(checkPunctuator(state.tokens.next,"*")&&(isGenerator=!0,advance("*")),(isPropertyName(state.tokens.next)||"["===state.tokens.next.id)&&(computed="["===state.tokens.next.id,isStatic=!0,name=state.tokens.next,"["===state.tokens.next.id?name=computedPropertyName():advance())),!name.identifier||"get"!==name.value&&"set"!==name.value||(isPropertyName(state.tokens.next)||"["===state.tokens.next.id)&&(computed="["===state.tokens.next.id,getset=name,name=state.tokens.next,"["===state.tokens.next.id?name=computedPropertyName():advance())}if(!checkPunctuator(state.tokens.next,"(")){for(error("E054",state.tokens.next,state.tokens.next.value);"}"!==state.tokens.next.id&&!checkPunctuator(state.tokens.next,"(");)advance();"("!==state.tokens.next.value&&doFunction({statement:c})}if(computed||(getset?saveAccessor(getset.value,isStatic?staticProps:props,name.value,name,!0,isStatic):("constructor"===name.value?state.nameStack.set(c):state.nameStack.set(name),saveProperty(isStatic?staticProps:props,name.value,name,!0,isStatic))),getset&&"constructor"===name.value){var propDesc="get"===getset.value?"class getter method":"class setter method";error("E049",name,propDesc,"constructor")}else"prototype"===name.value&&error("E049",name,"class method","prototype");propertyName(name),doFunction({statement:c,type:isGenerator?"generator":null,classExprBinding:c.namedExpr?c.name:null})}else warning("W032"),advance(";");checkProperties(props)}function saveProperty(props,name,tkn,isClass,isStatic){var msg=["key","class method","static class method"];msg=msg[(isClass||!1)+(isStatic||!1)],tkn.identifier&&(name=tkn.value),props[name]&&"__proto__"!==name?warning("W075",state.tokens.next,msg,name):props[name]=Object.create(null),props[name].basic=!0,props[name].basictkn=tkn}function saveAccessor(accessorType,props,name,tkn,isClass,isStatic){var flagName="get"===accessorType?"getterToken":"setterToken",msg="";isClass?(isStatic&&(msg+="static "),msg+=accessorType+"ter method"):msg="key",state.tokens.curr.accessorType=accessorType,state.nameStack.set(tkn),props[name]?(props[name].basic||props[name][flagName])&&"__proto__"!==name&&warning("W075",state.tokens.next,msg,name):props[name]=Object.create(null),props[name][flagName]=tkn}function computedPropertyName(){advance("["),state.inES6()||warning("W119",state.tokens.curr,"computed property names","6");var value=expression(10);return advance("]"),value}function checkPunctuators(token,values){return"(punctuator)"===token.type?_.contains(values,token.value):!1}function checkPunctuator(token,value){return"(punctuator)"===token.type&&token.value===value}function destructuringAssignOrJsonValue(){var block=lookupBlockType();block.notJson?(!state.inES6()&&block.isDestAssign&&warning("W104",state.tokens.curr,"destructuring assignment","6"),statements()):(state.option.laxbreak=!0,state.jsonMode=!0,jsonValue())}function jsonValue(){function jsonObject(){var o={},t=state.tokens.next;if(advance("{"),"}"!==state.tokens.next.id)for(;;){if("(end)"===state.tokens.next.id)error("E026",state.tokens.next,t.line);else{if("}"===state.tokens.next.id){warning("W094",state.tokens.curr);break}","===state.tokens.next.id?error("E028",state.tokens.next):"(string)"!==state.tokens.next.id&&warning("W095",state.tokens.next,state.tokens.next.value)}if(o[state.tokens.next.value]===!0?warning("W075",state.tokens.next,"key",state.tokens.next.value):"__proto__"===state.tokens.next.value&&!state.option.proto||"__iterator__"===state.tokens.next.value&&!state.option.iterator?warning("W096",state.tokens.next,state.tokens.next.value):o[state.tokens.next.value]=!0,advance(),advance(":"),jsonValue(),","!==state.tokens.next.id)break;advance(",")}advance("}")}function jsonArray(){var t=state.tokens.next;if(advance("["),"]"!==state.tokens.next.id)for(;;){if("(end)"===state.tokens.next.id)error("E027",state.tokens.next,t.line);else{if("]"===state.tokens.next.id){warning("W094",state.tokens.curr);break}","===state.tokens.next.id&&error("E028",state.tokens.next)}if(jsonValue(),","!==state.tokens.next.id)break;advance(",")}advance("]")}switch(state.tokens.next.id){case"{":jsonObject();break;case"[":jsonArray();break;case"true":case"false":case"null":case"(number)":case"(string)":advance();break;case"-":advance("-"),advance("(number)");break;default:error("E003",state.tokens.next)}}var api,declared,functions,inblock,indent,lookahead,lex,member,membersOnly,predefined,stack,urls,bang={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},functionicity=["closure","exception","global","label","outer","unused","var"],extraModules=[],emitter=new events.EventEmitter,typeofValues={};typeofValues.legacy=["xml","unknown"],typeofValues.es3=["undefined","boolean","number","string","function","object"],typeofValues.es3=typeofValues.es3.concat(typeofValues.legacy),typeofValues.es6=typeofValues.es3.concat("symbol"),type("(number)",function(){return this}),type("(string)",function(){return this}),state.syntax["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var v=this.value;return"=>"===state.tokens.next.id?this:(state.funct["(comparray)"].check(v)||state.funct["(scope)"].block.use(v,state.tokens.curr),this)},led:function(){error("E033",state.tokens.next,state.tokens.next.value)}};var baseTemplateSyntax={lbp:0,identifier:!1,template:!0};state.syntax["(template)"]=_.extend({type:"(template)",nud:doTemplateLiteral,led:doTemplateLiteral,noSubst:!1},baseTemplateSyntax),state.syntax["(template middle)"]=_.extend({type:"(template middle)",middle:!0,noSubst:!1},baseTemplateSyntax),state.syntax["(template tail)"]=_.extend({type:"(template tail)",tail:!0,noSubst:!1},baseTemplateSyntax),state.syntax["(no subst template)"]=_.extend({type:"(template)",nud:doTemplateLiteral,led:doTemplateLiteral,noSubst:!0,tail:!0},baseTemplateSyntax),type("(regexp)",function(){return this}),delim("(endline)"),delim("(begin)"),delim("(end)").reach=!0,delim("(error)").reach=!0,delim("}").reach=!0,delim(")"),delim("]"),delim(\'"\').reach=!0,delim("\'").reach=!0,delim(";"),delim(":").reach=!0,delim("#"),reserve("else"),reserve("case").reach=!0,reserve("catch"),reserve("default").reach=!0,reserve("finally"),reservevar("arguments",function(x){state.isStrict()&&state.funct["(global)"]&&warning("E008",x)}),reservevar("eval"),reservevar("false"),reservevar("Infinity"),reservevar("null"),reservevar("this",function(x){state.isStrict()&&!isMethod()&&!state.option.validthis&&(state.funct["(statement)"]&&state.funct["(name)"].charAt(0)>"Z"||state.funct["(global)"])&&warning("W040",x)}),reservevar("true"),reservevar("undefined"),assignop("=","assign",20),assignop("+=","assignadd",20),assignop("-=","assignsub",20),assignop("*=","assignmult",20),assignop("/=","assigndiv",20).nud=function(){error("E014")},assignop("%=","assignmod",20),bitwiseassignop("&="),bitwiseassignop("|="),bitwiseassignop("^="),bitwiseassignop("<<="),bitwiseassignop(">>="),bitwiseassignop(">>>="),infix(",",function(left,that){var expr;if(that.exprs=[left],state.option.nocomma&&warning("W127"),!comma({peek:!0}))return that;for(;;){if(!(expr=expression(10)))break;if(that.exprs.push(expr),","!==state.tokens.next.value||!comma())break}return that},10,!0),infix("?",function(left,that){return increaseComplexityCount(),that.left=left,that.right=expression(10),advance(":"),that["else"]=expression(10),that},30);var orPrecendence=40;infix("||",function(left,that){return increaseComplexityCount(),that.left=left,that.right=expression(orPrecendence),that},orPrecendence),infix("&&","and",50),bitwise("|","bitor",70),bitwise("^","bitxor",80),bitwise("&","bitand",90),relation("==",function(left,right){var eqnull=state.option.eqnull&&("null"===(left&&left.value)||"null"===(right&&right.value));switch(!0){case!eqnull&&state.option.eqeqeq:this.from=this.character,warning("W116",this,"===","==");break;case isPoorRelation(left):warning("W041",this,"===",left.value);break;case isPoorRelation(right):warning("W041",this,"===",right.value);break;case isTypoTypeof(right,left,state):warning("W122",this,right.value);break;case isTypoTypeof(left,right,state):warning("W122",this,left.value)}return this}),relation("===",function(left,right){return isTypoTypeof(right,left,state)?warning("W122",this,right.value):isTypoTypeof(left,right,state)&&warning("W122",this,left.value),this}),relation("!=",function(left,right){var eqnull=state.option.eqnull&&("null"===(left&&left.value)||"null"===(right&&right.value));return!eqnull&&state.option.eqeqeq?(this.from=this.character,warning("W116",this,"!==","!=")):isPoorRelation(left)?warning("W041",this,"!==",left.value):isPoorRelation(right)?warning("W041",this,"!==",right.value):isTypoTypeof(right,left,state)?warning("W122",this,right.value):isTypoTypeof(left,right,state)&&warning("W122",this,left.value),this}),relation("!==",function(left,right){return isTypoTypeof(right,left,state)?warning("W122",this,right.value):isTypoTypeof(left,right,state)&&warning("W122",this,left.value),this}),relation("<"),relation(">"),relation("<="),relation(">="),bitwise("<<","shiftleft",120),bitwise(">>","shiftright",120),bitwise(">>>","shiftrightunsigned",120),infix("in","in",120),infix("instanceof","instanceof",120),infix("+",function(left,that){var right;return that.left=left,that.right=right=expression(130),left&&right&&"(string)"===left.id&&"(string)"===right.id?(left.value+=right.value,left.character=right.character,!state.option.scripturl&®.javascriptURL.test(left.value)&&warning("W050",left),left):that},130),prefix("+","num"),prefix("+++",function(){return warning("W007"),this.arity="unary",this.right=expression(150),this}),infix("+++",function(left){return warning("W007"),this.left=left,this.right=expression(130),this},130),infix("-","sub",130),prefix("-","neg"),prefix("---",function(){return warning("W006"),this.arity="unary",this.right=expression(150),this}),infix("---",function(left){return warning("W006"),this.left=left,this.right=expression(130),this},130),infix("*","mult",140),infix("/","div",140),infix("%","mod",140),suffix("++"),prefix("++","preinc"),state.syntax["++"].exps=!0,suffix("--"),prefix("--","predec"),state.syntax["--"].exps=!0,prefix("delete",function(){var p=expression(10);return p?("."!==p.id&&"["!==p.id&&warning("W051"),this.first=p,p.identifier&&!state.isStrict()&&(p.forgiveUndef=!0),this):this}).exps=!0,prefix("~",function(){return state.option.bitwise&&warning("W016",this,"~"),this.arity="unary",this.right=expression(150),this}),prefix("...",function(){return state.inES6(!0)||warning("W119",this,"spread/rest operator","6"),state.tokens.next.identifier||"(string)"===state.tokens.next.type||checkPunctuators(state.tokens.next,["[","("])||error("E030",state.tokens.next,state.tokens.next.value),expression(150),this}),prefix("!",function(){return this.arity="unary",this.right=expression(150),this.right||quit("E041",this.line||0),bang[this.right.id]===!0&&warning("W018",this,"!"),this}),prefix("typeof",function(){var p=expression(150);return this.first=this.right=p,p||quit("E041",this.line||0,this.character||0),p.identifier&&(p.forgiveUndef=!0),this}),prefix("new",function(){var mp=metaProperty("target",function(){state.inES6(!0)||warning("W119",state.tokens.prev,"new.target","6");for(var inFunction,c=state.funct;c&&(inFunction=!c["(global)"],c["(arrow)"]);)c=c["(context)"];inFunction||warning("W136",state.tokens.prev,"new.target")});if(mp)return mp;var i,c=expression(155);if(c&&"function"!==c.id)if(c.identifier)switch(c["new"]=!0,c.value){case"Number":case"String":case"Boolean":case"Math":case"JSON":warning("W053",state.tokens.prev,c.value);break;case"Symbol":state.inES6()&&warning("W053",state.tokens.prev,c.value);break;case"Function":state.option.evil||warning("W054");break;case"Date":case"RegExp":case"this":break;default:"function"!==c.id&&(i=c.value.substr(0,1),state.option.newcap&&("A">i||i>"Z")&&!state.funct["(scope)"].isPredefined(c.value)&&warning("W055",state.tokens.curr))}else"."!==c.id&&"["!==c.id&&"("!==c.id&&warning("W056",state.tokens.curr);else state.option.supernew||warning("W057",this);return"("===state.tokens.next.id||state.option.supernew||warning("W058",state.tokens.curr,state.tokens.curr.value),this.first=this.right=c,this}),state.syntax["new"].exps=!0,prefix("void").exps=!0,infix(".",function(left,that){var m=identifier(!1,!0);return"string"==typeof m&&countMember(m),that.left=left,that.right=m,m&&"hasOwnProperty"===m&&"="===state.tokens.next.value&&warning("W001"),!left||"arguments"!==left.value||"callee"!==m&&"caller"!==m?state.option.evil||!left||"document"!==left.value||"write"!==m&&"writeln"!==m||warning("W060",left):state.option.noarg?warning("W059",left,m):state.isStrict()&&error("E008"),state.option.evil||"eval"!==m&&"execScript"!==m||isGlobalEval(left,state)&&warning("W061"),that},160,!0),infix("(",function(left,that){state.option.immed&&left&&!left.immed&&"function"===left.id&&warning("W062");var n=0,p=[];if(left&&"(identifier)"===left.type&&left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&-1==="Array Number String Boolean Date Object Error Symbol".indexOf(left.value)&&("Math"===left.value?warning("W063",left):state.option.newcap&&warning("W064",left)),")"!==state.tokens.next.id)for(;p[p.length]=expression(10),n+=1,","===state.tokens.next.id;)comma();return advance(")"),"object"==typeof left&&(state.inES5()||"parseInt"!==left.value||1!==n||warning("W065",state.tokens.curr),state.option.evil||("eval"===left.value||"Function"===left.value||"execScript"===left.value?(warning("W061",left),p[0]&&"(string)"===[0].id&&addInternalSrc(left,p[0].value)):!p[0]||"(string)"!==p[0].id||"setTimeout"!==left.value&&"setInterval"!==left.value?!p[0]||"(string)"!==p[0].id||"."!==left.value||"window"!==left.left.value||"setTimeout"!==left.right&&"setInterval"!==left.right||(warning("W066",left),addInternalSrc(left,p[0].value)):(warning("W066",left),addInternalSrc(left,p[0].value))),left.identifier||"."===left.id||"["===left.id||"=>"===left.id||"("===left.id||"&&"===left.id||"||"===left.id||"?"===left.id||state.inES6()&&left["(name)"]||warning("W067",that)),that.left=left,that},155,!0).exps=!0,prefix("(",function(){var pn1,ret,triggerFnExpr,first,last,pn=state.tokens.next,i=-1,parens=1,opening=state.tokens.curr,preceeding=state.tokens.prev,isNecessary=!state.option.singleGroups;do"("===pn.value?parens+=1:")"===pn.value&&(parens-=1),i+=1,pn1=pn,pn=peek(i);while((0!==parens||")"!==pn1.value)&&";"!==pn.value&&"(end)"!==pn.type);if("function"===state.tokens.next.id&&(triggerFnExpr=state.tokens.next.immed=!0),"=>"===pn.value)return doFunction({type:"arrow",parsedOpening:!0});var exprs=[];if(")"!==state.tokens.next.id)for(;exprs.push(expression(10)),","===state.tokens.next.id;)state.option.nocomma&&warning("W127"),comma();return advance(")",this),state.option.immed&&exprs[0]&&"function"===exprs[0].id&&"("!==state.tokens.next.id&&"."!==state.tokens.next.id&&"["!==state.tokens.next.id&&warning("W068",this),exprs.length?(exprs.length>1?(ret=Object.create(state.syntax[","]),ret.exprs=exprs,first=exprs[0],last=exprs[exprs.length-1],isNecessary||(isNecessary=preceeding.assign||preceeding.delim)):(ret=first=last=exprs[0],isNecessary||(isNecessary=opening.beginsStmt&&("{"===ret.id||triggerFnExpr||isFunctor(ret))||triggerFnExpr&&(!isEndOfExpr()||"}"!==state.tokens.prev.id)||isFunctor(ret)&&!isEndOfExpr()||"{"===ret.id&&"=>"===preceeding.id||"(number)"===ret.type&&checkPunctuator(pn,".")&&/^\\d+$/.test(ret.value))),ret&&(!isNecessary&&(first.left||first.right||ret.exprs)&&(isNecessary=!isBeginOfExpr(preceeding)&&first.lbp<=preceeding.lbp||!isEndOfExpr()&&last.lbp<state.tokens.next.lbp),isNecessary||warning("W126",opening),ret.paren=!0),ret):void 0}),application("=>"),infix("[",function(left,that){var s,e=expression(10);return e&&"(string)"===e.type&&(state.option.evil||"eval"!==e.value&&"execScript"!==e.value||isGlobalEval(left,state)&&warning("W061"),countMember(e.value),!state.option.sub&®.identifier.test(e.value)&&(s=state.syntax[e.value],s&&isReserved(s)||warning("W069",state.tokens.prev,e.value))),advance("]",that),e&&"hasOwnProperty"===e.value&&"="===state.tokens.next.value&&warning("W001"),that.left=left,that.right=e,that},160,!0),prefix("[",function(){var blocktype=lookupBlockType();if(blocktype.isCompArray)return state.option.esnext||state.inMoz()||warning("W118",state.tokens.curr,"array comprehension"),comprehensiveArrayExpression();if(blocktype.isDestAssign)return this.destructAssign=destructuringPattern({openingParsed:!0,assignment:!0}),this;var b=state.tokens.curr.line!==startLine(state.tokens.next);for(this.first=[],b&&(indent+=state.option.indent,state.tokens.next.from===indent+state.option.indent&&(indent+=state.option.indent));"(end)"!==state.tokens.next.id;){for(;","===state.tokens.next.id;){if(!state.option.elision){if(state.inES5()){warning("W128");do advance(",");while(","===state.tokens.next.id);continue}warning("W070")}advance(",")}if("]"===state.tokens.next.id)break;if(this.first.push(expression(10)),","!==state.tokens.next.id)break;if(comma({allowTrailing:!0}),"]"===state.tokens.next.id&&!state.inES5()){warning("W070",state.tokens.curr);break}}return b&&(indent-=state.option.indent),advance("]",this),this}),function(x){x.nud=function(){var b,f,i,p,t,nextVal,isGeneratorMethod=!1,props=Object.create(null);b=state.tokens.curr.line!==startLine(state.tokens.next),b&&(indent+=state.option.indent,state.tokens.next.from===indent+state.option.indent&&(indent+=state.option.indent));var blocktype=lookupBlockType();if(blocktype.isDestAssign)return this.destructAssign=destructuringPattern({openingParsed:!0,assignment:!0}),this;for(;"}"!==state.tokens.next.id;){if(nextVal=state.tokens.next.value,!state.tokens.next.identifier||","!==peekIgnoreEOL().id&&"}"!==peekIgnoreEOL().id)if(":"===peek().id||"get"!==nextVal&&"set"!==nextVal){if("*"===state.tokens.next.value&&"(punctuator)"===state.tokens.next.type?(state.inES6()||warning("W104",state.tokens.next,"generator functions","6"),advance("*"),isGeneratorMethod=!0):isGeneratorMethod=!1,"["===state.tokens.next.id)i=computedPropertyName(),state.nameStack.set(i);else if(state.nameStack.set(state.tokens.next),i=propertyName(),saveProperty(props,i,state.tokens.next),"string"!=typeof i)break;"("===state.tokens.next.value?(state.inES6()||warning("W104",state.tokens.curr,"concise methods","6"),doFunction({type:isGeneratorMethod?"generator":null})):(advance(":"),expression(10))}else advance(nextVal),state.inES5()||error("E034"),i=propertyName(),i||state.inES6()||error("E035"),i&&saveAccessor(nextVal,props,i,state.tokens.curr),t=state.tokens.next,f=doFunction(),p=f["(params)"],"get"===nextVal&&i&&p?warning("W076",t,p[0],i):"set"!==nextVal||!i||p&&1===p.length||warning("W077",t,i);else state.inES6()||warning("W104",state.tokens.next,"object short notation","6"),i=propertyName(!0),saveProperty(props,i,state.tokens.next),expression(10);if(countMember(i),","!==state.tokens.next.id)break;comma({allowTrailing:!0,property:!0}),","===state.tokens.next.id?warning("W070",state.tokens.curr):"}"!==state.tokens.next.id||state.inES5()||warning("W070",state.tokens.curr)}return b&&(indent-=state.option.indent),advance("}",this),checkProperties(props),this},x.fud=function(){error("E036",state.tokens.curr)}}(delim("{"));var conststatement=stmt("const",function(context){return blockVariableStatement("const",this,context)});conststatement.exps=!0;var letstatement=stmt("let",function(context){return blockVariableStatement("let",this,context)});letstatement.exps=!0;var varstatement=stmt("var",function(context){var tokens,lone,value,prefix=context&&context.prefix,inexport=context&&context.inexport,implied=context&&context.implied,report=!(context&&context.ignore);for(this.first=[];;){var names=[];_.contains(["{","["],state.tokens.next.value)?(tokens=destructuringPattern(),lone=!1):(tokens=[{id:identifier(),token:state.tokens.curr}],lone=!0),prefix&&implied||!report||!state.option.varstmt||warning("W132",this),this.first=this.first.concat(names);for(var t in tokens)tokens.hasOwnProperty(t)&&(t=tokens[t],!implied&&state.funct["(global)"]&&(predefined[t.id]===!1?warning("W079",t.token,t.id):state.option.futurehostile===!1&&(!state.inES5()&&vars.ecmaIdentifiers[5][t.id]===!1||!state.inES6()&&vars.ecmaIdentifiers[6][t.id]===!1)&&warning("W129",t.token,t.id)),t.id&&("for"===implied?(state.funct["(scope)"].has(t.id)||report&&warning("W088",t.token,t.id),state.funct["(scope)"].block.use(t.id,t.token)):(state.funct["(scope)"].addlabel(t.id,{type:"var",token:t.token}),lone&&inexport&&state.funct["(scope)"].setExported(t.id,t.token)),names.push(t.token)));if("="===state.tokens.next.id&&(state.nameStack.set(state.tokens.curr),advance("="),prefix||!report||state.funct["(loopage)"]||"undefined"!==state.tokens.next.id||warning("W080",state.tokens.prev,state.tokens.prev.value),"="===peek(0).id&&state.tokens.next.identifier&&(!prefix&&report&&!state.funct["(params)"]||-1===state.funct["(params)"].indexOf(state.tokens.next.value))&&warning("W120",state.tokens.next,state.tokens.next.value),value=expression(prefix?120:10),lone?tokens[0].first=value:destructuringPatternMatch(names,value)),","!==state.tokens.next.id)break;comma()}return this});varstatement.exps=!0,blockstmt("class",function(){return classdef.call(this,!0)}),blockstmt("function",function(context){var inexport=context&&context.inexport,generator=!1;"*"===state.tokens.next.value&&(advance("*"),state.inES6({strict:!0})?generator=!0:warning("W119",state.tokens.curr,"function*","6")),inblock&&warning("W082",state.tokens.curr);var i=optionalidentifier();return state.funct["(scope)"].addlabel(i,{type:"function",token:state.tokens.curr}),void 0===i?warning("W025"):inexport&&state.funct["(scope)"].setExported(i,state.tokens.prev),doFunction({name:i,statement:this,type:generator?"generator":null,ignoreLoopFunc:inblock}),"("===state.tokens.next.id&&state.tokens.next.line===state.tokens.curr.line&&error("E039"),this}),prefix("function",function(){var generator=!1;"*"===state.tokens.next.value&&(state.inES6()||warning("W119",state.tokens.curr,"function*","6"),advance("*"),generator=!0);var i=optionalidentifier();return doFunction({name:i,type:generator?"generator":null}),this}),blockstmt("if",function(){var t=state.tokens.next;increaseComplexityCount(),state.condition=!0,advance("(");var expr=expression(0);checkCondAssignment(expr);var forinifcheck=null;state.option.forin&&state.forinifcheckneeded&&(state.forinifcheckneeded=!1,forinifcheck=state.forinifchecks[state.forinifchecks.length-1],forinifcheck.type="(punctuator)"===expr.type&&"!"===expr.value?"(negative)":"(positive)"),advance(")",t),state.condition=!1;var s=block(!0,!0);return forinifcheck&&"(negative)"===forinifcheck.type&&s&&s[0]&&"(identifier)"===s[0].type&&"continue"===s[0].value&&(forinifcheck.type="(negative-with-continue)"),"else"===state.tokens.next.id&&(advance("else"),"if"===state.tokens.next.id||"switch"===state.tokens.next.id?statement():block(!0,!0)),this}),blockstmt("try",function(){function doCatch(){if(advance("catch"),advance("("),state.funct["(scope)"].stack("catchparams"),checkPunctuators(state.tokens.next,["[","{"])){var tokens=destructuringPattern();_.each(tokens,function(token){token.id&&state.funct["(scope)"].addParam(token.id,token,"exception")})}else"(identifier)"!==state.tokens.next.type?warning("E030",state.tokens.next,state.tokens.next.value):state.funct["(scope)"].addParam(identifier(),state.tokens.curr,"exception");"if"===state.tokens.next.value&&(state.inMoz()||warning("W118",state.tokens.curr,"catch filter"),advance("if"),expression(0)),advance(")"),block(!1),state.funct["(scope)"].unstack()}var b;for(block(!0);"catch"===state.tokens.next.id;)increaseComplexityCount(),b&&!state.inMoz()&&warning("W118",state.tokens.next,"multiple catch blocks"),doCatch(),b=!0;return"finally"===state.tokens.next.id?(advance("finally"),block(!0),void 0):(b||error("E021",state.tokens.next,"catch",state.tokens.next.value),this)}),blockstmt("while",function(){var t=state.tokens.next;return state.funct["(breakage)"]+=1,state.funct["(loopage)"]+=1,increaseComplexityCount(),advance("("),checkCondAssignment(expression(0)),advance(")",t),block(!0,!0),state.funct["(breakage)"]-=1,state.funct["(loopage)"]-=1,this}).labelled=!0,blockstmt("with",function(){var t=state.tokens.next;return state.isStrict()?error("E010",state.tokens.curr):state.option.withstmt||warning("W085",state.tokens.curr),advance("("),expression(0),advance(")",t),block(!0,!0),this}),blockstmt("switch",function(){var t=state.tokens.next,g=!1,noindent=!1;\nfor(state.funct["(breakage)"]+=1,advance("("),checkCondAssignment(expression(0)),advance(")",t),t=state.tokens.next,advance("{"),state.tokens.next.from===indent&&(noindent=!0),noindent||(indent+=state.option.indent),this.cases=[];;)switch(state.tokens.next.id){case"case":switch(state.funct["(verb)"]){case"yield":case"break":case"case":case"continue":case"return":case"switch":case"throw":break;default:state.tokens.curr.caseFallsThrough||warning("W086",state.tokens.curr,"case")}advance("case"),this.cases.push(expression(0)),increaseComplexityCount(),g=!0,advance(":"),state.funct["(verb)"]="case";break;case"default":switch(state.funct["(verb)"]){case"yield":case"break":case"continue":case"return":case"throw":break;default:this.cases.length&&(state.tokens.curr.caseFallsThrough||warning("W086",state.tokens.curr,"default"))}advance("default"),g=!0,advance(":");break;case"}":return noindent||(indent-=state.option.indent),advance("}",t),state.funct["(breakage)"]-=1,state.funct["(verb)"]=void 0,void 0;case"(end)":return error("E023",state.tokens.next,"}"),void 0;default:if(indent+=state.option.indent,g)switch(state.tokens.curr.id){case",":return error("E040"),void 0;case":":g=!1,statements();break;default:return error("E025",state.tokens.curr),void 0}else{if(":"!==state.tokens.curr.id)return error("E021",state.tokens.next,"case",state.tokens.next.value),void 0;advance(":"),error("E024",state.tokens.curr,":"),statements()}indent-=state.option.indent}return this}).labelled=!0,stmt("debugger",function(){return state.option.debug||warning("W087",this),this}).exps=!0,function(){var x=stmt("do",function(){state.funct["(breakage)"]+=1,state.funct["(loopage)"]+=1,increaseComplexityCount(),this.first=block(!0,!0),advance("while");var t=state.tokens.next;return advance("("),checkCondAssignment(expression(0)),advance(")",t),state.funct["(breakage)"]-=1,state.funct["(loopage)"]-=1,this});x.labelled=!0,x.exps=!0}(),blockstmt("for",function(){var s,t=state.tokens.next,letscope=!1,foreachtok=null;"each"===t.value&&(foreachtok=t,advance("each"),state.inMoz()||warning("W118",state.tokens.curr,"for each")),increaseComplexityCount(),advance("(");var nextop,comma,initializer,i=0,inof=["in","of"],level=0;checkPunctuators(state.tokens.next,["{","["])&&++level;do{if(nextop=peek(i),++i,checkPunctuators(nextop,["{","["])?++level:checkPunctuators(nextop,["}","]"])&&--level,0>level)break;0===level&&(!comma&&checkPunctuator(nextop,",")?comma=nextop:!initializer&&checkPunctuator(nextop,"=")&&(initializer=nextop))}while(level>0||!_.contains(inof,nextop.value)&&";"!==nextop.value&&"(end)"!==nextop.type);if(_.contains(inof,nextop.value)){state.inES6()||"of"!==nextop.value||warning("W104",nextop,"for of","6");var ok=!(initializer||comma);if(initializer&&error("W133",comma,nextop.value,"initializer is forbidden"),comma&&error("W133",comma,nextop.value,"more than one ForBinding"),"var"===state.tokens.next.id?(advance("var"),state.tokens.curr.fud({prefix:!0})):"let"===state.tokens.next.id||"const"===state.tokens.next.id?(advance(state.tokens.next.id),letscope=!0,state.funct["(scope)"].stack(),state.tokens.curr.fud({prefix:!0})):Object.create(varstatement).fud({prefix:!0,implied:"for",ignore:!ok}),advance(nextop.value),expression(20),advance(")",t),"in"===nextop.value&&state.option.forin&&(state.forinifcheckneeded=!0,void 0===state.forinifchecks&&(state.forinifchecks=[]),state.forinifchecks.push({type:"(none)"})),state.funct["(breakage)"]+=1,state.funct["(loopage)"]+=1,s=block(!0,!0),"in"===nextop.value&&state.option.forin){if(state.forinifchecks&&state.forinifchecks.length>0){var check=state.forinifchecks.pop();(s&&s.length>0&&("object"!=typeof s[0]||"if"!==s[0].value)||"(positive)"===check.type&&s.length>1||"(negative)"===check.type)&&warning("W089",this)}state.forinifcheckneeded=!1}state.funct["(breakage)"]-=1,state.funct["(loopage)"]-=1}else{if(foreachtok&&error("E045",foreachtok),";"!==state.tokens.next.id)if("var"===state.tokens.next.id)advance("var"),state.tokens.curr.fud();else if("let"===state.tokens.next.id)advance("let"),letscope=!0,state.funct["(scope)"].stack(),state.tokens.curr.fud();else for(;expression(0,"for"),","===state.tokens.next.id;)comma();if(nolinebreak(state.tokens.curr),advance(";"),state.funct["(loopage)"]+=1,";"!==state.tokens.next.id&&checkCondAssignment(expression(0)),nolinebreak(state.tokens.curr),advance(";"),";"===state.tokens.next.id&&error("E021",state.tokens.next,")",";"),")"!==state.tokens.next.id)for(;expression(0,"for"),","===state.tokens.next.id;)comma();advance(")",t),state.funct["(breakage)"]+=1,block(!0,!0),state.funct["(breakage)"]-=1,state.funct["(loopage)"]-=1}return letscope&&state.funct["(scope)"].unstack(),this}).labelled=!0,stmt("break",function(){var v=state.tokens.next.value;return state.option.asi||nolinebreak(this),";"===state.tokens.next.id||state.tokens.next.reach||state.tokens.curr.line!==startLine(state.tokens.next)?0===state.funct["(breakage)"]&&warning("W052",state.tokens.next,this.value):(state.funct["(scope)"].funct.hasBreakLabel(v)||warning("W090",state.tokens.next,v),this.first=state.tokens.next,advance()),reachable(this),this}).exps=!0,stmt("continue",function(){var v=state.tokens.next.value;return 0===state.funct["(breakage)"]&&warning("W052",state.tokens.next,this.value),state.funct["(loopage)"]||warning("W052",state.tokens.next,this.value),state.option.asi||nolinebreak(this),";"===state.tokens.next.id||state.tokens.next.reach||state.tokens.curr.line===startLine(state.tokens.next)&&(state.funct["(scope)"].funct.hasBreakLabel(v)||warning("W090",state.tokens.next,v),this.first=state.tokens.next,advance()),reachable(this),this}).exps=!0,stmt("return",function(){return this.line===startLine(state.tokens.next)?";"===state.tokens.next.id||state.tokens.next.reach||(this.first=expression(0),!this.first||"(punctuator)"!==this.first.type||"="!==this.first.value||this.first.paren||state.option.boss||warningAt("W093",this.first.line,this.first.character)):"(punctuator)"===state.tokens.next.type&&["[","{","+","-"].indexOf(state.tokens.next.value)>-1&&nolinebreak(this),reachable(this),this}).exps=!0,function(x){x.exps=!0,x.lbp=25}(prefix("yield",function(){var prev=state.tokens.prev;state.inES6(!0)&&!state.funct["(generator)"]?"(catch)"===state.funct["(name)"]&&state.funct["(context)"]["(generator)"]||error("E046",state.tokens.curr,"yield"):state.inES6()||warning("W104",state.tokens.curr,"yield","6"),state.funct["(generator)"]="yielded";var delegatingYield=!1;return"*"===state.tokens.next.value&&(delegatingYield=!0,advance("*")),this.line!==startLine(state.tokens.next)&&state.inMoz()?state.option.asi||nolinebreak(this):((delegatingYield||";"!==state.tokens.next.id&&!state.option.asi&&!state.tokens.next.reach&&state.tokens.next.nud)&&(nobreaknonadjacent(state.tokens.curr,state.tokens.next),this.first=expression(10),"(punctuator)"!==this.first.type||"="!==this.first.value||this.first.paren||state.option.boss||warningAt("W093",this.first.line,this.first.character)),state.inMoz()&&")"!==state.tokens.next.id&&(prev.lbp>30||!prev.assign&&!isEndOfExpr()||"yield"===prev.id)&&error("E050",this)),this})),stmt("throw",function(){return nolinebreak(this),this.first=expression(20),reachable(this),this}).exps=!0,stmt("import",function(){if(state.inES6()||warning("W119",state.tokens.curr,"import","6"),"(string)"===state.tokens.next.type)return advance("(string)"),this;if(state.tokens.next.identifier){if(this.name=identifier(),state.funct["(scope)"].addlabel(this.name,{type:"const",token:state.tokens.curr}),","!==state.tokens.next.value)return advance("from"),advance("(string)"),this;advance(",")}if("*"===state.tokens.next.id)advance("*"),advance("as"),state.tokens.next.identifier&&(this.name=identifier(),state.funct["(scope)"].addlabel(this.name,{type:"const",token:state.tokens.curr}));else for(advance("{");;){if("}"===state.tokens.next.value){advance("}");break}var importName;if("default"===state.tokens.next.type?(importName="default",advance("default")):importName=identifier(),"as"===state.tokens.next.value&&(advance("as"),importName=identifier()),state.funct["(scope)"].addlabel(importName,{type:"const",token:state.tokens.curr}),","!==state.tokens.next.value){if("}"===state.tokens.next.value){advance("}");break}error("E024",state.tokens.next,state.tokens.next.value);break}advance(",")}return advance("from"),advance("(string)"),this}).exps=!0,stmt("export",function(){var token,identifier,ok=!0;if(state.inES6()||(warning("W119",state.tokens.curr,"export","6"),ok=!1),state.funct["(scope)"].block.isGlobal()||(error("E053",state.tokens.curr),ok=!1),"*"===state.tokens.next.value)return advance("*"),advance("from"),advance("(string)"),this;if("default"===state.tokens.next.type){state.nameStack.set(state.tokens.next),advance("default");var exportType=state.tokens.next.id;return("function"===exportType||"class"===exportType)&&(this.block=!0),token=peek(),expression(10),identifier=token.value,this.block&&(state.funct["(scope)"].addlabel(identifier,{type:exportType,token:token}),state.funct["(scope)"].setExported(identifier,token)),this}if("{"===state.tokens.next.value){advance("{");for(var exportedTokens=[];;){if(state.tokens.next.identifier||error("E030",state.tokens.next,state.tokens.next.value),advance(),exportedTokens.push(state.tokens.curr),"as"===state.tokens.next.value&&(advance("as"),state.tokens.next.identifier||error("E030",state.tokens.next,state.tokens.next.value),advance()),","!==state.tokens.next.value){if("}"===state.tokens.next.value){advance("}");break}error("E024",state.tokens.next,state.tokens.next.value);break}advance(",")}return"from"===state.tokens.next.value?(advance("from"),advance("(string)")):ok&&exportedTokens.forEach(function(token){state.funct["(scope)"].setExported(token.value,token)}),this}if("var"===state.tokens.next.id)advance("var"),state.tokens.curr.fud({inexport:!0});else if("let"===state.tokens.next.id)advance("let"),state.tokens.curr.fud({inexport:!0});else if("const"===state.tokens.next.id)advance("const"),state.tokens.curr.fud({inexport:!0});else if("function"===state.tokens.next.id)this.block=!0,advance("function"),state.syntax["function"].fud({inexport:!0});else if("class"===state.tokens.next.id){this.block=!0,advance("class");var classNameToken=state.tokens.next;state.syntax["class"].fud(),state.funct["(scope)"].setExported(classNameToken.value,classNameToken)}else error("E024",state.tokens.next,state.tokens.next.value);return this}).exps=!0,FutureReservedWord("abstract"),FutureReservedWord("boolean"),FutureReservedWord("byte"),FutureReservedWord("char"),FutureReservedWord("class",{es5:!0,nud:classdef}),FutureReservedWord("double"),FutureReservedWord("enum",{es5:!0}),FutureReservedWord("export",{es5:!0}),FutureReservedWord("extends",{es5:!0}),FutureReservedWord("final"),FutureReservedWord("float"),FutureReservedWord("goto"),FutureReservedWord("implements",{es5:!0,strictOnly:!0}),FutureReservedWord("import",{es5:!0}),FutureReservedWord("int"),FutureReservedWord("interface",{es5:!0,strictOnly:!0}),FutureReservedWord("long"),FutureReservedWord("native"),FutureReservedWord("package",{es5:!0,strictOnly:!0}),FutureReservedWord("private",{es5:!0,strictOnly:!0}),FutureReservedWord("protected",{es5:!0,strictOnly:!0}),FutureReservedWord("public",{es5:!0,strictOnly:!0}),FutureReservedWord("short"),FutureReservedWord("static",{es5:!0,strictOnly:!0}),FutureReservedWord("super",{es5:!0}),FutureReservedWord("synchronized"),FutureReservedWord("transient"),FutureReservedWord("volatile");var lookupBlockType=function(){var pn,pn1,prev,i=-1,bracketStack=0,ret={};checkPunctuators(state.tokens.curr,["[","{"])&&(bracketStack+=1);do{if(prev=-1===i?state.tokens.curr:pn,pn=-1===i?state.tokens.next:peek(i),pn1=peek(i+1),i+=1,checkPunctuators(pn,["[","{"])?bracketStack+=1:checkPunctuators(pn,["]","}"])&&(bracketStack-=1),1===bracketStack&&pn.identifier&&"for"===pn.value&&!checkPunctuator(prev,".")){ret.isCompArray=!0,ret.notJson=!0;break}if(0===bracketStack&&checkPunctuators(pn,["}","]"])){if("="===pn1.value){ret.isDestAssign=!0,ret.notJson=!0;break}if("."===pn1.value){ret.notJson=!0;break}}checkPunctuator(pn,";")&&(ret.isBlock=!0,ret.notJson=!0)}while(bracketStack>0&&"(end)"!==pn.id);return ret},arrayComprehension=function(){function declare(v){var l=_current.variables.filter(function(elt){return elt.value===v?(elt.undef=!1,v):void 0}).length;return 0!==l}function use(v){var l=_current.variables.filter(function(elt){return elt.value!==v||elt.undef?void 0:(elt.unused===!0&&(elt.unused=!1),v)}).length;return 0===l}var _current,CompArray=function(){this.mode="use",this.variables=[]},_carrays=[];return{stack:function(){_current=new CompArray,_carrays.push(_current)},unstack:function(){_current.variables.filter(function(v){v.unused&&warning("W098",v.token,v.raw_text||v.value),v.undef&&state.funct["(scope)"].block.use(v.value,v.token)}),_carrays.splice(-1,1),_current=_carrays[_carrays.length-1]},setState:function(s){_.contains(["use","define","generate","filter"],s)&&(_current.mode=s)},check:function(v){return _current?_current&&"use"===_current.mode?(use(v)&&_current.variables.push({funct:state.funct,token:state.tokens.curr,value:v,undef:!0,unused:!1}),!0):_current&&"define"===_current.mode?(declare(v)||_current.variables.push({funct:state.funct,token:state.tokens.curr,value:v,undef:!1,unused:!0}),!0):_current&&"generate"===_current.mode?(state.funct["(scope)"].block.use(v,state.tokens.curr),!0):_current&&"filter"===_current.mode?(use(v)&&state.funct["(scope)"].block.use(v,state.tokens.curr),!0):!1:void 0}}},escapeRegex=function(str){return str.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,"\\\\$&")},itself=function(s,o,g){function each(obj,cb){obj&&(Array.isArray(obj)||"object"!=typeof obj||(obj=Object.keys(obj)),obj.forEach(cb))}var i,k,x,reIgnoreStr,reIgnore,optionKeys,newOptionObj={},newIgnoredObj={};o=_.clone(o),state.reset(),o&&o.scope?JSHINT.scope=o.scope:(JSHINT.errors=[],JSHINT.undefs=[],JSHINT.internals=[],JSHINT.blacklist={},JSHINT.scope="(main)"),predefined=Object.create(null),combine(predefined,vars.ecmaIdentifiers[3]),combine(predefined,vars.reservedVars),combine(predefined,g||{}),declared=Object.create(null);var exported=Object.create(null);if(o)for(each(o.predef||null,function(item){var slice,prop;"-"===item[0]?(slice=item.slice(1),JSHINT.blacklist[slice]=slice,delete predefined[slice]):(prop=Object.getOwnPropertyDescriptor(o.predef,item),predefined[item]=prop?prop.value:!1)}),each(o.exported||null,function(item){exported[item]=!0}),delete o.predef,delete o.exported,optionKeys=Object.keys(o),x=0;optionKeys.length>x;x++)if(/^-W\\d{3}$/g.test(optionKeys[x]))newIgnoredObj[optionKeys[x].slice(1)]=!0;else{var optionKey=optionKeys[x];newOptionObj[optionKey]=o[optionKey],("esversion"===optionKey&&5===o[optionKey]||"es5"===optionKey&&o[optionKey])&&warning("I003"),"newcap"===optionKeys[x]&&o[optionKey]===!1&&(newOptionObj["(explicitNewcap)"]=!0)}state.option=newOptionObj,state.ignored=newIgnoredObj,state.option.indent=state.option.indent||4,state.option.maxerr=state.option.maxerr||50,indent=1;var scopeManagerInst=scopeManager(state,predefined,exported,declared);if(scopeManagerInst.on("warning",function(ev){warning.apply(null,[ev.code,ev.token].concat(ev.data))}),scopeManagerInst.on("error",function(ev){error.apply(null,[ev.code,ev.token].concat(ev.data))}),state.funct=functor("(global)",null,{"(global)":!0,"(scope)":scopeManagerInst,"(comparray)":arrayComprehension(),"(metrics)":createMetrics(state.tokens.next)}),functions=[state.funct],urls=[],stack=null,member={},membersOnly=null,inblock=!1,lookahead=[],!isString(s)&&!Array.isArray(s))return errorAt("E004",0),!1;api={get isJSON(){return state.jsonMode},getOption:function(name){return state.option[name]||null},getCache:function(name){return state.cache[name]},setCache:function(name,value){state.cache[name]=value},warn:function(code,data){warningAt.apply(null,[code,data.line,data.char].concat(data.data))},on:function(names,listener){names.split(" ").forEach(function(name){emitter.on(name,listener)}.bind(this))}},emitter.removeAllListeners(),(extraModules||[]).forEach(function(func){func(api)}),state.tokens.prev=state.tokens.curr=state.tokens.next=state.syntax["(begin)"],o&&o.ignoreDelimiters&&(Array.isArray(o.ignoreDelimiters)||(o.ignoreDelimiters=[o.ignoreDelimiters]),o.ignoreDelimiters.forEach(function(delimiterPair){delimiterPair.start&&delimiterPair.end&&(reIgnoreStr=escapeRegex(delimiterPair.start)+"[\\\\s\\\\S]*?"+escapeRegex(delimiterPair.end),reIgnore=RegExp(reIgnoreStr,"ig"),s=s.replace(reIgnore,function(match){return match.replace(/./g," ")}))})),lex=new Lexer(s),lex.on("warning",function(ev){warningAt.apply(null,[ev.code,ev.line,ev.character].concat(ev.data))}),lex.on("error",function(ev){errorAt.apply(null,[ev.code,ev.line,ev.character].concat(ev.data))}),lex.on("fatal",function(ev){quit("E041",ev.line,ev.from)}),lex.on("Identifier",function(ev){emitter.emit("Identifier",ev)}),lex.on("String",function(ev){emitter.emit("String",ev)}),lex.on("Number",function(ev){emitter.emit("Number",ev)}),lex.start();for(var name in o)_.has(o,name)&&checkOption(name,state.tokens.curr);assume(),combine(predefined,g||{}),comma.first=!0;try{switch(advance(),state.tokens.next.id){case"{":case"[":destructuringAssignOrJsonValue();break;default:directives(),state.directive["use strict"]&&"global"!==state.option.strict&&warning("W097",state.tokens.prev),statements()}"(end)"!==state.tokens.next.id&&quit("E041",state.tokens.curr.line),state.funct["(scope)"].unstack()}catch(err){if(!err||"JSHintError"!==err.name)throw err;var nt=state.tokens.next||{};JSHINT.errors.push({scope:"(main)",raw:err.raw,code:err.code,reason:err.message,line:err.line||nt.line,character:err.character||nt.from},null)}if("(main)"===JSHINT.scope)for(o=o||{},i=0;JSHINT.internals.length>i;i+=1)k=JSHINT.internals[i],o.scope=k.elem,itself(k.value,o,g);return 0===JSHINT.errors.length};return itself.addModule=function(func){extraModules.push(func)},itself.addModule(style.register),itself.data=function(){var fu,f,i,j,n,globals,data={functions:[],options:state.option};itself.errors.length&&(data.errors=itself.errors),state.jsonMode&&(data.json=!0);var impliedGlobals=state.funct["(scope)"].getImpliedGlobals();for(impliedGlobals.length>0&&(data.implieds=impliedGlobals),urls.length>0&&(data.urls=urls),globals=state.funct["(scope)"].getUsedOrDefinedGlobals(),globals.length>0&&(data.globals=globals),i=1;functions.length>i;i+=1){for(f=functions[i],fu={},j=0;functionicity.length>j;j+=1)fu[functionicity[j]]=[];for(j=0;functionicity.length>j;j+=1)0===fu[functionicity[j]].length&&delete fu[functionicity[j]];fu.name=f["(name)"],fu.param=f["(params)"],fu.line=f["(line)"],fu.character=f["(character)"],fu.last=f["(last)"],fu.lastcharacter=f["(lastcharacter)"],fu.metrics={complexity:f["(metrics)"].ComplexityCount,parameters:f["(metrics)"].arity,statements:f["(metrics)"].statementCount},data.functions.push(fu)}var unuseds=state.funct["(scope)"].getUnuseds();unuseds.length>0&&(data.unused=unuseds);for(n in member)if("number"==typeof member[n]){data.member=member;break}return data},itself.jshint=itself,itself}();"object"==typeof exports&&exports&&(exports.JSHINT=JSHINT)},{"../lodash":"/node_modules/jshint/lodash.js","./lex.js":"/node_modules/jshint/src/lex.js","./messages.js":"/node_modules/jshint/src/messages.js","./options.js":"/node_modules/jshint/src/options.js","./reg.js":"/node_modules/jshint/src/reg.js","./scope-manager.js":"/node_modules/jshint/src/scope-manager.js","./state.js":"/node_modules/jshint/src/state.js","./style.js":"/node_modules/jshint/src/style.js","./vars.js":"/node_modules/jshint/src/vars.js",events:"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/lex.js":[function(_dereq_,module,exports){"use strict";function asyncTrigger(){var _checks=[];return{push:function(fn){_checks.push(fn)},check:function(){for(var check=0;_checks.length>check;++check)_checks[check]();_checks.splice(0,_checks.length)}}}function Lexer(source){var lines=source;"string"==typeof lines&&(lines=lines.replace(/\\r\\n/g,"\\n").replace(/\\r/g,"\\n").split("\\n")),lines[0]&&"#!"===lines[0].substr(0,2)&&(-1!==lines[0].indexOf("node")&&(state.option.node=!0),lines[0]=""),this.emitter=new events.EventEmitter,this.source=source,this.setLines(lines),this.prereg=!0,this.line=0,this.char=1,this.from=1,this.input="",this.inComment=!1,this.context=[],this.templateStarts=[];for(var i=0;state.option.indent>i;i+=1)state.tab+=" ";this.ignoreLinterErrors=!1}var _=_dereq_("../lodash"),events=_dereq_("events"),reg=_dereq_("./reg.js"),state=_dereq_("./state.js").state,unicodeData=_dereq_("../data/ascii-identifier-data.js"),asciiIdentifierStartTable=unicodeData.asciiIdentifierStartTable,asciiIdentifierPartTable=unicodeData.asciiIdentifierPartTable,Token={Identifier:1,Punctuator:2,NumericLiteral:3,StringLiteral:4,Comment:5,Keyword:6,NullLiteral:7,BooleanLiteral:8,RegExp:9,TemplateHead:10,TemplateMiddle:11,TemplateTail:12,NoSubstTemplate:13},Context={Block:1,Template:2};Lexer.prototype={_lines:[],inContext:function(ctxType){return this.context.length>0&&this.context[this.context.length-1].type===ctxType},pushContext:function(ctxType){this.context.push({type:ctxType})},popContext:function(){return this.context.pop()},isContext:function(context){return this.context.length>0&&this.context[this.context.length-1]===context},currentContext:function(){return this.context.length>0&&this.context[this.context.length-1]},getLines:function(){return this._lines=state.lines,this._lines},setLines:function(val){this._lines=val,state.lines=this._lines},peek:function(i){return this.input.charAt(i||0)},skip:function(i){i=i||1,this.char+=i,this.input=this.input.slice(i)},on:function(names,listener){names.split(" ").forEach(function(name){this.emitter.on(name,listener)}.bind(this))},trigger:function(){this.emitter.emit.apply(this.emitter,Array.prototype.slice.call(arguments))},triggerAsync:function(type,args,checks,fn){checks.push(function(){fn()&&this.trigger(type,args)}.bind(this))},scanPunctuator:function(){var ch2,ch3,ch4,ch1=this.peek();switch(ch1){case".":if(/^[0-9]$/.test(this.peek(1)))return null;if("."===this.peek(1)&&"."===this.peek(2))return{type:Token.Punctuator,value:"..."};case"(":case")":case";":case",":case"[":case"]":case":":case"~":case"?":return{type:Token.Punctuator,value:ch1};case"{":return this.pushContext(Context.Block),{type:Token.Punctuator,value:ch1};case"}":return this.inContext(Context.Block)&&this.popContext(),{type:Token.Punctuator,value:ch1};case"#":return{type:Token.Punctuator,value:ch1};case"":return null}return ch2=this.peek(1),ch3=this.peek(2),ch4=this.peek(3),">"===ch1&&">"===ch2&&">"===ch3&&"="===ch4?{type:Token.Punctuator,value:">>>="}:"="===ch1&&"="===ch2&&"="===ch3?{type:Token.Punctuator,value:"==="}:"!"===ch1&&"="===ch2&&"="===ch3?{type:Token.Punctuator,value:"!=="}:">"===ch1&&">"===ch2&&">"===ch3?{type:Token.Punctuator,value:">>>"}:"<"===ch1&&"<"===ch2&&"="===ch3?{type:Token.Punctuator,value:"<<="}:">"===ch1&&">"===ch2&&"="===ch3?{type:Token.Punctuator,value:">>="}:"="===ch1&&">"===ch2?{type:Token.Punctuator,value:ch1+ch2}:ch1===ch2&&"+-<>&|".indexOf(ch1)>=0?{type:Token.Punctuator,value:ch1+ch2}:"<>=!+-*%&|^".indexOf(ch1)>=0?"="===ch2?{type:Token.Punctuator,value:ch1+ch2}:{type:Token.Punctuator,value:ch1}:"/"===ch1?"="===ch2?{type:Token.Punctuator,value:"/="}:{type:Token.Punctuator,value:"/"}:null},scanComments:function(){function commentToken(label,body,opt){var special=["jshint","jslint","members","member","globals","global","exported"],isSpecial=!1,value=label+body,commentType="plain";return opt=opt||{},opt.isMultiline&&(value+="*/"),body=body.replace(/\\n/g," "),"/*"===label&®.fallsThrough.test(body)&&(isSpecial=!0,commentType="falls through"),special.forEach(function(str){if(!isSpecial&&("//"!==label||"jshint"===str)&&(" "===body.charAt(str.length)&&body.substr(0,str.length)===str&&(isSpecial=!0,label+=str,body=body.substr(str.length)),isSpecial||" "!==body.charAt(0)||" "!==body.charAt(str.length+1)||body.substr(1,str.length)!==str||(isSpecial=!0,label=label+" "+str,body=body.substr(str.length+1)),isSpecial))switch(str){case"member":commentType="members";break;case"global":commentType="globals";break;default:var options=body.split(":").map(function(v){return v.replace(/^\\s+/,"").replace(/\\s+$/,"")});if(2===options.length)switch(options[0]){case"ignore":switch(options[1]){case"start":self.ignoringLinterErrors=!0,isSpecial=!1;break;case"end":self.ignoringLinterErrors=!1,isSpecial=!1}}commentType=str}}),{type:Token.Comment,commentType:commentType,value:value,body:body,isSpecial:isSpecial,isMultiline:opt.isMultiline||!1,isMalformed:opt.isMalformed||!1}}var ch1=this.peek(),ch2=this.peek(1),rest=this.input.substr(2),startLine=this.line,startChar=this.char,self=this;if("*"===ch1&&"/"===ch2)return this.trigger("error",{code:"E018",line:startLine,character:startChar}),this.skip(2),null;if("/"!==ch1||"*"!==ch2&&"/"!==ch2)return null;if("/"===ch2)return this.skip(this.input.length),commentToken("//",rest);var body="";if("*"===ch2){for(this.inComment=!0,this.skip(2);"*"!==this.peek()||"/"!==this.peek(1);)if(""===this.peek()){if(body+="\\n",!this.nextLine())return this.trigger("error",{code:"E017",line:startLine,character:startChar}),this.inComment=!1,commentToken("/*",body,{isMultiline:!0,isMalformed:!0})}else body+=this.peek(),this.skip();return this.skip(2),this.inComment=!1,commentToken("/*",body,{isMultiline:!0})}},scanKeyword:function(){var result=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input),keywords=["if","in","do","var","for","new","try","let","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof"];return result&&keywords.indexOf(result[0])>=0?{type:Token.Keyword,value:result[0]}:null},scanIdentifier:function(){function isNonAsciiIdentifierStart(code){return code>256}function isNonAsciiIdentifierPart(code){return code>256}function isHexDigit(str){return/^[0-9a-fA-F]$/.test(str)}function removeEscapeSequences(id){return id.replace(/\\\\u([0-9a-fA-F]{4})/g,function(m0,codepoint){return String.fromCharCode(parseInt(codepoint,16))})}var type,char,id="",index=0,readUnicodeEscapeSequence=function(){if(index+=1,"u"!==this.peek(index))return null;var code,ch1=this.peek(index+1),ch2=this.peek(index+2),ch3=this.peek(index+3),ch4=this.peek(index+4);return isHexDigit(ch1)&&isHexDigit(ch2)&&isHexDigit(ch3)&&isHexDigit(ch4)?(code=parseInt(ch1+ch2+ch3+ch4,16),asciiIdentifierPartTable[code]||isNonAsciiIdentifierPart(code)?(index+=5,"\\\\u"+ch1+ch2+ch3+ch4):null):null}.bind(this),getIdentifierStart=function(){var chr=this.peek(index),code=chr.charCodeAt(0);return 92===code?readUnicodeEscapeSequence():128>code?asciiIdentifierStartTable[code]?(index+=1,chr):null:isNonAsciiIdentifierStart(code)?(index+=1,chr):null}.bind(this),getIdentifierPart=function(){var chr=this.peek(index),code=chr.charCodeAt(0);return 92===code?readUnicodeEscapeSequence():128>code?asciiIdentifierPartTable[code]?(index+=1,chr):null:isNonAsciiIdentifierPart(code)?(index+=1,chr):null}.bind(this);if(char=getIdentifierStart(),null===char)return null;for(id=char;char=getIdentifierPart(),null!==char;)id+=char;switch(id){case"true":case"false":type=Token.BooleanLiteral;break;case"null":type=Token.NullLiteral;break;default:type=Token.Identifier}return{type:type,value:removeEscapeSequences(id),text:id,tokenLength:id.length}},scanNumericLiteral:function(){function isDecimalDigit(str){return/^[0-9]$/.test(str)}function isOctalDigit(str){return/^[0-7]$/.test(str)}function isBinaryDigit(str){return/^[01]$/.test(str)}function isHexDigit(str){return/^[0-9a-fA-F]$/.test(str)}function isIdentifierStart(ch){return"$"===ch||"_"===ch||"\\\\"===ch||ch>="a"&&"z">=ch||ch>="A"&&"Z">=ch}var bad,index=0,value="",length=this.input.length,char=this.peek(index),isAllowedDigit=isDecimalDigit,base=10,isLegacy=!1;if("."!==char&&!isDecimalDigit(char))return null;if("."!==char){for(value=this.peek(index),index+=1,char=this.peek(index),"0"===value&&(("x"===char||"X"===char)&&(isAllowedDigit=isHexDigit,base=16,index+=1,value+=char),("o"===char||"O"===char)&&(isAllowedDigit=isOctalDigit,base=8,state.inES6(!0)||this.trigger("warning",{code:"W119",line:this.line,character:this.char,data:["Octal integer literal","6"]}),index+=1,value+=char),("b"===char||"B"===char)&&(isAllowedDigit=isBinaryDigit,base=2,state.inES6(!0)||this.trigger("warning",{code:"W119",line:this.line,character:this.char,data:["Binary integer literal","6"]}),index+=1,value+=char),isOctalDigit(char)&&(isAllowedDigit=isOctalDigit,base=8,isLegacy=!0,bad=!1,index+=1,value+=char),!isOctalDigit(char)&&isDecimalDigit(char)&&(index+=1,value+=char));length>index;){if(char=this.peek(index),isLegacy&&isDecimalDigit(char))bad=!0;else if(!isAllowedDigit(char))break;value+=char,index+=1}if(isAllowedDigit!==isDecimalDigit)return!isLegacy&&2>=value.length?{type:Token.NumericLiteral,value:value,isMalformed:!0}:length>index&&(char=this.peek(index),isIdentifierStart(char))?null:{type:Token.NumericLiteral,value:value,base:base,isLegacy:isLegacy,isMalformed:!1}}if("."===char)for(value+=char,index+=1;length>index&&(char=this.peek(index),isDecimalDigit(char));)value+=char,index+=1;if("e"===char||"E"===char){if(value+=char,index+=1,char=this.peek(index),("+"===char||"-"===char)&&(value+=this.peek(index),index+=1),char=this.peek(index),!isDecimalDigit(char))return null;for(value+=char,index+=1;length>index&&(char=this.peek(index),isDecimalDigit(char));)value+=char,index+=1}return length>index&&(char=this.peek(index),isIdentifierStart(char))?null:{type:Token.NumericLiteral,value:value,base:base,isMalformed:!isFinite(value)}},scanEscapeSequence:function(checks){var allowNewLine=!1,jump=1;this.skip();var char=this.peek();switch(char){case"\'":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\\\\'"]},checks,function(){return state.jsonMode});break;case"b":char="\\\\b";break;case"f":char="\\\\f";break;case"n":char="\\\\n";break;case"r":char="\\\\r";break;case"t":char="\\\\t";break;case"0":char="\\\\0";var n=parseInt(this.peek(1),10);this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},checks,function(){return n>=0&&7>=n&&state.isStrict()});break;case"u":var hexCode=this.input.substr(1,4),code=parseInt(hexCode,16);isNaN(code)&&this.trigger("warning",{code:"W052",line:this.line,character:this.char,data:["u"+hexCode]}),char=String.fromCharCode(code),jump=5;break;case"v":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\\\v"]},checks,function(){return state.jsonMode}),char="\v";break;case"x":var x=parseInt(this.input.substr(1,2),16);this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\\\x-"]},checks,function(){return state.jsonMode}),char=String.fromCharCode(x),jump=3;break;case"\\\\":char="\\\\\\\\";break;case\'"\':char=\'\\\\"\';break;case"/":break;case"":allowNewLine=!0,char=""}return{"char":char,jump:jump,allowNewLine:allowNewLine}},scanTemplateLiteral:function(checks){var tokenType,ch,value="",startLine=this.line,startChar=this.char,depth=this.templateStarts.length;if(!state.inES6(!0))return null;if("`"===this.peek())tokenType=Token.TemplateHead,this.templateStarts.push({line:this.line,"char":this.char}),depth=this.templateStarts.length,this.skip(1),this.pushContext(Context.Template);else{if(!this.inContext(Context.Template)||"}"!==this.peek())return null;tokenType=Token.TemplateMiddle}for(;"`"!==this.peek();){for(;""===(ch=this.peek());)if(value+="\\n",!this.nextLine()){var startPos=this.templateStarts.pop();return this.trigger("error",{code:"E052",line:startPos.line,character:startPos.char}),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!0,depth:depth,context:this.popContext()}}if("$"===ch&&"{"===this.peek(1))return value+="${",this.skip(2),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,depth:depth,context:this.currentContext()};\nif("\\\\"===ch){var escape=this.scanEscapeSequence(checks);value+=escape.char,this.skip(escape.jump)}else"`"!==ch&&(value+=ch,this.skip(1))}return tokenType=tokenType===Token.TemplateHead?Token.NoSubstTemplate:Token.TemplateTail,this.skip(1),this.templateStarts.pop(),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,depth:depth,context:this.popContext()}},scanStringLiteral:function(checks){var quote=this.peek();if(\'"\'!==quote&&"\'"!==quote)return null;this.triggerAsync("warning",{code:"W108",line:this.line,character:this.char},checks,function(){return state.jsonMode&&\'"\'!==quote});var value="",startLine=this.line,startChar=this.char,allowNewLine=!1;for(this.skip();this.peek()!==quote;)if(""===this.peek()){if(allowNewLine?(allowNewLine=!1,this.triggerAsync("warning",{code:"W043",line:this.line,character:this.char},checks,function(){return!state.option.multistr}),this.triggerAsync("warning",{code:"W042",line:this.line,character:this.char},checks,function(){return state.jsonMode&&state.option.multistr})):this.trigger("warning",{code:"W112",line:this.line,character:this.char}),!this.nextLine())return this.trigger("error",{code:"E029",line:startLine,character:startChar}),{type:Token.StringLiteral,value:value,startLine:startLine,startChar:startChar,isUnclosed:!0,quote:quote}}else{allowNewLine=!1;var char=this.peek(),jump=1;if(" ">char&&this.trigger("warning",{code:"W113",line:this.line,character:this.char,data:["<non-printable>"]}),"\\\\"===char){var parsed=this.scanEscapeSequence(checks);char=parsed.char,jump=parsed.jump,allowNewLine=parsed.allowNewLine}value+=char,this.skip(jump)}return this.skip(),{type:Token.StringLiteral,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,quote:quote}},scanRegExp:function(){var terminated,index=0,length=this.input.length,char=this.peek(),value=char,body="",flags=[],malformed=!1,isCharSet=!1,scanUnexpectedChars=function(){" ">char&&(malformed=!0,this.trigger("warning",{code:"W048",line:this.line,character:this.char})),"<"===char&&(malformed=!0,this.trigger("warning",{code:"W049",line:this.line,character:this.char,data:[char]}))}.bind(this);if(!this.prereg||"/"!==char)return null;for(index+=1,terminated=!1;length>index;)if(char=this.peek(index),value+=char,body+=char,isCharSet)"]"===char&&("\\\\"!==this.peek(index-1)||"\\\\"===this.peek(index-2))&&(isCharSet=!1),"\\\\"===char&&(index+=1,char=this.peek(index),body+=char,value+=char,scanUnexpectedChars()),index+=1;else{if("\\\\"===char){if(index+=1,char=this.peek(index),body+=char,value+=char,scanUnexpectedChars(),"/"===char){index+=1;continue}if("["===char){index+=1;continue}}if("["!==char){if("/"===char){body=body.substr(0,body.length-1),terminated=!0,index+=1;break}index+=1}else isCharSet=!0,index+=1}if(!terminated)return this.trigger("error",{code:"E015",line:this.line,character:this.from}),void this.trigger("fatal",{line:this.line,from:this.from});for(;length>index&&(char=this.peek(index),/[gim]/.test(char));)flags.push(char),value+=char,index+=1;try{RegExp(body,flags.join(""))}catch(err){malformed=!0,this.trigger("error",{code:"E016",line:this.line,character:this.char,data:[err.message]})}return{type:Token.RegExp,value:value,flags:flags,isMalformed:malformed}},scanNonBreakingSpaces:function(){return state.option.nonbsp?this.input.search(/(\\u00A0)/):-1},scanUnsafeChars:function(){return this.input.search(reg.unsafeChars)},next:function(checks){this.from=this.char;var start;if(/\\s/.test(this.peek()))for(start=this.char;/\\s/.test(this.peek());)this.from+=1,this.skip();var match=this.scanComments()||this.scanStringLiteral(checks)||this.scanTemplateLiteral(checks);return match?match:(match=this.scanRegExp()||this.scanPunctuator()||this.scanKeyword()||this.scanIdentifier()||this.scanNumericLiteral(),match?(this.skip(match.tokenLength||match.value.length),match):null)},nextLine:function(){var char;if(this.line>=this.getLines().length)return!1;this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1;var inputTrimmed=this.input.trim(),startsWith=function(){return _.some(arguments,function(prefix){return 0===inputTrimmed.indexOf(prefix)})},endsWith=function(){return _.some(arguments,function(suffix){return-1!==inputTrimmed.indexOf(suffix,inputTrimmed.length-suffix.length)})};if(this.ignoringLinterErrors===!0&&(startsWith("/*","//")||this.inComment&&endsWith("*/")||(this.input="")),char=this.scanNonBreakingSpaces(),char>=0&&this.trigger("warning",{code:"W125",line:this.line,character:char+1}),this.input=this.input.replace(/\\t/g,state.tab),char=this.scanUnsafeChars(),char>=0&&this.trigger("warning",{code:"W100",line:this.line,character:char}),!this.ignoringLinterErrors&&state.option.maxlen&&state.option.maxlen<this.input.length){var inComment=this.inComment||startsWith.call(inputTrimmed,"//")||startsWith.call(inputTrimmed,"/*"),shouldTriggerError=!inComment||!reg.maxlenException.test(inputTrimmed);shouldTriggerError&&this.trigger("warning",{code:"W101",line:this.line,character:this.input.length})}return!0},start:function(){this.nextLine()},token:function(){function isReserved(token,isProperty){if(!token.reserved)return!1;var meta=token.meta;if(meta&&meta.isFutureReservedWord&&state.inES5()){if(!meta.es5)return!1;if(meta.strictOnly&&!state.option.strict&&!state.isStrict())return!1;if(isProperty)return!1}return!0}for(var token,checks=asyncTrigger(),create=function(type,value,isProperty,token){var obj;if("(endline)"!==type&&"(end)"!==type&&(this.prereg=!1),"(punctuator)"===type){switch(value){case".":case")":case"~":case"#":case"]":case"++":case"--":this.prereg=!1;break;default:this.prereg=!0}obj=Object.create(state.syntax[value]||state.syntax["(error)"])}return"(identifier)"===type&&(("return"===value||"case"===value||"typeof"===value)&&(this.prereg=!0),_.has(state.syntax,value)&&(obj=Object.create(state.syntax[value]||state.syntax["(error)"]),isReserved(obj,isProperty&&"(identifier)"===type)||(obj=null))),obj||(obj=Object.create(state.syntax[type])),obj.identifier="(identifier)"===type,obj.type=obj.type||type,obj.value=value,obj.line=this.line,obj.character=this.char,obj.from=this.from,obj.identifier&&token&&(obj.raw_text=token.text||token.value),token&&token.startLine&&token.startLine!==this.line&&(obj.startLine=token.startLine),token&&token.context&&(obj.context=token.context),token&&token.depth&&(obj.depth=token.depth),token&&token.isUnclosed&&(obj.isUnclosed=token.isUnclosed),isProperty&&obj.identifier&&(obj.isProperty=isProperty),obj.check=checks.check,obj}.bind(this);;){if(!this.input.length)return this.nextLine()?create("(endline)",""):this.exhausted?null:(this.exhausted=!0,create("(end)",""));if(token=this.next(checks))switch(token.type){case Token.StringLiteral:return this.triggerAsync("String",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value,quote:token.quote},checks,function(){return!0}),create("(string)",token.value,null,token);case Token.TemplateHead:return this.trigger("TemplateHead",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value}),create("(template)",token.value,null,token);case Token.TemplateMiddle:return this.trigger("TemplateMiddle",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value}),create("(template middle)",token.value,null,token);case Token.TemplateTail:return this.trigger("TemplateTail",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value}),create("(template tail)",token.value,null,token);case Token.NoSubstTemplate:return this.trigger("NoSubstTemplate",{line:this.line,"char":this.char,from:this.from,startLine:token.startLine,startChar:token.startChar,value:token.value}),create("(no subst template)",token.value,null,token);case Token.Identifier:this.triggerAsync("Identifier",{line:this.line,"char":this.char,from:this.form,name:token.value,raw_name:token.text,isProperty:"."===state.tokens.curr.id},checks,function(){return!0});case Token.Keyword:case Token.NullLiteral:case Token.BooleanLiteral:return create("(identifier)",token.value,"."===state.tokens.curr.id,token);case Token.NumericLiteral:return token.isMalformed&&this.trigger("warning",{code:"W045",line:this.line,character:this.char,data:[token.value]}),this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["0x-"]},checks,function(){return 16===token.base&&state.jsonMode}),this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},checks,function(){return state.isStrict()&&8===token.base&&token.isLegacy}),this.trigger("Number",{line:this.line,"char":this.char,from:this.from,value:token.value,base:token.base,isMalformed:token.malformed}),create("(number)",token.value);case Token.RegExp:return create("(regexp)",token.value);case Token.Comment:if(state.tokens.curr.comment=!0,token.isSpecial)return{id:"(comment)",value:token.value,body:token.body,type:token.commentType,isSpecial:token.isSpecial,line:this.line,character:this.char,from:this.from};break;case"":break;default:return create("(punctuator)",token.value)}else this.input.length&&(this.trigger("error",{code:"E024",line:this.line,character:this.char,data:[this.peek()]}),this.input="")}}},exports.Lexer=Lexer,exports.Context=Context},{"../data/ascii-identifier-data.js":"/node_modules/jshint/data/ascii-identifier-data.js","../lodash":"/node_modules/jshint/lodash.js","./reg.js":"/node_modules/jshint/src/reg.js","./state.js":"/node_modules/jshint/src/state.js",events:"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/messages.js":[function(_dereq_,module,exports){"use strict";var _=_dereq_("../lodash"),errors={E001:"Bad option: \'{a}\'.",E002:"Bad option value.",E003:"Expected a JSON value.",E004:"Input is neither a string nor an array of strings.",E005:"Input is empty.",E006:"Unexpected early end of program.",E007:\'Missing "use strict" statement.\',E008:"Strict violation.",E009:"Option \'validthis\' can\'t be used in a global scope.",E010:"\'with\' is not allowed in strict mode.",E011:"\'{a}\' has already been declared.",E012:"const \'{a}\' is initialized to \'undefined\'.",E013:"Attempting to override \'{a}\' which is a constant.",E014:"A regular expression literal can be confused with \'/=\'.",E015:"Unclosed regular expression.",E016:"Invalid regular expression.",E017:"Unclosed comment.",E018:"Unbegun comment.",E019:"Unmatched \'{a}\'.",E020:"Expected \'{a}\' to match \'{b}\' from line {c} and instead saw \'{d}\'.",E021:"Expected \'{a}\' and instead saw \'{b}\'.",E022:"Line breaking error \'{a}\'.",E023:"Missing \'{a}\'.",E024:"Unexpected \'{a}\'.",E025:"Missing \':\' on a case clause.",E026:"Missing \'}\' to match \'{\' from line {a}.",E027:"Missing \']\' to match \'[\' from line {a}.",E028:"Illegal comma.",E029:"Unclosed string.",E030:"Expected an identifier and instead saw \'{a}\'.",E031:"Bad assignment.",E032:"Expected a small integer or \'false\' and instead saw \'{a}\'.",E033:"Expected an operator and instead saw \'{a}\'.",E034:"get/set are ES5 features.",E035:"Missing property name.",E036:"Expected to see a statement and instead saw a block.",E037:null,E038:null,E039:"Function declarations are not invocable. Wrap the whole function invocation in parens.",E040:"Each value should have its own case label.",E041:"Unrecoverable syntax error.",E042:"Stopping.",E043:"Too many errors.",E044:null,E045:"Invalid for each loop.",E046:"A yield statement shall be within a generator function (with syntax: `function*`)",E047:null,E048:"{a} declaration not directly within block.",E049:"A {a} cannot be named \'{b}\'.",E050:"Mozilla acequires the yield expression to be parenthesized here.",E051:null,E052:"Unclosed template literal.",E053:"Export declaration must be in global scope.",E054:"Class properties must be methods. Expected \'(\' but instead saw \'{a}\'.",E055:"The \'{a}\' option cannot be set after any executable code.",E056:"\'{a}\' was used before it was declared, which is illegal for \'{b}\' variables.",E057:"Invalid meta property: \'{a}.{b}\'.",E058:"Missing semicolon."},warnings={W001:"\'hasOwnProperty\' is a really bad name.",W002:"Value of \'{a}\' may be overwritten in IE 8 and earlier.",W003:"\'{a}\' was used before it was defined.",W004:"\'{a}\' is already defined.",W005:"A dot following a number can be confused with a decimal point.",W006:"Confusing minuses.",W007:"Confusing plusses.",W008:"A leading decimal point can be confused with a dot: \'{a}\'.",W009:"The array literal notation [] is preferable.",W010:"The object literal notation {} is preferable.",W011:null,W012:null,W013:null,W014:"Bad line breaking before \'{a}\'.",W015:null,W016:"Unexpected use of \'{a}\'.",W017:"Bad operand.",W018:"Confusing use of \'{a}\'.",W019:"Use the isNaN function to compare with NaN.",W020:"Read only.",W021:"Reassignment of \'{a}\', which is is a {b}. Use \'var\' or \'let\' to declare bindings that may change.",W022:"Do not assign to the exception parameter.",W023:"Expected an identifier in an assignment and instead saw a function invocation.",W024:"Expected an identifier and instead saw \'{a}\' (a reserved word).",W025:"Missing name in function declaration.",W026:"Inner functions should be listed at the top of the outer function.",W027:"Unreachable \'{a}\' after \'{b}\'.",W028:"Label \'{a}\' on {b} statement.",W030:"Expected an assignment or function call and instead saw an expression.",W031:"Do not use \'new\' for side effects.",W032:"Unnecessary semicolon.",W033:"Missing semicolon.",W034:\'Unnecessary directive "{a}".\',W035:"Empty block.",W036:"Unexpected /*member \'{a}\'.",W037:"\'{a}\' is a statement label.",W038:"\'{a}\' used out of scope.",W039:"\'{a}\' is not allowed.",W040:"Possible strict violation.",W041:"Use \'{a}\' to compare with \'{b}\'.",W042:"Avoid EOL escaping.",W043:"Bad escaping of EOL. Use option multistr if needed.",W044:"Bad or unnecessary escaping.",W045:"Bad number \'{a}\'.",W046:"Don\'t use extra leading zeros \'{a}\'.",W047:"A trailing decimal point can be confused with a dot: \'{a}\'.",W048:"Unexpected control character in regular expression.",W049:"Unexpected escaped character \'{a}\' in regular expression.",W050:"JavaScript URL.",W051:"Variables should not be deleted.",W052:"Unexpected \'{a}\'.",W053:"Do not use {a} as a constructor.",W054:"The Function constructor is a form of eval.",W055:"A constructor name should start with an uppercase letter.",W056:"Bad constructor.",W057:"Weird construction. Is \'new\' necessary?",W058:"Missing \'()\' invoking a constructor.",W059:"Avoid arguments.{a}.",W060:"document.write can be a form of eval.",W061:"eval can be harmful.",W062:"Wrap an immediate function invocation in parens to assist the reader in understanding that the expression is the result of a function, and not the function itself.",W063:"Math is not a function.",W064:"Missing \'new\' prefix when invoking a constructor.",W065:"Missing radix parameter.",W066:"Implied eval. Consider passing a function instead of a string.",W067:"Bad invocation.",W068:"Wrapping non-IIFE function literals in parens is unnecessary.",W069:"[\'{a}\'] is better written in dot notation.",W070:"Extra comma. (it breaks older versions of IE)",W071:"This function has too many statements. ({a})",W072:"This function has too many parameters. ({a})",W073:"Blocks are nested too deeply. ({a})",W074:"This function\'s cyclomatic complexity is too high. ({a})",W075:"Duplicate {a} \'{b}\'.",W076:"Unexpected parameter \'{a}\' in get {b} function.",W077:"Expected a single parameter in set {a} function.",W078:"Setter is defined without getter.",W079:"Redefinition of \'{a}\'.",W080:"It\'s not necessary to initialize \'{a}\' to \'undefined\'.",W081:null,W082:"Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.",W083:"Don\'t make functions within a loop.",W084:"Assignment in conditional expression",W085:"Don\'t use \'with\'.",W086:"Expected a \'break\' statement before \'{a}\'.",W087:"Forgotten \'debugger\' statement?",W088:"Creating global \'for\' variable. Should be \'for (var {a} ...\'.",W089:"The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",W090:"\'{a}\' is not a statement label.",W091:null,W093:"Did you mean to return a conditional instead of an assignment?",W094:"Unexpected comma.",W095:"Expected a string and instead saw {a}.",W096:"The \'{a}\' key may produce unexpected results.",W097:\'Use the function form of "use strict".\',W098:"\'{a}\' is defined but never used.",W099:null,W100:"This character may get silently deleted by one or more browsers.",W101:"Line is too long.",W102:null,W103:"The \'{a}\' property is deprecated.",W104:"\'{a}\' is available in ES{b} (use \'esversion: {b}\') or Mozilla JS extensions (use moz).",W105:"Unexpected {a} in \'{b}\'.",W106:"Identifier \'{a}\' is not in camel case.",W107:"Script URL.",W108:"Strings must use doublequote.",W109:"Strings must use singlequote.",W110:"Mixed double and single quotes.",W112:"Unclosed string.",W113:"Control character in string: {a}.",W114:"Avoid {a}.",W115:"Octal literals are not allowed in strict mode.",W116:"Expected \'{a}\' and instead saw \'{b}\'.",W117:"\'{a}\' is not defined.",W118:"\'{a}\' is only available in Mozilla JavaScript extensions (use moz option).",W119:"\'{a}\' is only available in ES{b} (use \'esversion: {b}\').",W120:"You might be leaking a variable ({a}) here.",W121:"Extending prototype of native object: \'{a}\'.",W122:"Invalid typeof value \'{a}\'",W123:"\'{a}\' is already defined in outer scope.",W124:"A generator function shall contain a yield statement.",W125:"This line contains non-breaking spaces: http://jshint.com/doc/options/#nonbsp",W126:"Unnecessary grouping operator.",W127:"Unexpected use of a comma operator.",W128:"Empty array elements acequire elision=true.",W129:"\'{a}\' is defined in a future version of JavaScript. Use a different variable name to avoid migration issues.",W130:"Invalid element after rest element.",W131:"Invalid parameter after rest parameter.",W132:"`var` declarations are forbidden. Use `let` or `const` instead.",W133:"Invalid for-{a} loop left-hand-side: {b}.",W134:"The \'{a}\' option is only available when linting ECMAScript {b} code.",W135:"{a} may not be supported by non-browser environments.",W136:"\'{a}\' must be in function scope.",W137:"Empty destructuring.",W138:"Regular parameters should not come after default parameters."},info={I001:"Comma warnings can be turned off with \'laxcomma\'.",I002:null,I003:"ES5 option is now set per default"};exports.errors={},exports.warnings={},exports.info={},_.each(errors,function(desc,code){exports.errors[code]={code:code,desc:desc}}),_.each(warnings,function(desc,code){exports.warnings[code]={code:code,desc:desc}}),_.each(info,function(desc,code){exports.info[code]={code:code,desc:desc}})},{"../lodash":"/node_modules/jshint/lodash.js"}],"/node_modules/jshint/src/name-stack.js":[function(_dereq_,module){"use strict";function NameStack(){this._stack=[]}Object.defineProperty(NameStack.prototype,"length",{get:function(){return this._stack.length}}),NameStack.prototype.push=function(){this._stack.push(null)},NameStack.prototype.pop=function(){this._stack.pop()},NameStack.prototype.set=function(token){this._stack[this.length-1]=token},NameStack.prototype.infer=function(){var type,nameToken=this._stack[this.length-1],prefix="";return nameToken&&"class"!==nameToken.type||(nameToken=this._stack[this.length-2]),nameToken?(type=nameToken.type,"(string)"!==type&&"(number)"!==type&&"(identifier)"!==type&&"default"!==type?"(expression)":(nameToken.accessorType&&(prefix=nameToken.accessorType+" "),prefix+nameToken.value)):"(empty)"},module.exports=NameStack},{}],"/node_modules/jshint/src/options.js":[function(_dereq_,module,exports){"use strict";exports.bool={enforcing:{bitwise:!0,freeze:!0,camelcase:!0,curly:!0,eqeqeq:!0,futurehostile:!0,notypeof:!0,es3:!0,es5:!0,forin:!0,funcscope:!0,immed:!0,iterator:!0,newcap:!0,noarg:!0,nocomma:!0,noempty:!0,nonbsp:!0,nonew:!0,undef:!0,singleGroups:!1,varstmt:!1,enforceall:!1},relaxing:{asi:!0,multistr:!0,debug:!0,boss:!0,evil:!0,globalstrict:!0,plusplus:!0,proto:!0,scripturl:!0,sub:!0,supernew:!0,laxbreak:!0,laxcomma:!0,validthis:!0,withstmt:!0,moz:!0,noyield:!0,eqnull:!0,lastsemic:!0,loopfunc:!0,expr:!0,esnext:!0,elision:!0},environments:{mootools:!0,couch:!0,jasmine:!0,jquery:!0,node:!0,qunit:!0,rhino:!0,shelljs:!0,prototypejs:!0,yui:!0,mocha:!0,module:!0,wsh:!0,worker:!0,nonstandard:!0,browser:!0,browserify:!0,devel:!0,dojo:!0,typed:!0,phantom:!0},obsolete:{onecase:!0,regexp:!0,regexdash:!0}},exports.val={maxlen:!1,indent:!1,maxerr:!1,predef:!1,globals:!1,quotmark:!1,scope:!1,maxstatements:!1,maxdepth:!1,maxparams:!1,maxcomplexity:!1,shadow:!1,strict:!0,unused:!0,latedef:!1,ignore:!1,ignoreDelimiters:!1,esversion:5},exports.inverted={bitwise:!0,forin:!0,newcap:!0,plusplus:!0,regexp:!0,undef:!0,eqeqeq:!0,strict:!0},exports.validNames=Object.keys(exports.val).concat(Object.keys(exports.bool.relaxing)).concat(Object.keys(exports.bool.enforcing)).concat(Object.keys(exports.bool.obsolete)).concat(Object.keys(exports.bool.environments)),exports.renamed={eqeq:"eqeqeq",windows:"wsh",sloppy:"strict"},exports.removed={nomen:!0,onevar:!0,passfail:!0,white:!0,gcl:!0,smarttabs:!0,trailing:!0},exports.noenforceall={varstmt:!0,strict:!0}},{}],"/node_modules/jshint/src/reg.js":[function(_dereq_,module,exports){"use strict";exports.unsafeString=/@cc|<\\/?|script|\\]\\s*\\]|<\\s*!|</i,exports.unsafeChars=/[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/,exports.needEsc=/[\\u0000-\\u001f&<"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/,exports.needEscGlobal=/[\\u0000-\\u001f&<"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,exports.starSlash=/\\*\\//,exports.identifier=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,exports.javascriptURL=/^(?:javascript|jscript|ecmascript|vbscript|livescript)\\s*:/i,exports.fallsThrough=/^\\s*falls?\\sthrough\\s*$/,exports.maxlenException=/^(?:(?:\\/\\/|\\/\\*|\\*) ?)?[^ ]+$/},{}],"/node_modules/jshint/src/scope-manager.js":[function(_dereq_,module){"use strict";var _=_dereq_("../lodash"),events=_dereq_("events"),marker={},scopeManager=function(state,predefined,exported,declared){function _newScope(type){_current={"(labels)":Object.create(null),"(usages)":Object.create(null),"(breakLabels)":Object.create(null),"(parent)":_current,"(type)":type,"(params)":"functionparams"===type||"catchparams"===type?[]:null},_scopeStack.push(_current)}function warning(code,token){emitter.emit("warning",{code:code,token:token,data:_.slice(arguments,2)})}function error(code,token){emitter.emit("warning",{code:code,token:token,data:_.slice(arguments,2)})}function _setupUsages(labelName){_current["(usages)"][labelName]||(_current["(usages)"][labelName]={"(modified)":[],"(reassigned)":[],"(tokens)":[]})}function _checkForUnused(){if("functionparams"===_current["(type)"])return _checkParams(),void 0;var curentLabels=_current["(labels)"];for(var labelName in curentLabels)curentLabels[labelName]&&"exception"!==curentLabels[labelName]["(type)"]&&curentLabels[labelName]["(unused)"]&&_warnUnused(labelName,curentLabels[labelName]["(token)"],"var")}function _checkParams(){var params=_current["(params)"];if(params)for(var unused_opt,param=params.pop();param;){var label=_current["(labels)"][param];if(unused_opt=_getUnusedOption(state.funct["(unusedOption)"]),"undefined"===param)return;if(label["(unused)"])_warnUnused(param,label["(token)"],"param",state.funct["(unusedOption)"]);else if("last-param"===unused_opt)return;param=params.pop()}}function _getLabel(labelName){for(var i=_scopeStack.length-1;i>=0;--i){var scopeLabels=_scopeStack[i]["(labels)"];if(scopeLabels[labelName])return scopeLabels}}function usedSoFarInCurrentFunction(labelName){for(var i=_scopeStack.length-1;i>=0;i--){var current=_scopeStack[i];if(current["(usages)"][labelName])return current["(usages)"][labelName];if(current===_currentFunctBody)break}return!1}function _checkOuterShadow(labelName,token){if("outer"===state.option.shadow)for(var isGlobal="global"===_currentFunctBody["(type)"],isNewFunction="functionparams"===_current["(type)"],outsideCurrentFunction=!isGlobal,i=0;_scopeStack.length>i;i++){var stackItem=_scopeStack[i];isNewFunction||_scopeStack[i+1]!==_currentFunctBody||(outsideCurrentFunction=!1),outsideCurrentFunction&&stackItem["(labels)"][labelName]&&warning("W123",token,labelName),stackItem["(breakLabels)"][labelName]&&warning("W123",token,labelName)}}function _latedefWarning(type,labelName,token){state.option.latedef&&(state.option.latedef===!0&&"function"===type||"function"!==type)&&warning("W003",token,labelName)}var _current,_scopeStack=[];_newScope("global"),_current["(predefined)"]=predefined;var _currentFunctBody=_current,usedPredefinedAndGlobals=Object.create(null),impliedGlobals=Object.create(null),unuseds=[],emitter=new events.EventEmitter,_getUnusedOption=function(unused_opt){return void 0===unused_opt&&(unused_opt=state.option.unused),unused_opt===!0&&(unused_opt="last-param"),unused_opt},_warnUnused=function(name,tkn,type,unused_opt){var line=tkn.line,chr=tkn.from,raw_name=tkn.raw_text||name;unused_opt=_getUnusedOption(unused_opt);var warnable_types={vars:["var"],"last-param":["var","param"],strict:["var","param","last-param"]};unused_opt&&warnable_types[unused_opt]&&-1!==warnable_types[unused_opt].indexOf(type)&&warning("W098",{line:line,from:chr},raw_name),(unused_opt||"var"===type)&&unuseds.push({name:name,line:line,character:chr})},scopeManagerInst={on:function(names,listener){names.split(" ").forEach(function(name){emitter.on(name,listener)})},isPredefined:function(labelName){return!this.has(labelName)&&_.has(_scopeStack[0]["(predefined)"],labelName)},stack:function(type){var previousScope=_current;_newScope(type),type||"functionparams"!==previousScope["(type)"]||(_current["(isFuncBody)"]=!0,_current["(context)"]=_currentFunctBody,_currentFunctBody=_current)},unstack:function(){var i,j,subScope=_scopeStack.length>1?_scopeStack[_scopeStack.length-2]:null,isUnstackingFunctionBody=_current===_currentFunctBody,isUnstackingFunctionParams="functionparams"===_current["(type)"],isUnstackingFunctionOuter="functionouter"===_current["(type)"],currentUsages=_current["(usages)"],currentLabels=_current["(labels)"],usedLabelNameList=Object.keys(currentUsages);for(currentUsages.__proto__&&-1===usedLabelNameList.indexOf("__proto__")&&usedLabelNameList.push("__proto__"),i=0;usedLabelNameList.length>i;i++){var usedLabelName=usedLabelNameList[i],usage=currentUsages[usedLabelName],usedLabel=currentLabels[usedLabelName];if(usedLabel){var usedLabelType=usedLabel["(type)"];if(usedLabel["(useOutsideOfScope)"]&&!state.option.funcscope){var usedTokens=usage["(tokens)"];if(usedTokens)for(j=0;usedTokens.length>j;j++)usedLabel["(function)"]===usedTokens[j]["(function)"]&&error("W038",usedTokens[j],usedLabelName)}if(_current["(labels)"][usedLabelName]["(unused)"]=!1,"const"===usedLabelType&&usage["(modified)"])for(j=0;usage["(modified)"].length>j;j++)error("E013",usage["(modified)"][j],usedLabelName);if(("function"===usedLabelType||"class"===usedLabelType)&&usage["(reassigned)"])for(j=0;usage["(reassigned)"].length>j;j++)error("W021",usage["(reassigned)"][j],usedLabelName,usedLabelType)}else if(isUnstackingFunctionOuter&&(state.funct["(isCapturing)"]=!0),subScope)if(subScope["(usages)"][usedLabelName]){var subScopeUsage=subScope["(usages)"][usedLabelName];subScopeUsage["(modified)"]=subScopeUsage["(modified)"].concat(usage["(modified)"]),subScopeUsage["(tokens)"]=subScopeUsage["(tokens)"].concat(usage["(tokens)"]),subScopeUsage["(reassigned)"]=subScopeUsage["(reassigned)"].concat(usage["(reassigned)"]),subScopeUsage["(onlyUsedSubFunction)"]=!1}else subScope["(usages)"][usedLabelName]=usage,isUnstackingFunctionBody&&(subScope["(usages)"][usedLabelName]["(onlyUsedSubFunction)"]=!0);else if("boolean"==typeof _current["(predefined)"][usedLabelName]){if(delete declared[usedLabelName],usedPredefinedAndGlobals[usedLabelName]=marker,_current["(predefined)"][usedLabelName]===!1&&usage["(reassigned)"])for(j=0;usage["(reassigned)"].length>j;j++)warning("W020",usage["(reassigned)"][j])}else if(usage["(tokens)"])for(j=0;usage["(tokens)"].length>j;j++){var undefinedToken=usage["(tokens)"][j];undefinedToken.forgiveUndef||(state.option.undef&&!undefinedToken.ignoreUndef&&warning("W117",undefinedToken,usedLabelName),impliedGlobals[usedLabelName]?impliedGlobals[usedLabelName].line.push(undefinedToken.line):impliedGlobals[usedLabelName]={name:usedLabelName,line:[undefinedToken.line]})}}if(subScope||Object.keys(declared).forEach(function(labelNotUsed){_warnUnused(labelNotUsed,declared[labelNotUsed],"var")}),subScope&&!isUnstackingFunctionBody&&!isUnstackingFunctionParams&&!isUnstackingFunctionOuter){var labelNames=Object.keys(currentLabels);for(i=0;labelNames.length>i;i++){var defLabelName=labelNames[i];currentLabels[defLabelName]["(blockscoped)"]||"exception"===currentLabels[defLabelName]["(type)"]||this.funct.has(defLabelName,{excludeCurrent:!0})||(subScope["(labels)"][defLabelName]=currentLabels[defLabelName],"global"!==_currentFunctBody["(type)"]&&(subScope["(labels)"][defLabelName]["(useOutsideOfScope)"]=!0),delete currentLabels[defLabelName])}}_checkForUnused(),_scopeStack.pop(),isUnstackingFunctionBody&&(_currentFunctBody=_scopeStack[_.findLastIndex(_scopeStack,function(scope){return scope["(isFuncBody)"]||"global"===scope["(type)"]})]),_current=subScope},addParam:function(labelName,token,type){if(type=type||"param","exception"===type){var previouslyDefinedLabelType=this.funct.labeltype(labelName);previouslyDefinedLabelType&&"exception"!==previouslyDefinedLabelType&&(state.option.node||warning("W002",state.tokens.next,labelName))}if(_.has(_current["(labels)"],labelName)?_current["(labels)"][labelName].duplicated=!0:(_checkOuterShadow(labelName,token,type),_current["(labels)"][labelName]={"(type)":type,"(token)":token,"(unused)":!0},_current["(params)"].push(labelName)),_.has(_current["(usages)"],labelName)){var usage=_current["(usages)"][labelName];usage["(onlyUsedSubFunction)"]?_latedefWarning(type,labelName,token):warning("E056",token,labelName,type)}},validateParams:function(){if("global"!==_currentFunctBody["(type)"]){var isStrict=state.isStrict(),currentFunctParamScope=_currentFunctBody["(parent)"];currentFunctParamScope["(params)"]&¤tFunctParamScope["(params)"].forEach(function(labelName){var label=currentFunctParamScope["(labels)"][labelName];label&&label.duplicated&&(isStrict?warning("E011",label["(token)"],labelName):state.option.shadow!==!0&&warning("W004",label["(token)"],labelName))})}},getUsedOrDefinedGlobals:function(){var list=Object.keys(usedPredefinedAndGlobals);return usedPredefinedAndGlobals.__proto__===marker&&-1===list.indexOf("__proto__")&&list.push("__proto__"),list},getImpliedGlobals:function(){var values=_.values(impliedGlobals),hasProto=!1;return impliedGlobals.__proto__&&(hasProto=values.some(function(value){return"__proto__"===value.name}),hasProto||values.push(impliedGlobals.__proto__)),values},getUnuseds:function(){return unuseds},has:function(labelName){return Boolean(_getLabel(labelName))},labeltype:function(labelName){var scopeLabels=_getLabel(labelName);return scopeLabels?scopeLabels[labelName]["(type)"]:null},addExported:function(labelName){var globalLabels=_scopeStack[0]["(labels)"];if(_.has(declared,labelName))delete declared[labelName];else if(_.has(globalLabels,labelName))globalLabels[labelName]["(unused)"]=!1;else{for(var i=1;_scopeStack.length>i;i++){var scope=_scopeStack[i];if(scope["(type)"])break;if(_.has(scope["(labels)"],labelName)&&!scope["(labels)"][labelName]["(blockscoped)"])return scope["(labels)"][labelName]["(unused)"]=!1,void 0}exported[labelName]=!0}},setExported:function(labelName,token){this.block.use(labelName,token)\n},addlabel:function(labelName,opts){var type=opts.type,token=opts.token,isblockscoped="let"===type||"const"===type||"class"===type,isexported="global"===(isblockscoped?_current:_currentFunctBody)["(type)"]&&_.has(exported,labelName);if(_checkOuterShadow(labelName,token,type),isblockscoped){var declaredInCurrentScope=_current["(labels)"][labelName];if(declaredInCurrentScope||_current!==_currentFunctBody||"global"===_current["(type)"]||(declaredInCurrentScope=!!_currentFunctBody["(parent)"]["(labels)"][labelName]),!declaredInCurrentScope&&_current["(usages)"][labelName]){var usage=_current["(usages)"][labelName];usage["(onlyUsedSubFunction)"]?_latedefWarning(type,labelName,token):warning("E056",token,labelName,type)}declaredInCurrentScope?warning("E011",token,labelName):"outer"===state.option.shadow&&scopeManagerInst.funct.has(labelName)&&warning("W004",token,labelName),scopeManagerInst.block.add(labelName,type,token,!isexported)}else{var declaredInCurrentFunctionScope=scopeManagerInst.funct.has(labelName);!declaredInCurrentFunctionScope&&usedSoFarInCurrentFunction(labelName)&&_latedefWarning(type,labelName,token),scopeManagerInst.funct.has(labelName,{onlyBlockscoped:!0})?warning("E011",token,labelName):state.option.shadow!==!0&&declaredInCurrentFunctionScope&&"__proto__"!==labelName&&"global"!==_currentFunctBody["(type)"]&&warning("W004",token,labelName),scopeManagerInst.funct.add(labelName,type,token,!isexported),"global"===_currentFunctBody["(type)"]&&(usedPredefinedAndGlobals[labelName]=marker)}},funct:{labeltype:function(labelName,options){for(var onlyBlockscoped=options&&options.onlyBlockscoped,excludeParams=options&&options.excludeParams,currentScopeIndex=_scopeStack.length-(options&&options.excludeCurrent?2:1),i=currentScopeIndex;i>=0;i--){var current=_scopeStack[i];if(current["(labels)"][labelName]&&(!onlyBlockscoped||current["(labels)"][labelName]["(blockscoped)"]))return current["(labels)"][labelName]["(type)"];var scopeCheck=excludeParams?_scopeStack[i-1]:current;if(scopeCheck&&"functionparams"===scopeCheck["(type)"])return null}return null},hasBreakLabel:function(labelName){for(var i=_scopeStack.length-1;i>=0;i--){var current=_scopeStack[i];if(current["(breakLabels)"][labelName])return!0;if("functionparams"===current["(type)"])return!1}return!1},has:function(labelName,options){return Boolean(this.labeltype(labelName,options))},add:function(labelName,type,tok,unused){_current["(labels)"][labelName]={"(type)":type,"(token)":tok,"(blockscoped)":!1,"(function)":_currentFunctBody,"(unused)":unused}}},block:{isGlobal:function(){return"global"===_current["(type)"]},use:function(labelName,token){var paramScope=_currentFunctBody["(parent)"];paramScope&¶mScope["(labels)"][labelName]&&"param"===paramScope["(labels)"][labelName]["(type)"]&&(scopeManagerInst.funct.has(labelName,{excludeParams:!0,onlyBlockscoped:!0})||(paramScope["(labels)"][labelName]["(unused)"]=!1)),token&&(state.ignored.W117||state.option.undef===!1)&&(token.ignoreUndef=!0),_setupUsages(labelName),token&&(token["(function)"]=_currentFunctBody,_current["(usages)"][labelName]["(tokens)"].push(token))},reassign:function(labelName,token){this.modify(labelName,token),_current["(usages)"][labelName]["(reassigned)"].push(token)},modify:function(labelName,token){_setupUsages(labelName),_current["(usages)"][labelName]["(modified)"].push(token)},add:function(labelName,type,tok,unused){_current["(labels)"][labelName]={"(type)":type,"(token)":tok,"(blockscoped)":!0,"(unused)":unused}},addBreakLabel:function(labelName,opts){var token=opts.token;scopeManagerInst.funct.hasBreakLabel(labelName)?warning("E011",token,labelName):"outer"===state.option.shadow&&(scopeManagerInst.funct.has(labelName)?warning("W004",token,labelName):_checkOuterShadow(labelName,token)),_current["(breakLabels)"][labelName]=token}}};return scopeManagerInst};module.exports=scopeManager},{"../lodash":"/node_modules/jshint/lodash.js",events:"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/state.js":[function(_dereq_,module,exports){"use strict";var NameStack=_dereq_("./name-stack.js"),state={syntax:{},isStrict:function(){return this.directive["use strict"]||this.inClassBody||this.option.module||"implied"===this.option.strict},inMoz:function(){return this.option.moz},inES6:function(){return this.option.moz||this.option.esversion>=6},inES5:function(strict){return strict?!(this.option.esversion&&5!==this.option.esversion||this.option.moz):!this.option.esversion||this.option.esversion>=5||this.option.moz},reset:function(){this.tokens={prev:null,next:null,curr:null},this.option={},this.funct=null,this.ignored={},this.directive={},this.jsonMode=!1,this.jsonWarnings=[],this.lines=[],this.tab="",this.cache={},this.ignoredLines={},this.forinifcheckneeded=!1,this.nameStack=new NameStack,this.inClassBody=!1}};exports.state=state},{"./name-stack.js":"/node_modules/jshint/src/name-stack.js"}],"/node_modules/jshint/src/style.js":[function(_dereq_,module,exports){"use strict";exports.register=function(linter){linter.on("Identifier",function(data){linter.getOption("proto")||"__proto__"===data.name&&linter.warn("W103",{line:data.line,"char":data.char,data:[data.name,"6"]})}),linter.on("Identifier",function(data){linter.getOption("iterator")||"__iterator__"===data.name&&linter.warn("W103",{line:data.line,"char":data.char,data:[data.name]})}),linter.on("Identifier",function(data){linter.getOption("camelcase")&&data.name.replace(/^_+|_+$/g,"").indexOf("_")>-1&&!data.name.match(/^[A-Z0-9_]*$/)&&linter.warn("W106",{line:data.line,"char":data.from,data:[data.name]})}),linter.on("String",function(data){var code,quotmark=linter.getOption("quotmark");quotmark&&("single"===quotmark&&"\'"!==data.quote&&(code="W109"),"double"===quotmark&&\'"\'!==data.quote&&(code="W108"),quotmark===!0&&(linter.getCache("quotmark")||linter.setCache("quotmark",data.quote),linter.getCache("quotmark")!==data.quote&&(code="W110")),code&&linter.warn(code,{line:data.line,"char":data.char}))}),linter.on("Number",function(data){"."===data.value.charAt(0)&&linter.warn("W008",{line:data.line,"char":data.char,data:[data.value]}),"."===data.value.substr(data.value.length-1)&&linter.warn("W047",{line:data.line,"char":data.char,data:[data.value]}),/^00+/.test(data.value)&&linter.warn("W046",{line:data.line,"char":data.char,data:[data.value]})}),linter.on("String",function(data){var re=/^(?:javascript|jscript|ecmascript|vbscript|livescript)\\s*:/i;linter.getOption("scripturl")||re.test(data.value)&&linter.warn("W107",{line:data.line,"char":data.char})})}},{}],"/node_modules/jshint/src/vars.js":[function(_dereq_,module,exports){"use strict";exports.reservedVars={arguments:!1,NaN:!1},exports.ecmaIdentifiers={3:{Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},5:{JSON:!1},6:{Map:!1,Promise:!1,Proxy:!1,Reflect:!1,Set:!1,Symbol:!1,WeakMap:!1,WeakSet:!1}},exports.browser={Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CSS:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,Comment:!1,CustomEvent:!1,DOMParser:!1,defaultStatus:!1,Document:!1,document:!1,DocumentFragment:!1,Element:!1,ElementTimeControl:!1,Event:!1,event:!1,fetch:!1,FileReader:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Image:!1,Intl:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,performance:!1,print:!1,Range:!1,requestAnimationFrame:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimationElement:!1,SVGCSSRule:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLineElement:!1,SVGLinearGradientElement:!1,SVGLocatable:!1,SVGMPathElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGSVGElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTransformable:!1,SVGURIReference:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGVKernElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},exports.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},exports.worker={importScripts:!0,postMessage:!0,self:!0,FileReaderSync:!0},exports.nonstandard={escape:!1,unescape:!1},exports.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},exports.node={__filename:!1,__dirname:!1,GLOBAL:!1,global:!1,module:!1,acequire:!1,Buffer:!0,console:!0,exports:!0,process:!0,setTimeout:!0,clearTimeout:!0,setInterval:!0,clearInterval:!0,setImmediate:!0,clearImmediate:!0},exports.browserify={__filename:!1,__dirname:!1,global:!1,module:!1,acequire:!1,Buffer:!0,exports:!0,process:!0},exports.phantom={phantom:!0,acequire:!0,WebPage:!0,console:!0,exports:!0},exports.qunit={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,"throws":!1},exports.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},exports.shelljs={target:!1,echo:!1,exit:!1,cd:!1,pwd:!1,ls:!1,find:!1,cp:!1,rm:!1,mv:!1,mkdir:!1,test:!1,cat:!1,sed:!1,grep:!1,which:!1,dirs:!1,pushd:!1,popd:!1,env:!1,exec:!1,chmod:!1,config:!1,error:!1,tempdir:!1},exports.typed={ArrayBuffer:!1,ArrayBufferView:!1,DataView:!1,Float32Array:!1,Float64Array:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1},exports.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},exports.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},exports.jquery={$:!1,jQuery:!1},exports.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,IFrame:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},exports.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},exports.yui={YUI:!1,Y:!1,YUI_config:!1},exports.mocha={mocha:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,context:!1,xcontext:!1,before:!1,after:!1,beforeEach:!1,afterEach:!1,suite:!1,test:!1,setup:!1,teardown:!1,suiteSetup:!1,suiteTeardown:!1},exports.jasmine={jasmine:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,beforeEach:!1,afterEach:!1,setFixtures:!1,loadFixtures:!1,spyOn:!1,expect:!1,runs:!1,waitsFor:!1,waits:!1,beforeAll:!1,afterAll:!1,fail:!1,fdescribe:!1,fit:!1,pending:!1}},{}]},{},["/node_modules/jshint/src/jshint.js"])}),ace.define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/javascript/jshint"],function(acequire,exports,module){"use strict";function startRegex(arr){return RegExp("^("+arr.join("|")+")")}var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,lint=acequire("./javascript/jshint").JSHINT,disabledWarningsRe=startRegex(["Bad for in variable \'(.+)\'.",\'Missing "use strict"\']),errorsRe=startRegex(["Unexpected","Expected ","Confusing (plus|minus)","\\\\{a\\\\} unterminated regular expression","Unclosed ","Unmatched ","Unbegun comment","Bad invocation","Missing space after","Missing operator at"]),infoRe=startRegex(["Expected an assignment","Bad escapement of EOL","Unexpected comma","Unexpected space","Missing radix parameter.","A leading decimal point can","\\\\[\'{a}\'\\\\] is better written in dot notation.","\'{a}\' used out of scope"]),JavaScriptWorker=exports.JavaScriptWorker=function(sender){Mirror.call(this,sender),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(options){this.options=options||{esnext:!0,moz:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(newOptions){oop.mixin(this.options,newOptions),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval("throw 0;"+str)}catch(e){if(0===e)return!0}return!1},this.onUpdate=function(){var value=this.doc.getValue();if(value=value.replace(/^#!.*\\n/,"\\n"),!value)return this.sender.emit("annotate",[]);var errors=[],maxErrorLevel=this.isValidJS(value)?"warning":"error";lint(value,this.options,this.options.globals);for(var results=lint.errors,errorAdded=!1,i=0;results.length>i;i++){var error=results[i];if(error){var raw=error.raw,type="warning";if("Missing semicolon."==raw){var str=error.evidence.substr(error.character);str=str.charAt(str.search(/\\S/)),"error"==maxErrorLevel&&str&&/[\\w\\d{([\'"]/.test(str)?(error.reason=\'Missing ";" before statement\',type="error"):type="info"}else{if(disabledWarningsRe.test(raw))continue;infoRe.test(raw)?type="info":errorsRe.test(raw)?(errorAdded=!0,type=maxErrorLevel):"\'{a}\' is not defined."==raw?type="warning":"\'{a}\' is defined but never used."==raw&&(type="info")}errors.push({row:error.line-1,column:error.character-1,text:error.reason,type:type,raw:raw})}}this.sender.emit("annotate",errors)}}.call(JavaScriptWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\\n\v\\f\\r \\u2028\\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'},function(e,t,n){var i,r;r=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){var i=n(2).mergeOpts,r=n(1),o=n(3).Output,s=r.lineBreak,a=r.allLineBreaks;e.exports.Beautifier=function(e,t){t=i(t=t||{},"css"),e=e||"";var n=0,r=t.indent_size?parseInt(t.indent_size,10):4,c=t.indent_char||" ",l=void 0!==t.preserve_newlines&&t.preserve_newlines,u=void 0===t.selector_separator_newline||t.selector_separator_newline,h=void 0!==t.end_with_newline&&t.end_with_newline,d=void 0===t.newline_between_rules||t.newline_between_rules,f=void 0!==t.space_around_combinator&&t.space_around_combinator;f=f||void 0!==t.space_around_selector_separator&&t.space_around_selector_separator;var p=t.eol?t.eol:"auto";t.indent_with_tabs&&(c="\t",r=1),"auto"===p&&(p="\n",e&&s.test(e||"")&&(p=e.match(s)[0])),p=p.replace(/\\r/,"\r").replace(/\\n/,"\n");var g,m=/^\s+$/,v=-1,y=0;function b(){return(g=e.charAt(++v))||""}function w(t){var n,i=v;return t&&_(),n=e.charAt(v+1)||"",v=i-1,b(),n}function x(t){for(var n=v;b();)if("\\"===g)b();else{if(-1!==t.indexOf(g))break;if("\n"===g)break}return e.substring(n,v+1)}function _(e){for(var t=0;m.test(w());)b(),"\n"===g&&e&&l&&(L.add_new_line(!0),t++);return n=t,t}function k(){var e="";for(g&&m.test(g)&&(e=g);m.test(b());)e+=g;return e}function C(){var t=v,n="/"===w();for(b();b();){if(!n&&"*"===g&&"/"===w()){b();break}if(n&&"\n"===g)return e.substring(t,v)}return e.substring(t,v)+g}function E(t){return e.substring(v-t.length,v).toLowerCase()===t}function A(){for(var t=0,n=v+1;n<e.length;n++){var i=e.charAt(n);if("{"===i)return!0;if("("===i)t+=1;else if(")"===i){if(0===t)return!1;t-=1}else if(";"===i||"}"===i)return!1}return!1}var S="",F=0;if((e=e.replace(a,"\n"))&&e.length){for(;" "===e.charAt(F)||"\t"===e.charAt(F);)F+=1;S=e.substring(0,F),e=e.substring(F)}var T,D,L,P=new Array(r+1).join(c);function R(e){L.just_added_newline()&&L.set_indent(T),L.add_token(e)}function M(e){e&&(L.space_before_token=!0)}this.beautify=function(){L=new o(P,S),T=0,D=0,v=-1,g=null,y=0;for(var e,t,i=!1,r=!1,s=!1,a="",c="";;){var l=k(),F=""!==l,B=-1!==l.indexOf("\n");if(c=a,a=g,!g)break;if("/"===g&&"*"===w()){var O=0===T;(B||O)&&L.add_new_line(),R(C()),L.add_new_line(),O&&L.add_new_line(!0)}else if("/"===g&&"/"===w())B||"{"===c||L.trim(!0),L.space_before_token=!0,R(C()),L.add_new_line();else if("@"===g)if(M(F),"{"===w())R(x("}"));else{R(g);var j=(e=v,t=x(": ,;{}()[]/='\""),v=e-1,b(),t);j.match(/[ :]$/)&&(b(),R(j=x(": ").replace(/\s$/,"")),L.space_before_token=!0),(j=j.replace(/\s$/,""))in this.NESTED_AT_RULE&&(D+=1,j in this.CONDITIONAL_GROUP_RULE&&(s=!0))}else"#"===g&&"{"===w()?(M(F),R(x("}"))):"{"===g?"}"===w(!0)?(_(),b(),L.space_before_token=!0,R("{}"),_(!0)||L.add_new_line(),n<2&&d&&0===T&&L.add_new_line(!0)):(T++,L.space_before_token=!0,R(g),_(!0)||L.add_new_line(),s?(s=!1,i=T>D):i=T>=D):"}"===g?(T>0&&T--,L.add_new_line(),R(g),i=!1,r=!1,D&&D--,_(!0)||L.add_new_line(),n<2&&d&&0===T&&L.add_new_line(!0)):":"===g?(_(),!i&&!s||E("&")||A()||E("(")?(E(" ")&&(L.space_before_token=!0),":"===w()?(b(),R("::")):R(":")):(R(":"),r||(r=!0,L.space_before_token=!0))):'"'===g||"'"===g?(M(F),R(x(g))):";"===g?(r=!1,R(g),_(!0)||L.add_new_line()):"("===g?E("url")?(R(g),_(),b()&&(")"!==g&&'"'!==g&&"'"!==g?R(x(")")):v--)):(y++,M(F),R(g),_()):")"===g?(R(g),y--):","===g?(R(g),!_(!0)&&u&&!r&&y<1?L.add_new_line():L.space_before_token=!0):(">"===g||"+"===g||"~"===g)&&!r&&y<1?f?(L.space_before_token=!0,R(g),L.space_before_token=!0):(R(g),_(),g&&m.test(g)&&(g="")):"]"===g?R(g):"["===g?(M(F),R(g)):"="===g?(_(),R("="),m.test(g)&&(g="")):"!"===g?(R(" "),R(g)):(M(F),R(g))}return L.get_code(h,p)},this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}},function(e,t){var n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i=new RegExp("["+n+"]"),r=new RegExp("["+n+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|"+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g"),t.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||e>=170&&i.test(String.fromCharCode(e)))},t.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||e>=170&&r.test(String.fromCharCode(e))))}},function(e,t){e.exports.mergeOpts=function(e,t){var n,i={};for(n in e)n!==t&&(i[n]=e[n]);if(t in e)for(n in e[t])i[n]=e[t][n];return i}},function(e,t){e.exports.Output=function(e,t){t=t||"",this.indent_cache=[t],this.baseIndentLength=t.length,this.indent_length=e.length,this.raw=!1;var n=[];this.baseIndentString=t,this.indent_string=e,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new function(e){var t=0,n=-1,i=[],r=!0;this.set_indent=function(i){t=e.baseIndentLength+i*e.indent_length,n=i},this.get_character_count=function(){return t},this.is_empty=function(){return r},this.last=function(){return this._empty?null:i[i.length-1]},this.push=function(e){i.push(e),t+=e.length,r=!1},this.pop=function(){var e=null;return r||(e=i.pop(),t-=e.length,r=0===i.length),e},this.remove_indent=function(){n>0&&(n-=1,t-=e.indent_length)},this.trim=function(){for(;" "===this.last();)i.pop(),t-=1;r=0===i.length},this.toString=function(){var t="";return this._empty||(n>=0&&(t=e.indent_cache[n]),t+=i.join("")),t}}(this),n.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return n.length},this.add_new_line=function(e){return!(1===this.get_line_number()&&this.just_added_newline()||!e&&this.just_added_newline()||(this.raw||this.add_outputline(),0))},this.get_code=function(e,t){var i=n.join("\n").replace(/[\r\n\t ]+$/,"");return e&&(i+="\n"),"\n"!==t&&(i=i.replace(/[\n]/g,t)),i},this.set_indent=function(e){if(n.length>1){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.add_outputline();this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1},this.add_token=function(e){this.add_space_before_token(),this.current_line.push(e)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_indent=function(e){for(var t=n.length;e<t;)n[e].remove_indent(),e++},this.trim=function(i){for(i=void 0!==i&&i,this.current_line.trim(e,t);i&&n.length>1&&this.current_line.is_empty();)n.pop(),this.current_line=n[n.length-1],this.current_line.trim();this.previous_line=n.length>1?n[n.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){return!!this.just_added_newline()&&(1===n.length||n[n.length-2].is_empty())}}},function(e,t,n){var i=n(0).Beautifier;e.exports=function(e,t){return new i(e,t).beautify()}}]),void 0===(i=function(){return{css_beautify:r}}.apply(t,[]))||(e.exports=i)},function(e,t,n){var i,r;r=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){var n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i=new RegExp("["+n+"]"),r=new RegExp("["+n+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|"+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g"),t.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||e>=170&&i.test(String.fromCharCode(e)))},t.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||e>=170&&r.test(String.fromCharCode(e))))}},function(e,t,n){var i=n(3).mergeOpts,r=n(0),o=n(4).Output,s=n(7).Tokenizer;function a(e,t){if(!t.multiline_frame&&t.mode!==d.ForInitializer&&t.mode!==d.Conditional){var n=t.start_line_index;e.remove_indent(n)}}function c(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}var l=["before-newline","after-newline","preserve-newline"],u=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].replace(/-/g,"_")]=e[n];return t}(l),h=[u.before_newline,u.preserve_newline],d={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};e.exports.Beautifier=function(e,t){"use strict";var n,f,p,g,m,v,y,b,w,x,_,k,C,E=[],A="";function S(e,t){var i=0;return e&&(i=e.indentation_level,!n.just_added_newline()&&e.line_indent_level>i&&(i=e.line_indent_level)),{mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:i,line_indent_level:e?e.line_indent_level:i,start_line_index:n.get_line_number(),ternary_depth:0}}k={TK_START_EXPR:function(){H()||L(g);var e=d.Expression;if("["===g.text){if("TK_WORD"===m||")"===b.last_text)return"TK_RESERVED"===m&&c(b.last_text,p.line_starters)&&(n.space_before_token=!0),I(e),O(),j(),void(C.space_in_paren&&(n.space_before_token=!0));e=d.ArrayLiteral,$(b.mode)&&("["!==b.last_text&&(","!==b.last_text||"]"!==v&&"}"!==v)||C.keep_array_indentation||M())}else"TK_RESERVED"===m&&"for"===b.last_text?e=d.ForInitializer:"TK_RESERVED"===m&&c(b.last_text,["if","while"])&&(e=d.Conditional);";"===b.last_text||"TK_START_BLOCK"===m?M():"TK_END_EXPR"===m||"TK_START_EXPR"===m||"TK_END_BLOCK"===m||"."===b.last_text?R(g.wanted_newline):"TK_RESERVED"===m&&"("===g.text||"TK_WORD"===m||"TK_OPERATOR"===m?"TK_RESERVED"===m&&("function"===b.last_word||"typeof"===b.last_word)||"*"===b.last_text&&(c(v,["function","yield"])||b.mode===d.ObjectLiteral&&c(v,["{",","]))?C.space_after_anon_function&&(n.space_before_token=!0):"TK_RESERVED"!==m||!c(b.last_text,p.line_starters)&&"catch"!==b.last_text||C.space_before_conditional&&(n.space_before_token=!0):n.space_before_token=!0,"("===g.text&&"TK_RESERVED"===m&&c(b.last_word,["await","async"])&&(n.space_before_token=!0),"("===g.text&&("TK_EQUALS"!==m&&"TK_OPERATOR"!==m||z()||R()),"("===g.text&&"TK_WORD"!==m&&"TK_RESERVED"!==m&&R(),I(e),O(),C.space_in_paren&&(n.space_before_token=!0),j()},TK_END_EXPR:function(){for(;b.mode===d.Statement;)W();L(g),b.multiline_frame&&R("]"===g.text&&$(b.mode)&&!C.keep_array_indentation),C.space_in_paren&&("TK_START_EXPR"!==m||C.space_in_empty_paren?n.space_before_token=!0:(n.trim(),n.space_before_token=!1)),"]"===g.text&&C.keep_array_indentation?(O(),W()):(W(),O()),a(n,w),b.do_while&&w.mode===d.Conditional&&(w.mode=d.Expression,b.do_block=!1,b.do_while=!1)},TK_START_BLOCK:function(){L(g);var e=U(1),t=U(2);t&&(c(t.text,[":",","])&&c(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||c(e.text,["get","set","..."])&&c(t.type,["TK_WORD","TK_RESERVED"]))?c(v,["class","interface"])?I(d.BlockStatement):I(d.ObjectLiteral):"TK_OPERATOR"===m&&"=>"===b.last_text?I(d.BlockStatement):c(m,["TK_EQUALS","TK_START_EXPR","TK_COMMA","TK_OPERATOR"])||"TK_RESERVED"===m&&c(b.last_text,["return","throw","import","default"])?I(d.ObjectLiteral):I(d.BlockStatement);var i=!e.comments_before.length&&"}"===e.text&&"function"===b.last_word&&"TK_END_EXPR"===m;if(C.brace_preserve_inline){var r=0,o=null;b.inline_frame=!0;do{if((o=U(r+=1)).wanted_newline){b.inline_frame=!1;break}}while("TK_EOF"!==o.type&&("TK_END_BLOCK"!==o.type||o.opened!==g))}("expand"===C.brace_style||"none"===C.brace_style&&g.wanted_newline)&&!b.inline_frame?"TK_OPERATOR"!==m&&(i||"TK_EQUALS"===m||"TK_RESERVED"===m&&V(b.last_text)&&"else"!==b.last_text)?n.space_before_token=!0:M(!1,!0):(!$(w.mode)||"TK_START_EXPR"!==m&&"TK_COMMA"!==m||(("TK_COMMA"===m||C.space_in_paren)&&(n.space_before_token=!0),("TK_COMMA"===m||"TK_START_EXPR"===m&&b.inline_frame)&&(R(),w.multiline_frame=w.multiline_frame||b.multiline_frame,b.multiline_frame=!1)),"TK_OPERATOR"!==m&&"TK_START_EXPR"!==m&&("TK_START_BLOCK"!==m||b.inline_frame?n.space_before_token=!0:M())),O(),j()},TK_END_BLOCK:function(){for(L(g);b.mode===d.Statement;)W();var e="TK_START_BLOCK"===m;b.inline_frame&&!e?n.space_before_token=!0:"expand"===C.brace_style?e||M():e||($(b.mode)&&C.keep_array_indentation?(C.keep_array_indentation=!1,M(),C.keep_array_indentation=!0):M()),W(),O()},TK_WORD:K,TK_RESERVED:K,TK_SEMICOLON:function(){H()?n.space_before_token=!1:L(g);for(var e=U(1);!(b.mode!==d.Statement||b.if_block&&e&&"TK_RESERVED"===e.type&&"else"===e.text||b.do_block);)W();b.import_block&&(b.import_block=!1),O()},TK_STRING:function(){H()?n.space_before_token=!0:(L(g),"TK_RESERVED"===m||"TK_WORD"===m||b.inline_frame?n.space_before_token=!0:"TK_COMMA"===m||"TK_START_EXPR"===m||"TK_EQUALS"===m||"TK_OPERATOR"===m?z()||R():M()),O()},TK_EQUALS:function(){H()||L(g),b.declaration_statement&&(b.declaration_assignment=!0),n.space_before_token=!0,O(),n.space_before_token=!0},TK_OPERATOR:function(){var e="*"===g.text&&("TK_RESERVED"===m&&c(b.last_text,["function","yield"])||c(m,["TK_START_BLOCK","TK_COMMA","TK_END_BLOCK","TK_SEMICOLON"])),t=c(g.text,["-","+"])&&(c(m,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||c(b.last_text,p.line_starters)||","===b.last_text);if(H());else{var i=!e;L(g,i)}if("TK_RESERVED"===m&&V(b.last_text))return n.space_before_token=!0,void O();if("*"!==g.text||"TK_DOT"!==m)if("::"!==g.text){if("TK_OPERATOR"===m&&c(C.operator_position,h)&&R(),":"===g.text&&b.in_case)return b.case_body=!0,j(),O(),M(),void(b.in_case=!1);var r=!0,o=!0,s=!1;if(":"===g.text?0===b.ternary_depth?r=!1:(b.ternary_depth-=1,s=!0):"?"===g.text&&(b.ternary_depth+=1),!t&&!e&&C.preserve_newlines&&c(g.text,p.positionable_operators)){var a=":"===g.text,l=a&&s,f=a&&!s;switch(C.operator_position){case u.before_newline:return n.space_before_token=!f,O(),a&&!l||R(),void(n.space_before_token=!0);case u.after_newline:return n.space_before_token=!0,!a||l?U(1).wanted_newline?M(!1,!0):R():n.space_before_token=!1,O(),void(n.space_before_token=!0);case u.preserve_newline:return f||R(),r=!(n.just_added_newline()||f),n.space_before_token=r,O(),void(n.space_before_token=!0)}}if(e){R(),r=!1;var v=U(1);o=v&&c(v.type,["TK_WORD","TK_RESERVED"])}else"..."===g.text?(R(),r="TK_START_BLOCK"===m,o=!1):(c(g.text,["--","++","!","~"])||t)&&(r=!1,o=!1,!g.wanted_newline||"--"!==g.text&&"++"!==g.text||M(!1,!0),";"===b.last_text&&N(b.mode)&&(r=!0),"TK_RESERVED"===m?r=!0:"TK_END_EXPR"===m?r=!("]"===b.last_text&&("--"===g.text||"++"===g.text)):"TK_OPERATOR"===m&&(r=c(g.text,["--","-","++","+"])&&c(b.last_text,["--","-","++","+"]),c(g.text,["+","-"])&&c(b.last_text,["--","++"])&&(o=!0)),(b.mode!==d.BlockStatement||b.inline_frame)&&b.mode!==d.Statement||"{"!==b.last_text&&";"!==b.last_text||M());n.space_before_token=n.space_before_token||r,O(),n.space_before_token=o}else O();else O()},TK_COMMA:function(){L(g,!0),O(),n.space_before_token=!0,b.declaration_statement?(N(b.parent.mode)&&(b.declaration_assignment=!1),b.declaration_assignment?(b.declaration_assignment=!1,M(!1,!0)):C.comma_first&&R()):b.mode===d.ObjectLiteral||b.mode===d.Statement&&b.parent.mode===d.ObjectLiteral?(b.mode===d.Statement&&W(),b.inline_frame||M()):C.comma_first&&R()},TK_BLOCK_COMMENT:function(e){if(n.raw)return n.add_raw_token(g),void(g.directives&&"end"===g.directives.preserve&&(n.raw=C.test_output_raw));if(g.directives)return M(!1,e),O(),"start"===g.directives.preserve&&(n.raw=!0),void M(!1,!0);if(!r.newline.test(g.text)&&!g.wanted_newline)return n.space_before_token=!0,O(),void(n.space_before_token=!0);var t,i=function(e){for(var t=[],n=(e=e.replace(r.allLineBreaks,"\n")).indexOf("\n");-1!==n;)t.push(e.substring(0,n)),e=e.substring(n+1),n=e.indexOf("\n");return e.length&&t.push(e),t}(g.text),o=!1,s=!1,a=g.whitespace_before,c=a.length;for(M(!1,e),i.length>1&&(o=function(e,t){for(var n=0;n<e.length;n++){var i=e[n].replace(/^\s+|\s+$/g,"");if(i.charAt(0)!==t)return!1}return!0}(i.slice(1),"*"),s=function(e,t){for(var n,i=0,r=e.length;i<r;i++)if((n=e[i])&&0!==n.indexOf(t))return!1;return!0}(i.slice(1),a)),O(i[0]),t=1;t<i.length;t++)M(!1,!0),o?O(" "+i[t].replace(/^\s+/g,"")):s&&i[t].length>c?O(i[t].substring(c)):n.add_token(i[t]);M(!1,e)},TK_COMMENT:function(e){g.wanted_newline?M(!1,e):n.trim(!0),n.space_before_token=!0,O(),M(!1,e)},TK_DOT:function(){H()||L(g,!0),"TK_RESERVED"===m&&V(b.last_text)?n.space_before_token=!0:R(")"===b.last_text&&C.break_chained_methods),O()},TK_UNKNOWN:function(e){O(),"\n"===g.text[g.text.length-1]&&M(!1,e)},TK_EOF:function(){for(;b.mode===d.Statement;)W();L(g)}},t=i(t=t||{},"js"),C={},"expand-strict"===t.brace_style?t.brace_style="expand":"collapse-preserve-inline"===t.brace_style?t.brace_style="collapse,preserve-inline":void 0!==t.braces_on_own_line?t.brace_style=t.braces_on_own_line?"expand":"collapse":t.brace_style||(t.brace_style="collapse");var F=t.brace_style.split(/[^a-zA-Z0-9_\-]+/);C.brace_preserve_inline=!1,C.brace_style="collapse";for(var T=0;T<F.length;T++)"preserve-inline"===F[T]?C.brace_preserve_inline=!0:C.brace_style=F[T];for(C.indent_size=t.indent_size?parseInt(t.indent_size,10):4,C.indent_char=t.indent_char?t.indent_char:" ",C.eol=t.eol?t.eol:"auto",C.preserve_newlines=void 0===t.preserve_newlines||t.preserve_newlines,C.unindent_chained_methods=void 0!==t.unindent_chained_methods&&t.unindent_chained_methods,C.break_chained_methods=void 0!==t.break_chained_methods&&t.break_chained_methods,C.max_preserve_newlines=void 0===t.max_preserve_newlines?0:parseInt(t.max_preserve_newlines,10),C.space_in_paren=void 0!==t.space_in_paren&&t.space_in_paren,C.space_in_empty_paren=void 0!==t.space_in_empty_paren&&t.space_in_empty_paren,C.jslint_happy=void 0!==t.jslint_happy&&t.jslint_happy,C.space_after_anon_function=void 0!==t.space_after_anon_function&&t.space_after_anon_function,C.keep_array_indentation=void 0!==t.keep_array_indentation&&t.keep_array_indentation,C.space_before_conditional=void 0===t.space_before_conditional||t.space_before_conditional,C.unescape_strings=void 0!==t.unescape_strings&&t.unescape_strings,C.wrap_line_length=void 0===t.wrap_line_length?0:parseInt(t.wrap_line_length,10),C.e4x=void 0!==t.e4x&&t.e4x,C.end_with_newline=void 0!==t.end_with_newline&&t.end_with_newline,C.comma_first=void 0!==t.comma_first&&t.comma_first,C.operator_position=function(e){if(!c(e=e||u.before_newline,l))throw new Error("Invalid Option Value: The option 'operator_position' must be one of the following values\n"+l+"\nYou passed in: '"+e+"'");return e}(t.operator_position),C.test_output_raw=void 0!==t.test_output_raw&&t.test_output_raw,C.jslint_happy&&(C.space_after_anon_function=!0),t.indent_with_tabs&&(C.indent_char="\t",C.indent_size=1),"auto"===C.eol&&(C.eol="\n",e&&r.lineBreak.test(e||"")&&(C.eol=e.match(r.lineBreak)[0])),C.eol=C.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),y="";C.indent_size>0;)y+=C.indent_char,C.indent_size-=1;var D=0;if(e&&e.length){for(;" "===e.charAt(D)||"\t"===e.charAt(D);)D+=1;A=e.substring(0,D),e=e.substring(D)}function L(e,t){for(var n=e.newlines,i=C.keep_array_indentation&&$(b.mode),r=g,o=0;o<e.comments_before.length;o++)L(g=e.comments_before[o],t),k[g.type](t);if(g=r,i)for(var s=0;s<n;s+=1)M(s>0,t);else if(C.max_preserve_newlines&&n>C.max_preserve_newlines&&(n=C.max_preserve_newlines),C.preserve_newlines&&e.newlines>1){M(!1,t);for(var a=1;a<n;a+=1)M(!0,t)}}m="TK_START_BLOCK",v="",(n=new o(y,A)).raw=C.test_output_raw,x=[],I(d.BlockStatement),this.beautify=function(){for(p=new s(e,C,y),E=p.tokenize(),f=0,g=U();g;)k[g.type](),v=b.last_text,m=g.type,b.last_text=g.text,f+=1,g=U();return n.get_code(C.end_with_newline,C.eol)};var P=["break","continue","return","throw","yield"];function R(e){if(e=void 0!==e&&e,!n.just_added_newline()){var t=C.preserve_newlines&&g.wanted_newline||e;if(c(b.last_text,p.positionable_operators)||c(g.text,p.positionable_operators)){var i=c(b.last_text,p.positionable_operators)&&c(C.operator_position,h)||c(g.text,p.positionable_operators);t=t&&i}if(t)M(!1,!0);else if(C.wrap_line_length){if("TK_RESERVED"===m&&c(b.last_text,P))return;n.current_line.get_character_count()+g.text.length+(n.space_before_token?1:0)>=C.wrap_line_length&&M(!1,!0)}}}function M(e,t){if(!t&&";"!==b.last_text&&","!==b.last_text&&"="!==b.last_text&&"TK_OPERATOR"!==m)for(var i=U(1);!(b.mode!==d.Statement||b.if_block&&i&&"TK_RESERVED"===i.type&&"else"===i.text||b.do_block);)W();n.add_new_line(e)&&(b.multiline_frame=!0)}function B(){n.just_added_newline()&&(C.keep_array_indentation&&$(b.mode)&&g.wanted_newline?(n.current_line.push(g.whitespace_before),n.space_before_token=!1):n.set_indent(b.indentation_level)&&(b.line_indent_level=b.indentation_level))}function O(e){if(n.raw)n.add_raw_token(g);else{if(C.comma_first&&"TK_COMMA"===m&&n.just_added_newline()&&","===n.previous_line.last()){var t=n.previous_line.pop();n.previous_line.is_empty()&&(n.previous_line.push(t),n.trim(!0),n.current_line.pop(),n.trim()),B(),n.add_token(","),n.space_before_token=!0}e=e||g.text,B(),n.add_token(e)}}function j(){b.indentation_level+=1}function I(e){b?(x.push(b),w=b):w=S(null,e),b=S(w,e)}function $(e){return e===d.ArrayLiteral}function N(e){return c(e,[d.Expression,d.ForInitializer,d.Conditional])}function W(){x.length>0&&(w=b,b=x.pop(),w.mode!==d.Statement||C.unindent_chained_methods||a(n,w))}function z(){return b.parent.mode===d.ObjectLiteral&&b.mode===d.Statement&&(":"===b.last_text&&0===b.ternary_depth||"TK_RESERVED"===m&&c(b.last_text,["get","set"]))}function H(){return!!("TK_RESERVED"===m&&c(b.last_text,["var","let","const"])&&"TK_WORD"===g.type||"TK_RESERVED"===m&&"do"===b.last_text||"TK_RESERVED"===m&&c(b.last_text,P)&&!g.wanted_newline||"TK_RESERVED"===m&&"else"===b.last_text&&("TK_RESERVED"!==g.type||"if"!==g.text||g.comments_before.length)||"TK_END_EXPR"===m&&(w.mode===d.ForInitializer||w.mode===d.Conditional)||"TK_WORD"===m&&b.mode===d.BlockStatement&&!b.in_case&&"--"!==g.text&&"++"!==g.text&&"function"!==v&&"TK_WORD"!==g.type&&"TK_RESERVED"!==g.type||b.mode===d.ObjectLiteral&&(":"===b.last_text&&0===b.ternary_depth||"TK_RESERVED"===m&&c(b.last_text,["get","set"])))&&(I(d.Statement),C.unindent_chained_methods||j(),L(g,!0),z()||R("TK_RESERVED"===g.type&&c(g.text,["do","for","if","while"])),!0)}function V(e){return c(e,["case","return","do","if","throw","else"])}function U(e){var t=f+(e||0);return t<0||t>=E.length?null:E[t]}function K(){if("TK_RESERVED"===g.type&&(c(g.text,["set","get"])&&b.mode!==d.ObjectLiteral?g.type="TK_WORD":c(g.text,["as","from"])&&!b.import_block?g.type="TK_WORD":b.mode===d.ObjectLiteral&&":"===U(1).text&&(g.type="TK_WORD")),H()?"TK_RESERVED"===m&&c(b.last_text,["var","let","const"])&&"TK_WORD"===g.type&&(b.declaration_statement=!0):!g.wanted_newline||N(b.mode)||"TK_OPERATOR"===m&&"--"!==b.last_text&&"++"!==b.last_text||"TK_EQUALS"===m||!C.preserve_newlines&&"TK_RESERVED"===m&&c(b.last_text,["var","let","const","set","get"])?L(g):(L(g),M()),b.do_block&&!b.do_while){if("TK_RESERVED"===g.type&&"while"===g.text)return n.space_before_token=!0,O(),n.space_before_token=!0,void(b.do_while=!0);M(),b.do_block=!1}if(b.if_block)if(b.else_block||"TK_RESERVED"!==g.type||"else"!==g.text){for(;b.mode===d.Statement;)W();b.if_block=!1,b.else_block=!1}else b.else_block=!0;return"TK_RESERVED"===g.type&&("case"===g.text||"default"===g.text&&b.in_case_statement)?(M(),(b.case_body||C.jslint_happy)&&(b.indentation_level>0&&(!b.parent||b.indentation_level>b.parent.indentation_level)&&(b.indentation_level-=1),b.case_body=!1),O(),b.in_case=!0,void(b.in_case_statement=!0)):("TK_COMMA"!==m&&"TK_START_EXPR"!==m&&"TK_EQUALS"!==m&&"TK_OPERATOR"!==m||z()||R(),"TK_RESERVED"===g.type&&"function"===g.text?((c(b.last_text,["}",";"])||n.just_added_newline()&&!c(b.last_text,["(","[","{",":","=",","])&&"TK_OPERATOR"!==m)&&(n.just_added_blankline()||g.comments_before.length||(M(),M(!0))),"TK_RESERVED"===m||"TK_WORD"===m?"TK_RESERVED"===m&&(c(b.last_text,["get","set","new","export","async"])||c(b.last_text,P))?n.space_before_token=!0:"TK_RESERVED"===m&&"default"===b.last_text&&"export"===v?n.space_before_token=!0:M():"TK_OPERATOR"===m||"="===b.last_text?n.space_before_token=!0:(b.multiline_frame||!N(b.mode)&&!$(b.mode))&&M(),O(),void(b.last_word=g.text)):(_="NONE","TK_END_BLOCK"===m?w.inline_frame?_="SPACE":"TK_RESERVED"===g.type&&c(g.text,["else","catch","finally","from"])?"expand"===C.brace_style||"end-expand"===C.brace_style||"none"===C.brace_style&&g.wanted_newline?_="NEWLINE":(_="SPACE",n.space_before_token=!0):_="NEWLINE":"TK_SEMICOLON"===m&&b.mode===d.BlockStatement?_="NEWLINE":"TK_SEMICOLON"===m&&N(b.mode)?_="SPACE":"TK_STRING"===m?_="NEWLINE":"TK_RESERVED"===m||"TK_WORD"===m||"*"===b.last_text&&(c(v,["function","yield"])||b.mode===d.ObjectLiteral&&c(v,["{",","]))?_="SPACE":"TK_START_BLOCK"===m?_=b.inline_frame?"SPACE":"NEWLINE":"TK_END_EXPR"===m&&(n.space_before_token=!0,_="NEWLINE"),"TK_RESERVED"===g.type&&c(g.text,p.line_starters)&&")"!==b.last_text&&(_=b.inline_frame||"else"===b.last_text||"export"===b.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===g.type&&c(g.text,["else","catch","finally"])?("TK_END_BLOCK"!==m||w.mode!==d.BlockStatement||"expand"===C.brace_style||"end-expand"===C.brace_style||"none"===C.brace_style&&g.wanted_newline)&&!b.inline_frame?M():(n.trim(!0),"}"!==n.current_line.last()&&M(),n.space_before_token=!0):"NEWLINE"===_?"TK_RESERVED"===m&&V(b.last_text)?n.space_before_token=!0:"TK_END_EXPR"!==m?"TK_START_EXPR"===m&&"TK_RESERVED"===g.type&&c(g.text,["var","let","const"])||":"===b.last_text||("TK_RESERVED"===g.type&&"if"===g.text&&"else"===b.last_text?n.space_before_token=!0:M()):"TK_RESERVED"===g.type&&c(g.text,p.line_starters)&&")"!==b.last_text&&M():b.multiline_frame&&$(b.mode)&&","===b.last_text&&"}"===v?M():"SPACE"===_&&(n.space_before_token=!0),O(),b.last_word=g.text,void("TK_RESERVED"===g.type&&("do"===g.text?b.do_block=!0:"if"===g.text?b.if_block=!0:"import"===g.text?b.import_block=!0:b.import_block&&"TK_RESERVED"===g.type&&"from"===g.text&&(b.import_block=!1)))))}}},function(e,t){e.exports.InputScanner=function(e){var t=e,n=t.length,i=0;this.back=function(){i-=1},this.hasNext=function(){return i<n},this.next=function(){var e=null;return this.hasNext()&&(e=t.charAt(i),i+=1),e},this.peek=function(e){var r=null;return e=e||0,(e+=i)>=0&&e<n&&(r=t.charAt(e)),r},this.peekCharCode=function(e){var r=0;return e=e||0,(e+=i)>=0&&e<n&&(r=t.charCodeAt(e)),r},this.test=function(e,n){return n=n||0,e.lastIndex=i+n,e.test(t)},this.testChar=function(e,t){var n=this.peek(t);return null!==n&&e.test(n)},this.match=function(e){e.lastIndex=i;var n=e.exec(t);return n&&n.index===i?i+=n[0].length:n=null,n}}},function(e,t){e.exports.mergeOpts=function(e,t){var n,i={};for(n in e)n!==t&&(i[n]=e[n]);if(t in e)for(n in e[t])i[n]=e[t][n];return i}},function(e,t){e.exports.Output=function(e,t){t=t||"",this.indent_cache=[t],this.baseIndentLength=t.length,this.indent_length=e.length,this.raw=!1;var n=[];this.baseIndentString=t,this.indent_string=e,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new function(e){var t=0,n=-1,i=[],r=!0;this.set_indent=function(i){t=e.baseIndentLength+i*e.indent_length,n=i},this.get_character_count=function(){return t},this.is_empty=function(){return r},this.last=function(){return this._empty?null:i[i.length-1]},this.push=function(e){i.push(e),t+=e.length,r=!1},this.pop=function(){var e=null;return r||(e=i.pop(),t-=e.length,r=0===i.length),e},this.remove_indent=function(){n>0&&(n-=1,t-=e.indent_length)},this.trim=function(){for(;" "===this.last();)i.pop(),t-=1;r=0===i.length},this.toString=function(){var t="";return this._empty||(n>=0&&(t=e.indent_cache[n]),t+=i.join("")),t}}(this),n.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return n.length},this.add_new_line=function(e){return!(1===this.get_line_number()&&this.just_added_newline()||!e&&this.just_added_newline()||(this.raw||this.add_outputline(),0))},this.get_code=function(e,t){var i=n.join("\n").replace(/[\r\n\t ]+$/,"");return e&&(i+="\n"),"\n"!==t&&(i=i.replace(/[\n]/g,t)),i},this.set_indent=function(e){if(n.length>1){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.add_outputline();this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1},this.add_token=function(e){this.add_space_before_token(),this.current_line.push(e)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_indent=function(e){for(var t=n.length;e<t;)n[e].remove_indent(),e++},this.trim=function(i){for(i=void 0!==i&&i,this.current_line.trim(e,t);i&&n.length>1&&this.current_line.is_empty();)n.pop(),this.current_line=n[n.length-1],this.current_line.trim();this.previous_line=n.length>1?n[n.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){return!!this.just_added_newline()&&(1===n.length||n[n.length-2].is_empty())}}},function(e,t){e.exports.Token=function(e,t,n,i,r){this.type=e,this.text=t,this.comments_before=[],this.comments_after=[],this.newlines=n||0,this.wanted_newline=n>0,this.whitespace_before=i||"",this.parent=r||null,this.opened=null,this.directives=null}},function(e,t,n){var i=n(1).Beautifier;e.exports=function(e,t){return new i(e,t).beautify()}},function(e,t,n){var i=n(2).InputScanner,r=n(5).Token,o=n(0);function s(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}e.exports.Tokenizer=function(e,t){var n="\n\r\t ".split(""),a=/[0-9]/,c=/[01]/,l=/[01234567]/,u=/[0123456789abcdefABCDEF]/;this.positionable_operators="!= !== % & && * ** + - / : < << <= == === > >= >> >>> ? ^ | ||".split(" ");var h=this.positionable_operators.concat("! %= &= *= **= ++ += , -- -= /= :: <<= = => >>= >>>= ^= |= ~ ...".split(" "));this.line_starters="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var d,f,p,g,m,v=this.line_starters.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),y=/([\s\S]*?)((?:\*\/)|$)/g,b=/([^\n\r\u2028\u2029]*)/g,w=/\/\* beautify( \w+[:]\w+)+ \*\//g,x=/ (\w+)[:](\w+)/g,_=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,k=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function C(){var e,C=[];d=0,f="";var E,A=m.next();if(null===A)return["","TK_EOF"];for(E=g.length?g[g.length-1]:new r("TK_START_BLOCK","{");s(A,n);)if(o.newline.test(A)?"\n"===A&&"\r"===m.peek(-2)||(d+=1,C=[]):C.push(A),null===(A=m.next()))return["","TK_EOF"];if(C.length&&(f=C.join("")),a.test(A)||"."===A&&m.testChar(a)){var S=!0,F=!0,T=a;for("0"===A&&m.testChar(/[XxOoBb]/)?(S=!1,F=!1,T=m.testChar(/[Bb]/)?c:m.testChar(/[Oo]/)?l:u,A+=m.next()):"."===A?S=!1:(A="",m.back());m.testChar(T);)A+=m.next(),S&&"."===m.peek()&&(A+=m.next(),S=!1),F&&m.testChar(/[Ee]/)&&(A+=m.next(),m.testChar(/[+-]/)&&(A+=m.next()),F=!1,S=!1);return[A,"TK_WORD"]}if(o.isIdentifierStart(m.peekCharCode(-1))){if(m.hasNext())for(;o.isIdentifierChar(m.peekCharCode())&&(A+=m.next(),m.hasNext()););return"TK_DOT"===E.type||"TK_RESERVED"===E.type&&s(E.text,["set","get"])||!s(A,v)?[A,"TK_WORD"]:"in"===A||"of"===A?[A,"TK_OPERATOR"]:[A,"TK_RESERVED"]}if("("===A||"["===A)return[A,"TK_START_EXPR"];if(")"===A||"]"===A)return[A,"TK_END_EXPR"];if("{"===A)return[A,"TK_START_BLOCK"];if("}"===A)return[A,"TK_END_BLOCK"];if(";"===A)return[A,"TK_SEMICOLON"];if("/"===A){var D="";if("*"===m.peek()){m.next();var L=function(e){if(!e.match(w))return null;var t={};x.lastIndex=0;for(var n=x.exec(e);n;)t[n[1]]=n[2],n=x.exec(e);return t}(D="/*"+m.match(y)[0]);return L&&"start"===L.ignore&&(D+=m.match(_)[0]),[D=D.replace(o.allLineBreaks,"\n"),"TK_BLOCK_COMMENT",L]}if("/"===m.peek())return m.next(),[D="//"+m.match(b)[0],"TK_COMMENT"]}var P,R=/<()([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g;if("`"===A||"'"===A||'"'===A||("/"===A||t.e4x&&"<"===A&&m.test(R,-1))&&("TK_RESERVED"===E.type&&s(E.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===E.type&&")"===E.text&&E.parent&&"TK_RESERVED"===E.parent.type&&s(E.parent.text,["if","while","for"])||s(E.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var M=A,B=!1,O=!1;if(e=A,"/"===M)for(var j=!1;m.hasNext()&&(B||j||m.peek()!==M)&&!m.testChar(o.newline);)e+=m.peek(),B?B=!1:(B="\\"===m.peek(),"["===m.peek()?j=!0:"]"===m.peek()&&(j=!1)),m.next();else if(t.e4x&&"<"===M){var I=/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g;m.back();var $="",N=m.match(R);if(N){for(var W=N[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),z=0===W.indexOf("{"),H=0;N;){var V=!!N[1],U=N[2];if(!(N[N.length-1]||"![CDATA["===U.slice(0,8))&&(U===W||z&&U.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(V?--H:++H),$+=N[0],H<=0)break;N=m.match(I)}return N||($+=m.match(/[\s\S]*/g)[0]),[$=$.replace(o.allLineBreaks,"\n"),"TK_STRING"]}}else{var K=function(t,n,i){for(var r;m.hasNext()&&(r=m.peek(),B||r!==t&&(n||!o.newline.test(r)));)(B||n)&&o.newline.test(r)?("\r"===r&&"\n"===m.peek(1)&&(m.next(),r=m.peek()),e+="\n"):e+=r,B?("x"!==r&&"u"!==r||(O=!0),B=!1):B="\\"===r,m.next(),i&&-1!==e.indexOf(i,e.length-i.length)&&("`"===t?K("}",n,"`"):K("`",n,"${"),m.hasNext()&&(e+=m.next()))};"`"===M?K("`",!0,"${"):K(M)}if(O&&t.unescape_strings&&(e=function(e){for(var t="",n=0,r=new i(e),o=null;r.hasNext();)if((o=r.match(/([\s]|[^\\]|\\\\)+/g))&&(t+=o[0]),"\\"===r.peek()){if(r.next(),"x"===r.peek())o=r.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==r.peek()){t+="\\",r.hasNext()&&(t+=r.next());continue}o=r.match(/u([0-9A-Fa-f]{4})/g)}if(!o)return e;if((n=parseInt(o[1],16))>126&&n<=255&&0===o[0].indexOf("x"))return e;if(n>=0&&n<32){t+="\\"+o[0];continue}t+=34===n||39===n||92===n?"\\"+String.fromCharCode(n):String.fromCharCode(n)}return t}(e)),m.peek()===M&&(e+=M,m.next(),"/"===M))for(;m.hasNext()&&o.isIdentifierStart(m.peekCharCode());)e+=m.next();return[e,"TK_STRING"]}if("#"===A){if(0===g.length&&"!"===m.peek()){for(e=A;m.hasNext()&&"\n"!==A;)A=m.next(),e+=A;return[(P=e,P.replace(/^\s+|\s+$/g,"")+"\n"),"TK_UNKNOWN"]}var G="#";if(m.hasNext()&&m.testChar(a)){do{G+=A=m.next()}while(m.hasNext()&&"#"!==A&&"="!==A);return"#"===A||("["===m.peek()&&"]"===m.peek(1)?(G+="[]",m.next(),m.next()):"{"===m.peek()&&"}"===m.peek(1)&&(G+="{}",m.next(),m.next())),[G,"TK_WORD"]}}if("<"===A&&("?"===m.peek()||"%"===m.peek())){m.back();var q=m.match(k);if(q)return[A=(A=q[0]).replace(o.allLineBreaks,"\n"),"TK_STRING"]}if("<"===A&&m.match(/\!--/g)){for(A="\x3c!--";m.hasNext()&&!m.testChar(o.newline);)A+=m.next();return p=!0,[A,"TK_COMMENT"]}if("-"===A&&p&&m.match(/->/g))return p=!1,["--\x3e","TK_COMMENT"];if("."===A)return"."===m.peek()&&"."===m.peek(1)?[A+=m.next()+m.next(),"TK_OPERATOR"]:[A,"TK_DOT"];if(s(A,h)){for(;m.hasNext()&&s(A+m.peek(),h)&&(A+=m.next(),m.hasNext()););return","===A?[A,"TK_COMMA"]:"="===A?[A,"TK_EQUALS"]:[A,"TK_OPERATOR"]}return[A,"TK_UNKNOWN"]}this.tokenize=function(){var t,n,o;m=new i(e),p=!1,g=[];for(var s=null,a=[],c=[];!n||"TK_EOF"!==n.type;){for(o=C(),t=new r(o[1],o[0],d,f);"TK_COMMENT"===t.type||"TK_BLOCK_COMMENT"===t.type||"TK_UNKNOWN"===t.type;)"TK_BLOCK_COMMENT"===t.type&&(t.directives=o[2]),c.push(t),o=C(),t=new r(o[1],o[0],d,f);c.length&&(t.comments_before=c,c=[]),"TK_START_BLOCK"===t.type||"TK_START_EXPR"===t.type?(t.parent=n,a.push(s),s=t):("TK_END_BLOCK"===t.type||"TK_END_EXPR"===t.type)&&s&&("]"===t.text&&"["===s.text||")"===t.text&&"("===s.text||"}"===t.text&&"{"===s.text)&&(t.parent=s.parent,t.opened=s,s=a.pop()),g.push(t),n=t}return g}}}]),void 0===(i=function(){return{js_beautify:r}}.apply(t,[]))||(e.exports=i)},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";var i=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\(\/]+)/;function r(e){var t="";if(void 0===e.name){var n=String(e).match(i);n&&(t=n[1])}else t=e.name;return t}e.exports={compatibleInstance:function(e,t){return t instanceof Error&&e===t},compatibleConstructor:function(e,t){return t instanceof Error?e.constructor===t.constructor||e instanceof t.constructor:(t.prototype instanceof Error||t===Error)&&(e.constructor===t||e instanceof t)},compatibleMessage:function(e,t){var n="string"==typeof e?e:e.message;return t instanceof RegExp?t.test(n):"string"==typeof t&&-1!==n.indexOf(t)},getMessage:function(e){var t="";return e&&e.message?t=e.message:"string"==typeof e&&(t=e),t},getConstructorName:function(e){var t=e;return e instanceof Error?t=r(e.constructor):"function"==typeof e&&(t=r(e).trim()||r(new e)),t}}},function(e,t){
|
||
/*!
|
||
* Chai - getOwnEnumerablePropertySymbols utility
|
||
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e){return"function"!=typeof Object.getOwnPropertySymbols?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}},function(e,t,n){
|
||
/*!
|
||
* Chai - flag utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
/*!
|
||
* Module dependancies
|
||
*/
|
||
var i=n(79),r=n(59);e.exports=function(e){var t=i(e),n=Object.prototype.toString.call(e);if(r.truncateThreshold&&t.length>=r.truncateThreshold){if("[object Function]"===n)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";if("[object Array]"===n)return"[ Array("+e.length+") ]";if("[object Object]"===n){var o=Object.keys(e);return"{ Object ("+(o.length>2?o.splice(0,2).join(", ")+", ...":o.join(", "))+") }"}return t}return t}},function(e,t){
|
||
/*!
|
||
* Chai - getProperties utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e){var t=Object.getOwnPropertyNames(e);function n(e){-1===t.indexOf(e)&&t.push(e)}for(var i=Object.getPrototypeOf(e);null!==i;)Object.getOwnPropertyNames(i).forEach(n),i=Object.getPrototypeOf(i);return t}},function(e,t,n){"use strict";var i=Function.prototype.toString,r=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;e.exports=function(e){if("function"!=typeof e)return null;var t="";if(void 0===Function.prototype.name&&void 0===e.name){var n=i.call(e).match(r);n&&(t=n[1])}else t=e.name;return t}},function(e,t){
|
||
/*!
|
||
* Chai - getActual utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e,t){return t.length>4?t[4]:e._obj}},function(e,t){
|
||
/*!
|
||
* assertion-error
|
||
* Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
|
||
* MIT Licensed
|
||
*/
|
||
/*!
|
||
* Return a function that will copy properties from
|
||
* one object to another excluding any originally
|
||
* listed. Returned function will create a new `{}`.
|
||
*
|
||
* @param {String} excluded properties ...
|
||
* @return {Function}
|
||
*/
|
||
function n(){var e=[].slice.call(arguments);function t(t,n){Object.keys(n).forEach(function(i){~e.indexOf(i)||(t[i]=n[i])})}return function(){for(var e=[].slice.call(arguments),n=0,i={};n<e.length;n++)t(i,e[n]);return i}}function i(e,t,r){var o=n("name","message","stack","constructor","toJSON")(t||{});for(var s in this.message=e||"Unspecified AssertionError",this.showDiff=!1,o)this[s]=o[s];if(r=r||i,Error.captureStackTrace)Error.captureStackTrace(this,r);else try{throw new Error}catch(e){this.stack=e.stack}}
|
||
/*!
|
||
* Inherit from Error.prototype
|
||
*/
|
||
/*!
|
||
* Primary Exports
|
||
*/
|
||
e.exports=i,i.prototype=Object.create(Error.prototype),
|
||
/*!
|
||
* Statically set name
|
||
*/
|
||
i.prototype.name="AssertionError",
|
||
/*!
|
||
* Ensure correct constructor
|
||
*/
|
||
i.prototype.constructor=i,i.prototype.toJSON=function(e){var t=n("constructor","toJSON","stack")({name:this.name},this);return!1!==e&&this.stack&&(t.stack=this.stack),t}},function(e,t,n){"use strict";n.r(t),n.d(t,"version",function(){return me}),n.d(t,"parse",function(){return ve}),n.d(t,"parseExpressionAt",function(){return ye}),n.d(t,"tokenizer",function(){return be}),n.d(t,"parse_dammit",function(){return fe}),n.d(t,"LooseParser",function(){return pe}),n.d(t,"pluginsLoose",function(){return ge}),n.d(t,"addLooseExports",function(){return we}),n.d(t,"Parser",function(){return N}),n.d(t,"plugins",function(){return I}),n.d(t,"defaultOptions",function(){return O}),n.d(t,"Position",function(){return R}),n.d(t,"SourceLocation",function(){return M}),n.d(t,"getLineInfo",function(){return B}),n.d(t,"Node",function(){return ee}),n.d(t,"TokenType",function(){return m}),n.d(t,"tokTypes",function(){return _}),n.d(t,"keywordTypes",function(){return w}),n.d(t,"TokContext",function(){return ie}),n.d(t,"tokContexts",function(){return re}),n.d(t,"isIdentifierChar",function(){return g}),n.d(t,"isIdentifierStart",function(){return p}),n.d(t,"Token",function(){return se}),n.d(t,"isNewLine",function(){return E}),n.d(t,"lineBreak",function(){return k}),n.d(t,"lineBreakG",function(){return C}),n.d(t,"nonASCIIwhitespace",function(){return A});var i={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},r="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",o={5:r,6:r+" const class extends export import super"},s=/^in(stanceof)?$/,a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",c="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",l=new RegExp("["+a+"]"),u=new RegExp("["+a+c+"]");a=c=null;var h=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],d=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239];function f(e,t){for(var n=65536,i=0;i<t.length;i+=2){if((n+=t[i])>e)return!1;if((n+=t[i+1])>=e)return!0}}function p(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&l.test(String.fromCharCode(e)):!1!==t&&f(e,h)))}function g(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&u.test(String.fromCharCode(e)):!1!==t&&(f(e,h)||f(e,d)))))}var m=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function v(e,t){return new m(e,{beforeExpr:!0,binop:t})}var y={beforeExpr:!0},b={startsExpr:!0},w={};function x(e,t){return void 0===t&&(t={}),t.keyword=e,w[e]=new m(e,t)}var _={num:new m("num",b),regexp:new m("regexp",b),string:new m("string",b),name:new m("name",b),eof:new m("eof"),bracketL:new m("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new m("]"),braceL:new m("{",{beforeExpr:!0,startsExpr:!0}),braceR:new m("}"),parenL:new m("(",{beforeExpr:!0,startsExpr:!0}),parenR:new m(")"),comma:new m(",",y),semi:new m(";",y),colon:new m(":",y),dot:new m("."),question:new m("?",y),arrow:new m("=>",y),template:new m("template"),invalidTemplate:new m("invalidTemplate"),ellipsis:new m("...",y),backQuote:new m("`",b),dollarBraceL:new m("${",{beforeExpr:!0,startsExpr:!0}),eq:new m("=",{beforeExpr:!0,isAssign:!0}),assign:new m("_=",{beforeExpr:!0,isAssign:!0}),incDec:new m("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new m("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:v("||",1),logicalAND:v("&&",2),bitwiseOR:v("|",3),bitwiseXOR:v("^",4),bitwiseAND:v("&",5),equality:v("==/!=/===/!==",6),relational:v("</>/<=/>=",7),bitShift:v("<</>>/>>>",8),plusMin:new m("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:v("%",10),star:v("*",10),slash:v("/",10),starstar:new m("**",{beforeExpr:!0}),_break:x("break"),_case:x("case",y),_catch:x("catch"),_continue:x("continue"),_debugger:x("debugger"),_default:x("default",y),_do:x("do",{isLoop:!0,beforeExpr:!0}),_else:x("else",y),_finally:x("finally"),_for:x("for",{isLoop:!0}),_function:x("function",b),_if:x("if"),_return:x("return",y),_switch:x("switch"),_throw:x("throw",y),_try:x("try"),_var:x("var"),_const:x("const"),_while:x("while",{isLoop:!0}),_with:x("with"),_new:x("new",{beforeExpr:!0,startsExpr:!0}),_this:x("this",b),_super:x("super",b),_class:x("class",b),_extends:x("extends",y),_export:x("export"),_import:x("import"),_null:x("null",b),_true:x("true",b),_false:x("false",b),_in:x("in",{beforeExpr:!0,binop:7}),_instanceof:x("instanceof",{beforeExpr:!0,binop:7}),_typeof:x("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:x("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:x("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},k=/\r\n?|\n|\u2028|\u2029/,C=new RegExp(k.source,"g");function E(e){return 10===e||13===e||8232===e||8233===e}var A=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,S=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,F=Object.prototype,T=F.hasOwnProperty,D=F.toString;function L(e,t){return T.call(e,t)}var P=Array.isArray||function(e){return"[object Array]"===D.call(e)},R=function(e,t){this.line=e,this.column=t};R.prototype.offset=function(e){return new R(this.line,this.column+e)};var M=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function B(e,t){for(var n=1,i=0;;){C.lastIndex=i;var r=C.exec(e);if(!(r&&r.index<t))return new R(n,t-i);++n,i=r.index+r[0].length}}var O={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}};function j(e){var t={};for(var n in O)t[n]=e&&L(e,n)?e[n]:O[n];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),P(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return P(t.onComment)&&(t.onComment=function(e,t){return function(n,i,r,o,s,a){var c={type:n?"Block":"Line",value:i,start:r,end:o};e.locations&&(c.loc=new M(this,s,a)),e.ranges&&(c.range=[r,o]),t.push(c)}}(t,t.onComment)),t}var I={};function $(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var N=function(e,t,n){this.options=e=j(e),this.sourceFile=e.sourceFile,this.keywords=$(o[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var s=e.ecmaVersion;!(r=i[s]);s--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=$(r);var a=(r?r+" ":"")+i.strict;this.reservedWordsStrict=$(a),this.reservedWordsStrictBind=$(a+" "+i.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(k).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=_.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};N.prototype.isKeyword=function(e){return this.keywords.test(e)},N.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},N.prototype.extend=function(e,t){this[e]=t(this[e])},N.prototype.loadPlugins=function(e){for(var t in e){var n=I[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},N.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var W=N.prototype,z=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)"|;)/;function H(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}W.strictDirective=function(e){for(;;){S.lastIndex=e,e+=S.exec(this.input)[0].length;var t=z.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},W.eat=function(e){return this.type===e&&(this.next(),!0)},W.isContextual=function(e){return this.type===_.name&&this.value===e&&!this.containsEsc},W.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},W.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},W.canInsertSemicolon=function(){return this.type===_.eof||this.type===_.braceR||k.test(this.input.slice(this.lastTokEnd,this.start))},W.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},W.semicolon=function(){this.eat(_.semi)||this.insertSemicolon()||this.unexpected()},W.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},W.expect=function(e){this.eat(e)||this.unexpected()},W.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},W.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},W.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,i=e.doubleProto;if(!t)return n>=0||i>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},W.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},W.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var V=N.prototype;V.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==_.eof;){var n=this.parseStatement(!0,!0,t);e.body.push(n)}return this.adaptDirectivePrologue(e.body),this.next(),this.options.ecmaVersion>=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var U={kind:"loop"},K={kind:"switch"};V.isLet=function(){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;S.lastIndex=this.pos;var e=S.exec(this.input),t=this.pos+e[0].length,n=this.input.charCodeAt(t);if(91===n||123==n)return!0;if(p(n,!0)){for(var i=t+1;g(this.input.charCodeAt(i),!0);)++i;var r=this.input.slice(t,i);if(!s.test(r))return!0}return!1},V.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;S.lastIndex=this.pos;var e=S.exec(this.input),t=this.pos+e[0].length;return!(k.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&g(this.input.charAt(t+8)))},V.parseStatement=function(e,t,n){var i,r=this.type,o=this.startNode();switch(this.isLet()&&(r=_._var,i="let"),r){case _._break:case _._continue:return this.parseBreakContinueStatement(o,r.keyword);case _._debugger:return this.parseDebuggerStatement(o);case _._do:return this.parseDoStatement(o);case _._for:return this.parseForStatement(o);case _._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(o,!1);case _._class:return e||this.unexpected(),this.parseClass(o,!0);case _._if:return this.parseIfStatement(o);case _._return:return this.parseReturnStatement(o);case _._switch:return this.parseSwitchStatement(o);case _._throw:return this.parseThrowStatement(o);case _._try:return this.parseTryStatement(o);case _._const:case _._var:return i=i||this.value,e||"var"==i||this.unexpected(),this.parseVarStatement(o,i);case _._while:return this.parseWhileStatement(o);case _._with:return this.parseWithStatement(o);case _.braceL:return this.parseBlock();case _.semi:return this.parseEmptyStatement(o);case _._export:case _._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===_._import?this.parseImport(o):this.parseExport(o,n);default:if(this.isAsyncFunction())return e||this.unexpected(),this.next(),this.parseFunctionStatement(o,!0);var s=this.value,a=this.parseExpression();return r===_.name&&"Identifier"===a.type&&this.eat(_.colon)?this.parseLabeledStatement(o,s,a):this.parseExpressionStatement(o,a)}},V.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(_.semi)||this.insertSemicolon()?e.label=null:this.type!==_.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var r=this.labels[i];if(null==e.label||r.name===e.label.name){if(null!=r.kind&&(n||"loop"===r.kind))break;if(e.label&&n)break}}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},V.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},V.parseDoStatement=function(e){return this.next(),this.labels.push(U),e.body=this.parseStatement(!1),this.labels.pop(),this.expect(_._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(_.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},V.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.inAsync&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(U),this.enterLexicalScope(),this.expect(_.parenL),this.type===_.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===_._var||this.type===_._const||n){var i=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),!(this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==i.declarations.length||"var"!==r&&i.declarations[0].init?(t>-1&&this.unexpected(t),this.parseFor(e,i)):(this.options.ecmaVersion>=9&&(this.type===_._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i))}var o=new H,s=this.parseExpression(!0,o);return this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===_._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(s,!1,o),this.checkLVal(s),this.parseForIn(e,s)):(this.checkExpressionErrors(o,!0),t>-1&&this.unexpected(t),this.parseFor(e,s))},V.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},V.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.type==_._function),e.alternate=this.eat(_._else)?this.parseStatement(!this.strict&&this.type==_._function):null,this.finishNode(e,"IfStatement")},V.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(_.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},V.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(_.braceL),this.labels.push(K),this.enterLexicalScope();for(var n=!1;this.type!=_.braceR;)if(this.type===_._case||this.type===_._default){var i=this.type===_._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(_.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},V.parseThrowStatement=function(e){return this.next(),k.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var G=[];V.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===_._catch){var t=this.startNode();this.next(),this.expect(_.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(_.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(_._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},V.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},V.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(U),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},V.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},V.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},V.parseLabeledStatement=function(e,t,n){for(var i=0,r=this.labels;i<r.length;i+=1){r[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===_._switch?"switch":null,s=this.labels.length-1;s>=0;s--){var a=this.labels[s];if(a.statementStart!=e.start)break;a.statementStart=this.start,a.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},V.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},V.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(_.braceL),e&&this.enterLexicalScope();!this.eat(_.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},V.parseFor=function(e,t){return e.init=t,this.expect(_.semi),e.test=this.type===_.semi?null:this.parseExpression(),this.expect(_.semi),e.update=this.type===_.parenR?null:this.parseExpression(),this.expect(_.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},V.parseForIn=function(e,t){var n=this.type===_._in?"ForInStatement":"ForOfStatement";return this.next(),"ForInStatement"==n&&("AssignmentPattern"===t.type||"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(this.strict||"Identifier"!==t.declarations[0].id.type))&&this.raise(t.start,"Invalid assignment in for-in loop head"),e.left=t,e.right="ForInStatement"==n?this.parseExpression():this.parseMaybeAssign(),this.expect(_.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},V.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(_.eq)?i.init=this.parseMaybeAssign(t):"const"!==n||this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==i.id.type||t&&(this.type===_._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(_.comma))break}return e},V.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},V.parseFunction=function(e,t,n,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(e.generator=this.eat(_.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&&(e.id="nullableID"===t&&this.type!=_.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var r=this.inGenerator,o=this.inAsync,s=this.yieldPos,a=this.awaitPos,c=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==_.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=r,this.inAsync=o,this.yieldPos=s,this.awaitPos=a,this.inFunction=c,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},V.parseFunctionParams=function(e){this.expect(_.parenL),e.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},V.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),i=!1;for(n.body=[],this.expect(_.braceL);!this.eat(_.braceR);){var r=this.parseClassMember(n);r&&"MethodDefinition"===r.type&&"constructor"===r.kind&&(i&&this.raise(r.start,"Duplicate constructor in the same class"),i=!0)}return e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},V.parseClassMember=function(e){var t=this;if(this.eat(_.semi))return null;var n=this.startNode(),i=function(e,i){void 0===i&&(i=!1);var r=t.start,o=t.startLoc;return!!t.eatContextual(e)&&(!(t.type===_.parenL||i&&t.canInsertSemicolon())||(n.key&&t.unexpected(),n.computed=!1,n.key=t.startNodeAt(r,o),n.key.name=e,t.finishNode(n.key,"Identifier"),!1))};n.kind="method",n.static=i("static");var r=this.eat(_.star),o=!1;r||(this.options.ecmaVersion>=8&&i("async",!0)?(o=!0,r=this.options.ecmaVersion>=9&&this.eat(_.star)):i("get")?n.kind="get":i("set")&&(n.kind="set")),n.key||this.parsePropertyName(n);var s=n.key;return n.computed||n.static||!("Identifier"===s.type&&"constructor"===s.name||"Literal"===s.type&&"constructor"===s.value)?n.static&&"Identifier"===s.type&&"prototype"===s.name&&this.raise(s.start,"Classes may not have a static property named prototype"):("method"!==n.kind&&this.raise(s.start,"Constructor can't have get/set modifier"),r&&this.raise(s.start,"Constructor can't be a generator"),o&&this.raise(s.start,"Constructor can't be an async method"),n.kind="constructor"),this.parseClassMethod(e,n,r,o),"get"===n.kind&&0!==n.value.params.length&&this.raiseRecoverable(n.value.start,"getter should have no params"),"set"===n.kind&&1!==n.value.params.length&&this.raiseRecoverable(n.value.start,"setter should have exactly one param"),"set"===n.kind&&"RestElement"===n.value.params[0].type&&this.raiseRecoverable(n.value.params[0].start,"Setter cannot use rest params"),n},V.parseClassMethod=function(e,t,n,i){t.value=this.parseMethod(n,i),e.body.push(this.finishNode(t,"MethodDefinition"))},V.parseClassId=function(e,t){e.id=this.type===_.name?this.parseIdent():!0===t?this.unexpected():null},V.parseClassSuper=function(e){e.superClass=this.eat(_._extends)?this.parseExprSubscripts():null},V.parseExport=function(e,t){if(this.next(),this.eat(_.star))return this.expectContextual("from"),this.type!==_.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(_._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===_._function||(n=this.isAsyncFunction())){var i=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(i,"nullableID",!1,n)}else if(this.type===_._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==_.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var o=0,s=e.specifiers;o<s.length;o+=1){var a=s[o];this.checkUnreserved(a.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},V.checkExport=function(e,t,n){e&&(L(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},V.checkPatternExport=function(e,t){var n=t.type;if("Identifier"==n)this.checkExport(e,t.name,t.start);else if("ObjectPattern"==n)for(var i=0,r=t.properties;i<r.length;i+=1){var o=r[i];this.checkPatternExport(e,o)}else if("ArrayPattern"==n)for(var s=0,a=t.elements;s<a.length;s+=1){var c=a[s];c&&this.checkPatternExport(e,c)}else"Property"==n?this.checkPatternExport(e,t.value):"AssignmentPattern"==n?this.checkPatternExport(e,t.left):"RestElement"==n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"==n&&this.checkPatternExport(e,t.expression)},V.checkVariableExport=function(e,t){if(e)for(var n=0,i=t;n<i.length;n+=1){var r=i[n];this.checkPatternExport(e,r.id)}},V.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},V.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(_.braceL);!this.eat(_.braceR);){if(n)n=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;var i=this.startNode();i.local=this.parseIdent(!0),i.exported=this.eatContextual("as")?this.parseIdent(!0):i.local,this.checkExport(e,i.exported.name,i.exported.start),t.push(this.finishNode(i,"ExportSpecifier"))}return t},V.parseImport=function(e){return this.next(),this.type===_.string?(e.specifiers=G,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===_.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},V.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===_.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLVal(n.local,"let"),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(_.comma))return e}if(this.type===_.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLVal(i.local,"let"),e.push(this.finishNode(i,"ImportNamespaceSpecifier")),e}for(this.expect(_.braceL);!this.eat(_.braceR);){if(t)t=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;var r=this.startNode();r.imported=this.parseIdent(!0),this.eatContextual("as")?r.local=this.parseIdent():(this.checkUnreserved(r.imported),r.local=r.imported),this.checkLVal(r.local,"let"),e.push(this.finishNode(r,"ImportSpecifier"))}return e},V.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},V.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var q=N.prototype;q.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var i=0,r=e.properties;i<r.length;i+=1){var o=r[i];this.toAssignable(o,t),"RestElement"!==o.type||"ArrayPattern"!==o.argument.type&&"ObjectPattern"!==o.argument.type||this.raise(o.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},q.toAssignableList=function(e,t){for(var n=e.length,i=0;i<n;i++){var r=e[i];r&&this.toAssignable(r,t)}if(n){var o=e[n-1];6===this.options.ecmaVersion&&t&&o&&"RestElement"===o.type&&"Identifier"!==o.argument.type&&this.unexpected(o.argument.start)}return e},q.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},q.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==_.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},q.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case _.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(_.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case _.braceL:return this.parseObj(!0)}return this.parseIdent()},q.parseBindingList=function(e,t,n){for(var i=[],r=!0;!this.eat(e);)if(r?r=!1:this.expect(_.comma),t&&this.type===_.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===_.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===_.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var s=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(s),i.push(s)}return i},q.parseBindingListItem=function(e){return e},q.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(_.eq))return n;var i=this.startNodeAt(e,t);return i.left=n,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},q.checkLVal=function(e,t,n){switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(L(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t&&"none"!==t&&(("var"===t&&!this.canDeclareVarName(e.name)||"var"!==t&&!this.canDeclareLexicalName(e.name))&&this.raiseRecoverable(e.start,"Identifier '"+e.name+"' has already been declared"),"var"===t?this.declareVarName(e.name):this.declareLexicalName(e.name));break;case"MemberExpression":t&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ObjectPattern":for(var i=0,r=e.properties;i<r.length;i+=1){var o=r[i];this.checkLVal(o,t,n)}break;case"Property":this.checkLVal(e.value,t,n);break;case"ArrayPattern":for(var s=0,a=e.elements;s<a.length;s+=1){var c=a[s];c&&this.checkLVal(c,t,n)}break;case"AssignmentPattern":this.checkLVal(e.left,t,n);break;case"RestElement":this.checkLVal(e.argument,t,n);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,n);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var Y=N.prototype;Y.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var i,r=e.key;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=String(r.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===i&&"init"===o&&(t.proto&&(n&&n.doubleProto<0?n.doubleProto=r.start:this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);else{var s=t[i="$"+i];if(s)("init"===o?this.strict&&s.init||s.get||s.set:s.init||s[o])&&this.raiseRecoverable(r.start,"Redefinition of property");else s=t[i]={init:!1,get:!1,set:!1};s[o]=!0}}},Y.parseExpression=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeAssign(e,t);if(this.type===_.comma){var o=this.startNodeAt(n,i);for(o.expressions=[r];this.eat(_.comma);)o.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return r},Y.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var i=!1,r=-1,o=-1;t?(r=t.parenthesizedAssign,o=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new H,i=!0);var s=this.start,a=this.startLoc;this.type!=_.parenL&&this.type!=_.name||(this.potentialArrowAt=this.start);var c=this.parseMaybeConditional(e,t);if(n&&(c=n.call(this,c,s,a)),this.type.isAssign){var l=this.startNodeAt(s,a);return l.operator=this.value,l.left=this.type===_.eq?this.toAssignable(c,!1,t):c,i||H.call(t),t.shorthandAssign=-1,this.checkLVal(c),this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return i&&this.checkExpressionErrors(t,!0),r>-1&&(t.parenthesizedAssign=r),o>-1&&(t.trailingComma=o),c},Y.parseMaybeConditional=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(this.eat(_.question)){var o=this.startNodeAt(n,i);return o.test=r,o.consequent=this.parseMaybeAssign(),this.expect(_.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return r},Y.parseExprOps=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?r:r.start==n&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,n,i,-1,e)},Y.parseExprOp=function(e,t,n,i,r){var o=this.type.binop;if(null!=o&&(!r||this.type!==_._in)&&o>i){var s=this.type===_.logicalOR||this.type===_.logicalAND,a=this.value;this.next();var c=this.start,l=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1),c,l,o,r),h=this.buildBinary(t,n,e,u,a,s);return this.parseExprOp(h,t,n,i,r)}return e},Y.buildBinary=function(e,t,n,i,r,o){var s=this.startNodeAt(e,t);return s.left=n,s.operator=r,s.right=i,this.finishNode(s,o?"LogicalExpression":"BinaryExpression")},Y.parseMaybeUnary=function(e,t){var n,i=this.start,r=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(),t=!0;else if(this.type.prefix){var o=this.startNode(),s=this.type===_.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),s?this.checkLVal(o.argument):this.strict&&"delete"===o.operator&&"Identifier"===o.argument.type?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(o,s?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(i,r);a.operator=this.value,a.prefix=!1,a.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(a,"UpdateExpression")}}return!t&&this.eat(_.starstar)?this.buildBinary(i,r,n,this.parseMaybeUnary(null,!1),"**",!1):n},Y.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,i=this.parseExprAtom(e),r="ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||r)return i;var o=this.parseSubscripts(i,t,n);return e&&"MemberExpression"===o.type&&(e.parenthesizedAssign>=o.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=o.start&&(e.parenthesizedBind=-1)),o},Y.parseSubscripts=function(e,t,n,i){for(var r=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(e.start,e.end),o=void 0;;)if((o=this.eat(_.bracketL))||this.eat(_.dot)){var s=this.startNodeAt(t,n);s.object=e,s.property=o?this.parseExpression():this.parseIdent(!0),s.computed=!!o,o&&this.expect(_.bracketR),e=this.finishNode(s,"MemberExpression")}else if(!i&&this.eat(_.parenL)){var a=new H,c=this.yieldPos,l=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var u=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1,a);if(r&&!this.canInsertSemicolon()&&this.eat(_.arrow))return this.checkPatternErrors(a,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=c,this.awaitPos=l,this.parseArrowExpression(this.startNodeAt(t,n),u,!0);this.checkExpressionErrors(a,!0),this.yieldPos=c||this.yieldPos,this.awaitPos=l||this.awaitPos;var h=this.startNodeAt(t,n);h.callee=e,h.arguments=u,e=this.finishNode(h,"CallExpression")}else{if(this.type!==_.backQuote)return e;var d=this.startNodeAt(t,n);d.tag=e,d.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(d,"TaggedTemplateExpression")}},Y.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case _._super:return this.inFunction||this.raise(this.start,"'super' outside of function or class"),t=this.startNode(),this.next(),this.type!==_.dot&&this.type!==_.bracketL&&this.type!==_.parenL&&this.unexpected(),this.finishNode(t,"Super");case _._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case _.name:var i=this.start,r=this.startLoc,o=this.containsEsc,s=this.parseIdent(this.type!==_.name);if(this.options.ecmaVersion>=8&&!o&&"async"===s.name&&!this.canInsertSemicolon()&&this.eat(_._function))return this.parseFunction(this.startNodeAt(i,r),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(_.arrow))return this.parseArrowExpression(this.startNodeAt(i,r),[s],!1);if(this.options.ecmaVersion>=8&&"async"===s.name&&this.type===_.name&&!o)return s=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(_.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,r),[s],!0)}return s;case _.regexp:var a=this.value;return(t=this.parseLiteral(a.value)).regex={pattern:a.pattern,flags:a.flags},t;case _.num:case _.string:return this.parseLiteral(this.value);case _._null:case _._true:case _._false:return(t=this.startNode()).value=this.type===_._null?null:this.type===_._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case _.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),l;case _.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(_.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case _.braceL:return this.parseObj(!1,e);case _._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case _._class:return this.parseClass(this.startNode(),!1);case _._new:return this.parseNew();case _.backQuote:return this.parseTemplate();default:this.unexpected()}},Y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},Y.parseParenExpression=function(){this.expect(_.parenL);var e=this.parseExpression();return this.expect(_.parenR),e},Y.parseParenAndDistinguishExpression=function(e){var t,n=this.start,i=this.startLoc,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,s=this.start,a=this.startLoc,c=[],l=!0,u=!1,h=new H,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==_.parenR;){if(l?l=!1:this.expect(_.comma),r&&this.afterTrailingComma(_.parenR,!0)){u=!0;break}if(this.type===_.ellipsis){o=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===_.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var p=this.start,g=this.startLoc;if(this.expect(_.parenR),e&&!this.canInsertSemicolon()&&this.eat(_.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(n,i,c);c.length&&!u||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(h,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?((t=this.startNodeAt(s,a)).expressions=c,this.finishNodeAt(t,"SequenceExpression",p,g)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var m=this.startNodeAt(n,i);return m.expression=t,this.finishNode(m,"ParenthesizedExpression")}return t},Y.parseParenItem=function(e){return e},Y.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var X=[];Y.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(_.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),("target"!==e.property.name||n)&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty")}var i=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),i,r,!0),this.eat(_.parenL)?e.arguments=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1):e.arguments=X,this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===_.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===_.backQuote,this.finishNode(n,"TemplateElement")},Y.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(n.quasis=[i];!i.tail;)this.expect(_.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(_.braceR),n.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Y.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===_.name||this.type===_.num||this.type===_.string||this.type===_.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===_.star)&&!k.test(this.input.slice(this.lastTokEnd,this.start))},Y.parseObj=function(e,t){var n=this.startNode(),i=!0,r={};for(n.properties=[],this.next();!this.eat(_.braceR);){if(i)i=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;var o=this.parseProperty(e,t);e||this.checkPropClash(o,r,t),n.properties.push(o)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Y.parseProperty=function(e,t){var n,i,r,o,s=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(_.ellipsis))return e?(s.argument=this.parseIdent(!1),this.type===_.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(s,"RestElement")):(this.type===_.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),s.argument=this.parseMaybeAssign(!1,t),this.type===_.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(s,"SpreadElement"));this.options.ecmaVersion>=6&&(s.method=!1,s.shorthand=!1,(e||t)&&(r=this.start,o=this.startLoc),e||(n=this.eat(_.star)));var a=this.containsEsc;return this.parsePropertyName(s),!e&&!a&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(s)?(i=!0,n=this.options.ecmaVersion>=9&&this.eat(_.star),this.parsePropertyName(s,t)):i=!1,this.parsePropertyValue(s,e,n,i,r,o,t,a),this.finishNode(s,"Property")},Y.parsePropertyValue=function(e,t,n,i,r,o,s,a){if((n||i)&&this.type===_.colon&&this.unexpected(),this.eat(_.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===_.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,i);else if(t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type==_.comma||this.type==_.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?(this.checkUnreserved(e.key),e.kind="init",t?e.value=this.parseMaybeDefault(r,o,e.key):this.type===_.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,o,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||i)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var c="get"===e.kind?0:1;if(e.value.params.length!==c){var l=e.value.start;"get"===e.kind?this.raiseRecoverable(l,"getter should have no params"):this.raiseRecoverable(l,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},Y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(_.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(_.bracketR),e.key;e.computed=!1}return e.key=this.type===_.num||this.type===_.string?this.parseExprAtom():this.parseIdent(!0)},Y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Y.parseMethod=function(e,t){var n=this.startNode(),i=this.inGenerator,r=this.inAsync,o=this.yieldPos,s=this.awaitPos,a=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(_.parenL),n.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=i,this.inAsync=r,this.yieldPos=o,this.awaitPos=s,this.inFunction=a,this.finishNode(n,"FunctionExpression")},Y.parseArrowExpression=function(e,t,n){var i=this.inGenerator,r=this.inAsync,o=this.yieldPos,s=this.awaitPos,a=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=i,this.inAsync=r,this.yieldPos=o,this.awaitPos=s,this.inFunction=a,this.finishNode(e,"ArrowFunctionExpression")},Y.parseFunctionBody=function(e,t){var n=t&&this.type!==_.braceL,i=this.strict,r=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!o||(r=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var s=this.labels;this.labels=[],r&&(this.strict=!0),this.checkParams(e,!i&&!r&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=s}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=i},Y.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){if("Identifier"!==n[t].type)return!1}return!0},Y.checkParams=function(e,t){for(var n={},i=0,r=e.params;i<r.length;i+=1){var o=r[i];this.checkLVal(o,"var",t?null:n)}},Y.parseExprList=function(e,t,n,i){for(var r=[],o=!0;!this.eat(e);){if(o)o=!1;else if(this.expect(_.comma),t&&this.afterTrailingComma(e))break;var s=void 0;n&&this.type===_.comma?s=null:this.type===_.ellipsis?(s=this.parseSpread(i),i&&this.type===_.comma&&i.trailingComma<0&&(i.trailingComma=this.start)):s=this.parseMaybeAssign(!1,i),r.push(s)}return r},Y.checkUnreserved=function(e){var t=e.start,n=e.end,i=e.name;(this.inGenerator&&"yield"===i&&this.raiseRecoverable(t,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===i&&this.raiseRecoverable(t,"Can not use 'await' as identifier inside an async function"),this.isKeyword(i)&&this.raise(t,"Unexpected keyword '"+i+"'"),this.options.ecmaVersion<6&&-1!=this.input.slice(t,n).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(i)&&(this.inAsync||"await"!==i||this.raiseRecoverable(t,"Can not use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+i+"' is reserved"))},Y.parseIdent=function(e,t){var n=this.startNode();return e&&"never"==this.options.allowReserved&&(e=!1),this.type===_.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(),this.finishNode(n,"Identifier"),e||this.checkUnreserved(n),n},Y.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==_.semi||this.canInsertSemicolon()||this.type!=_.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(_.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},Y.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var Z=N.prototype;Z.raise=function(e,t){var n=B(this.input,e);t+=" ("+n.line+":"+n.column+")";var i=new SyntaxError(t);throw i.pos=e,i.loc=n,i.raisedAt=this.pos,i},Z.raiseRecoverable=Z.raise,Z.curPosition=function(){if(this.options.locations)return new R(this.curLine,this.pos-this.lineStart)};var Q=N.prototype,J=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var i=0,r=t;i<r.length;i+=1){var o=r[i];for(var s in o)L(o,s)&&(e[s]=o[s])}return e};Q.enterFunctionScope=function(){this.scopeStack.push({var:{},lexical:{},childVar:{},parentLexical:{}})},Q.exitFunctionScope=function(){this.scopeStack.pop()},Q.enterLexicalScope=function(){var e=this.scopeStack[this.scopeStack.length-1],t={var:{},lexical:{},childVar:{},parentLexical:{}};this.scopeStack.push(t),J(t.parentLexical,e.lexical,e.parentLexical)},Q.exitLexicalScope=function(){var e=this.scopeStack.pop(),t=this.scopeStack[this.scopeStack.length-1];J(t.childVar,e.var,e.childVar)},Q.canDeclareVarName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!L(t.lexical,e)&&!L(t.parentLexical,e)},Q.canDeclareLexicalName=function(e){var t=this.scopeStack[this.scopeStack.length-1];return!L(t.lexical,e)&&!L(t.var,e)&&!L(t.childVar,e)},Q.declareVarName=function(e){this.scopeStack[this.scopeStack.length-1].var[e]=!0},Q.declareLexicalName=function(e){this.scopeStack[this.scopeStack.length-1].lexical[e]=!0};var ee=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new M(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},te=N.prototype;function ne(e,t,n,i){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=n),e}te.startNode=function(){return new ee(this,this.start,this.startLoc)},te.startNodeAt=function(e,t){return new ee(this,e,t)},te.finishNode=function(e,t){return ne.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},te.finishNodeAt=function(e,t,n,i){return ne.call(this,e,t,n,i)};var ie=function(e,t,n,i,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=i,this.generator=!!r},re={b_stat:new ie("{",!1),b_expr:new ie("{",!0),b_tmpl:new ie("${",!1),p_stat:new ie("(",!1),p_expr:new ie("(",!0),q_tmpl:new ie("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ie("function",!1),f_expr:new ie("function",!0),f_expr_gen:new ie("function",!0,!1,null,!0),f_gen:new ie("function",!1,!1,null,!0)},oe=N.prototype;oe.initialContext=function(){return[re.b_stat]},oe.braceIsBlock=function(e){var t=this.curContext();return t===re.f_expr||t===re.f_stat||(e!==_.colon||t!==re.b_stat&&t!==re.b_expr?e===_._return||e==_.name&&this.exprAllowed?k.test(this.input.slice(this.lastTokEnd,this.start)):e===_._else||e===_.semi||e===_.eof||e===_.parenR||e==_.arrow||(e==_.braceL?t===re.b_stat:e!=_._var&&e!=_.name&&!this.exprAllowed):!t.isExpr)},oe.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},oe.updateContext=function(e){var t,n=this.type;n.keyword&&e==_.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},_.parenR.updateContext=_.braceR.updateContext=function(){if(1!=this.context.length){var e=this.context.pop();e===re.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},_.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?re.b_stat:re.b_expr),this.exprAllowed=!0},_.dollarBraceL.updateContext=function(){this.context.push(re.b_tmpl),this.exprAllowed=!0},_.parenL.updateContext=function(e){var t=e===_._if||e===_._for||e===_._with||e===_._while;this.context.push(t?re.p_stat:re.p_expr),this.exprAllowed=!0},_.incDec.updateContext=function(){},_._function.updateContext=_._class.updateContext=function(e){e.beforeExpr&&e!==_.semi&&e!==_._else&&(e!==_.colon&&e!==_.braceL||this.curContext()!==re.b_stat)?this.context.push(re.f_expr):this.context.push(re.f_stat),this.exprAllowed=!1},_.backQuote.updateContext=function(){this.curContext()===re.q_tmpl?this.context.pop():this.context.push(re.q_tmpl),this.exprAllowed=!1},_.star.updateContext=function(e){if(e==_._function){var t=this.context.length-1;this.context[t]===re.f_expr?this.context[t]=re.f_expr_gen:this.context[t]=re.f_gen}this.exprAllowed=!0},_.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var se=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new M(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ae=N.prototype,ce="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);function le(e,t,n,i){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&i.raise(n,"Error parsing regular expression: "+e.message),e}}ae.next=function(){this.options.onToken&&this.options.onToken(new se(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ae.getToken=function(){return this.next(),new se(this)},"undefined"!=typeof Symbol&&(ae[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===_.eof,value:t}}}}),ae.curContext=function(){return this.context[this.context.length-1]},ae.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(_.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},ae.readToken=function(e){return p(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},ae.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},ae.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(C.lastIndex=n;(e=C.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(n+2,i),n,this.pos,t,this.curPosition())},ae.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!E(i);)i=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},ae.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&A.test(String.fromCharCode(e))))break e;++this.pos}}},ae.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},ae.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(_.ellipsis)):(++this.pos,this.finishToken(_.dot))},ae.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(_.assign,2):this.finishOp(_.slash,1)},ae.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,i=42===e?_.star:_.modulo;return this.options.ecmaVersion>=7&&42==e&&42===t&&(++n,i=_.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(_.assign,n+1):this.finishOp(i,n)},ae.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?_.logicalOR:_.logicalAND,2):61===t?this.finishOp(_.assign,2):this.finishOp(124===e?_.bitwiseOR:_.bitwiseAND,1)},ae.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(_.assign,2):this.finishOp(_.bitwiseXOR,1)},ae.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!=t||this.inModule||62!=this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!k.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(_.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(_.assign,2):this.finishOp(_.plusMin,1)},ae.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(_.assign,n+1):this.finishOp(_.bitShift,n)):33!=t||60!=e||this.inModule||45!=this.input.charCodeAt(this.pos+2)||45!=this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(_.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},ae.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(_.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(_.arrow)):this.finishOp(61===e?_.eq:_.prefix,1)},ae.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(_.parenL);case 41:return++this.pos,this.finishToken(_.parenR);case 59:return++this.pos,this.finishToken(_.semi);case 44:return++this.pos,this.finishToken(_.comma);case 91:return++this.pos,this.finishToken(_.bracketL);case 93:return++this.pos,this.finishToken(_.bracketR);case 123:return++this.pos,this.finishToken(_.braceL);case 125:return++this.pos,this.finishToken(_.braceR);case 58:return++this.pos,this.finishToken(_.colon);case 63:return++this.pos,this.finishToken(_.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(_.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(_.prefix,1)}this.raise(this.pos,"Unexpected character '"+he(e)+"'")},ae.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var ue=!!le("","u");function he(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}ae.readRegexp=function(){for(var e,t,n=this,i=this.pos;;){n.pos>=n.input.length&&n.raise(i,"Unterminated regular expression");var r=n.input.charAt(n.pos);if(k.test(r)&&n.raise(i,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++n.pos}var o=this.input.slice(i,this.pos);++this.pos;var s=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(s);var c=o,l="";if(a){var u="gim";this.options.ecmaVersion>=6&&(u+="uy"),this.options.ecmaVersion>=9&&(u+="s");for(var h=0;h<a.length;h++){var d=a.charAt(h);-1==u.indexOf(d)&&n.raise(i,"Invalid regular expression flag"),a.indexOf(d,h+1)>-1&&n.raise(i,"Duplicate regular expression flag")}a.indexOf("u")>=0&&(ue?l="u":(c=(c=c.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,r){return(t=Number("0x"+t))>1114111&&n.raise(i+r+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),l=l.replace("u","")))}var f=null;return ce||(le(c,l,i,this),f=le(o,a)),this.finishToken(_.regexp,{pattern:o,flags:a,value:f})},ae.readInt=function(e,t){for(var n=this.pos,i=0,r=0,o=null==t?1/0:t;r<o;++r){var s=this.input.charCodeAt(this.pos),a=void 0;if((a=s>=97?s-97+10:s>=65?s-65+10:s>=48&&s<=57?s-48:1/0)>=e)break;++this.pos,i=i*e+a}return this.pos===n||null!=t&&this.pos-n!==t?null:i},ae.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(_.num,t)},ae.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number"),n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1);var i=this.input.charCodeAt(this.pos);46!==i||n||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||n||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r=this.input.slice(t,this.pos),o=n?parseInt(r,8):parseFloat(r);return this.finishToken(_.num,o)},ae.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},ae.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(E(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(_.string,t)};var de={};ae.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==de)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},ae.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw de;this.raise(e,t)},ae.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==_.template&&this.type!==_.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(_.template,e)):36===n?(this.pos+=2,this.finishToken(_.dollarBraceL)):(++this.pos,this.finishToken(_.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(E(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},ae.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(_.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},ae.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return he(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),"0"===n&&56!=t&&57!=t||!this.strict&&!e||this.invalidStringToken(this.pos-1-n.length,"Octal literal in strict mode"),String.fromCharCode(i)}return String.fromCharCode(t)}},ae.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},ae.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,i=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(g(r,i))this.pos+=r<=65535?1:2;else{if(92!==r)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var o=this.pos;117!=this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var s=this.readCodePoint();(t?p:g)(s,i)||this.invalidStringToken(o,"Invalid Unicode escape"),e+=he(s),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},ae.readWord=function(){var e=this.readWord1(),t=_.name;return this.keywords.test(e)&&(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+e),t=w[e]),this.finishToken(t,e)};var fe,pe,ge,me="5.4.1";function ve(e,t){return new N(t,e).parse()}function ye(e,t,n){var i=new N(n,e,t);return i.nextToken(),i.parseExpression()}function be(e,t){return new N(t,e)}function we(e,t,n){fe=e,pe=t,ge=n}},function(e,t,n){(function(t,n,i){e.exports=function(){var e,r,o;return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return r(n||e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(e,t,n){"use strict";t.exports=function(e){var t=e._SomePromiseArray;function n(e){var n=new t(e),i=n.promise();return n.setHowMany(1),n.setUnwrap(),n.init(),i}e.any=function(e){return n(e)},e.prototype.any=function(){return n(this)}}},{}],2:[function(e,n,i){"use strict";var r;try{throw new Error}catch(e){r=e}var o=e("./schedule"),s=e("./queue"),a=e("./util");function c(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new s(16),this._normalQueue=new s(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=o}function l(e,t,n){this._lateQueue.push(e,t,n),this._queueTick()}function u(e,t,n){this._normalQueue.push(e,t,n),this._queueTick()}function h(e){this._normalQueue._pushOne(e),this._queueTick()}c.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},c.prototype.hasCustomScheduler=function(){return this._customScheduler},c.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},c.prototype.disableTrampolineIfNecessary=function(){a.hasDevTools&&(this._trampolineEnabled=!1)},c.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},c.prototype.fatalError=function(e,n){n?(t.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),t.exit(2)):this.throwLater(e)},c.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout(function(){e(t)},0);else try{this._schedule(function(){e(t)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},a.hasDevTools?(c.prototype.invokeLater=function(e,t,n){this._trampolineEnabled?l.call(this,e,t,n):this._schedule(function(){setTimeout(function(){e.call(t,n)},100)})},c.prototype.invoke=function(e,t,n){this._trampolineEnabled?u.call(this,e,t,n):this._schedule(function(){e.call(t,n)})},c.prototype.settlePromises=function(e){this._trampolineEnabled?h.call(this,e):this._schedule(function(){e._settlePromises()})}):(c.prototype.invokeLater=l,c.prototype.invoke=u,c.prototype.settlePromises=h),c.prototype._drainQueue=function(e){for(;e.length()>0;){var t=e.shift();if("function"==typeof t){var n=e.shift(),i=e.shift();t.call(n,i)}else t._settlePromises()}},c.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},c.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},c.prototype._reset=function(){this._isTickUsed=!1},n.exports=c,n.exports.firstLineError=r},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,i){var r=!1,o=function(e,t){this._reject(t)},s=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},a=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},c=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){r||(r=!0,e.prototype._propagateFrom=i.propagateFromFunction(),e.prototype._boundValue=i.boundValueFunction());var l=n(o),u=new e(t);u._propagateFrom(this,1);var h=this._target();if(u._setBoundTo(l),l instanceof e){var d={promiseRejectionQueued:!1,promise:u,target:h,bindingPromise:l};h._then(t,s,void 0,u,d),l._then(a,c,void 0,u,d),u._setOnCancel(l)}else u._resolveCallback(h);return u},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,n){"use strict";var i;"undefined"!=typeof Promise&&(i=Promise);var r=e("./promise")();r.noConflict=function(){try{Promise===r&&(Promise=i)}catch(e){}return r},t.exports=r},{"./promise":22}],5:[function(e,t,n){"use strict";var i=Object.create;if(i){var r=i(null),o=i(null);r[" size"]=o[" size"]=0}t.exports=function(t){var n=e("./util"),i=n.canEvaluate;function r(e){var i=this.pop(),r=function(e,i){var r;if(null!=e&&(r=e[i]),"function"!=typeof r){var o="Object "+n.classString(e)+" has no method '"+n.toString(i)+"'";throw new t.TypeError(o)}return r}(e,i);return r.apply(e,this)}function o(e){return e[this]}function s(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}n.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(r,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t,n="number"==typeof e;if(n)t=s;else if(i){var r=(void 0)(e);t=null!==r?r:o}else t=o;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,n){"use strict";t.exports=function(t,n,i,r){var o=e("./util"),s=o.tryCatch,a=o.errorObj,c=t._async;t.prototype.break=t.prototype.cancel=function(){if(!r.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var n=0;n<e.length;++n)this._doInvokeOnCancel(e[n],t);else if(void 0!==e)if("function"==typeof e){if(!t){var i=s(e).call(this._boundValue());i===a&&(this._attachExtraTrace(i.e),c.throwLater(i.e))}}else e._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,e)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(e,t,n){"use strict";t.exports=function(t){var n=e("./util"),i=e("./es5").keys,r=n.tryCatch,o=n.errorObj;return function(e,s,a){return function(c){var l=a._boundValue();e:for(var u=0;u<e.length;++u){var h=e[u];if(h===Error||null!=h&&h.prototype instanceof Error){if(c instanceof h)return r(s).call(l,c)}else if("function"==typeof h){var d=r(h).call(l,c);if(d===o)return d;if(d)return r(s).call(l,c)}else if(n.isObject(c)){for(var f=i(h),p=0;p<f.length;++p){var g=f[p];if(h[g]!=c[g])continue e}return r(s).call(l,c)}}return t}}}},{"./es5":13,"./util":36}],8:[function(e,t,n){"use strict";t.exports=function(e){var t=!1,n=[];function i(){this._trace=new i.CapturedTrace(r())}function r(){var e=n.length-1;if(e>=0)return n[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},i.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},i.prototype._popContext=function(){if(void 0!==this._trace){var e=n.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},i.CapturedTrace=null,i.create=function(){if(t)return new i},i.deactivateLongStackTraces=function(){},i.activateLongStackTraces=function(){var n=e.prototype._pushContext,o=e.prototype._popContext,s=e._peekContext,a=e.prototype._peekContext,c=e.prototype._promiseCreated;i.deactivateLongStackTraces=function(){e.prototype._pushContext=n,e.prototype._popContext=o,e._peekContext=s,e.prototype._peekContext=a,e.prototype._promiseCreated=c,t=!1},t=!0,e.prototype._pushContext=i.prototype._pushContext,e.prototype._popContext=i.prototype._popContext,e._peekContext=e.prototype._peekContext=r,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},i}},{}],9:[function(e,n,i){"use strict";n.exports=function(n,i){var r,o,s,a=n._getDomain,c=n._async,l=e("./errors").Warning,u=e("./util"),h=u.canAttachTrace,d=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,f=/\((?:timers\.js):\d+:\d+\)/,p=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,g=null,m=null,v=!1,y=!(0==u.env("BLUEBIRD_DEBUG")),b=!(0==u.env("BLUEBIRD_WARNINGS")||!y&&!u.env("BLUEBIRD_WARNINGS")),w=!(0==u.env("BLUEBIRD_LONG_STACK_TRACES")||!y&&!u.env("BLUEBIRD_LONG_STACK_TRACES")),x=0!=u.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(b||!!u.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var e=this;setTimeout(function(){e._notifyUnhandledRejection()},1)}},n.prototype._notifyUnhandledRejectionIsHandled=function(){H("rejectionHandled",r,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),H("unhandledRejection",o,e,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(e,t,n){return $(e,t,n||this)},n.onPossiblyUnhandledRejection=function(e){var t=a();o="function"==typeof e?null===t?e:u.domainBind(t,e):void 0},n.onUnhandledRejectionHandled=function(e){var t=a();r="function"==typeof e?null===t?e:u.domainBind(t,e):void 0};var _=function(){};n.longStackTraces=function(){if(c.haveItemsQueued()&&!Z.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!Z.longStackTraces&&U()){var e=n.prototype._captureStackTrace,t=n.prototype._attachExtraTrace;Z.longStackTraces=!0,_=function(){if(c.haveItemsQueued()&&!Z.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=e,n.prototype._attachExtraTrace=t,i.deactivateLongStackTraces(),c.enableTrampoline(),Z.longStackTraces=!1},n.prototype._captureStackTrace=j,n.prototype._attachExtraTrace=I,i.activateLongStackTraces(),c.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return Z.longStackTraces&&U()};var k=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return u.global.dispatchEvent(e),function(e,t){var n=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!u.global.dispatchEvent(n)}}if("function"==typeof Event){var e=new Event("CustomEvent");return u.global.dispatchEvent(e),function(e,t){var n=new Event(e.toLowerCase(),{cancelable:!0});return n.detail=t,!u.global.dispatchEvent(n)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),u.global.dispatchEvent(e),function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e.toLowerCase(),!1,!0,t),!u.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),C=u.isNode?function(){return t.emit.apply(t,arguments)}:u.global?function(e){var t="on"+e.toLowerCase(),n=u.global[t];return!!n&&(n.apply(u.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function E(e,t){return{promise:t}}var A={promiseCreated:E,promiseFulfilled:E,promiseRejected:E,promiseResolved:E,promiseCancelled:E,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:E},S=function(e){var t=!1;try{t=C.apply(null,arguments)}catch(e){c.throwLater(e),t=!0}var n=!1;try{n=k(e,A[e].apply(null,arguments))}catch(e){c.throwLater(e),n=!0}return n||t};function F(){return!1}function T(e,t,n){var i=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+u.toString(e));i._attachCancellationCallback(e)})}catch(e){return e}}function D(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?u.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function L(){return this._onCancelField}function P(e){this._onCancelField=e}function R(){this._cancellationParent=void 0,this._onCancelField=void 0}function M(e,t){if(0!=(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}n.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?n.longStackTraces():!e.longStackTraces&&n.hasLongStackTraces()&&_()),"warnings"in e){var t=e.warnings;Z.warnings=!!t,x=Z.warnings,u.isObject(t)&&"wForgottenReturn"in t&&(x=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!Z.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=R,n.prototype._propagateFrom=M,n.prototype._onCancel=L,n.prototype._setOnCancel=P,n.prototype._attachCancellationCallback=D,n.prototype._execute=T,B=M,Z.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!Z.monitoring?(Z.monitoring=!0,n.prototype._fireEvent=S):!e.monitoring&&Z.monitoring&&(Z.monitoring=!1,n.prototype._fireEvent=F)),n},n.prototype._fireEvent=F,n.prototype._execute=function(e,t,n){try{e(t,n)}catch(e){return e}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(e){},n.prototype._attachCancellationCallback=function(e){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(e,t){};var B=function(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)};function O(){var e=this._boundTo;return void 0!==e&&e instanceof n?e.isFulfilled()?e.value():void 0:e}function j(){this._trace=new Y(this._peekContext())}function I(e,t){if(h(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var i=W(e);u.notEnumerableProp(e,"stack",i.message+"\n"+i.stack.join("\n")),u.notEnumerableProp(e,"__stackCleaned__",!0)}}}function $(e,t,i){if(Z.warnings){var r,o=new l(e);if(t)i._attachExtraTrace(o);else if(Z.longStackTraces&&(r=n._peekContext()))r.attachExtraTrace(o);else{var s=W(o);o.stack=s.message+"\n"+s.stack.join("\n")}S("warning",o)||z(o,"",!0)}}function N(e){for(var t=[],n=0;n<e.length;++n){var i=e[n],r=" (No stack trace)"===i||g.test(i),o=r&&K(i);r&&!o&&(v&&" "!==i.charAt(0)&&(i=" "+i),t.push(i))}return t}function W(e){var t=e.stack,n=e.toString();return t="string"==typeof t&&t.length>0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),n=0;n<t.length;++n){var i=t[n];if(" (No stack trace)"===i||g.test(i))break}return n>0&&"SyntaxError"!=e.name&&(t=t.slice(n)),t}(e):[" (No stack trace)"],{message:n,stack:"SyntaxError"==e.name?t:N(t)}}function z(e,t,n){if("undefined"!=typeof console){var i;if(u.isObject(e)){var r=e.stack;i=t+m(r,e)}else i=t+String(e);"function"==typeof s?s(i,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(i)}}function H(e,t,n,i){var r=!1;try{"function"==typeof t&&(r=!0,"rejectionHandled"===e?t(i):t(n,i))}catch(e){c.throwLater(e)}"unhandledRejection"===e?S(e,n,i)||r||z(n,"Unhandled rejection "):S(e,i)}function V(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():u.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{var n=JSON.stringify(e);t=n}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+function(e){return e.length<41?e:e.substr(0,38)+"..."}(t)+">, no stack trace)"}function U(){return"function"==typeof X}var K=function(){return!1},G=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function q(e){var t=e.match(G);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function Y(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);X(this,Y),t>32&&this.uncycle()}u.inherits(Y,Error),i.CapturedTrace=Y,Y.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],n={},i=0,r=this;void 0!==r;++i)t.push(r),r=r._parent;for(var i=(e=this._length=i)-1;i>=0;--i){var o=t[i].stack;void 0===n[o]&&(n[o]=i)}for(var i=0;i<e;++i){var s=t[i].stack,a=n[s];if(void 0!==a&&a!==i){a>0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[i]._parent=void 0,t[i]._length=1;var c=i>0?t[i-1]:this;a<e-1?(c._parent=t[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=i-2;u>=0;--u)t[u]._length=l,l++;return}}}},Y.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=W(e),n=t.message,i=[t.stack],r=this;void 0!==r;)i.push(N(r.stack.split("\n"))),r=r._parent;!function(e){for(var t=e[0],n=1;n<e.length;++n){for(var i=e[n],r=t.length-1,o=t[r],s=-1,a=i.length-1;a>=0;--a)if(i[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=i[a];if(t[r]!==c)break;t.pop(),r--}t=i}}(i),function(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}(i),u.notEnumerableProp(e,"stack",function(e,t){for(var n=0;n<t.length-1;++n)t[n].push("From previous event:"),t[n]=t[n].join("\n");return n<t.length&&(t[n]=t[n].join("\n")),e+"\n"+t.join("\n")}(n,i)),u.notEnumerableProp(e,"__stackCleaned__",!0)}};var X=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():V(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,g=e,m=t;var n=Error.captureStackTrace;return K=function(e){return d.test(e)},function(e,t){Error.stackTraceLimit+=6,n(e,t),Error.stackTraceLimit-=6}}var i,r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return g=/@/,m=t,v=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){i="stack"in e}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(m=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?V(t):t.toString()},null):(g=e,m=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(s=function(e){console.warn(e)},u.isNode&&t.stderr.isTTY?s=function(e,t){var n=t?"[33m":"[31m";console.warn(n+e+"[0m\n")}:u.isNode||"string"!=typeof(new Error).stack||(s=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var Z={warnings:b,longStackTraces:!1,cancellation:!1,monitoring:!1};return w&&n.longStackTraces(),{longStackTraces:function(){return Z.longStackTraces},warnings:function(){return Z.warnings},cancellation:function(){return Z.cancellation},monitoring:function(){return Z.monitoring},propagateFromFunction:function(){return B},boundValueFunction:function(){return O},checkForgottenReturns:function(e,t,n,i,r){if(void 0===e&&null!==t&&x){if(void 0!==r&&r._returnedNonUndefined())return;if(0==(65535&i._bitField))return;n&&(n+=" ");var o="",s="";if(t._trace){for(var a=t._trace.stack.split("\n"),c=N(a),l=c.length-1;l>=0;--l){var u=c[l];if(!f.test(u)){var h=u.match(p);h&&(o="at "+h[1]+":"+h[2]+":"+h[3]+" ");break}}if(c.length>0)for(var d=c[0],l=0;l<a.length;++l)if(a[l]===d){l>0&&(s="\n"+a[l-1]);break}}var g="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;i._warn(g,!0,t)}},setBounds:function(e,t){if(U()){for(var n,i,r=e.stack.split("\n"),o=t.stack.split("\n"),s=-1,a=-1,c=0;c<r.length;++c){var l=q(r[c]);if(l){n=l.fileName,s=l.line;break}}for(var c=0;c<o.length;++c){var l=q(o[c]);if(l){i=l.fileName,a=l.line;break}}s<0||a<0||!n||!i||n!==i||s>=a||(K=function(e){if(d.test(e))return!0;var t=q(e);return!!(t&&t.fileName===n&&s<=t.line&&t.line<=a)})}},warn:$,deprecated:function(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),$(n)},CapturedTrace:Y,fireDomEvent:k,fireGlobalEvent:C}}},{"./errors":12,"./util":36}],10:[function(e,t,n){"use strict";t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,function(){throw t})},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var i=arguments[1];return i instanceof e&&i.suppressUnhandledRejections(),this.caught(n,function(){return i})}}},{}],11:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.reduce,i=e.all;function r(){return i(this)}e.prototype.each=function(e){return n(this,e,t,0)._then(r,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return n(this,e,t,t)},e.each=function(e,i){return n(e,i,t,0)._then(r,void 0,void 0,e,void 0)},e.mapSeries=function(e,i){return n(e,i,t,t)}}},{}],12:[function(e,t,n){"use strict";var i,r,o=e("./es5"),s=o.freeze,a=e("./util"),c=a.inherits,l=a.notEnumerableProp;function u(e,t){function n(i){if(!(this instanceof n))return new n(i);l(this,"message","string"==typeof i?i:t),l(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(n,Error),n}var h=u("Warning","warning"),d=u("CancellationError","cancellation error"),f=u("TimeoutError","timeout error"),p=u("AggregateError","aggregate error");try{i=TypeError,r=RangeError}catch(e){i=u("TypeError","type error"),r=u("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m<g.length;++m)"function"==typeof Array.prototype[g[m]]&&(p.prototype[g[m]]=Array.prototype[g[m]]);o.defineProperty(p.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var v=0;function y(e){if(!(this instanceof y))return new y(e);l(this,"name","OperationalError"),l(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(l(this,"message",e.message),l(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}p.prototype.toString=function(){var e=Array(4*v+1).join(" "),t="\n"+e+"AggregateError of:\n";v++,e=Array(4*v+1).join(" ");for(var n=0;n<this.length;++n){for(var i=this[n]===this?"[Circular AggregateError]":this[n]+"",r=i.split("\n"),o=0;o<r.length;++o)r[o]=e+r[o];i=r.join("\n"),t+=i+"\n"}return v--,t},c(y,Error);var b=Error.__BluebirdErrorTypes__;b||(b=s({CancellationError:d,TimeoutError:f,OperationalError:y,RejectionError:y,AggregateError:p}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:i,RangeError:r,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(e,t,n){var i=function(){"use strict";return void 0===this}();if(i)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:i,propertyIsWritable:function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!(n&&!n.writable&&!n.set)}};else{var r={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(e){var t=[];for(var n in e)r.call(e,n)&&t.push(n);return t};t.exports={isArray:function(e){try{return"[object Array]"===o.call(e)}catch(e){return!1}},keys:a,names:a,defineProperty:function(e,t,n){return e[t]=n.value,e},getDescriptor:function(e,t){return{value:e[t]}},freeze:function(e){return e},getPrototypeOf:function(e){try{return Object(e).constructor.prototype}catch(e){return s}},isES5:i,propertyIsWritable:function(){return!0}}}},{}],14:[function(e,t,n){"use strict";t.exports=function(e,t){var n=e.map;e.prototype.filter=function(e,i){return n(this,e,i,t)},e.filter=function(e,i,r){return n(e,i,r,t)}}},{}],15:[function(e,t,n){"use strict";t.exports=function(t,n,i){var r=e("./util"),o=t.CancellationError,s=r.errorObj,a=e("./catch_filter")(i);function c(e,t,n){this.promise=e,this.type=t,this.handler=n,this.called=!1,this.cancelPromise=null}function l(e){this.finallyHandler=e}function u(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function h(){return f.call(this,this.promise._target()._settledValue())}function d(e){if(!u(this,e))return s.e=e,s}function f(e){var r=this.promise,a=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?a.call(r._boundValue()):a.call(r._boundValue(),e);if(c===i)return c;if(void 0!==c){r._setReturnedNonUndefined();var f=n(c,r);if(f instanceof t){if(null!=this.cancelPromise){if(f._isCancelled()){var p=new o("late cancellation observer");return r._attachExtraTrace(p),s.e=p,s}f.isPending()&&f._attachCancellationCallback(new l(this))}return f._then(h,d,void 0,this,void 0)}}}return r.isRejected()?(u(this),s.e=e,s):(u(this),e)}return c.prototype.isFinallyHandler=function(){return 0===this.type},l.prototype._resultCancelled=function(){u(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,i){return"function"!=typeof e?this.then():this._then(n,i,void 0,new c(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,f,f)},t.prototype.tap=function(e){return this._passThrough(e,1,f)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,f);var i,o=new Array(n-1),s=0;for(i=0;i<n-1;++i){var c=arguments[i];if(!r.isObject(c))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+r.classString(c)));o[s++]=c}o.length=s;var l=arguments[i];return this._passThrough(a(o,l,this),1,void 0,f)},c}},{"./catch_filter":7,"./util":36}],16:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o,s){var a=e("./errors"),c=a.TypeError,l=e("./util"),u=l.errorObj,h=l.tryCatch,d=[];function f(e,n,r,o){if(s.cancellation()){var a=new t(i),c=this._finallyPromise=new t(i);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{var l=this._promise=new t(i);l._captureStackTrace()}this._stack=o,this._generatorFunction=e,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof r?[r].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}l.inherits(f,o),f.prototype._isResolved=function(){return null===this._promise},f.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},f.prototype._promiseCancelled=function(){if(!this._isResolved()){var e,n=void 0!==this._generator.return;if(n)this._promise._pushContext(),e=h(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var i=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=i,this._promise._attachExtraTrace(i),this._promise._pushContext(),e=h(this._generator.throw).call(this._generator,i),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},f.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=h(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},f.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=h(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},f.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},f.prototype.promise=function(){return this._promise},f.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},f.prototype._continue=function(e){var n=this._promise;if(e===u)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(e.e,!1);var i=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(i);var o=r(i,this._promise);if(o instanceof t||null!==(o=function(e,n,i){for(var o=0;o<n.length;++o){i._pushContext();var s=h(n[o])(e);if(i._popContext(),s===u){i._pushContext();var a=t.reject(u.e);return i._popContext(),a}var c=r(s,i);if(c instanceof t)return c}return null}(o,this._yieldHandlers,this._promise))){var s=(o=o._target())._bitField;0==(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!=(33554432&s)?t._async.invoke(this._promiseFulfilled,this,o._value()):0!=(16777216&s)?t._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()}else this._promiseRejected(new c("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(i))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(e,t){if("function"!=typeof e)throw new c("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(t).yieldHandler,i=f,r=(new Error).stack;return function(){var t=e.apply(this,arguments),o=new i(void 0,void 0,n,r),s=o.promise();return o._generator=t,o._promiseFulfilled(void 0),s}},t.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new c("expecting a function but got "+l.classString(e));d.push(e)},t.spawn=function(e){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof e)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var i=new f(e,this),r=i.promise();return i._run(t.spawn),r}}},{"./errors":12,"./util":36}],17:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o,s){var a=e("./util");a.canEvaluate,a.tryCatch,a.errorObj,t.join=function(){var e,t=arguments.length-1;t>0&&"function"==typeof arguments[t]&&(e=arguments[t]);var i=[].slice.call(arguments);e&&i.pop();var r=new n(i).promise();return void 0!==e?r.spread(e):r}}},{"./util":36}],18:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o,s){var a=t._getDomain,c=e("./util"),l=c.tryCatch,u=c.errorObj,h=t._async;function d(e,t,n,i){this.constructor$(e),this._promise._captureStackTrace();var r=a();this._callback=null===r?t:c.domainBind(r,t),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0)}function f(e,n,r,o){if("function"!=typeof n)return i("expecting a function but got "+c.classString(n));var s=0;if(void 0!==r){if("object"!=typeof r||null===r)return t.reject(new TypeError("options argument must be an object but it is "+c.classString(r)));if("number"!=typeof r.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(r.concurrency)));s=r.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new d(e,n,s,o).promise()}c.inherits(d,n),d.prototype._asyncInit=function(){this._init$(void 0,-2)},d.prototype._init=function(){},d.prototype._promiseFulfilled=function(e,n){var i=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(n<0){if(i[n=-1*n-1]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return i[n]=e,this._queue.push(n),!1;null!==a&&(a[n]=e);var h=this._promise,d=this._callback,f=h._boundValue();h._pushContext();var p=l(d).call(f,e,n,o),g=h._popContext();if(s.checkForgottenReturns(p,g,null!==a?"Promise.filter":"Promise.map",h),p===u)return this._reject(p.e),!0;var m=r(p,this._promise);if(m instanceof t){var v=(m=m._target())._bitField;if(0==(50397184&v))return c>=1&&this._inFlight++,i[n]=m,m._proxy(this,-1*(n+1)),!1;if(0==(33554432&v))return 0!=(16777216&v)?(this._reject(m._reason()),!0):(this._cancel(),!0);p=m._value()}i[n]=p}var y=++this._totalResolved;return y>=o&&(null!==a?this._filter(i,a):this._resolve(i),!0)},d.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var i=e.pop();this._promiseFulfilled(n[i],i)}},d.prototype._filter=function(e,t){for(var n=t.length,i=new Array(n),r=0,o=0;o<n;++o)e[o]&&(i[r++]=t[o]);i.length=r,this._resolve(i)},d.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return f(this,e,t,null)},t.map=function(e,t,n,i){return f(e,t,n,i)}}},{"./util":36}],19:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o){var s=e("./util"),a=s.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+s.classString(e));return function(){var i=new t(n);i._captureStackTrace(),i._pushContext();var r=a(e).apply(this,arguments),s=i._popContext();return o.checkForgottenReturns(r,s,"Promise.method",i),i._resolveFromSyncValue(r),i}},t.attempt=t.try=function(e){if("function"!=typeof e)return r("expecting a function but got "+s.classString(e));var i,c=new t(n);if(c._captureStackTrace(),c._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];i=s.isArray(l)?a(e).apply(u,l):a(e).call(u,l)}else i=a(e)();var h=c._popContext();return o.checkForgottenReturns(i,h,"Promise.try",c),c._resolveFromSyncValue(i),c},t.prototype._resolveFromSyncValue=function(e){e===s.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,n){"use strict";var i=e("./util"),r=i.maybeWrapAsError,o=e("./errors"),s=o.OperationalError,a=e("./es5"),c=/^(?:name|message|stack|cause)$/;function l(e){var t;if(function(e){return e instanceof Error&&a.getPrototypeOf(e)===Error.prototype}(e)){(t=new s(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var n=a.keys(e),r=0;r<n.length;++r){var o=n[r];c.test(o)||(t[o]=e[o])}return t}return i.markAsOriginatingFromRejection(e),e}t.exports=function(e,t){return function(n,i){if(null!==e){if(n){var o=l(r(n));e._attachExtraTrace(o),e._reject(o)}else if(t){var s=[].slice.call(arguments,1);e._fulfill(s)}else e._fulfill(i);e=null}}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,n){"use strict";t.exports=function(t){var n=e("./util"),i=t._async,r=n.tryCatch,o=n.errorObj;function s(e,t){if(!n.isArray(e))return a.call(this,e,t);var s=r(t).apply(this._boundValue(),[null].concat(e));s===o&&i.throwLater(s.e)}function a(e,t){var n=this._boundValue(),s=void 0===e?r(t).call(n,null):r(t).call(n,null,e);s===o&&i.throwLater(s.e)}function c(e,t){if(!e){var n=new Error(e+"");n.cause=e,e=n}var s=r(t).call(this._boundValue(),e);s===o&&i.throwLater(s.e)}t.prototype.asCallback=t.prototype.nodeify=function(e,t){if("function"==typeof e){var n=a;void 0!==t&&Object(t).spread&&(n=s),this._then(n,c,void 0,this,e)}return this}}},{"./util":36}],22:[function(e,n,i){"use strict";n.exports=function(){var i=function(){return new p("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},r=function(){return new T.PromiseInspection(this._target())},o=function(e){return T.reject(new p(e))};function s(){}var a,c={},l=e("./util");a=l.isNode?function(){var e=t.domain;return void 0===e&&(e=null),e}:function(){return null},l.notEnumerableProp(T,"_getDomain",a);var u=e("./es5"),h=e("./async"),d=new h;u.defineProperty(T,"_async",{value:d});var f=e("./errors"),p=T.TypeError=f.TypeError;T.RangeError=f.RangeError;var g=T.CancellationError=f.CancellationError;T.TimeoutError=f.TimeoutError,T.OperationalError=f.OperationalError,T.RejectionError=f.OperationalError,T.AggregateError=f.AggregateError;var m=function(){},v={},y={},b=e("./thenables")(T,m),w=e("./promise_array")(T,m,b,o,s),x=e("./context")(T),_=x.create,k=e("./debuggability")(T,x),C=(k.CapturedTrace,e("./finally")(T,b,y)),E=e("./catch_filter")(y),A=e("./nodeback"),S=l.errorObj,F=l.tryCatch;function T(e){e!==m&&function(e,t){if(null==e||e.constructor!==T)throw new p("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new p("expecting a function but got "+l.classString(t))}(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function D(e){this.promise._resolveCallback(e)}function L(e){this.promise._rejectCallback(e,!1)}function P(e){var t=new T(m);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}return T.prototype.toString=function(){return"[object Promise]"},T.prototype.caught=T.prototype.catch=function(e){var t=arguments.length;if(t>1){var n,i=new Array(t-1),r=0;for(n=0;n<t-1;++n){var s=arguments[n];if(!l.isObject(s))return o("Catch statement predicate: expecting an object but got "+l.classString(s));i[r++]=s}return i.length=r,e=arguments[n],this.then(void 0,E(i,e,this))}return this.then(void 0,e)},T.prototype.reflect=function(){return this._then(r,r,void 0,this,void 0)},T.prototype.then=function(e,t){if(k.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+l.classString(e);arguments.length>1&&(n+=", "+l.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},T.prototype.done=function(e,t){var n=this._then(e,t,void 0,void 0,void 0);n._setIsFinal()},T.prototype.spread=function(e){return"function"!=typeof e?o("expecting a function but got "+l.classString(e)):this.all()._then(e,void 0,void 0,v,void 0)},T.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},T.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new w(this).promise()},T.prototype.error=function(e){return this.caught(l.originatesFromRejection,e)},T.getNewLibraryCopy=n.exports,T.is=function(e){return e instanceof T},T.fromNode=T.fromCallback=function(e){var t=new T(m);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,i=F(e)(A(t,n));return i===S&&t._rejectCallback(i.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},T.all=function(e){return new w(e).promise()},T.cast=function(e){var t=b(e);return t instanceof T||((t=new T(m))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},T.resolve=T.fulfilled=T.cast,T.reject=T.rejected=function(e){var t=new T(m);return t._captureStackTrace(),t._rejectCallback(e,!0),t},T.setScheduler=function(e){if("function"!=typeof e)throw new p("expecting a function but got "+l.classString(e));return d.setScheduler(e)},T.prototype._then=function(e,t,n,i,r){var o=void 0!==r,s=o?r:new T(m),c=this._target(),u=c._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===i&&0!=(2097152&this._bitField)&&(i=0!=(50397184&u)?this._boundValue():c===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var h=a();if(0!=(50397184&u)){var f,p,v=c._settlePromiseCtx;0!=(33554432&u)?(p=c._rejectionHandler0,f=e):0!=(16777216&u)?(p=c._fulfillmentHandler0,f=t,c._unsetRejectionIsUnhandled()):(v=c._settlePromiseLateCancellationObserver,p=new g("late cancellation observer"),c._attachExtraTrace(p),f=t),d.invoke(v,c,{handler:null===h?f:"function"==typeof f&&l.domainBind(h,f),promise:s,receiver:i,value:p})}else c._addCallbacks(e,t,s,i,h);return s},T.prototype._length=function(){return 65535&this._bitField},T.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},T.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},T.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},T.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},T.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},T.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},T.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},T.prototype._isFinal=function(){return(4194304&this._bitField)>0},T.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},T.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},T.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},T.prototype._setAsyncGuaranteed=function(){d.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},T.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==c)return void 0===t&&this._isBound()?this._boundValue():t},T.prototype._promiseAt=function(e){return this[4*e-4+2]},T.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},T.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},T.prototype._boundValue=function(){},T.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,n=e._rejectionHandler0,i=e._promise0,r=e._receiverAt(0);void 0===r&&(r=c),this._addCallbacks(t,n,i,r,null)},T.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),i=e._rejectionHandlerAt(t),r=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=c),this._addCallbacks(n,i,r,o,null)},T.prototype._addCallbacks=function(e,t,n,i,r){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=i,"function"==typeof e&&(this._fulfillmentHandler0=null===r?e:l.domainBind(r,e)),"function"==typeof t&&(this._rejectionHandler0=null===r?t:l.domainBind(r,t));else{var s=4*o-4;this[s+2]=n,this[s+3]=i,"function"==typeof e&&(this[s+0]=null===r?e:l.domainBind(r,e)),"function"==typeof t&&(this[s+1]=null===r?t:l.domainBind(r,t))}return this._setLength(o+1),o},T.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},T.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(i(),!1);var n=b(e,this);if(!(n instanceof T))return this._fulfill(e);t&&this._propagateFrom(n,2);var r=n._target();if(r!==this){var o=r._bitField;if(0==(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;a<s;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!=(33554432&o))this._fulfill(r._value());else if(0!=(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}else this._reject(i())}},T.prototype._rejectCallback=function(e,t,n){var i=l.ensureErrorObject(e),r=i===e;if(!r&&!n&&k.warnings()){var o="a promise was rejected with a non-error: "+l.classString(e);this._warn(o,!0)}this._attachExtraTrace(i,!!t&&r),this._reject(e)},T.prototype._resolveFromExecutor=function(e){if(e!==m){var t=this;this._captureStackTrace(),this._pushContext();var n=!0,i=this._execute(e,function(e){t._resolveCallback(e)},function(e){t._rejectCallback(e,n)});n=!1,this._popContext(),void 0!==i&&t._rejectCallback(i,!0)}},T.prototype._settlePromiseFromHandler=function(e,t,n,i){var r=i._bitField;if(0==(65536&r)){var o;i._pushContext(),t===v?n&&"number"==typeof n.length?o=F(e).apply(this._boundValue(),n):(o=S).e=new p("cannot .spread() a non-array: "+l.classString(n)):o=F(e).call(t,n);var s=i._popContext();0==(65536&(r=i._bitField))&&(o===y?i._reject(n):o===S?i._rejectCallback(o.e,!1):(k.checkForgottenReturns(o,s,"",i,this),i._resolveCallback(o)))}},T.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},T.prototype._followee=function(){return this._rejectionHandler0},T.prototype._setFollowee=function(e){this._rejectionHandler0=e},T.prototype._settlePromise=function(e,t,n,i){var o=e instanceof T,a=this._bitField,c=0!=(134217728&a);0!=(65536&a)?(o&&e._invokeInternalOnCancel(),n instanceof C&&n.isFinallyHandler()?(n.cancelPromise=e,F(t).call(n,i)===S&&e._reject(S.e)):t===r?e._fulfill(r.call(n)):n instanceof s?n._promiseCancelled(e):o||e instanceof w?e._cancel():n.cancel()):"function"==typeof t?o?(c&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,n,i,e)):t.call(n,i,e):n instanceof s?n._isResolved()||(0!=(33554432&a)?n._promiseFulfilled(i,e):n._promiseRejected(i,e)):o&&(c&&e._setAsyncGuaranteed(),0!=(33554432&a)?e._fulfill(i):e._reject(i))},T.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,n=e.promise,i=e.receiver,r=e.value;"function"==typeof t?n instanceof T?this._settlePromiseFromHandler(t,i,r,n):t.call(i,r,n):n instanceof T&&n._reject(r)},T.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},T.prototype._settlePromise0=function(e,t,n){var i=this._promise0,r=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(i,e,r,t)},T.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},T.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=i();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():d.settlePromises(this))}},T.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return d.fatalError(e,l.isNode);(65535&t)>0?d.settlePromises(this):this._ensurePossibleRejectionHandled()}},T.prototype._fulfillPromises=function(e,t){for(var n=1;n<e;n++){var i=this._fulfillmentHandlerAt(n),r=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(r,i,o,t)}},T.prototype._rejectPromises=function(e,t){for(var n=1;n<e;n++){var i=this._rejectionHandlerAt(n),r=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(r,i,o,t)}},T.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(0!=(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var i=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,i,e),this._fulfillPromises(t,i)}this._setLength(0)}this._clearCancellationData()},T.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},T.defer=T.pending=function(){k.deprecated("Promise.defer","new Promise");var e=new T(m);return{promise:e,resolve:D,reject:L}},l.notEnumerableProp(T,"_makeSelfResolutionError",i),e("./method")(T,m,b,o,k),e("./bind")(T,m,b,k),e("./cancel")(T,w,o,k),e("./direct_resolve")(T),e("./synchronous_inspection")(T),e("./join")(T,w,b,m,d,a),T.Promise=T,T.version="3.5.1",e("./map.js")(T,w,o,b,m,k),e("./call_get.js")(T),e("./using.js")(T,o,b,_,m,k),e("./timers.js")(T,m,k),e("./generators.js")(T,o,m,b,s,k),e("./nodeify.js")(T),e("./promisify.js")(T,m),e("./props.js")(T,w,b,o),e("./race.js")(T,m,b,o),e("./reduce.js")(T,w,o,b,m,k),e("./settle.js")(T,w,k),e("./some.js")(T,w,o),e("./filter.js")(T,m),e("./each.js")(T,m),e("./any.js")(T),l.toFastProperties(T),l.toFastProperties(T.prototype),P({a:1}),P({b:2}),P({c:3}),P(1),P(function(){}),P(void 0),P(!1),P(new T(m)),k.setBounds(h.firstLineError,l.lastLineError),T}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o){var s=e("./util");function a(e){var i=this._promise=new t(n);e instanceof t&&i._propagateFrom(e,3),i._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.isArray,s.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function e(n,o){var a=i(this._values,this._promise);if(a instanceof t){var c=(a=a._target())._bitField;if(this._values=a,0==(50397184&c))return this._promise._setAsyncGuaranteed(),a._then(e,this._reject,void 0,this,o);if(0==(33554432&c))return 0!=(16777216&c)?this._reject(a._reason()):this._cancel();a=a._value()}if(null!==(a=s.asArray(a)))0!==a.length?this._iterate(a):-5===o?this._resolveEmptyArray():this._resolve(function(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}(o));else{var l=r("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(l,!1)}},a.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var r=this._promise,o=!1,s=null,a=0;a<n;++a){var c=i(e[a],r);c instanceof t?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0==(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!=(33554432&s)?this._promiseFulfilled(c._value(),a):0!=(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||r._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(e){this._values=null,this._promise._fulfill(e)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},a.prototype._promiseFulfilled=function(e,t){this._values[t]=e;var n=++this._totalResolved;return n>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n<e.length;++n)e[n]instanceof t&&e[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(e){return e},a}},{"./util":36}],24:[function(e,t,n){"use strict";t.exports=function(t,n){var i={},r=e("./util"),o=e("./nodeback"),s=r.withAppended,a=r.maybeWrapAsError,c=r.canEvaluate,l=e("./errors").TypeError,u={__isPromisified__:!0},h=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),d=function(e){return r.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e};function f(e){return!h.test(e)}function p(e){try{return!0===e.__isPromisified__}catch(e){return!1}}function g(e,t,n){var i=r.getDataPropertyOrDefault(e,t+n,u);return!!i&&p(i)}function m(e,t,n,i){for(var o=r.inheritedDataKeys(e),s=[],a=0;a<o.length;++a){var c=o[a],u=e[c],h=i===d||d(c,u,e);"function"!=typeof u||p(u)||g(e,c,t)||!i(c,u,e,h)||s.push(c,u)}return function(e,t,n){for(var i=0;i<e.length;i+=2){var r=e[i];if(n.test(r))for(var o=r.replace(n,""),s=0;s<e.length;s+=2)if(e[s]===o)throw new l("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",t))}}(s,t,n),s}var v=function(e){return e.replace(/([$])/,"\\$")},y=c?void 0:function(e,c,l,u,h,d){var f=function(){return this}(),p=e;function g(){var r=c;c===i&&(r=this);var l=new t(n);l._captureStackTrace();var u="string"==typeof p&&this!==f?this[p]:e,h=o(l,d);try{u.apply(r,s(arguments,h))}catch(e){l._rejectCallback(a(e),!0,!0)}return l._isFateSealed()||l._setAsyncGuaranteed(),l}return"string"==typeof p&&(e=u),r.notEnumerableProp(g,"__isPromisified__",!0),g};function b(e,t,n,o,s){for(var a=new RegExp(v(t)+"$"),c=m(e,t,a,n),l=0,u=c.length;l<u;l+=2){var h=c[l],d=c[l+1],f=h+t;if(o===y)e[f]=y(h,i,h,d,t,s);else{var p=o(d,function(){return y(h,i,h,d,t,s)});r.notEnumerableProp(p,"__isPromisified__",!0),e[f]=p}}return r.toFastProperties(e),e}t.promisify=function(e,t){if("function"!=typeof e)throw new l("expecting a function but got "+r.classString(e));if(p(e))return e;var n=void 0===(t=Object(t)).context?i:t.context,o=!!t.multiArgs,s=function(e,t,n){return y(e,t,void 0,e,null,n)}(e,n,o);return r.copyDescriptors(e,s,f),s},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new l("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var n=!!(t=Object(t)).multiArgs,i=t.suffix;"string"!=typeof i&&(i="Async");var o=t.filter;"function"!=typeof o&&(o=d);var s=t.promisifier;if("function"!=typeof s&&(s=y),!r.isIdentifier(i))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=r.inheritedDataKeys(e),c=0;c<a.length;++c){var u=e[a[c]];"constructor"!==a[c]&&r.isClass(u)&&(b(u.prototype,i,o,s,n),b(u,i,o,s,n))}return b(e,i,o,s,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(e,t,n){"use strict";t.exports=function(t,n,i,r){var o,s=e("./util"),a=s.isObject,c=e("./es5");"function"==typeof Map&&(o=Map);var l=function(){var e=0,t=0;function n(n,i){this[e]=n,this[e+t]=i,e++}return function(i){t=i.size,e=0;var r=new Array(2*i.size);return i.forEach(n,r),r}}();function u(e){var t,n=!1;if(void 0!==o&&e instanceof o)t=l(e),n=!0;else{var i=c.keys(e),r=i.length;t=new Array(2*r);for(var s=0;s<r;++s){var a=i[s];t[s]=e[a],t[s+r]=a}}this.constructor$(t),this._isMap=n,this._init$(void 0,n?-6:-3)}function h(e){var n,o=i(e);return a(o)?(n=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new u(o).promise(),o instanceof t&&n._propagateFrom(o,2),n):r("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}s.inherits(u,n),u.prototype._init=function(){},u.prototype._promiseFulfilled=function(e,t){this._values[t]=e;var n=++this._totalResolved;if(n>=this._length){var i;if(this._isMap)i=function(e){for(var t=new o,n=e.length/2|0,i=0;i<n;++i){var r=e[n+i],s=e[i];t.set(r,s)}return t}(this._values);else{i={};for(var r=this.length(),s=0,a=this.length();s<a;++s)i[this._values[s+r]]=this._values[s]}return this._resolve(i),!0}return!1},u.prototype.shouldCopyValues=function(){return!1},u.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return h(this)},t.props=function(e){return h(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,n){"use strict";function i(e){this._capacity=e,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(e){return this._capacity<e},i.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1);var n=this._front+t&this._capacity-1;this[n]=e,this._length=t+1},i.prototype.push=function(e,t,n){var i=this.length()+3;if(this._willBeOverCapacity(i))return this._pushOne(e),this._pushOne(t),void this._pushOne(n);var r=this._front+i-3;this._checkCapacity(i);var o=this._capacity-1;this[r+0&o]=e,this[r+1&o]=t,this[r+2&o]=n,this._length=i},i.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e;var n=this._front,i=this._length,r=n+i&t-1;!function(e,t,n,i,r){for(var o=0;o<r;++o)n[o+i]=e[o+t],e[o+t]=void 0}(this,0,this,t,r)},t.exports=i},{}],27:[function(e,t,n){"use strict";t.exports=function(t,n,i,r){var o=e("./util"),s=function(e){return e.then(function(t){return a(t,e)})};function a(e,a){var c=i(e);if(c instanceof t)return s(c);if(null===(e=o.asArray(e)))return r("expecting an array or an iterable object but got "+o.classString(e));var l=new t(n);void 0!==a&&l._propagateFrom(a,3);for(var u=l._fulfill,h=l._reject,d=0,f=e.length;d<f;++d){var p=e[d];(void 0!==p||d in e)&&t.cast(p)._then(u,h,void 0,l,null)}return l}t.race=function(e){return a(e,void 0)},t.prototype.race=function(){return a(this,void 0)}}},{"./util":36}],28:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o,s){var a=t._getDomain,c=e("./util"),l=c.tryCatch;function u(e,n,i,r){this.constructor$(e);var s=a();this._fn=null===s?n:c.domainBind(s,n),void 0!==i&&(i=t.resolve(i))._attachCancellationCallback(this),this._initialValue=i,this._currentCancellable=null,this._eachValues=r===o?Array(this._length):0===r?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function h(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function d(e,t,n,r){if("function"!=typeof t)return i("expecting a function but got "+c.classString(t));var o=new u(e,t,n,r);return o.promise()}function f(e){this.accum=e,this.array._gotAccum(e);var n=r(this.value,this.array._promise);return n instanceof t?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(e){var n,i=this.array,r=i._promise,o=l(i._fn);r._pushContext(),(n=void 0!==i._eachValues?o.call(r._boundValue(),e,this.index,this.length):o.call(r._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(i._currentCancellable=n);var a=r._popContext();return s.checkForgottenReturns(n,a,void 0!==i._eachValues?"Promise.each":"Promise.reduce",r),n}c.inherits(u,n),u.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==o&&this._eachValues.push(e)},u.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},u.prototype._init=function(){},u.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},u.prototype.shouldCopyValues=function(){return!1},u.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},u.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},u.prototype._iterate=function(e){var n,i;this._values=e;var r=e.length;if(void 0!==this._initialValue?(n=this._initialValue,i=0):(n=t.resolve(e[0]),i=1),this._currentCancellable=n,!n.isRejected())for(;i<r;++i){var o={accum:null,value:e[i],index:i,length:r,array:this};n=n._then(f,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(h,h,void 0,n,this)},t.prototype.reduce=function(e,t){return d(this,e,t,null)},t.reduce=function(e,t,n,i){return d(e,t,n,i)}}},{"./util":36}],29:[function(e,r,o){"use strict";var s,a,c,l,u,h=e("./util"),d=h.getNativePromise();if(h.isNode&&"undefined"==typeof MutationObserver){var f=n.setImmediate,p=t.nextTick;s=h.isRecentNode?function(e){f.call(n,e)}:function(e){p.call(t,e)}}else if("function"==typeof d&&"function"==typeof d.resolve){var g=d.resolve();s=function(e){g.then(e)}}else s="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?void 0!==i?function(e){i(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}:(a=document.createElement("div"),c={attributes:!0},l=!1,u=document.createElement("div"),new MutationObserver(function(){a.classList.toggle("foo"),l=!1}).observe(u,c),function(e){var t=new MutationObserver(function(){t.disconnect(),e()});t.observe(a,c),l||(l=!0,u.classList.toggle("foo"))});r.exports=s},{"./util":36}],30:[function(e,t,n){"use strict";t.exports=function(t,n,i){var r=t.PromiseInspection,o=e("./util");function s(e){this.constructor$(e)}o.inherits(s,n),s.prototype._promiseResolved=function(e,t){this._values[e]=t;var n=++this._totalResolved;return n>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseFulfilled=function(e,t){var n=new r;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},s.prototype._promiseRejected=function(e,t){var n=new r;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return i.deprecated(".settle()",".reflect()"),new s(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,n){"use strict";t.exports=function(t,n,i){var r=e("./util"),o=e("./errors").RangeError,s=e("./errors").AggregateError,a=r.isArray,c={};function l(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function u(e,t){if((0|t)!==t||t<0)return i("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new l(e),r=n.promise();return n.setHowMany(t),n.init(),r}r.inherits(l,n),l.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=a(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},l.prototype.init=function(){this._initialized=!0,this._init()},l.prototype.setUnwrap=function(){this._unwrap=!0},l.prototype.howMany=function(){return this._howMany},l.prototype.setHowMany=function(e){this._howMany=e},l.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},l.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},l.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},l.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new s,t=this.length();t<this._values.length;++t)this._values[t]!==c&&e.push(this._values[t]);return e.length>0?this._reject(e):this._cancel(),!0}return!1},l.prototype._fulfilled=function(){return this._totalResolved},l.prototype._rejected=function(){return this._values.length-this.length()},l.prototype._addRejected=function(e){this._values.push(e)},l.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},l.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},l.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)},l.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return u(e,t)},t.prototype.some=function(e){return u(this,e)},t._SomePromiseArray=l}},{"./errors":12,"./util":36}],32:[function(e,t,n){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return s.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return r.call(this._target())},e.prototype.isResolved=function(){return a.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),i.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,n){"use strict";t.exports=function(t,n){var i=e("./util"),r=i.errorObj,o=i.isObject,s={}.hasOwnProperty;return function(e,a){if(o(e)){if(e instanceof t)return e;var c=function(e){try{return function(e){return e.then}(e)}catch(e){return r.e=e,r}}(e);if(c===r){a&&a._pushContext();var l=t.reject(c.e);return a&&a._popContext(),l}if("function"==typeof c){if(function(e){try{return s.call(e,"_promise0")}catch(e){return!1}}(e)){var l=new t(n);return e._then(l._fulfill,l._reject,void 0,l,null),l}return function(e,o,s){var a=new t(n),c=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var l=!0,u=i.tryCatch(o).call(e,function(e){a&&(a._resolveCallback(e),a=null)},function(e){a&&(a._rejectCallback(e,l,!0),a=null)});return l=!1,a&&u===r&&(a._rejectCallback(u.e,!0,!0),a=null),c}(e,c,a)}}return e}}},{"./util":36}],34:[function(e,t,n){"use strict";t.exports=function(t,n,i){var r=e("./util"),o=t.TimeoutError;function s(e){this.handle=e}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(e){return c(+this).thenReturn(e)},c=t.delay=function(e,r){var o,c;return void 0!==r?(o=t.resolve(r)._then(a,null,null,e,void 0),i.cancellation()&&r instanceof t&&o._setOnCancel(r)):(o=new t(n),c=setTimeout(function(){o._fulfill()},+e),i.cancellation()&&o._setOnCancel(new s(c)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};function l(e){return clearTimeout(this.handle),e}function u(e){throw clearTimeout(this.handle),e}t.prototype.delay=function(e){return c(e,this)},t.prototype.timeout=function(e,t){var n,a;e=+e;var c=new s(setTimeout(function(){n.isPending()&&function(e,t,n){var i;i="string"!=typeof t?t instanceof Error?t:new o("operation timed out"):new o(t),r.markAsOriginatingFromRejection(i),e._attachExtraTrace(i),e._reject(i),null!=n&&n.cancel()}(n,t,a)},e));return i.cancellation()?(a=this.then(),(n=a._then(l,u,void 0,c,void 0))._setOnCancel(c)):n=this._then(l,u,void 0,c,void 0),n}}},{"./util":36}],35:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o,s){var a=e("./util"),c=e("./errors").TypeError,l=e("./util").inherits,u=a.errorObj,h=a.tryCatch,d={};function f(e){setTimeout(function(){throw e},0)}function p(e,n){var r=0,s=e.length,a=new t(o);return function o(){if(r>=s)return a._fulfill();var c=function(e){var t=i(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}(e[r++]);if(c instanceof t&&c._isDisposable()){try{c=i(c._getDisposer().tryDispose(n),e.promise)}catch(e){return f(e)}if(c instanceof t)return c._then(o,f,null,null,null)}o()}(),a}function g(e,t,n){this._data=e,this._promise=t,this._context=n}function m(e,t,n){this.constructor$(e,t,n)}function v(e){return g.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function y(e){this.length=e,this.promise=null,this[e-1]=null}g.prototype.data=function(){return this._data},g.prototype.promise=function(){return this._promise},g.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():d},g.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var i=t!==d?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,i},g.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},l(m,g),m.prototype.doDispose=function(e,t){var n=this.data();return n.call(e,e,t)},y.prototype._resultCancelled=function(){for(var e=this.length,n=0;n<e;++n){var i=this[n];i instanceof t&&i.cancel()}},t.using=function(){var e=arguments.length;if(e<2)return n("you must pass at least 2 arguments to Promise.using");var r,o=arguments[e-1];if("function"!=typeof o)return n("expecting a function but got "+a.classString(o));var c=!0;2===e&&Array.isArray(arguments[0])?(r=arguments[0],e=r.length,c=!1):(r=arguments,e--);for(var l=new y(e),d=0;d<e;++d){var f=r[d];if(g.isDisposer(f)){var m=f;(f=f.promise())._setDisposable(m)}else{var b=i(f);b instanceof t&&(f=b._then(v,null,null,{resources:l,index:d},void 0))}l[d]=f}for(var w=new Array(l.length),d=0;d<w.length;++d)w[d]=t.resolve(l[d]).reflect();var x=t.all(w).then(function(e){for(var t=0;t<e.length;++t){var n=e[t];if(n.isRejected())return u.e=n.error(),u;if(!n.isFulfilled())return void x.cancel();e[t]=n.value()}_._pushContext(),o=h(o);var i=c?o.apply(void 0,e):o(e),r=_._popContext();return s.checkForgottenReturns(i,r,"Promise.using",_),i}),_=x.lastly(function(){var e=new t.PromiseInspection(x);return p(l,e)});return l.promise=_,_._setOnCancel(l),_},t.prototype._setDisposable=function(e){this._bitField=131072|this._bitField,this._disposer=e},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new m(e,this,r());throw new c}}},{"./errors":12,"./util":36}],36:[function(e,i,r){"use strict";var o=e("./es5"),s="undefined"==typeof navigator,a={e:{}},c,l="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:void 0!==this?this:null;function u(){try{var e=c;return c=null,e.apply(this,arguments)}catch(e){return a.e=e,a}}function h(e){return c=e,u}var d=function(e,t){var n={}.hasOwnProperty;function i(){for(var i in this.constructor=e,this.constructor$=t,t.prototype)n.call(t.prototype,i)&&"$"!==i.charAt(i.length-1)&&(this[i+"$"]=t.prototype[i])}return i.prototype=t.prototype,e.prototype=new i,e.prototype};function f(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function p(e){return"function"==typeof e||"object"==typeof e&&null!==e}function g(e){return f(e)?new Error(S(e)):e}function m(e,t){var n,i=e.length,r=new Array(i+1);for(n=0;n<i;++n)r[n]=e[n];return r[n]=t,r}function v(e,t,n){if(!o.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var i=Object.getOwnPropertyDescriptor(e,t);return null!=i?null==i.get&&null==i.set?i.value:n:void 0}function y(e,t,n){if(f(e))return e;var i={value:n,configurable:!0,enumerable:!1,writable:!0};return o.defineProperty(e,t,i),e}function b(e){throw e}var w=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1};if(o.isES5){var n=Object.getOwnPropertyNames;return function(e){for(var i=[],r=Object.create(null);null!=e&&!t(e);){var s;try{s=n(e)}catch(e){return i}for(var a=0;a<s.length;++a){var c=s[a];if(!r[c]){r[c]=!0;var l=Object.getOwnPropertyDescriptor(e,c);null!=l&&null==l.get&&null==l.set&&i.push(c)}}e=o.getPrototypeOf(e)}return i}}var i={}.hasOwnProperty;return function(n){if(t(n))return[];var r=[];e:for(var o in n)if(i.call(n,o))r.push(o);else{for(var s=0;s<e.length;++s)if(i.call(e[s],o))continue e;r.push(o)}return r}}(),x=/this\s*\.\s*\S+\s*=/;function _(e){try{if("function"==typeof e){var t=o.names(e.prototype),n=o.isES5&&t.length>1,i=t.length>0&&!(1===t.length&&"constructor"===t[0]),r=x.test(e+"")&&o.names(e).length>0;if(n||i||r)return!0}return!1}catch(e){return!1}}function k(e){function t(){}t.prototype=e;for(var n=8;n--;)new t;return e}var C=/^[a-z$_][a-z$_0-9]*$/i;function E(e){return C.test(e)}function A(e,t,n){for(var i=new Array(e),r=0;r<e;++r)i[r]=t+r+n;return i}function S(e){try{return e+""}catch(e){return"[no string representation]"}}function F(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function T(e){try{y(e,"isOperational",!0)}catch(e){}}function D(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)}function L(e){return F(e)&&o.propertyIsWritable(e,"stack")}var P="stack"in new Error?function(e){return L(e)?e:new Error(S(e))}:function(e){if(L(e))return e;try{throw new Error(S(e))}catch(e){return e}};function R(e){return{}.toString.call(e)}function M(e,t,n){for(var i=o.names(e),r=0;r<i.length;++r){var s=i[r];if(n(s))try{o.defineProperty(t,s,o.getDescriptor(e,s))}catch(e){}}}var B=function(e){return o.isArray(e)?e:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var O="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,n=[],i=e[Symbol.iterator]();!(t=i.next()).done;)n.push(t.value);return n};B=function(e){return o.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?O(e):null}}var j=void 0!==t&&"[object process]"===R(t).toLowerCase(),I=void 0!==t&&void 0!==t.env;function $(e){return I?t.env[e]:void 0}function N(){if("function"==typeof Promise)try{var e=new Promise(function(){});if("[object Promise]"==={}.toString.call(e))return Promise}catch(e){}}function W(e,t){return e.bind(t)}var z={isClass:_,isIdentifier:E,inheritedDataKeys:w,getDataPropertyOrDefault:v,thrower:b,isArray:o.isArray,asArray:B,notEnumerableProp:y,isPrimitive:f,isObject:p,isError:F,canEvaluate:s,errorObj:a,tryCatch:h,inherits:d,withAppended:m,maybeWrapAsError:g,toFastProperties:k,filledRange:A,toString:S,canAttachTrace:L,ensureErrorObject:P,originatesFromRejection:D,markAsOriginatingFromRejection:T,classString:R,copyDescriptors:M,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:j,hasEnvVariables:I,env:$,global:l,getNativePromise:N,domainBind:W},H;z.isRecentNode=z.isNode&&(H=t.versions.node.split(".").map(Number),0===H[0]&&H[1]>10||H[0]>0),z.isNode&&z.toFastProperties(t);try{throw new Error}catch(e){z.lastLineError=e}i.exports=z},{"./es5":13}]},{},[4])(4)}(),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,n(70),n(52),n(134).setImmediate)},function(e,t,n){"use strict";var i=n(113);function r(e){i.call(this,e)}n(42).inherits(r,i),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";var i=n(42);function r(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}r.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return i.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=r},function(e,t,n){"use strict";var i=n(112);function r(e){i.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}n(42).inherits(r,i),r.prototype.byteAt=function(e){return this.data[this.zero+e]},r.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),i=e.charCodeAt(2),r=e.charCodeAt(3),o=this.length-4;o>=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===i&&this.data[o+3]===r)return o-this.zero;return-1},r.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),i=e.charCodeAt(2),r=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&i===o[2]&&r===o[3]},r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";var i=n(42),r=n(56),o=n(113),s=n(188),a=n(187),c=n(111);e.exports=function(e){var t=i.getTypeOf(e);return i.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new a(e):r.uint8array?new c(i.transformTo("uint8array",e)):new o(i.transformTo("array",e)):new s(e)}},function(e,t,n){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,n){"use strict";var i=n(55),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var s=new i.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function c(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",s=0;s<t;s++)n+=String.fromCharCode(e[s]);return n}s[254]=s[254]=1,t.string2buf=function(e){var t,n,r,o,s,a=e.length,c=0;for(o=0;o<a;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(c),s=0,o=0;s<c;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[s++]=n:n<2048?(t[s++]=192|n>>>6,t[s++]=128|63&n):n<65536?(t[s++]=224|n>>>12,t[s++]=128|n>>>6&63,t[s++]=128|63&n):(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63,t[s++]=128|n>>>6&63,t[s++]=128|63&n);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,i,r,o,a=t||e.length,l=new Array(2*a);for(i=0,n=0;n<a;)if((r=e[n++])<128)l[i++]=r;else if((o=s[r])>4)l[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<a;)r=r<<6|63&e[n++],o--;o>1?l[i++]=65533:r<65536?l[i++]=r:(r-=65536,l[i++]=55296|r>>10&1023,l[i++]=56320|1023&r)}return c(l,i)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+s[e[n]]>t?n:t}},function(e,t,n){"use strict";var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,t,n,r){var o=i,s=r+n;e^=-1;for(var a=r;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}},function(e,t,n){"use strict";e.exports=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,s=0;0!==n;){n-=s=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--s);r%=65521,o%=65521}return r|o<<16|0}},function(e,t,n){"use strict";var i=n(50);t.STORE={magic:"\0\0",compressWorker:function(e){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},t.DEFLATE=n(202)},function(e,t,n){"use strict";var i=n(50),r=n(90);function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n(42).inherits(o,i),o.prototype.processChunk=function(e){this.streamInfo.crc32=r(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=o},function(e,t,n){"use strict";var i=n(42),r=n(50);function o(e){r.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}i.inherits(o,r),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}r.prototype.processChunk.call(this,e)},e.exports=o},function(e,t,n){"use strict";var i=n(42),r=n(50);function o(e){r.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=i.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}i.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},function(e,t,n){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},function(e,t,n){"use strict";(function(t){var i=n(42),r=n(206),o=n(50),s=n(131),a=n(56),c=n(68),l=null;if(a.nodestream)try{l=n(205)}catch(e){}function u(e,n){return new c.Promise(function(r,o){var a=[],c=e._internalType,l=e._outputType,u=e._mimeType;e.on("data",function(e,t){a.push(e),n&&n(t)}).on("error",function(e){a=[],o(e)}).on("end",function(){try{var e=function(e,t,n){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),n);case"base64":return s.encode(t);default:return i.transformTo(e,t)}}(l,function(e,n){var i,r=0,o=null,s=0;for(i=0;i<n.length;i++)s+=n[i].length;switch(e){case"string":return n.join("");case"array":return Array.prototype.concat.apply([],n);case"uint8array":for(o=new Uint8Array(s),i=0;i<n.length;i++)o.set(n[i],r),r+=n[i].length;return o;case"nodebuffer":return t.concat(n);default:throw new Error("concat : unsupported type '"+e+"'")}}(c,a),u);r(e)}catch(e){o(e)}a=[]}).resume()})}function h(e,t,n){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=n,i.checkSupport(s),this._worker=e.pipe(new r(s)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}h.prototype={accumulate:function(e){return u(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){i.delay(t,arguments,n)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:"nodebuffer"!==this._outputType},e)}},e.exports=h}).call(this,n(71).Buffer)},function(e,t,n){var i=n(93),r=n(80).document,o=i(r)&&i(r.createElement);e.exports=function(e){return o?r.createElement(e):{}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var i=n(219);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n=e.exports={version:"2.3.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var i=n(42),r=n(56),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.encode=function(e){for(var t,n,r,s,a,c,l,u=[],h=0,d=e.length,f=d,p="string"!==i.getTypeOf(e);h<e.length;)f=d-h,p?(t=e[h++],n=h<d?e[h++]:0,r=h<d?e[h++]:0):(t=e.charCodeAt(h++),n=h<d?e.charCodeAt(h++):0,r=h<d?e.charCodeAt(h++):0),s=t>>2,a=(3&t)<<4|n>>4,c=f>1?(15&n)<<2|r>>6:64,l=f>2?63&r:64,u.push(o.charAt(s)+o.charAt(a)+o.charAt(c)+o.charAt(l));return u.join("")},t.decode=function(e){var t,n,i,s,a,c,l=0,u=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var h,d=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&d--,e.charAt(e.length-2)===o.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=r.uint8array?new Uint8Array(0|d):new Array(0|d);l<e.length;)t=o.indexOf(e.charAt(l++))<<2|(s=o.indexOf(e.charAt(l++)))>>4,n=(15&s)<<4|(a=o.indexOf(e.charAt(l++)))>>2,i=(3&a)<<6|(c=o.indexOf(e.charAt(l++))),h[u++]=t,64!==a&&(h[u++]=n),64!==c&&(h[u++]=i);return h}},function(e,t,n){"use strict";e.exports=o;var i=n(61),r=n(69);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e),this._transformState={afterTransform:function(e,t){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),i(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){a(e,t,n)}):a(this,null,null)}function a(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}r.inherits=n(66),r.inherits(o,i),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,n){var i=this._transformState;if(i.writecb=n,i.writechunk=e,i.writeencoding=t,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var n=this;i.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";var i=n(82).Buffer,r=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===r||!r(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>".repeat(n+2)}}(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>".repeat(this.lastTotal-this.lastNeed):t},o.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var r=s(t[i]);if(r>=0)return r>0&&(e.lastNeed=r-1),r;if(--i<n)return 0;if((r=s(t[i]))>=0)return r>0&&(e.lastNeed=r-2),r;if(--i<n)return 0;if((r=s(t[i]))>=0)return r>0&&(2===r?r=0:e.lastNeed=r-3),r;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(229),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(52))},function(e,t,n){"use strict";var i=n(83).nextTick;function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||i(r,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(i(r,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},,,function(e,t,n){e.exports=n(96).EventEmitter},function(e,t,n){"use strict";(function(t,i){var r=n(83).nextTick;e.exports=b;var o,s=n(141);b.ReadableState=y;n(96).EventEmitter;var a=function(e,t){return e.listeners(t).length},c=n(138),l=n(82).Buffer,u=t.Uint8Array||function(){};var h=n(69);h.inherits=n(66);var d=n(137),f=void 0;f=d&&d.debuglog?d.debuglog("stream"):function(){};var p,g=n(230),m=n(135);h.inherits(b,c);var v=["error","close","destroy","pause","resume"];function y(e,t){o=o||n(61),e=e||{};var i=t instanceof o;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(133).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function b(e){if(o=o||n(61),!(this instanceof b))return new b(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function w(e,t,n,i,r){var o,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,C(e)}(e,s)):(r||(o=function(e,t){var n;i=t,l.isBuffer(i)||i instanceof u||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var i;return n}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),i?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?x(e,s,t,!1):A(e,s)):x(e,s,t,!1))):i||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function x(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&C(e)),A(e,t)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(e,t){this.push(null),t(e)},b.prototype.push=function(e,t){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=l.from(e,t),t=""),n=!0),w(this,e,t,!1,n)},b.prototype.unshift=function(e){return w(this,e,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(e){return p||(p=n(133).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var _=8388608;function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?r(E,e):E(e))}function E(e){f("emit readable"),e.emit("readable"),D(e)}function A(e,t){t.readingMore||(t.readingMore=!0,r(S,e,t))}function S(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function F(e){f("readable nexttick read 0"),e.read(0)}function T(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var i;e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):i=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,i=1,r=n.data;e-=r.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?r+=o:r+=o.slice(0,e),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t):function(e,t){var n=l.allocUnsafe(e),i=t.head,r=1;i.data.copy(n),e-=i.data.length;for(;i=i.next;){var o=i.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),0===(e-=s)){s===o.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(s));break}++r}return t.length-=r,n}(e,t);return i}(e,t.buffer,t.decoder),n);var n}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,r(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}b.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):C(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&P(this),null;var i,r=t.needReadable;return f("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",r=!0),t.ended||t.reading?f("reading or ended",r=!1):r&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=k(n,t))),null===(i=e>0?L(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&P(this)),null!==i&&this.emit("data",i),i},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,f("pipe count=%d opts=%j",o.pipesCount,t);var c=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:b;function l(t,i){f("onunpipe"),t===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),e.removeListener("close",v),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",m),e.removeListener("unpipe",l),n.removeListener("end",u),n.removeListener("end",b),n.removeListener("data",g),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){f("onend"),e.end()}o.endEmitted?r(c):n.once("end",c),e.on("unpipe",l);var h=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,D(e))}}(n);e.on("drain",h);var d=!1;var p=!1;function g(t){f("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==M(o.pipes,e))&&!d&&(f("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function m(t){f("onerror",t),b(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",y),b()}function y(){f("onfinish"),e.removeListener("close",v),b()}function b(){f("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",m),e.once("close",v),e.once("finish",y),e.emit("pipe",n),o.flowing||(f("pipe resume"),n.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)i[o].emit("unpipe",this,n);return this}var s=M(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},b.prototype.on=function(e,t){var n=c.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&C(this):r(F,this))}return n},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r(T,e,t))}(this,e)),this},b.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var r in e.on("end",function(){if(f("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(r){(f("wrapped data"),n.decoder&&(r=n.decoder.write(r)),!n.objectMode||null!==r&&void 0!==r)&&((n.objectMode||r&&r.length)&&(t.push(r)||(i=!0,e.pause())))}),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o<v.length;o++)e.on(v[o],this.emit.bind(this,v[o]));return this._read=function(t){f("wrapped _read",t),i&&(i=!1,e.resume())},this},b._fromList=L}).call(this,n(52),n(70))},function(e,t,n){e.exports=n(231)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){!function(e){"use strict";function t(e){return"string"==typeof e?function(t){return t==e}:e||function(){return!0}}var n=function(e,t){this.node=e,this.state=t},i=Object.create||function(e){function t(){}return t.prototype=e,new t};function r(e,t,n){n(e,t)}function o(e,t,n){}var s={};s.Program=s.BlockStatement=function(e,t,n){for(var i=0,r=e.body;i<r.length;i+=1){var o=r[i];n(o,t,"Statement")}},s.Statement=r,s.EmptyStatement=o,s.ExpressionStatement=s.ParenthesizedExpression=function(e,t,n){return n(e.expression,t,"Expression")},s.IfStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Statement"),e.alternate&&n(e.alternate,t,"Statement")},s.LabeledStatement=function(e,t,n){return n(e.body,t,"Statement")},s.BreakStatement=s.ContinueStatement=o,s.WithStatement=function(e,t,n){n(e.object,t,"Expression"),n(e.body,t,"Statement")},s.SwitchStatement=function(e,t,n){n(e.discriminant,t,"Expression");for(var i=0,r=e.cases;i<r.length;i+=1){var o=r[i];o.test&&n(o.test,t,"Expression");for(var s=0,a=o.consequent;s<a.length;s+=1){var c=a[s];n(c,t,"Statement")}}},s.SwitchCase=function(e,t,n){e.test&&n(e.test,t,"Expression");for(var i=0,r=e.consequent;i<r.length;i+=1){var o=r[i];n(o,t,"Statement")}},s.ReturnStatement=s.YieldExpression=s.AwaitExpression=function(e,t,n){e.argument&&n(e.argument,t,"Expression")},s.ThrowStatement=s.SpreadElement=function(e,t,n){return n(e.argument,t,"Expression")},s.TryStatement=function(e,t,n){n(e.block,t,"Statement"),e.handler&&n(e.handler,t),e.finalizer&&n(e.finalizer,t,"Statement")},s.CatchClause=function(e,t,n){n(e.param,t,"Pattern"),n(e.body,t,"ScopeBody")},s.WhileStatement=s.DoWhileStatement=function(e,t,n){n(e.test,t,"Expression"),n(e.body,t,"Statement")},s.ForStatement=function(e,t,n){e.init&&n(e.init,t,"ForInit"),e.test&&n(e.test,t,"Expression"),e.update&&n(e.update,t,"Expression"),n(e.body,t,"Statement")},s.ForInStatement=s.ForOfStatement=function(e,t,n){n(e.left,t,"ForInit"),n(e.right,t,"Expression"),n(e.body,t,"Statement")},s.ForInit=function(e,t,n){"VariableDeclaration"==e.type?n(e,t):n(e,t,"Expression")},s.DebuggerStatement=o,s.FunctionDeclaration=function(e,t,n){return n(e,t,"Function")},s.VariableDeclaration=function(e,t,n){for(var i=0,r=e.declarations;i<r.length;i+=1){var o=r[i];n(o,t)}},s.VariableDeclarator=function(e,t,n){n(e.id,t,"Pattern"),e.init&&n(e.init,t,"Expression")},s.Function=function(e,t,n){e.id&&n(e.id,t,"Pattern");for(var i=0,r=e.params;i<r.length;i+=1){var o=r[i];n(o,t,"Pattern")}n(e.body,t,e.expression?"ScopeExpression":"ScopeBody")},s.ScopeBody=function(e,t,n){return n(e,t,"Statement")},s.ScopeExpression=function(e,t,n){return n(e,t,"Expression")},s.Pattern=function(e,t,n){"Identifier"==e.type?n(e,t,"VariablePattern"):"MemberExpression"==e.type?n(e,t,"MemberPattern"):n(e,t)},s.VariablePattern=o,s.MemberPattern=r,s.RestElement=function(e,t,n){return n(e.argument,t,"Pattern")},s.ArrayPattern=function(e,t,n){for(var i=0,r=e.elements;i<r.length;i+=1){var o=r[i];o&&n(o,t,"Pattern")}},s.ObjectPattern=function(e,t,n){for(var i=0,r=e.properties;i<r.length;i+=1){var o=r[i];n(o.value,t,"Pattern")}},s.Expression=r,s.ThisExpression=s.Super=s.MetaProperty=o,s.ArrayExpression=function(e,t,n){for(var i=0,r=e.elements;i<r.length;i+=1){var o=r[i];o&&n(o,t,"Expression")}},s.ObjectExpression=function(e,t,n){for(var i=0,r=e.properties;i<r.length;i+=1){var o=r[i];n(o,t)}},s.FunctionExpression=s.ArrowFunctionExpression=s.FunctionDeclaration,s.SequenceExpression=s.TemplateLiteral=function(e,t,n){for(var i=0,r=e.expressions;i<r.length;i+=1){var o=r[i];n(o,t,"Expression")}},s.UnaryExpression=s.UpdateExpression=function(e,t,n){n(e.argument,t,"Expression")},s.BinaryExpression=s.LogicalExpression=function(e,t,n){n(e.left,t,"Expression"),n(e.right,t,"Expression")},s.AssignmentExpression=s.AssignmentPattern=function(e,t,n){n(e.left,t,"Pattern"),n(e.right,t,"Expression")},s.ConditionalExpression=function(e,t,n){n(e.test,t,"Expression"),n(e.consequent,t,"Expression"),n(e.alternate,t,"Expression")},s.NewExpression=s.CallExpression=function(e,t,n){if(n(e.callee,t,"Expression"),e.arguments)for(var i=0,r=e.arguments;i<r.length;i+=1){var o=r[i];n(o,t,"Expression")}},s.MemberExpression=function(e,t,n){n(e.object,t,"Expression"),e.computed&&n(e.property,t,"Expression")},s.ExportNamedDeclaration=s.ExportDefaultDeclaration=function(e,t,n){e.declaration&&n(e.declaration,t,"ExportNamedDeclaration"==e.type||e.declaration.id?"Statement":"Expression"),e.source&&n(e.source,t,"Expression")},s.ExportAllDeclaration=function(e,t,n){n(e.source,t,"Expression")},s.ImportDeclaration=function(e,t,n){for(var i=0,r=e.specifiers;i<r.length;i+=1){var o=r[i];n(o,t)}n(e.source,t,"Expression")},s.ImportSpecifier=s.ImportDefaultSpecifier=s.ImportNamespaceSpecifier=s.Identifier=s.Literal=o,s.TaggedTemplateExpression=function(e,t,n){n(e.tag,t,"Expression"),n(e.quasi,t,"Expression")},s.ClassDeclaration=s.ClassExpression=function(e,t,n){return n(e,t,"Class")},s.Class=function(e,t,n){e.id&&n(e.id,t,"Pattern"),e.superClass&&n(e.superClass,t,"Expression");for(var i=0,r=e.body.body;i<r.length;i+=1){var o=r[i];n(o,t)}},s.MethodDefinition=s.Property=function(e,t,n){e.computed&&n(e.key,t,"Expression"),n(e.value,t,"Expression")},e.simple=function(t,n,i,r,o){i||(i=e.base),function e(t,r,o){var s=o||t.type,a=n[s];i[s](t,r,e),a&&a(t,r)}(t,r,o)},e.ancestor=function(t,n,i,r){i||(i=e.base);var o=[];!function e(t,r,s){var a=s||t.type,c=n[a],l=t!=o[o.length-1];l&&o.push(t),i[a](t,r,e),c&&c(t,r||o,o),l&&o.pop()}(t,r)},e.recursive=function(t,n,i,r,o){var s=i?e.make(i,r):r;!function e(t,n,i){s[i||t.type](t,n,e)}(t,n,o)},e.full=function(t,n,i,r,o){i||(i=e.base),function e(t,r,o){var s=o||t.type;i[s](t,r,e),o||n(t,r,s)}(t,r,o)},e.fullAncestor=function(t,n,i,r){i||(i=e.base);var o=[];!function e(t,r,s){var a=s||t.type,c=t!=o[o.length-1];c&&o.push(t),i[a](t,r,e),s||n(t,r||o,o,a),c&&o.pop()}(t,r)},e.findNodeAt=function(i,r,o,s,a,c){s=t(s),a||(a=e.base);try{!function e(t,i,c){var l=c||t.type;if((null==r||t.start<=r)&&(null==o||t.end>=o)&&a[l](t,i,e),(null==r||t.start==r)&&(null==o||t.end==o)&&s(l,t))throw new n(t,i)}(i,c)}catch(e){if(e instanceof n)return e;throw e}},e.findNodeAround=function(i,r,o,s,a){o=t(o),s||(s=e.base);try{!function e(t,i,a){var c=a||t.type;if(!(t.start>r||t.end<r)&&(s[c](t,i,e),o(c,t)))throw new n(t,i)}(i,a)}catch(e){if(e instanceof n)return e;throw e}},e.findNodeAfter=function(i,r,o,s,a){o=t(o),s||(s=e.base);try{!function e(t,i,a){if(!(t.end<r)){var c=a||t.type;if(t.start>=r&&o(c,t))throw new n(t,i);s[c](t,i,e)}}(i,a)}catch(e){if(e instanceof n)return e;throw e}},e.findNodeBefore=function(i,r,o,s,a){var c;return o=t(o),s||(s=e.base),function e(t,i,a){if(!(t.start>r)){var l=a||t.type;t.end<=r&&(!c||c.node.end<t.end)&&o(l,t)&&(c=new n(t,i)),s[l](t,i,e)}}(i,a),c},e.make=function(t,n){n||(n=e.base);var r=i(n);for(var o in t)r[o]=t[o];return r},e.base=s,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),s=e("./range").Range,a=e("./anchor").Anchor,c=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,u=s.comparePoints,h=function(){this.snippetMap={},this.snippetNameMap={}};(function(){i.implement(this,r),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return h.$tokenizer=new l({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length?e=i:-1!="`$\\".indexOf(i)?e=i:n.inFormatString&&("n"==i?e="\n":"t"==i?e="\n":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1),0,i);return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var i=n[0];return i.fmtString=e,e=this.splitRegex.exec(e),i.guard=e[1],i.fmt=e[2],i.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),h.prototype.getTokenizer=function(){return h.$tokenizer},h.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var i=e.session;switch(t){case"CURRENT_WORD":var r=i.getWordRange();case"SELECTION":case"SELECTED_TEXT":return i.getTextRange(r);case"CURRENT_LINE":return i.getLine(e.getCursorPosition().row);case"PREV_LINE":return i.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return i.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return i.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gi]/,""));var o=this.tokenizeTmSnippet(t.fmt,"formatString"),s=this,a=e.replace(r,function(){s.variables.__=arguments;for(var e=s.resolveVariables(o,n),t="E",i=0;i<e.length;i++){var r=e[i];if("object"==typeof r)if(e[i]="",r.changeCase&&r.local){var a=e[i+1];a&&"string"==typeof a&&("u"==r.changeCase?e[i]=a[0].toUpperCase():e[i]=a[0].toLowerCase(),e[i+1]=a.substr(1))}else r.changeCase&&(t=r.changeCase);else"U"==t?e[i]=r.toUpperCase():"L"==t&&(e[i]=r.toLowerCase())}return e.join("")});return this.variables.__=null,a},this.resolveVariables=function(e,t){for(var n=[],i=0;i<e.length;i++){var r=e[i];if("string"==typeof r)n.push(r);else{if("object"!=typeof r)continue;if(r.skip)s(r);else{if(r.processed<i)continue;if(r.text){var o=this.getVariableValue(t,r.text);o&&r.fmtString&&(o=this.tmStrFormat(o,r)),r.processed=i,null==r.expectIf?o&&(n.push(o),s(r)):o?r.skip=r.elseBranch:s(r)}else null!=r.tabstopId?n.push(r):null!=r.changeCase&&n.push(r)}}}function s(t){var n=e.indexOf(t,i+1);-1!=n&&(i=n)}return n},this.insertSnippetForSelection=function(e,t){var n=e.getCursorPosition(),i=e.session.getLine(n.row),r=e.session.getTabString(),o=i.match(/^\s*/)[0];n.column<o.length&&(o=o.slice(0,n.column)),t=t.replace(/\r/g,"");var s=this.tokenizeTmSnippet(t),a=[];(s=(s=this.resolveVariables(s,e)).map(function(e){return"\n"==e?e+o:"string"==typeof e?e.replace(/\t/g,r):e})).forEach(function(e,t){if("object"==typeof e){var n=e.tabstopId,i=a[n];if(i||((i=a[n]=[]).index=n,i.value=""),-1===i.indexOf(e)){i.push(e);var r=s.indexOf(e,t+1);if(-1!==r){var o=s.slice(t+1,r);o.some(function(e){return"object"==typeof e})&&!i.value?i.value=o:!o.length||i.value&&"string"==typeof i.value||(i.value=o.join(""))}}}}),a.forEach(function(e){e.length=0});var c={};function l(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if("object"==typeof i){if(c[i.tabstopId])continue;i=t[e.lastIndexOf(i,n-1)]||{tabstopId:i.tabstopId}}t[n]=i}return t}for(var u=0;u<s.length;u++){var h=s[u];if("object"==typeof h){var f=h.tabstopId,p=s.indexOf(h,u+1);if(c[f])c[f]===h&&(c[f]=null);else{var g=a[f],m="string"==typeof g.value?[g.value]:l(g.value);m.unshift(u+1,Math.max(0,p-u)),m.push(h),c[f]=h,s.splice.apply(s,m),-1===g.indexOf(h)&&g.push(h)}}}var v=0,y=0,b="";s.forEach(function(e){if("string"==typeof e){var t=e.split("\n");t.length>1?(y=t[t.length-1].length,v+=t.length-1):y+=e.length,b+=e}else e.start?e.end={row:v,column:y}:e.start={row:v,column:y}});var w=e.getSelectionRange(),x=e.session.replace(w,b),_=new d(e),k=e.inVirtualSelectionMode&&e.selection.index;_.addTabstops(a,w.start,x,k)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection(function(){n.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var n=e.getCursorPosition(),i=e.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?t="javascript":"css-"==i.substring(0,4)?t="css":"php-"==i.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],i=this.snippetMap;return i[t]&&i[t].includeScopes&&n.push.apply(n,i[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,i=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return i&&e.tabstopManager&&e.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(e,t){var n,i=e.getCursorPosition(),r=e.session.getLine(i.row),o=r.substring(0,i.column),s=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,o,s)),!!n},this),!!n&&(!(!t||!t.dryRun)||(e.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null,!0))},this.findMatchingSnippet=function(e,t,n){for(var i=e.length;i--;){var r=e[i];if((!r.startRe||r.startRe.test(t))&&((!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe)))return r.matchBefore=r.startRe?r.startRe.exec(t):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(t)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var n=this.snippetMap,i=this.snippetNameMap,r=this;function s(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function a(e,t,n){return e=s(e),t=s(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function c(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],i[t]={});var s=i[t];if(e.name){var c=s[e.name];c&&r.unregister(c),s[e.name]=e}n[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=o.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}e||(e=[]),e&&e.content?c(e):Array.isArray(e)&&e.forEach(c),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var n=this.snippetMap,i=this.snippetNameMap;function r(e){var r=i[e.scope||t];if(r&&r[e.name]){delete r[e.name];var o=n[e.scope||t],s=o&&o.indexOf(e);s>=0&&o.splice(s,1)}}e.content?r(e):Array.isArray(e)&&e.forEach(r)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(e){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var o=t[2],s=t[3];if("regex"==o){var a=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=a.exec(s)[1],i.trigger=a.exec(s)[1],i.endTrigger=a.exec(s)[1],i.endGuard=a.exec(s)[1]}else"snippet"==o?(i.tabTrigger=s.match(/^\S*/)[0],i.name||(i.name=s)):i[o]=s}}return n},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var r=i[t];return r&&(n=r[e]),!!n},this),n}}).call(h.prototype);var d=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],n=e.start,i=e.end,r=n.row,o=i.row-r,s=i.column-n.column;if(t&&(o=-o,s=-s),!this.$inChange&&t){var a=this.selectedTabstop;if(a&&!a.some(function(e){return u(e.start,n)<=0&&u(e.end,i)>=0}))return this.detach()}for(var c=this.ranges,l=0;l<c.length;l++){var h=c[l];h.end.row<n.row||(t&&u(n,h.start)<0&&u(i,h.end)>0?(this.removeRange(h),l--):(h.start.row==r&&h.start.column>n.column&&(h.start.column+=s),h.end.row==r&&h.end.column>=n.column&&(h.end.column+=s),h.start.row>=r&&(h.start.row+=o),h.end.row>=r&&(h.end.row+=o),u(h.start,h.end)>0&&this.removeRange(h)))}c.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var n=this.editor.session,i=n.getTextRange(e.firstNonLinked),r=e.length;r--;){var o=e[r];if(o.linked){var s=t.snippetManager.tmStrFormat(i,o.original);n.replace(o,s)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),i=this.ranges.length;i--;)if(!this.ranges[i].linked){var r=this.ranges[i].contains(e.row,e.column),o=n||this.ranges[i].contains(t.row,t.column);if(r&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);(n=Math.min(Math.max(n,1),t))==t&&(n=0),this.selectTabstop(n),0===n&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var i=t.length;i--;)t.hasLinkedRanges&&t[i].linked||n.addRange(t[i].clone(),!0);n.ranges[0]&&n.addRange(n.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,n){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var i=s.fromPoints(n,n);g(i.start,t),g(i.end,t),e[0]=[i],e[0].index=0}var r=[this.index+1,0],o=this.ranges;e.forEach(function(e,n){for(var i=this.$openTabstops[n]||e,a=e.length;a--;){var c=e[a],l=s.fromPoints(c.start,c.end||c.start);p(l.start,t),p(l.end,t),l.original=c,l.tabstop=i,o.push(l),i!=e?i.unshift(l):i[a]=l,c.fmtString?(l.linked=!0,i.hasLinkedRanges=!0):i.firstNonLinked||(i.firstNonLinked=l)}i.firstNonLinked||(i.hasLinkedRanges=!1),i===e&&(r.push(i),this.$openTabstops[n]=i),this.addTabstopMarkers(i)},this),r.length>2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new c,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(d.prototype);var f={};f.onChange=a.prototype.onChange,f.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},f.update=function(e,t,n){this.$insertRight=n,this.pos=e,this.onChange(t)};var p=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},g=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new h;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,n){"use strict";var i=e("../virtual_renderer").VirtualRenderer,r=e("../editor").Editor,o=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),c=e("../lib/dom");c.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=function(e){var t=c.createElement("div"),n=new function(e){var t=new i(e);t.$maxLines=4;var n=new r(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusWaitTimout=0,n.$highlightTagPending=!0,n}(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var l,u=function(){};n.focus=u,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=u,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),d.start.row=d.end.row=t.row,e.stop()});var h=new o(-1,0,-1,1/0),d=new o(-1,0,-1,1/0);d.id=n.session.addMarker(d,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?h.id&&(n.session.removeMarker(h.id),h.id=null):h.id=n.session.addMarker(h,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(l){if(l.x!=e.x||l.y!=e.y){(l=e).scrollTop=n.renderer.scrollTop;var t=l.getDocumentPosition().row;h.start.row!=t&&(h.id||n.setRow(t),p(t))}}else l=e}),n.renderer.on("beforeRender",function(){if(l&&-1!=h.start.row){l.$pos=null;var e=l.getDocumentPosition().row;h.id||n.setRow(e),p(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow];i!=t.selectedNode&&(t.selectedNode&&c.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=i,i&&c.addCssClass(i,"ace_selected"))});var f=function(){p(-1)},p=function(e,t){e!==h.start.row&&(h.start.row=h.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return h.start.row},s.addListener(n.container,"mouseout",f),n.on("hide",f),n.on("changeSelection",f),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var g=n.session.bgTokenizer;return g.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);for(var r,o,s=-1,a=0;a<t.caption.length;a++)o=t.caption[a],s!==(r=t.matchMask&1<<a?1:0)?(i.push({type:t.className||(r?"completion-highlight":""),value:o}),s=r):i[i.length-1].value+=o;if(t.meta){var c=n.renderer.$size.scrollerWidth/n.renderer.layerConfig.characterWidth,l=t.meta;l.length+t.caption.length>c-2&&(l=l.substr(0,c-t.caption.length-3)+"…"),i.push({type:"rightAlignedText",value:l})}return i},g.$updateOnChange=u,g.start=u,n.session.$computeWidth=function(){return this.screenWidth=0},n.$blockScrolling=1/0,n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.data=[],n.setData=function(e){n.setValue(a.stringRepeat("\n",e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return d.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,e)),d.start.row!=e&&(n.selection.clearSelection(),d.start.row=d.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()}),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(e,t,i){var r=this.container,o=window.innerHeight,s=window.innerWidth,a=this.renderer,c=a.$maxLines*t*1.4,u=e.top+this.$borderSize;u>o/2&&!i&&u+t+c>o?(a.$maxPixelHeight=u-2*this.$borderSize,r.style.top="",r.style.bottom=o-u+"px",n.isTopdown=!1):(u+=t,a.$maxPixelHeight=o-u-.2*t,r.style.top=u+"px",r.style.bottom="",n.isTopdown=!0),r.style.display="",this.renderer.$textLayer.checkForSizeChanges();var h=e.left;h+r.offsetWidth>s&&(h=s-r.offsetWidth),r.style.left=h+"px",this._signal("show"),l=null,n.isOpen=!0},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){"use strict";t.parForEach=function(e,t,n){var i=0,r=e.length;0===r&&n();for(var o=0;o<r;o++)t(e[o],function(e,t){++i===r&&n(e,t)})};var i=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t-1;o>=0&&n.test(e[o]);o--)r.push(e[o]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t;o<e.length&&n.test(e[o]);o++)r.push(e[o]);return r},t.getCompletionPrefix=function(e){var t,n=e.getCursorPosition(),i=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(i,n.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(i,n.column)}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"],function(e,t,n){"use strict";var i=e("./keyboard/hash_handler").HashHandler,r=e("./autocomplete/popup").AcePopup,o=e("./autocomplete/util"),s=(e("./lib/event"),e("./lib/lang")),a=e("./lib/dom"),c=e("./snippets").snippetManager,l=function(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.gatherCompletionsId=0,this.keyboardHandler=new i,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=s.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50)};(function(){this.$init=function(){return this.popup=new r(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.tooltipTimer.bind(null,null)),this.popup.on("select",this.tooltipTimer.bind(null,null)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},this.getPopup=function(){return this.popup||this.$init()},this.openPopup=function(e,t,n){this.popup||this.$init(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var i=e.renderer;if(this.popup.setRow(this.autoSelect?0:-1),n)n&&!t&&this.detach();else{this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var r=i.layerConfig.lineHeight,o=i.$cursorLayer.getPixelPosition(this.base,!0);o.left-=this.popup.getTextLeftOffset();var s=e.container.getBoundingClientRect();o.top+=s.top-i.layerConfig.offset,o.left+=s.left-e.renderer.scrollLeft,o.left+=i.gutterWidth,this.popup.show(o,r)}},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.hideDocTooltip(),this.gatherCompletionsId+=1,this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),i=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),r=this.popup&&this.popup.container;t==n||t.parentNode==r||i||t==this.tooltipNode||e.relatedTarget==n||this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){var t=this.popup.getRow(),n=this.popup.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.popup.setRow(t)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var n,i=this.editor.selection.getAllRanges(),r=0;n=i[r];r++)n.start.column-=this.completions.filterText.length,this.editor.session.remove(n);e.snippet?c.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var n=e.getSession(),i=e.getCursorPosition(),r=o.getCompletionPrefix(e);this.base=n.doc.createAnchor(i.row,i.column-r.length),this.base.$insertRight=!0;var s=[],a=e.completers.length;return e.completers.forEach(function(c,l){c.getCompletions(e,n,i,r,function(n,i){!n&&i&&(s=s.concat(i)),t(null,{prefix:o.getCompletionPrefix(e),matches:s,finished:0==--a})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),n=this.editor.session.getTextRange({start:this.base,end:t});if(n==this.completions.filterText)return;return this.completions.setFilter(n),this.completions.filtered.length?1!=this.completions.filtered.length||this.completions.filtered[0].value!=n||this.completions.filtered[0].snippet?void this.openPopup(this.editor,n,e):this.detach():this.detach()}var i=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,n){var r=function(){if(n.finished)return this.detach()}.bind(this),o=n.prefix,s=n&&n.matches;if(!s||!s.length)return r();if(0===o.indexOf(n.prefix)&&i==this.gatherCompletionsId){this.completions=new u(s),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(o);var a=this.completions.filtered;return a.length&&(1!=a.length||a[0].value!=o||a[0].snippet)?this.autoInsert&&1==a.length&&n.finished?this.insertMatch(a[0]):void this.openPopup(this.editor,o,e):r()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),i=null;return n&&this.editor&&this.popup.isOpen?(this.editor.completers.some(function(e){return e.getDocTooltip&&(i=e.getDocTooltip(n)),i}),i||(i=n),"string"==typeof i&&(i={docText:i}),i&&(i.docHTML||i.docText)?void this.showDocTooltip(i):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var n=this.popup,i=n.container.getBoundingClientRect();t.style.top=n.container.style.top,t.style.bottom=n.container.style.bottom,window.innerWidth-i.right<320?(t.style.right=window.innerWidth-i.left+"px",t.style.left=""):(t.style.left=i.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},this.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}}}).call(l.prototype),l.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new l),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var u=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e;var n=null;t=(t=(t=this.filterCompletions(t,this.filterText)).sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score})).filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),r=t.toLowerCase();e:for(var o,s=0;o=e[s];s++){var a=o.value||o.caption||o.snippet;if(a){var c,l,u=-1,h=0,d=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else for(var f=0;f<t.length;f++){var p=a.indexOf(r[f],u+1),g=a.indexOf(i[f],u+1);if((c=p>=0&&(g<0||p<g)?p:g)<0)continue e;(l=c-u-1)>0&&(-1===u&&(d+=10),d+=l),h|=1<<c,u=c}o.matchMask=h,o.exactMatch=d?0:1,o.score=(o.score||0)-d,n.push(o)}}return n}}).call(u.prototype),t.Autocomplete=l,t.FilteredList=u}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){var i=e("../range").Range,r=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function o(e,t){var n=function(e,t){return e.getTextRange(i.fromPoints({row:0,column:0},t)).split(r).length-1}(e,t),o=e.getValue().split(r),s=Object.create(null),a=o[n];return o.forEach(function(e,t){if(e&&e!==a){var i=Math.abs(n-t),r=o.length-i;s[e]?s[e]=Math.max(r,s[e]):s[e]=r}}),s}t.getCompletions=function(e,t,n,i,r){var s=o(t,n);r(null,Object.keys(s).map(function(e){return{caption:e,value:e,score:s[e],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t,n){"use strict";var i=e("../snippets").snippetManager,r=e("../autocomplete").Autocomplete,o=e("../config"),s=e("../lib/lang"),a=e("../autocomplete/util"),c=e("../autocomplete/text_completer"),l={getCompletions:function(e,t,n,i,r){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,i,r);var o=e.session.getState(n.row);r(null,t.$mode.getCompletions(o,t,n,i))}},u={getCompletions:function(e,t,n,r,o){var s=i.snippetMap,a=[];i.getActiveScopes(e).forEach(function(e){for(var t=s[e]||[],n=t.length;n--;){var i=t[n],r=i.name||i.tabTrigger;r&&a.push({caption:r,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"⇥ ":"snippet",type:"snippet"})}},this),o(null,a)},getDocTooltip:function(e){"snippet"!=e.type||e.docHTML||(e.docHTML=["<b>",s.escapeHTML(e.caption),"</b>","<hr></hr>",s.escapeHTML(e.snippet)].join(""))}},h=[u,c,l];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=c,t.keyWordCompleter=l,t.snippetCompleter=u;var d={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){p(t.session.$mode)},p=function(e){var t=e.$id;i.files||(i.files={}),g(t),e.modes&&e.modes.forEach(p)},g=function(e){if(e&&!i.files[e]){var t=e.replace("mode","snippets");i.files[e]={},o.loadModule(t,function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){g("ace/mode/"+e)})))})}},m=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!a.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){a.getCompletionPrefix(t)&&!n&&(t.completer||(t.completer=new r),t.completer.autoInsert=!1,t.completer.showPopup(t))}},v=e("../editor").Editor;e("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",m)):this.commands.removeListener("afterExec",m)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(d),this.on("changeMode",f),f(0,this)):(this.commands.removeCommand(d),this.off("changeMode",f))},value:!1}})}),ace.acequire(["ace/ext/language_tools"],function(){})},function(e,t){ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=(e("./range").Range,e("./search").Search),o=e("./edit_session").EditSession,s=e("./search_highlight").SearchHighlight;function a(){}i.inherits(a,r),function(){this.enter=function(e,t){if(!t.needle)return!1;var n=e.getCursorPosition();this.displayOccurContent(e,t);var i=this.originalToOccurPosition(e.session,n);return e.moveCursorToPosition(i),!0},this.exit=function(e,t){var n=t.translatePosition&&e.getCursorPosition(),i=n&&this.occurToOriginalPosition(e.session,n);return this.displayOriginalContent(e),i&&e.moveCursorToPosition(i),!0},this.highlight=function(e,t){(e.$occurHighlight=e.$occurHighlight||e.addDynamicMarker(new s(null,"ace_occur-highlight","text"))).setRegexp(t),e._emit("changeBackMarker")},this.displayOccurContent=function(e,t){this.$originalSession=e.session;var n=this.matchingLines(e.session,t),i=n.map(function(e){return e.content}),r=new o(i.join("\n"));r.$occur=this,r.$occurMatchingLines=n,e.setSession(r),this.$useEmacsStyleLineStart=this.$originalSession.$useEmacsStyleLineStart,r.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart,this.highlight(r,t.re),r._emit("changeBackMarker")},this.displayOriginalContent=function(e){e.setSession(this.$originalSession),this.$originalSession.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart},this.originalToOccurPosition=function(e,t){var n=e.$occurMatchingLines,i={row:0,column:0};if(!n)return i;for(var r=0;r<n.length;r++)if(n[r].row===t.row)return{row:r,column:t.column};return i},this.occurToOriginalPosition=function(e,t){var n=e.$occurMatchingLines;return n&&n[t.row]?{row:n[t.row].row,column:t.column}:t},this.matchingLines=function(e,t){if(t=i.mixin({},t),!e||!t.needle)return[];var n=new r;return n.set(t),n.findAll(e).reduce(function(t,n){var i=n.start.row,r=t[t.length-1];return r&&r.row===i?t:t.concat({row:i,content:e.getLine(i)})},[])}}.call(a.prototype),e("./lib/dom").importCssString(".ace_occur-highlight {\n border-radius: 4px;\n background-color: rgba(87, 255, 8, 0.25);\n position: absolute;\n z-index: 4;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n box-shadow: 0 0 4px rgb(91, 255, 50);\n}\n.ace_dark .ace_occur-highlight {\n background-color: rgb(80, 140, 85);\n box-shadow: 0 0 4px rgb(60, 120, 70);\n}\n","incremental-occur-highlighting"),t.Occur=a}),ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"],function(e,t,n){e("../config");var i=e("../occur").Occur,r={name:"occur",exec:function(e,t){var n=!!e.session.$occur;(new i).enter(e,t)&&!n&&a.installIn(e)},readOnly:!0},o=[{name:"occurexit",bindKey:"esc|Ctrl-G",exec:function(e){var t=e.session.$occur;t&&(t.exit(e,{}),e.session.$occur||a.uninstallFrom(e))},readOnly:!0},{name:"occuraccept",bindKey:"enter",exec:function(e){var t=e.session.$occur;t&&(t.exit(e,{translatePosition:!0}),e.session.$occur||a.uninstallFrom(e))},readOnly:!0}],s=e("../keyboard/hash_handler").HashHandler;function a(){}e("../lib/oop").inherits(a,s),function(){this.isOccurHandler=!0,this.attach=function(e){s.call(this,o,e.commands.platform),this.$editor=e};var e=this.handleKeyboard;this.handleKeyboard=function(t,n,i,r){var o=e.call(this,t,n,i,r);return o&&o.command?o:void 0}}.call(a.prototype),a.installIn=function(e){var t=new this;e.keyBinding.addKeyboardHandler(t),e.commands.addCommands(o)},a.uninstallFrom=function(e){e.commands.removeCommands(o);var t=e.getKeyboardHandler();t.isOccurHandler&&e.keyBinding.removeKeyboardHandler(t)},t.occurStartCommand=r}),ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"],function(e,t,n){var i=e("../config"),r=e("../lib/oop"),o=e("../keyboard/hash_handler").HashHandler,s=e("./occur_commands").occurStartCommand;function a(e){this.$iSearch=e}t.iSearchStartCommands=[{name:"iSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e,t){i.loadModule(["core","ace/incremental_search"],function(n){var i=n.iSearch=n.iSearch||new n.IncrementalSearch;i.activate(e,t.backwards),t.jumpToFirstMatch&&i.next(t)})},readOnly:!0},{name:"iSearchBackwards",exec:function(e,t){e.execCommand("iSearch",{backwards:!0})},readOnly:!0},{name:"iSearchAndGo",bindKey:{win:"Ctrl-K",mac:"Command-G"},exec:function(e,t){e.execCommand("iSearch",{jumpToFirstMatch:!0,useCurrentOrPrevSearch:!0})},readOnly:!0},{name:"iSearchBackwardsAndGo",bindKey:{win:"Ctrl-Shift-K",mac:"Command-Shift-G"},exec:function(e){e.execCommand("iSearch",{jumpToFirstMatch:!0,backwards:!0,useCurrentOrPrevSearch:!0})},readOnly:!0}],t.iSearchCommands=[{name:"restartSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e){e.cancelSearch(!0)}},{name:"searchForward",bindKey:{win:"Ctrl-S|Ctrl-K",mac:"Ctrl-S|Command-G"},exec:function(e,t){t.useCurrentOrPrevSearch=!0,e.next(t)}},{name:"searchBackward",bindKey:{win:"Ctrl-R|Ctrl-Shift-K",mac:"Ctrl-R|Command-Shift-G"},exec:function(e,t){t.useCurrentOrPrevSearch=!0,t.backwards=!0,e.next(t)}},{name:"extendSearchTerm",exec:function(e,t){e.addString(t)}},{name:"extendSearchTermSpace",bindKey:"space",exec:function(e){e.addString(" ")}},{name:"shrinkSearchTerm",bindKey:"backspace",exec:function(e){e.removeChar()}},{name:"confirmSearch",bindKey:"return",exec:function(e){e.deactivate()}},{name:"cancelSearch",bindKey:"esc|Ctrl-G",exec:function(e){e.deactivate(!0)}},{name:"occurisearch",bindKey:"Ctrl-O",exec:function(e){var t=r.mixin({},e.$options);e.deactivate(),s.exec(e.$editor,t)}},{name:"yankNextWord",bindKey:"Ctrl-w",exec:function(e){var t=e.$editor,n=t.selection.getRangeOfMovements(function(e){e.moveCursorWordRight()}),i=t.session.getTextRange(n);e.addString(i)}},{name:"yankNextChar",bindKey:"Ctrl-Alt-y",exec:function(e){var t=e.$editor,n=t.selection.getRangeOfMovements(function(e){e.moveCursorRight()}),i=t.session.getTextRange(n);e.addString(i)}},{name:"recenterTopBottom",bindKey:"Ctrl-l",exec:function(e){e.$editor.execCommand("recenterTopBottom")}},{name:"selectAllMatches",bindKey:"Ctrl-space",exec:function(e){var t=e.$editor,n=t.session.$isearchHighlight,i=n&&n.cache?n.cache.reduce(function(e,t){return e.concat(t||[])},[]):[];e.deactivate(!1),i.forEach(t.selection.addRange.bind(t.selection))}},{name:"searchAsRegExp",bindKey:"Alt-r",exec:function(e){e.convertNeedleToRegExp()}}].map(function(e){return e.readOnly=!0,e.isIncrementalSearchCommand=!0,e.scrollIntoView="animate-cursor",e}),r.inherits(a,o),function(){this.attach=function(e){var n=this.$iSearch;o.call(this,t.iSearchCommands,e.commands.platform),this.$commandExecHandler=e.commands.addEventListener("exec",function(t){if(!t.command.isIncrementalSearchCommand)return n.deactivate();t.stopPropagation(),t.preventDefault();var i=e.session.getScrollTop(),r=t.command.exec(n,t.args||{});return e.renderer.scrollCursorIntoView(null,.5),e.renderer.animateScrolling(i),r})},this.detach=function(e){this.$commandExecHandler&&(e.commands.removeEventListener("exec",this.$commandExecHandler),delete this.$commandExecHandler)};var e=this.handleKeyboard;this.handleKeyboard=function(t,n,i,r){if((1===n||8===n)&&"v"===i||1===n&&"y"===i)return null;var o=e.call(this,t,n,i,r);if(o.command)return o;if(-1==n){var s=this.commands.extendSearchTerm;if(s)return{command:s,args:i}}return!1}}.call(a.prototype),t.IncrementalSearchKeyboardHandler=a}),ace.define("ace/incremental_search",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./range").Range,o=e("./search").Search,s=e("./search_highlight").SearchHighlight,a=e("./commands/incremental_search_commands"),c=a.IncrementalSearchKeyboardHandler;function l(){this.$options={wrap:!1,skipCurrent:!1},this.$keyboardHandler=new c(this)}function u(e){return e instanceof RegExp}function h(e){var t=String(e),n=t.indexOf("/"),i=t.lastIndexOf("/");return{expression:t.slice(n+1,i),flags:t.slice(i+1)}}function d(e,t){try{return new RegExp(e,t)}catch(t){return e}}function f(e){return d(e.expression,e.flags)}i.inherits(l,o),function(){this.activate=function(e,t){this.$editor=e,this.$startPos=this.$currentPos=e.getCursorPosition(),this.$options.needle="",this.$options.backwards=t,e.keyBinding.addKeyboardHandler(this.$keyboardHandler),this.$originalEditorOnPaste=e.onPaste,e.onPaste=this.onPaste.bind(this),this.$mousedownHandler=e.addEventListener("mousedown",this.onMouseDown.bind(this)),this.selectionFix(e),this.statusMessage(!0)},this.deactivate=function(e){this.cancelSearch(e);var t=this.$editor;t.keyBinding.removeKeyboardHandler(this.$keyboardHandler),this.$mousedownHandler&&(t.removeEventListener("mousedown",this.$mousedownHandler),delete this.$mousedownHandler),t.onPaste=this.$originalEditorOnPaste,this.message("")},this.selectionFix=function(e){e.selection.isEmpty()&&!e.session.$emacsMark&&e.clearSelection()},this.highlight=function(e){var t=this.$editor.session;(t.$isearchHighlight=t.$isearchHighlight||t.addDynamicMarker(new s(null,"ace_isearch-result","text"))).setRegexp(e),t._emit("changeBackMarker")},this.cancelSearch=function(e){var t=this.$editor;return this.$prevNeedle=this.$options.needle,this.$options.needle="",e?(t.moveCursorToPosition(this.$startPos),this.$currentPos=this.$startPos):t.pushEmacsMark&&t.pushEmacsMark(this.$startPos,!1),this.highlight(null),r.fromPoints(this.$currentPos,this.$currentPos)},this.highlightAndFindWithNeedle=function(e,t){if(!this.$editor)return null;var n=this.$options;if(t&&(n.needle=t.call(this,n.needle||"")||""),0===n.needle.length)return this.statusMessage(!0),this.cancelSearch(!0);n.start=this.$currentPos;var i=this.$editor.session,o=this.find(i),s=this.$editor.emacsMark?!!this.$editor.emacsMark():!this.$editor.selection.isEmpty();return o&&(n.backwards&&(o=r.fromPoints(o.end,o.start)),this.$editor.selection.setRange(r.fromPoints(s?this.$startPos:o.end,o.end)),e&&(this.$currentPos=o.end),this.highlight(n.re)),this.statusMessage(o),o},this.addString=function(e){return this.highlightAndFindWithNeedle(!1,function(t){if(!u(t))return t+e;var n=h(t);return n.expression+=e,f(n)})},this.removeChar=function(e){return this.highlightAndFindWithNeedle(!1,function(e){if(!u(e))return e.substring(0,e.length-1);var t=h(e);return t.expression=t.expression.substring(0,t.expression.length-1),f(t)})},this.next=function(e){return e=e||{},this.$options.backwards=!!e.backwards,this.$currentPos=this.$editor.getCursorPosition(),this.highlightAndFindWithNeedle(!0,function(t){return e.useCurrentOrPrevSearch&&0===t.length?this.$prevNeedle||"":t})},this.onMouseDown=function(e){return this.deactivate(),!0},this.onPaste=function(e){this.addString(e)},this.convertNeedleToRegExp=function(){return this.highlightAndFindWithNeedle(!1,function(e){return u(e)?e:d(e,"ig")})},this.convertNeedleToString=function(){return this.highlightAndFindWithNeedle(!1,function(e){return u(e)?h(e).expression:e})},this.statusMessage=function(e){var t=this.$options,n="";n+=t.backwards?"reverse-":"",n+="isearch: "+t.needle,n+=e?"":" (not found)",this.message(n)},this.message=function(e){this.$editor.showCommandLine?(this.$editor.showCommandLine(e),this.$editor.focus()):console.log(e)}}.call(l.prototype),t.IncrementalSearch=l;var p=e("./lib/dom");p.importCssString&&p.importCssString(".ace_marker-layer .ace_isearch-result { position: absolute; z-index: 6; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}div.ace_isearch-result { border-radius: 4px; background-color: rgba(255, 200, 0, 0.5); box-shadow: 0 0 4px rgb(255, 200, 0);}.ace_dark div.ace_isearch-result { background-color: rgb(100, 110, 160); box-shadow: 0 0 4px rgb(80, 90, 140);}","incremental-search-highlighting");var g=e("./commands/command_manager");(function(){this.setupIncrementalSearch=function(e,t){if(this.usesIncrementalSearch!=t){this.usesIncrementalSearch=t;var n=a.iSearchStartCommands;this[t?"addCommands":"removeCommands"](n)}}}).call(g.CommandManager.prototype);var m=e("./editor").Editor;e("./config").defineOptions(m.prototype,"editor",{useIncrementalSearch:{set:function(e){this.keyBinding.$handlers.forEach(function(t){t.setupIncrementalSearch&&t.setupIncrementalSearch(this,e)}),this._emit("incrementalSearchSettingChanged",{isEnabled:e})}}})}),ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){"use strict";var i=e("../lib/dom");e("../incremental_search");var r=e("../commands/incremental_search_commands"),o=function(e,t){var n=this.scroller.getBoundingClientRect(),i=e+this.scrollLeft-n.left-this.$padding,r=Math.floor(i/this.characterWidth),o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(o,r,i)},s=e("./hash_handler").HashHandler;t.handler=new s,t.handler.isEmacs=!0,t.handler.$id="ace/keyboard/emacs";var a,c,l=!1;t.handler.attach=function(e){l||(l=!0,i.importCssString(" .emacs-mode .ace_cursor{ border: 1px rgba(50,250,50,0.8) solid!important; -moz-box-sizing: border-box!important; -webkit-box-sizing: border-box!important; box-sizing: border-box!important; background-color: rgba(0,250,0,0.9); opacity: 0.5; } .emacs-mode .ace_hidden-cursors .ace_cursor{ opacity: 1; background-color: transparent; } .emacs-mode .ace_overwrite-cursors .ace_cursor { opacity: 1; background-color: transparent; border-width: 0 0 2px 2px !important; } .emacs-mode .ace_text-layer { z-index: 4 } .emacs-mode .ace_cursor-layer { z-index: 2 }","emacsMode")),a=e.session.$selectLongWords,e.session.$selectLongWords=!0,c=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.$emacsMark=null,e.session.$emacsMarkRing=e.session.$emacsMarkRing||[],e.emacsMark=function(){return this.session.$emacsMark},e.setEmacsMark=function(e){this.session.$emacsMark=e},e.pushEmacsMark=function(e,t){var n=this.session.$emacsMark;n&&this.session.$emacsMarkRing.push(n),!e||t?this.setEmacsMark(e):this.session.$emacsMarkRing.push(e)},e.popEmacsMark=function(){var e=this.emacsMark();return e?(this.setEmacsMark(null),e):this.session.$emacsMarkRing.pop()},e.getLastEmacsMark=function(e){return this.session.$emacsMark||this.session.$emacsMarkRing.slice(-1)[0]},e.emacsMarkForSelection=function(e){var t=this.selection,n=this.multiSelect?this.multiSelect.getAllRanges().length:1,i=t.index||0,r=this.session.$emacsMarkRing,o=r.length-(n-i),s=r[o]||t.anchor;return e&&r.splice(o,1,"row"in e&&"column"in e?e:void 0),s},e.on("click",h),e.on("changeSession",u),e.renderer.screenToTextCoordinates=o,e.setStyle("emacs-mode"),e.commands.addCommands(p),t.handler.platform=e.commands.platform,e.$emacsModeHandler=this,e.addEventListener("copy",this.onCopy),e.addEventListener("paste",this.onPaste)},t.handler.detach=function(e){delete e.renderer.screenToTextCoordinates,e.session.$selectLongWords=a,e.session.$useEmacsStyleLineStart=c,e.removeEventListener("click",h),e.removeEventListener("changeSession",u),e.unsetStyle("emacs-mode"),e.commands.removeCommands(p),e.removeEventListener("copy",this.onCopy),e.removeEventListener("paste",this.onPaste),e.$emacsModeHandler=null};var u=function(e){e.oldSession&&(e.oldSession.$selectLongWords=a,e.oldSession.$useEmacsStyleLineStart=c),a=e.session.$selectLongWords,e.session.$selectLongWords=!0,c=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.hasOwnProperty("$emacsMark")||(e.session.$emacsMark=null),e.session.hasOwnProperty("$emacsMarkRing")||(e.session.$emacsMarkRing=[])},h=function(e){e.editor.session.$emacsMark=null},d=e("../lib/keys").KEY_MODS,f={C:"ctrl",S:"shift",M:"alt",CMD:"command"};["C-S-M-CMD","S-M-CMD","C-M-CMD","C-S-CMD","C-S-M","M-CMD","S-CMD","S-M","C-CMD","C-M","C-S","CMD","M","S","C"].forEach(function(e){var t=0;e.split("-").forEach(function(e){t|=d[f[e]]}),f[t]=e.toLowerCase()+"-"}),t.handler.onCopy=function(e,n){n.$handlesEmacsOnCopy||(n.$handlesEmacsOnCopy=!0,t.handler.commands.killRingSave.exec(n),n.$handlesEmacsOnCopy=!1)},t.handler.onPaste=function(e,t){t.pushEmacsMark(t.getCursorPosition())},t.handler.bindKey=function(e,t){if("object"==typeof e&&(e=e[this.platform]),e){var n=this.commandKeyBinding;e.split("|").forEach(function(e){e=e.toLowerCase(),n[e]=t,e.split(" ").slice(0,-1).reduce(function(e,t,n){var i=e[n-1]?e[n-1]+" ":"";return e.concat([i+t])},[]).forEach(function(e){n[e]||(n[e]="null")})},this)}},t.handler.getStatusText=function(e,t){var n="";return t.count&&(n+=t.count),t.keyChain&&(n+=" "+t.keyChain),n},t.handler.handleKeyboard=function(e,t,n,i){if(-1!==i){var r=e.editor;if(r._signal("changeStatus"),-1==t&&(r.pushEmacsMark(),e.count)){var o=new Array(e.count+1).join(n);return e.count=null,{command:"insertstring",args:o}}var s=f[t];if("c-"==s||e.count)if("number"==typeof(l=parseInt(n[n.length-1]))&&!isNaN(l))return e.count=Math.max(e.count,0)||0,e.count=10*e.count+l,{command:"null"};s&&(n=s+n),e.keyChain&&(n=e.keyChain+=" "+n);var a=this.commandKeyBinding[n];if(e.keyChain="null"==a?n:"",a){if("null"===a)return{command:"null"};if("universalArgument"===a)return e.count=-4,{command:"null"};var c;if("string"!=typeof a&&(c=a.args,a.command&&(a=a.command),"goorselect"===a&&(a=r.emacsMark()?c[1]:c[0],c=null)),"string"!=typeof a||("insertstring"!==a&&"splitline"!==a&&"togglecomment"!==a||r.pushEmacsMark(),a=this.commands[a]||r.commands.commands[a])){if(a.readOnly||a.isYank||(e.lastCommand=null),!a.readOnly&&r.emacsMark()&&r.setEmacsMark(null),e.count){var l=e.count;if(e.count=0,!a||!a.handlesCount)return{args:c,command:{exec:function(e,t){for(var n=0;n<l;n++)a.exec(e,t)},multiSelectAction:a.multiSelectAction}};c||(c={}),"object"==typeof c&&(c.count=l)}return{command:a,args:c}}}}},t.emacsKeys={"Up|C-p":{command:"goorselect",args:["golineup","selectup"]},"Down|C-n":{command:"goorselect",args:["golinedown","selectdown"]},"Left|C-b":{command:"goorselect",args:["gotoleft","selectleft"]},"Right|C-f":{command:"goorselect",args:["gotoright","selectright"]},"C-Left|M-b":{command:"goorselect",args:["gotowordleft","selectwordleft"]},"C-Right|M-f":{command:"goorselect",args:["gotowordright","selectwordright"]},"Home|C-a":{command:"goorselect",args:["gotolinestart","selecttolinestart"]},"End|C-e":{command:"goorselect",args:["gotolineend","selecttolineend"]},"C-Home|S-M-,":{command:"goorselect",args:["gotostart","selecttostart"]},"C-End|S-M-.":{command:"goorselect",args:["gotoend","selecttoend"]},"S-Up|S-C-p":"selectup","S-Down|S-C-n":"selectdown","S-Left|S-C-b":"selectleft","S-Right|S-C-f":"selectright","S-C-Left|S-M-b":"selectwordleft","S-C-Right|S-M-f":"selectwordright","S-Home|S-C-a":"selecttolinestart","S-End|S-C-e":"selecttolineend","S-C-Home":"selecttostart","S-C-End":"selecttoend","C-l":"recenterTopBottom","M-s":"centerselection","M-g":"gotoline","C-x C-p":"selectall","C-Down":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"C-Up":{command:"goorselect",args:["gotopageup","selectpageup"]},"PageDown|C-v":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"PageUp|M-v":{command:"goorselect",args:["gotopageup","selectpageup"]},"S-C-Down":"selectpagedown","S-C-Up":"selectpageup","C-s":"iSearch","C-r":"iSearchBackwards","M-C-s":"findnext","M-C-r":"findprevious","S-M-5":"replace",Backspace:"backspace","Delete|C-d":"del","Return|C-m":{command:"insertstring",args:"\n"},"C-o":"splitline","M-d|C-Delete":{command:"killWord",args:"right"},"C-Backspace|M-Backspace|M-Delete":{command:"killWord",args:"left"},"C-k":"killLine","C-y|S-Delete":"yank","M-y":"yankRotate","C-g":"keyboardQuit","C-w|C-S-W":"killRegion","M-w":"killRingSave","C-Space":"setMark","C-x C-x":"exchangePointAndMark","C-t":"transposeletters","M-u":"touppercase","M-l":"tolowercase","M-/":"autocomplete","C-u":"universalArgument","M-;":"togglecomment","C-/|C-x u|S-C--|C-z":"undo","S-C-/|S-C-x u|C--|S-C-z":"redo","C-x r":"selectRectangularRegion","M-x":{command:"focusCommandLine",args:"M-x "}},t.handler.bindKeys(t.emacsKeys),t.handler.addCommands({recenterTopBottom:function(e){var t=e.renderer,n=t.$cursorLayer.getPixelPosition(),i=t.$size.scrollerHeight-t.lineHeight,r=t.scrollTop;r=Math.abs(n.top-r)<2?n.top-i:Math.abs(n.top-r-.5*i)<2?n.top:n.top-.5*i,e.session.setScrollTop(r)},selectRectangularRegion:function(e){e.multiSelect.toggleBlockSelection()},setMark:{exec:function(e,t){if(t&&t.count)return e.inMultiSelectMode?e.forEachSelection(s):s(),void s();var n=e.emacsMark(),i=e.selection.getAllRanges(),r=i.map(function(e){return{row:e.start.row,column:e.start.column}}),o=i.every(function(e){return e.isEmpty()});if(n||!o)return e.inMultiSelectMode?e.forEachSelection({exec:e.clearSelection.bind(e)}):e.clearSelection(),void(n&&e.pushEmacsMark(null));if(!n)return r.forEach(function(t){e.pushEmacsMark(t)}),void e.setEmacsMark(r[r.length-1]);function s(){var t=e.popEmacsMark();t&&e.moveCursorToPosition(t)}},readOnly:!0,handlesCount:!0},exchangePointAndMark:{exec:function(e,t){var n=e.selection;if(t.count||n.isEmpty())if(t.count){var i={row:n.lead.row,column:n.lead.column};n.clearSelection(),n.moveCursorToPosition(e.emacsMarkForSelection(i))}else n.selectToPosition(e.emacsMarkForSelection());else n.setSelectionRange(n.getRange(),!n.isBackwards())},readOnly:!0,handlesCount:!0,multiSelectAction:"forEach"},killWord:{exec:function(e,n){e.clearSelection(),"left"==n?e.selection.selectWordLeft():e.selection.selectWordRight();var i=e.getSelectionRange(),r=e.session.getTextRange(i);t.killRing.add(r),e.session.remove(i),e.clearSelection()},multiSelectAction:"forEach"},killLine:function(e){e.pushEmacsMark(null),e.clearSelection();var n=e.getSelectionRange(),i=e.session.getLine(n.start.row);n.end.column=i.length,i=i.substr(n.start.column);var r=e.session.getFoldLine(n.start.row);r&&n.end.row!=r.end.row&&(n.end.row=r.end.row,i="x"),/^\s*$/.test(i)&&(n.end.row++,i=e.session.getLine(n.end.row),n.end.column=/^\s*$/.test(i)?i.length:0);var o=e.session.getTextRange(n);e.prevOp.command==this?t.killRing.append(o):t.killRing.add(o),e.session.remove(n),e.clearSelection()},yank:function(e){e.onPaste(t.killRing.get()||""),e.keyBinding.$data.lastCommand="yank"},yankRotate:function(e){"yank"==e.keyBinding.$data.lastCommand&&(e.undo(),e.session.$emacsMarkRing.pop(),e.onPaste(t.killRing.rotate()),e.keyBinding.$data.lastCommand="yank")},killRegion:{exec:function(e){t.killRing.add(e.getCopyText()),e.commands.byName.cut.exec(e),e.setEmacsMark(null)},readOnly:!0,multiSelectAction:"forEach"},killRingSave:{exec:function(e){e.$handlesEmacsOnCopy=!0;var n=e.session.$emacsMarkRing.slice(),i=[];t.killRing.add(e.getCopyText()),setTimeout(function(){function t(){var t=e.selection,n=t.getRange(),r=t.isBackwards()?n.end:n.start;i.push({row:r.row,column:r.column}),t.clearSelection()}e.$handlesEmacsOnCopy=!1,e.inMultiSelectMode?e.forEachSelection({exec:t}):t(),e.session.$emacsMarkRing=n.concat(i.reverse())},0)},readOnly:!0},keyboardQuit:function(e){e.selection.clearSelection(),e.setEmacsMark(null),e.keyBinding.$data.count=null},focusCommandLine:function(e,t){e.showCommandLine&&e.showCommandLine(t)}}),t.handler.addCommands(r.iSearchStartCommands);var p=t.handler.commands;p.yank.isYank=!0,p.yankRotate.isYank=!0,t.killRing={$data:[],add:function(e){e&&this.$data.push(e),this.$data.length>30&&this.$data.shift()},append:function(e){var t=this.$data.length-1,n=this.$data[t]||"";e&&(n+=e),n&&(this.$data[t]=n)},get:function(e){return e=e||1,this.$data.slice(this.$data.length-e,this.$data.length).reverse().join("\n")},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}})},function(e,t){ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/multi_select"],function(e,t,n){"use strict";var i=e("../range").Range,r=e("../lib/event_emitter").EventEmitter,o=e("../lib/dom"),s=e("../lib/oop"),a=e("../lib/keys"),c=e("../lib/event"),l=e("../search").Search,u=e("../lib/useragent"),h=e("../search_highlight").SearchHighlight,d=e("../commands/multi_select_commands"),f=e("../mode/text").Mode.prototype.tokenRe;e("../multi_select");var p=function(e){this.ace=e,this.state={},this.marks={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};function g(e){return{row:e.line,column:e.ch}}function m(e){return new b(e.row,e.column)}p.Pos=function(e,t){if(!(this instanceof b))return new b(e,t);this.line=e,this.ch=t},p.defineOption=function(e,t,n){},p.commands={redo:function(e){e.ace.redo()},undo:function(e){e.ace.undo()},newlineAndIndent:function(e){e.ace.insert("\n")}},p.keyMap={},p.addClass=p.rmClass=p.e_stop=function(){},p.keyName=function(e){if(e.key)return e.key;var t=a[e.keyCode]||"";return 1==t.length&&(t=t.toUpperCase()),t=c.getModifierString(e).replace(/(^|-)\w/g,function(e){return e.toUpperCase()})+t},p.keyMap.default=function(e){return function(t){var n=t.ace.commands.commandKeyBinding[e.toLowerCase()];return n&&!1!==t.ace.execCommand(n)}},p.lookupKey=function e(t,n,i){"string"==typeof n&&(n=p.keyMap[n]);var r="function"==typeof n?n(t):n[t];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&i(r))return"handled";if(n.fallthrough){if(!Array.isArray(n.fallthrough))return e(t,n.fallthrough,i);for(var o=0;o<n.fallthrough.length;o++){var s=e(t,n.fallthrough[o],i);if(s)return s}}},p.signal=function(e,t,n){return e._signal(t,n)},p.on=c.addListener,p.off=c.removeListener,p.isWordChar=function(e){return e<""?/^\w$/.test(e):(f.lastIndex=0,f.test(e))},function(){s.implement(p.prototype,r),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(e){var t={text:"i"==e.action[0]?e.lines:[]},n=this.curOp=this.curOp||{};n.changeHandlers||(n.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),this.virtualSelectionMode()||(n.lastChange?n.lastChange.next=n.lastChange=t:n.lastChange=n.change=t,this.$updateMarkers(e))},this.onSelectionChange=function(){var e=this.curOp=this.curOp||{};e.cursorActivityHandlers||(e.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(d.keyboardHandler)},this.operation=function(e,t){if(!t&&this.curOp||t&&this.curOp&&this.curOp.force)return e();if(!t&&this.ace.curOp||this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var n=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var i=this.curOp=this.curOp||{};this.curOp.force=t;var r=e();return this.ace.curOp&&"vim"==this.ace.curOp.command.name&&(this.ace.endOperation(),i.cursorActivity||i.lastChange||!n||(this.ace.prevOp=n)),!t&&this.ace.curOp||this.curOp&&this.onBeforeEndOperation(),r},this.onBeforeEndOperation=function(){var e=this.curOp;e&&(e.change&&this.signal("change",e.change,e),e&&e.cursorActivity&&this.signal("cursorActivity",null,e),this.curOp=null)},this.signal=function(e,t,n){var i=n?n[e+"Handlers"]:(this._eventRegistry||{})[e];if(i){i=i.slice();for(var r=0;r<i.length;r++)i[r](this,t)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(e,t){"object"==typeof e&&(t=e.ch,e=e.line),this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:e,column:t}),this.ace.selection.moveTo(e,t)},this.getCursor=function(e){var t=this.ace.selection;return m("anchor"==e?t.isEmpty()?t.lead:t.anchor:"head"!=e&&e?t.getRange()[e]:t.lead)},this.listSelections=function(e){var t=this.ace.multiSelect.rangeList.ranges;return!t.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:t.map(function(e){return{anchor:this.clipPos(m(e.cursor==e.end?e.start:e.end)),head:this.clipPos(m(e.cursor))}},this)},this.setSelections=function(e,t){var n=this.ace.multiSelect,r=e.map(function(e){var t=g(e.anchor),n=g(e.head),r=i.comparePoints(t,n)<0?new i.fromPoints(t,n):new i.fromPoints(n,t);return r.cursor=i.comparePoints(r.start,n)?r.end:r.start,r});if(this.ace.inVirtualSelectionMode)this.ace.selection.fromOrientedRange(r[0]);else{t?r[t]&&r.push(r.splice(t,1)[0]):r=r.reverse(),n.toSingleRange(r[0].clone());for(var o=this.ace.session,s=0;s<r.length;s++){var a=o.$clipRangeToDocument(r[s]);n.addRange(a)}}},this.setSelection=function(e,t,n){var i=this.ace.selection;i.moveTo(e.line,e.ch),i.selectTo(t.line,t.ch),n&&"*mouse"==n.origin&&this.onBeforeEndOperation()},this.somethingSelected=function(e){return!this.ace.selection.isEmpty()},this.clipPos=function(e){return m(this.ace.session.$clipPositionToDocument(e.line,e.ch))},this.markText=function(e){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(e){var t="insert"==e.action,n=e.start,r=e.end,o=(r.row-n.row)*(t?1:-1),s=(r.column-n.column)*(t?1:-1);for(var a in t&&(r=n),this.marks){var c=this.marks[a],l=i.comparePoints(c,n);if(!(l<0)){if(0===l&&t){if(1!=c.bias){c.bias;continue}l=1}var u=t?l:i.comparePoints(c,r);u>0?(c.row+=o,c.column+=c.row==r.row?s:0):!t&&u<=0&&(c.row=n.row,c.column=n.column,0===u&&(c.bias=1))}}};var e=function(e,t,n,i){this.cm=e,this.id=t,this.row=n,this.column=i,e.marks[this.id]=this};e.prototype.clear=function(){delete this.cm.marks[this.id]},e.prototype.find=function(){return m(this)},this.setBookmark=function(t,n){var i=new e(this,this.$uid++,t.line,t.ch);return n&&n.insertLeft||(i.$insertRight=!0),this.marks[i.id]=i,i},this.moveH=function(e,t){if("char"==t){var n=this.ace.selection;n.clearSelection(),n.moveCursorBy(0,e)}},this.findPosV=function(e,t,n,i){if("page"==n){var r=this.ace.renderer.layerConfig;t*=Math.floor(r.height/r.lineHeight),n="line"}if("line"==n){var o=this.ace.session.documentToScreenPosition(e.line,e.ch);return null!=i&&(o.column=i),o.row+=t,o.row=Math.min(Math.max(0,o.row),this.ace.session.getScreenLength()-1),m(this.ace.session.screenToDocumentPosition(o.row,o.column))}},this.charCoords=function(e,t){if("div"==t||!t)return{left:(i=this.ace.session.documentToScreenPosition(e.line,e.ch)).column,top:i.row};if("local"==t){var n=this.ace.renderer,i=this.ace.session.documentToScreenPosition(e.line,e.ch),r=n.layerConfig.lineHeight,o=n.layerConfig.characterWidth,s=r*i.row;return{left:i.column*o,top:s,bottom:s+r}}},this.coordsChar=function(e,t){var n=this.ace.renderer;if("local"==t){var i=Math.max(0,Math.floor(e.top/n.lineHeight)),r=Math.max(0,Math.floor(e.left/n.characterWidth));return m(n.session.screenToDocumentPosition(i,r))}if("div"==t)throw"not implemented"},this.getSearchCursor=function(e,t,n){var i=!1,r=!1;e instanceof RegExp&&!e.global&&(i=!e.ignoreCase,e=e.source,r=!0);var o=new l;void 0==t.ch&&(t.ch=Number.MAX_VALUE);var s={row:t.line,column:t.ch},a=this,c=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){o.setOptions({needle:e,caseSensitive:i,wrap:!1,backwards:t,regExp:r,start:c||s});var n=o.find(a.ace.session);return n&&n.isEmpty()&&a.getLine(n.start.row).length==n.start.column&&(o.$options.start=n,n=o.find(a.ace.session)),c=n},from:function(){return c&&m(c.start)},to:function(){return c&&m(c.end)},replace:function(e){c&&(c.end=a.ace.session.doc.replace(c,e))}}},this.scrollTo=function(e,t){var n=this.ace.renderer,i=n.layerConfig,r=i.maxHeight;r-=(n.$size.scrollerHeight-n.lineHeight)*n.$scrollPastEnd,null!=t&&this.ace.session.setScrollTop(Math.max(0,Math.min(t,r))),null!=e&&this.ace.session.setScrollLeft(Math.max(0,Math.min(e,i.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(e,t){if(e){var n=this.ace.renderer,i={top:0,bottom:t};n.scrollCursorIntoView(g(e),2*n.lineHeight/n.$size.scrollerHeight,i)}},this.getLine=function(e){return this.ace.session.getLine(e)},this.getRange=function(e,t){return this.ace.session.getTextRange(new i(e.line,e.ch,t.line,t.ch))},this.replaceRange=function(e,t,n){return n||(n=t),this.ace.session.replace(new i(t.line,t.ch,n.line,n.ch),e)},this.replaceSelections=function(e){var t=this.ace.selection;if(this.ace.inVirtualSelectionMode)this.ace.session.replace(t.getRange(),e[0]||"");else{t.inVirtualSelectionMode=!0;var n=t.rangeList.ranges;n.length||(n=[this.ace.multiSelect.getRange()]);for(var i=n.length;i--;)this.ace.session.replace(n[i],e[i]||"");t.inVirtualSelectionMode=!1}},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(e){return this.getRange(e.anchor,e.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.containter};var t={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(e,n){switch(this.state[e]=n,e){case"indentWithTabs":e=t[e],n=!n;break;default:e=t[e]}e&&this.ace.setOption(e,n)},this.getOption=function(e,n){var i=t[e];switch(i&&(n=this.ace.getOption(i)),e){case"indentWithTabs":return e=t[e],!n}return i?n:this.state[e]},this.toggleOverwrite=function(e){return this.state.overwrite=e,this.ace.setOverwrite(e)},this.addOverlay=function(e){if(!this.$searchHighlight||!this.$searchHighlight.session){var t=new h(null,"ace_highlight-marker","text"),n=this.ace.session.addDynamicMarker(t);t.id=n.id,t.session=this.ace.session,t.destroy=function(e){t.session.off("change",t.updateOnChange),t.session.off("changeEditor",t.destroy),t.session.removeMarker(t.id),t.session=null},t.updateOnChange=function(e){var n=e.start.row;n==e.end.row?t.cache[n]=void 0:t.cache.splice(n,t.cache.length)},t.session.on("changeEditor",t.destroy),t.session.on("change",t.updateOnChange)}var i=new RegExp(e.query.source,"gmi");this.$searchHighlight=e.highlight=t,this.$searchHighlight.setRegexp(i),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(e){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var e=this.ace.renderer,t=e.layerConfig;return{left:e.scrollLeft,top:e.scrollTop,height:t.maxHeight,width:t.width,clientHeight:t.height,clientWidth:t.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(e){return this.ace.setValue(e)},this.getTokenTypeAt=function(e){var t=this.ace.session.getTokenAt(e.line,e.ch);return t&&/comment|string/.test(t.type)?"string":""},this.findMatchingBracket=function(e){var t=this.ace.session.findMatchingBracket(g(e));return{to:t&&m(t)}},this.indentLine=function(e,t){!0===t?this.ace.session.indentRows(e,e,"\t"):!1===t&&this.ace.session.outdentRows(new i(e,0,e,0))},this.indexFromPos=function(e){return this.ace.session.doc.positionToIndex(g(e))},this.posFromIndex=function(e){return m(this.ace.session.doc.indexToPosition(e))},this.focus=function(e){return this.ace.focus()},this.blur=function(e){return this.ace.blur()},this.defaultTextHeight=function(e){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(e,t,n,i){var r=i.bracketRegex.source;if(1==t)var o=this.ace.session.$findClosingBracket(r.slice(1,2),g(e),/paren|text/);else o=this.ace.session.$findOpeningBracket(r.slice(-2,-1),{row:e.line,column:e.ch+1},/paren|text/);return o&&{pos:m(o)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}}}.call(p.prototype),(p.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0}).prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var r=function(e){return n?e.toLowerCase():e};if(r(this.string.substr(this.pos,e.length))==r(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},p.defineExtension=function(e,t){p.prototype[e]=t},o.importCssString(".normal-mode .ace_cursor{ border: 1px solid red; background-color: red; opacity: 0.5;}.normal-mode .ace_hidden-cursors .ace_cursor{ background-color: transparent;}.ace_dialog { position: absolute; left: 0; right: 0; background: white; z-index: 15; padding: .1em .8em; overflow: hidden; color: #333;}.ace_dialog-top { border-bottom: 1px solid #eee; top: 0;}.ace_dialog-bottom { border-top: 1px solid #eee; bottom: 0;}.ace_dialog input { border: none; outline: none; background: transparent; width: 20em; color: inherit; font-family: monospace;}","vimMode"),function(){function e(e,t,n){var i;return(i=e.ace.container.appendChild(document.createElement("div"))).className=n?"ace_dialog ace_dialog-bottom":"ace_dialog ace_dialog-top","string"==typeof t?i.innerHTML=t:i.appendChild(t),i}function t(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}p.defineExtension("openDialog",function(n,i,r){if(!this.virtualSelectionMode()){r||(r={}),t(this,null);var o,s=e(this,n,r.bottom),a=!1,c=this,l=s.getElementsByTagName("input")[0];return l?(r.value&&(l.value=r.value,!1!==r.select&&l.select()),r.onInput&&p.on(l,"input",function(e){r.onInput(e,l.value,u)}),r.onKeyUp&&p.on(l,"keyup",function(e){r.onKeyUp(e,l.value,u)}),p.on(l,"keydown",function(e){r&&r.onKeyDown&&r.onKeyDown(e,l.value,u)||((27==e.keyCode||!1!==r.closeOnEnter&&13==e.keyCode)&&(l.blur(),p.e_stop(e),u()),13==e.keyCode&&i(l.value))}),!1!==r.closeOnBlur&&p.on(l,"blur",u),l.focus()):(o=s.getElementsByTagName("button")[0])&&(p.on(o,"click",function(){u(),c.focus()}),!1!==r.closeOnBlur&&p.on(o,"blur",u),o.focus()),u}function u(e){if("string"==typeof e)l.value=e;else{if(a)return;a=!0,s.parentNode.removeChild(s),c.focus(),r.onClose&&r.onClose(s)}}}),p.defineExtension("openNotification",function(n,i){if(!this.virtualSelectionMode()){t(this,c);var r,o=e(this,n,i&&i.bottom),s=!1,a=i&&void 0!==i.duration?i.duration:5e3;return p.on(o,"click",function(e){p.e_preventDefault(e),c()}),a&&(r=setTimeout(c,a)),c}function c(){s||(s=!0,clearTimeout(r),o.parentNode.removeChild(o))}})}();var v=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],y=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],b=p.Pos,w=function(){return Q};function x(e,t){this==p.keyMap.vim&&p.rmClass(e.getWrapperElement(),"cm-fat-cursor"),t&&t.attach==_||function(e){e.setOption("disableInput",!1),e.off("cursorActivity",ct),p.off(e.getInputField(),"paste",A(e)),e.state.vim=null}(e)}function _(e,t){this==p.keyMap.vim&&p.addClass(e.getWrapperElement(),"cm-fat-cursor"),t&&t.attach==_||function(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),p.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",ct),X(e),p.on(e.getInputField(),"paste",A(e))}(e)}function k(e,t){if(t){var n=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var i=!1,r=0;r<t.length;r++){var o=t[r];o in C?t[r]=C[o]:i=!0,o in E&&(t[r]=E[o])}if(!i)return!1;I(n)&&(t[t.length-1]=n.toLowerCase());return"<"+t.join("-")+">"}(e);if(!n)return!1;var i=p.Vim.findKey(t,n);return"function"==typeof i&&p.signal(t,"vim-keypress",n),i}}p.defineOption("vimMode",!1,function(e,t,n){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&n!=p.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")});var C={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},E={Enter:"CR",Backspace:"BS",Delete:"Del"};function A(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(he(e.getCursor(),0,1)),ce.enterInsertMode(e,{},t))}),t.onPasteFn}var S=/[\d]/,F=[p.isWordChar,function(e){return e&&!p.isWordChar(e)&&!/\s/.test(e)}],T=[function(e){return/\S/.test(e)}];function D(e,t){for(var n=[],i=e;i<e+t;i++)n.push(String.fromCharCode(i));return n}var L=D(65,26),P=D(97,26),R=D(48,10),M=[].concat(L,P,R,["<",">"]),B=[].concat(L,P,R,["-",'"',".",":","/"]);function O(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function j(e){return/^[a-z]$/.test(e)}function I(e){return/^[A-Z]$/.test(e)}function $(e){return/^\s*$/.test(e)}function N(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var W={};function z(e,t,n,i,r){if(void 0===t&&!r)throw Error("defaultValue is acequired unless callback is provided");if(n||(n="string"),W[e]={type:n,defaultValue:t,callback:r},i)for(var o=0;o<i.length;o++)W[i[o]]=W[e];t&&H(e,t)}function H(e,t,n,i){var r=W[e],o=(i=i||{}).scope;if(!r)throw Error("Unknown option: "+e);if("boolean"==r.type){if(t&&!0!==t)throw Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}r.callback?("local"!==o&&r.callback(t,void 0),"global"!==o&&n&&r.callback(t,n)):("local"!==o&&(r.value="boolean"==r.type?!!t:t),"global"!==o&&n&&(n.state.vim.options[e]={value:t}))}function V(e,t,n){var i=W[e],r=(n=n||{}).scope;if(!i)throw Error("Unknown option: "+e);if(i.callback){var o=t&&i.callback(void 0,t);return"global"!==r&&void 0!==o?o:"local"!==r?i.callback():void 0}return((o="global"!==r&&t&&t.state.vim.options[e])||"local"!==r&&i||{}).value}z("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e)return"null"==(n=t.getOption("mode"))?"":n;var n=""==e?"null":e;t.setOption("mode",n)}});var U,K,G=function(){var e=100,t=-1,n=0,i=0,r=new Array(e);return{cachedCursor:void 0,add:function(o,s,a){var c=r[t%e];function l(n){var i=++t%e,s=r[i];s&&s.clear(),r[i]=o.setBookmark(n)}if(c){var u=c.find();u&&!ge(u,s)&&l(s)}else l(s);l(a),n=t,(i=t-e+1)<0&&(i=0)},move:function(o,s){(t+=s)>n?t=n:t<i&&(t=i);var a=r[(e+t)%e];if(a&&!a.find()){var c,l=s>0?1:-1,u=o.getCursor();do{if((a=r[(e+(t+=l))%e])&&(c=a.find())&&!ge(u,c))break}while(t<n&&t>i)}return a}}},q=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function Y(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=q()}function X(e){return e.state.vim||(e.state.vim={inputState:new J,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function Z(){for(var e in U={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:G(),macroModeState:new Y,lastChararacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new ne({}),searchHistoryController:new ie({}),exCommandHistoryController:new ie({})},W){var t=W[e];t.value=t.defaultValue}}Y.prototype={exitMacroRecordMode:function(){var e=U.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=U.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var Q={buildKeyMap:function(){},getRegisterController:function(){return U.registerController},resetVimGlobalState_:Z,getVimGlobalState_:function(){return U},maybeInitVimState_:X,suppressErrorLogging:!1,InsertModeKey:ut,map:function(e,t,n){it.map(e,t,n)},unmap:function(e,t){it.unmap(e,t)},setOption:H,getOption:V,defineOption:z,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;nt[e]=n,it.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var i=this.findKey(e,t,n);if("function"==typeof i)return i()},findKey:function(e,t,n){var i,r=X(e);function o(){var i=U.macroModeState;if(i.isRecording){if("q"==t)return i.exitMacroRecordMode(),ee(e),!0;"mapping"!=n&&function(e,t){if(e.isPlaying)return;var n=e.latestRegister,i=U.registerController.getRegister(n);i&&i.pushText(t)}(i,t)}}function s(){if("<Esc>"==t)return ee(e),r.visualMode?Fe(e):r.insertMode&&rt(e),!0}return!1===(i=r.insertMode?function(){if(s())return!0;for(var n=r.inputState.keyBuffer=r.inputState.keyBuffer+t,i=1==t.length,o=re.matchCommand(n,v,r.inputState,"insert");n.length>1&&"full"!=o.type;){n=r.inputState.keyBuffer=n.slice(1);var a=re.matchCommand(n,v,r.inputState,"insert");"none"!=a.type&&(o=a)}if("none"==o.type)return ee(e),!1;if("partial"==o.type)return K&&window.clearTimeout(K),K=window.setTimeout(function(){r.insertMode&&r.inputState.keyBuffer&&ee(e)},V("insertModeEscKeysTimeout")),!i;if(K&&window.clearTimeout(K),i){for(var c=e.listSelections(),l=0;l<c.length;l++){var u=c[l].head;e.replaceRange("",he(u,0,-(n.length-1)),u,"+input")}U.macroModeState.lastInsertModeChanges.changes.pop()}return ee(e),o.command}():function(){if(o()||s())return!0;var n=r.inputState.keyBuffer=r.inputState.keyBuffer+t;if(/^[1-9]\d*$/.test(n))return!0;if(!(i=/^(\d*)(.*)$/.exec(n)))return ee(e),!1;var i,a=r.visualMode?"visual":"normal",c=re.matchCommand(i[2]||i[1],v,r.inputState,a);return"none"==c.type?(ee(e),!1):"partial"==c.type||(r.inputState.keyBuffer="",(i=/^(\d*)(.*)$/.exec(n))[1]&&"0"!=i[1]&&r.inputState.pushRepeatDigit(i[1]),c.command)}())?void 0:!0===i?function(){return!0}:function(){if(!i.operator&&!i.isEdit||!e.getOption("readOnly"))return e.operation(function(){e.curOp.isVimOp=!0;try{"keyToKey"==i.type?function(n){for(var i;n;)i=/<\w+-.+?>|<\w+>|./.exec(n),t=i[0],n=n.substring(i.index+t.length),p.Vim.handleKey(e,t,"mapping")}(i.toKeys):re.processCommand(e,r,i)}catch(t){throw e.state.vim=void 0,X(e),p.Vim.suppressErrorLogging||console.log(t),t}return!0})}},handleEx:function(e,t){it.processCommand(e,t)},defineMotion:function(e,t){oe[e]=t},defineAction:function(e,t){ce[e]=t},defineOperator:function(e,t){ae[e]=t},mapCommand:function(e,t,n,i,r){var o={keys:e,type:t};for(var s in o[t]=n,o[t+"Args"]=i,r)o[s]=r[s];ot(o)},_mapCommand:ot,defineRegister:function(e,t){var n=U.registerController.registers[e];if(!e||1!=e.length)throw Error("Register name must be 1 character");n[e]=t,B.push(e)},exitVisualMode:Fe,exitInsertMode:rt};function J(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function ee(e,t){e.state.vim.inputState=new J,p.signal(e,"vim-command-done",t)}function te(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function ne(e){this.registers=e,this.unnamedRegister=e['"']=new te,e["."]=new te,e[":"]=new te,e["/"]=new te}function ie(){this.historyBuffer=[],this.iterator,this.initialPrefix=null}J.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},J.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},te.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(q(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},ne.prototype={pushText:function(e,t,n,i,r){i&&"\n"==n.charAt(0)&&(n=n.slice(1)+"\n"),i&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(o){I(e)?o.pushText(n,i):o.setText(n,i,r),this.unnamedRegister.setText(o.toString(),i)}else{switch(t){case"yank":this.registers[0]=new te(n,i,r);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new te(n,i):(this.shiftNumericRegisters_(),this.registers[1]=new te(n,i))}this.unnamedRegister.setText(n,i,r)}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new te),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&N(e,B)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},ie.prototype={nextMatch:function(e,t){var n=this.historyBuffer,i=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var r=this.iterator+i;t?r>=0:r<n.length;r+=i)for(var o=n[r],s=0;s<=o.length;s++)if(this.initialPrefix==o.substring(0,s))return this.iterator=r,o;return r>=n.length?(this.iterator=n.length,this.initialPrefix):r<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var re={matchCommand:function(e,t,n,i){var r,o=function(e,t,n,i){for(var r,o=[],s=[],a=0;a<t.length;a++){var c=t[a];"insert"==n&&"insert"!=c.context||c.context&&c.context!=n||i.operator&&"action"==c.type||!(r=de(e,c.keys))||("partial"==r&&o.push(c),"full"==r&&s.push(c))}return{partial:o.length&&o,full:s.length&&s}}(e,t,i,n);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var s=0;s<o.full.length;s++){var a=o.full[s];r||(r=a)}if("<character>"==r.keys.slice(-11)){var c=function(e){var t=/^.*(<[\w\-]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"<CR>":n="\n";break;case"<Space>":n=" "}return n}(e);if(/<C-.>/.test(c))return{type:"none"};n.selectedCharacter=c}return{type:"full",command:r}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=ue(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var i=t.inputState;if(i.operator){if(i.operator==n.operator)return i.motion="expandToLine",i.motionArgs={linewise:!0},void this.evalInput(e,t);ee(e)}i.operator=n.operator,i.operatorArgs=ue(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var i=t.visualMode,r=ue(n.operatorMotionArgs);r&&i&&r.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),i||this.processMotion(e,t,n)},processAction:function(e,t,n){var i=t.inputState,r=i.getRepeat(),o=!!r,s=ue(n.actionArgs)||{};i.selectedCharacter&&(s.selectedCharacter=i.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),s.repeat=r||1,s.repeatIsExplicit=o,s.registerName=i.registerName,ee(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,i,n),ce[n.action](e,s,t)},processSearch:function(e,t,n){if(e.getSearchCursor){var i=n.searchArgs.forward,r=n.searchArgs.wholeWordOnly;We(e).setReversed(!i);var o=i?"/":"?",s=We(e).getQuery(),a=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var c=U.macroModeState;if(c.isPlaying)d(h=c.replaySearchQueries.shift(),!0,!1);else Ye(e,{onClose:function(t){e.scrollTo(a.left,a.top),d(t,!0,!0);var n=U.macroModeState;n.isRecording&&function(e,t){if(!e.isPlaying){var n=e.latestRegister,i=U.registerController.getRegister(n);i&&i.pushSearchQuery&&i.pushSearchQuery(t)}}(n,t)},prefix:o,desc:qe,onKeyUp:function(t,n,r){var o,s,c=p.keyName(t);"Up"==c||"Down"==c?(o="Up"==c,r(n=U.searchHistoryController.nextMatch(n,o)||"")):"Left"!=c&&"Right"!=c&&"Ctrl"!=c&&"Alt"!=c&&"Shift"!=c&&U.searchHistoryController.reset();try{s=Xe(e,n,!0,!0)}catch(t){}s?e.scrollIntoView(Qe(e,!i,s),30):(Je(e),e.scrollTo(a.left,a.top))},onKeyDown:function(t,n,i){var r=p.keyName(t);"Esc"==r||"Ctrl-C"==r||"Ctrl-["==r||"Backspace"==r&&""==n?(U.searchHistoryController.pushInput(n),U.searchHistoryController.reset(),Xe(e,s),Je(e),e.scrollTo(a.left,a.top),p.e_stop(t),ee(e),i(),e.focus()):"Ctrl-U"==r&&(p.e_stop(t),i(""))}});break;case"wordUnderCursor":var l=De(e,!1,!0,!1,!0),u=!0;if(l||(l=De(e,!1,!0,!1,!1),u=!1),!l)return;var h=e.getLine(l.start.line).substring(l.start.ch,l.end.ch);h=u&&r?"\\b"+h+"\\b":h.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),U.jumpList.cachedCursor=e.getCursor(),e.setCursor(l.start),d(h,!0,!1)}}function d(i,r,o){U.searchHistoryController.pushInput(i),U.searchHistoryController.reset();try{Xe(e,i,r,o)}catch(t){return Ge(e,"Invalid regex: "+i),void ee(e)}re.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}},processEx:function(e,t,n){function i(t){U.exCommandHistoryController.pushInput(t),U.exCommandHistoryController.reset(),it.processCommand(e,t)}function r(t,n,i){var r,o=p.keyName(t);("Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==n)&&(U.exCommandHistoryController.pushInput(n),U.exCommandHistoryController.reset(),p.e_stop(t),ee(e),i(),e.focus()),"Up"==o||"Down"==o?(r="Up"==o,i(n=U.exCommandHistoryController.nextMatch(n,r)||"")):"Ctrl-U"==o?(p.e_stop(t),i("")):"Left"!=o&&"Right"!=o&&"Ctrl"!=o&&"Alt"!=o&&"Shift"!=o&&U.exCommandHistoryController.reset()}"keyToEx"==n.type?it.processCommand(e,n.exArgs.input):t.visualMode?Ye(e,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:r}):Ye(e,{onClose:i,prefix:":",onKeyDown:r})},evalInput:function(e,t){var n,i,r,o=t.inputState,s=o.motion,a=o.motionArgs||{},c=o.operator,l=o.operatorArgs||{},u=o.registerName,h=t.sel,d=pe(t.visualMode?le(e,h.head):e.getCursor("head")),f=pe(t.visualMode?le(e,h.anchor):e.getCursor("anchor")),p=pe(d),g=pe(f);if(c&&this.recordLastEdit(t,o),(r=void 0!==o.repeatOverride?o.repeatOverride:o.getRepeat())>0&&a.explicitRepeat?a.repeatIsExplicit=!0:(a.noRepeat||!a.explicitRepeat&&0===r)&&(r=1,a.repeatIsExplicit=!1),o.selectedCharacter&&(a.selectedCharacter=l.selectedCharacter=o.selectedCharacter),a.repeat=r,ee(e),s){var m=oe[s](e,d,a,t);if(t.lastMotion=oe[s],!m)return;if(a.toJumplist){c||null==e.ace.curOp||(e.ace.curOp.command.scrollIntoView="center-animate");var v=U.jumpList,y=v.cachedCursor;y?(Le(e,y,m),delete v.cachedCursor):Le(e,d,m)}m instanceof Array?(i=m[0],n=m[1]):n=m,n||(n=pe(d)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=le(e,n,t.visualBlock)),i&&(i=le(e,i,!0)),i=i||g,h.anchor=i,h.head=n,Ae(e),je(e,t,"<",me(i,n)?i:n),je(e,t,">",me(i,n)?n:i)):c||(n=le(e,n),e.setCursor(n.line,n.ch))}if(c){if(l.lastSel){i=g;var w=l.lastSel,x=Math.abs(w.head.line-w.anchor.line),_=Math.abs(w.head.ch-w.anchor.ch);n=w.visualLine?b(g.line+x,g.ch):w.visualBlock?b(g.line+x,g.ch+_):w.head.line==w.anchor.line?b(g.line,g.ch+_):b(g.line+x,g.ch),t.visualMode=!0,t.visualLine=w.visualLine,t.visualBlock=w.visualBlock,h=t.sel={anchor:i,head:n},Ae(e)}else t.visualMode&&(l.lastSel={anchor:pe(h.anchor),head:pe(h.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var k,C,E,A,S;if(t.visualMode){if(k=ve(h.head,h.anchor),C=ye(h.head,h.anchor),E=t.visualLine||l.linewise,S=Se(e,{anchor:k,head:C},A=t.visualBlock?"block":E?"line":"char"),E){var F=S.ranges;if("block"==A)for(var T=0;T<F.length;T++)F[T].head.ch=we(e,F[T].head.line);else"line"==A&&(F[0].head=b(F[0].head.line+1,0))}}else{if(k=pe(i||g),me(C=pe(n||p),k)){var D=k;k=C,C=D}(E=a.linewise||l.linewise)?function(e,t,n){t.ch=0,n.ch=0,n.line++}(0,k,C):a.forward&&function(e,t,n){var i=e.getRange(t,n);if(/\n\s*$/.test(i)){var r=i.split("\n");r.pop();for(var o=r.pop();r.length>0&&o&&$(o);o=r.pop())n.line--,n.ch=0;o?(n.line--,n.ch=we(e,n.line)):n.ch=0}}(e,k,C),S=Se(e,{anchor:k,head:C},A="char",!a.inclusive||E)}e.setSelections(S.ranges,S.primary),t.lastMotion=null,l.repeat=r,l.registerName=u,l.linewise=E;var L=ae[c](e,l,S.ranges,g,n);t.visualMode&&Fe(e,null!=L),L&&e.setCursor(L)}},recordLastEdit:function(e,t,n){var i=U.macroModeState;i.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,i.lastInsertModeChanges.changes=[],i.lastInsertModeChanges.expectCursorActivityForChange=!1)}},oe={moveToTopLine:function(e,t,n){var i=et(e).top+n.repeat-1;return b(i,Te(e.getLine(i)))},moveToMiddleLine:function(e){var t=et(e),n=Math.floor(.5*(t.top+t.bottom));return b(n,Te(e.getLine(n)))},moveToBottomLine:function(e,t,n){var i=et(e).bottom-n.repeat+1;return b(i,Te(e.getLine(i)))},expandToLine:function(e,t,n){return b(t.line+n.repeat-1,1/0)},findNext:function(e,t,n){var i=We(e),r=i.getQuery();if(r){var o=!n.forward;return o=i.isReversed()?!o:o,Ze(e,r),Qe(e,o,r,n.repeat)}},goToMark:function(e,t,n,i){var r=i.marks[n.selectedCharacter];if(r){var o=r.find();return n.linewise?{line:o.line,ch:Te(e.getLine(o.line))}:o}return null},moveToOtherHighlightedEnd:function(e,t,n,i){if(i.visualBlock&&n.sameLine){var r=i.sel;return[le(e,b(r.anchor.line,r.head.ch)),le(e,b(r.head.line,r.anchor.ch))]}return[i.sel.head,i.sel.anchor]},jumpToMark:function(e,t,n,i){for(var r=t,o=0;o<n.repeat;o++){var s=r;for(var a in i.marks)if(j(a)){var c=i.marks[a].find();if(!((n.forward?me(c,s):me(s,c))||n.linewise&&c.line==s.line)){var l=ge(s,r),u=n.forward?be(s,c,r):be(r,c,s);(l||u)&&(r=c)}}}return n.linewise&&(r=b(r.line,Te(e.getLine(r.line)))),r},moveByCharacters:function(e,t,n){var i=t,r=n.repeat,o=n.forward?i.ch+r:i.ch-r;return b(i.line,o)},moveByLines:function(e,t,n,i){var r=t,o=r.ch;switch(i.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:o=i.lastHPos;break;default:i.lastHPos=o}var s=n.repeat+(n.repeatOffset||0),a=n.forward?r.line+s:r.line-s,c=e.firstLine(),l=e.lastLine();if(!(a<c&&r.line==c||a>l&&r.line==l)){var u=e.ace.session.getFoldLine(a);return u&&(n.forward?a>u.start.row&&(a=u.end.row+1):a=u.start.row),n.toFirstChar&&(o=Te(e.getLine(a)),i.lastHPos=o),i.lastHSPos=e.charCoords(b(a,o),"div").left,b(a,o)}},moveByDisplayLines:function(e,t,n,i){var r=t;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(r,"div").left}var o=n.repeat;if((a=e.findPosV(r,n.forward?o:-o,"line",i.lastHSPos)).hitSide)if(n.forward)var s={top:e.charCoords(a,"div").top+8,left:i.lastHSPos},a=e.coordsChar(s,"div");else{var c=e.charCoords(b(e.firstLine(),0),"div");c.left=i.lastHSPos,a=e.coordsChar(c,"div")}return i.lastHPos=a.ch,a},moveByPage:function(e,t,n){var i=t,r=n.repeat;return e.findPosV(i,n.forward?r:-r,"page")},moveByParagraph:function(e,t,n){var i=n.forward?1:-1;return $e(e,t,n.repeat,i)},moveByScroll:function(e,t,n,i){var r=e.getScrollInfo(),o=null,s=n.repeat;s||(s=r.clientHeight/(2*e.defaultTextHeight()));var a=e.charCoords(t,"local");if(n.repeat=s,!(o=oe.moveByDisplayLines(e,t,n,i)))return null;var c=e.charCoords(o,"local");return e.scrollTo(null,r.top+c.top-a.top),o},moveByWords:function(e,t,n){return function(e,t,n,i,r,o){var s=pe(t),a=[];(i&&!r||!i&&r)&&n++;for(var c=!(i&&r),l=0;l<n;l++){var u=Be(e,t,i,o,c);if(!u){var h=we(e,e.lastLine());a.push(i?{line:e.lastLine(),from:h,to:h}:{line:0,from:0,to:0});break}a.push(u),t=b(u.line,i?u.to-1:u.from)}var d=a.length!=n,f=a[0],p=a.pop();return i&&!r?(d||f.from==s.ch&&f.line==s.line||(p=a.pop()),b(p.line,p.from)):i&&r?b(p.line,p.to-1):!i&&r?(d||f.to==s.ch&&f.line==s.line||(p=a.pop()),b(p.line,p.to)):b(p.line,p.from)}(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var i=Oe(e,n.repeat,n.forward,n.selectedCharacter),r=n.forward?-1:1;return Pe(r,n),i?(i.ch+=r,i):null},moveToCharacter:function(e,t,n){var i=n.repeat;return Pe(0,n),Oe(e,i,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){return function(e,t,n,i){var r=pe(e.getCursor()),o=n?1:-1,s=n?e.lineCount():-1,a=r.ch,c=r.line,l=e.getLine(c),u={lineText:l,nextCh:l.charAt(a),lastCh:null,index:a,symb:i,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[i],forward:n,depth:0,curMoveThrough:!1},h=Re[i];if(!h)return r;var d=Me[h].init,f=Me[h].isComplete;d&&d(u);for(;c!==s&&t;){if(u.index+=o,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(c+=o,u.lineText=e.getLine(c)||"",o>0)u.index=0;else{var p=u.lineText.length;u.index=p>0?p-1:0}u.nextCh=u.lineText.charAt(u.index)}f(u)&&(r.line=c,r.ch=u.index,t--)}if(u.nextCh||u.curMoveThrough)return b(c,u.index);return r}(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,i){var r=n.repeat;return i.lastHPos=r-1,i.lastHSPos=e.charCoords(t,"div").left,function(e,t){var n=e.getCursor().line;return le(e,b(n,t-1))}(e,r)},moveToEol:function(e,t,n,i){var r=t;i.lastHPos=1/0;var o=b(r.line+n.repeat-1,1/0),s=e.clipPos(o);return s.ch--,i.lastHSPos=e.charCoords(s,"div").left,o},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return b(n.line,Te(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){var n,i=t,r=i.line,o=i.ch,s=e.getLine(r);do{if((n=s.charAt(o++))&&-1!="()[]{}".indexOf(n)){var a=e.getTokenTypeAt(b(r,o));if("string"!==a&&"comment"!==a)break}}while(n);return n?e.findMatchingBracket(b(r,o)).to:i},moveToStartOfLine:function(e,t){return b(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var i=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(i=n.repeat-e.getOption("firstLineNumber")),b(i,Te(e.getLine(i)))},textObjectManipulation:function(e,t,n,i){var r=n.selectedCharacter;"b"==r?r="(":"B"==r&&(r="{");var o,s=!n.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"["}[r])o=function(e,t,n,i){var r,o,s=t,a={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[n],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[n],l=e.getLine(s.line).charAt(s.ch)===c?1:0;if(r=e.scanForBracket(b(s.line,s.ch+l),-1,null,{bracketRegex:a}),o=e.scanForBracket(b(s.line,s.ch+l),1,null,{bracketRegex:a}),!r||!o)return{start:s,end:s};if(r=r.pos,o=o.pos,r.line==o.line&&r.ch>o.ch||r.line>o.line){var u=r;r=o,o=u}i?o.ch+=1:r.ch+=1;return{start:r,end:o}}(e,t,r,s);else if({"'":!0,'"':!0}[r])o=function(e,t,n,i){var r,o,s,a,c=pe(t),l=e.getLine(c.line).split(""),u=l.indexOf(n);c.ch<u?c.ch=u:u<c.ch&&l[c.ch]==n&&(o=c.ch,--c.ch);if(l[c.ch]!=n||o)for(s=c.ch;s>-1&&!r;s--)l[s]==n&&(r=s+1);else r=c.ch+1;if(r&&!o)for(s=r,a=l.length;s<a&&!o;s++)l[s]==n&&(o=s);if(!r||!o)return{start:c,end:c};i&&(--r,++o);return{start:b(c.line,r),end:b(c.line,o)}}(e,t,r,s);else if("W"===r)o=De(e,s,!0,!0);else if("w"===r)o=De(e,s,!0,!1);else{if("p"!==r)return null;if(o=$e(e,t,n.repeat,0,s),n.linewise=!0,i.visualMode)i.visualLine||(i.visualLine=!0);else{var a=i.inputState.operatorArgs;a&&(a.linewise=!0),o.end.line--}}return e.state.vim.visualMode?function(e,t,n){var i,r=e.state.vim.sel,o=r.head,s=r.anchor;me(n,t)&&(i=n,n=t,t=i);me(o,s)?(o=ve(t,o),s=ye(s,n)):(s=ve(t,s),-1==(o=he(o=ye(o,n),0,-1)).ch&&o.line!=e.firstLine()&&(o=b(o.line-1,we(e,o.line-1))));return[s,o]}(e,o.start,o.end):[o.start,o.end]},repeatLastCharacterSearch:function(e,t,n){var i=U.lastChararacterSearch,r=n.repeat,o=n.forward===i.forward,s=(i.increment?1:0)*(o?-1:1);e.moveH(-s,"char"),n.inclusive=!!o;var a=Oe(e,r,o,i.selectedCharacter);return a?(a.ch+=s,a):(e.moveH(s,"char"),t)}};function se(e,t){for(var n=[],i=0;i<t;i++)n.push(e);return n}var ae={change:function(e,t,n){var i,r,o=e.state.vim;if(U.macroModeState.lastInsertModeChanges.inVisualBlock=o.visualBlock,o.visualMode){r=e.getSelection();var s=se("",n.length);e.replaceSelections(s),i=ve(n[0].head,n[0].anchor)}else{var a=n[0].anchor,c=n[0].head;r=e.getRange(a,c);var l=o.lastEditInputState||{};if("moveByWords"==l.motion&&!$(r)){var u=/\s+$/.exec(r);u&&l.motionArgs&&l.motionArgs.forward&&(c=he(c,0,-u[0].length),r=r.slice(0,-u[0].length))}var h=new b(a.line-1,Number.MAX_VALUE),d=e.firstLine()==e.lastLine();c.line>e.lastLine()&&t.linewise&&!d?e.replaceRange("",h,c):e.replaceRange("",a,c),t.linewise&&(d||(e.setCursor(h),p.commands.newlineAndIndent(e)),a.ch=Number.MAX_VALUE),i=a}U.registerController.pushText(t.registerName,"change",r,t.linewise,n.length>1),ce.enterInsertMode(e,{head:i},e.state.vim)},delete:function(e,t,n){var i,r,o=e.state.vim;if(o.visualBlock){r=e.getSelection();var s=se("",n.length);e.replaceSelections(s),i=n[0].anchor}else{var a=n[0].anchor,c=n[0].head;t.linewise&&c.line!=e.firstLine()&&a.line==e.lastLine()&&a.line==c.line-1&&(a.line==e.firstLine()?a.ch=0:a=b(a.line-1,we(e,a.line-1))),r=e.getRange(a,c),e.replaceRange("",a,c),i=a,t.linewise&&(i=oe.moveToFirstNonWhiteSpaceCharacter(e,a))}return U.registerController.pushText(t.registerName,"delete",r,t.linewise,o.visualBlock),le(e,i)},indent:function(e,t,n){var i=e.state.vim,r=n[0].anchor.line,o=i.visualBlock?n[n.length-1].anchor.line:n[0].head.line,s=i.visualMode?t.repeat:1;t.linewise&&o--;for(var a=r;a<=o;a++)for(var c=0;c<s;c++)e.indentLine(a,t.indentRight);return oe.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},changeCase:function(e,t,n,i,r){for(var o=e.getSelections(),s=[],a=t.toLower,c=0;c<o.length;c++){var l=o[c],u="";if(!0===a)u=l.toLowerCase();else if(!1===a)u=l.toUpperCase();else for(var h=0;h<l.length;h++){var d=l.charAt(h);u+=I(d)?d.toLowerCase():d.toUpperCase()}s.push(u)}return e.replaceSelections(s),t.shouldMoveCursor?r:!e.state.vim.visualMode&&t.linewise&&n[0].anchor.line+1==n[0].head.line?oe.moveToFirstNonWhiteSpaceCharacter(e,i):t.linewise?i:ve(n[0].anchor,n[0].head)},yank:function(e,t,n,i){var r=e.state.vim,o=e.getSelection(),s=r.visualMode?ve(r.sel.anchor,r.sel.head,n[0].head,n[0].anchor):i;return U.registerController.pushText(t.registerName,"yank",o,t.linewise,r.visualBlock),s}};var ce={jumpListWalk:function(e,t,n){if(!n.visualMode){var i=t.repeat,r=t.forward,o=U.jumpList.move(e,r?i:-i),s=o?o.find():void 0;s=s||e.getCursor(),e.setCursor(s),e.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(e,t,n){if(!n.visualMode){var i=t.repeat||1,r=e.defaultTextHeight(),o=e.getScrollInfo().top,s=r*i,a=t.forward?o+s:o-s,c=pe(e.getCursor()),l=e.charCoords(c,"local");if(t.forward)a>l.top?(c.line+=(a-l.top)/r,c.line=Math.ceil(c.line),e.setCursor(c),l=e.charCoords(c,"local"),e.scrollTo(null,l.top)):e.scrollTo(null,a);else{var u=a+e.getScrollInfo().clientHeight;u<l.bottom?(c.line-=(l.bottom-u)/r,c.line=Math.floor(c.line),e.setCursor(c),l=e.charCoords(c,"local"),e.scrollTo(null,l.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,a)}}},scrollToCursor:function(e,t){var n=e.getCursor().line,i=e.charCoords(b(n,0),"local"),r=e.getScrollInfo().clientHeight,o=i.top,s=i.bottom-o;switch(t.position){case"center":o=o-r/2+s;break;case"bottom":o=o-r+1.4*s;break;case"top":o+=.4*s}e.scrollTo(null,o)},replayMacro:function(e,t,n){var i=t.selectedCharacter,r=t.repeat,o=U.macroModeState;for("@"==i&&(i=o.latestRegister);r--;)st(e,n,o,i)},enterMacroRecordMode:function(e,t){var n=U.macroModeState,i=t.selectedCharacter;n.enterMacroRecordMode(e,i)},enterInsertMode:function(e,t,n){if(!e.getOption("readOnly")){n.insertMode=!0,n.insertModeRepeat=t&&t.repeat||1;var i=t?t.insertAt:null,r=n.sel,o=t.head||e.getCursor("head"),s=e.listSelections().length;if("eol"==i)o=b(o.line,we(e,o.line));else if("charAfter"==i)o=he(o,0,1);else if("firstNonBlank"==i)o=oe.moveToFirstNonWhiteSpaceCharacter(e,o);else if("startOfSelectedArea"==i)n.visualBlock?(o=b(Math.min(r.head.line,r.anchor.line),Math.min(r.head.ch,r.anchor.ch)),s=Math.abs(r.head.line-r.anchor.line)+1):o=r.head.line<r.anchor.line?r.head:b(r.anchor.line,0);else if("endOfSelectedArea"==i)n.visualBlock?(o=b(Math.min(r.head.line,r.anchor.line),Math.max(r.head.ch+1,r.anchor.ch)),s=Math.abs(r.head.line-r.anchor.line)+1):o=r.head.line>=r.anchor.line?he(r.head,0,1):b(r.anchor.line,0);else if("inplace"==i&&n.visualMode)return;e.setOption("keyMap","vim-insert"),e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),p.signal(e,"vim-mode-change",{mode:"replace"})):(e.setOption("keyMap","vim-insert"),p.signal(e,"vim-mode-change",{mode:"insert"})),U.macroModeState.isPlaying||(e.on("change",at),p.on(e.getInputField(),"keydown",ht)),n.visualMode&&Fe(e),Ce(e,o,s)}},toggleVisualMode:function(e,t,n){var i,r=t.repeat,o=e.getCursor();n.visualMode?n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,p.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Ae(e)):Fe(e):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,i=le(e,b(o.line,o.ch+r-1),!0),n.sel={anchor:o,head:i},p.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Ae(e),je(e,n,"<",ve(o,i)),je(e,n,">",ye(o,i)))},reselectLastSelection:function(e,t,n){var i=n.lastSelection;if(n.visualMode&&Ee(e,n),i){var r=i.anchorMark.find(),o=i.headMark.find();if(!r||!o)return;n.sel={anchor:r,head:o},n.visualMode=!0,n.visualLine=i.visualLine,n.visualBlock=i.visualBlock,Ae(e),je(e,n,"<",ve(r,o)),je(e,n,">",ye(r,o)),p.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var i,r;if(n.visualMode){if(i=e.getCursor("anchor"),me(r=e.getCursor("head"),i)){var o=r;r=i,i=o}r.ch=we(e,r.line)-1}else{var s=Math.max(t.repeat,2);i=e.getCursor(),r=le(e,b(i.line+s-1,1/0))}for(var a=0,c=i.line;c<r.line;c++){a=we(e,i.line);o=b(i.line+1,we(e,i.line+1));var l=e.getRange(i,o);l=l.replace(/\n\s*/g," "),e.replaceRange(l,i,o)}var u=b(i.line,a);n.visualMode&&Fe(e,!1),e.setCursor(u)},newLineAndEnterInsertMode:function(e,t,n){n.insertMode=!0;var i=pe(e.getCursor());i.line!==e.firstLine()||t.after?(i.line=t.after?i.line:i.line-1,i.ch=we(e,i.line),e.setCursor(i),(p.commands.newlineAndIndentContinueComment||p.commands.newlineAndIndent)(e)):(e.replaceRange("\n",b(e.firstLine(),0)),e.setCursor(e.firstLine(),0));this.enterInsertMode(e,{repeat:t.repeat},n)},paste:function(e,t,n){var i=pe(e.getCursor()),r=U.registerController.getRegister(t.registerName);if(d=r.toString()){if(t.matchIndent){var o=e.getOption("tabSize"),s=function(e){var t=e.split("\t").length-1,n=e.split(" ").length-1;return t*o+1*n},a=e.getLine(e.getCursor().line),c=s(a.match(/^\s*/)[0]),l=d.replace(/\n$/,""),u=d!==l,h=s(d.match(/^\s*/)[0]),d=l.replace(/^\s*/gm,function(t){var n=c+(s(t)-h);if(n<0)return"";if(e.getOption("indentWithTabs")){var i=Math.floor(n/o);return Array(i+1).join("\t")}return Array(n+1).join(" ")});d+=u?"\n":""}if(t.repeat>1)d=Array(t.repeat+1).join(d);var f,p,g=r.linewise,m=r.blockwise;if(g&&!m)n.visualMode?d=n.visualLine?d.slice(0,-1):"\n"+d.slice(0,d.length-1)+"\n":t.after?(d="\n"+d.slice(0,d.length-1),i.ch=we(e,i.line)):i.ch=0;else{if(m){d=d.split("\n");for(var v=0;v<d.length;v++)d[v]=""==d[v]?" ":d[v]}i.ch+=t.after?1:0}if(n.visualMode){var y;n.lastPastedText=d;var w=function(e,t){var n=t.lastSelection;return t.visualMode?(i=e.listSelections(),r=i[0],o=i[i.length-1],s=me(r.anchor,r.head)?r.anchor:r.head,a=me(o.anchor,o.head)?o.head:o.anchor,[s,a]):function(){var t=e.getCursor(),i=e.getCursor(),r=n.visualBlock;if(r){var o=r.width,s=r.height;i=b(t.line+s,t.ch+o);for(var a=[],c=t.line;c<i.line;c++){var l=b(c,t.ch),u=b(c,i.ch),h={anchor:l,head:u};a.push(h)}e.setSelections(a)}else{var d=n.anchorMark.find(),f=n.headMark.find(),p=f.line-d.line,g=f.ch-d.ch;i={line:i.line+p,ch:p?i.ch:g+i.ch},n.visualLine&&(t=b(t.line,0),i=b(i.line,we(e,i.line))),e.setSelection(t,i)}return[t,i]}();var i,r,o,s,a}(e,n),x=w[0],_=w[1],k=e.getSelection(),C=e.listSelections(),E=new Array(C.length).join("1").split("1");n.lastSelection&&(y=n.lastSelection.headMark.find()),U.registerController.unnamedRegister.setText(k),m?(e.replaceSelections(E),_=b(x.line+d.length-1,x.ch),e.setCursor(x),ke(e,_),e.replaceSelections(d),f=x):n.visualBlock?(e.replaceSelections(E),e.setCursor(x),e.replaceRange(d,x,x),f=x):(e.replaceRange(d,x,_),f=e.posFromIndex(e.indexFromPos(x)+d.length-1)),y&&(n.lastSelection.headMark=e.setBookmark(y)),g&&(f.ch=0)}else if(m){e.setCursor(i);for(v=0;v<d.length;v++){var A=i.line+v;A>e.lastLine()&&e.replaceRange("\n",b(A,0)),we(e,A)<i.ch&&_e(e,A,i.ch)}e.setCursor(i),ke(e,b(i.line+d.length-1,i.ch)),e.replaceSelections(d),f=i}else e.replaceRange(d,i),g&&t.after?f=b(i.line+1,Te(e.getLine(i.line+1))):g&&!t.after?f=b(i.line,Te(e.getLine(i.line))):!g&&t.after?(p=e.indexFromPos(i),f=e.posFromIndex(p+d.length-1)):(p=e.indexFromPos(i),f=e.posFromIndex(p+d.length));n.visualMode&&Fe(e,!1),e.setCursor(f)}},undo:function(e,t){e.operation(function(){fe(e,p.commands.undo,t.repeat)(),e.setCursor(e.getCursor("anchor"))})},redo:function(e,t){fe(e,p.commands.redo,t.repeat)()},setRegister:function(e,t,n){n.inputState.registerName=t.selectedCharacter},setMark:function(e,t,n){je(e,n,t.selectedCharacter,e.getCursor())},replace:function(e,t,n){var i,r,o=t.selectedCharacter,s=e.getCursor(),a=e.listSelections();if(n.visualMode)s=e.getCursor("start"),r=e.getCursor("end");else{var c=e.getLine(s.line);(i=s.ch+t.repeat)>c.length&&(i=c.length),r=b(s.line,i)}if("\n"==o)n.visualMode||e.replaceRange("",s,r),(p.commands.newlineAndIndentContinueComment||p.commands.newlineAndIndent)(e);else{var l=e.getRange(s,r);if(l=l.replace(/[^\n]/g,o),n.visualBlock){var u=new Array(e.getOption("tabSize")+1).join(" ");l=(l=e.getSelection()).replace(/\t/g,u).replace(/[^\n]/g,o).split("\n"),e.replaceSelections(l)}else e.replaceRange(l,s,r);n.visualMode?(s=me(a[0].anchor,a[0].head)?a[0].anchor:a[0].head,e.setCursor(s),Fe(e,!1)):e.setCursor(he(r,0,-1))}},incrementNumberToken:function(e,t){for(var n,i,r,o,s,a=e.getCursor(),c=e.getLine(a.line),l=/-?\d+/g;null!==(n=l.exec(c))&&(s=n[0],r=(i=n.index)+s.length,!(a.ch<r)););if((t.backtrack||!(r<=a.ch))&&s){var u=t.increase?1:-1,h=parseInt(s)+u*t.repeat,d=b(a.line,i),f=b(a.line,r);o=h.toString(),e.replaceRange(o,d,f),e.setCursor(b(a.line,i+o.length-1))}},repeatLastEdit:function(e,t,n){if(n.lastEditInputState){var i=t.repeat;i&&t.repeatIsExplicit?n.lastEditInputState.repeatOverride=i:i=n.lastEditInputState.repeatOverride||i,dt(e,n,i,!1)}},exitInsertMode:rt};function le(e,t,n){var i=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),r=we(e,i)-1;r=n?r+1:r;var o=Math.min(Math.max(0,t.ch),r);return b(i,o)}function ue(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function he(e,t,n){return"object"==typeof t&&(n=t.ch,t=t.line),b(e.line+t,e.ch+n)}function de(e,t){if("<character>"==t.slice(-11)){var n=t.length-11,i=e.slice(0,n),r=t.slice(0,n);return i==r&&e.length>n?"full":0==r.indexOf(i)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function fe(e,t,n){return function(){for(var i=0;i<n;i++)t(e)}}function pe(e){return b(e.line,e.ch)}function ge(e,t){return e.ch==t.ch&&e.line==t.line}function me(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function ve(e,t){return arguments.length>2&&(t=ve.apply(void 0,Array.prototype.slice.call(arguments,1))),me(e,t)?e:t}function ye(e,t){return arguments.length>2&&(t=ye.apply(void 0,Array.prototype.slice.call(arguments,1))),me(e,t)?t:e}function be(e,t,n){var i=me(e,t),r=me(t,n);return i&&r}function we(e,t){return e.getLine(t).length}function xe(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function _e(e,t,n){var i=we(e,t),r=new Array(n-i+1).join(" ");e.setCursor(b(t,i)),e.replaceRange(r,e.getCursor())}function ke(e,t){var n=[],i=e.listSelections(),r=pe(e.clipPos(t)),o=!ge(t,r),s=function(e,t,n){for(var i=0;i<e.length;i++){var r="head"!=n&&ge(e[i].anchor,t),o="anchor"!=n&&ge(e[i].head,t);if(r||o)return i}return-1}(i,e.getCursor("head")),a=ge(i[s].head,i[s].anchor),c=i.length-1,l=c-s>s?c:0,u=i[l].anchor,h=Math.min(u.line,r.line),d=Math.max(u.line,r.line),f=u.ch,p=r.ch,g=i[l].head.ch-f,m=p-f;g>0&&m<=0?(f++,o||p--):g<0&&m>=0?(f--,a||p++):g<0&&-1==m&&(f--,p++);for(var v=h;v<=d;v++){var y={anchor:new b(v,f),head:new b(v,p)};n.push(y)}return s=r.line==d?n.length-1:0,e.setSelections(n),t.ch=p,u.ch=f,u}function Ce(e,t,n){for(var i=[],r=0;r<n;r++){var o=he(t,r,0);i.push({anchor:o,head:o})}e.setSelections(i,0)}function Ee(e,t){var n=t.sel.anchor,i=t.sel.head;t.lastPastedText&&(i=e.posFromIndex(e.indexFromPos(n)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(n),headMark:e.setBookmark(i),anchor:pe(n),head:pe(i),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function Ae(e,t,n){var i=e.state.vim,r=Se(e,t=t||i.sel,n=n||i.visualLine?"line":i.visualBlock?"block":"char");e.setSelections(r.ranges,r.primary),lt(e)}function Se(e,t,n,i){var r=pe(t.head),o=pe(t.anchor);if("char"==n){var s=i||me(t.head,t.anchor)?0:1,a=me(t.head,t.anchor)?1:0;return r=he(t.head,0,s),{ranges:[{anchor:o=he(t.anchor,0,a),head:r}],primary:0}}if("line"==n){if(me(t.head,t.anchor))r.ch=0,o.ch=we(e,o.line);else{o.ch=0;var c=e.lastLine();r.line>c&&(r.line=c),r.ch=we(e,r.line)}return{ranges:[{anchor:o,head:r}],primary:0}}if("block"==n){for(var l=Math.min(o.line,r.line),u=Math.min(o.ch,r.ch),h=Math.max(o.line,r.line),d=Math.max(o.ch,r.ch)+1,f=h-l+1,p=r.line==l?0:f-1,g=[],m=0;m<f;m++)g.push({anchor:b(l+m,u),head:b(l+m,d)});return{ranges:g,primary:p}}}function Fe(e,t){var n=e.state.vim;!1!==t&&e.setCursor(le(e,n.sel.head)),Ee(e,n),n.visualMode=!1,n.visualLine=!1,n.visualBlock=!1,p.signal(e,"vim-mode-change",{mode:"normal"}),n.fakeCursor&&n.fakeCursor.clear()}function Te(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function De(e,t,n,i,r){for(var o=function(e){var t=e.getCursor("head");return 1==e.getSelection().length&&(t=ve(t,e.getCursor("anchor"))),t}(e),s=e.getLine(o.line),a=o.ch,c=r?F[0]:T[0];!c(s.charAt(a));)if(++a>=s.length)return null;i?c=T[0]:(c=F[0])(s.charAt(a))||(c=F[1]);for(var l=a,u=a;c(s.charAt(l))&&l<s.length;)l++;for(;c(s.charAt(u))&&u>=0;)u--;if(u++,t){for(var h=l;/\s/.test(s.charAt(l))&&l<s.length;)l++;if(h==l){for(var d=u;/\s/.test(s.charAt(u-1))&&u>0;)u--;u||(u=d)}}return{start:b(o.line,u),end:b(o.line,l)}}function Le(e,t,n){ge(t,n)||U.jumpList.add(e,t,n)}function Pe(e,t){U.lastChararacterSearch.increment=e,U.lastChararacterSearch.forward=t.forward,U.lastChararacterSearch.selectedCharacter=t.selectedCharacter}var Re={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Me={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function Be(e,t,n,i,r){var o=t.line,s=t.ch,a=e.getLine(o),c=n?1:-1,l=i?T:F;if(r&&""==a){if(o+=c,a=e.getLine(o),!O(e,o))return null;s=n?0:a.length}for(;;){if(r&&""==a)return{from:0,to:0,line:o};for(var u=c>0?a.length:-1,h=u,d=u;s!=u;){for(var f=!1,p=0;p<l.length&&!f;++p)if(l[p](a.charAt(s))){for(h=s;s!=u&&l[p](a.charAt(s));)s+=c;if(f=h!=(d=s),h==t.ch&&o==t.line&&d==h+c)continue;return{from:Math.min(h,d+1),to:Math.max(h,d),line:o}}f||(s+=c)}if(!O(e,o+=c))return null;a=e.getLine(o),s=c>0?0:a.length}throw new Error("The impossible happened.")}function Oe(e,t,n,i){for(var r,o=e.getCursor(),s=o.ch,a=0;a<t;a++){if(-1==(r=Ie(s,e.getLine(o.line),i,n,!0)))return null;s=r}return b(e.getCursor().line,r)}function je(e,t,n,i){N(n,M)&&(t.marks[n]&&t.marks[n].clear(),t.marks[n]=e.setBookmark(i))}function Ie(e,t,n,i,r){var o;return i?-1==(o=t.indexOf(n,e+1))||r||(o-=1):-1==(o=t.lastIndexOf(n,e-1))||r||(o+=1),o}function $e(e,t,n,i,r){var o,s=t.line,a=e.firstLine(),c=e.lastLine(),l=s;function u(t){return!/\S/.test(e.getLine(t))}function h(e,t,n){return n?u(e)!=u(e+t):!u(e)&&u(e+t)}function d(t){i=i>0?1:-1;var n=e.ace.session.getFoldLine(t);n&&t+i>n.start.row&&t+i<n.end.row&&(i=(i>0?n.end.row:n.start.row)-t)}if(i){for(;a<=l&&l<=c&&n>0;)d(l),h(l,i)&&n--,l+=i;return new b(l,0)}var f=e.state.vim;if(f.visualLine&&h(s,1,!0)){var p=f.sel.anchor;h(p.line,-1,!0)&&(r&&p.line==s||(s+=1))}var g=u(s);for(l=s;l<=c&&n;l++)h(l,1,!0)&&(r&&u(l)==g||n--);for(o=new b(l,0),l>c&&!g?g=!0:r=!1,l=s;l>a&&(r&&u(l)!=g&&l!=s||!h(l,-1,!0));l--);return{start:new b(l,0),end:o}}function Ne(){}function We(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Ne)}function ze(e,t,n,i,r){e.openDialog?e.openDialog(t,i,{bottom:!0,value:r.value,onKeyDown:r.onKeyDown,onKeyUp:r.onKeyUp,selectValueOnOpen:!1}):i(prompt(n,""))}function He(e){var t=Ve(e)||[];if(!t.length)return[];var n=[];if(0===t[0]){for(var i=0;i<t.length;i++)"number"==typeof t[i]&&n.push(e.substring(t[i]+1,t[i+1]));return n}}function Ve(e){for(var t=!1,n=[],i=0;i<e.length;i++){var r=e.charAt(i);t||"/"!=r||n.push(i),t=!t&&"\\"==r}return n}z("pcre",!0,"boolean"),Ne.prototype={getQuery:function(){return U.query},setQuery:function(e){U.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return U.isReversed},setReversed:function(e){U.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Ue={"\\n":"\n","\\r":"\r","\\t":"\t"};var Ke={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"};function Ge(e,t){e.openNotification?e.openNotification('<span style="color: red">'+t+"</span>",{bottom:!0,duration:5e3}):alert(t)}var qe="(Javascript regexp)";function Ye(e,t){var n,i,r,o=(t.prefix||"")+" "+(t.desc||"");ze(e,(n=t.prefix,i=t.desc,r="",n&&(r+='<span style="font-family: monospace">'+n+"</span>"),r+='<input type="text"/> <span style="color: #888">',i&&(r+='<span style="color: #888">',r+=i,r+="</span>"),r),o,t.onClose,t)}function Xe(e,t,n,i){if(t){var r=We(e),o=function(e,t,n){if(U.registerController.getRegister("/").setText(e),e instanceof RegExp)return e;var i,r,o=Ve(e);return o.length?(i=e.substring(0,o[0]),r=-1!=e.substring(o[0]).indexOf("i")):i=e,i?(V("pcre")||(i=function(e){for(var t=!1,n=[],i=-1;i<e.length;i++){var r=e.charAt(i)||"",o=e.charAt(i+1)||"",s=o&&-1!="|(){".indexOf(o);t?("\\"===r&&s||n.push(r),t=!1):"\\"===r?(t=!0,o&&-1!="}".indexOf(o)&&(s=!0),s&&"\\"!==o||n.push(r)):(n.push(r),s&&"\\"!==o&&n.push("\\"))}return n.join("")}(i)),n&&(t=/^[^A-Z]*$/.test(i)),new RegExp(i,t||r?"i":void 0)):null}(t,!!n,!!i);if(o)return Ze(e,o),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],i=0;i<n.length;i++){var r=n[i];if(e[r]!==t[r])return!1}return!0}return!1}(o,r.getQuery())?o:(r.setQuery(o),o)}}function Ze(e,t){var n=We(e),i=n.getOverlay();i&&t==i.query||(i&&e.removeOverlay(i),i=function(e){if("^"==e.source.charAt(0))var t=!0;return{token:function(n){if(!t||n.sol()){var i=n.match(e,!1);if(i)return 0==i[0].length?(n.next(),"searching"):n.sol()||(n.backUp(1),e.exec(n.next()+i[0]))?(n.match(e),"searching"):(n.next(),null);for(;!n.eol()&&(n.next(),!n.match(e,!1)););}else n.skipToEnd()},query:e}}(t),e.addOverlay(i),e.showMatchesOnScrollbar&&(n.getScrollbarAnnotate()&&n.getScrollbarAnnotate().clear(),n.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),n.setOverlay(i))}function Qe(e,t,n,i){return void 0===i&&(i=1),e.operation(function(){for(var r=e.getCursor(),o=e.getSearchCursor(n,r),s=0;s<i;s++){var a=o.find(t);if(0==s&&a&&ge(o.from(),r)&&(a=o.find(t)),!a&&!(o=e.getSearchCursor(n,t?b(e.lastLine()):b(e.firstLine(),0))).find(t))return}return o.from()})}function Je(e){var t=We(e);e.removeOverlay(We(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function et(e){var t=e.ace.renderer;return{top:t.getFirstFullyVisibleRow(),bottom:t.getLastFullyVisibleRow()}}var tt=function(){this.buildCommandMap_()};tt.prototype={processCommand:function(e,t,n){var i=this;e.operation(function(){e.curOp.isVimOp=!0,i._processCommand(e,t,n)})},_processCommand:function(e,t,n){var i=e.state.vim,r=U.registerController.getRegister(":"),o=r.toString();i.visualMode&&Fe(e);var s=new p.StringStream(t);r.setText(t);var a,c,l=n||{};l.input=t;try{this.parseInput_(e,s,l)}catch(t){throw Ge(e,t),t}if(l.commandName){if(a=this.matchCommand_(l.commandName)){if(c=a.name,a.excludeFromCommandHistory&&r.setText(o),this.parseCommandArgs_(s,l,a),"exToKey"==a.type){for(var u=0;u<a.toKeys.length;u++)p.Vim.handleKey(e,a.toKeys[u],"mapping");return}if("exToEx"==a.type)return void this.processCommand(e,a.toInput)}}else void 0!==l.line&&(c="move");if(c)try{nt[c](e,l),a&&a.possiblyAsync||!l.callback||l.callback()}catch(t){throw Ge(e,t),t}else Ge(e,'Not an editor command ":'+t+'"')},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),void 0!==n.line&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));var i=t.match(/^(\w+)/);return n.commandName=i?i[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return e.getCursor().line;case"$":return e.lastLine();case"'":var i=e.state.vim.marks[t.next()];if(i&&i.find())return i.find().line;throw new Error("Mark not set");default:return void t.backUp(1)}},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var i=n.argDelimiter||/\s+/,r=xe(t.argString).split(i);r.length&&r[0]&&(t.args=r)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var i=this.commandMap_[n];if(0===i.name.indexOf(e))return i}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<y.length;e++){var t=y[e],n=t.shortName||t.name;this.commandMap_[n]=t}},map:function(e,t,n){if(":"!=e&&":"==e.charAt(0)){if(n)throw Error("Mode not supported for ex mappings");var i=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[i]={name:i,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[i]={name:i,type:"exToKey",toKeys:t,user:!0}}else if(":"!=t&&":"==t.charAt(0)){var r={keys:e,type:"keyToEx",exArgs:{input:t.substring(1)},user:!0};n&&(r.context=n),v.unshift(r)}else{r={keys:e,type:"keyToKey",toKeys:t,user:!0};n&&(r.context=n),v.unshift(r)}},unmap:function(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var n=e.substring(1);if(this.commandMap_[n]&&this.commandMap_[n].user)return void delete this.commandMap_[n]}else for(var i=e,r=0;r<v.length;r++)if(i==v[r].keys&&v[r].context===t&&v[r].user)return void v.splice(r,1)}};var nt={colorscheme:function(e,t){!t.args||t.args.length<1?Ge(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,n){var i=t.args;!i||i.length<2?e&&Ge(e,"Invalid mapping: "+t.input):it.map(i[0],i[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var i=t.args;!i||i.length<1?e&&Ge(e,"No such mapping: "+t.input):it.unmap(i[0],n)},move:function(e,t){re.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args,i=t.setCfg||{};if(!n||n.length<1)e&&Ge(e,"Invalid mapping: "+t.input);else{var r=n[0].split("="),o=r[0],s=r[1],a=!1;if("?"==o.charAt(o.length-1)){if(s)throw Error("Trailing characters: "+t.argString);o=o.substring(0,o.length-1),a=!0}void 0===s&&"no"==o.substring(0,2)&&(o=o.substring(2),s=!1);var c=W[o]&&"boolean"==W[o].type;if(c&&void 0==s&&(s=!0),!c&&void 0===s||a){var l=V(o,e,i);Ge(e,!0===l||!1===l?" "+(l?"":"no")+o:" "+o+"="+l)}else H(o,s,e,i)}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var n=t.args,i=U.registerController.registers,r="----------Registers----------<br><br>";if(n){n=n.join("");for(var o=0;o<n.length;o++){if(s=n.charAt(o),U.registerController.isValidRegister(s))r+='"'+s+" "+(i[s]||new te).toString()+"<br>"}}else for(var s in i){var a=i[s].toString();a.length&&(r+='"'+s+" "+a+"<br>")}Ge(e,r)},sort:function(e,t){var n,i,r,o;var s=function(){if(t.argString){var e=new p.StringStream(t.argString);if(e.eat("!")&&(n=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var s=e.match(/[a-z]+/);if(s){s=s[0],i=-1!=s.indexOf("i"),r=-1!=s.indexOf("u");var a=-1!=s.indexOf("d")&&1,c=-1!=s.indexOf("x")&&1,l=-1!=s.indexOf("o")&&1;if(a+c+l>1)return"Invalid arguments";o=(a?"decimal":c&&"hex")||l&&"octal"}if(e.match(/\/.*\//))return"patterns not supported"}}();if(s)Ge(e,s+": "+t.argString);else{var a=t.line||e.firstLine(),c=t.lineEnd||t.line||e.lastLine();if(a!=c){var l=b(a,0),u=b(c,we(e,c)),h=e.getRange(l,u).split("\n"),d="decimal"==o?/(-?)([\d]+)/:"hex"==o?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==o?/([0-7]+)/:null,f="decimal"==o?10:"hex"==o?16:"octal"==o?8:null,g=[],m=[];if(o)for(var v=0;v<h.length;v++)d.exec(h[v])?g.push(h[v]):m.push(h[v]);else m=h;if(g.sort(x),m.sort(x),h=n?g.concat(m):m.concat(g),r){var y,w=h;h=[];for(v=0;v<w.length;v++)w[v]!=y&&h.push(w[v]),y=w[v]}e.replaceRange(h.join("\n"),l,u)}}function x(e,t){var r;n&&(r=e,e=t,t=r);i&&(e=e.toLowerCase(),t=t.toLowerCase());var s=o&&d.exec(e),a=o&&d.exec(t);return s?(s=parseInt((s[1]+s[2]).toLowerCase(),f))-(a=parseInt((a[1]+a[2]).toLowerCase(),f)):e<t?-1:1}},global:function(e,t){var n=t.argString;if(n){var i,r=void 0!==t.line?t.line:e.firstLine(),o=t.lineEnd||t.line||e.lastLine(),s=He(n),a=n;if(s.length&&(a=s[0],i=s.slice(1,s.length).join("/")),a)try{Xe(e,a,!0,!0)}catch(t){return void Ge(e,"Invalid regex: "+a)}for(var c=We(e).getQuery(),l=[],u="",h=r;h<=o;h++){c.test(e.getLine(h))&&(l.push(h+1),u+=e.getLine(h)+"<br>")}if(i){var d=0,f=function(){if(d<l.length){var t=l[d]+i;it.processCommand(e,t,{callback:f})}d++};f()}else Ge(e,u)}else Ge(e,"Regular Expression missing from global")},substitute:function(e,t){if(!e.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var n,i,r,o,s=t.argString,a=s?He(s):[],c="",l=!1,u=!1;if(a.length)n=a[0],void 0!==(c=a[1])&&(c=V("pcre")?function(e){for(var t=new p.StringStream(e),n=[];!t.eol();){for(;t.peek()&&"\\"!=t.peek();)n.push(t.next());var i=!1;for(var r in Ke)if(t.match(r,!0)){i=!0,n.push(Ke[r]);break}i||n.push(t.next())}return n.join("")}(c):function(e){for(var t,n=!1,i=[],r=-1;r<e.length;r++){var o=e.charAt(r)||"",s=e.charAt(r+1)||"";Ue[o+s]?(i.push(Ue[o+s]),r++):n?(i.push(o),n=!1):"\\"===o?(n=!0,t=s,S.test(t)||"$"===s?i.push("$"):"/"!==s&&"\\"!==s&&i.push("\\")):("$"===o&&i.push("$"),i.push(o),"/"===s&&i.push("\\"))}return i.join("")}(c),U.lastSubstituteReplacePart=c),i=a[2]?a[2].split(" "):[];else if(s&&s.length)return void Ge(e,"Substitutions should be of the form :s/pattern/replace/");if(i&&(r=i[0],o=parseInt(i[1]),r&&(-1!=r.indexOf("c")&&(l=!0,r.replace("c","")),-1!=r.indexOf("g")&&(u=!0,r.replace("g","")),n=n+"/"+r)),n)try{Xe(e,n,!0,!0)}catch(t){return void Ge(e,"Invalid regex: "+n)}if(void 0!==(c=c||U.lastSubstituteReplacePart)){var h=We(e).getQuery(),d=void 0!==t.line?t.line:e.getCursor().line,f=t.lineEnd||d;d==e.firstLine()&&f==e.lastLine()&&(f=1/0),o&&(f=(d=f)+o-1);var g=le(e,b(d,0));!function(e,t,n,i,r,o,s,a,c){e.state.vim.exMode=!0;var l=!1,u=o.from();function h(){e.operation(function(){for(;!l;)d(),f();g()})}function d(){var t=e.getRange(o.from(),o.to()),n=t.replace(s,a);o.replace(n)}function f(){for(;o.findNext()&&(t=o.from(),s=i,a=r,"number"!=typeof t&&(t=t.line),s instanceof Array?N(t,s):a?t>=s&&t<=a:t==s);)if(n||!u||o.from().line!=u.line)return e.scrollIntoView(o.from(),30),e.setSelection(o.from(),o.to()),u=o.from(),void(l=!1);var t,s,a;l=!0}function g(t){if(t&&t(),e.focus(),u){e.setCursor(u);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=u.ch}c&&c()}if(f(),l)return void Ge(e,"No matches for "+s.source);if(!t)return h(),void(c&&c());Ye(e,{prefix:"replace with <strong>"+a+"</strong> (y/n/a/q/l)",onKeyDown:function(t,n,i){switch(p.e_stop(t),p.keyName(t)){case"Y":d(),f();break;case"N":f();break;case"A":var r=c;c=void 0,e.operation(h),c=r;break;case"L":d();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":g(i)}l&&g(i);return!0}})}(e,l,u,d,f,e.getSearchCursor(h,g),h,c,t.callback)}else Ge(e,"No previous substitute regular expression")},redo:p.commands.redo,undo:p.commands.undo,write:function(e){p.commands.save?p.commands.save(e):e.save()},nohlsearch:function(e){Je(e)},delmarks:function(e,t){if(t.argString&&xe(t.argString))for(var n=e.state.vim,i=new p.StringStream(xe(t.argString));!i.eol();){i.eatSpace();var r=i.pos;if(!i.match(/[a-zA-Z]/,!1))return void Ge(e,"Invalid argument: "+t.argString.substring(r));var o=i.next();if(i.match("-",!0)){if(!i.match(/[a-zA-Z]/,!1))return void Ge(e,"Invalid argument: "+t.argString.substring(r));var s=o,a=i.next();if(!(j(s)&&j(a)||I(s)&&I(a)))return void Ge(e,"Invalid argument: "+s+"-");var c=s.charCodeAt(0),l=a.charCodeAt(0);if(c>=l)return void Ge(e,"Invalid argument: "+t.argString.substring(r));for(var u=0;u<=l-c;u++){var h=String.fromCharCode(c+u);delete n.marks[h]}}else delete n.marks[o]}else Ge(e,"Argument acequired")}},it=new tt;function rt(e){var t=e.state.vim,n=U.macroModeState,i=U.registerController.getRegister("."),r=n.isPlaying,o=n.lastInsertModeChanges,s=[];if(!r){for(var a=o.inVisualBlock?t.lastSelection.visualBlock.height:1,c=o.changes,l=(s=[],0);l<c.length;)s.push(c[l]),c[l]instanceof ut?l++:l+=a;o.changes=s,e.off("change",at),p.off(e.getInputField(),"keydown",ht)}!r&&t.insertModeRepeat>1&&(dt(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),o.overwrite=e.state.overwrite,e.toggleOverwrite(!1),i.setText(o.changes.join("")),p.signal(e,"vim-mode-change",{mode:"normal"}),n.isRecording&&function(e){if(e.isPlaying)return;var t=e.latestRegister,n=U.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}(n)}function ot(e){v.unshift(e)}function st(e,t,n,i){var r=U.registerController.getRegister(i);if(":"==i)return r.keyBuffer[0]&&it.processCommand(e,r.keyBuffer[0]),void(n.isPlaying=!1);var o=r.keyBuffer,s=0;n.isPlaying=!0,n.replaySearchQueries=r.searchQueries.slice(0);for(var a=0;a<o.length;a++)for(var c,l,u=o[a];u;)if(l=(c=/<\w+-.+?>|<\w+>|./.exec(u))[0],u=u.substring(c.index+l.length),p.Vim.handleKey(e,l,"macro"),t.insertMode){var h=r.insertModeChanges[s++].changes;U.macroModeState.lastInsertModeChanges.changes=h,ft(e,h,1),rt(e)}n.isPlaying=!1}function at(e,t){var n=U.macroModeState,i=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(i.expectCursorActivityForChange=!0,"+input"==t.origin||"paste"==t.origin||void 0===t.origin){var r=t.text.join("\n");i.maybeReset&&(i.changes=[],i.maybeReset=!1),i.changes.push(r)}t=t.next}}function ct(e){var t=e.state.vim;if(t.insertMode){var n=U.macroModeState;if(n.isPlaying)return;var i=n.lastInsertModeChanges;i.expectCursorActivityForChange?i.expectCursorActivityForChange=!1:i.maybeReset=!0}else e.curOp.isVimOp||function(e,t){var n=e.getCursor("anchor"),i=e.getCursor("head");t.visualMode&&!e.somethingSelected()?Fe(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,p.signal(e,"vim-mode-change",{mode:"visual"}));if(t.visualMode){var r=me(i,n)?0:-1,o=me(i,n)?-1:0;i=he(i,0,r),n=he(n,0,o),t.sel={anchor:n,head:i},je(e,t,"<",ve(i,n)),je(e,t,">",ye(i,n))}else t.insertMode||(t.lastHPos=e.getCursor().ch)}(e,t);t.visualMode&<(e)}function lt(e){var t=e.state.vim,n=le(e,pe(t.sel.head)),i=he(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,i,{className:"cm-animate-fat-cursor"})}function ut(e){this.keyName=e}function ht(e){var t=U.macroModeState.lastInsertModeChanges,n=p.keyName(e);n&&(-1==n.indexOf("Delete")&&-1==n.indexOf("Backspace")||p.lookupKey(n,"vim-insert",function(){return t.maybeReset&&(t.changes=[],t.maybeReset=!1),t.changes.push(new ut(n)),!0}))}function dt(e,t,n,i){var r=U.macroModeState;r.isPlaying=!0;var o=!!t.lastEditActionCommand,s=t.inputState;function a(){o?re.processAction(e,t,t.lastEditActionCommand):re.evalInput(e,t)}function c(n){if(r.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var i=r.lastInsertModeChanges;ft(e,i.changes,n,i.overwrite)}}if(t.inputState=t.lastEditInputState,o&&t.lastEditActionCommand.interlaceInsertRepeat)for(var l=0;l<n;l++)a(),c(1);else i||a(),c(n);t.inputState=s,t.insertMode&&!i&&rt(e),r.isPlaying=!1}function ft(e,t,n,i){function r(t){return"string"==typeof t?p.commands[t](e):t(e),!0}var o=e.getCursor("head"),s=U.macroModeState.lastInsertModeChanges.inVisualBlock;if(s){var a=e.state.vim.lastSelection,c=function(e,t){return{line:t.line-e.line,ch:t.line-e.line}}(a.anchor,a.head);Ce(e,o,c.line+1),n=e.listSelections().length,e.setCursor(o)}for(var l=0;l<n;l++){s&&e.setCursor(he(o,l,0));for(var u=0;u<t.length;u++){var h=t[u];if(h instanceof ut)p.lookupKey(h.keyName,"vim-insert",r);else{var d=e.getCursor(),f=d;i&&!/\n/.test(h)&&(f=he(d,0,h.length)),e.replaceRange(h,d,f)}}}s&&e.setCursor(he(o,0,1))}p.keyMap.vim={attach:_,detach:x,call:k},z("insertModeEscKeysTimeout",200,"number"),p.keyMap["vim-insert"]={"Ctrl-N":"autocomplete","Ctrl-P":"autocomplete",Enter:function(e){(p.commands.newlineAndIndentContinueComment||p.commands.newlineAndIndent)(e)},fallthrough:["default"],attach:_,detach:x,call:k},p.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:_,detach:x,call:k},Z(),p.Vim=w();var pt={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"};var gt=(w=p.Vim).handleKey.bind(w);function mt(e){var t=new e.constructor;return Object.keys(e).forEach(function(n){var i=e[n];Array.isArray(i)?i=i.slice():i&&"object"==typeof i&&i.constructor!=Object&&(i=mt(i)),t[n]=i}),e.sel&&(t.sel={head:e.sel.head&&pe(e.sel.head),anchor:e.sel.anchor&&pe(e.sel.anchor)}),t}w.handleKey=function(e,t,n){return e.operation(function(){return gt(e,t,n)},!0)},t.CodeMirror=p;var vt=w.maybeInitVimState_;t.handler={$id:"ace/keyboard/vim",drawCursor:function(e,t,n,r,o){var s=this.state.vim||{},a=n.characterWidth,c=n.lineHeight,l=t.top,u=t.left;s.insertMode||!(r.cursor?i.comparePoints(r.cursor,r.start)<=0:o.selection.isBackwards()||o.selection.isEmpty())&&u>a&&(u-=a);!s.insertMode&&s.status&&(l+=c/=2),e.left=u+"px",e.top=l+"px",e.width=a+"px",e.height=c+"px"},handleKeyboard:function(e,t,n,i,r){var o=e.editor,s=o.state.cm,a=vt(s);if(-1!=i){if("c"==n&&1==t){if(!u.isMac&&o.getCopyText())return o.once("copy",function(){o.selection.clearSelection()}),{command:"null",passEvent:!0}}else a.insertMode||u.isMac&&this.handleMacRepeat(e,t,n)&&(t=-1,n=e.inputChar);if(-1==t||1&t||0===t&&n.length>1){var c=a.insertMode,l=function(e,t,n){t.length>1&&"n"==t[0]&&(t=t.replace("numpad","")),t=pt[t]||t;var i="";return n.ctrlKey&&(i+="C-"),n.altKey&&(i+="A-"),n.shiftKey&&(i+="S-"),(i+=t).length>1&&(i="<"+i+">"),i}(0,n,r||{});null==a.status&&(a.status="");var h=function(e,t,n){var i=!1,r=w.maybeInitVimState_(e),o=r.visualBlock||r.wasInVisualBlock;if(r.wasInVisualBlock&&!e.ace.inMultiSelectMode?r.wasInVisualBlock=!1:e.ace.inMultiSelectMode&&r.visualBlock&&(r.wasInVisualBlock=!0),"<Esc>"!=t||r.insertMode||r.visualMode||!e.ace.inMultiSelectMode)if(o||!e.ace.inMultiSelectMode||e.ace.inVirtualSelectionMode)i=w.handleKey(e,t,n);else{var s=mt(r);e.operation(function(){e.ace.forEachSelection(function(){var r=e.ace.selection;e.state.vim.lastHPos=null==r.$desiredColumn?r.lead.column:r.$desiredColumn;var o=e.getCursor("head"),a=e.getCursor("anchor"),c=me(o,a)?0:-1,l=me(o,a)?-1:0;o=he(o,0,c),a=he(a,0,l),e.state.vim.sel.head=o,e.state.vim.sel.anchor=a,i=gt(e,t,n),r.$desiredColumn=-1==e.state.vim.lastHPos?null:e.state.vim.lastHPos,e.virtualSelectionMode()&&(e.state.vim=mt(s))}),e.curOp.cursorActivity&&!i&&(e.curOp.cursorActivity=!1)},!0)}else e.ace.exitMultiSelectMode();return i}(s,l,"user");if(a=vt(s),h&&null!=a.status?a.status+=l:null==a.status&&(a.status=""),s._signal("changeStatus"),!h&&(-1!=t||c))return;return{command:"null",passEvent:!h}}}},attach:function(e){e.state||(e.state={});var t=new p(e);e.state.cm=t,e.$vimModeHandler=this,p.keyMap.vim.attach(t),vt(t).status=null,t.on("vim-command-done",function(){t.virtualSelectionMode()||(vt(t).status=null,t.ace._signal("changeStatus"),t.ace.session.markUndoGroup())}),t.on("changeStatus",function(){t.ace.renderer.updateCursor(),t.ace._signal("changeStatus")}),t.on("vim-mode-change",function(){t.virtualSelectionMode()||(t.ace.renderer.setStyle("normal-mode",!vt(t).insertMode),t._signal("changeStatus"))}),t.ace.renderer.setStyle("normal-mode",!vt(t).insertMode),e.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(t),this.updateMacCompositionHandlers(e,!0)},detach:function(e){var t=e.state.cm;p.keyMap.vim.detach(t),t.destroy(),e.state.cm=null,e.$vimModeHandler=null,e.renderer.$cursorLayer.drawCursor=null,e.renderer.setStyle("normal-mode",!1),this.updateMacCompositionHandlers(e,!1)},getStatusText:function(e){var t=e.state.cm,n=vt(t);if(n.insertMode)return"INSERT";var i="";return n.visualMode&&(i+="VISUAL",n.visualLine&&(i+=" LINE"),n.visualBlock&&(i+=" BLOCK")),n.status&&(i+=(i?" ":"")+n.status),i},handleMacRepeat:function(e,t,n){if(-1==t)e.inputChar=n,e.lastEvent="input";else if(e.inputChar&&e.$lastHash==t&&e.$lastKey==n){if("input"==e.lastEvent)e.lastEvent="input1";else if("input1"==e.lastEvent)return!0}else e.$lastHash=t,e.$lastKey=n,e.lastEvent="keypress"},updateMacCompositionHandlers:function(e,t){t?e.onCompositionUpdateOrig||(e.onCompositionUpdateOrig=e.onCompositionUpdate,e.onCompositionUpdate=function(t){var n=e.state.cm;if(vt(n).insertMode)this.onCompositionUpdateOrig(t);else{var i=this.textInput.getElement();i.blur(),i.focus(),i.value=t}},e.onCompositionStartOrig=e.onCompositionStart,e.onCompositionStart=function(t){var n=e.state.cm;vt(n).insertMode||this.onCompositionStartOrig(t)}):e.onCompositionUpdateOrig&&(e.onCompositionUpdate=e.onCompositionUpdateOrig,e.onCompositionUpdateOrig=null,e.onCompositionStart=e.onCompositionStartOrig,e.onCompositionStartOrig=null)}};function yt(e,t){t.off("beforeEndOperation",yt);var n=t.state.cm.vimCmd;n&&t.execCommand(n.exec?n:n.name,n.args),t.curOp=t.prevOp}w.defineOption({name:"wrap",set:function(e,t){t&&t.ace.setOption("wrap",e)},type:"boolean"},!1),w.defineEx("write","w",function(){console.log(":write is not implemented")}),v.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),ce.aceCommand=function(e,t,n){e.vimCmd=t,e.ace.inVirtualSelectionMode?e.ace.on("beforeEndOperation",yt):yt(null,e.ace)},ce.fold=function(e,t,n){e.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(t.all?2:0)+(t.open?1:0)])},t.handler.defaultKeymap=v,t.handler.actions=ce,t.Vim=w,w.map("Y","yy","normal")})},function(e,t){ace.define("ace/theme/xcode",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-xcode",t.cssText=".ace-xcode .ace_gutter {background: #e8e8e8;color: #333}.ace-xcode .ace_print-margin {width: 1px;background: #e8e8e8}.ace-xcode {background-color: #FFFFFF;color: #000000}.ace-xcode .ace_cursor {color: #000000}.ace-xcode .ace_marker-layer .ace_selection {background: #B5D5FF}.ace-xcode.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-xcode .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-xcode .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-xcode .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_marker-layer .ace_selected-word {border: 1px solid #B5D5FF}.ace-xcode .ace_constant.ace_language,.ace-xcode .ace_keyword,.ace-xcode .ace_meta,.ace-xcode .ace_variable.ace_language {color: #C800A4}.ace-xcode .ace_invisible {color: #BFBFBF}.ace-xcode .ace_constant.ace_character,.ace-xcode .ace_constant.ace_other {color: #275A5E}.ace-xcode .ace_constant.ace_numeric {color: #3A00DC}.ace-xcode .ace_entity.ace_other.ace_attribute-name,.ace-xcode .ace_support.ace_constant,.ace-xcode .ace_support.ace_function {color: #450084}.ace-xcode .ace_fold {background-color: #C800A4;border-color: #000000}.ace-xcode .ace_entity.ace_name.ace_tag,.ace-xcode .ace_support.ace_class,.ace-xcode .ace_support.ace_type {color: #790EAD}.ace-xcode .ace_storage {color: #C900A4}.ace-xcode .ace_string {color: #DF0002}.ace-xcode .ace_comment {color: #008E00}.ace-xcode .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})},function(e,t){ace.define("ace/theme/twilight",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-twilight",t.cssText=".ace-twilight .ace_gutter {background: #232323;color: #E2E2E2}.ace-twilight .ace_print-margin {width: 1px;background: #232323}.ace-twilight {background-color: #141414;color: #F8F8F8}.ace-twilight .ace_cursor {color: #A7A7A7}.ace-twilight .ace_marker-layer .ace_selection {background: rgba(221, 240, 255, 0.20)}.ace-twilight.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #141414;}.ace-twilight .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-twilight .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.25)}.ace-twilight .ace_marker-layer .ace_active-line {background: rgba(255, 255, 255, 0.031)}.ace-twilight .ace_gutter-active-line {background-color: rgba(255, 255, 255, 0.031)}.ace-twilight .ace_marker-layer .ace_selected-word {border: 1px solid rgba(221, 240, 255, 0.20)}.ace-twilight .ace_invisible {color: rgba(255, 255, 255, 0.25)}.ace-twilight .ace_keyword,.ace-twilight .ace_meta {color: #CDA869}.ace-twilight .ace_constant,.ace-twilight .ace_constant.ace_character,.ace-twilight .ace_constant.ace_character.ace_escape,.ace-twilight .ace_constant.ace_other,.ace-twilight .ace_heading,.ace-twilight .ace_markup.ace_heading,.ace-twilight .ace_support.ace_constant {color: #CF6A4C}.ace-twilight .ace_invalid.ace_illegal {color: #F8F8F8;background-color: rgba(86, 45, 86, 0.75)}.ace-twilight .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #D2A8A1}.ace-twilight .ace_support {color: #9B859D}.ace-twilight .ace_fold {background-color: #AC885B;border-color: #F8F8F8}.ace-twilight .ace_support.ace_function {color: #DAD085}.ace-twilight .ace_list,.ace-twilight .ace_markup.ace_list,.ace-twilight .ace_storage {color: #F9EE98}.ace-twilight .ace_entity.ace_name.ace_function,.ace-twilight .ace_meta.ace_tag,.ace-twilight .ace_variable {color: #AC885B}.ace-twilight .ace_string {color: #8F9D6A}.ace-twilight .ace_string.ace_regexp {color: #E9C062}.ace-twilight .ace_comment {font-style: italic;color: #5F5A60}.ace-twilight .ace_variable {color: #7587A6}.ace-twilight .ace_xml-pe {color: #494949}.ace-twilight .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})},function(e,t){ace.define("ace/theme/terminal",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-terminal-theme",t.cssText=".ace-terminal-theme .ace_gutter {background: #1a0005;color: steelblue}.ace-terminal-theme .ace_print-margin {width: 1px;background: #1a1a1a}.ace-terminal-theme {background-color: black;color: #DEDEDE}.ace-terminal-theme .ace_cursor {color: #9F9F9F}.ace-terminal-theme .ace_marker-layer .ace_selection {background: #424242}.ace-terminal-theme.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px black;}.ace-terminal-theme .ace_marker-layer .ace_step {background: rgb(0, 0, 0)}.ace-terminal-theme .ace_marker-layer .ace_bracket {background: #090;}.ace-terminal-theme .ace_marker-layer .ace_bracket-start {background: #090;}.ace-terminal-theme .ace_marker-layer .ace_bracket-unmatched {margin: -1px 0 0 -1px;border: 1px solid #900}.ace-terminal-theme .ace_marker-layer .ace_active-line {background: #2A2A2A}.ace-terminal-theme .ace_gutter-active-line {background-color: #2A112A}.ace-terminal-theme .ace_marker-layer .ace_selected-word {border: 1px solid #424242}.ace-terminal-theme .ace_invisible {color: #343434}.ace-terminal-theme .ace_keyword,.ace-terminal-theme .ace_meta,.ace-terminal-theme .ace_storage,.ace-terminal-theme .ace_storage.ace_type,.ace-terminal-theme .ace_support.ace_type {color: tomato}.ace-terminal-theme .ace_keyword.ace_operator {color: deeppink}.ace-terminal-theme .ace_constant.ace_character,.ace-terminal-theme .ace_constant.ace_language,.ace-terminal-theme .ace_constant.ace_numeric,.ace-terminal-theme .ace_keyword.ace_other.ace_unit,.ace-terminal-theme .ace_support.ace_constant,.ace-terminal-theme .ace_variable.ace_parameter {color: #E78C45}.ace-terminal-theme .ace_constant.ace_other {color: gold}.ace-terminal-theme .ace_invalid {color: yellow;background-color: red}.ace-terminal-theme .ace_invalid.ace_deprecated {color: #CED2CF;background-color: #B798BF}.ace-terminal-theme .ace_fold {background-color: #7AA6DA;border-color: #DEDEDE}.ace-terminal-theme .ace_entity.ace_name.ace_function,.ace-terminal-theme .ace_support.ace_function,.ace-terminal-theme .ace_variable {color: #7AA6DA}.ace-terminal-theme .ace_support.ace_class,.ace-terminal-theme .ace_support.ace_type {color: #E7C547}.ace-terminal-theme .ace_heading,.ace-terminal-theme .ace_string {color: #B9CA4A}.ace-terminal-theme .ace_entity.ace_name.ace_tag,.ace-terminal-theme .ace_entity.ace_other.ace_attribute-name,.ace-terminal-theme .ace_meta.ace_tag,.ace-terminal-theme .ace_string.ace_regexp,.ace-terminal-theme .ace_variable {color: #D54E53}.ace-terminal-theme .ace_comment {color: orangered}.ace-terminal-theme .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLBWV/8PAAK4AYnhiq+xAAAAAElFTkSuQmCC) right repeat-y;}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})},function(e,t){ace.define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-solarized-light",t.cssText=".ace-solarized-light .ace_gutter {background: #fbf1d3;color: #333}.ace-solarized-light .ace_print-margin {width: 1px;background: #e8e8e8}.ace-solarized-light {background-color: #FDF6E3;color: #586E75}.ace-solarized-light .ace_cursor {color: #000000}.ace-solarized-light .ace_marker-layer .ace_selection {background: rgba(7, 54, 67, 0.09)}.ace-solarized-light.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FDF6E3;}.ace-solarized-light .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-solarized-light .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_marker-layer .ace_active-line {background: #EEE8D5}.ace-solarized-light .ace_gutter-active-line {background-color : #EDE5C1}.ace-solarized-light .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-light .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_keyword,.ace-solarized-light .ace_meta,.ace-solarized-light .ace_support.ace_class,.ace-solarized-light .ace_support.ace_type {color: #859900}.ace-solarized-light .ace_constant.ace_character,.ace-solarized-light .ace_constant.ace_other {color: #CB4B16}.ace-solarized-light .ace_constant.ace_language {color: #B58900}.ace-solarized-light .ace_constant.ace_numeric {color: #D33682}.ace-solarized-light .ace_fold {background-color: #268BD2;border-color: #586E75}.ace-solarized-light .ace_entity.ace_name.ace_function,.ace-solarized-light .ace_entity.ace_name.ace_tag,.ace-solarized-light .ace_support.ace_function,.ace-solarized-light .ace_variable,.ace-solarized-light .ace_variable.ace_language {color: #268BD2}.ace-solarized-light .ace_storage {color: #073642}.ace-solarized-light .ace_string {color: #2AA198}.ace-solarized-light .ace_string.ace_regexp {color: #D30102}.ace-solarized-light .ace_comment,.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {color: #93A1A1}.ace-solarized-light .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})},function(e,t){ace.define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-solarized-dark",t.cssText=".ace-solarized-dark .ace_gutter {background: #01313f;color: #d0edf7}.ace-solarized-dark .ace_print-margin {width: 1px;background: #33555E}.ace-solarized-dark {background-color: #002B36;color: #93A1A1}.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,.ace-solarized-dark .ace_storage {color: #93A1A1}.ace-solarized-dark .ace_cursor,.ace-solarized-dark .ace_string.ace_regexp {color: #D30102}.ace-solarized-dark .ace_marker-layer .ace_active-line,.ace-solarized-dark .ace_marker-layer .ace_selection {background: rgba(255, 255, 255, 0.1)}.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002B36;}.ace-solarized-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-solarized-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_gutter-active-line {background-color: #0d3440}.ace-solarized-dark .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-dark .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_keyword,.ace-solarized-dark .ace_meta,.ace-solarized-dark .ace_support.ace_class,.ace-solarized-dark .ace_support.ace_type {color: #859900}.ace-solarized-dark .ace_constant.ace_character,.ace-solarized-dark .ace_constant.ace_other {color: #CB4B16}.ace-solarized-dark .ace_constant.ace_language {color: #B58900}.ace-solarized-dark .ace_constant.ace_numeric {color: #D33682}.ace-solarized-dark .ace_fold {background-color: #268BD2;border-color: #93A1A1}.ace-solarized-dark .ace_entity.ace_name.ace_function,.ace-solarized-dark .ace_entity.ace_name.ace_tag,.ace-solarized-dark .ace_support.ace_function,.ace-solarized-dark .ace_variable,.ace-solarized-dark .ace_variable.ace_language {color: #268BD2}.ace-solarized-dark .ace_string {color: #2AA198}.ace-solarized-dark .ace_comment {font-style: italic;color: #657B83}.ace-solarized-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})},function(e,t){ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})},function(e,t){ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-chrome",t.cssText='.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome {background-color: #FFFFFF;color: black;}.ace-chrome .ace_cursor {color: black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(t.cssText,t.cssClass)})},function(e,t){ace.define("ace/theme/chaos",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-chaos",t.cssText=".ace-chaos .ace_gutter {background: #141414;color: #595959;border-right: 1px solid #282828;}.ace-chaos .ace_gutter-cell.ace_warning {background-image: none;background: #FC0;border-left: none;padding-left: 0;color: #000;}.ace-chaos .ace_gutter-cell.ace_error {background-position: -6px center;background-image: none;background: #F10;border-left: none;padding-left: 0;color: #000;}.ace-chaos .ace_print-margin {border-left: 1px solid #555;right: 0;background: #1D1D1D;}.ace-chaos {background-color: #161616;color: #E6E1DC;}.ace-chaos .ace_cursor {border-left: 2px solid #FFFFFF;}.ace-chaos .ace_cursor.ace_overwrite {border-left: 0px;border-bottom: 1px solid #FFFFFF;}.ace-chaos .ace_marker-layer .ace_selection {background: #494836;}.ace-chaos .ace_marker-layer .ace_step {background: rgb(198, 219, 174);}.ace-chaos .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #FCE94F;}.ace-chaos .ace_marker-layer .ace_active-line {background: #333;}.ace-chaos .ace_gutter-active-line {background-color: #222;}.ace-chaos .ace_invisible {color: #404040;}.ace-chaos .ace_keyword {color:#00698F;}.ace-chaos .ace_keyword.ace_operator {color:#FF308F;}.ace-chaos .ace_constant {color:#1EDAFB;}.ace-chaos .ace_constant.ace_language {color:#FDC251;}.ace-chaos .ace_constant.ace_library {color:#8DFF0A;}.ace-chaos .ace_constant.ace_numeric {color:#58C554;}.ace-chaos .ace_invalid {color:#FFFFFF;background-color:#990000;}.ace-chaos .ace_invalid.ace_deprecated {color:#FFFFFF;background-color:#990000;}.ace-chaos .ace_support {color: #999;}.ace-chaos .ace_support.ace_function {color:#00AEEF;}.ace-chaos .ace_function {color:#00AEEF;}.ace-chaos .ace_string {color:#58C554;}.ace-chaos .ace_comment {color:#555;font-style:italic;padding-bottom: 0px;}.ace-chaos .ace_variable {color:#997744;}.ace-chaos .ace_meta.ace_tag {color:#BE53E6;}.ace-chaos .ace_entity.ace_other.ace_attribute-name {color:#FFFF89;}.ace-chaos .ace_markup.ace_underline {text-decoration: underline;}.ace-chaos .ace_fold-widget {text-align: center;}.ace-chaos .ace_fold-widget:hover {color: #777;}.ace-chaos .ace_fold-widget.ace_start,.ace-chaos .ace_fold-widget.ace_end,.ace-chaos .ace_fold-widget.ace_closed{background: none;border: none;box-shadow: none;}.ace-chaos .ace_fold-widget.ace_start:after {content: '▾'}.ace-chaos .ace_fold-widget.ace_end:after {content: '▴'}.ace-chaos .ace_fold-widget.ace_closed:after {content: '‣'}.ace-chaos .ace_indent-guide {border-right:1px dotted #333;margin-right:-1px;}.ace-chaos .ace_fold { background: #222; border-radius: 3px; color: #7AF; border: none; }.ace-chaos .ace_fold:hover {background: #CCC; color: #000;}",e("../lib/dom").importCssString(t.cssText,t.cssClass)})},function(e,t,n){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};i.inherits(o,r),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[r.getStartRule("doc-start"),c("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+s+")(\\.)(prototype)(\\.)("+s+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void)\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+s+")(\\.)("+s+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[r.getStartRule("doc-start"),c("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:n},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:n},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),e&&0==e.jsx||function(){var e=s.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},regex:"</?"+e,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,c("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}.call(this)),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};function c(e){return[{token:"comment",regex:/\/\*/,next:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[r.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}i.inherits(a,o),t.JavaScriptHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var r=n[1].length,o=e.findMatchingBracket({row:t,column:r});if(!o||o.row==t)return 0;var s=this.$getIndent(e.getLine(o.row));e.replace(new i(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var i=e("../../lib/oop"),r=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(s,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(i)?"start":r},this.getFoldWidgetRange=function(e,t,n,i){var r,o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);if(r=o.match(this.foldingStartMarker)){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,s);var a=e.getCommentFoldRange(n,s+r[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(r=o.match(this.foldingStopMarker))){s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,s=n.length,a=t+=1,c=e.getLength();++t<c;){var l=(n=e.getLine(t)).search(/\S/);if(-1!==l){if(i>l)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=o)break;if(u.isMultiLine())t=u.end.row;else if(i==l)break}a=t}}return new r(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<o;){t=e.getLine(n);var l=a.exec(t);if(l&&(l[1]?c--:c++,!c))break}if(n>s)return new r(s,i,n,t.length)}}.call(s.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,i){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,c=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};r.inherits(h,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),o=r.tokens,s=r.state;if(o.length&&"comment"==o[o.length-1].type)return i;if("start"==e||"no_regex"==e)(a=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(i+=n);else if("doc-start"==e){if("start"==s||"no_regex"==s)return"";var a;(a=t.match(/^\s*(\/?)\*/))&&(a[1]&&(i+=" "),i+="* ")}return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],n(98),"JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(h.prototype),t.Mode=h})},function(e,t,n){var i,r;i=[n(100),n(99),n(235)],void 0===(r=function(e,t,n){return function(e,t,n){var i=function(t,n){return e.js_beautify(t,n)};return i.js=e.js_beautify,i.css=t.css_beautify,i.html=n.html_beautify,i.js_beautify=e.js_beautify,i.css_beautify=t.css_beautify,i.html_beautify=n.html_beautify,i}(e,t,n)}.apply(t,i))||(e.exports=r)},function(e,t,n){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,i,r=function(e,t,n){if("string"==typeof t){var i=a(e,t);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,c=t.length;s<c;++s){var l=a(e,t[s]);if(void 0==l&&o.original)return;r.push(l)}return n&&n.apply(null,r)||!0}},o=function(e,t){var n=r("",e,t);return void 0==n&&o.original?o.original.apply(this,arguments):n},s=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return s(e,n[0])+"!"+s(e,n[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},a=function(e,n){n=s(e,n);var i=t.modules[n];if(!i){if("function"==typeof(i=t.payloads[n])){var o={},a={id:n,uri:"",exports:o,packaged:!0};o=i(function(e,t){return r(n,e,t)},o,a)||a.exports,t.modules[n]=o,delete t.payloads[n]}i=t.modules[n]=o||i}return i};i=e,(n="ace")&&(e[n]||(e[n]={}),i=e[n]),i.define&&i.define.packaged||(t.original=i.define,i.define=t,i.define.packaged=!0),i.acequire&&i.acequire.packaged||(o.original=i.acequire,i.acequire=o,i.acequire.packaged=!0)}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";var i,r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},o=void 0===r.exec.call(/()??/,"")[1],s=(i=/^/g,r.test.call(i,""),!i.lastIndex);s&&o||(RegExp.prototype.exec=function(e){var t,n,i,a=r.exec.apply(this,arguments);if("string"==typeof e&&a){if(!o&&a.length>1&&function(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var i=n||0;i<e.length;i++)if(e[i]===t)return i;return-1}(a,"")>-1&&(n=RegExp(this.source,r.replace.call(((i=this).global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),"g","")),r.replace.call(e.slice(a.index),n,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(a[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var c=1;c<a.length;c++)(t=this._xregexp.captureNames[c-1])&&(a[t]=a[c]);!s&&this.global&&!a[0].length&&this.lastIndex>a.index&&this.lastIndex--}return a},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function i(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=d.call(arguments,1),r=function(){if(this instanceof r){var i=t.apply(this,n.concat(d.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(d.call(arguments)))};return t.prototype&&(i.prototype=t.prototype,r.prototype=new i,i.prototype=null),r});var r,o,s,a,c,l=Function.prototype.call,u=Array.prototype,h=Object.prototype,d=u.slice,f=l.bind(h.toString),p=l.bind(h.hasOwnProperty);if((c=p(h,"__defineGetter__"))&&(r=l.bind(h.__defineGetter__),o=l.bind(h.__defineSetter__),s=l.bind(h.__lookupGetter__),a=l.bind(h.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var g=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?g.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(d.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var i=this.slice(e,e+t),r=d.call(arguments,2),o=r.length;if(e===n)o&&this.push.apply(this,r);else{var s=Math.min(t,n-e),a=e+s,c=a+o-s,l=n-a,u=n-s;if(c<a)for(var h=0;h<l;++h)this[c+h]=this[a+h];else if(c>a)for(h=l;h--;)this[c+h]=this[a+h];if(o&&e===u)this.length=u,this.push.apply(this,r);else for(this.length=u+o,h=0;h<o;++h)this[e+h]=r[h]}return i};Array.isArray||(Array.isArray=function(e){return"[object Array]"==f(e)});var m,v,y=Object("a"),b="a"!=y[0]||!(0 in y);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=P(this),n=b&&"[object String]"==f(this)?this.split(""):t,i=arguments[1],r=-1,o=n.length>>>0;if("[object Function]"!=f(e))throw new TypeError;for(;++r<o;)r in n&&e.call(i,n[r],r,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=P(this),n=b&&"[object String]"==f(this)?this.split(""):t,i=n.length>>>0,r=Array(i),o=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var s=0;s<i;s++)s in n&&(r[s]=e.call(o,n[s],s,t));return r}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,n=P(this),i=b&&"[object String]"==f(this)?this.split(""):n,r=i.length>>>0,o=[],s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var a=0;a<r;a++)a in i&&(t=i[a],e.call(s,t,a,n)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=P(this),n=b&&"[object String]"==f(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<i;o++)if(o in n&&!e.call(r,n[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=P(this),n=b&&"[object String]"==f(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<i;o++)if(o in n&&e.call(r,n[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=P(this),n=b&&"[object String]"==f(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" 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(;o<i;o++)o in n&&(r=e.call(void 0,r,n[o],o,t));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=P(this),n=b&&"[object String]"==f(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" 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=e.call(void 0,r,n[o],o,t))}while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=b&&"[object String]"==f(this)?this.split(""):P(this),n=t.length>>>0;if(!n)return-1;var i=0;for(arguments.length>1&&(i=L(arguments[1])),i=i>=0?i:Math.max(0,n+i);i<n;i++)if(i in t&&t[i]===e)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=b&&"[object String]"==f(this)?this.split(""):P(this),n=t.length>>>0;if(!n)return-1;var i=n-1;for(arguments.length>1&&(i=Math.min(i,L(arguments[1]))),i=i>=0?i:n-Math.abs(i);i>=0;i--)if(i in t&&e===t[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:h)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(p(e,t)){var n;if(n={enumerable:!0,configurable:!0},c){var i=e.__proto__;e.__proto__=h;var r=s(e,t),o=a(e,t);if(e.__proto__=i,r||o)return r&&(n.get=r),o&&(n.set=o),n}return n.value=e[t],n}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(m=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=m();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var i=function(){};i.prototype=e,(n=new i).__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n});function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}if(Object.defineProperty){var x=w({}),_="undefined"==typeof document||w(document.createElement("div"));if(!x||!_)var k=Object.defineProperty}if(!Object.defineProperty||k){Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(k)try{return k.call(Object,e,t,n)}catch(e){}if(p(n,"value"))if(c&&(s(e,t)||a(e,t))){var i=e.__proto__;e.__proto__=h,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!c)throw new TypeError("getters & setters can not be defined on this javascript engine");p(n,"get")&&r(e,t,n.get),p(n,"set")&&o(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=(v=Object.freeze,function(e){return"function"==typeof e?e:v(e)})}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";p(e,t);)t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n}),!Object.keys){var C=!0,E=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],A=E.length;for(var S in{toString:null})C=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)p(e,n)&&t.push(n);if(C)for(var i=0,r=A;i<r;i++){var o=E[i];p(e,o)&&t.push(o)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var F="\t\n\v\f\r \u2028\u2029\ufeff";if(!String.prototype.trim||F.trim()){F="["+F+"]";var T=new RegExp("^"+F+F+"*"),D=new RegExp(F+F+"*$");String.prototype.trim=function(){return String(this).replace(T,"").replace(D,"")}}function L(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}var P=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){"use strict";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var r=n.indexOf(t);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if((t=t||document).createStyleSheet&&(n=t.styleSheets)){for(;i<n.length;)if(n[i++].owningElement.id===e)return!0}else if(n=t.getElementsByTagName("style"))for(;i<n.length;)if(n[i++].id===e)return!0;return!1},t.importCssString=function(e,n,i){if(i=i||document,n&&t.hasCssString(n,i))return null;var r;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */"),i.createStyleSheet?((r=i.createStyleSheet()).cssText=e,n&&(r.owningElement.id=n)):((r=t.createElement("style")).appendChild(i.createTextNode(e)),n&&(r.id=n),t.getDocumentHead(i).appendChild(r))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var i=t.createElement("link");i.rel="stylesheet",i.href=e,t.getDocumentHead(n).appendChild(i)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.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=e.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},"undefined"!=typeof document?(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}):t.importCssString=function(){}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,n){"use strict";e("./fixoldbrowsers");var i=e("./oop"),r=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,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:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter(function(e){return t&n.KEY_MODS[e]}).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var i=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((r.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("./keys"),r=e("./useragent"),o=null,s=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var i=function(){n.call(e,window.event)};n._wrapper=i,e.attachEvent("on"+t,i)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,i){function r(e){n&&n(e),i&&i(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",r,!0),t.removeListener(document,"dragstart",r,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",r,!0),t.addListener(document,"dragstart",r,!0),r},t.addTouchMoveListener=function(e,n){var i,r;t.addListener(e,"touchstart",function(e){var t=e.touches[0];i=t.clientX,r=t.clientY}),t.addListener(e,"touchmove",function(e){var t=e.touches;if(!(t.length>1)){var o=t[0];e.wheelX=i-o.clientX,e.wheelY=r-o.clientY,i=o.clientX,r=o.clientY,n(e)}})},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),n(e)})},t.addMultiMouseDownListener=function(e,n,i,o){var s,a,c,l=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};function h(e){if(0!==t.getButton(e)?l=0:e.detail>1?++l>4&&(l=1):l=1,r.isIE){var h=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-a)>5;c&&!h||(l=1),c&&clearTimeout(c),c=setTimeout(function(){c=null},n[l-1]||600),1==l&&(s=e.clientX,a=e.clientY)}if(e._clicks=l,i[o]("mousedown",e),l>4)l=0;else if(l>1)return i[o](u[l],e)}function d(e){l=2,c&&clearTimeout(c),c=setTimeout(function(){c=null},n[l-1]||600),i[o]("mousedown",e),i[o](u[l],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",h),r.isOldIE&&t.addListener(e,"dblclick",d)})};var a=!r.isMac||!r.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};function c(e,t,n){var c=a(t);if(!r.isMac&&o){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(c|=8),o.altGr){if(3==(3&c))return;o.altGr=0}if(18===n||17===n){var l="location"in t?t.location:t.keyLocation;if(17===n&&1===l)1==o[n]&&(s=t.timeStamp);else if(18===n&&3===c&&2===l){t.timeStamp-s<50&&(o.altGr=!0)}}}if((n in i.MODIFIER_KEYS&&(n=-1),8&c&&n>=91&&n<=93&&(n=-1),!c&&13===n)&&(3===(l="location"in t?t.location:t.keyLocation)&&(e(t,c,-n),t.defaultPrevented)))return;if(r.isChromeOS&&8&c){if(e(t,c,n),t.defaultPrevented)return;c&=-9}return!!(c||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&e(t,c,n)}function l(){o=Object.create(null)}if(t.getModifierString=function(e){return i.KEY_MODS[a(e)]},t.addCommandKeyListener=function(e,n){var i=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var s=null;i(e,"keydown",function(e){s=e.keyCode}),i(e,"keypress",function(e){return c(n,e,s)})}else{var a=null;i(e,"keydown",function(e){o[e.keyCode]=(o[e.keyCode]||0)+1;var t=c(n,e,e.keyCode);return a=e.defaultPrevented,t}),i(e,"keypress",function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),i(e,"keyup",function(e){o[e.keyCode]=null}),o||(l(),i(window,"focus",l))}},"object"==typeof window&&window.postMessage&&!r.isOldIE){t.nextTick=function(e,n){n=n||window;t.addListener(n,"message",function i(r){"zero-timeout-message-1"==r.data&&(t.stopPropagation(r),t.removeListener(n,"message",i),e())}),n.postMessage("zero-timeout-message-1","*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var i=0;i<t.length;i++)n[i]=e(t[i]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var i in n={},t)n[i]=e(t[i]);return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},i=function(e){return i.cancel(),t=setTimeout(n,e||0),i};return i.schedule=i,i.call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(t),t=null,i},i.isPending=function(){return t},i},t.delayedCall=function(e,t){var n=null,i=function(){n=null,e()},r=function(e){null==n&&(n=setTimeout(i,e||t))};return r.delay=function(e){n&&clearTimeout(n),n=setTimeout(i,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r}}),ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../lib/keys"),c=a.KEY_MODS,l=r.isChrome<18,u=r.isIE;t.TextInput=function(e,t){var n=o.createElement("textarea");n.className=r.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",r.isTouchPad&&n.setAttribute("x-palm-disable-auto-cap",!0),n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var h="\n aaaa a\n",d=!1,f=!1,p=!1,g=!1,m="",v=!0;try{var y=document.activeElement===n}catch(e){}i.addListener(n,"blur",function(e){t.onBlur(e),y=!1}),i.addListener(n,"focus",function(e){y=!0,t.onFocus(e),x()}),this.focus=function(){if(m)return n.focus();n.style.position="fixed",n.focus()},this.blur=function(){n.blur()},this.isFocused=function(){return y};var b=s.delayedCall(function(){y&&x(v)}),w=s.delayedCall(function(){g||(n.value=h,y&&x())});function x(e){if(!g){if(g=!0,k)t=0,i=e?0:n.value.length-1;else var t=4,i=5;try{n.setSelectionRange(t,i)}catch(e){}g=!1}}function _(){g||(n.value=h,r.isWebKit&&w.schedule())}r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=v&&(v=!v,b.schedule())}),_(),y&&t.onFocus();var k=null;this.setInputHandler=function(e){k=e},this.getInputHandler=function(){return k};var C=!1,E=function(e){4===n.selectionStart&&5===n.selectionEnd||(k&&(e=k(e),k=null),p?(x(),e&&t.onPaste(e),p=!1):e==h.substr(0)&&4===n.selectionStart?C?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):d||(e.substring(0,9)==h&&e.length>h.length?e=e.substr(9):e.substr(0,4)==h.substr(0,4)?e=e.substr(4,e.length-h.length+1):e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e==h.charAt(0)||e.charAt(e.length-1)==h.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),d&&(d=!1),C&&(C=!1))},A=function(e){if(!g){var t=n.value;E(t),_()}},S=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!l){var r=u||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return S(e,t,!0)}}},F=function(e,o){var s=t.getCopyText();if(!s)return i.preventDefault(e);S(e,s)?(r.isIOS&&(f=o,n.value="\n aa"+s+"a a\n",n.setSelectionRange(4,4+s.length),d={value:s}),o?t.onCut():t.onCopy(),r.isIOS||i.preventDefault(e)):(d=!0,n.value=s,n.select(),setTimeout(function(){d=!1,_(),x(),o?t.onCut():t.onCopy()}))};i.addCommandKeyListener(n,t.onCommandKey.bind(t)),i.addListener(n,"select",function(e){!function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(n)?k&&x(t.selection.isEmpty()):(t.selectAll(),x())}),i.addListener(n,"input",A),i.addListener(n,"cut",function(e){F(e,!0)}),i.addListener(n,"copy",function(e){F(e,!1)}),i.addListener(n,"paste",function(e){var o=S(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(x),i.preventDefault(e)):(n.value="",p=!0)});var T,D=function(){if(g&&t.onCompositionUpdate&&!t.$readOnly){var e=n.value.replace(/\x01/g,"");if(g.lastValue!==e&&(t.onCompositionUpdate(e),g.lastValue&&t.undo(),g.canUndo&&(g.lastValue=e),g.lastValue)){var i=t.selection.getRange();t.insert(g.lastValue),t.session.markUndoGroup(),g.range=t.selection.getRange(),t.selection.setRange(i),t.selection.clearSelection()}}},L=function(e){if(t.onCompositionEnd&&!t.$readOnly){var i=g;g=!1;var o=setTimeout(function(){o=null;var e=n.value.replace(/\x01/g,"");g||(e==i.lastValue?_():!i.lastValue&&e&&(_(),E(e)))});k=function(e){return o&&clearTimeout(o),(e=e.replace(/\x01/g,""))==i.lastValue?"":(i.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",L),"compositionend"==e.type&&i.range&&t.selection.setRange(i.range),(r.isChrome&&r.isChrome>=53||r.isWebKit&&r.isWebKit>=603)&&A()}},P=s.delayedCall(D,50);function R(){clearTimeout(T),T=setTimeout(function(){m&&(n.style.cssText=m,m=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}i.addListener(n,"compositionstart",function(e){g||!t.onCompositionStart||t.$readOnly||((g={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(D,0),t.on("mousedown",L),g.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())}),r.isGecko?i.addListener(n,"text",function(){P.schedule()}):(i.addListener(n,"keyup",function(){P.schedule()}),i.addListener(n,"keydown",function(){P.schedule()})),i.addListener(n,"compositionend",L),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){C=!0,x(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,s){m||(m=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+"height:"+n.style.height+";"+(r.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),c=o.computedStyle(t.container),l=a.top+(parseInt(c.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),h=a.bottom-l-n.clientHeight-2,d=function(e){n.style.left=e.clientX-u-2+"px",n.style.top=Math.min(e.clientY-l-2,h)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(T),r.isWin&&i.capture(t.container,d,R))},this.onContextMenuClose=R;var M=function(e){t.textInput.onContextMenu(e),R()};if(i.addListener(n,"mouseup",M),i.addListener(n,"mousedown",function(e){e.preventDefault(),R()}),i.addListener(t.renderer.scroller,"contextmenu",M),i.addListener(n,"contextmenu",M),r.isIOS){var B=null,O=!1;e.addEventListener("keydown",function(e){B&&clearTimeout(B),O=!0}),e.addEventListener("keyup",function(e){B=setTimeout(function(){O=!1},100)});var j=function(e){if(document.activeElement===n&&!O){if(f)return setTimeout(function(){f=!1},100);var i=n.selectionStart,r=n.selectionEnd;if(n.setSelectionRange(4,5),i==r)switch(i){case 0:t.onCommandKey(null,0,a.up);break;case 1:t.onCommandKey(null,0,a.home);break;case 2:t.onCommandKey(null,c.option,a.left);break;case 4:t.onCommandKey(null,0,a.left);break;case 5:t.onCommandKey(null,0,a.right);break;case 7:t.onCommandKey(null,c.option,a.right);break;case 8:t.onCommandKey(null,0,a.end);break;case 9:t.onCommandKey(null,0,a.down)}else{switch(r){case 6:t.onCommandKey(null,c.shift,a.right);break;case 7:t.onCommandKey(null,c.shift|c.option,a.right);break;case 8:t.onCommandKey(null,c.shift,a.end);break;case 9:t.onCommandKey(null,c.shift,a.down)}switch(i){case 0:t.onCommandKey(null,c.shift,a.up);break;case 1:t.onCommandKey(null,c.shift,a.home);break;case 2:t.onCommandKey(null,c.shift|c.option,a.left);break;case 3:t.onCommandKey(null,c.shift,a.left)}}}};document.addEventListener("selectionchange",j),t.on("destroy",function(){document.removeEventListener("selectionchange",j)})}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=r.isChrome<18,c=r.isIE,l=e("./textinput_ios").TextInput;t.TextInput=function(e,t){if(r.isIOS)return l.call(this,e,t);var n=o.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild);var u="\u2028\u2028",h=!1,d=!1,f=!1,p="",g=!0;try{var m=document.activeElement===n}catch(e){}i.addListener(n,"blur",function(e){t.onBlur(e),m=!1}),i.addListener(n,"focus",function(e){m=!0,t.onFocus(e),b()}),this.focus=function(){if(p)return n.focus();var e=n.style.top;n.style.position="fixed",n.style.top="0px",n.focus(),setTimeout(function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)},0)},this.blur=function(){n.blur()},this.isFocused=function(){return m};var v=s.delayedCall(function(){m&&b(g)}),y=s.delayedCall(function(){f||(n.value=u,m&&b())});function b(e){if(!f){if(f=!0,x)var t=0,i=e?0:n.value.length-1;else t=e?2:1,i=2;try{n.setSelectionRange(t,i)}catch(e){}f=!1}}function w(){f||(n.value=u,r.isWebKit&&y.schedule())}r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=g&&(g=!g,v.schedule())}),w(),m&&t.onFocus();var x=null;this.setInputHandler=function(e){x=e},this.getInputHandler=function(){return x};var _=!1,k=function(e){x&&(e=x(e),x=null),d?(b(),e&&t.onPaste(e),d=!1):e==u.charAt(0)?_?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==u?e=e.substr(2):e.charAt(0)==u.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==u.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),_&&(_=!1)},C=function(e){if(!f){var t=n.value;k(t),w()}},E=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!a){var r=c||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return E(e,t,!0)}}},A=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);E(e,o)?(r?t.onCut():t.onCopy(),i.preventDefault(e)):(h=!0,n.value=o,n.select(),setTimeout(function(){h=!1,w(),b(),r?t.onCut():t.onCopy()}))},S=function(e){A(e,!0)},F=function(e){A(e,!1)},T=function(e){var o=E(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(b),i.preventDefault(e)):(n.value="",d=!0)};i.addCommandKeyListener(n,t.onCommandKey.bind(t)),i.addListener(n,"select",function(e){h?h=!1:function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(n)?(t.selectAll(),b()):x&&b(t.selection.isEmpty())}),i.addListener(n,"input",C),i.addListener(n,"cut",S),i.addListener(n,"copy",F),i.addListener(n,"paste",T),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:F(e);break;case 86:T(e);break;case 88:S(e)}});var D,L=function(){if(f&&t.onCompositionUpdate&&!t.$readOnly){var e=n.value.replace(/\u2028/g,"");if(f.lastValue!==e&&(t.onCompositionUpdate(e),f.lastValue&&t.undo(),f.canUndo&&(f.lastValue=e),f.lastValue)){var i=t.selection.getRange();t.insert(f.lastValue),t.session.markUndoGroup(),f.range=t.selection.getRange(),t.selection.setRange(i),t.selection.clearSelection()}}},P=function(e){if(t.onCompositionEnd&&!t.$readOnly){var i=f;f=!1;var o=setTimeout(function(){o=null;var e=n.value.replace(/\u2028/g,"");f||(e==i.lastValue?w():!i.lastValue&&e&&(w(),k(e)))});x=function(e){return o&&clearTimeout(o),(e=e.replace(/\u2028/g,""))==i.lastValue?"":(i.lastValue&&o&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",P),"compositionend"==e.type&&i.range&&t.selection.setRange(i.range),(r.isChrome&&r.isChrome>=53||r.isWebKit&&r.isWebKit>=603)&&C()}},R=s.delayedCall(L,50);function M(){clearTimeout(D),D=setTimeout(function(){p&&(n.style.cssText=p,p=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}i.addListener(n,"compositionstart",function(e){f||!t.onCompositionStart||t.$readOnly||((f={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(L,0),t.on("mousedown",P),f.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())}),r.isGecko?i.addListener(n,"text",function(){R.schedule()}):(i.addListener(n,"keyup",function(){R.schedule()}),i.addListener(n,"keydown",function(){R.schedule()})),i.addListener(n,"compositionend",P),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){_=!0,b(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,s){p||(p=n.style.cssText),n.style.cssText=(s?"z-index:100000;":"")+"height:"+n.style.height+";"+(r.isIE?"opacity:0.1;":"");var a=t.container.getBoundingClientRect(),c=o.computedStyle(t.container),l=a.top+(parseInt(c.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),h=a.bottom-l-n.clientHeight-2,d=function(e){n.style.left=e.clientX-u-2+"px",n.style.top=Math.min(e.clientY-l-2,h)+"px"};d(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(D),r.isWin&&i.capture(t.container,d,M))},this.onContextMenuClose=M;var B=function(e){t.textInput.onContextMenu(e),M()};i.addListener(n,"mouseup",B),i.addListener(n,"mousedown",function(e){e.preventDefault(),M()}),i.addListener(t.renderer.scroller,"contextmenu",B),i.addListener(n,"contextmenu",B)}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";e("../lib/dom"),e("../lib/event");var i=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),t.setDefaultHandler("touchmove",this.onTouchMove.bind(e));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();if(0!==o){var s=r.getSelectionRange().isEmpty();return r.$blockScrolling++,(s||1==o)&&r.selection.moveToPosition(n),r.$blockScrolling--,void(2==o&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(n.$blockScrolling++,this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&s>=0)t=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,t=r.start;else{var c=o(this.$clickSelection,i);i=c.cursor,t=c.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.$blockScrolling--,n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e,t,n,i,r=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),o=Date.now();(r>0||o-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,r=i-n.t,o=e.wheelX/r,s=e.wheelY/r;r<250&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var a=Math.abs(o/s),c=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)n.allowed=i;else if(i-n.allowed<250){Math.abs(o)<=1.1*Math.abs(n.vx)&&Math.abs(s)<=1.1*Math.abs(n.vy)?(c=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=o,n.vy=s,c?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){this.editor._emit("mousewheel",e)}}).call(r.prototype),t.DefaultHandlers=r}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom");function r(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){i.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),t.Tooltip=r}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event"),s=e("../tooltip").Tooltip;function a(e){s.call(this,e)}r.inherits(a,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();t+=15,(e+=15)+r>n&&(e-=e+r-n),t+o>i&&(t-=20+o),s.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,n,r,s=e.editor,c=s.renderer.$gutterLayer,l=new a(s.container);function u(){t&&(t=clearTimeout(t)),r&&(l.hide(),r=null,s._signal("hideGutterTooltip",l),s.removeEventListener("mousewheel",u))}function h(e){l.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",function(t){if(s.isFocused()&&0==t.getButton()&&"foldWidgets"!=c.getRegion(t)){var n=t.getDocumentPosition().row,i=s.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(i.hasCssClass(a,"ace_fold-widget"))return u();r&&e.$tooltipFollowsMouse&&h(o),n=o,t||(t=setTimeout(function(){t=null,n&&!e.isMousePressed?function(){var t=n.getDocumentPosition().row,i=c.$annotations[t];if(!i)return u();if(t==s.session.getLength()){var o=s.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(o>s.session.documentToScreenRow(a.row,a.column))return u()}if(r!=i)if(r=i.text.join("<br/>"),l.setHtml(r),l.show(),s._signal("showGutterTooltip",l),s.on("mousewheel",u),e.$tooltipFollowsMouse)h(n);else{var d=n.domEvent.target.getBoundingClientRect(),f=l.getElement().style;f.left=d.right+"px",f.top=d.bottom+"px"}}():u()},50))}),o.addListener(s.renderer.$gutter,"mouseout",function(e){n=null,r&&!t&&(t=setTimeout(function(){t=null,u()},50))}),s.on("changeSession",u)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.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 e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.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)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent"),s=200,a=200,c=5;function l(e){var t=e.editor,n=i.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var l,h,d,f,p,g,m,v,y,b,w,x=t.container,_=0;function k(){var e=g;(function(e,n){var i=Date.now(),r=!n||e.row!=n.row,o=!n||e.column!=n.column;!b||r||o?(t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,b=i,w={x:h,y:d}):u(w.x,w.y,h,d)>c?b=null:i-b>=a&&(t.renderer.scrollCursorIntoView(),b=null)})(g=t.renderer.screenToTextCoordinates(h,d),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),c={x:{left:h-a.left,right:a.right-h},y:{top:d-a.top,bottom:a.bottom-d}},l=Math.min(c.x.left,c.x.right),u=Math.min(c.y.top,c.y.bottom),f={row:e.row,column:e.column};l/o<=2&&(f.column+=c.x.left<c.x.right?-3:2),u/r<=1&&(f.row+=c.y.top<c.y.bottom?-1:1);var p=e.row!=f.row,g=e.column!=f.column,m=!n||e.row!=n.row;p||g&&!m?y?i-y>=s&&t.renderer.scrollCursorIntoView(f):y=i:y=null}(g,e)}function C(){p=t.selection.toOrientedRange(),l=t.session.addMarker(p,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(f),k(),f=setInterval(k,20),_=0,r.addListener(document,"mousemove",S)}function E(){clearInterval(f),t.session.removeMarker(l),l=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(p),t.$blockScrolling-=1,t.isFocused()&&!v&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),p=null,g=null,_=0,y=null,b=null,r.removeListener(document,"mousemove",S)}this.onDragStart=function(e){if(this.cancelDrag||!x.draggable){var i=this;return setTimeout(function(){i.startSelect(),i.captureMouse(e)},0),e.preventDefault()}p=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(n),n.scrollTop=0),r.setDragImage&&r.setDragImage(n,0,0),o.isOpera&&t.container.removeChild(n),r.clearData(),r.setData("Text",t.session.getTextRange()),v=!0,this.setState("drag")},this.onDragEnd=function(e){if(x.draggable=!1,v=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;m||"move"!=n||t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&F(e.dataTransfer))return h=e.clientX,d=e.clientY,l||C(),_++,e.dataTransfer.dropEffect=m=T(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&F(e.dataTransfer))return h=e.clientX,d=e.clientY,l||(C(),_++),null!==A&&(A=null),e.dataTransfer.dropEffect=m=T(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--_<=0&&l)return E(),m=null,r.preventDefault(e)},this.onDrop=function(e){if(g){var n=e.dataTransfer;if(v)switch(m){case"move":p=p.contains(g.row,g.column)?{start:g,end:g}:t.moveText(p,g);break;case"copy":p=t.moveText(p,g,!0)}else{var i=n.getData("Text");p={start:g,end:t.session.insert(g,i)},t.focus(),m=null}return E(),r.preventDefault(e)}},r.addListener(x,"dragstart",this.onDragStart.bind(e)),r.addListener(x,"dragend",this.onDragEnd.bind(e)),r.addListener(x,"dragenter",this.onDragEnter.bind(e)),r.addListener(x,"dragover",this.onDragOver.bind(e)),r.addListener(x,"dragleave",this.onDragLeave.bind(e)),r.addListener(x,"drop",this.onDrop.bind(e));var A=null;function S(){null==A&&(A=setTimeout(function(){null!=A&&l&&E()},20))}function F(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function T(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function u(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(o.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(l.prototype),t.DragdropHandler=l}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){!n&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var s=0;s<n.length&&(n[s](t,this),!t.propagationStopped);s++);return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](t,this)}},i.once=function(e,t){var n=this;t&&this.addEventListener(e,function i(){n.removeEventListener(e,i),t.apply(null,arguments)})},i.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var i=n[e],r=n._disabled_[e];r||(n._disabled_[e]=r=[]),r.push(i);var o=r.indexOf(t);-1!=o&&r.splice(o,1)}n[e]=t},i.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var i=n._disabled_[e];if(n[e]==t){n[e];i&&this.setDefaultHandler(e,i.pop())}else if(i){var r=i.indexOf(t);-1!=r&&i.splice(r,1)}}},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return i||(i=this._eventRegistry[e]=[]),-1==i.indexOf(t)&&i[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}},i.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=i}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"no use strict";var i=e("./oop"),r=e("./event_emitter").EventEmitter,o={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return s('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:s('misspelled option "'+e+'"')}};function s(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function a(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout(function(){throw n})}var c=function(){this.$defaultOptions={}};(function(){i.implement(this,r),this.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var i=n[t];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=t),e.$options[i.name]=i,"initialValue"in i&&(e["$"+i.name]=i.initialValue)}),i.implement(e,o),this},this.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},this.setDefaultValue=function(e,t,n){var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},this.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},this.warn=s,this.reportError=a}).call(c.prototype),t.AppConfig=c}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(e,t,i){"no use strict";var r=e("./lib/lang"),o=(e("./lib/oop"),e("./lib/net")),s=e("./lib/app_config").AppConfig;i.exports=t=new s;var a=function(){return this||"undefined"!=typeof window&&window}(),c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};function l(r){if(a&&a.document){c.packaged=r||e.packaged||i.packaged||a.define&&n(101).packaged;for(var o,s={},l="",u=document.currentScript||document._currentScript,h=(u&&u.ownerDocument||document).getElementsByTagName("script"),d=0;d<h.length;d++){var f=h[d],p=f.src||f.getAttribute("src");if(p){for(var g=f.attributes,m=0,v=g.length;m<v;m++){var y=g[m];0===y.name.indexOf("data-ace-")&&(s[(o=y.name.replace(/^data-ace-/,""),o.replace(/-(.)/g,function(e,t){return t.toUpperCase()}))]=y.value)}var b=p.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);b&&(l=b[1])}}for(var w in l&&(s.base=s.base||l,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)void 0!==s[w]&&t.set(w,s[w])}}t.get=function(e){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return c[e]},t.set=function(e,t){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);c[e]=t},t.all=function(){return r.copyObject(c)},t.moduleUrl=function(e,t){if(c.$moduleUrls[e])return c.$moduleUrls[e];var n=e.split("/"),i="snippets"==(t=t||n[n.length-2]||"")?"/":"-",r=n[n.length-1];if("worker"==t&&"-"==i){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");r=r.replace(o,"")}(!r||r==t)&&n.length>1&&(r=n[n.length-2]);var s=c[t+"Path"];return null==s?s=c.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return c.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,i){var r,s;Array.isArray(n)&&(s=n[0],n=n[1]);try{r=e(n)}catch(e){}if(r&&!t.$loading[n])return i&&i(r);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var i=t.$loading[n];t.$loading[n]=null,i.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();o.loadScript(t.moduleUrl(n,s),a)}},l(!0),t.init=l}),ace.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(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,c=e("./dragdrop_handler").DragdropHandler,l=e("../config"),u=function(e){var t=this;this.editor=e,new o(this),new s(this),new c(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click")),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),i.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),i.addTouchMoveListener(e.container,this.onTouchMove.bind(this,"touchmove"));var l=e.renderer.$gutter;i.addListener(l,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),i.addListener(l,"click",this.onMouseEvent.bind(this,"gutterclick")),i.addListener(l,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),i.addListener(l,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),i.addListener(a,"mousedown",n),i.addListener(l,"mousedown",n),r.isIE&&e.renderer.scrollBarV&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",n),i.addListener(e.renderer.scrollBarH.element,"mousedown",n)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var i=e.renderer.screenToTextCoordinates(n.x,n.y),r=e.session.selection.getRange(),o=e.renderer;!r.isEmpty()&&r.insideStart(i.row,i.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.onTouchMove=function(e,t){var n=new a(t,this.editor);n.speed=1,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var o=this,s=function(e){if(e){if(r.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},c=function(e){clearInterval(u),l(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},l=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){c(e)});o.$onCaptureMouseMove=s,o.releaseMouse=i.capture(this.editor.container,s,c);var u=setInterval(l,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(u.prototype),l.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){"use strict";t.FoldHandler=function(e){e.on("click",function(t){var n=t.getDocumentPosition(),i=e.session,r=i.getFoldAt(n.row,n.column,1);r&&(t.getAccelKey()?i.removeFold(r):i.expandFold(r),t.stop())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session,r=i.getParentFoldRangeData(n,!0),o=r.range||r.firstRange;if(o){n=o.start.row;var s=i.getFoldAt(n,i.getLine(n).length,1);s?i.removeFold(s):(i.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,i){for(var o,s=!1,a=this.$editor.commands,c=this.$handlers.length;c--&&!((o=this.$handlers[c].handleKeyboard(this.$data,e,t,n,i))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,i))&&i&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),s)););return s||-1!=e||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},this.onCommandKey=function(e,t,n){var r=i.keyCodeToString(n);this.$callKeyboardHandlers(t,r,n,e)},this.onTextInput=function(e){this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t,n){"use strict";var i=0,r=0,o=!1,s=!1,a=!1,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=1,h=0,d=1,f=2,p=3,g=4,m=5,v=6,y=7,b=8,w=9,x=10,_=11,k=12,C=13,E=14,A=15,S=16,F=17,T=18,D=[T,T,T,T,T,T,T,T,T,v,m,v,b,m,T,T,T,T,T,T,T,T,T,T,T,T,T,T,m,m,m,v,b,g,g,_,_,_,g,g,g,g,g,x,w,x,w,w,f,f,f,f,f,f,f,f,f,f,w,g,g,g,g,g,g,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,g,g,g,g,g,g,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,g,g,g,g,T,T,T,T,T,T,m,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,w,g,_,_,_,_,g,g,g,g,h,g,g,T,g,g,_,_,f,f,g,h,g,g,g,f,h,g,g,g,g,g],L=[b,b,b,b,b,b,b,b,b,b,b,T,T,T,h,d,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b,m,C,E,A,S,F,w,_,_,_,_,_,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,w,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b];function P(e,t,n){if(!(r<e))if(1!=e||i!=u||s)for(var o,a,c,l,h=n.length,d=0;d<h;){if(t[d]>=e){for(o=d+1;o<h&&t[o]>=e;)o++;for(a=d,c=o-1;a<c;a++,c--)l=n[a],n[a]=n[c],n[c]=l;d=o}d++}else n.reverse()}function R(e,t,n,r){var c,l,u,D,L=t[r];switch(L){case h:case d:o=!1;case g:case p:return L;case f:return o?p:f;case y:return o=!0,!0,d;case b:return g;case w:return r<1||r+1>=t.length||(c=n[r-1])!=f&&c!=p||(l=t[r+1])!=f&&l!=p?g:(o&&(l=p),l==c?l:g);case x:return(c=r>0?n[r-1]:m)==f&&r+1<t.length&&t[r+1]==f?f:g;case _:if(r>0&&n[r-1]==f)return f;if(o)return g;for(D=r+1,u=t.length;D<u&&t[D]==_;)D++;return D<u&&t[D]==f?f:g;case k:for(u=t.length,D=r+1;D<u&&t[D]==k;)D++;if(D<u){var P=e[r],R=P>=1425&&P<=2303||64286==P;if(c=t[D],R&&(c==d||c==y))return d}return r<1||(c=t[r-1])==m?g:n[r-1];case m:return o=!1,s=!0,i;case v:return a=!0,g;case C:case E:case S:case F:case A:o=!1;case T:return g}}function M(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?h:D[t]:5==n?/[\u0591-\u05f4]/.test(e)?d:h:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?k:/[\u0660-\u0669\u066b-\u066c]/.test(e)?p:1642==t?_:/[\u06f0-\u06f9]/.test(e)?f:y:32==n&&t<=8287?L[255&t]:254==n&&t>=65136?y:g}t.L=h,t.R=d,t.EN=f,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.DOT="·",t.doBidiReorder=function(e,n,h){if(e.length<2)return{};var f=e.split(""),w=new Array(f.length),x=new Array(f.length),_=[];i=h?u:0,function(e,t,n,u){var h=i?l:c,d=null,f=null,p=null,g=0,y=null,w=-1,x=null,_=null,k=[];if(!u)for(x=0,u=[];x<n;x++)u[x]=M(e[x]);for(r=i,o=!1,!1,s=!1,a=!1,_=0;_<n;_++){if(d=g,k[_]=f=R(e,u,k,_),y=240&(g=h[d][f]),g&=15,t[_]=p=h[g][5],y>0)if(16==y){for(x=w;x<_;x++)t[x]=1;w=-1}else w=-1;if(h[g][6])-1==w&&(w=_);else if(w>-1){for(x=w;x<_;x++)t[x]=p;w=-1}u[_]==m&&(t[_]=0),r|=p}if(a)for(x=0;x<n;x++)if(u[x]==v){t[x]=i;for(var C=x-1;C>=0&&u[C]==b;C--)t[C]=i}}(f,_,f.length,n);for(var k=0;k<w.length;w[k]=k,k++);P(2,_,w),P(1,_,w);for(k=0;k<w.length-1;k++)n[k]===p?_[k]=t.AN:_[k]===d&&(n[k]>y&&n[k]<C||n[k]===g||n[k]===T)?_[k]=t.ON_R:k>0&&"ل"===f[k-1]&&/\u0622|\u0623|\u0625|\u0627/.test(f[k])&&(_[k-1]=_[k]=t.R_H,k++);f[f.length-1]===t.DOT&&(_[f.length-1]=t.B);for(k=0;k<w.length;k++)x[k]=_[w[k]];return{logicalFromVisual:w,bidiLevels:x}},t.hasBidiCharacters=function(e,t){for(var n=!1,i=0;i<e.length;i++)t[i]=M(e.charAt(i)),n||t[i]!=d&&t[i]!=y||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("./lib/bidiutil"),r=e("./lib/lang"),o=e("./lib/useragent"),s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=function(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.line="",this.wrapIndent=0,this.isLastRow=!1,this.EOF="¶",this.seenBidi=!1};(function(){this.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&s.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;return e},this.updateRowLine=function(e,t){if(void 0===e&&(e=this.getDocumentRow()),this.wrapIndent=0,this.isLastRow=e===this.session.getLength()-1,this.line=this.session.getLine(e),this.session.$useWrapMode){var n=this.session.$wrapData[e];n&&(void 0===t&&(t=this.getSplitIndex()),t>0&&n.length?(this.wrapIndent=n.indent,this.line=t<n.length?this.line.substring(n[t-1],n[n.length-1]):this.line.substring(n[n.length-1])):this.line=this.line.substring(0,n[t]))}var o,s=this.session,a=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||s.isFullWidth(e.charCodeAt(0))?(o="\t"===e?s.getScreenTabSize(t+a):2,a+=o-1,r.stringRepeat(i.DOT,o)):e})},this.updateBidiMap=function(){var e=[],t=this.isLastRow?this.EOF:this.EOL,n=this.line+(this.showInvisibles?t:i.DOT);i.hasBidiCharacters(n,e)?this.bidiMap=i.doBidiReorder(n,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){if(this.seenBidi&&this.characterWidth!==e.$characterSize.width){var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=t,this.charWidths[i.R]=this.charWidths[i.AN]=n,this.charWidths[i.R_H]=o.isChrome?n:.45*n,this.charWidths[i.B]=0,this.currentRow=null}},this.getShowInvisibles=function(){return this.showInvisibles},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setTextDir=function(e){this.isRtlDir=e},this.getPosLeft=function(e){e-=this.wrapIndent;var t=i.getVisualFromLogicalIdx(e>0?e-1:0,this.bidiMap),n=this.bidiMap.bidiLevels,r=0;0===e&&n[t]%2!=0&&t++;for(var o=0;o<t;o++)r+=this.charWidths[n[o]];return 0!==e&&n[t]%2==0&&(r+=this.charWidths[n[t]]),this.wrapIndent&&(r+=this.wrapIndent*this.charWidths[i.L]),r},this.getSelections=function(e,t){for(var n,r,o=this.bidiMap,s=o.bidiLevels,a=this.wrapIndent*this.charWidths[i.L],c=[],l=Math.min(e,t)-this.wrapIndent,u=Math.max(e,t)-this.wrapIndent,h=!1,d=!1,f=0,p=0;p<s.length;p++)r=o.logicalFromVisual[p],n=s[p],(h=r>=l&&r<u)&&!d?f=a:!h&&d&&c.push({left:f,width:a-f}),a+=this.charWidths[n],d=h;return h&&p===s.length&&c.push({left:f,width:a-f}),c},this.offsetToCol=function(e){var t=0,n=(e=Math.max(e,0),0),r=0,o=this.bidiMap.bidiLevels,s=this.charWidths[o[r]];for(this.wrapIndent&&(e-=this.wrapIndent*this.charWidths[i.L]);e>n+s/2;){if(n+=s,r===o.length-1){s=0;break}s=this.charWidths[o[++r]]}return r>0&&o[r-1]%2!=0&&o[r]%2==0?(e<n&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&o[r-1]%2==0&&o[r]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===o.length-1&&0===s&&o[r-1]%2==0||!this.isRtlDir&&0===r&&o[r]%2!=0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&o[r-1]%2!=0&&0!==s&&r--,t=this.bidiMap.logicalFromVisual[r]),t+this.wrapIndent}}).call(a.prototype),t.BidiHandler=a}),ace.define("ace/range",["require","exports","module"],function(e,t,n){"use strict";var i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(0==n)return this;if(-1==n)var r={row:e,column:t};else var o={row:e,column:t};return i.fromPoints(r||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 i.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._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()&&this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),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(e){if(this.$isEmpty)this.moveCursorTo(this.lead.row,this.lead.column+e);else{var t=this.getSelectionAnchor(),n=this.getSelectionLead(),i=this.isBackwards();i&&0===t.column||this.setSelectionAnchor(t.row,t.column+e),(i||0!==n.column)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})}},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},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(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?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.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.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();t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(n,0),r=this.session.getDisplayLine(e,null,i.row,i.column).match(/^\s*/);r[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=r[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var i=n.search(/\s+$/);i>0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var i=this.session.getFoldStringAt(t,n,-1);null==i&&(i=this.doc.getLine(t).substring(0,n));var o=r.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e<o&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var i=this.session.getLine(t).substring(0,n);if(0===n){do{t--,i=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),s=this.$shortWordEndIndex(o);return this.moveCursorTo(t,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(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var r=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||e>0)&&r.row++,this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,n){"use strict";var i=e("./config"),r=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],c=0;c<n.length;c++){var l=n[c];if(l.defaultToken&&(o.defaultToken=l.defaultToken),l.caseInsensitive&&(s="gi"),null!=l.regex){l.regex instanceof RegExp&&(l.regex=l.regex.toString().slice(1,-1));var u=l.regex,h=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(l.token)?1==l.token.length||1==h?l.token=l.token[0]:h-1!=l.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:l,groupCount:h-1}),l.token=l.token[0]):(l.tokenArray=l.token,l.token=null,l.onMatch=this.$arrayTokens):"function"!=typeof l.token||l.onMatch||(l.onMatch=h>1?this.$applyToken:l.token),h>1&&(/\\\d/.test(l.regex)?u=l.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(h=1,u=this.removeCapturingGroups(l.regex)),l.splitRegex||"string"==typeof l.token||a.push(l)),o[r]=c,r+=h,i.push(u),l.onMatch||(l.onMatch=null)}}i.length||(o[0]=0,i.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){r=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;r<o;r++)t[r]&&(i[i.length]={type:n[r],value:t[r]});return i},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;r<o;r++)t[r+1]&&(n[n.length]={type:i[r],value:t[r+1]});return n},this.removeCapturingGroups=function(e){return e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e})},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,i=!1,r={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,s,a,c){return i?i="]"!=a:a?i=!0:s?(n==r.stack&&(r.end=c+1,r.stack=-1),n--):o&&(n++,1!=o.length&&(r.stack=n,r.start=c)),e}),null!=r.end&&/^\)*$/.test(e.substr(r.end))&&(e=e.substring(0,r.start)+e.substr(r.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t)"#tmp"===(t=(n=t.slice(0))[0])&&(n.shift(),t=n.shift());else var n=[];var i=t||"start",o=this.states[i];o||(i="start",o=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;for(var c,l=[],u=0,h=0,d={type:null,value:""};c=a.exec(e);){var f=s.defaultToken,p=null,g=c[0],m=a.lastIndex;if(m-g.length>u){var v=e.substring(u,m-g.length);d.type==f?d.value+=v:(d.type&&l.push(d),d={type:f,value:v})}for(var y=0;y<c.length-2;y++)if(void 0!==c[y+1]){f=(p=o[s[y]]).onMatch?p.onMatch(g,i,n,e):p.token,p.next&&(i="string"==typeof p.next?p.next:p.next(i,n),(o=this.states[i])||(this.reportError("state doesn't exist",i),i="start",o=this.states[i]),s=this.matchMappings[i],u=m,(a=this.regExps[i]).lastIndex=m),p.consumeLineEnd&&(u=m);break}if(g)if("string"==typeof f)p&&!1===p.merge||d.type!==f?(d.type&&l.push(d),d={type:f,value:g}):d.value+=g;else if(f){d.type&&l.push(d),d={type:null,value:""};for(y=0;y<f.length;y++)l.push(f[y])}if(u==e.length)break;if(u=m,h++>r){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)d.type&&l.push(d),d={value:e.substring(u,u+=2e3),type:"overflow"};i="start",n=[];break}}return d.type&&l.push(d),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:l,state:n.length?n:i}},this.reportError=i.reportError}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var i=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r<i.length;r++){var o=i[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,r,o){var s="function"==typeof e?(new e).getRules():e;if(r)for(var a=0;a<r.length;a++)r[a]=t+r[a];else for(var c in r=[],s)r.push(t+c);if(this.addRules(s,t),n){var l=Array.prototype[o?"push":"unshift"];for(a=0;a<r.length;a++)l.apply(this.$rules[r[a]],i.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,i=this.$rules;Object.keys(i).forEach(function r(o){var s=i[o];s.processed=!0;for(var a=0;a<s.length;a++){var c=s[a],l=null;Array.isArray(c)&&(l=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var u=c.next||c.push;if(u&&Array.isArray(u)){var h=c.stateName;h||("string"!=typeof(h=c.token)&&(h=h[0]||""),i[h]&&(h+=n++)),i[h]=u,c.next=h,r(h)}else"pop"==u&&(c.next=t);if(c.push&&(c.nextState=c.next||c.push,c.next=e,delete c.push),c.rules)for(var d in c.rules)i[d]?i[d].push&&i[d].push.apply(i[d],c.rules[d]):i[d]=c.rules[d];var f="string"==typeof c?c:c.include;if(f&&(l=Array.isArray(f)?f.map(function(e){return i[e]}):i[f]),l){var p=[a,1].concat(l);c.noEscape&&(p=p.filter(function(e){return!e.next})),s.splice.apply(s,p),a--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}},this)},this.createKeywordMapper=function(e,t,n,i){var r=Object.create(null);return Object.keys(e).forEach(function(t){var o=e[t];n&&(o=o.toLowerCase());for(var s=o.split(i||"|"),a=s.length;a--;)r[s[a]]=t}),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),e=null,n?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),t.TextHighlightRules=r}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var i=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(i.prototype),t.Behaviour=i}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("./range").Range,r=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var i=e.getTokenAt(t,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(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-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 e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)}}).call(r.prototype),t.TokenIterator=r}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var i,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}},p=function(e){this.add("braces","insertion",function(t,n,r,o,s){var c=r.getCursorPosition(),l=o.doc.getLine(c.row);if("{"==s){d(r);var u=r.getSelectionRange(),h=o.doc.getTextRange(u);if(""!==h&&"{"!==h&&r.getWrapBehavioursEnabled())return f(u,h,"{","}");if(p.isSaneInsertion(r,o))return/[\]\}\)]/.test(l[c.column])||r.inMultiSelectMode||e&&e.braces?(p.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(d(r),"}"==l.substring(c.column,c.column+1))if(null!==o.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&p.isAutoInsertedClosing(c,l,s))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){d(r);var g="";if(p.isMaybeInsertedClosing(c,l)&&(g=a.stringRepeat("}",i.maybeInsertedBrackets),p.clearMaybeInsertedClosing()),"}"===l.substring(c.column,c.column+1)){var m=o.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!m)return null;var v=this.$getIndent(o.getLine(m.row))}else{if(!g)return void p.clearMaybeInsertedClosing();v=this.$getIndent(l)}var y=v+o.getTabString();return{text:"\n"+y+"\n"+v+g,selection:[1,y.length,1,y.length]}}p.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){if(d(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,i,r){if("("==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"(",")");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var a=n.getCursorPosition(),c=i.doc.getLine(a.row);if(")"==c.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,c,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("brackets","insertion",function(e,t,n,i,r){if("["==r){d(n);var o=n.getSelectionRange(),s=i.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return f(o,s,"[","]");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var a=n.getCursorPosition(),c=i.doc.getLine(a.row);if("]"==c.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,c,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(d(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("string_dquotes","insertion",function(e,t,n,i,r){var o=i.$mode.$quotes||h;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var s=r,a=n.getSelectionRange(),c=i.doc.getTextRange(a);if(!(""===c||1==c.length&&o[c])&&n.getWrapBehavioursEnabled())return f(a,c,s,s);if(!c){var l=n.getCursorPosition(),u=i.doc.getLine(l.row),p=u.substring(l.column-1,l.column),g=u.substring(l.column,l.column+1),m=i.getTokenAt(l.row,l.column),v=i.getTokenAt(l.row,l.column+1);if("\\"==p&&m&&/escape/.test(m.type))return null;var y,b=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(g==s)(y=b!==w)&&/string\.end/.test(v.type)&&(y=!1);else{if(b&&!w)return null;if(b&&w)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var _=x.test(p);x.lastIndex=0;var k=x.test(p);if(_||k)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;y=!0}return{text:y?s+s:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==o||"'"==o)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r})};p.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",c)){var r=new s(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",c))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",l)},p.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},p.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},p.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(p,o),t.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";t.packages={},function(e){var n=/\w{4}/g;for(var i in e)t.packages[i]=e[i].replace(n,"\\u$&")}({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"})}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var i=e("../tokenizer").Tokenizer,r=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,s=e("../unicode"),a=e("../lib/lang"),c=e("../token_iterator").TokenIterator,l=e("../range").Range,u=function(){this.HighlightRules=r};(function(){this.$defaultBehaviour=new o,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=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){var r=t.doc,o=!0,s=!0,c=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))g=this.lineCommentStart.map(a.escapeRegExp).join("|"),f=this.lineCommentStart[0];else g=a.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;g=new RegExp("^(\\s*)(?:"+g+") ?"),u=t.getUseSoftTabs();y=function(e,t){var n=e.match(g);if(n){var i=n[1].length,o=n[0].length;d(e,i,o)||" "!=n[0][o-1]||o--,r.removeInLine(t,i,o)}};var h=f+" ",d=(v=function(e,t){o&&!/\S/.test(e)||(d(e,c,c)?r.insertInLine({row:t,column:c},h):r.insertInLine({row:t,column:c},f))},b=function(e,t){return g.test(e)},function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%l!=0)return!1;for(i=0;" "==e.charAt(n++);)i++;return l>2?i%l!=l-1:i%l==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+a.escapeRegExp(f)+")"),m=new RegExp("(?:"+a.escapeRegExp(p)+")\\s*$"),v=function(e,t){b(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},p),r.insertInLine({row:t,column:c},f))},y=function(e,t){var n;(n=e.match(m))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(g))&&r.removeInLine(t,n[1].length,n[0].length)},b=function(e,n){if(g.test(e))return!0;for(var i=t.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}function w(e){for(var t=n;t<=i;t++)e(r.getLine(t),t)}var x=1/0;w(function(e,t){var n=e.search(/\S/);-1!==n?(n<c&&(c=n),s&&!b(e,t)&&(s=!1)):x>e.length&&(x=e.length)}),c==1/0&&(c=x,o=!1,s=!1),u&&c%l!=0&&(c=Math.floor(c/l)*l),w(s?y:v)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=(g=new c(t,i.row,i.column)).getCurrentToken(),u=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var h,d;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(r.start))){var f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m;h=new l(f,p,f,p+r.start.length);break}a=g.stepBackward()}var g;for(a=(g=new c(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(r.end))){f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m;d=new l(f,p,f,p+r.end.length);break}a=g.stepForward()}d&&t.remove(d),h&&(t.remove(h),o=h.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);u.start.row==o&&(u.start.column+=s),u.end.row==o&&(u.end.column+=s),t.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<n.length;t++)!function(e){var i=n[t],r=e[i];e[n[t]]=function(){return this.$delegator(i,arguments,r)}}(this)},this.$delegator=function(e,t,n){var i=t[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]){t[0]=o[1];var s=this.$modes[this.$embeds[r]];return s[e].apply(s,t)}}var a=n.apply(this,t);return n?a:void 0},this.transformAction=function(e,t,n,i,r){if(this.$behaviour){var o=this.$behaviour.getBehaviours();for(var s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var i in t)for(var r=t[i],o=0,s=r.length;o<s;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,c=r[o].token.length;a<c;a++)if(/keyword|support|storage/.test(r[o].token[a])){i=r[o].regex.match(/\(.+?\)/g)[a];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(u.prototype),t.Mode=u}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,r=t.start.column,o=e[i]||"";switch(t.action){case"insert":if(1===t.lines.length)e[i]=o.substring(0,r)+t.lines[0]+o.substring(r);else{var s=[i,1].concat(t.lines);e.splice.apply(e,s),e[i]=o.substring(0,r)+e[i],e[i+t.lines.length-1]+=o.substring(r)}break;case"remove":var a=t.end.column,c=t.end.row;i===c?e[i]=o.substring(0,r)+o.substring(a):e.splice(i,c-i+1,o.substring(0,r)+e[c].substring(a))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){function e(e,t,n){var i=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&i}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){if(!(t.start.row==t.end.row&&t.start.row!=this.row||t.start.row>this.row)){var n=function(t,n,i){var r="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,c=r?a:t.end;if(e(n,a,i))return{row:n.row,column:n.column};if(e(c,n,!i))return{row:n.row+o,column:n.column+(n.row==c.row?s:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),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._signal("change",{old:r,value:i})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,c=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){i.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new a(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return void 0==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),i={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:t}),this.clonePos(i)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){var i=this.clippedPos(e,t),r=this.clippedPos(e,n);return this.applyDelta({start:i,end:r,action:"remove",lines:this.getLinesForRange({start:i,end:r})},!0),this.clonePos(i)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&e>0,i=t<this.getLength()-1,r=n?e-1:e,o=n?this.getLine(r).length:0,a=i?t+1:t,c=i?0:this.getLine(a).length,l=new s(r,o,a,c),u=this.$lines.slice(e,t+1);return this.applyDelta({start:l.start,end:l.end,action:"remove",lines:this.getLinesForRange(l)}),u},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),r(this.$lines,e,t),this._signal("change",e))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length,r=e.start.row,o=e.start.column,s=0,a=0;;){s=a,a+=t-1;var c=n.slice(s,a);if(a>i){e.lines=c,e.start.row=r+s,e.start.column=o;break}c.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:e.action,lines:c},!0)}},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=t||0,o=n.length;r<o;r++)if((e-=n[r].length+i)<0)return{row:r,column:e+n[r].length+i};return{row:o-1,column:n[o-1].length}},this.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(e.row,n.length),s=t||0;s<o;++s)r+=n[s].length+i;return r+e.column}}).call(c.prototype),t.Document=c}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,i=-1,r=n.doc,o=t;n.lines[t];)t++;var s=r.getLength(),a=0;for(n.running=!1;t<s;){n.$tokenizeRow(t),i=t;do{t++}while(n.lines[t]);if(++a%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||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(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var i=e("./lib/lang"),r=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,c=s;c<=a;c++){var l=this.cache[c];null==l&&((l=i.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map(function(e){return new r(c,e.offset,c,e.offset+e.length)}),this.cache[c]=l.length?l:"");for(var u=l.length;u--;)t.drawSingleLineMarker(e,l[u].toScreenRange(n),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var c=0;c<s.length;c++){if(-1==(r=(i=s[c]).range.compareStart(t,n)))return void e(null,t,n,o,a);if(!e(null,i.start.row,i.start.column,o,a)&&e(i.placeholder,i.start.row,i.start.column,o)||0===r)return;a=!i.sameRow,o=i.end.column}e(null,t,n,o,a)},this.getNextFoldTo=function(e,t){for(var n,i,r=0;r<this.folds.length;r++){if(-1==(i=(n=this.folds[r]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var i,r,o=this.getNextFoldTo(e,t);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){var s=(r=this.folds).indexOf(i);for(0===s&&(this.start.column+=n);s<r.length;s++){if((i=r[s]).start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},this.split=function(e,t){var n=this.getNextFoldTo(e,t);if(!n||"inside"==n.kind)return null;var i=n.fold,o=this.folds,s=this.foldData,a=o.indexOf(i),c=o[a-1];this.end.row=c.end.row,this.end.column=c.end.column;var l=new r(s,o=o.splice(a,o.length-a));return s.splice(s.indexOf(this)+1,0,l),l},this.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if((e-=i.start.column-t)<0)return{row:i.start.row,column:i.start.column+e};if((e-=i.placeholder.length)<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(r.prototype),t.FoldLine=r}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("./range").Range.comparePoints,r=function(){this.ranges=[]};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){for(var r=this.ranges,o=n||0;o<r.length;o++){var s=r[o],a=i(e,s.end);if(!(a>0)){var c=i(e,s.start);return 0===a?t&&0!==c?-o-2:o:c>0||0===c&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],n=this.ranges,r=(n=n.sort(function(e,t){return i(e.start,t.start)}))[0],o=1;o<n.length;o++){e=r,r=n[o];var s=i(e.end,r.start);s<0||(0!=s||e.isEmpty()||r.isEmpty())&&(i(e.end,r.end)<0&&(e.end.row=r.end.row,e.end.column=r.end.column),n.splice(o,1),t.push(r),r=e,o--)}return this.ranges=n,t},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var i=this.pointIndex({row:e,column:0});i<0&&(i=-i-1);var r=this.pointIndex({row:t,column:0},i);r<0&&(r=-r-1);for(var o=[],s=i;s<r;s++)o.push(n[s]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,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(e){if("insert"==e.action)var t=e.start,n=e.end;else n=e.start,t=e.end;for(var i=t.row,r=n.row-i,o=-t.column+n.column,s=this.ranges,a=0,c=s.length;a<c;a++){if(!((l=s[a]).end.row<i)){if(l.start.row>i)break;if(l.start.row==i&&l.start.column>=t.column&&(l.start.column==t.column&&this.$insertRight||(l.start.column+=o,l.start.row+=r)),l.end.row==i&&l.end.column>=t.column){if(l.end.column==t.column&&this.$insertRight)continue;l.end.column==t.column&&o>0&&a<c-1&&l.end.column>l.start.column&&l.end.column==s[a+1].start.column&&(l.end.column-=o),l.end.column+=o,l.end.row+=r}}}if(0!=r&&a<c)for(;a<c;a++){var l;(l=s[a]).start.row+=r,l.end.row+=r}}}).call(r.prototype),t.RangeList=r}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){"use strict";e("../range").Range;var i=e("../range_list").RangeList,r=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}r.inherits(o,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);var t,n;t=e,n=this.start,s(t.start,n),s(t.end,n);for(var i=e.start.row,r=e.start.column,o=0,a=-1;o<this.subFolds.length&&1==(a=this.subFolds[o].range.compare(i,r));o++);var c=this.subFolds[o];if(0==a)return c.addSubFold(e);i=e.range.end.row,r=e.range.end.column;var l=o;for(a=-1;l<this.subFolds.length&&1==(a=this.subFolds[l].range.compare(i,r));l++);this.subFolds[l];if(0==a)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);this.subFolds.splice(o,l-o,e);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return function(e,t){a(e.start,t),a(e.end,t)}(e,this.start)}}.call(o.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){"use strict";var i=e("../range").Range,r=e("./fold_line").FoldLine,o=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var s=r[o];if(s.range.contains(e,t)){if(1==n&&s.range.isEnd(e,t))continue;if(-1==n&&s.range.isStart(e,t))continue;return s}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,r=[];t.column+=1,n.column-=1;for(var o=0;o<i.length;o++){var s=i[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=i[o].folds,c=0;c<a.length;c++){var l=a[c];if(-2==(s=l.range.compareRange(e)))break;if(2!=s){if(42==s)break;r.push(l)}}}}return t.column-=1,n.column+=1,r},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(!(i=i||this.getFoldLine(e)))return null;for(var r,o,s={end:{column:0}},a=0;a<i.folds.length;a++){var c=(o=i.folds[a]).range.compareEnd(e,t);if(-1==c){r=this.getLine(o.start.row).substring(s.end.column,o.start.column);break}if(0===c)return null;s=o}return r||(r=this.getLine(o.start.row).substring(s.end.column)),-1==n?r.substring(0,t-s.end.column):1==n?r.substring(t-s.end.column):r},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var r=n[i];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i<n.length;i++){var r=n[i];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r<n.length;r++){var o=n[r],s=o.end.row,a=o.start.row;if(s>=t){a<t&&(a>=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,c=n.start.column,l=n.end.row,u=n.end.column;if(!(a<l||a==l&&c<=u-2))throw new Error("The range has to be at least 2 characters width");var h=this.getFoldAt(a,c,1),d=this.getFoldAt(l,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,c)&&this.removeFold(h),d&&!d.range.isEnd(l,u)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),f.forEach(function(e){n.addSubFold(e)}));for(var p=0;p<i.length;p++){var g=i[p];if(l==g.start.row){g.addFold(n),s=!0;break}if(a==g.end.row){if(g.addFold(n),s=!0,!n.sameRow){var m=i[p+1];if(m&&m.start.row==l){g.merge(m);break}}break}if(l<=g.start.row)break}return s||(g=this.$addFoldLine(new r(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._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,r=this.$foldData,o=t.folds;if(1==o.length)r.splice(r.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column;else if(e.sameRow)o.splice(o.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);(o=s.folds).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._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,r;if(null==e?(n=new i(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new i(e,0,e,this.getLine(e).length):"row"in e?i.fromPoints(e,e):e,r=this.getFoldsInRangeList(n),t)this.removeFolds(r);else for(var o=r;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk(function(e,t,n,a){if(!(t<i)){if(t==i){if(n<r)return;a=Math.max(r,a)}s+=null!=e?e:o.getLine(t).substring(a,n)}},t,n),s},this.getDisplayLine=function(e,t,n,i){var r,o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,n,i):(r=this.doc.getLine(e)).substring(i||0,t||r.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new r(e,n)})},this.toggleFold=function(e){var t,n,i=this.selection.getRange();if(i.isEmpty()){var r=i.start;if(t=this.getFoldAt(r.row,r.column))return void this.expandFold(t);(n=this.findMatchingBracket(r))?1==i.comparePoint(n)?i.end=n:(i.start=n,i.start.column++,i.end.column--):(n=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==i.comparePoint(n)?i.end=n:i.start=n,i.start.column++):i=this.getCommentFoldRange(r.row,r.column)||i}else{var o=this.getFoldsInRange(i);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(t=o[0])}if(t||(t=this.getFoldAt(i.start.row,i.start.column)),t&&t.range.toString()==i.toString())this.expandFold(t);else{var s="...";if(!i.isMultiLine()){if((s=this.getTextRange(i)).length<4)return;s=s.trim().substring(0,2)+".."}this.addFold(s,i)}},this.getCommentFoldRange=function(e,t,n){var r=new s(this,e,t),o=r.getCurrentToken(),a=o.type;if(o&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var c=new RegExp(a),l=new i;if(1!=n){do{o=r.stepBackward()}while(o&&c.test(o.type));r.stepForward()}if(l.start.row=r.getCurrentTokenRow(),l.start.column=r.getCurrentTokenColumn()+2,r=new s(this,e,t),-1!=n){var u=-1;do{if(o=r.stepForward(),-1==u){var h=this.getState(r.$row);c.test(h)||(u=r.$row)}else if(r.$row>u)break}while(o&&c.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return l.end.row=r.getCurrentTokenRow(),l.end.column=r.getCurrentTokenColumn()+o.value.length-2,l}},this.foldAll=function(e,t,n){void 0==n&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var r=e=e||0;r<t;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<=t&&o.start.row>=e){r=o.end.row;try{var s=this.addFold("...",o);s&&(s.collapseChildren=n)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,r=e-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>=e)break}r--}return{range:-1!==r&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(o=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var c=a.range.start.row+1,l=a.range.end.row;this.foldAll(c,l,t.all?1e4:0)}else t.children?(l=s?s.end.row:this.getLength(),this.foldAll(e+1,l,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=r.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=r.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-s.getCurrentTokenColumn()-2,l=a.value;;){for(;c>=0;){var u=l.charAt(c);if(u==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:c+s.getCurrentTokenColumn()}}else u==e&&(o+=1);c-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;c=(l=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var c=t.column-s.getCurrentTokenColumn();;){for(var l=a.value,u=l.length;c<u;){var h=l.charAt(c);if(h==r){if(0==(o-=1))return{row:s.getCurrentTokenRow(),column:c+s.getCurrentTokenColumn()}}else h==e&&(o+=1);c+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;c=0}return null}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","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(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./bidihandler").BidiHandler,s=e("./config"),a=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,h=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,p=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++p.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new h(e)),this.$bidiHandler=new o(this),this.setDocument(e),this.selection=new c(this),s.resetOptions(this),this.setMode(t),s._signal("session",this)};p.$uid=0,function(){i.implement(this,a),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t<o))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(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||e.ignore||(this.$deltasDoc.push(e),t&&0!=t.length&&this.$deltasFold.push({action:"removeFolds",folds:t}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n,i=this.bgTokenizer.getTokens(e),r=0;if(null==t){var o=i.length-1;r=this.getLine(e).length}else for(o=0;o<i.length&&!((r+=i[o].value.length)>=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$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()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,i){var r=this.$markerId++,o={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:r};return i?(this.$frontMarkers[r]=o,this._signal("changeFrontMarker")):(this.$backMarkers[r]=o,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var r=new u(e,0,t,1/0);return r.id=this.addMarker(r,n,"fullLine",i),r},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getWordRange=function(e,t){var n=this.getLine(e),i=!1;if(t>0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))r=/\s/;else r=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var s=t;s<n.length&&n.charAt(s).match(r);)s++;return new u(e,o,e,s)},this.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(t&&t());this.$modeId=i,s.loadModule(["mode",i],function(e){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[i]=e,e.$id=i),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.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 d(n);var r=this;this.bgTokenizer.addEventListener("update",function(e){r._signal("tokenizerUpdate",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},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 e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,c=0;c<a;c++){if(c>s){if((c=o.end.row+1)>=a)break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[c]&&(n[c]=this.$getStringScreenWidth(t[c])[0]),n[c]>i&&(i=n[c])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,i=e.length-1;-1!=i;i--){var r=e[i];"doc"==r.group?(this.doc.revertDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!0,n)):r.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=null,i=0;i<e.length;i++){var r=e[i];"doc"==r.group&&(this.doc.applyDeltas(r.deltas),n=this.$getUndoSelection(r.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function i(e){return t?"insert"!==e.action:"insert"===e.action}var r,o,s=e[0];i(s)?r=u.fromPoints(s.start,s.end):r=u.fromPoints(s.start,s.start);for(var a=1;a<e.length;a++)i(s=e[a])?(o=s.start,-1==r.compare(o.row,o.column)&&r.setStart(o),o=s.end,1==r.compare(o.row,o.column)&&r.setEnd(o),!0):(o=s.start,-1==r.compare(o.row,o.column)&&(r=u.fromPoints(s.start,s.start)),!1);if(null!=n){0===u.comparePoints(n.start,r.start)&&(n.start.column+=r.end.column-r.start.column,n.end.column+=r.end.column-r.start.column);var c=n.compareRange(r);1==c?r.setStart(n.start):-1==c&&r.setEnd(n.end)}return r},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var i=this.getTextRange(e),r=this.getFoldsInRange(e),o=u.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row;(l=s?-e.end.column:e.start.column-e.end.column)&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=l),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=l)),s&&o.start.row>=e.end.row&&(o.start.row+=s,o.end.row+=s)}if(o.end=this.insert(o.start,i),r.length){var a=e.start,c=o.start,l=(s=c.row-a.row,c.column-a.column);this.addFolds(r.map(function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=l),e.end.row==a.row&&(e.end.column+=l),e.start.row+=s,e.end.row+=s,e}))}return o},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s<i&&" "==o.charAt(s);++s);s<i&&"\t"==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(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((r=this.getRowFoldStart(e+n))<0)return 0;var i=r-e}else if(n>0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new u(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e}),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,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._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,s=r.row,a=s-o,c=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var l=this.$foldData;c=this.getFoldsInRange(e),this.removeFolds(c);var u=0;if(g=this.getFoldLine(r.row)){g.addRemoveChars(r.row,r.column,i.column-r.column),g.shiftRow(-a);var h=this.getFoldLine(o);h&&h!==g&&(h.merge(g),g=h),u=l.indexOf(g)+1}for(;u<l.length;u++){(g=l[u]).start.row>=r.row&&g.shiftRow(-a)}s=o}else{var d=Array(a);d.unshift(o,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,d);l=this.$foldData,u=0;if(g=this.getFoldLine(o)){var p=g.range.compareInside(i.row,i.column);0==p?(g=g.split(i.row,i.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,r.column-i.column)):-1==p&&(g.addRemoveChars(o,0,r.column-i.column),g.shiftRow(a)),u=l.indexOf(g)+1}for(;u<l.length;u++){var g;(g=l[u]).start.row>=o&&g.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(c=this.getFoldsInRange(e),this.removeFolds(c),a=-a),(g=this.getFoldLine(o))&&g.addRemoveChars(o,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,s):this.$updateRowLengthCache(o,s),c},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(n,i){var r,o,s=this.doc.getAllLines(),a=this.getTabSize(),c=this.$wrapData,l=this.$wrapLimit,u=n;for(i=Math.min(i,s.length-1);u<=i;)(o=this.getFoldLine(u,o))?(r=[],o.walk(function(n,i,o,a){var c;if(null!=n){(c=this.$getDisplayTokens(n,r.length))[0]=e;for(var l=1;l<c.length;l++)c[l]=t}else c=this.$getDisplayTokens(s[i].substring(a,o),r.length);r=r.concat(c)}.bind(this),o.end.row,s[o.end.row].length+1),c[o.start.row]=this.$computeWrapSplits(r,l,a),u=o.end.row+1):(r=this.$getDisplayTokens(s[u]),c[u]=this.$computeWrapSplits(r,l,a),u++)};var e=3,t=4,n=10,o=11,c=12;function h(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}this.$computeWrapSplits=function(i,r,s){if(0==i.length)return[];var a=[],l=i.length,u=0,h=0,d=this.$wrapAsCode,f=this.$indentedSoftWrap,p=r<=Math.max(2*s,8)||!1===f?0:Math.floor(r/2);function g(e){var t=i.slice(u,e),r=t.length;t.join("").replace(/12/g,function(){r-=1}).replace(/2/g,function(){r-=1}),a.length||(m=function(){var e=0;if(0===p)return e;if(f)for(var t=0;t<i.length;t++){var r=i[t];if(r==n)e+=1;else{if(r!=o){if(r==c)continue;break}e+=s}}return d&&!1!==f&&(e+=s),Math.min(e,p)}(),a.indent=m),h+=r,a.push(h),u=e}for(var m=0;l-u>r-m;){var v=u+r-m;if(i[v-1]>=n&&i[v]>=n)g(v);else if(i[v]!=e&&i[v]!=t){for(var y=Math.max(v-(r-(r>>2)),u-1);v>y&&i[v]<e;)v--;if(d){for(;v>y&&i[v]<e;)v--;for(;v>y&&9==i[v];)v--}else for(;v>y&&i[v]<n;)v--;v>y?g(++v):(2==i[v=u+r]&&v--,g(v-m))}else{for(;v!=u-1&&i[v]!=e;v--);if(v>u){g(v);continue}for(v=u+r;v<i.length&&i[v]==t;v++);if(v==i.length)break;g(v)}}return a},this.$getDisplayTokens=function(e,t){var i,r=[];t=t||0;for(var s=0;s<e.length;s++){var a=e.charCodeAt(s);if(9==a){i=this.getScreenTabSize(r.length+t),r.push(o);for(var l=1;l<i;l++)r.push(c)}else 32==a?r.push(n):a>39&&a<48||a>57&&a<64?r.push(9):a>=4352&&h(a)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var i,r;for(null==t&&(t=1/0),n=n||0,r=0;r<e.length&&(9==(i=e.charCodeAt(r))?n+=this.getScreenTabSize(n):i>=4352&&h(i)?n+=2:n+=1,!(n>t));r++);return[n,r]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var i,r,o=0,s=0,a=0,c=0,l=this.$screenRowCache,u=this.$getRowCacheIndex(l,e),h=l.length;if(h&&u>=0){a=l[u],o=this.$docRowCache[u];var d=e>l[h-1]}else d=!h;for(var f=this.getLength()-1,p=this.getNextFoldLine(o),g=p?p.start.row:1/0;a<=e&&!(a+(c=this.getRowLength(o))>e||o>=f);)a+=c,++o>g&&(o=p.end.row+1,g=(p=this.getNextFoldLine(o,p))?p.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(p&&p.start.row<=o)i=this.getFoldDisplayLine(p),o=p.start.row;else{if(a+c<=e||o>f)return{row:f,column:this.getLine(f).length};i=this.getLine(o),p=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var y=this.$wrapData[o];y&&(r=y[v],v>0&&y.length&&(m=y.indent,s=y[v-1]||y[y.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=r&&(s=r-1),p?p.idxToPosition(s):{row:o,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,o=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var s,a=0,c=this.$docRowCache,l=this.$getRowCacheIndex(c,e),u=c.length;if(u&&l>=0){a=c[l],r=this.$screenRowCache[l];var h=e>c[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a<e;){if(a>=f){if((s=d.end.row+1)>e)break;f=(d=this.getNextFoldLine(s,d))?d.start.row:1/0}else s=a+1;r+=this.getRowLength(a),a=s,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var p="";d&&a>=f?(p=this.getFoldDisplayLine(d,e,t),o=d.start.row):(p=this.getLine(e).substring(0,t),o=e);var g=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){for(var v=0;p.length>=m[v];)r++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return{row:r,column:g+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);i<n;){var o=this.$wrapData[i];e+=o?o.length+1:1,++i>r&&(i=t.end.row+1,r=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)e-=(t=s[a]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,i){if(0===n)return[0,0];var r,o;for(n||(n=1/0),i=i||0,o=0;o<t.length&&!((i+="\t"===(r=t.charAt(o))?this.getScreenTabSize(i):e.getCharacterWidth(r))>n);o++);return[i,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=h}.call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),s.defineOptions(p.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){isNaN(e)||this.$tabSize===e||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=p}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach(function(e,n,r,s){return i=new o(e,n,r,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)}),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var c,l=a.length,u=r.length-l;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<l;d++)if(-1==r[h+d].search(a[d]))continue e;var f=r[h],p=r[h+l-1],g=f.length-f.match(a[0])[0].length,m=p.match(a[l-1])[0].length;c&&c.end.row===h&&c.end.column>g||(s.push(c=new o(h,g,h+l-1,m)),l>2&&(h=h+l-2))}}else for(var v=0;v<r.length;v++){var y=i.getMatchOffsets(r[v],a);for(d=0;d<y.length;d++){var b=y[d];s.push(new o(v,b.offset,v,b.offset+b.length))}}if(n){var w=n.start.column,x=n.start.column;for(v=0,d=s.length-1;v<d&&s[v].start.column<w&&s[v].start.row==n.start.row;)v++;for(;v<d&&s[d].end.column>x&&s[d].end.row==n.end.row;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},this.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var r=i.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n)),e.wholeWord&&(n=function(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}(n,e));var r=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(e){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],t))}catch(e){return!1}return i},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=1==t.backwards,r=0!=t.skipCurrent,o=t.range,s=t.start;s||(s=o?o[i?"end":"start"]:e.selection.getRange()),s.start&&(s=s[r!=i?"end":"start"]);var a=o?o.start.row:0,c=o?o.end.row:e.getLength()-1;if(i)var l=function(e){var n=s.row;if(!h(n,s.column,e)){for(n--;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=c,a=s.row;n>=a;n--)if(h(n,Number.MAX_VALUE,e))return}};else l=function(e){var n=s.row;if(!h(n,s.column,e)){for(n+=1;n<=c;n++)if(h(n,0,e))return;if(0!=t.wrap)for(n=a,c=s.row;n<=c;n++)if(h(n,0,e))return}};if(t.$isMultiLine)var u=n.length,h=function(t,r,o){var s=i?t-u+1:t;if(!(s<0)){var a=e.getLine(s),c=a.search(n[0]);if(!(!i&&c<r||-1===c)){for(var l=1;l<u;l++)if(-1==(a=e.getLine(s+l)).search(n[l]))return;var h=a.match(n[u-1])[0].length;if(!(i&&h>r))return!!o(s,c,s+u-1,h)||void 0}}};else if(i)h=function(t,i,r){var o,s=e.getLine(t),a=[],c=0;for(n.lastIndex=0;o=n.exec(s);){var l=o[0].length;if(c=o.index,!l){if(c>=s.length)break;n.lastIndex=c+=1}if(o.index+l>i)break;a.push(o.index,l)}for(var u=a.length-1;u>=0;u-=2){var h=a[u-1];if(r(t,h,t,h+(l=a[u])))return!0}};else h=function(t,i,r){var o,s=e.getLine(t),a=i;for(n.lastIndex=i;o=n.exec(s);){var c=o[0].length;if(r(t,a=o.index,t,a+c))return!0;if(!c&&(n.lastIndex=a+=1,a>=s.length))return!1}};return{forEach:l}}}).call(s.prototype),t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/useragent"),o=i.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var s=o.indexOf(e);-1!=s&&(o.splice(s,1),1==o.length&&(i[r]=o[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach(function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")},this),i+=" "}var s=this.parseKeys(e),a=o[s.hashId]+s.key;this._addCommandToBinding(i+a,t,n)},this)},this._addCommandToBinding=function(t,n,i){var r,o=this.commandKeyBinding;if(n)if(!o[t]||this.$singleCommand)o[t]=n;else{Array.isArray(o[t])?-1!=(r=o[t].indexOf(n))&&o[t].splice(r,1):o[t]=[o[t]],"number"!=typeof i&&(i=e(n));var s=o[t];for(r=0;r<s.length;r++){if(e(s[r])>i)break}s.splice(r,0,n)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=o[t]+n,s=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};i.inherits(s,r),function(){i.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;var r={editor:t,command:e,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._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(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(s.prototype),t.CommandManager=s}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:s("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:s("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:s("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(e){},readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,c=e.session.doc.getLine(n.row),l=n.row+1;l<=r.row+1;l++){var u=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(l)));0!==u.length&&(u=" "+u),c+=u}r.row+1<e.session.doc.getLength()-1&&(c+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(n.row,0,r.row+2,0),c),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===t&&i[s].end.column===n||r.push(new o(i[s].end.row,i[s].end.column,t,n))),0===s?0===i[s].start.row&&0===i[s].start.column||r.push(new o(0,0,i[s].start.row,i[s].start.column)):r.push(new o(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<r.length;s++)e.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.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","ace/token_iterator"],function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/lang"),s=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,l=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,d=e("./search").Search,f=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,v=e("./config"),y=e("./token_iterator").TokenIterator,b=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.id="editor"+ ++b.$uid,this.commands=new g(s.isMac?"mac":"win",m),"object"==typeof document&&(this.textInput=new a(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new l(this)),this.keyBinding=new u(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&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new h("")),v.resetOptions(this),v._signal("editor",this)};b.$uid=0,function(){i.implement(this,p),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.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(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null;this._signal("beforeEndOperation");var t=this.curOp.command;t.name&&this.$blockScrolling>0&&this.$blockScrolling--;var n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("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.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var i=new f(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)i=t.$mode.getMatching(e.session);i&&(t.$bracketHighlight=t.addMarker(i,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),i=new y(e.session,n.row,n.column),r=i.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==r.type.indexOf("tag-open")||(r=i.stepForward())){var o=r.value,s=0,a=i.stepBackward();if("<"==a.value)do{a=r,(r=i.stepForward())&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(r&&s>=0);else{do{r=a,a=i.stepBackward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--)}while(a&&s<=0);i.stepForward()}if(!r)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var c=i.getCurrentTokenRow(),l=i.getCurrentTokenColumn(),u=new f(c,l,c,l+r.value.length),h=t.$backMarkers[t.$tagHighlight];t.$tagHighlight&&void 0!=h&&0!==u.compareRange(h.range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),u&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(u,"ace_bracket","text"))}}},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.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||(v.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new f(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column-1,i=t.end.column+1,r=e.getLine(t.start.row),o=r.length,s=r.substring(Math.max(n,0),Math.min(i,o));if(!(n>=0&&/^[\w\d]/.test(s)||i<=o&&/[\w\d]$/.test(s)))if(s=r.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(s))return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s})}},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(e){this.renderer.updateText(),this._emit("changeMode",e)},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 e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(t);else{var n=t.split(/\r\n|\r|\n/),i=this.selection.rangeList.ranges;if(n.length>i.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,t);for(var r=i.length;r--;){var o=i[r];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,n[r])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,i=n.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=i.transformAction(n.getState(r.row),"insertion",this,n,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(s=new f.fromPoints(r,r)).end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(r.row);if(r.column>a.search(/\S|$/)){var c=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+c)}}this.clearSelection();var l=r.column,u=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(u,a,e));n.insert(r,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new f(r.row,l+o.selection[0],r.row,l+o.selection[1])):this.selection.setSelectionRange(new f(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}h&&i.autoOutdent(u,n,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}r&&(t=r)}this.session.remove(t),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 e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);t<r.length?(n=r.charAt(t)+r.charAt(t-1),i=new f(e.row,t-1,e.row,t+1)):(n=r.charAt(t-1)+r.charAt(t-2),i=new f(e.row,t-2,e.row,t)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end)}}},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n)){u=this.$getSelectedRows();return void e.indentRows(u.first,u.last,"\t")}}var i=e.getLine(t.start.row),r=t.start,s=e.getTabSize(),a=e.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var c=s-a%s,l=o.stringRepeat(" ",c);else{for(c=a%s;" "==i[t.start.column-1]&&c;)t.start.column--,c--;this.selection.setSelectionRange(t),l="\t"}return this.insert(l)}var u=this.$getSelectedRows();e.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var r=new f(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex<t;){var r=n.exec(i);if(r.index<=t&&r.index+r[0].length>=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new f(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,n);if(o){var s=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-s,c=parseFloat(o.value);c*=Math.pow(10,a),s!==o.end&&n<s?e*=Math.pow(10,o.end-n-1):e*=Math.pow(10,o.end-n),c+=e;var l=(c/=Math.pow(10,a)).toFixed(a),u=new f(t,o.start,t,o.end);this.session.replace(u,l),this.moveCursorTo(t,Math.max(o.start+1,n+l.length-o.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,s=t.insert(o,t.getTextRange(n),!1);n.start=o,n.end=s,e.setSelectionRange(n,i)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var s=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,c=0,l=s.length,u=0;u<l;u++){var h=u;s[u].moveBy(a,0);for(var d=(n=this.$getSelectedRows(s[u])).first,f=n.last;++u<l;){c&&s[u].moveBy(c,0);var p=this.$getSelectedRows(s[u]);if(t&&p.first!=f)break;if(!t&&p.first>f+1)break;f=p.last}for(u--,a=this.session.$moveLines(d,f,t?0:e),t&&-1==e&&(h=u+1);h<=u;)s[h].moveBy(a,0),h++;t||(a=0),c+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),this.$blockScrolling--;var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&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(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.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(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),r=i.getCurrentToken(),o=r||i.stepForward();if(o){var s,a,c=!1,l={},u=n.column-o.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!c;u++)if(h[o.value[u]])switch(a=h[o.value[u]]+"."+o.type.replace("rparen","lparen"),isNaN(l[a])&&(l[a]=0),o.value[u]){case"(":case"[":case"{":l[a]++;break;case")":case"]":case"}":l[a]--,-1===l[a]&&(s="bracket",c=!0)}}else o&&-1!==o.type.indexOf("tag-name")&&(isNaN(l[o.value])&&(l[o.value]=0),"<"===r.value?l[o.value]++:"</"===r.value&&l[o.value]--,-1===l[o.value]&&(s="tag",c=!0));c||(r=o,o=i.stepForward(),u=0)}while(o&&!c);if(s){var d,p;if("bracket"===s)(d=this.session.getBracketRange(n))||(p=(d=new f(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1)).start,(t||p.row===n.row&&Math.abs(p.column-n.column)<2)&&(d=this.session.getBracketRange(p)));else if("tag"===s){if(!o||-1===o.type.indexOf("tag-name"))return;var g=o.value;if(0===(d=new f(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2)).compare(n.row,n.column)){c=!1;do{o=r,(r=i.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&d.setEnd(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+1),o.value===g&&-1!==o.type.indexOf("tag-name")&&("<"===r.value?l[g]++:"</"===r.value&&l[g]--,0===l[g]&&(c=!0)))}while(r&&!c)}o&&o.type.indexOf("tag-name")&&(p=d.start).row==n.row&&Math.abs(p.column-n.column)<2&&(p=d.end)}(p=d&&d.cursor||p)&&(e?d&&t?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(p.row,p.column):this.selection.moveTo(p.row,p.column))}}},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}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(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,e)&&(i=1),null!==n&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),i):i},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;this.$blockScrolling+=1;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;o>=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),this.$blockScrolling-=1,i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&i.mixin(t,e);var r=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&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._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,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&&(t=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=o.top-s.offset;null!=(i=o.top>=0&&a+t.top<0||!(o.top<s.height&&o.top+t.top+s.lineHeight>window.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=o.left+"px",r.style.height=s.lineHeight+"px",r.scrollIntoView(i)),i=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}.call(b.prototype),v.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"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",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=b}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){"use strict";var i=function(){this.reset()};(function(){function e(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function t(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++){for(var r=e[i],o={group:r.group,deltas:new Array(r.length)},s=0;s<r.deltas.length;s++){var a=r.deltas[s];o.deltas[s]=t(a)}n[i]=o}return n}this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(this.$deserializeDeltas(t),e),this.$undoStack.push(t),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},this.$serializeDeltas=function(t){return n(t,e)},this.$deserializeDeltas=function(e){return n(e,t)}}).call(i.prototype),t.UndoManager=i}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.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(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],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(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var i=new Array(n+1);i.unshift(t,1),this.$annotations.splice.apply(this.$annotations,i)}}},this.update=function(e){for(var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),o=t.getNextFoldLine(n),s=o?o.start.row:1/0,a=this.$showFoldWidgets&&t.foldWidgets,c=t.$breakpoints,l=t.$decorations,u=t.$firstLineNumber,h=0,d=t.gutterRenderer||this.$renderer,f=null,p=-1,g=n;;){if(g>s&&(g=o.end.row+1,s=(o=t.getNextFoldLine(g,o))?o.start.row:1/0),g>r){for(;this.$cells.length>p+1;)f=this.$cells.pop(),this.element.removeChild(f.element);break}(f=this.$cells[++p])||((f={element:null,textNode:null,foldWidget:null}).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 ";if(c[g]&&(m+=c[g]),l[g]&&(m+=l[g]),this.$annotations[g]&&(m+=this.$annotations[g].className),f.element.className!=m&&(f.element.className=m),(y=t.getRowLength(g)*e.lineHeight+"px")!=f.element.style.height&&(f.element.style.height=y),a){var v=a[g];null==v&&(v=a[g]=t.getFoldWidget(g))}if(v){f.foldWidget||(f.foldWidget=i.createElement("span"),f.element.appendChild(f.foldWidget));m="ace_fold-widget ace_"+v;"start"==v&&g==s&&g<o.end.row?m+=" ace_closed":m+=" ace_open",f.foldWidget.className!=m&&(f.foldWidget.className=m);var y=e.lineHeight+"px";f.foldWidget.style.height!=y&&(f.foldWidget.style.height=y)}else f.foldWidget&&(f.element.removeChild(f.foldWidget),f.foldWidget=null);var b=h=d?d.getText(t,g):g+u;b!==f.textNode.data&&(f.textNode.data=b),g++}this.element.style.height=e.minHeight+"px",(this.$fixedWidth||t.$useWrapMode)&&(h=t.getLength()+u);var w=d?d.getWidth(t,h,e):h.toString().length*e.characterWidth,x=this.$padding||this.$computePadding();(w+=x.left+x.right)===this.gutterWidth||isNaN(w)||(this.gutterWidth=w,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",w))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var i=e("../range").Range,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e){this.config=e;var t=[];for(var n in this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),s=this.$padding+(this.session.$bidiHandler.isBidiRow(r.start.row)?this.session.$bidiHandler.getPosLeft(r.start.column):r.start.column*e.characterWidth);i.renderer(t,r,s,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.session.$bidiHandler.isBidiRow(r.start.row)?this.drawBidiSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,r,o){for(var s=this.session,a=t.start.row,c=t.end.row,l=a,u=0,h=0,d=s.getScreenLastRowColumn(l),f=null,p=new i(l,t.start.column,l,h);l<=c;l++)p.start.row=p.end.row=l,p.start.column=l==a?t.start.column:s.getRowWrapIndent(l),p.end.column=d,u=h,h=d,d=l+1<c?s.getScreenLastRowColumn(l+1):l==c?0:t.end.column,f=n+(l==a?" ace_start":"")+" ace_br"+((l==a||l==a+1&&t.start.column?1:0)|(u<h?2:0)|(h>d?4:0)|(l==c?8:0)),this.session.$bidiHandler.isBidiRow(l)?this.drawBidiSingleLineMarker(e,p,f,r,l==c?0:1,o):this.drawSingleLineMarker(e,p,f,r,l==c?0:1,o)},this.drawMultiLineMarker=function(e,t,n,i,r){var o,s,a,c=this.$padding;(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((l=t.clone()).end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(e,l,n+" ace_br1 ace_start",i,null,r)):(o=i.lineHeight,s=this.$getTop(t.start.row,i),a=c+t.start.column*i.characterWidth,e.push("<div class='",n," ace_br1 ace_start' style='","height:",o,"px;","right:0;","top:",s,"px;","left:",a,"px;",r,"'></div>"));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var l;(l=t.clone()).start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(e,l,n+" ace_br12",i,null,r)}else{var u=t.end.column*i.characterWidth;o=i.lineHeight,s=this.$getTop(t.end.row,i),e.push("<div class='",n," ace_br12' style='","height:",o,"px;","width:",u,"px;","top:",s,"px;","left:",c,"px;",r,"'></div>")}if(!((o=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){s=this.$getTop(t.start.row+1,i);var h=(t.start.column?1:0)|(t.end.column?0:8);e.push("<div class='",n,h?" ace_br"+h:"","' style='","height:",o,"px;","right:0;","top:",s,"px;","left:",c,"px;",r,"'></div>")}},this.drawSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=(t.end.column+(r||0)-t.start.column)*i.characterWidth,c=this.$getTop(t.start.row,i),l=this.$padding+t.start.column*i.characterWidth;e.push("<div class='",n,"' style='","height:",s,"px;","width:",a,"px;","top:",c,"px;","left:",l,"px;",o||"","'></div>")},this.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=this.$getTop(t.start.row,i),c=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(t){e.push("<div class='",n,"' style='","height:",s,"px;","width:",t.width+(r||0),"px;","top:",a,"px;","left:",c+t.left,"px;",o||"","'></div>")})},this.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),e.push("<div class='",n,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")},this.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;e.push("<div class='",n,"' style='","height:",s,"px;","top:",o,"px;","left:0;right:0;",r||"","'></div>")}}).call(o.prototype),t.Marker=o}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){i.implement(this,s),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+o.stringRepeat(this.TAB_CHAR,n)+"</span>"):t.push(o.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i="ace_indent-guide",r="",s="";if(this.showInvisibles){i+=" ace_invisible",r=" ace_invisible_space",s=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),c=o.stringRepeat(this.TAB_CHAR,this.tabSize)}else c=a=o.stringRepeat(" ",this.tabSize);this.$tabStrings[" "]="<span class='"+i+r+"'>"+a+"</span>",this.$tabStrings["\t"]="<span class='"+i+s+"'>"+c+"</span>"}},this.updateLines=function(e,t,n){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var i=Math.max(t,e.firstRow),r=Math.min(n,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<i;a++){if(c=this.session.getFoldLine(a)){if(c.containsRow(i)){i=c.start.row;break}a=c.end.row}s++}a=i;for(var c,l=(c=this.session.getNextFoldLine(a))?c.start.row:1/0;a>l&&(a=c.end.row+1,l=(c=this.session.getNextFoldLine(a,c))?c.start.row:1/0),!(a>r);){var u=o[s++];if(u){var h=[];this.$renderLine(h,a,!this.$useLineGroups(),a==l&&c),u.style.height=e.lineHeight*this.session.getRowLength(a)+"px",u.innerHTML=h.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var r=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)}if(e.lastRow>t.lastRow){r=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(r)}},this.$renderLinesFragment=function(e,t,n){for(var i=this.element.ownerDocument.createDocumentFragment(),o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;o>a&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(o>n);){var c=r.createElement("div"),l=[];if(this.$renderLine(l,o,!1,o==a&&s),c.innerHTML=l.join(""),this.$useLineGroups())c.className="ace_line_group",i.appendChild(c),c.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;c.firstChild;)i.appendChild(c.firstChild);o++}return i},this.update=function(e){this.config=e;for(var t=[],n=e.firstRow,i=e.lastRow,r=n,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;r>s&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>i);)this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(r),"px'>"),this.$renderLine(t,r,!1,r==s&&o),this.$useLineGroups()&&t.push("</div>"),r++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){var r=this,s=i.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\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]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,function(e,n,i,s,a){if(n)return r.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+o.stringRepeat(r.SPACE_CHAR,e.length)+"</span>":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if("\t"==e){var c=r.session.getScreenTabSize(t+s);return t+=c-1,r.$tabStrings[c]}if(" "==e){var l=r.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u=r.showInvisibles?r.SPACE_CHAR:"";return t+=1,"<span class='"+l+"' style='width:"+2*r.config.characterWidth+"px'>"+u+"</span>"}return i?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+r.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+2*r.config.characterWidth+"px'>"+e+"</span>")});if(this.$textToken[n.type])e.push(s);else{var a="ace_"+n.type.replace(/\./g," ace_"),c="";"fold"==n.type&&(c=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",a,"'",c,">",s,"</span>")}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);return i<=0||i>=n?t:" "==t[0]?(i-=i%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],i/this.tabSize)),t.substr(i)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],i)),t.substr(i)):t},this.$renderWrappedLine=function(e,t,n,i){for(var r=0,s=0,a=n[0],c=0,l=0;l<t.length;l++){var u=t[l],h=u.value;if(0==l&&this.displayIndentGuides){if(r=h.length,!(h=this.renderIndentGuide(e,h,a)))continue;r-=h.length}if(r+h.length<a)c=this.$renderToken(e,c,u,h),r+=h.length;else{for(;r+h.length>=a;)c=this.$renderToken(e,c,u,h.substring(0,a-r)),h=h.substring(a-r),r=a,i||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),e.push(o.stringRepeat(" ",n.indent)),c=0,a=n[++s]||Number.MAX_VALUE;0!=h.length&&(r+=h.length,c=this.$renderToken(e,c,u,h))}}},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],r=i.value;this.displayIndentGuides&&(r=this.renderIndentGuide(e,r)),r&&(n=this.$renderToken(e,n,i,r));for(var o=1;o<t.length;o++)r=(i=t[o]).value,n=this.$renderToken(e,n,i,r)},this.$renderLine=function(e,t,n,i){if(i||0==i||(i=this.session.getFoldLine(t)),i)var r=this.$getFoldLineTokens(t,i);else r=this.session.getTokens(t);if(n||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>"),r.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,r,o,n):this.$renderSimpleLine(e,r)}this.showInvisibles&&(i&&(t=i.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){var n=this.session,i=[];var r=n.getTokens(e);return t.walk(function(e,t,o,s,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.length<t;)if(o+=e[r].value.length,++r==e.length)return;for(o!=t&&((s=e[r].value.substring(t-o)).length>n-t&&(s=s.substring(0,n-t)),i.push({type:e[r].type,value:s}),o=t+s.length,r+=1);o<n&&r<e.length;){var s;(s=e[r].value).length+o>n?i.push({type:e[r].type,value:s.substring(0,n-o)}):i.push(e[r]),o+=s.length,r+=1}}(r,s,o))},t.end.row,this.session.getLine(t.end.row).length),i},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(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i,r=e("../lib/dom"),o=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===i&&(i=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(i?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||i||(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var r=t.length;n<r;n++){var o=this.getPixelPosition(t[n].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&n>1)){var s=(this.cursors[i++]||this.addCursor()).style;this.drawCursor?this.drawCursor(s,o,e,t[n],this.session):(s.left=o.left+"px",s.top=o.top+"px",s.width=e.characterWidth+"px",s.height=e.lineHeight+"px")}}for(;this.cursors.length>i;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=function(e){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),e.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(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var c=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=r.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(c,a),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>32768?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(c.prototype);var l=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(l,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(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(l.prototype),t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=l,t.VScrollBar=c,t.HScrollBar=l}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var i=e("./lib/event"),r=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;i.nextFrame(function(){var e;for(t.pending=!1;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(r.prototype),t.RenderLoop=r}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,c=0,l=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),c||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){i.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=r.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;c=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===c){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var t={height:e.height,width:e.width/c}}else t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/c};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(l.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./config"),s=e("./lib/useragent"),a=e("./layer/gutter").Gutter,c=e("./layer/marker").Marker,l=e("./layer/text").Text,u=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,f=e("./renderloop").RenderLoop,p=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter;r.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.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;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.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;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.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,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.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;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;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;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.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;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_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;max-width: 100%;padding: 3px 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;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.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;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");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;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);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);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.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 {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 {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-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;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_text-input-ios {position: absolute !important;top: -100000px !important;left: -100000px !important;}',"ace_editor.css");var m=function(e,t){var n=this;this.container=e||r.createElement("div"),this.$keepTextAreaAtCursor=!s.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),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 a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new c(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),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,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new f(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,g),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(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},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(e){e?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(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,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&&(e||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",r|=this.CHANGE_SCROLL),n&&(e||o.width!=n)&&(r|=this.CHANGE_SIZE,o.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,n-t-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()||e)&&(r|=this.CHANGE_FULL)),o.$dirty=!n||!i,r&&this._signal("resize",s),r},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,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 e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var i=this.textarea.style,r=this.lineHeight;if(t<0||t>e.height-r)i.top=i.left="0";else{var o=this.characterWidth;if(this.$composition){var s=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(s)[0]+2,r+=2}(n-=this.scrollLeft)>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth,i.height=r+"px",i.width=o+"px",i.left=Math.min(n,this.$size.scrollerWidth-o)+"px",i.top=Math.min(t,this.$size.height-r)+"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 e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,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(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+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(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}n=this.layerConfig,this.$updateScrollBarV(),e&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"}if(e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return 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");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&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");e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender")}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=e>t;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._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),s=this.$horizScroll!==o;s&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=this.scrollTop%this.lineHeight,l=t.scrollerHeight+this.lineHeight,u=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=u;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+h.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+u<0||this.scrollTop>h.top),f=a!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var p,g,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-c)/this.lineHeight)),y=v+m,b=this.lineHeight;v=e.screenToDocumentRow(v,0);var w=e.getFoldLine(v);w&&(v=w.start.row),p=e.documentToScreenRow(v,0),g=e.getRowLength(v)*b,y=Math.min(e.screenToDocumentRow(y,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(y)*b+g,c=this.scrollTop-p*b;var x=0;return this.layerConfig.width!=r&&(x=this.CHANGE_H_SCROLL),(s||f)&&(x=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),f&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:y,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:c,gutterOffset:b?Math.max(0,Math.ceil((c+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},x},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*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(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),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(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,s=n&&n.top||0,a=n&&n.bottom||0,c=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;c+s>o?(t&&c+s>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):c+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&c+this.$size.scrollerHeight-a<o-this.lineHeight&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight-this.$size.scrollerHeight));var l=this.scrollLeft;l>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):l+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):l<=this.$padding&&r-l<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(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),i=this.$size.scrollerHeight-this.lineHeight,r=n.top-i*(t||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(e,t){var n,i,r=0,o=this.STEPS,s=[];for(r=0;r<o;++r)s.push((n=r/this.STEPS,i=e,(t-e)*(Math.pow(n-1,3)+1)+i));return s},this.scrollToLine=function(e,t,n,i){var r=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(r-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(r),!1!==n&&this.animateScrolling(o,i)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==n)return}var o=i.$calcSteps(e,n);this.$scrollAnimation={from:e,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,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=e+this.scrollLeft-n.left-this.$padding,r=i/this.characterWidth,o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=Math.round(r);return{row:o,column:s,side:r-s>0?1:-1,offsetX:i}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=e+this.scrollLeft-n.left-this.$padding,r=Math.round(i/this.characterWidth),o=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(o,Math.max(r,0),i)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):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(e){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(e){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(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)s(e);else{var i=e||this.$options.theme.initialValue;o.loadModule(["theme",i],s)}function s(i){if(n.$themeId!=e)return t&&t();if(!i||!i.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");r.importCssString(i.cssText,i.cssClass,n.container.ownerDocument),n.theme&&r.removeCssClass(n.container,n.theme.cssClass);var o="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=i.cssClass,n.theme=i,r.addCssClass(n.container,i.cssClass),r.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),t&&t()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){r.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(m.prototype),o.defineOptions(m.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&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(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=r.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=m}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e,t){var n=function(e,t){var n=t.src;r.qualifyURL(e);try{return new Blob([n],{type:"application/javascript"})}catch(e){var i=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return i.append(n),i.getBlob("application/javascript")}}(e,t),i=(window.URL||window.webkitURL).createObjectURL(n);return new Worker(i)}var c=function(t,n,i,r,o){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)r=r||s.moduleUrl(n.id,"worker");else{var c=this.$normalizePath;r=r||c(e.toUrl("ace/worker/worker.js",null,"_"));var l={};t.forEach(function(t){l[t]=c(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=a(r,n),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:l,module:n.id,classname:i}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);var l=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var i=null,r=!1,a=Object.create(o),c=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){c.messageBuffer.push(e),i&&(r?setTimeout(l):l())},this.setEmitSync=function(e){r=e};var l=function(){var e=c.messageBuffer.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};a.postMessage=function(e){c.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],function(e){for(i=new e[n](a);c.messageBuffer.length;)l()})};l.prototype=c.prototype,t.UIWorkerClient=l,t.WorkerClient=c,t.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),s=function(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.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=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,r),this.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,r=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(c=this.others[s]).row,column:c.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var c;a={row:(c=this.others[s]).row,column:c.column+o};this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(s.prototype),t.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,c=e.getAccelKey(),l=e.getButton();if(a&&r.isMac&&(l=t.button),e.editor.inMultiSelectMode&&2==l)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||c){if(0===l){var u,h=e.editor,d=h.selection,f=h.inMultiSelectMode,p=e.getDocumentPosition(),g=d.getCursor(),m=e.inSelection()||d.isEmpty()&&o(p,g),v=e.x,y=e.y,b=h.session,w=h.renderer.pixelToScreenCoordinates(v,y),x=w;if(h.$mouseHandler.$enableJumpToDef)a&&n||c&&n?u=s?"block":"add":n&&h.$blockSelectEnabled&&(u="block");else if(c&&!n){if(u="add",!f&&s)return}else n&&h.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&t.ctrlKey&&h.$mouseHandler.cancelContextMenu(),"add"==u){if(!f&&m)return;if(!f){var _=d.toOrientedRange();h.addSelectionMarker(_)}var k=d.rangeList.rangeAtPoint(p);h.$blockScrolling++,h.inVirtualSelectionMode=!0,s&&(k=null,_=d.ranges[0]||_,h.removeSelectionMarker(_)),h.once("mouseup",function(){var e=d.toOrientedRange();k&&e.isEmpty()&&o(k.cursor,e.cursor)?d.substractPoint(e.cursor):(s?d.substractPoint(_.cursor):_&&(h.removeSelectionMarker(_),d.addRange(_)),d.addRange(e)),h.$blockScrolling--,h.inVirtualSelectionMode=!1})}else if("block"==u){var C;e.stop(),h.inVirtualSelectionMode=!0;var E=[];h.$blockScrolling++,f&&!c?d.toSingleRange():!f&&c&&(C=d.toOrientedRange(),h.addSelectionMarker(C)),s?w=b.documentToScreenPosition(d.lead):d.moveToPosition(p),h.$blockScrolling--,x={row:-1,column:-1};var A=function(){var e=h.renderer.pixelToScreenCoordinates(v,y),t=b.screenToDocumentPosition(e.row,e.column,e.offsetX);o(x,e)&&o(t,d.lead)||(x=e,h.$blockScrolling++,h.selection.moveToPosition(t),h.renderer.scrollCursorIntoView(),h.removeSelectionMarkers(E),E=d.rectangularRangeBlock(x,w),h.$mouseHandler.$clickSelection&&1==E.length&&E[0].isEmpty()&&(E[0]=h.$mouseHandler.$clickSelection.clone()),E.forEach(h.addSelectionMarker,h),h.updateSelectionMarkers(),h.$blockScrolling--)};i.capture(h.container,function(e){v=e.clientX,y=e.clientY},function(e){clearInterval(S),h.removeSelectionMarkers(E),E.length||(E=[d.toOrientedRange()]),h.$blockScrolling++,C&&(h.removeSelectionMarker(C),d.toSingleRange(C));for(var t=0;t<E.length;t++)d.addRange(E[t]);h.inVirtualSelectionMode=!1,h.$mouseHandler.$clickSelection=null,h.$blockScrolling--});var S=setInterval(function(){A()},20);return e.preventDefault()}}}else 0===l&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)}),ace.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(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),c=e("./lib/lang"),l=e("./commands/multi_select_commands");t.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=new(0,e("./search").Search);var h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,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 e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{n=this.getRange();var i=this.isBackwards(),o=n.start.row,s=n.end.row;if(o==s){if(i)var a=n.end,c=n.start;else a=n.start,c=n.end;return this.addRange(r.fromPoints(c,c)),void this.addRange(r.fromPoints(a,a))}var l=[],u=this.getLineRange(o,!0);u.start.column=n.start.column,l.push(u);for(var h=o+1;h<s;h++)l.push(this.getLineRange(h,!0));(u=this.getLineRange(s,!0)).end.column=n.end.column,l.push(u),l.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column<t.column;if(o)var s=e.column,a=t.column,c=e.offsetX,l=t.offsetX;else s=t.column,a=e.column,c=t.offsetX,l=e.offsetX;var u,h,d=e.row<t.row;if(d)var f=e.row,p=t.row;else f=t.row,p=e.row;s<0&&(s=0),f<0&&(f=0),f==p&&(n=!0);for(var g=f;g<=p;g++){var m=r.fromPoints(this.session.screenToDocumentPosition(g,s,c),this.session.screenToDocumentPosition(g,a,l));if(m.isEmpty()){if(v&&(u=m.end,h=v,u.row==h.row&&u.column==h.column))break;var v=m.end}m.cursor=o?m.start:m.end,i.push(m)}if(d&&i.reverse(),!n){for(var y=i.length-1;i[y].isEmpty()&&y>0;)y--;if(y>0)for(var b=0;i[b].isEmpty();)b++;for(var w=y;w>=b;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(o.prototype);var d=e("./editor").Editor;function f(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(l.defaultCommands),function(e){var t=e.textInput.getElement(),n=!1;function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}a.addListener(t,"keydown",function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),a.addListener(t,"keyup",i),a.addListener(t,"blur",i)}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,c=this.selection,l=c.rangeList,u=(r?c:l).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=c._eventRegistry;c._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var f=u.length;f--;){if(s)for(;f>0&&u[f].start.row==u[f-1].end.row;)f--;d.fromOrientedRange(u[f]),d.index=f,this.selection=a.selection=d;var p=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===p||(i=p),d.toOrientedRange(u[f])}d.detach(),this.selection=a.selection=c,this.inVirtualSelectionMode=!1,c._eventRegistry=h,c.mergeOverlappingRanges();var g=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),g&&g.from==g.to&&this.renderer.animateScrolling(g.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;i<t.length;i++)n.push(this.session.getTextRange(t[i]));var r=this.session.getDocument().getNewLineCharacter();(e=n.join(r)).length==(n.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var i=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;i.row==t.row&&this.session.$clipPositionToDocument(i.row,i.column).column==t.column||this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(e,t,n){if((t=t||{}).needle=e||t.needle,void 0==t.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(i)}this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var o=this.multiSelect;n||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return i&&o.rangeList.rangeAtPoint(i.start)&&o.addRange(i,!0),this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,o=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var s,a=this.session.screenToDocumentPosition(o.row+e,o.column);if(n.isEmpty())l=a;else var c=this.session.documentToScreenPosition(i?n.end:n.start),l=this.session.screenToDocumentPosition(c.row+e,c.column);i?(s=r.fromPoints(a,l)).cursor=s.start:(s=r.fromPoints(l,a)).cursor=s.end;if(s.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var u=n.cursor}else this.selection.addRange(n);this.selection.addRange(s),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,r=i.length;r--;){if((a=i[r]).isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}}n.mergeOverlappingRanges();var s=[];for(r=i.length;r--;){var a=i[r];s.unshift(t.getTextRange(a))}e<0?s.unshift(s.pop()):s.push(s.shift());for(r=i.length;r--;){o=(a=i[r]).clone();t.replace(a,s[r]),a.start.row=o.start.row,a.start.column=o.start.column}},this.selectMore=function(e,t,n){var i=this.session,r=i.multiSelect.toOrientedRange();if(!r.isEmpty()||((r=i.getWordRange(r.start.row,r.start.column)).cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),!n)){var o=function(e,t,n){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==n,u.find(e)}(i,i.getTextRange(r),e);o&&(o.cursor=-1==e?o.start:o.end,this.$blockScrolling+=1,this.session.unfold(o),this.multiSelect.addRange(o),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,i=-1,o=n.filter(function(e){if(e.cursor.row==i)return!0;i=e.cursor.row});if(n.length&&o.length!=n.length-1){o.forEach(function(e){t.substractPoint(e.cursor)});var s=0,a=1/0,l=n.map(function(t){var n=t.cursor,i=e.getLine(n.row).substr(n.column).search(/\S/g);return-1==i&&(i=0),n.column>s&&(s=n.column),i<a&&(a=i),i});n.forEach(function(t,n){var i=t.cursor,o=s-i.column,u=l[n]-a;o>u?e.insert(i,c.stringRepeat(" ",o-u)):e.remove(new r(i.row,i.column,i.row,i.column-o+u)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,f=h==d;if(f){var p,g=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d<g);do{p=this.session.getLine(h)}while(/[=:]/.test(p)&&--h>0);h<0&&(h=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,f),this.session.insert({row:h,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,s=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),i<t[2].length&&(i=t[2].length),r>t[3].length&&(r=t[3].length),t):[e]}).map(t?l:o?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:l:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return c.stringRepeat(" ",e)}function l(e){return e[2]?a(n)+e[2]+a(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=f,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){f(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),s=o.search(r);if(-1!=s){for(var a=n||o.length,c=e.getLength(),l=t,u=t;++t<c;){var h=e.getLine(t).search(r);if(-1!=h){if(h<=s)break;u=t}}if(u>l){var d=e.getLine(u).length;return new i(l,a,u,d)}}},this.openingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r+1},a=e.$findClosingBracket(t,s,o);if(a){var c=e.foldWidgets[a.row];return null==c&&(c=e.getFoldWidget(a.row)),"start"==c&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,r,o){var s={row:n,column:r},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(r.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.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;color: black;}.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;}.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;}',e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){"use strict";e("./lib/oop");var i=e("./lib/dom");e("./range").Range;function r(e){this.session=e,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.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,r=i.start.row,o=i.end.row,s="add"==e.action,a=r+1;a<o;a++)n[a]&&(n[a].hidden=s);n[o]&&(s?n[r]?n[o].hidden=s:n[r]=n[o]:(n[r]==n[o]&&(n[r]=void 0),n[o].hidden=s))}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,i=e.end.row-n;if(0===i);else if("remove"==e.action){t.splice(n+1,i).forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var r=new Array(i);r.unshift(n,0),t.splice.apply(t,r),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e.session=this.session;var n=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,n.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/n.layerConfig.lineHeight);var r=this.session.getFoldAt(e.row,0);if(e.$fold=r,r){var o=this.session.lineWidgets;e.row!=r.end.row||o[r.start.row]?e.hidden=!0:o[r.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,n),this.onWidgetChanged(e),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.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=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(e,t){var n=t.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,t.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var c=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(c+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=c-n.offset+"px";var l=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(l-=t.scrollLeft),a.el.style.left=l+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(r.prototype),t.LineWidgets=r}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,c=n.widgetManager.getWidgetsAtRow(a).filter(function(e){return"errorMarker"==e.type})[0];c?c.destroy():a-=t;var l,u=function(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(s>0)i=o+1;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var s=i[r];if(s&&n){if(s.row===t){do{s=i[r+=n]}while(s&&s.row===t);if(!s)return i.slice()}var a=[];t=s.row;do{a[n<0?"unshift":"push"](s),s=i[r+=n]}while(s&&s.row==t);return a.length&&a}}}(n,a,t);if(u){var h=u[0];s.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,s.row=h.row,l=e.renderer.$gutterLayer.$annotations[s.row]}else{if(c)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=d.el.appendChild(r.createElement("div")),p=d.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+l.className;var g=e.renderer.$cursorLayer.getPixelPosition(s).left;p.style.left=g+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+l.className,f.innerHTML=l.text.join("<br>"),f.appendChild(r.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.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; }","")}),ace.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/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var r=e("./lib/dom"),o=e("./lib/event"),s=e("./editor").Editor,a=e("./edit_session").EditSession,c=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.acequire=e,t.define=n(101),t.edit=function(e){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof s)return e.env.editor;var i="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;i=a.value,e=r.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(i=r.getInnerText(e),e.innerHTML="");var c=t.createEditSession(i),u=new s(new l(e));u.setSession(c);var h={document:c,editor:u,onResize:u.resize.bind(u,null)};return a&&(h.textarea=a),o.addListener(window,"resize",h.onResize),u.on("destroy",function(){o.removeListener(window,"resize",h.onResize),h.editor.container.env=null}),u.container.env=u.env=h,u},t.createEditSession=function(e,t){var n=new a(e,t);return n.setUndoManager(new c),n},t.EditSession=a,t.UndoManager=c,t.version="1.2.9"}),ace.acequire(["ace/ace"],function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])}),e.exports=window.ace.acequire("ace/ace")},function(e,t,n){(function(){void 0===Math.sgn&&(Math.sgn=function(e){return 0==e?0:e>0?1:-1});var e=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},n=function(e,t){return e.x*t.x+e.y*t.y},i=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r=function(e,t){return{x:e.x*t,y:e.y*t}},o=Math.pow(2,-65),s=function(t,n){for(var r=[],o=a(t,n),s=n.length-1,l=c(o,2*s-1,r,0),u=e(t,n[0]),h=i(u),f=0,p=0;p<l;p++){u=e(t,d(n,s,r[p],null,null));var g=i(u);g<h&&(h=g,f=r[p])}return u=e(t,n[s]),(g=i(u))<h&&(h=g,f=1),{location:f,distance:h}},a=function(t,i){for(var o=i.length-1,s=2*o-1,a=[],c=[],l=[],u=[],h=[[1,.6,.3,.1],[.4,.6,.6,.4],[.1,.3,.6,1]],d=0;d<=o;d++)a[d]=e(i[d],t);for(d=0;d<=o-1;d++)c[d]=e(i[d+1],i[d]),c[d]=r(c[d],3);for(var f=0;f<=o-1;f++)for(var p=0;p<=o;p++)l[f]||(l[f]=[]),l[f][p]=n(c[f],a[p]);for(d=0;d<=s;d++)u[d]||(u[d]=[]),u[d].y=0,u[d].x=parseFloat(d)/s;for(var g=o,m=o-1,v=0;v<=g+m;v++){var y=Math.max(0,v-m),b=Math.min(v,g);for(d=y;d<=b;d++)j=v-d,u[d+j].y+=l[j][d]*h[j][d]}return u},c=function(e,t,n,i){var r,o,s=[],a=[],f=[],p=[];switch(l(e,t)){case 0:return 0;case 1:if(i>=64)return n[0]=(e[0].x+e[t].x)/2,1;if(u(e,t))return n[0]=h(e,t),1}d(e,t,.5,s,a),r=c(s,t,f,i+1),o=c(a,t,p,i+1);for(var g=0;g<r;g++)n[g]=f[g];for(g=0;g<o;g++)n[g+r]=p[g];return r+o},l=function(e,t){var n,i,r=0;n=i=Math.sgn(e[0].y);for(var o=1;o<=t;o++)(n=Math.sgn(e[o].y))!=i&&r++,i=n;return r},u=function(e,t){var n,i,r,s,a,c,l,u;s=e[0].y-e[t].y,a=e[t].x-e[0].x,c=e[0].x*e[t].y-e[t].x*e[0].y;for(var h=max_distance_below=0,d=1;d<t;d++){var f=s*e[d].x+a*e[d].y+c;f>h?h=f:f<max_distance_below&&(max_distance_below=f)}return 0,1,0,n=(1*(c-h)-0*(u=a))*(1/(0*u-1*(l=s))),l=s,u=a,i=(1*(c-max_distance_below)-0*u)*(1/(0*u-1*l)),r=Math.min(n,i),Math.max(n,i)-r<o?1:0},h=function(e,t){var n=e[t].x-e[0].x,i=e[t].y-e[0].y,r=e[0].x-0;return 0+1*((n*(e[0].y-0)-i*r)*(1/(0*n-1*i)))},d=function(e,t,n,i,r){for(var o=[[]],s=0;s<=t;s++)o[0][s]=e[s];for(var a=1;a<=t;a++)for(s=0;s<=t-a;s++)o[a]||(o[a]=[]),o[a][s]||(o[a][s]={}),o[a][s].x=(1-n)*o[a-1][s].x+n*o[a-1][s+1].x,o[a][s].y=(1-n)*o[a-1][s].y+n*o[a-1][s+1].y;if(null!=i)for(s=0;s<=t;s++)i[s]=o[s][0];if(null!=r)for(s=0;s<=t;s++)r[s]=o[t-s][s];return o[t][0]},f={},p=function(e,t){for(var n=function(e){var t=f[e];if(!t){var n=function(e){return function(t){return e}},i=function(){return function(e){return e}},r=function(){return function(e){return 1-e}},o=function(e){return function(t){for(var n=1,i=0;i<e.length;i++)n*=e[i](t);return n}};(t=[]).push(new function(){return function(t){return Math.pow(t,e)}});for(var s=1;s<e;s++){for(var a=[new n(e)],c=0;c<e-s;c++)a.push(new i);for(c=0;c<s;c++)a.push(new r);t.push(new o(a))}t.push(new function(){return function(t){return Math.pow(1-t,e)}}),f[e]=t}return t}(e.length-1),i=0,r=0,o=0;o<e.length;o++)i+=e[o].x*n[o](t),r+=e[o].y*n[o](t);return{x:i,y:r}},g=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},m=function(e){return e[0].x==e[1].x&&e[0].y==e[1].y},v=function(e,t,n){if(m(e))return{point:e[0],location:t};for(var i=p(e,t),r=0,o=t,s=n>0?1:-1,a=null;r<Math.abs(n);)a=p(e,o+=.005*s),r+=g(a,i),i=a;return{point:a,location:o}},y=function(e,t){var n=p(e,t),i=p(e.slice(0,e.length-1),t),r=i.y-n.y,o=i.x-n.x;return 0==r?1/0:Math.atan(r/o)},b=this.jsBezier={distanceFromCurve:s,gradientAtPoint:y,gradientAtPointAlongCurveFrom:function(e,t,n){var i=v(e,t,n);return i.location>1&&(i.location=1),i.location<0&&(i.location=0),y(e,i.location)},nearestPointOnCurve:function(e,t){var n=s(e,t);return{point:d(t,t.length-1,n.location,null,null),location:n.location}},pointOnCurve:p,pointAlongCurveFrom:function(e,t,n){return v(e,t,n).point},perpendicularToCurveAt:function(e,t,n,i){var r=v(e,t,i=null==i?0:i),o=y(e,r.location),s=Math.atan(-1/o),a=n/2*Math.sin(s),c=n/2*Math.cos(s);return[{x:r.point.x+c,y:r.point.y+a},{x:r.point.x-c,y:r.point.y-a}]},locationAlongCurveFrom:function(e,t,n){return v(e,t,n).location},getLength:function(e){if(m(e))return 0;for(var t=p(e,0),n=0,i=0,r=null;i<1;)r=p(e,i+=.005),n+=g(r,t),t=r;return n},version:"0.9.0"};t.jsBezier=b}).call("undefined"!=typeof window?window:this),function(){"use strict";var e=this.Biltong={version:"0.4.0"};t.Biltong=e;var n=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e,t,i){return i(e=n(e)?e:[e.x,e.y],t=n(t)?t:[t.x,t.y])},r=e.gradient=function(e,t){return i(e,t,function(e,t){return t[0]==e[0]?t[1]>e[1]?1/0:-1/0:t[1]==e[1]?t[0]>e[0]?0:-0:(t[1]-e[1])/(t[0]-e[0])})},o=(e.normal=function(e,t){return-1/r(e,t)},e.lineLength=function(e,t){return i(e,t,function(e,t){return Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2))})},e.quadrant=function(e,t){return i(e,t,function(e,t){return t[0]>e[0]?t[1]>e[1]?2:1:t[0]==e[0]?t[1]>e[1]?2:1:t[1]>e[1]?3:4})}),s=(e.theta=function(e,t){return i(e,t,function(e,t){var n=r(e,t),i=Math.atan(n),s=o(e,t);return 4!=s&&3!=s||(i+=Math.PI),i<0&&(i+=2*Math.PI),i})},e.intersects=function(e,t){var n=e.x,i=e.x+e.w,r=e.y,o=e.y+e.h,s=t.x,a=t.x+t.w,c=t.y,l=t.y+t.h;return n<=s&&s<=i&&r<=c&&c<=o||n<=a&&a<=i&&r<=c&&c<=o||n<=s&&s<=i&&r<=l&&l<=o||n<=a&&s<=i&&r<=l&&l<=o||s<=n&&n<=a&&c<=r&&r<=l||s<=i&&i<=a&&c<=r&&r<=l||s<=n&&n<=a&&c<=o&&o<=l||s<=i&&n<=a&&c<=o&&o<=l},e.encloses=function(e,t,n){var i=e.x,r=e.x+e.w,o=e.y,s=e.y+e.h,a=t.x,c=t.x+t.w,l=t.y,u=t.y+t.h,h=function(e,t,i,r){return n?e<=t&&i>=r:e<t&&i>r};return h(i,a,r,c)&&h(o,l,s,u)},[null,[1,-1],[1,1],[-1,1],[-1,-1]]),a=[null,[-1,-1],[-1,1],[1,1],[1,-1]];e.pointOnLine=function(e,t,n){var i=r(e,t),c=o(e,t),l=n>0?s[c]:a[c],u=Math.atan(i),h=Math.abs(n*Math.sin(u))*l[1],d=Math.abs(n*Math.cos(u))*l[0];return{x:e.x+d,y:e.y+h}},e.perpendicularLineTo=function(e,t,n){var i=r(e,t),o=Math.atan(-1/i),s=n/2*Math.sin(o),a=n/2*Math.cos(o);return[{x:t.x+a,y:t.y+s},{x:t.x-a,y:t.y-s}]}}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=navigator.userAgent.toLowerCase().indexOf("android")>-1,n=function(e,t,n){for(var i=(n=n||e.parentNode).querySelectorAll(t),r=0;r<i.length;r++)if(i[r]===e)return!0;return!1},i=function(e){return"string"==typeof e||e.constructor===String?document.getElementById(e):e},r=function(e){return e.srcElement||e.target},o=function(e,t,n,i){if(i){if(void 0!==e.path&&e.path.indexOf)return{path:e.path,end:e.path.indexOf(n)};var r={path:[],end:-1},o=function(e){r.path.push(e),e===n?r.end=r.path.length-1:null!=e.parentNode&&o(e.parentNode)};return o(t),r}return{path:[t],end:1}},s=function(e,t){for(var n=0,i=e.length;n<i&&e[n]!=t;n++);n<e.length&&e.splice(n,1)},a=1,c=function(e,t,n){var i=a++;return e.__ta=e.__ta||{},e.__ta[t]=e.__ta[t]||{},e.__ta[t][i]=n,n.__tauid=i,i},l=function(e,t,i,s){if(null==e)return i;var a=e.split(","),c=function(s){c.__tauid=i.__tauid;var l=r(s),u=l,h=o(s,l,t,null!=e);if(-1!=h.end)for(var d=0;d<h.end;d++){u=h.path[d];for(var f=0;f<a.length;f++)n(u,a[f],t)&&i.apply(u,arguments)}};return u(i,s,c),c},u=function(e,t,n){e.__taExtra=e.__taExtra||[],e.__taExtra.push([t,n])},h=function(e,t,n,i){if(p&&m[t]){var r=l(i,e,n,m[t]);C(e,m[t],r,n)}"focus"===t&&null==e.getAttribute("tabindex")&&e.setAttribute("tabindex","1"),C(e,t,l(i,e,n,t),n)},d={tap:{touches:1,taps:1},dbltap:{touches:1,taps:2},contextmenu:{touches:2,taps:1}},f=function(e,t,n,i){for(var r in n.__tamee[e])n.__tamee[e].hasOwnProperty(r)&&n.__tamee[e][r].apply(i,[t])},p="ontouchstart"in document.documentElement,g="onmousedown"in document.documentElement,m={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"},v=function(){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1))}return e}(),y=v>-1&&v<9,b=function(e,t){if(null==e)return[0,0];var n=_(e),i=x(n,0);return[i[t+"X"],i[t+"Y"]]},w=function(e){return null==e?[0,0]:y?[e.clientX+document.documentElement.scrollLeft,e.clientY+document.documentElement.scrollTop]:b(e,"page")},x=function(e,t){return e.item?e.item(t):e[t]},_=function(e){return e.touches&&e.touches.length>0?e.touches:e.changedTouches&&e.changedTouches.length>0?e.changedTouches:e.targetTouches&&e.targetTouches.length>0?e.targetTouches:[e]},k=function(e){return _(e).length},C=function(e,t,n,i){if(c(e,t,n),i.__tauid=n.__tauid,e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent){var r=t+n.__tauid;e["e"+r]=n,e[r]=function(){e["e"+r]&&e["e"+r](window.event)},e.attachEvent("on"+t,e[r])}},E=function(e,t,n){null!=n&&A(e,function(){var r=i(this);if(function(e,t,n){if(e.__ta&&e.__ta[t]&&delete e.__ta[t][n.__tauid],n.__taExtra){for(var i=0;i<n.__taExtra.length;i++)E(e,n.__taExtra[i][0],n.__taExtra[i][1]);n.__taExtra.length=0}n.__taUnstore&&n.__taUnstore()}(r,t,n),null!=n.__tauid)if(r.removeEventListener)r.removeEventListener(t,n,!1),p&&m[t]&&r.removeEventListener(m[t],n,!1);else if(this.detachEvent){var o=t+n.__tauid;r[o]&&r.detachEvent("on"+t,r[o]),r[o]=null,r["e"+o]=null}n.__taTouchProxy&&E(e,n.__taTouchProxy[1],n.__taTouchProxy[0])})},A=function(e,t){if(null!=e){e="undefined"!=typeof Window&&"unknown"!=typeof e.top&&e==e.top?[e]:"string"!=typeof e&&null==e.tagName&&null!=e.length?e:"string"==typeof e?document.querySelectorAll(e):[e];for(var n=0;n<e.length;n++)t.apply(e[n])}};this.Mottle=function(t){var a=(t=t||{}).clickThreshold||250,u=t.dblClickThreshold||450,v=new function(){var e=[];return function(t,i,o,s){if(!t.__tamee){t.__tamee={over:!1,mouseenter:[],mouseexit:[]};var a=function(i){var o=r(i);(null==s&&o==t&&!t.__tamee.over||n(o,s,t)&&(null==o.__tamee||!o.__tamee.over))&&(f("mouseenter",i,t,o),o.__tamee=o.__tamee||{},o.__tamee.over=!0,e.push(o))},u=function(i){for(var o=r(i),s=0;s<e.length;s++)o!=e[s]||n(i.relatedTarget||i.toElement,"*",o)||(o.__tamee.over=!1,e.splice(s,1),f("mouseexit",i,t,o))};C(t,"mouseover",l(s,t,a,"mouseover"),a),C(t,"mouseout",l(s,t,u,"mouseout"),u)}o.__taUnstore=function(){delete t.__tamee[i][o.__tauid]},c(t,i,o),t.__tamee[i][o.__tauid]=o}},y=new function(e,t){return function(i,a,c,l){if("contextmenu"==a&&g)h(i,a,c,l);else{if(null==i.__taTapHandler){var u=i.__taTapHandler={tap:[],dbltap:[],contextmenu:[],down:!1,taps:0,downSelectors:[]},f=function(){u.down=!1},p=function(){u.taps=0};h(i,"mousedown",function(s){for(var a=r(s),c=o(s,a,i,null!=l),h=!1,d=0;d<c.end;d++){if(h)return;a=c.path[d];for(var g=0;g<u.downSelectors.length;g++)if(null==u.downSelectors[g]||n(a,u.downSelectors[g],i)){u.down=!0,setTimeout(f,e),setTimeout(p,t),h=!0;break}}}),h(i,"mouseup",function(e){if(u.down){var t,s,a=r(e);u.taps++;var c=k(e);for(var l in d)if(d.hasOwnProperty(l)){var h=d[l];if(h.touches===c&&(1===h.taps||h.taps===u.taps))for(var f=0;f<u[l].length;f++){s=o(e,a,i,null!=u[l][f][1]);for(var p=0;p<s.end;p++)if(t=s.path[p],null==u[l][f][1]||n(t,u[l][f][1],i)){u[l][f][0].apply(t,[e]);break}}}}})}i.__taTapHandler.downSelectors.push(l),i.__taTapHandler[a].push([c,l]),c.__taUnstore=function(){s(i.__taTapHandler[a],c)}}}}(a,u),x=t.smartClicks,_=function(e,t,n,o){null!=n&&A(e,function(){var e=i(this);x&&"click"===t?function(e,t,n,i){null==e.__taSmartClicks&&(h(e,"mousedown",function(t){e.__tad=w(t)},i),h(e,"mouseup",function(t){e.__tau=w(t)},i),h(e,"click",function(t){if(e.__tad&&e.__tau&&e.__tad[0]===e.__tau[0]&&e.__tad[1]===e.__tau[1])for(var n=0;n<e.__taSmartClicks.length;n++)e.__taSmartClicks[n].apply(r(t),[t])},i),e.__taSmartClicks=[]);e.__taSmartClicks.push(n),n.__taUnstore=function(){s(e.__taSmartClicks,n)}}(e,0,n,o):"tap"===t||"dbltap"===t||"contextmenu"===t?y(e,t,n,o):"mouseenter"===t||"mouseexit"==t?v(e,t,n,o):h(e,t,n,o)})};this.remove=function(e){return A(e,function(){var e=i(this);if(e.__ta)for(var t in e.__ta)if(e.__ta.hasOwnProperty(t))for(var n in e.__ta[t])e.__ta[t].hasOwnProperty(n)&&E(e,t,e.__ta[t][n]);e.parentNode&&e.parentNode.removeChild(e)}),this},this.on=function(e,t,n,i){var r=arguments[0],o=4==arguments.length?arguments[2]:null,s=arguments[1],a=arguments[arguments.length-1];return _(r,s,a,o),this},this.off=function(e,t,n){return E(e,t,n),this},this.trigger=function(t,n,r,o){var s=g&&("undefined"==typeof MouseEvent||null==r||r.constructor===MouseEvent),a=p&&!g&&m[n]?m[n]:n,c=!(p&&!g&&m[n]),l=w(r),u=b(r,"screen"),h=function(e){return b(e,"client")}(r);return A(t,function(){var t,d=i(this);r=r||{screenX:u[0],screenY:u[1],clientX:h[0],clientY:h[1]};var f=function(e){o&&(e.payload=o)},g={TouchEvent:function(e){var t=document.createTouch(window,d,0,l[0],l[1],u[0],u[1],h[0],h[1],0,0,0,0),n=document.createTouchList(t),i=document.createTouchList(t),r=document.createTouchList(t);e.initTouchEvent(a,!0,!0,window,null,u[0],u[1],h[0],h[1],!1,!1,!1,!1,n,i,r,1,0)},MouseEvents:function(t){if(t.initMouseEvent(a,!0,!0,window,0,u[0],u[1],h[0],h[1],!1,!1,!1,!1,1,d),e){var n=document.createTouch(window,d,0,l[0],l[1],u[0],u[1],h[0],h[1],0,0,0,0);t.touches=t.targetTouches=t.changedTouches=document.createTouchList(n)}}};if(document.createEvent){var v=!c&&!s&&p&&m[n]&&!e?"TouchEvent":"MouseEvents";t=document.createEvent(v),g[v](t),f(t),d.dispatchEvent(t)}else document.createEventObject&&((t=document.createEventObject()).eventType=t.eventName=a,t.screenX=u[0],t.screenY=u[1],t.clientX=h[0],t.clientY=h[1],f(t),d.fireEvent("on"+a,t))}),this}},this.Mottle.consume=function(e,t){e.stopPropagation?e.stopPropagation():e.returnValue=!1,!t&&e.preventDefault&&e.preventDefault()},this.Mottle.pageLocation=w,this.Mottle.setForceTouchEvents=function(e){p=e},this.Mottle.setForceMouseEvents=function(e){g=e},this.Mottle.version="0.8.0",t.Mottle=this.Mottle}.call("undefined"==typeof window?this:window),function(){"use strict";var e=function(e,t,n){return-1===e.indexOf(t)&&(n?e.unshift(t):e.push(t),!0)},n=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)},i=function(e){return null!=e&&("string"==typeof e||e.constructor===String)},r=function(e,t,n){for(var i=(n=n||e.parentNode).querySelectorAll(t),r=0;r<i.length;r++)if(i[r]===e)return!0;return!1},o=function(){var e=-1;if("Microsoft Internet Explorer"===navigator.appName){var t=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1))}return e}(),s=o>-1&&o<9,a=9===o,c=function(e){if(s)return[e.clientX+document.documentElement.scrollLeft,e.clientY+document.documentElement.scrollTop];var t=u(e),n=l(t,0);return a?[n.pageX||n.clientX,n.pageY||n.clientY]:[n.pageX,n.pageY]},l=function(e,t){return e.item?e.item(t):e[t]},u=function(e){return e.touches&&e.touches.length>0?e.touches:e.changedTouches&&e.changedTouches.length>0?e.changedTouches:e.targetTouches&&e.targetTouches.length>0?e.targetTouches:[e]},h={draggable:"katavorio-draggable",droppable:"katavorio-droppable",drag:"katavorio-drag",selected:"katavorio-drag-selected",active:"katavorio-drag-active",hover:"katavorio-drag-hover",noSelect:"katavorio-drag-no-select",ghostProxy:"katavorio-ghost-proxy",clonedDrag:"katavorio-clone-drag"},d=["stop","start","drag","drop","over","out","beforeStart"],f=function(){},p=function(){return!0},g=function(e,t,n){for(var i=0;i<e.length;i++)e[i]!=n&&t(e[i])},m=function(e,t,n,i){g(e,function(e){e.setActive(t),t&&e.updatePosition(),n&&e.setHover(i,t)})},v=function(e,t){if(null!=e){e=i(e)||null!=e.tagName||null==e.length?[e]:e;for(var n=0;n<e.length;n++)t.apply(e[n],[e[n]])}},y=function(e){e.stopPropagation?(e.stopPropagation(),e.preventDefault()):e.returnValue=!1},b=function(e,t,n,i){this.params=t||{},this.el=e,this.params.addClass(this.el,this._class),this.uuid=C();var r=!0;return this.setEnabled=function(e){r=e},this.isEnabled=function(){return r},this.toggleEnabled=function(){r=!r},this.setScope=function(e){this.scopes=e?e.split(/\s+/):[i]},this.addScope=function(e){var t={};for(var n in v(this.scopes,function(e){t[e]=!0}),v(e?e.split(/\s+/):[],function(e){t[e]=!0}),this.scopes=[],t)this.scopes.push(n)},this.removeScope=function(e){var t={};for(var n in v(this.scopes,function(e){t[e]=!0}),v(e?e.split(/\s+/):[],function(e){delete t[e]}),this.scopes=[],t)this.scopes.push(n)},this.toggleScope=function(e){var t={};for(var n in v(this.scopes,function(e){t[e]=!0}),v(e?e.split(/\s+/):[],function(e){t[e]?delete t[e]:t[e]=!0}),this.scopes=[],t)this.scopes.push(n)},this.setScope(t.scope),this.k=t.katavorio,t.katavorio},w=function(){return!0},x=function(){return!1},_=function(e,t,n,o){this._class=n.draggable;var s=b.apply(this,arguments);this.rightButtonCanDrag=this.params.rightButtonCanDrag;var a,l=[0,0],u=null,d=null,f=[0,0],g=!1,v=!1!==this.params.consumeStartEvent,_=this.el,k=this.params.clone,A=(this.params.scroll,!1!==t.multipleDrop),S=!1,F=!0===t.ghostProxy?w:t.ghostProxy&&"function"==typeof t.ghostProxy?t.ghostProxy:x,T=t.snapThreshold,D=function(e,t,n,i,r){var o=t*Math.floor(e[0]/t),s=o+t,a=Math.abs(e[0]-o)<=i?o:Math.abs(s-e[0])<=i?s:e[0],c=n*Math.floor(e[1]/n),l=c+n;return[a,Math.abs(e[1]-c)<=r?c:Math.abs(l-e[1])<=r?l:e[1]]};this.posses=[],this.posseRoles={},this.toGrid=function(e){if(null==this.params.grid)return e;var t=this.params.grid?this.params.grid[0]/2:T||5,n=this.params.grid?this.params.grid[1]/2:T||5;return D(e,this.params.grid[0],this.params.grid[1],t,n)},this.snap=function(e,t){if(null!=_){e=e||(this.params.grid?this.params.grid[0]:10),t=t||(this.params.grid?this.params.grid[1]:10);var n=this.params.getPosition(_),i=this.params.grid?this.params.grid[0]/2:T,r=this.params.grid?this.params.grid[1]/2:T;this.params.setPosition(_,D(n,e,t,i,r))}},this.setUseGhostProxy=function(e){F=e?w:x};var L,P=function(e){return!1===t.allowNegative?[Math.max(0,e[0]),Math.max(0,e[1])]:e},R=function(e){a="function"==typeof e?e:e?function(e){return P([Math.max(0,Math.min(O.w-this.size[0],e[0])),Math.max(0,Math.min(O.h-this.size[1],e[1]))])}.bind(this):function(e){return P(e)}}.bind(this);R("function"==typeof this.params.constrain?this.params.constrain:this.params.constrain||this.params.containment),this.setConstrain=function(e){R(e)},this.setRevert=function(e){L=e};var M={},B=this.setFilter=function(t,n){if(t){var o="function"==typeof(s=t)?(s._katavorioId=C(),s._katavorioId):s;M[o]=[function(n){var o,s=n.srcElement||n.target;return i(t)?o=r(s,t,e):"function"==typeof t&&(o=t(n,e)),o},!1!==n]}var s};this.addFilter=B,this.removeFilter=function(e){var t="function"==typeof e?e._katavorioId:e;delete M[t]};this.clearAllFilters=function(){M={}},this.canDrag=this.params.canDrag||p;var O,j=[],I=[];this.downListener=function(e){var t,i,o,a,d,f,p,g,m,b;if((this.rightButtonCanDrag||3!==e.which&&2!==e.button)&&this.isEnabled()&&this.canDrag())if(function(e){for(var t in M){var n=M[t],i=n[0](e);if(n[1]&&(i=!i),!i)return!1}return!0}(e)&&function(e,t,n){var i=e.srcElement||e.target;return!r(i,n.getInputFilterSelector(),t)}(e,this.el,this.k)){if(k){(_=this.el.cloneNode(!0)).setAttribute("id",null),_.style.position="absolute";var w=(t=this.el,i=t.getBoundingClientRect(),o=document.body,a=document.documentElement,d=window.pageYOffset||a.scrollTop||o.scrollTop,f=window.pageXOffset||a.scrollLeft||o.scrollLeft,p=a.clientTop||o.clientTop||0,g=a.clientLeft||o.clientLeft||0,m=i.top+d-p,b=i.left+f-g,{top:Math.round(m),left:Math.round(b)});_.style.left=w.left+"px",_.style.top=w.top+"px",this.params.addClass(_,h.clonedDrag),document.body.appendChild(_)}else _=this.el;v&&y(e),l=c(e),this.params.bind(document,"mousemove",this.moveListener),this.params.bind(document,"mouseup",this.upListener),s.markSelection(this),s.markPosses(this),this.params.addClass(document.body,n.noSelect),W("beforeStart",{el:this.el,pos:u,e:e,drag:this})}else this.params.consumeFilteredEvents&&y(e)}.bind(this),this.moveListener=function(e){if(l){if(!g)if(!1!==W("start",{el:this.el,pos:u,e:e,drag:this})){if(!l)return;this.mark(!0),g=!0}else this.abort();if(l){I.length=0;var t=c(e),n=t[0]-l[0],i=t[1]-l[1],r=this.params.ignoreZoom?1:s.getZoom();n/=r,i/=r,this.moveBy(n,i,e),s.updateSelection(n,i,this),s.updatePosses(n,i,this)}}}.bind(this),this.upListener=function(e){l&&(l=null,this.params.unbind(document,"mousemove",this.moveListener),this.params.unbind(document,"mouseup",this.upListener),this.params.removeClass(document.body,n.noSelect),this.unmark(e),s.unmarkSelection(this,e),s.unmarkPosses(this,e),this.stop(e),s.notifySelectionDragStop(this,e),s.notifyPosseDragStop(this,e),g=!1,k&&(_&&_.parentNode&&_.parentNode.removeChild(_),_=null),I.length=0,L&&!0===L(this.el,this.params.getPosition(this.el))&&(this.params.setPosition(this.el,u),W("revert",this.el)))}.bind(this),this.getFilters=function(){return M},this.abort=function(){null!=l&&this.upListener()},this.getDragElement=function(){return _||this.el};var $={start:[],drag:[],stop:[],over:[],out:[],beforeStart:[],revert:[]};t.events.start&&$.start.push(t.events.start),t.events.beforeStart&&$.beforeStart.push(t.events.beforeStart),t.events.stop&&$.stop.push(t.events.stop),t.events.drag&&$.drag.push(t.events.drag),t.events.revert&&$.revert.push(t.events.revert),this.on=function(e,t){$[e]&&$[e].push(t)},this.off=function(e,t){if($[e]){for(var n=[],i=0;i<$[e].length;i++)$[e][i]!==t&&n.push($[e][i]);$[e]=n}};var N,W=function(e,t){var n=null;if($[e])for(var i=0;i<$[e].length;i++)try{var r=$[e][i](t);null!=r&&(n=r)}catch(e){}return n};this.notifyStart=function(e){W("start",{el:this.el,pos:this.params.getPosition(_),e:e,drag:this})},this.stop=function(e,t){if(t||g){var n=[],i=s.getSelection(),r=this.params.getPosition(_);if(i.length>1)for(var o=0;o<i.length;o++){var a=this.params.getPosition(i[o].el);n.push([i[o].el,{left:a[0],top:a[1]},i[o]])}else n.push([_,{left:r[0],top:r[1]},this]);W("stop",{el:_,pos:N||r,finalPos:r,e:e,drag:this,selection:n})}},this.mark=function(e){var t;u=this.params.getPosition(_),d=this.params.getPosition(_,!0),f=[d[0]-u[0],d[1]-u[1]],this.size=this.params.getSize(_),j=s.getMatchingDroppables(this),m(j,!0,!1,this),this.params.addClass(_,this.params.dragClass||n.drag),t=this.params.getConstrainingRectangle?this.params.getConstrainingRectangle(_):this.params.getSize(_.parentNode),O={w:t[0],h:t[1]},e&&s.notifySelectionDragStart(this)},this.unmark=function(e,i){if(m(j,!1,!0,this),S&&F(this.el)?(N=[_.offsetLeft,_.offsetTop],this.el.parentNode.removeChild(_),_=this.el):N=null,this.params.removeClass(_,this.params.dragClass||n.drag),j.length=0,S=!1,!i){I.length>0&&N&&t.setPosition(this.el,N),I.sort(E);for(var r=0;r<I.length;r++){if(!0===I[r].drop(this,e))break}}},this.moveBy=function(e,n,i){I.length=0;var r=this.toGrid([u[0]+e,u[1]+n]),o=a(r,_);if(F(this.el))if(r[0]!==o[0]||r[1]!==o[1]){if(!S){var s=this.el.cloneNode(!0);t.addClass(s,h.ghostProxy),this.el.parentNode.appendChild(s),_=s,S=!0}o=r}else S&&(this.el.parentNode.removeChild(_),_=this.el,S=!1);var c={x:o[0],y:o[1],w:this.size[0],h:this.size[1]},l={x:c.x+f[0],y:c.y+f[1],w:c.w,h:c.h},d=null;this.params.setPosition(_,o);for(var p=0;p<j.length;p++){var g={x:j[p].pagePosition[0],y:j[p].pagePosition[1],w:j[p].size[0],h:j[p].size[1]};this.params.intersects(l,g)&&(A||null==d||d===j[p].el)&&j[p].canDrop(this)?(d||(d=j[p].el),I.push(j[p]),j[p].setHover(this,!0,i)):j[p].isHover()&&j[p].setHover(this,!1,i)}W("drag",{el:this.el,pos:o,e:i,drag:this})},this.destroy=function(){this.params.unbind(this.el,"mousedown",this.downListener),this.params.unbind(document,"mousemove",this.moveListener),this.params.unbind(document,"mouseup",this.upListener),this.downListener=null,this.upListener=null,this.moveListener=null},this.params.bind(this.el,"mousedown",this.downListener),this.params.handle?B(this.params.handle,!1):B(this.params.filter,this.params.filterExclude)},k=function(e,t,n,i){this._class=n.droppable,this.params=t||{},this.rank=t.rank||0,this._activeClass=this.params.activeClass||n.active,this._hoverClass=this.params.hoverClass||n.hover,b.apply(this,arguments);var r=!1;this.allowLoopback=!1!==this.params.allowLoopback,this.setActive=function(e){this.params[e?"addClass":"removeClass"](this.el,this._activeClass)},this.updatePosition=function(){this.position=this.params.getPosition(this.el),this.pagePosition=this.params.getPosition(this.el,!0),this.size=this.params.getSize(this.el)},this.canDrop=this.params.canDrop||function(e){return!0},this.isHover=function(){return r},this.setHover=function(e,t,n){(t||null==this.el._katavorioDragHover||this.el._katavorioDragHover===e.el._katavorio)&&(this.params[t?"addClass":"removeClass"](this.el,this._hoverClass),this.el._katavorioDragHover=t?e.el._katavorio:null,r!==t&&this.params.events[t?"over":"out"]({el:this.el,e:n,drag:e,drop:this}),r=t)},this.drop=function(e,t){return this.params.events.drop({drag:e,e:t,drop:this})},this.destroy=function(){this._class=null,this._activeClass=null,this._hoverClass=null,r=null}},C=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},E=function(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:0},A=function(e){return null==e?null:null==(e="string"==typeof e||e.constructor===String?document.getElementById(e):e)?null:(e._katavorio=e._katavorio||C(),e)};this.Katavorio=function(t){var r=[],o={};this._dragsByScope={},this._dropsByScope={};var s=1,a=function(e,t){v(e,function(e){for(var n=0;n<e.scopes.length;n++)t[e.scopes[n]]=t[e.scopes[n]]||[],t[e.scopes[n]].push(e)})},c=function(e,n){var i=0;return v(e,function(e){for(var r=0;r<e.scopes.length;r++)if(n[e.scopes[r]]){var o=t.indexOf(n[e.scopes[r]],e);-1!==o&&(n[e.scopes[r]].splice(o,1),i++)}}),i>0},l=(this.getMatchingDroppables=function(e){for(var t=[],n={},i=0;i<e.scopes.length;i++){var r=this._dropsByScope[e.scopes[i]];if(r)for(var o=0;o<r.length;o++)!r[o].canDrop(e)||n[r[o].uuid]||!r[o].allowLoopback&&r[o].el===e.el||(n[r[o].uuid]=!0,t.push(r[o]))}return t.sort(E),t},function(e){e=e||{};var n,i={events:{}};for(n in t)i[n]=t[n];for(n in e)i[n]=e[n];for(n=0;n<d.length;n++)i.events[d[n]]=e[d[n]]||f;return i.katavorio=this,i}.bind(this)),u=function(e,t){for(var n=0;n<d.length;n++)t[d[n]]&&e.on(d[n],t[d[n]])}.bind(this),p={},m=t.css||{},y=t.scope||"katavorio-drag-scope";for(var b in h)p[b]=h[b];for(var b in m)p[b]=m[b];var w=t.inputFilterSelector||"input,textarea,select,button,option";this.getInputFilterSelector=function(){return w},this.setInputFilterSelector=function(e){return w=e,this},this.draggable=function(e,n){var i=[];return v(e,function(e){if(null!=(e=A(e)))if(null==e._katavorioDrag){var r=l(n);e._katavorioDrag=new _(e,r,p,y),a(e._katavorioDrag,this._dragsByScope),i.push(e._katavorioDrag),t.addClass(e,p.draggable)}else u(e._katavorioDrag,n)}.bind(this)),i},this.droppable=function(e,n){var i=[];return v(e,function(e){if(null!=(e=A(e))){var r=new k(e,l(n),p,y);e._katavorioDrop=e._katavorioDrop||[],e._katavorioDrop.push(r),a(r,this._dropsByScope),i.push(r),t.addClass(e,p.droppable)}}.bind(this)),i},this.select=function(e){return v(e,function(){var e=A(this);e&&e._katavorioDrag&&(o[e._katavorio]||(r.push(e._katavorioDrag),o[e._katavorio]=[e,r.length-1],t.addClass(e,p.selected)))}),this},this.deselect=function(e){return v(e,function(){var e=A(this);if(e&&e._katavorio&&o[e._katavorio]){for(var n=[],i=0;i<r.length;i++)r[i].el!==e&&n.push(r[i]);r=n,delete o[e._katavorio],t.removeClass(e,p.selected)}}),this},this.deselectAll=function(){for(var e in o){var n=o[e];t.removeClass(n[0],p.selected)}r.length=0,o={}},this.markSelection=function(e){g(r,function(e){e.mark()},e)},this.markPosses=function(e){e.posses&&v(e.posses,function(t){e.posseRoles[t]&&T[t]&&g(T[t].members,function(e){e.mark()},e)})},this.unmarkSelection=function(e,t){g(r,function(e){e.unmark(t)},e)},this.unmarkPosses=function(e,t){e.posses&&v(e.posses,function(n){e.posseRoles[n]&&T[n]&&g(T[n].members,function(e){e.unmark(t,!0)},e)})},this.getSelection=function(){return r.slice(0)},this.updateSelection=function(e,t,n){g(r,function(n){n.moveBy(e,t)},n)};var x=function(e,t){t.posses&&v(t.posses,function(n){t.posseRoles[n]&&T[n]&&g(T[n].members,function(t){e(t)},t)})};this.updatePosses=function(e,t,n){x(function(n){n.moveBy(e,t)},n)},this.notifyPosseDragStop=function(e,t){x(function(e){e.stop(t,!0)},e)},this.notifySelectionDragStop=function(e,t){g(r,function(e){e.stop(t,!0)},e)},this.notifySelectionDragStart=function(e,t){g(r,function(e){e.notifyStart(t)},e)},this.setZoom=function(e){s=e},this.getZoom=function(){return s};var C=function(e,t,n,i){v(e,function(e){c(e,n),e[i](t),a(e,n)})};v(["set","add","remove","toggle"],function(e){this[e+"Scope"]=function(t,n){C(t._katavorioDrag,n,this._dragsByScope,e+"Scope"),C(t._katavorioDrop,n,this._dropsByScope,e+"Scope")}.bind(this),this[e+"DragScope"]=function(t,n){C(t.constructor===_?t:t._katavorioDrag,n,this._dragsByScope,e+"Scope")}.bind(this),this[e+"DropScope"]=function(t,n){C(t.constructor===k?t:t._katavorioDrop,n,this._dropsByScope,e+"Scope")}.bind(this)}.bind(this)),this.snapToGrid=function(e,t){for(var n in this._dragsByScope)g(this._dragsByScope[n],function(n){n.snap(e,t)})},this.getDragsForScope=function(e){return this._dragsByScope[e]},this.getDropsForScope=function(e){return this._dropsByScope[e]};var S=function(e,t,n){if((e=A(e))[t]){var i=r.indexOf(e[t]);i>=0&&r.splice(i,1),c(e[t],n)&&v(e[t],function(e){e.destroy()}),delete e[t]}},F=function(e,t,n,i){(e=A(e))[t]&&e[t].off(n,i)};this.elementRemoved=function(e){this.destroyDraggable(e),this.destroyDroppable(e)},this.destroyDraggable=function(e,t,n){1===arguments.length?S(e,"_katavorioDrag",this._dragsByScope):F(e,"_katavorioDrag",t,n)},this.destroyDroppable=function(e,t,n){1===arguments.length?S(e,"_katavorioDrop",this._dropsByScope):F(e,"_katavorioDrop",t,n)},this.reset=function(){this._dragsByScope={},this._dropsByScope={},r=[],o={},T={}};var T={},D=function(t,n,r){var o,s=i(n)?n:n.id,a=!!i(n)||!1!==n.active,c=T[s]||(o={name:s,members:[]},T[s]=o,o);return v(t,function(t){if(t._katavorioDrag){if(r&&null!=t._katavorioDrag.posseRoles[c.name])return;e(c.members,t._katavorioDrag),e(t._katavorioDrag.posses,c.name),t._katavorioDrag.posseRoles[c.name]=a}}),c};this.addToPosse=function(e,t){for(var n=[],i=1;i<arguments.length;i++)n.push(D(e,arguments[i]));return 1===n.length?n[0]:n},this.setPosse=function(e,t){for(var n=[],i=1;i<arguments.length;i++)n.push(D(e,arguments[i],!0).name);return v(e,function(e){if(e._katavorioDrag){var t=function(e,t){for(var n=[],i=0;i<e.length;i++)-1===t.indexOf(e[i])&&n.push(e[i]);return n}(e._katavorioDrag.posses,n);Array.prototype.push.apply([],e._katavorioDrag.posses);for(var i=0;i<t.length;i++)this.removeFromPosse(e,t[i])}}.bind(this)),1===n.length?n[0]:n},this.removeFromPosse=function(e,t){if(arguments.length<2)throw new TypeError("No posse id provided for remove operation");for(var i=1;i<arguments.length;i++)t=arguments[i],v(e,function(e){if(e._katavorioDrag&&e._katavorioDrag.posses){var i=e._katavorioDrag;v(t,function(e){n(T[e].members,i),n(i.posses,e),delete i.posseRoles[e]})}})},this.removeFromAllPosses=function(e){v(e,function(e){if(e._katavorioDrag&&e._katavorioDrag.posses){var t=e._katavorioDrag;v(t.posses,function(e){n(T[e].members,t)}),t.posses.length=0,t.posseRoles={}}})},this.setPosseState=function(e,t,n){var i=T[t];i&&v(e,function(e){e._katavorioDrag&&e._katavorioDrag.posses&&(e._katavorioDrag.posseRoles[i.name]=n)})}},this.Katavorio.version="0.23.0",t.Katavorio=this.Katavorio}.call("undefined"!=typeof window?window:this),function(){var e=function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=function(e){return"string"==typeof e},i=function(e){return"boolean"==typeof e},r=function(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)},o=function(e){return"[object Date]"===Object.prototype.toString.call(e)},s=function(e){return"[object Function]"===Object.prototype.toString.call(e)},a=this;a.jsPlumbUtil={isArray:e,isString:n,isBoolean:i,isNull:function(e){return null==e},isObject:r,isDate:o,isFunction:s,isEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},isNumber:function(e){return"[object Number]"===Object.prototype.toString.call(e)},clone:function(t){if(n(t))return""+t;if(i(t))return!!t;if(o(t))return new Date(t.getTime());if(s(t))return t;if(e(t)){for(var a=[],c=0;c<t.length;c++)a.push(this.clone(t[c]));return a}if(r(t)){var l={};for(var u in t)l[u]=this.clone(t[u]);return l}return t},merge:function(t,o,s){var a,c,l={};for(s=s||[],c=0;c<s.length;c++)l[s[c]]=!0;var u=this.clone(t);for(c in o)if(null==u[c])u[c]=o[c];else if(n(o[c])||i(o[c]))l[c]?((a=[]).push.apply(a,e(u[c])?u[c]:[u[c]]),a.push.apply(a,e(o[c])?o[c]:[o[c]]),u[c]=a):u[c]=o[c];else if(e(o[c]))a=[],e(u[c])&&a.push.apply(a,u[c]),a.push.apply(a,o[c]),u[c]=a;else if(r(o[c]))for(var h in r(u[c])||(u[c]={}),o[c])u[c][h]=o[c][h];return u},replace:function(e,t,n){if(null!=e){var i=e;return t.replace(/([^\.])+/g,function(e,t,r,o){var s=e.match(/([^\[0-9]+){1}(\[)([0-9+])/),a=function(){return i[s[1]]||(i[s[1]]=[],i[s[1]])};if(r+e.length>=o.length)s?a()[s[3]]=n:i[e]=n;else if(s){var c=a();i=c[s[3]]||(c[s[3]]={},c[s[3]])}else i=i[e]||(i[e]={},i[e])}),e}},functionChain:function(e,t,n){for(var i=0;i<n.length;i++){var r=n[i][0][n[i][1]].apply(n[i][0],n[i][2]);if(r===t)return r}return e},populate:function(t,i,o){var a=function(t){if(null!=t){if(n(t))return function(e){var t=e.match(/(\${.*?})/g);if(null!=t)for(var n=0;n<t.length;n++){var r=i[t[n].substring(2,t[n].length-1)]||"";null!=r&&(e=e.replace(t[n],r))}return e}(t);if(!s(t)||null!=o&&0!==(t.name||"").indexOf(o)){if(e(t)){for(var c=[],l=0;l<t.length;l++)c.push(a(t[l]));return c}if(r(t)){var u={};for(var h in t)u[h]=a(t[h]);return u}return t}return t(i)}};return a(t)},findWithFunction:function(e,t){if(e)for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},removeWithFunction:function(e,t){var n=a.jsPlumbUtil.findWithFunction(e,t);return n>-1&&e.splice(n,1),-1!==n},remove:function(e,t){var n=e.indexOf(t);return n>-1&&e.splice(n,1),-1!==n},addWithFunction:function(e,t,n){-1===a.jsPlumbUtil.findWithFunction(e,n)&&e.push(t)},addToList:function(e,t,n,i){var r=e[t];return null==r&&(r=[],e[t]=r),r[i?"unshift":"push"](n),r},suggest:function(e,t,n){return-1===e.indexOf(t)&&(n?e.unshift(t):e.push(t),!0)},extend:function(t,n,i){var r;for(n=e(n)?n:[n],r=0;r<n.length;r++)for(var o in n[r].prototype)n[r].prototype.hasOwnProperty(o)&&(t.prototype[o]=n[r].prototype[o]);var s=function(e,t){return function(){for(r=0;r<n.length;r++)n[r].prototype[e]&&n[r].prototype[e].apply(this,arguments);return t.apply(this,arguments)}},a=function(e){for(var n in e)t.prototype[n]=s(n,e[n])};if(arguments.length>2)for(r=2;r<arguments.length;r++)a(arguments[r]);return t},uuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},logEnabled:!0,log:function(){if(a.jsPlumbUtil.logEnabled&&"undefined"!=typeof console)try{var e=arguments[arguments.length-1];console.log(e)}catch(e){}},wrap:function(e,t,n){return function(){var i=null;try{null!=t&&(i=t.apply(this,arguments))}catch(e){a.jsPlumbUtil.log("jsPlumb function failed : "+e)}if(null!=e&&(null==n||i!==n))try{i=e.apply(this,arguments)}catch(e){a.jsPlumbUtil.log("wrapped function failed : "+e)}return i}}},a.jsPlumbUtil.EventGenerator=function(){var e={},t=!1,n=!1,i={ready:!0},r=[];this.bind=function(t,n,i){var r=function(t){a.jsPlumbUtil.addToList(e,t,n,i),n.__jsPlumb=n.__jsPlumb||{},n.__jsPlumb[a.jsPlumbUtil.uuid()]=t};if("string"==typeof t)r(t);else if(null!=t.length)for(var o=0;o<t.length;o++)r(t[o]);return this},this.fire=function(s,c,l){if(n)r.unshift(arguments);else{if(n=!0,!t&&e[s]){var u=e[s].length,h=0,d=!1,f=null;if(!this.shouldFireEvent||this.shouldFireEvent(s,c,l))for(;!d&&h<u&&!1!==f;){if(i[s])e[s][h].apply(this,[c,l]);else try{f=e[s][h].apply(this,[c,l])}catch(e){a.jsPlumbUtil.log("jsPlumb: fire failed for event "+s+" : "+e)}h++,null!=e&&null!=e[s]||(d=!0)}}n=!1,o()}return this};var o=function(){var e=r.pop();e&&this.fire.apply(this,e)}.bind(this);this.unbind=function(t,n){if(0===arguments.length)e={};else if(1===arguments.length){if("string"==typeof t)delete e[t];else if(t.__jsPlumb){var i;for(var r in t.__jsPlumb)i=t.__jsPlumb[r],a.jsPlumbUtil.remove(e[i]||[],t)}}else 2===arguments.length&&a.jsPlumbUtil.remove(e[t]||[],n);return this},this.getListener=function(t){return e[t]},this.setSuspendEvents=function(e){t=e},this.isSuspendEvents=function(){return t},this.silently=function(e){this.setSuspendEvents(!0);try{e()}catch(e){a.jsPlumbUtil.log("Cannot execute silent function "+e)}this.setSuspendEvents(!1)},this.cleanupListeners=function(){for(var t in e)e[t]=null}},a.jsPlumbUtil.EventGenerator.prototype={cleanup:function(){this.cleanupListeners()}},t.jsPlumbUtil=a.jsPlumbUtil}.call("undefined"!=typeof window?window:this),function(){"use strict";this.jsPlumbUtil.matchesSelector=function(e,t,n){for(var i=(n=n||e.parentNode).querySelectorAll(t),r=0;r<i.length;r++)if(i[r]===e)return!0;return!1},this.jsPlumbUtil.consume=function(e,t){e.stopPropagation?e.stopPropagation():e.returnValue=!1,!t&&e.preventDefault&&e.preventDefault()},this.jsPlumbUtil.sizeElement=function(e,t,n,i,r){e&&(e.style.height=r+"px",e.height=r,e.style.width=i+"px",e.width=i,e.style.left=t+"px",e.style.top=n+"px")}}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this,n=e.jsPlumbUtil,i=function(){return""+(new Date).getTime()},r=function(e){if(e._jsPlumb.paintStyle&&e._jsPlumb.hoverPaintStyle){var t={};p.extend(t,e._jsPlumb.paintStyle),p.extend(t,e._jsPlumb.hoverPaintStyle),delete e._jsPlumb.hoverPaintStyle,t.gradient&&e._jsPlumb.paintStyle.fill&&delete t.gradient,e._jsPlumb.hoverPaintStyle=t}},o=["tap","dbltap","click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu"],s=function(e){return null==e?null:e.split(" ")},a=function(e,t,n){for(var i in t)e[i]=n},c=function(e,t){t=n.isArray(t)||null!=t.length&&!n.isString(t)?t:[t];for(var i=0;i<t.length;i++)try{e.apply(t[i],[t[i]])}catch(e){n.log(".each iteration failed : "+e)}},l=function(e,t,i){if(e.getDefaultType){var r=e.getTypeDescriptor(),o={},s=e.getDefaultType(),c=n.merge({},s);a(o,s,"__default");for(var l=0,u=e._jsPlumb.types.length;l<u;l++){var h=e._jsPlumb.types[l];if("__default"!==h){var d=e._jsPlumb.instance.getType(h,r);null!=d&&(c=n.merge(c,d,["cssClass"]),a(o,d,h))}}t&&(c=n.populate(c,t,"_")),e.applyType(c,i,o),i||e.repaint()}},u=e.jsPlumbUIComponent=function(e){n.EventGenerator.apply(this,arguments);var t=arguments,i=this.idPrefix+(new Date).getTime();this._jsPlumb={instance:e._jsPlumb,parameters:e.parameters||{},paintStyle:null,hoverPaintStyle:null,paintStyleInUse:null,hover:!1,beforeDetach:e.beforeDetach,beforeDrop:e.beforeDrop,overlayPlacements:[],hoverClass:e.hoverClass||e._jsPlumb.Defaults.HoverClass,types:[],typeCache:{}},this.cacheTypeItem=function(e,t,n){this._jsPlumb.typeCache[n]=this._jsPlumb.typeCache[n]||{},this._jsPlumb.typeCache[n][e]=t},this.getCachedTypeItem=function(e,t){return this._jsPlumb.typeCache[t]?this._jsPlumb.typeCache[t][e]:null},this.getId=function(){return i};var r=e.overlays||[],o={};if(this.defaultOverlayKeys){for(var s=0;s<this.defaultOverlayKeys.length;s++)Array.prototype.push.apply(r,this._jsPlumb.instance.Defaults[this.defaultOverlayKeys[s]]||[]);for(s=0;s<r.length;s++){var a=p.convertToFullOverlaySpec(r[s]);o[a[1].id]=a}}var c={overlays:o,parameters:e.parameters||{},scope:e.scope||this._jsPlumb.instance.getDefaultScope()};if(this.getDefaultType=function(){return c},this.appendToDefaultType=function(e){for(var t in e)c[t]=e[t]},e.events)for(var l in e.events)this.bind(l,e.events[l]);this.clone=function(){var e=Object.create(this.constructor.prototype);return this.constructor.apply(e,t),e}.bind(this),this.isDetachAllowed=function(e){var t=!0;if(this._jsPlumb.beforeDetach)try{t=this._jsPlumb.beforeDetach(e)}catch(e){n.log("jsPlumb: beforeDetach callback failed",e)}return t},this.isDropAllowed=function(e,t,i,r,o,s,a){var c=this._jsPlumb.instance.checkCondition("beforeDrop",{sourceId:e,targetId:t,scope:i,connection:r,dropEndpoint:o,source:s,target:a});if(this._jsPlumb.beforeDrop)try{c=this._jsPlumb.beforeDrop({sourceId:e,targetId:t,scope:i,connection:r,dropEndpoint:o,source:s,target:a})}catch(e){n.log("jsPlumb: beforeDrop callback failed",e)}return c};var u=[];this.setListenerComponent=function(e){for(var t=0;t<u.length;t++)u[t][3]=e}},h=function(e,t){var n=e._jsPlumb.types[t],i=e._jsPlumb.instance.getType(n,e.getTypeDescriptor());null!=i&&i.cssClass&&e.canvas&&e._jsPlumb.instance.removeClass(e.canvas,i.cssClass)};n.extend(e.jsPlumbUIComponent,n.EventGenerator,{getParameter:function(e){return this._jsPlumb.parameters[e]},setParameter:function(e,t){this._jsPlumb.parameters[e]=t},getParameters:function(){return this._jsPlumb.parameters},setParameters:function(e){this._jsPlumb.parameters=e},getClass:function(){return p.getClass(this.canvas)},hasClass:function(e){return p.hasClass(this.canvas,e)},addClass:function(e){p.addClass(this.canvas,e)},removeClass:function(e){p.removeClass(this.canvas,e)},updateClasses:function(e,t){p.updateClasses(this.canvas,e,t)},setType:function(e,t,n){this.clearTypes(),this._jsPlumb.types=s(e)||[],l(this,t,n)},getType:function(){return this._jsPlumb.types},reapplyTypes:function(e,t){l(this,e,t)},hasType:function(e){return-1!==this._jsPlumb.types.indexOf(e)},addType:function(e,t,n){var i=s(e),r=!1;if(null!=i){for(var o=0,a=i.length;o<a;o++)this.hasType(i[o])||(this._jsPlumb.types.push(i[o]),r=!0);r&&l(this,t,n)}},removeType:function(e,t,n){var i=s(e),r=!1,o=function(e){var t=this._jsPlumb.types.indexOf(e);return-1!==t&&(h(this,t),this._jsPlumb.types.splice(t,1),!0)}.bind(this);if(null!=i){for(var a=0,c=i.length;a<c;a++)r=o(i[a])||r;r&&l(this,t,n)}},clearTypes:function(e,t){for(var n=this._jsPlumb.types.length,i=0;i<n;i++)h(this,0),this._jsPlumb.types.splice(0,1);l(this,e,t)},toggleType:function(e,t,n){var i=s(e);if(null!=i){for(var r=0,o=i.length;r<o;r++){var a=this._jsPlumb.types.indexOf(i[r]);-1!==a?(h(this,a),this._jsPlumb.types.splice(a,1)):this._jsPlumb.types.push(i[r])}l(this,t,n)}},applyType:function(e,t){if(this.setPaintStyle(e.paintStyle,t),this.setHoverPaintStyle(e.hoverPaintStyle,t),e.parameters)for(var n in e.parameters)this.setParameter(n,e.parameters[n]);this._jsPlumb.paintStyleInUse=this.getPaintStyle()},setPaintStyle:function(e,t){this._jsPlumb.paintStyle=e,this._jsPlumb.paintStyleInUse=this._jsPlumb.paintStyle,r(this),t||this.repaint()},getPaintStyle:function(){return this._jsPlumb.paintStyle},setHoverPaintStyle:function(e,t){this._jsPlumb.hoverPaintStyle=e,r(this),t||this.repaint()},getHoverPaintStyle:function(){return this._jsPlumb.hoverPaintStyle},destroy:function(e){(e||null==this.typeId)&&(this.cleanupListeners(),this.clone=null,this._jsPlumb=null)},isHover:function(){return this._jsPlumb.hover},setHover:function(e,t,n){if(this._jsPlumb&&!this._jsPlumb.instance.currentlyDragging&&!this._jsPlumb.instance.isHoverSuspended()){this._jsPlumb.hover=e;var r=e?"addClass":"removeClass";null!=this.canvas&&(null!=this._jsPlumb.instance.hoverClass&&this._jsPlumb.instance[r](this.canvas,this._jsPlumb.instance.hoverClass),null!=this._jsPlumb.hoverClass&&this._jsPlumb.instance[r](this.canvas,this._jsPlumb.hoverClass)),null!=this._jsPlumb.hoverPaintStyle&&(this._jsPlumb.paintStyleInUse=e?this._jsPlumb.hoverPaintStyle:this._jsPlumb.paintStyle,this._jsPlumb.instance.isSuspendDrawing()||(n=n||i(),this.repaint({timestamp:n,recalc:!1}))),this.getAttachedElements&&!t&&function(e,t,n,i){var r=e.getAttachedElements();if(r)for(var o=0,s=r.length;o<s;o++)i&&i===r[o]||r[o].setHover(t,!0,n)}(this,e,i(),this)}}});var d=0,f=e.jsPlumbInstance=function(t){this.version="2.6.8",t&&p.extend(this.Defaults,t),this.logEnabled=this.Defaults.LogEnabled,this._connectionTypes={},this._endpointTypes={},n.EventGenerator.apply(this);var r=this,s=function(){var e=d+1;return d++,e}(),a=r.bind,l={},h=1,f=function(e){if(null==e)return null;if(3===e.nodeType||8===e.nodeType)return{el:e,text:!0};var t=r.getElement(e);return{el:t,id:n.isString(e)&&null==t?e:H(t)}};for(var g in this.getInstanceIndex=function(){return s},this.setZoom=function(e,t){return h=e,r.fire("zoom",h),t&&r.repaintEverything(),!0},this.getZoom=function(){return h},this.Defaults)l[g]=this.Defaults[g];var m,v=[];this.unbindContainer=function(){if(null!=m&&v.length>0)for(var e=0;e<v.length;e++)r.off(m,v[e][0],v[e][1])},this.setContainer=function(e){this.unbindContainer(),e=this.getElement(e),this.select().each(function(t){t.moveParent(e)}),this.selectEndpoints().each(function(t){t.moveParent(e)});var t=m;m=e,v.length=0;for(var n={endpointclick:"endpointClick",endpointdblclick:"endpointDblClick"},i=function(e,t,i){var o=t.srcElement||t.target,s=(o&&o.parentNode?o.parentNode._jsPlumb:null)||(o?o._jsPlumb:null)||(o&&o.parentNode&&o.parentNode.parentNode?o.parentNode.parentNode._jsPlumb:null);if(s){s.fire(e,s,t);var a=i&&n[i+e]||e;r.fire(a,s.component||s,t)}},s=function(e,t,n){v.push([e,n]),r.on(m,e,t,n)},a=function(e){s(e,".jtk-connector",function(t){i(e,t)}),s(e,".jtk-endpoint",function(t){i(e,t,"endpoint")}),s(e,".jtk-overlay",function(t){i(e,t)})},c=0;c<o.length;c++)a(o[c]);for(var l in k){var u=k[l].el;u.parentNode===t&&(t.removeChild(u),m.appendChild(u))}},this.getContainer=function(){return m},this.bind=function(e,t){"ready"===e&&b?t():a.apply(r,[e,t])},r.importDefaults=function(e){for(var t in e)r.Defaults[t]=e[t];return e.Container&&r.setContainer(e.Container),r},r.restoreDefaults=function(){return r.Defaults=p.extend({},l),r};var y=null,b=!1,w=[],x={},_={},k={},C={},E={},A={},S=!1,F=[],T=!1,D=null,L=this.Defaults.Scope,P=1,R=function(){return""+P++},M=function(e,t){m?m.appendChild(e):t?this.getElement(t).appendChild(e):this.appendToRoot(e)}.bind(this),B=function(e,t,n,o){if(!T){var s,a=H(e),c=r.getDragManager();c&&(s=c.getElementsForDraggable(a)),null==n&&(n=i());var l=re({elId:a,offset:t,recalc:!1,timestamp:n});if(s&&l&&l.o)for(var u in s)re({elId:s[u].id,offset:{left:l.o.left+s[u].offset.left,top:l.o.top+s[u].offset.top},recalc:!1,timestamp:n});if(r.anchorManager.redraw(a,t,n,null,o),s)for(var h in s)r.anchorManager.redraw(s[h].id,t,n,s[h].offset,o,!0)}},O=function(e){return _[e]},j=function(e,t){var i=p.extend({},e);if(t&&p.extend(i,t),i.source&&(i.source.endpoint?i.sourceEndpoint=i.source:i.source=r.getElement(i.source)),i.target&&(i.target.endpoint?i.targetEndpoint=i.target:i.target=r.getElement(i.target)),e.uuids&&(i.sourceEndpoint=O(e.uuids[0]),i.targetEndpoint=O(e.uuids[1])),i.sourceEndpoint&&i.sourceEndpoint.isFull())n.log(r,"could not add connection; source endpoint is full");else if(i.targetEndpoint&&i.targetEndpoint.isFull())n.log(r,"could not add connection; target endpoint is full");else{if(!i.type&&i.sourceEndpoint&&(i.type=i.sourceEndpoint.connectionType),i.sourceEndpoint&&i.sourceEndpoint.connectorOverlays){i.overlays=i.overlays||[];for(var o=0,s=i.sourceEndpoint.connectorOverlays.length;o<s;o++)i.overlays.push(i.sourceEndpoint.connectorOverlays[o])}i.sourceEndpoint&&i.sourceEndpoint.scope&&(i.scope=i.sourceEndpoint.scope),!i["pointer-events"]&&i.sourceEndpoint&&i.sourceEndpoint.connectorPointerEvents&&(i["pointer-events"]=i.sourceEndpoint.connectorPointerEvents);var a=function(e,t,n){return r.addEndpoint(e,function(e,t){var n=p.extend({},e);for(var i in t)t[i]&&(n[i]=t[i]);return n}(t,{anchor:i.anchors?i.anchors[n]:i.anchor,endpoint:i.endpoints?i.endpoints[n]:i.endpoint,paintStyle:i.endpointStyles?i.endpointStyles[n]:i.endpointStyle,hoverPaintStyle:i.endpointHoverStyles?i.endpointHoverStyles[n]:i.endpointHoverStyle}))},c=function(e,t,n,r){if(i[e]&&!i[e].endpoint&&!i[e+"Endpoint"]&&!i.newConnection){var o=n[H(i[e])];if(o=o?o[r]:null){if(!o.enabled)return!1;var s=null!=o.endpoint&&o.endpoint._jsPlumb?o.endpoint:a(i[e],o.def,t);if(s.isFull())return!1;i[e+"Endpoint"]=s,!i.scope&&o.def.scope&&(i.scope=o.def.scope),o.uniqueEndpoint?o.endpoint?s.finalEndpoint=o.endpoint:(o.endpoint=s,s.setDeleteOnEmpty(!1)):s.setDeleteOnEmpty(!0),0===t&&o.def.connectorOverlays&&(i.overlays=i.overlays||[],Array.prototype.push.apply(i.overlays,o.def.connectorOverlays))}}};if(!1!==c("source",0,this.sourceEndpointDefinitions,i.type||"default")&&!1!==c("target",1,this.targetEndpointDefinitions,i.type||"default"))return i.sourceEndpoint&&i.targetEndpoint&&(function(e,t){for(var n=e.scope.split(/\s/),i=t.scope.split(/\s/),r=0;r<n.length;r++)for(var o=0;o<i.length;o++)if(i[o]===n[r])return!0;return!1}(i.sourceEndpoint,i.targetEndpoint)||(i=null)),i}}.bind(r),I=function(e){var t=r.Defaults.ConnectionType||r.getDefaultConnectionType();e._jsPlumb=r,e.newConnection=I,e.newEndpoint=N,e.endpointsByUUID=_,e.endpointsByElement=x,e.finaliseConnection=$,e.id="con_"+R();var n=new t(e);return n.isDetachable()&&(n.endpoints[0].initDraggable("_jsPlumbSource"),n.endpoints[1].initDraggable("_jsPlumbTarget")),n},$=r.finaliseConnection=function(e,t,n,i){if(t=t||{},e.suspendedEndpoint||w.push(e),e.pending=null,e.endpoints[0].isTemporarySource=!1,!1!==i&&r.anchorManager.newConnection(e),B(e.source),!t.doNotFireConnectionEvent&&!1!==t.fireEvent){var o={connection:e,source:e.source,target:e.target,sourceId:e.sourceId,targetId:e.targetId,sourceEndpoint:e.endpoints[0],targetEndpoint:e.endpoints[1]};r.fire("connection",o,n)}},N=function(e,t){var n=r.Defaults.EndpointType||p.Endpoint,i=p.extend({},e);i._jsPlumb=r,i.newConnection=I,i.newEndpoint=N,i.endpointsByUUID=_,i.endpointsByElement=x,i.fireDetachEvent=K,i.elementId=t||H(i.source);var o=new n(i);return o.id="ep_"+R(),ie(i.elementId,i.source),p.headless||r.getDragManager().endpointAdded(i.source,t),o},W=function(e,t,n){var i=x[e];if(i&&i.length)for(var r=0,o=i.length;r<o;r++){for(var s=0,a=i[r].connections.length;s<a;s++){if(t(i[r].connections[s]))return}n&&n(i[r])}},z=function(e,t,n){t="block"===t;var i=null;n&&(i=function(e){e.setVisible(t,!0,!0)});var r=f(e);W(r.id,function(e){if(t&&n){var i=e.sourceId===r.id?1:0;e.endpoints[i].isVisible()&&e.setVisible(!0)}else e.setVisible(t)},i)},H=function(e,t,i){if(n.isString(e))return e;if(null==e)return null;var o=r.getAttribute(e,"id");return o&&"undefined"!==o||(2===arguments.length&&void 0!==arguments[1]?o=t:(1===arguments.length||3===arguments.length&&!arguments[2])&&(o="jsPlumb_"+s+"_"+R()),i||r.setAttribute(e,"id",o)),o};this.setConnectionBeingDragged=function(e){S=e},this.isConnectionBeingDragged=function(){return S},this.getManagedElements=function(){return k},this.connectorClass="jtk-connector",this.connectorOutlineClass="jtk-connector-outline",this.editableConnectorClass="jtk-connector-editable",this.connectedClass="jtk-connected",this.hoverClass="jtk-hover",this.endpointClass="jtk-endpoint",this.endpointConnectedClass="jtk-endpoint-connected",this.endpointFullClass="jtk-endpoint-full",this.endpointDropAllowedClass="jtk-endpoint-drop-allowed",this.endpointDropForbiddenClass="jtk-endpoint-drop-forbidden",this.overlayClass="jtk-overlay",this.draggingClass="jtk-dragging",this.elementDraggingClass="jtk-element-dragging",this.sourceElementDraggingClass="jtk-source-element-dragging",this.targetElementDraggingClass="jtk-target-element-dragging",this.endpointAnchorClassPrefix="jtk-endpoint-anchor",this.hoverSourceClass="jtk-source-hover",this.hoverTargetClass="jtk-target-hover",this.dragSelectClass="jtk-drag-select",this.Anchors={},this.Connectors={svg:{}},this.Endpoints={svg:{}},this.Overlays={svg:{}},this.ConnectorRenderers={},this.SVG="svg",this.addEndpoint=function(e,t,i){i=i||{};var o=p.extend({},i);p.extend(o,t),o.endpoint=o.endpoint||r.Defaults.Endpoint,o.paintStyle=o.paintStyle||r.Defaults.EndpointStyle;for(var s=[],a=n.isArray(e)||null!=e.length&&!n.isString(e)?e:[e],c=0,l=a.length;c<l;c++){o.source=r.getElement(a[c]),ne(o.source);var u=H(o.source),h=N(o,u),d=ie(u,o.source).info.o;n.addToList(x,u,h),T||h.paint({anchorLoc:h.anchor.compute({xy:[d.left,d.top],wh:F[u],element:h,timestamp:D}),timestamp:D}),s.push(h)}return 1===s.length?s[0]:s},this.addEndpoints=function(e,t,i){for(var o=[],s=0,a=t.length;s<a;s++){var c=r.addEndpoint(e,t[s],i);n.isArray(c)?Array.prototype.push.apply(o,c):o.push(c)}return o},this.animate=function(e,t,i){if(!this.animationSupported)return!1;i=i||{};var o=r.getElement(e),s=H(o),a=p.animEvents.step,c=p.animEvents.complete;i[a]=n.wrap(i[a],function(){r.revalidate(s)}),i[c]=n.wrap(i[c],function(){r.revalidate(s)}),r.doAnimate(o,t,i)},this.checkCondition=function(e,t){var i=r.getListener(e),o=!0;if(i&&i.length>0){var s=Array.prototype.slice.call(arguments,1);try{for(var a=0,c=i.length;a<c;a++)o=o&&i[a].apply(i[a],s)}catch(t){n.log(r,"cannot check condition ["+e+"]"+t)}}return o},this.connect=function(e,t){var i,r=j(e,t);if(r){if(null==r.source&&null==r.sourceEndpoint)return void n.log("Cannot establish connection - source does not exist");if(null==r.target&&null==r.targetEndpoint)return void n.log("Cannot establish connection - target does not exist");ne(r.source),i=I(r),$(i,r)}return i};var V=[{el:"source",elId:"sourceId",epDefs:"sourceEndpointDefinitions"},{el:"target",elId:"targetId",epDefs:"targetEndpointDefinitions"}],U=function(e,t,n,i){var r,o,s,a=V[n],c=e[a.elId],l=(e[a.el],e.endpoints[n]),u={index:n,originalSourceId:0===n?c:e.sourceId,newSourceId:e.sourceId,originalTargetId:1===n?c:e.targetId,newTargetId:e.targetId,connection:e};if(t.constructor===p.Endpoint)(r=t).addConnection(e),t=r.element;else if(o=H(t),s=this[a.epDefs][o],o===e[a.elId])r=null;else if(s)for(var h in s){if(!s[h].enabled)return;r=null!=s[h].endpoint&&s[h].endpoint._jsPlumb?s[h].endpoint:this.addEndpoint(t,s[h].def),s[h].uniqueEndpoint&&(s[h].endpoint=r),r.addConnection(e)}else r=e.makeEndpoint(0===n,t,o);return null!=r&&(l.detachFromConnection(e),e.endpoints[n]=r,e[a.el]=r.element,e[a.elId]=r.elementId,u[0===n?"newSourceId":"newTargetId"]=r.elementId,G(u),i||e.repaint()),u.element=t,u}.bind(this);this.setSource=function(e,t,n){var i=U(e,t,0,n);this.anchorManager.sourceChanged(i.originalSourceId,i.newSourceId,e,i.el)},this.setTarget=function(e,t,n){var i=U(e,t,1,n);this.anchorManager.updateOtherEndpoint(i.originalSourceId,i.originalTargetId,i.newTargetId,e)},this.deleteEndpoint=function(e,t,n){var i="string"==typeof e?_[e]:e;return i&&r.deleteObject({endpoint:i,dontUpdateHover:t,deleteAttachedObjects:n}),r},this.deleteEveryEndpoint=function(){var e=r.setSuspendDrawing(!0);for(var t in x){var n=x[t];if(n&&n.length)for(var i=0,o=n.length;i<o;i++)r.deleteEndpoint(n[i],!0)}x={},k={},_={},C={},E={},r.anchorManager.reset();var s=r.getDragManager();return s&&s.reset(),e||r.setSuspendDrawing(!1),r};var K=function(e,t,n){var i=r.Defaults.ConnectionType||r.getDefaultConnectionType(),o=e.constructor===i?{connection:e,source:e.source,target:e.target,sourceId:e.sourceId,targetId:e.targetId,sourceEndpoint:e.endpoints[0],targetEndpoint:e.endpoints[1]}:e;t&&r.fire("connectionDetached",o,n),r.fire("internal.connectionDetached",o,n),r.anchorManager.connectionDetached(o)},G=r.fireMoveEvent=function(e,t){r.fire("connectionMoved",e,t)};this.unregisterEndpoint=function(e){for(var t in e._jsPlumb.uuid&&(_[e._jsPlumb.uuid]=null),r.anchorManager.deleteEndpoint(e),x){var n=x[t];if(n){for(var i=[],o=0,s=n.length;o<s;o++)n[o]!==e&&i.push(n[o]);x[t]=i}x[t].length<1&&delete x[t]}};this.deleteConnection=function(e,t){return!(null==e||!(t=t||{}).force&&!n.functionChain(!0,!1,[[e.endpoints[0],"isDetachAllowed",[e]],[e.endpoints[1],"isDetachAllowed",[e]],[e,"isDetachAllowed",[e]],[r,"checkCondition",["beforeDetach",e]]]))&&(e.setHover(!1),K(e,!e.pending&&!1!==t.fireEvent,t.originalEvent),e.endpoints[0].detachFromConnection(e),e.endpoints[1].detachFromConnection(e),n.removeWithFunction(w,function(t){return e.id===t.id}),e.cleanup(),e.destroy(),!0)},this.deleteEveryConnection=function(e){e=e||{};var t=w.length,n=0;return r.batch(function(){for(var i=0;i<t;i++)n+=r.deleteConnection(w[0],e)?1:0}),n},this.deleteConnectionsForElement=function(e,t){t=t||{},e=r.getElement(e);var n=H(e),i=x[n];if(i&&i.length)for(var o=0,s=i.length;o<s;o++)i[o].deleteEveryConnection(t);return r},this.deleteObject=function(e){var t={endpoints:{},connections:{},endpointCount:0,connectionCount:0},i=!1!==e.deleteAttachedObjects,o=function(n){null!=n&&null==t.connections[n.id]&&(e.dontUpdateHover||null==n._jsPlumb||n.setHover(!1),t.connections[n.id]=n,t.connectionCount++)};for(var s in e.connection?o(e.connection):function(n){if(null!=n&&null==t.endpoints[n.id]&&(e.dontUpdateHover||null==n._jsPlumb||n.setHover(!1),t.endpoints[n.id]=n,t.endpointCount++,i))for(var r=0;r<n.connections.length;r++){var s=n.connections[r];o(s)}}(e.endpoint),t.connections){var a=t.connections[s];if(a._jsPlumb){n.removeWithFunction(w,function(e){return a.id===e.id}),K(a,!1!==e.fireEvent&&!a.pending,e.originalEvent);var c=null==e.deleteAttachedObjects?null:!e.deleteAttachedObjects;a.endpoints[0].detachFromConnection(a,null,c),a.endpoints[1].detachFromConnection(a,null,c),a.cleanup(!0),a.destroy(!0)}}for(var l in t.endpoints){var u=t.endpoints[l];u._jsPlumb&&(r.unregisterEndpoint(u),u.cleanup(!0),u.destroy(!0))}return t},this.draggable=function(e,t){var i;return c(function(e){(i=f(e)).el&&function(e,t,i,o,s){if(!p.headless&&null!=t&&t&&p.isDragSupported(e,r)){var a=i||r.Defaults.DragOptions;if(a=p.extend({},a),p.isAlreadyDraggable(e,r))i.force&&r.initDraggable(e,a);else{var c=p.dragEvents.drag,l=p.dragEvents.stop,u=p.dragEvents.start,h=!1;ie(o,e),a[u]=n.wrap(a[u],function(){if(r.setHoverSuspended(!0),r.select({source:e}).addClass(r.elementDraggingClass+" "+r.sourceElementDraggingClass,!0),r.select({target:e}).addClass(r.elementDraggingClass+" "+r.targetElementDraggingClass,!0),r.setConnectionBeingDragged(!0),a.canDrag)return i.canDrag()},!1),a[c]=n.wrap(a[c],function(){var t=r.getUIPosition(arguments,r.getZoom());null!=t&&(B(e,t,null,!0),h&&r.addClass(e,"jtk-dragged"),h=!0)}),a[l]=n.wrap(a[l],function(){for(var e,t,n=arguments[0].selection,i=0;i<n.length;i++)null!=(t=n[i])[1]&&(e=r.getUIPosition([{el:t[2].el,pos:[t[1].left,t[1].top]}]),B(t[2].el,e)),r.removeClass(t[0],"jtk-dragged"),r.select({source:t[2].el}).removeClass(r.elementDraggingClass+" "+r.sourceElementDraggingClass,!0),r.select({target:t[2].el}).removeClass(r.elementDraggingClass+" "+r.targetElementDraggingClass,!0),r.getDragManager().dragEnded(t[2].el);h=!1,r.setHoverSuspended(!1),r.setConnectionBeingDragged(!1)});var d=H(e);A[d]=!0;var f=A[d];a.disabled=null!=f&&!f,r.initDraggable(e,a),r.getDragManager().register(e),s&&r.fire("elementDraggable",{el:e,options:a})}}}(i.el,!0,t,i.id,!0)},e),r},this.droppable=function(e,t){var n;return(t=t||{}).allowLoopback=!1,c(function(e){(n=f(e)).el&&r.initDroppable(n.el,t)},e),r};var q=function(e,t,n){return function(){return function(e,t,n,i){for(var r=0,o=e.length;r<o;r++)e[r][t].apply(e[r],n);return i(e)}(e,t,arguments,n)}},Y=function(e,t){return function(){return function(e,t,n){for(var i=[],r=0,o=e.length;r<o;r++)i.push([e[r][t].apply(e[r],n),e[r]]);return i}(e,t,arguments)}},X=function(e,t){var n=[];if(e)if("string"==typeof e){if("*"===e)return e;n.push(e)}else if(t)n=e;else if(e.length)for(var i=0,r=e.length;i<r;i++)n.push(f(e[i]).id);else n.push(f(e).id);return n},Z=function(e,t,n){return"*"===e||(e.length>0?-1!==e.indexOf(t):!n)};this.getConnections=function(e,t){e?e.constructor===String&&(e={scope:e}):e={};for(var n=e.scope||r.getDefaultScope(),i=X(n,!0),o=X(e.source),s=X(e.target),a=!t&&i.length>1?{}:[],c=function(e,n){if(!t&&i.length>1){var r=a[e];null==r&&(r=a[e]=[]),r.push(n)}else a.push(n)},l=0,u=w.length;l<u;l++){var h=w[l],d=h.proxies&&h.proxies[0]?h.proxies[0].originalEp.elementId:h.sourceId,f=h.proxies&&h.proxies[1]?h.proxies[1].originalEp.elementId:h.targetId;Z(i,h.scope)&&Z(o,d)&&Z(s,f)&&c(h.scope,h)}return a};var Q=function(e,t){var n,i,r={length:e.length,each:function(e,t){return function(n){for(var i=0,r=e.length;i<r;i++)n(e[i]);return t(e)}}(e,t),get:function(e){return function(t){return e[t]}}(e)},o=["setHover","removeAllOverlays","setLabel","addClass","addOverlay","removeOverlay","removeOverlays","showOverlay","hideOverlay","showOverlays","hideOverlays","setPaintStyle","setHoverPaintStyle","setSuspendEvents","setParameter","setParameters","setVisible","repaint","addType","toggleType","removeType","removeClass","setType","bind","unbind"],s=["getLabel","getOverlay","isHover","getParameter","getParameters","getPaintStyle","getHoverPaintStyle","isVisible","hasType","getType","isSuspendEvents"];for(n=0,i=o.length;n<i;n++)r[o[n]]=q(e,o[n],t);for(n=0,i=s.length;n<i;n++)r[s[n]]=Y(e,s[n]);return r},J=function(e){var t=Q(e,J);return p.extend(t,{setDetachable:q(e,"setDetachable",J),setReattach:q(e,"setReattach",J),setConnector:q(e,"setConnector",J),delete:function(){for(var t=0,n=e.length;t<n;t++)r.deleteConnection(e[t])},isDetachable:Y(e,"isDetachable"),isReattach:Y(e,"isReattach")})},ee=function(e){var t=Q(e,ee);return p.extend(t,{setEnabled:q(e,"setEnabled",ee),setAnchor:q(e,"setAnchor",ee),isEnabled:Y(e,"isEnabled"),deleteEveryConnection:function(){for(var t=0,n=e.length;t<n;t++)e[t].deleteEveryConnection()},delete:function(){for(var t=0,n=e.length;t<n;t++)r.deleteEndpoint(e[t])}})};this.select=function(e){return(e=e||{}).scope=e.scope||"*",J(e.connections||r.getConnections(e,!0))},this.selectEndpoints=function(e){(e=e||{}).scope=e.scope||"*";var t=!e.element&&!e.source&&!e.target,n=t?"*":X(e.element),i=t?"*":X(e.source),r=t?"*":X(e.target),o=X(e.scope,!0),s=[];for(var a in x){var c=Z(n,a,!0),l=Z(i,a,!0),u="*"!==i,h=Z(r,a,!0),d="*"!==r;if(c||l||h)e:for(var f=0,p=x[a].length;f<p;f++){var g=x[a][f];if(Z(o,g.scope,!0)){var m=u&&i.length>0&&!g.isSource,v=d&&r.length>0&&!g.isTarget;if(m||v)continue e;s.push(g)}}}return ee(s)},this.getAllConnections=function(){return w},this.getDefaultScope=function(){return L},this.getEndpoint=O,this.getEndpoints=function(e){return x[f(e).id]||[]},this.getDefaultEndpointType=function(){return p.Endpoint},this.getDefaultConnectionType=function(){return p.Connection},this.getId=H,this.appendElement=M;var te=!1;this.isHoverSuspended=function(){return te},this.setHoverSuspended=function(e){te=e},this.hide=function(e,t){return z(e,"none",t),r},this.idstamp=R;var ne=function(e){if(!m&&e){var t=r.getElement(e);t.offsetParent&&r.setContainer(t.offsetParent)}},ie=r.manage=function(e,t,n){return k[e]||(k[e]={el:t,endpoints:[],connections:[]},k[e].info=re({elId:e,timestamp:D}),n||r.fire("manageElement",{id:e,info:k[e].info,el:t})),k[e]},re=this.updateOffset=function(e){var t,n=e.timestamp,i=e.recalc,o=e.offset,s=e.elId;return T&&!n&&(n=D),!i&&n&&n===E[s]?{o:e.offset||C[s],s:F[s]}:(i||!o&&null==C[s]?null!=(t=k[s]?k[s].el:null)&&(F[s]=r.getSize(t),C[s]=r.getOffset(t),E[s]=n):(C[s]=o||C[s],null==F[s]&&null!=(t=k[s].el)&&(F[s]=r.getSize(t)),E[s]=n),C[s]&&!C[s].right&&(C[s].right=C[s].left+F[s][0],C[s].bottom=C[s].top+F[s][1],C[s].width=F[s][0],C[s].height=F[s][1],C[s].centerx=C[s].left+C[s].width/2,C[s].centery=C[s].top+C[s].height/2),{o:C[s],s:F[s]})};this.init=function(){b||(r.Defaults.Container&&r.setContainer(r.Defaults.Container),r.anchorManager=new e.jsPlumb.AnchorManager({jsPlumbInstance:r}),b=!0,r.fire("ready",r))}.bind(this),this.log=y,this.jsPlumbUIComponent=u,this.makeAnchor=function(){var t,i=function(t,n){if(e.jsPlumb.Anchors[t])return new e.jsPlumb.Anchors[t](n);if(!r.Defaults.DoNotThrowErrors)throw{msg:"jsPlumb: unknown anchor type '"+t+"'"}};if(0===arguments.length)return null;var o=arguments[0],s=arguments[1],a=(arguments[2],null);if(o.compute&&o.getOrientation)return o;if("string"==typeof o)a=i(arguments[0],{elementId:s,jsPlumbInstance:r});else if(n.isArray(o))if(n.isArray(o[0])||n.isString(o[0]))2===o.length&&n.isObject(o[1])?n.isString(o[0])?(t=e.jsPlumb.extend({elementId:s,jsPlumbInstance:r},o[1]),a=i(o[0],t)):(t=e.jsPlumb.extend({elementId:s,jsPlumbInstance:r,anchors:o[0]},o[1]),a=new e.jsPlumb.DynamicAnchor(t)):a=new p.DynamicAnchor({anchors:o,selector:null,elementId:s,jsPlumbInstance:r});else{var c={x:o[0],y:o[1],orientation:o.length>=4?[o[2],o[3]]:[0,0],offsets:o.length>=6?[o[4],o[5]]:[0,0],elementId:s,jsPlumbInstance:r,cssClass:7===o.length?o[6]:null};(a=new e.jsPlumb.Anchor(c)).clone=function(){return new e.jsPlumb.Anchor(c)}}return a.id||(a.id="anchor_"+R()),a},this.makeAnchors=function(t,i,o){for(var s=[],a=0,c=t.length;a<c;a++)"string"==typeof t[a]?s.push(e.jsPlumb.Anchors[t[a]]({elementId:i,jsPlumbInstance:o})):n.isArray(t[a])&&s.push(r.makeAnchor(t[a],i,o));return s},this.makeDynamicAnchor=function(t,n){return new e.jsPlumb.DynamicAnchor({anchors:t,selector:n,elementId:null,jsPlumbInstance:r})},this.targetEndpointDefinitions={},this.sourceEndpointDefinitions={};var oe=function(t,i,o,s,a){var c=new u(i),l=i._jsPlumb.EndpointDropHandler({jsPlumb:r,enabled:function(){return t.def.enabled},isFull:function(){var e=r.select({target:t.id}).length;return t.def.maxConnections>0&&e>=t.def.maxConnections},element:t.el,elementId:t.id,isSource:s,isTarget:a,addClass:function(e){r.addClass(t.el,e)},removeClass:function(e){r.removeClass(t.el,e)},onDrop:function(e){e.endpoints[0].anchor.locked=!1},isDropAllowed:function(){return c.isDropAllowed.apply(c,arguments)},isRedrop:function(e){return null!=e.suspendedElement&&null!=e.suspendedEndpoint&&e.suspendedEndpoint.element===t.el},getEndpoint:function(n){var o=t.def.endpoint;if(null==o||null==o._jsPlumb){var s=r.deriveEndpointAndAnchorSpec(n.getType().join(" "),!0),a=s.endpoints?e.jsPlumb.extend(i,{endpoint:t.def.def.endpoint||s.endpoints[1]}):i;s.anchors&&(a=e.jsPlumb.extend(a,{anchor:t.def.def.anchor||s.anchors[1]})),(o=r.addEndpoint(t.el,a))._mtNew=!0}if(i.uniqueEndpoint&&(t.def.endpoint=o),o.setDeleteOnEmpty(!0),n.isDetachable()&&o.initDraggable(),null!=o.anchor.positionFinder){var c=r.getUIPosition(arguments,r.getZoom()),l=r.getOffset(t.el),u=r.getSize(t.el),h=null==c?[0,0]:o.anchor.positionFinder(c,l,u,o.anchor.constructorParams);o.anchor.x=h[0],o.anchor.y=h[1]}return o},maybeCleanup:function(e){e._mtNew&&0===e.connections.length?r.deleteObject({endpoint:e}):delete e._mtNew}}),h=e.jsPlumb.dragEvents.drop;return o.scope=o.scope||i.scope||r.Defaults.Scope,o[h]=n.wrap(o[h],l,!0),a&&(o[e.jsPlumb.dragEvents.over]=function(){return!0}),!1===i.allowLoopback&&(o.canDrop=function(e){return e.getDragElement()._jsPlumbRelatedElement!==t.el}),r.initDroppable(t.el,o,"internal"),l};this.makeTarget=function(t,n,i){var o=e.jsPlumb.extend({_jsPlumb:this},i);e.jsPlumb.extend(o,n);for(var s=o.maxConnections||-1,a=function(t){var n=f(t),i=n.id,a=e.jsPlumb.extend({},o.dropOptions||{}),c=o.connectionType||"default";this.targetEndpointDefinitions[i]=this.targetEndpointDefinitions[i]||{},ne(i),n.el._isJsPlumbGroup&&null==a.rank&&(a.rank=-1);var l={def:e.jsPlumb.extend({},o),uniqueEndpoint:o.uniqueEndpoint,maxConnections:s,enabled:!0};o.createEndpoint&&(l.uniqueEndpoint=!0,l.endpoint=r.addEndpoint(t,l.def),l.endpoint.setDeleteOnEmpty(!1)),n.def=l,this.targetEndpointDefinitions[i][c]=l,oe(n,o,a,!0===o.isSource,!0),n.el._katavorioDrop[n.el._katavorioDrop.length-1].targetDef=l}.bind(this),c=t.length&&t.constructor!==String?t:[t],l=0,u=c.length;l<u;l++)a(c[l]);return this},this.unmakeTarget=function(e,t){var n=f(e);return r.destroyDroppable(n.el,"internal"),t||delete this.targetEndpointDefinitions[n.id],this},this.makeSource=function(t,i,o){var s=e.jsPlumb.extend({_jsPlumb:this},o);e.jsPlumb.extend(s,i);var a=s.connectionType||"default",c=r.deriveEndpointAndAnchorSpec(a);s.endpoint=s.endpoint||c.endpoints[0],s.anchor=s.anchor||c.anchors[0];for(var l=s.maxConnections||-1,u=s.onMaxConnections,d=function(i){var o=i.id,c=this.getElement(i.el);this.sourceEndpointDefinitions[o]=this.sourceEndpointDefinitions[o]||{},ne(o);var d={def:e.jsPlumb.extend({},s),uniqueEndpoint:s.uniqueEndpoint,maxConnections:l,enabled:!0};s.createEndpoint&&(d.uniqueEndpoint=!0,d.endpoint=r.addEndpoint(t,d.def),d.endpoint.setDeleteOnEmpty(!1)),this.sourceEndpointDefinitions[o][a]=d,i.def=d;var f=e.jsPlumb.dragEvents.stop,p=e.jsPlumb.dragEvents.drag,g=e.jsPlumb.extend({},s.dragOptions||{}),m=g.drag,v=g.stop,y=null,b=!1;g.scope=g.scope||s.scope,g[p]=n.wrap(g[p],function(){m&&m.apply(this,arguments),b=!1}),g[f]=n.wrap(g[f],function(){if(v&&v.apply(this,arguments),this.currentlyDragging=!1,null!=y._jsPlumb){var e=s.anchor||this.Defaults.Anchor,t=y.anchor,n=y.connections[0],i=this.makeAnchor(e,o,this),a=y.element;if(null!=i.positionFinder){var c=r.getOffset(a),l=this.getSize(a),u={left:c.left+t.x*l[0],top:c.top+t.y*l[1]},h=i.positionFinder(u,c,l,i.constructorParams);i.x=h[0],i.y=h[1]}y.setAnchor(i,!0),y.repaint(),this.repaint(y.elementId),null!=n&&this.repaint(n.targetId)}}.bind(this));var w=function(t){if(3!==t.which&&2!==t.button){var d=this.sourceEndpointDefinitions[o][a];if(d.enabled){if(o=this.getId(this.getElement(i.el)),s.filter)if(!1===(n.isString(s.filter)?function(e,t,n,i,r){for(var o=e.target||e.srcElement,s=!1,a=i.getSelector(t,n),c=0;c<a.length;c++)if(a[c]===o){s=!0;break}return r?!s:s}(t,i.el,s.filter,this,s.filterExclude):s.filter(t,i.el)))return;var f=this.select({source:o}).length;if(d.maxConnections>=0&&f>=d.maxConnections)return u&&u({element:i.el,maxConnections:l},t),!1;var p=e.jsPlumb.getPositionOnElement(t,c,h),m={};e.jsPlumb.extend(m,s),m.isTemporarySource=!0,m.anchor=[p[0],p[1],0,0],m.dragOptions=g,d.def.scope&&(m.scope=d.def.scope),y=this.addEndpoint(o,m),b=!0,y.setDeleteOnEmpty(!0),d.uniqueEndpoint&&(d.endpoint?y.finalEndpoint=d.endpoint:(d.endpoint=y,y.setDeleteOnEmpty(!1)));var v=function(){r.off(y.canvas,"mouseup",v),r.off(i.el,"mouseup",v),b&&(b=!1,r.deleteEndpoint(y))};r.on(y.canvas,"mouseup",v),r.on(i.el,"mouseup",v);var w={};if(d.def.extract)for(var x in d.def.extract){var _=(t.srcElement||t.target).getAttribute(x);_&&(w[d.def.extract[x]]=_)}r.trigger(y.canvas,"mousedown",t,w),n.consume(t)}}}.bind(this);this.on(i.el,"mousedown",w),d.trigger=w,s.filter&&(n.isString(s.filter)||n.isFunction(s.filter))&&r.setDragFilter(i.el,s.filter);var x=e.jsPlumb.extend({},s.dropOptions||{});oe(i,s,x,!0,!0===s.isTarget)}.bind(this),p=t.length&&t.constructor!==String?t:[t],g=0,m=p.length;g<m;g++)d(f(p[g]));return this},this.unmakeSource=function(e,t,n){var i=f(e);r.destroyDroppable(i.el,"internal");var o=this.sourceEndpointDefinitions[i.id];if(o)for(var s in o)if(null==t||t===s){var a=o[s].trigger;a&&r.off(i.el,"mousedown",a),n||delete this.sourceEndpointDefinitions[i.id][s]}return this},this.unmakeEverySource=function(){for(var e in this.sourceEndpointDefinitions)r.unmakeSource(e,null,!0);return this.sourceEndpointDefinitions={},this};var se=function(e,t,i){t=n.isArray(t)?t:[t];var r=H(e);i=i||"default";for(var o=0;o<t.length;o++){var s=this[t[o]][r];if(s&&s[i])return s[i].def.scope||this.Defaults.Scope}}.bind(this),ae=function(e,t,i,r){i=n.isArray(i)?i:[i];var o=H(e);r=r||"default";for(var s=0;s<i.length;s++){var a=this[i[s]][o];a&&a[r]&&(a[r].def.scope=t)}}.bind(this);this.getScope=function(e,t){return se(e,["sourceEndpointDefinitions","targetEndpointDefinitions"])},this.getSourceScope=function(e){return se(e,"sourceEndpointDefinitions")},this.getTargetScope=function(e){return se(e,"targetEndpointDefinitions")},this.setScope=function(e,t,n){this.setSourceScope(e,t,n),this.setTargetScope(e,t,n)},this.setSourceScope=function(e,t,n){ae(e,t,"sourceEndpointDefinitions",n),this.setDragScope(e,t)},this.setTargetScope=function(e,t,n){ae(e,t,"targetEndpointDefinitions",n),this.setDropScope(e,t)},this.unmakeEveryTarget=function(){for(var e in this.targetEndpointDefinitions)r.unmakeTarget(e,!0);return this.targetEndpointDefinitions={},this};var ce=function(e,t,i,o,s){var a,c,l,u="source"===e?this.sourceEndpointDefinitions:this.targetEndpointDefinitions;if(s=s||"default",t.length&&!n.isString(t)){a=[];for(var h=0,d=t.length;h<d;h++)u[(c=f(t[h])).id]&&u[c.id][s]&&(a[h]=u[c.id][s].enabled,l=o?!a[h]:i,u[c.id][s].enabled=l,r[l?"removeClass":"addClass"](c.el,"jtk-"+e+"-disabled"))}else{var p=(c=f(t)).id;u[p]&&u[p][s]&&(a=u[p][s].enabled,l=o?!a:i,u[p][s].enabled=l,r[l?"removeClass":"addClass"](c.el,"jtk-"+e+"-disabled"))}return a}.bind(this),le=function(e,t){return n.isString(e)||!e.length?t.apply(this,[e]):e.length?t.apply(this,[e[0]]):void 0}.bind(this);this.toggleSourceEnabled=function(e,t){return ce("source",e,null,!0,t),this.isSourceEnabled(e,t)},this.setSourceEnabled=function(e,t,n){return ce("source",e,t,null,n)},this.isSource=function(e,t){return t=t||"default",le(e,function(e){var n=this.sourceEndpointDefinitions[f(e).id];return null!=n&&null!=n[t]}.bind(this))},this.isSourceEnabled=function(e,t){return t=t||"default",le(e,function(e){var n=this.sourceEndpointDefinitions[f(e).id];return n&&n[t]&&!0===n[t].enabled}.bind(this))},this.toggleTargetEnabled=function(e,t){return ce("target",e,null,!0,t),this.isTargetEnabled(e,t)},this.isTarget=function(e,t){return t=t||"default",le(e,function(e){var n=this.targetEndpointDefinitions[f(e).id];return null!=n&&null!=n[t]}.bind(this))},this.isTargetEnabled=function(e,t){return t=t||"default",le(e,function(e){var n=this.targetEndpointDefinitions[f(e).id];return n&&n[t]&&!0===n[t].enabled}.bind(this))},this.setTargetEnabled=function(e,t,n){return ce("target",e,t,null,n)},this.ready=function(e){r.bind("ready",e)};var ue=function(e,t){if("object"==typeof e&&e.length)for(var n=0,i=e.length;n<i;n++)t(e[n]);else t(e);return r};this.repaint=function(e,t,n){return ue(e,function(e){B(e,t,n)})},this.revalidate=function(e,t,n){return ue(e,function(e){var i=n?e:r.getId(e);r.updateOffset({elId:i,recalc:!0,timestamp:t});var o=r.getDragManager();o&&o.updateOffsets(i),r.repaint(e)})},this.repaintEverything=function(){var e,t=i();for(e in x)r.updateOffset({elId:e,recalc:!0,timestamp:t});for(e in x)B(e,null,t);return this},this.removeAllEndpoints=function(e,t,n){n=n||[];var i=function(e){var o,s,a=f(e),c=x[a.id];if(c)for(n.push(a),o=0,s=c.length;o<s;o++)r.deleteEndpoint(c[o],!1);if(delete x[a.id],t&&a.el&&3!==a.el.nodeType&&8!==a.el.nodeType)for(o=0,s=a.el.childNodes.length;o<s;o++)i(a.el.childNodes[o])};return i(e),this};var he=function(e,t){r.removeAllEndpoints(e.id,!0,t);for(var n=r.getDragManager(),i=function(e){n&&n.elementRemoved(e.id),r.anchorManager.clearFor(e.id),r.anchorManager.removeFloatingConnection(e.id),r.isSource(e.el)&&r.unmakeSource(e.el),r.isTarget(e.el)&&r.unmakeTarget(e.el),r.destroyDraggable(e.el),r.destroyDroppable(e.el),delete r.floatingConnections[e.id],delete k[e.id],delete C[e.id],e.el&&(r.removeElement(e.el),e.el._jsPlumb=null)},o=1;o<t.length;o++)i(t[o]);i(e)};this.remove=function(e,t){var n=f(e),i=[];return n.text?n.el.parentNode.removeChild(n.el):n.id&&r.batch(function(){he(n,i)},!1===t),r},this.empty=function(e,t){var n=[],i=function(e,t){var r=f(e);if(r.text)r.el.parentNode.removeChild(r.el);else if(r.el){for(;r.el.childNodes.length>0;)i(r.el.childNodes[0]);t||he(r,n)}};return r.batch(function(){i(e,!0)},!1===t),r},this.reset=function(e){r.silently(function(){te=!1,r.removeAllGroups(),r.removeGroupManager(),r.deleteEveryEndpoint(),e||r.unbind(),this.targetEndpointDefinitions={},this.sourceEndpointDefinitions={},w.length=0,this.doReset&&this.doReset()}.bind(this))};var de=function(e){e.canvas&&e.canvas.parentNode&&e.canvas.parentNode.removeChild(e.canvas),e.cleanup(),e.destroy()};this.clear=function(){r.select().each(de),r.selectEndpoints().each(de),x={},_={}},this.setDefaultScope=function(e){return L=e,r},this.setDraggable=function(e,t){return p.each(e,function(e){r.isDragSupported(e)&&(A[r.getAttribute(e,"id")]=t,r.setElementDraggable(e,t))})},this.deriveEndpointAndAnchorSpec=function(e,t){for(var n=((t?"":"default ")+e).split(/[\s]/),i=null,o=null,s=null,a=null,c=0;c<n.length;c++){var l=r.getType(n[c],"connection");l&&(l.endpoints&&(i=l.endpoints),l.endpoint&&(o=l.endpoint),l.anchors&&(a=l.anchors),l.anchor&&(s=l.anchor))}return{endpoints:i||[o,o],anchors:a||[s,s]}},this.setId=function(e,t,i){var r;n.isString(e)?r=e:(e=this.getElement(e),r=this.getId(e));var o=this.getConnections({source:r,scope:"*"},!0),s=this.getConnections({target:r,scope:"*"},!0);t=""+t,i?e=this.getElement(t):(e=this.getElement(r),this.setAttribute(e,"id",t)),x[t]=x[r]||[];for(var a=0,c=x[t].length;a<c;a++)x[t][a].setElementId(t),x[t][a].setReferenceElement(e);delete x[r],this.sourceEndpointDefinitions[t]=this.sourceEndpointDefinitions[r],delete this.sourceEndpointDefinitions[r],this.targetEndpointDefinitions[t]=this.targetEndpointDefinitions[r],delete this.targetEndpointDefinitions[r],this.anchorManager.changeId(r,t);var l=this.getDragManager();l&&l.changeId(r,t),k[t]=k[r],delete k[r];var u=function(n,i,r){for(var o=0,s=n.length;o<s;o++)n[o].endpoints[i].setElementId(t),n[o].endpoints[i].setReferenceElement(e),n[o][r+"Id"]=t,n[o][r]=e};u(o,0,"source"),u(s,1,"target"),this.repaint(t)},this.setDebugLog=function(e){y=e},this.setSuspendDrawing=function(e,t){var n=T;return T=e,D=e?(new Date).getTime():null,t&&this.repaintEverything(),n},this.isSuspendDrawing=function(){return T},this.getSuspendedAt=function(){return D},this.batch=function(e,t){var i=this.isSuspendDrawing();i||this.setSuspendDrawing(!0);try{e()}catch(e){n.log("Function run while suspended failed",e)}i||this.setSuspendDrawing(!1,!t)},this.doWhileSuspended=this.batch,this.getCachedData=function(e){var t=C[e];return t?{o:t,s:F[e]}:re({elId:e})},this.timestamp=i,this.show=function(e,t){return z(e,"block",t),r},this.toggleVisible=function(e,t){var n=null;t&&(n=function(e){var t=e.isVisible();e.setVisible(!t)}),W(e,function(e){var t=e.isVisible();e.setVisible(!t)},n)},this.toggleDraggable=function(e){var t;return p.each(e,function(e){var n=r.getAttribute(e,"id");return t=!(t=null!=A[n]&&A[n]),A[n]=t,r.setDraggable(e,t),t}.bind(this)),t},this.addListener=this.bind;var fe=[];this.registerFloatingConnection=function(e,t,i){fe[e.id]=t,n.addToList(x,e.id,i)},this.getFloatingConnectionFor=function(e){return fe[e]}};n.extend(e.jsPlumbInstance,n.EventGenerator,{setAttribute:function(e,t,n){this.setAttribute(e,t,n)},getAttribute:function(t,n){return this.getAttribute(e.jsPlumb.getElement(t),n)},convertToFullOverlaySpec:function(e){return n.isString(e)&&(e=[e,{}]),e[1].id=e[1].id||n.uuid(),e},registerConnectionType:function(t,n){if(this._connectionTypes[t]=e.jsPlumb.extend({},n),n.overlays){for(var i={},r=0;r<n.overlays.length;r++){var o=this.convertToFullOverlaySpec(n.overlays[r]);i[o[1].id]=o}this._connectionTypes[t].overlays=i}},registerConnectionTypes:function(e){for(var t in e)this.registerConnectionType(t,e[t])},registerEndpointType:function(t,n){if(this._endpointTypes[t]=e.jsPlumb.extend({},n),n.overlays){for(var i={},r=0;r<n.overlays.length;r++){var o=this.convertToFullOverlaySpec(n.overlays[r]);i[o[1].id]=o}this._endpointTypes[t].overlays=i}},registerEndpointTypes:function(e){for(var t in e)this.registerEndpointType(t,e[t])},getType:function(e,t){return"connection"===t?this._connectionTypes[e]:this._endpointTypes[e]},setIdChanged:function(e,t){this.setId(e,t,!0)},setParent:function(e,t){var n=this.getElement(e),i=this.getId(n),r=this.getElement(t),o=this.getId(r),s=this.getDragManager();n.parentNode.removeChild(n),r.appendChild(n),s&&s.setParent(n,i,r,o)},extend:function(e,t,n){var i;if(n)for(i=0;i<n.length;i++)e[n[i]]=t[n[i]];else for(i in t)e[i]=t[i];return e},floatingConnections:{},getFloatingAnchorIndex:function(e){return e.endpoints[0].isFloating()?0:e.endpoints[1].isFloating()?1:-1}}),f.prototype.Defaults={Anchor:"Bottom",Anchors:[null,null],ConnectionsDetachable:!0,ConnectionOverlays:[],Connector:"Bezier",Container:null,DoNotThrowErrors:!1,DragOptions:{},DropOptions:{},Endpoint:"Dot",EndpointOverlays:[],Endpoints:[null,null],EndpointStyle:{fill:"#456"},EndpointStyles:[null,null],EndpointHoverStyle:null,EndpointHoverStyles:[null,null],HoverPaintStyle:null,LabelStyle:{color:"black"},LogEnabled:!1,Overlays:[],MaxConnections:1,PaintStyle:{"stroke-width":4,stroke:"#456"},ReattachConnections:!1,RenderMode:"svg",Scope:"jsPlumb_DefaultScope"};var p=new f;e.jsPlumb=p,p.getInstance=function(e,t){var n=new f(e);if(t)for(var i in t)n[i]=t[i];return n.init(),n},p.each=function(e,t){if(null!=e)if("string"==typeof e)t(p.getElement(e));else if(null!=e.length)for(var n=0;n<e.length;n++)t(p.getElement(e[n]));else t(e)},t.jsPlumb=p}.call("undefined"!=typeof window?window:this),function(){var e=this.jsPlumbUtil,t=function(e,t){if(null==t)return[0,0];var n=s(t),i=o(n,0);return[i[e+"X"],i[e+"Y"]]},n=t.bind(this,"page"),i=t.bind(this,"screen"),r=t.bind(this,"client"),o=function(e,t){return e.item?e.item(t):e[t]},s=function(e){return e.touches&&e.touches.length>0?e.touches:e.changedTouches&&e.changedTouches.length>0?e.changedTouches:e.targetTouches&&e.targetTouches.length>0?e.targetTouches:[e]},a=function(e,t,n){var i;t=null==(i=t)?null:i.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0!==e.className.baseVal?e.className.baseVal=t:e.className=t;try{for(var r=e.classList;r.length>0;)r.remove(r.item(0));for(var o=0;o<n.length;o++)n[o]&&r.add(n[o])}catch(e){console.log("JSPLUMB: cannot set class list",e)}},c=function(e){return void 0===e.className.baseVal?e.className:e.className.baseVal},l=function(t,n,i){n=null==n?[]:e.isArray(n)?n:n.split(/\s+/),i=null==i?[]:e.isArray(i)?i:i.split(/\s+/);var r=c(t).split(/\s+/),o=function(e,t){for(var n=0;n<t.length;n++)if(e)-1===r.indexOf(t[n])&&r.push(t[n]);else{var i=r.indexOf(t[n]);-1!==i&&r.splice(i,1)}};o(!0,n),o(!1,i),a(t,r.join(" "),r)};this.jsPlumb.extend(this.jsPlumbInstance.prototype,{headless:!1,pageLocation:n,screenLocation:i,clientLocation:r,getDragManager:function(){return null==this.dragManager&&(this.dragManager=new function(e){var t={},n=[],i={},r={},o={};this.register=function(s){var a=e.getId(s),c=e.getOffset(s);t[a]||(t[a]=s,n.push(s),i[a]={});var l=function(t){if(t)for(var n=0;n<t.childNodes.length;n++)if(3!==t.childNodes[n].nodeType&&8!==t.childNodes[n].nodeType){var s=jsPlumb.getElement(t.childNodes[n]),u=e.getId(t.childNodes[n],null,!0);if(u&&r[u]&&r[u]>0){var h=e.getOffset(s);i[a][u]={id:u,offset:{left:h.left-c.left,top:h.top-c.top}},o[u]=a}l(t.childNodes[n])}};l(s)},this.updateOffsets=function(t,n){if(null!=t){n=n||{};var r=jsPlumb.getElement(t),s=e.getId(r),a=i[s],c=e.getOffset(r);if(a)for(var l in a)if(a.hasOwnProperty(l)){var u=jsPlumb.getElement(l),h=n[l]||e.getOffset(u);if(null==u.offsetParent&&null!=i[s][l])continue;i[s][l]={id:l,offset:{left:h.left-c.left,top:h.top-c.top}},o[l]=s}}},this.endpointAdded=function(n,s){s=s||e.getId(n);var a=document.body,c=n.parentNode;for(r[s]=r[s]?r[s]+1:1;null!=c&&c!==a;){var l=e.getId(c,null,!0);if(l&&t[l]){var u=e.getOffset(c);if(null==i[l][s]){var h=e.getOffset(n);i[l][s]={id:s,offset:{left:h.left-u.left,top:h.top-u.top}},o[s]=l}break}c=c.parentNode}},this.endpointDeleted=function(e){if(r[e.elementId]&&(r[e.elementId]--,r[e.elementId]<=0))for(var t in i)i.hasOwnProperty(t)&&i[t]&&(delete i[t][e.elementId],delete o[e.elementId])},this.changeId=function(e,t){i[t]=i[e],i[e]={},o[t]=o[e],o[e]=null},this.getElementsForDraggable=function(e){return i[e]},this.elementRemoved=function(e){var t=o[e];t&&(delete i[t][e],delete o[e])},this.reset=function(){t={},n=[],i={},r={}},this.dragEnded=function(t){if(null!=t.offsetParent){var n=e.getId(t),i=o[n];i&&this.updateOffsets(i)}},this.setParent=function(t,n,r,s,a){var c=o[n];i[s]||(i[s]={});var l=e.getOffset(r),u=a||e.getOffset(t);c&&i[c]&&delete i[c][n],i[s][n]={id:n,offset:{left:u.left-l.left,top:u.top-l.top}},o[n]=s},this.clearParent=function(e,t){var n=o[t];n&&(delete i[n][t],delete o[t])},this.revalidateParent=function(t,n,i){var r=o[n];if(r){var s={};s[n]=i,this.updateOffsets(r,s),e.revalidate(r)}},this.getDragAncestor=function(t){var n=jsPlumb.getElement(t),i=e.getId(n),r=o[i];return r?jsPlumb.getElement(r):null}}(this)),this.dragManager},recalculateOffsets:function(e){this.getDragManager().updateOffsets(e)},createElement:function(e,t,n,i){return this.createElementNS(null,e,t,n,i)},createElementNS:function(e,t,n,i,r){var o,s=null==e?document.createElement(t):document.createElementNS(e,t);for(o in n=n||{})s.style[o]=n[o];for(o in i&&(s.className=i),r=r||{})s.setAttribute(o,""+r[o]);return s},getAttribute:function(e,t){return null!=e.getAttribute?e.getAttribute(t):null},setAttribute:function(e,t,n){null!=e.setAttribute&&e.setAttribute(t,n)},setAttributes:function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n])},appendToRoot:function(e){document.body.appendChild(e)},getRenderModes:function(){return["svg"]},getClass:c,addClass:function(e,t){jsPlumb.each(e,function(e){l(e,t)})},hasClass:function(e,t){return(e=jsPlumb.getElement(e)).classList?e.classList.contains(t):-1!==c(e).indexOf(t)},removeClass:function(e,t){jsPlumb.each(e,function(e){l(e,null,t)})},updateClasses:function(e,t,n){jsPlumb.each(e,function(e){l(e,t,n)})},setClass:function(e,t){null!=t&&jsPlumb.each(e,function(e){a(e,t,t.split(/\s+/))})},setPosition:function(e,t){e.style.left=t.left+"px",e.style.top=t.top+"px"},getPosition:function(e){var t=function(t){var n=e.style[t];return n?n.substring(0,n.length-2):0};return{left:t("left"),top:t("top")}},getStyle:function(e,t){return void 0!==window.getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.currentStyle[t]},getSelector:function(e,t){return 1===arguments.length?null!=e.nodeType?e:document.querySelectorAll(e):e.querySelectorAll(t)},getOffset:function(e,t,n){e=jsPlumb.getElement(e),n=n||this.getContainer();for(var i={left:e.offsetLeft,top:e.offsetTop},r=t||null!=n&&e!==n&&e.offsetParent!==n?e.offsetParent:null,o=function(e){null!=e&&e!==document.body&&(e.scrollTop>0||e.scrollLeft>0)&&(i.left-=e.scrollLeft,i.top-=e.scrollTop)}.bind(this);null!=r;)i.left+=r.offsetLeft,i.top+=r.offsetTop,o(r),r=t?r.offsetParent:r.offsetParent===n?null:r.offsetParent;if(null!=n&&!t&&(n.scrollTop>0||n.scrollLeft>0)){var s=null!=e.offsetParent?this.getStyle(e.offsetParent,"position"):"static",a=this.getStyle(e,"position");"absolute"!==a&&"fixed"!==a&&"absolute"!==s&&"fixed"!==s&&(i.left-=n.scrollLeft,i.top-=n.scrollTop)}return i},getPositionOnElement:function(e,t,n){var i=void 0!==t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0,width:0,height:0},r=document.body,o=document.documentElement,s=window.pageYOffset||o.scrollTop||r.scrollTop,a=window.pageXOffset||o.scrollLeft||r.scrollLeft,c=o.clientTop||r.clientTop||0,l=o.clientLeft||r.clientLeft||0,u=i.top+s-c+0*n,h=i.left+a-l+0*n,d=jsPlumb.pageLocation(e),f=i.width||t.offsetWidth*n,p=i.height||t.offsetHeight*n;return[(d[0]-h)/f,(d[1]-u)/p]},getAbsolutePosition:function(e){var t=function(t){var n=e.style[t];if(n)return parseFloat(n.substring(0,n.length-2))};return[t("left"),t("top")]},setAbsolutePosition:function(e,t,n,i){n?this.animate(e,{left:"+="+(t[0]-n[0]),top:"+="+(t[1]-n[1])},i):(e.style.left=t[0]+"px",e.style.top=t[1]+"px")},getSize:function(e){return[e.offsetWidth,e.offsetHeight]},getWidth:function(e){return e.offsetWidth},getHeight:function(e){return e.offsetHeight},getRenderMode:function(){return"svg"}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil;t.OverlayCapableJsPlumbUIComponent=function(t){e.jsPlumbUIComponent.apply(this,arguments),this._jsPlumb.overlays={},this._jsPlumb.overlayPositions={},t.label&&(this.getDefaultType().overlays.__label=["Label",{label:t.label,location:t.labelLocation||this.defaultLabelLocation||.5,labelStyle:t.labelStyle||this._jsPlumb.instance.Defaults.LabelStyle,id:"__label"}]),this.setListenerComponent=function(e){if(this._jsPlumb)for(var t in this._jsPlumb.overlays)this._jsPlumb.overlays[t].setListenerComponent(e)}},t.OverlayCapableJsPlumbUIComponent.applyType=function(e,t){if(t.overlays){var n,i={};for(n in t.overlays){var r=e._jsPlumb.overlays[t.overlays[n][1].id];if(r)r.updateFrom(t.overlays[n][1]),i[t.overlays[n][1].id]=!0;else{var o=e.getCachedTypeItem("overlay",t.overlays[n][1].id);null!=o?(o.reattach(e._jsPlumb.instance,e),o.setVisible(!0),o.updateFrom(t.overlays[n][1]),e._jsPlumb.overlays[o.id]=o):o=e.addOverlay(t.overlays[n],!0),i[o.id]=!0}}for(n in e._jsPlumb.overlays)null==i[e._jsPlumb.overlays[n].id]&&e.removeOverlay(e._jsPlumb.overlays[n].id,!0)}},n.extend(t.OverlayCapableJsPlumbUIComponent,e.jsPlumbUIComponent,{setHover:function(e,t){if(this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged())for(var n in this._jsPlumb.overlays)this._jsPlumb.overlays[n][e?"addClass":"removeClass"](this._jsPlumb.instance.hoverClass)},addOverlay:function(e,i){var r=function(e,i){var r=null;if(n.isArray(i)){var o=i[0],s=t.extend({component:e,_jsPlumb:e._jsPlumb.instance},i[1]);3===i.length&&t.extend(s,i[2]),r=new(t.Overlays[e._jsPlumb.instance.getRenderMode()][o])(s)}else r=i.constructor===String?new(t.Overlays[e._jsPlumb.instance.getRenderMode()][i])({component:e,_jsPlumb:e._jsPlumb.instance}):i;return r.id=r.id||n.uuid(),e.cacheTypeItem("overlay",r,r.id),e._jsPlumb.overlays[r.id]=r,r}(this,e);return i||this.repaint(),r},getOverlay:function(e){return this._jsPlumb.overlays[e]},getOverlays:function(){return this._jsPlumb.overlays},hideOverlay:function(e){var t=this.getOverlay(e);t&&t.hide()},hideOverlays:function(){for(var e in this._jsPlumb.overlays)this._jsPlumb.overlays[e].hide()},showOverlay:function(e){var t=this.getOverlay(e);t&&t.show()},showOverlays:function(){for(var e in this._jsPlumb.overlays)this._jsPlumb.overlays[e].show()},removeAllOverlays:function(e){for(var t in this._jsPlumb.overlays)this._jsPlumb.overlays[t].cleanup&&this._jsPlumb.overlays[t].cleanup();this._jsPlumb.overlays={},this._jsPlumb.overlayPositions=null,e||this.repaint()},removeOverlay:function(e,t){var n=this._jsPlumb.overlays[e];n&&(n.setVisible(!1),!t&&n.cleanup&&n.cleanup(),delete this._jsPlumb.overlays[e],this._jsPlumb.overlayPositions&&delete this._jsPlumb.overlayPositions[e])},removeOverlays:function(){for(var e=0,t=arguments.length;e<t;e++)this.removeOverlay(arguments[e])},moveParent:function(e){if(this.bgCanvas&&(this.bgCanvas.parentNode.removeChild(this.bgCanvas),e.appendChild(this.bgCanvas)),this.canvas&&this.canvas.parentNode)for(var t in this.canvas.parentNode.removeChild(this.canvas),e.appendChild(this.canvas),this._jsPlumb.overlays)if(this._jsPlumb.overlays[t].isAppendedAtTopLevel){var n=this._jsPlumb.overlays[t].getElement();n.parentNode.removeChild(n),e.appendChild(n)}},getLabel:function(){var e=this.getOverlay("__label");return null!=e?e.getLabel():null},getLabelOverlay:function(){return this.getOverlay("__label")},setLabel:function(e){var n=this.getOverlay("__label");n?e.constructor===String||e.constructor===Function?n.setLabel(e):(e.label&&n.setLabel(e.label),e.location&&n.setLocation(e.location)):(n=function(e,n){var i={cssClass:n.cssClass,labelStyle:e.labelStyle,id:"__label",component:e,_jsPlumb:e._jsPlumb.instance},r=t.extend(i,n);return new(t.Overlays[e._jsPlumb.instance.getRenderMode()].Label)(r)}(this,e.constructor===String||e.constructor===Function?{label:e}:e),this._jsPlumb.overlays.__label=n);this._jsPlumb.instance.isSuspendDrawing()||this.repaint()},cleanup:function(e){for(var t in this._jsPlumb.overlays)this._jsPlumb.overlays[t].cleanup(e),this._jsPlumb.overlays[t].destroy(e);e&&(this._jsPlumb.overlays={},this._jsPlumb.overlayPositions=null)},setVisible:function(e){this[e?"showOverlays":"hideOverlays"]()},setAbsoluteOverlayPosition:function(e,t){this._jsPlumb.overlayPositions[e.id]=t},getAbsoluteOverlayPosition:function(e){return this._jsPlumb.overlayPositions?this._jsPlumb.overlayPositions[e.id]:null},_clazzManip:function(e,t,n){if(!n)for(var i in this._jsPlumb.overlays)this._jsPlumb.overlays[i][e+"Class"](t)},addClass:function(e,t){this._clazzManip("add",e,t)},removeClass:function(e,t){this._clazzManip("remove",e,t)}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this.jsPlumb,t=this.jsPlumbUtil,n=["connectorStyle","connectorHoverStyle","connectorOverlays","connector","connectionType","connectorClass","connectorHoverClass"];e.Endpoint=function(i){var r=i._jsPlumb,o=i.newConnection,s=i.newEndpoint;this.idPrefix="_jsplumb_e_",this.defaultLabelLocation=[.5,.5],this.defaultOverlayKeys=["Overlays","EndpointOverlays"],e.OverlayCapableJsPlumbUIComponent.apply(this,arguments),this.appendToDefaultType({connectionType:i.connectionType,maxConnections:null==i.maxConnections?this._jsPlumb.instance.Defaults.MaxConnections:i.maxConnections,paintStyle:i.endpointStyle||i.paintStyle||i.style||this._jsPlumb.instance.Defaults.EndpointStyle||e.Defaults.EndpointStyle,hoverPaintStyle:i.endpointHoverStyle||i.hoverPaintStyle||this._jsPlumb.instance.Defaults.EndpointHoverStyle||e.Defaults.EndpointHoverStyle,connectorStyle:i.connectorStyle,connectorHoverStyle:i.connectorHoverStyle,connectorClass:i.connectorClass,connectorHoverClass:i.connectorHoverClass,connectorOverlays:i.connectorOverlays,connector:i.connector,connectorTooltip:i.connectorTooltip}),this._jsPlumb.enabled=!(!1===i.enabled),this._jsPlumb.visible=!0,this.element=e.getElement(i.source),this._jsPlumb.uuid=i.uuid,this._jsPlumb.floatingEndpoint=null;this._jsPlumb.uuid&&(i.endpointsByUUID[this._jsPlumb.uuid]=this),this.elementId=i.elementId,this.dragProxy=i.dragProxy,this._jsPlumb.connectionCost=i.connectionCost,this._jsPlumb.connectionsDirected=i.connectionsDirected,this._jsPlumb.currentAnchorClass="",this._jsPlumb.events={};var a=!0===i.deleteOnEmpty;this.setDeleteOnEmpty=function(e){a=e};var c=function(){var t=r.endpointAnchorClassPrefix+"-"+this._jsPlumb.currentAnchorClass;this._jsPlumb.currentAnchorClass=this.anchor.getCssClass();var n=r.endpointAnchorClassPrefix+(this._jsPlumb.currentAnchorClass?"-"+this._jsPlumb.currentAnchorClass:"");this.removeClass(t),this.addClass(n),e.updateClasses(this.element,n,t)}.bind(this);this.prepareAnchor=function(e){var t=this._jsPlumb.instance.makeAnchor(e,this.elementId,r);return t.bind("anchorChanged",function(e){this.fire("anchorChanged",{endpoint:this,anchor:e}),c()}.bind(this)),t},this.setPreparedAnchor=function(e,t){return this._jsPlumb.instance.continuousAnchorFactory.clear(this.elementId),this.anchor=e,c(),t||this._jsPlumb.instance.repaint(this.elementId),this},this.setAnchor=function(e,t){var n=this.prepareAnchor(e);return this.setPreparedAnchor(n,t),this};var l=function(e){if(this.connections.length>0)for(var t=0;t<this.connections.length;t++)this.connections[t].setHover(e,!1);else this.setHover(e)}.bind(this);this.bind("mouseover",function(){l(!0)}),this.bind("mouseout",function(){l(!1)}),i._transient||this._jsPlumb.instance.anchorManager.add(this,this.elementId),this.prepareEndpoint=function(n,o){var s,a=function(t,n){var i=r.getRenderMode();if(e.Endpoints[i][t])return new e.Endpoints[i][t](n);if(!r.Defaults.DoNotThrowErrors)throw{msg:"jsPlumb: unknown endpoint type '"+t+"'"}},c={_jsPlumb:this._jsPlumb.instance,cssClass:i.cssClass,container:i.container,tooltip:i.tooltip,connectorTooltip:i.connectorTooltip,endpoint:this};return t.isString(n)?s=a(n,c):t.isArray(n)?(c=t.merge(n[1],c),s=a(n[0],c)):s=n.clone(),s.clone=function(){return t.isString(n)?a(n,c):t.isArray(n)?(c=t.merge(n[1],c),a(n[0],c)):void 0}.bind(this),s.typeId=o,s},this.setEndpoint=function(e,t){var n=this.prepareEndpoint(e);this.setPreparedEndpoint(n,!0)},this.setPreparedEndpoint=function(e,t){null!=this.endpoint&&(this.endpoint.cleanup(),this.endpoint.destroy()),this.endpoint=e,this.type=this.endpoint.type,this.canvas=this.endpoint.canvas},e.extend(this,i,n),this.isSource=i.isSource||!1,this.isTemporarySource=i.isTemporarySource||!1,this.isTarget=i.isTarget||!1,this.connections=i.connections||[],this.connectorPointerEvents=i["connector-pointer-events"],this.scope=i.scope||r.getDefaultScope(),this.timestamp=null,this.reattachConnections=i.reattach||r.Defaults.ReattachConnections,this.connectionsDetachable=r.Defaults.ConnectionsDetachable,!1!==i.connectionsDetachable&&!1!==i.detachable||(this.connectionsDetachable=!1),this.dragAllowedWhenFull=!1!==i.dragAllowedWhenFull,i.onMaxConnections&&this.bind("maxConnections",i.onMaxConnections),this.addConnection=function(e){this.connections.push(e),this[(this.connections.length>0?"add":"remove")+"Class"](r.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](r.endpointFullClass)},this.detachFromConnection=function(e,t,n){(t=null==t?this.connections.indexOf(e):t)>=0&&(this.connections.splice(t,1),this[(this.connections.length>0?"add":"remove")+"Class"](r.endpointConnectedClass),this[(this.isFull()?"add":"remove")+"Class"](r.endpointFullClass)),!n&&a&&0===this.connections.length&&r.deleteObject({endpoint:this,fireEvent:!1,deleteAttachedObjects:!0!==n})},this.deleteEveryConnection=function(e){for(var t=this.connections.length,n=0;n<t;n++)r.deleteConnection(this.connections[0],e)},this.detachFrom=function(e,t,n){for(var i=[],o=0;o<this.connections.length;o++)this.connections[o].endpoints[1]!==e&&this.connections[o].endpoints[0]!==e||i.push(this.connections[o]);for(var s=0,a=i.length;s<a;s++)r.deleteConnection(i[0]);return this},this.getElement=function(){return this.element},this.setElement=function(n){var o=this._jsPlumb.instance.getId(n),s=this.elementId;return t.removeWithFunction(i.endpointsByElement[this.elementId],function(e){return e.id===this.id}.bind(this)),this.element=e.getElement(n),this.elementId=r.getId(this.element),r.anchorManager.rehomeEndpoint(this,s,this.element),r.dragManager.endpointAdded(this.element),t.addToList(i.endpointsByElement,o,this),this},this.makeInPlaceCopy=function(){var e=this.anchor.getCurrentLocation({element:this}),t=this.anchor.getOrientation(this),n=this.anchor.getCssClass(),r={bind:function(){},compute:function(){return[e[0],e[1]]},getCurrentLocation:function(){return[e[0],e[1]]},getOrientation:function(){return t},getCssClass:function(){return n}};return s({dropOptions:i.dropOptions,anchor:r,source:this.element,paintStyle:this.getPaintStyle(),endpoint:i.hideOnDrag?"Blank":this.endpoint,_transient:!0,scope:this.scope,reference:this})},this.connectorSelector=function(){return this.connections[0]},this.setStyle=this.setPaintStyle,this.paint=function(e){var t=(e=e||{}).timestamp,n=!(!1===e.recalc);if(!t||this.timestamp!==t){var i=r.updateOffset({elId:this.elementId,timestamp:t}),o=e.offset?e.offset.o:i.o;if(null!=o){var s=e.anchorPoint,a=e.connectorPaintStyle;if(null==s){var c=e.dimensions||i.s,l={xy:[o.left,o.top],wh:c,element:this,timestamp:t};if(n&&this.anchor.isDynamic&&this.connections.length>0){var u=function(e,t){var n=0;if(null!=t)for(var i=0;i<e.connections.length;i++)if(e.connections[i].sourceId===t||e.connections[i].targetId===t){n=i;break}return e.connections[n]}(this,e.elementWithPrecedence),h=u.endpoints[0]===this?1:0,d=0===h?u.sourceId:u.targetId,f=r.getCachedData(d),p=f.o,g=f.s;l.index=0===h?1:0,l.connection=u,l.txy=[p.left,p.top],l.twh=g,l.tElement=u.endpoints[h]}else this.connections.length>0&&(l.connection=this.connections[0]);s=this.anchor.compute(l)}for(var m in this.endpoint.compute(s,this.anchor.getOrientation(this),this._jsPlumb.paintStyleInUse,a||this.paintStyleInUse),this.endpoint.paint(this._jsPlumb.paintStyleInUse,this.anchor),this.timestamp=t,this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(m)){var v=this._jsPlumb.overlays[m];v.isVisible()&&(this._jsPlumb.overlayPlacements[m]=v.draw(this.endpoint,this._jsPlumb.paintStyleInUse),v.paint(this._jsPlumb.overlayPlacements[m]))}}}},this.getTypeDescriptor=function(){return"endpoint"},this.isVisible=function(){return this._jsPlumb.visible},this.repaint=this.paint;var u=!1;this.initDraggable=function(){if(!u&&e.isDragSupported(this.element)){var n,a={id:null,element:null},c=null,l=!1,h=null,d=function(e,t,n){var i=!1;return{drag:function(){if(i)return i=!1,!0;if(t.element){var r=n.getUIPosition(arguments,n.getZoom());null!=r&&n.setPosition(t.element,r),n.repaint(t.element,r),e.paint({anchorPoint:e.anchor.getCurrentLocation({element:e})})}},stopDrag:function(){i=!0}}}(this,a,r),f=i.dragOptions||{},p=e.dragEvents.start,g=e.dragEvents.stop,m=e.dragEvents.drag,v=e.dragEvents.beforeStart,y=function(t){c=this.connectorSelector();var u=!0;this.isEnabled()||(u=!1),null!=c||this.isSource||this.isTemporarySource||(u=!1),!this.isSource||!this.isFull()||null!=c&&this.dragAllowedWhenFull||(u=!1),null==c||c.isDetachable(this)||(u=!1);var f=r.checkCondition(null==c?"beforeDrag":"beforeStartDetach",{endpoint:this,source:this.element,sourceId:this.elementId,connection:c});if(!1===f?u=!1:"object"==typeof f?e.extend(f,n||{}):f=n||{},!1===u)return r.stopDrag&&r.stopDrag(this.canvas),d.stopDrag(),!1;for(var p=0;p<this.connections.length;p++)this.connections[p].setHover(!1);this.addClass("endpointDrag"),r.setConnectionBeingDragged(!0),c&&!this.isFull()&&this.isSource&&(c=null),r.updateOffset({elId:this.elementId});var g=this._jsPlumb.instance.getOffset(this.canvas),m=this.canvas,v=this._jsPlumb.instance.getSize(this.canvas);!function(e,t,n,i){var r=t.createElement("div",{position:"absolute"});t.appendElement(r);var o=t.getId(r);t.setPosition(r,n),r.style.width=i[0]+"px",r.style.height=i[1]+"px",t.manage(o,r,!0),e.id=o,e.element=r}(a,r,g,v),r.setAttributes(this.canvas,{dragId:a.id,elId:this.elementId});var y=this.dragProxy||this.endpoint;if(null==this.dragProxy&&null!=this.connectionType){var b=this._jsPlumb.instance.deriveEndpointAndAnchorSpec(this.connectionType);b.endpoints[1]&&(y=b.endpoints[1])}var w=this._jsPlumb.instance.makeAnchor("Center");w.isFloating=!0,this._jsPlumb.floatingEndpoint=function(t,n,i,r,o,s,a,c){return a({paintStyle:t,endpoint:i,anchor:new e.FloatingAnchor({reference:n,referenceCanvas:r,jsPlumbInstance:s}),source:o,scope:c})}(this.getPaintStyle(),w,y,this.canvas,a.element,r,s,this.scope);var x=this._jsPlumb.floatingEndpoint.anchor;if(null==c)this.setHover(!1,!1),(c=o({sourceEndpoint:this,targetEndpoint:this._jsPlumb.floatingEndpoint,source:this.element,target:a.element,anchors:[this.anchor,this._jsPlumb.floatingEndpoint.anchor],paintStyle:i.connectorStyle,hoverPaintStyle:i.connectorHoverStyle,connector:i.connector,overlays:i.connectorOverlays,type:this.connectionType,cssClass:this.connectorClass,hoverClass:this.connectorHoverClass,scope:i.scope,data:f})).pending=!0,c.addClass(r.draggingClass),this._jsPlumb.floatingEndpoint.addClass(r.draggingClass),this._jsPlumb.floatingEndpoint.anchor=x,r.fire("connectionDrag",c),r.anchorManager.newConnection(c);else{l=!0,c.setHover(!1);var _=c.endpoints[0].id===this.id?0:1;this.detachFromConnection(c,null,!0);var k=r.getDragScope(m);r.setAttribute(this.canvas,"originalScope",k),r.fire("connectionDrag",c),0===_?(h=[c.source,c.sourceId,m,k],r.anchorManager.sourceChanged(c.endpoints[_].elementId,a.id,c,a.element)):(h=[c.target,c.targetId,m,k],c.target=a.element,c.targetId=a.id,r.anchorManager.updateOtherEndpoint(c.sourceId,c.endpoints[_].elementId,c.targetId,c)),c.suspendedEndpoint=c.endpoints[_],c.suspendedElement=c.endpoints[_].getElement(),c.suspendedElementId=c.endpoints[_].elementId,c.suspendedElementType=0===_?"source":"target",c.suspendedEndpoint.setHover(!1),this._jsPlumb.floatingEndpoint.referenceEndpoint=c.suspendedEndpoint,c.endpoints[_]=this._jsPlumb.floatingEndpoint,c.addClass(r.draggingClass),this._jsPlumb.floatingEndpoint.addClass(r.draggingClass)}r.registerFloatingConnection(a,c,this._jsPlumb.floatingEndpoint),r.currentlyDragging=!0}.bind(this),b=function(){if(r.setConnectionBeingDragged(!1),c&&null!=c.endpoints){var e=r.getDropEvent(arguments),t=r.getFloatingAnchorIndex(c);if(c.endpoints[0===t?1:0].anchor.locked=!1,c.removeClass(r.draggingClass),this._jsPlumb&&(c.deleteConnectionNow||c.endpoints[t]===this._jsPlumb.floatingEndpoint)&&l&&c.suspendedEndpoint){0===t?(c.floatingElement=c.source,c.floatingId=c.sourceId,c.floatingEndpoint=c.endpoints[0],c.floatingIndex=0,c.source=h[0],c.sourceId=h[1]):(c.floatingElement=c.target,c.floatingId=c.targetId,c.floatingEndpoint=c.endpoints[1],c.floatingIndex=1,c.target=h[0],c.targetId=h[1]);var n=this._jsPlumb.floatingEndpoint;r.setDragScope(h[2],h[3]),c.endpoints[t]=c.suspendedEndpoint,c.isReattach()||c._forceReattach||c._forceDetach||!r.deleteConnection(c,{originalEvent:e})?(c.setHover(!1),c._forceDetach=null,c._forceReattach=null,this._jsPlumb.floatingEndpoint.detachFromConnection(c),c.suspendedEndpoint.addConnection(c),1===t?r.anchorManager.updateOtherEndpoint(c.sourceId,c.floatingId,c.targetId,c):r.anchorManager.sourceChanged(c.floatingId,c.sourceId,c,c.source),r.repaint(h[1])):r.deleteObject({endpoint:n})}this.deleteAfterDragStop?r.deleteObject({endpoint:this}):this._jsPlumb&&this.paint({recalc:!1}),r.fire("connectionDragStop",c,e),c.pending&&r.fire("connectionAborted",c,e),r.currentlyDragging=!1,c.suspendedElement=null,c.suspendedEndpoint=null,c=null}a&&a.element&&r.remove(a.element,!1,!1),this._jsPlumb&&(this.canvas.style.visibility="visible",this.anchor.locked=!1,this._jsPlumb.floatingEndpoint=null)}.bind(this);(f=e.extend({},f)).scope=this.scope||f.scope,f[v]=t.wrap(f[v],function(e){n=e.e.payload||{}},!1),f[p]=t.wrap(f[p],y,!1),f[m]=t.wrap(f[m],d.drag),f[g]=t.wrap(f[g],b),f.multipleDrop=!1,f.canDrag=function(){return this.isSource||this.isTemporarySource||this.connections.length>0}.bind(this),r.initDraggable(this.canvas,f,"internal"),this.canvas._jsPlumbRelatedElement=this.element,u=!0}};var h=i.endpoint||this._jsPlumb.instance.Defaults.Endpoint||e.Defaults.Endpoint;this.setEndpoint(h,!0);var d=i.anchor?i.anchor:i.anchors?i.anchors:r.Defaults.Anchor||"Top";this.setAnchor(d,!0);var f=["default",i.type||""].join(" ");this.addType(f,i.data,!0),this.canvas=this.endpoint.canvas,this.canvas._jsPlumb=this,this.initDraggable();var p=function(n,o,s,a){if(e.isDropSupported(this.element)){var c=i.dropOptions||r.Defaults.DropOptions||e.Defaults.DropOptions;(c=e.extend({},c)).scope=c.scope||this.scope;var l=e.dragEvents.drop,u=e.dragEvents.over,h=e.dragEvents.out,d=this,f=r.EndpointDropHandler({getEndpoint:function(){return d},jsPlumb:r,enabled:function(){return null==s||s.isEnabled()},isFull:function(){return s.isFull()},element:this.element,elementId:this.elementId,isSource:this.isSource,isTarget:this.isTarget,addClass:function(e){d.addClass(e)},removeClass:function(e){d.removeClass(e)},isDropAllowed:function(){return d.isDropAllowed.apply(d,arguments)},reference:a,isRedrop:function(e,t){return e.suspendedEndpoint&&t.reference&&e.suspendedEndpoint.id===t.reference.id}});c[l]=t.wrap(c[l],f,!0),c[u]=t.wrap(c[u],function(){var t=e.getDragObject(arguments),n=r.getAttribute(e.getElement(t),"dragId"),i=r.getFloatingConnectionFor(n);if(null!=i){var o=r.getFloatingAnchorIndex(i);if(this.isTarget&&0!==o||i.suspendedEndpoint&&this.referenceEndpoint&&this.referenceEndpoint.id===i.suspendedEndpoint.id){var s=r.checkCondition("checkDropAllowed",{sourceEndpoint:i.endpoints[o],targetEndpoint:this,connection:i});this[(s?"add":"remove")+"Class"](r.endpointDropAllowedClass),this[(s?"remove":"add")+"Class"](r.endpointDropForbiddenClass),i.endpoints[o].anchor.over(this.anchor,this)}}}.bind(this)),c[h]=t.wrap(c[h],function(){var t=e.getDragObject(arguments),n=null==t?null:r.getAttribute(e.getElement(t),"dragId"),i=n?r.getFloatingConnectionFor(n):null;if(null!=i){var o=r.getFloatingAnchorIndex(i);(this.isTarget&&0!==o||i.suspendedEndpoint&&this.referenceEndpoint&&this.referenceEndpoint.id===i.suspendedEndpoint.id)&&(this.removeClass(r.endpointDropAllowedClass),this.removeClass(r.endpointDropForbiddenClass),i.endpoints[o].anchor.out())}}.bind(this)),r.initDroppable(n,c,"internal",o)}}.bind(this);return this.anchor.isFloating||p(this.canvas,!(i._transient||this.anchor.isFloating),this,i.reference),this},t.extend(e.Endpoint,e.OverlayCapableJsPlumbUIComponent,{setVisible:function(e,t,n){if(this._jsPlumb.visible=e,this.canvas&&(this.canvas.style.display=e?"block":"none"),this[e?"showOverlays":"hideOverlays"](),!t)for(var i=0;i<this.connections.length;i++)if(this.connections[i].setVisible(e),!n){var r=this===this.connections[i].endpoints[0]?1:0;1===this.connections[i].endpoints[r].connections.length&&this.connections[i].endpoints[r].setVisible(e,!0,!0)}},getAttachedElements:function(){return this.connections},applyType:function(t,i){this.setPaintStyle(t.endpointStyle||t.paintStyle,i),this.setHoverPaintStyle(t.endpointHoverStyle||t.hoverPaintStyle,i),null!=t.maxConnections&&(this._jsPlumb.maxConnections=t.maxConnections),t.scope&&(this.scope=t.scope),e.extend(this,t,n),null!=t.cssClass&&this.canvas&&this._jsPlumb.instance.addClass(this.canvas,t.cssClass),e.OverlayCapableJsPlumbUIComponent.applyType(this,t)},isEnabled:function(){return this._jsPlumb.enabled},setEnabled:function(e){this._jsPlumb.enabled=e},cleanup:function(){var t=this._jsPlumb.instance.endpointAnchorClassPrefix+(this._jsPlumb.currentAnchorClass?"-"+this._jsPlumb.currentAnchorClass:"");e.removeClass(this.element,t),this.anchor=null,this.endpoint.cleanup(!0),this.endpoint.destroy(),this.endpoint=null,this._jsPlumb.instance.destroyDraggable(this.canvas,"internal"),this._jsPlumb.instance.destroyDroppable(this.canvas,"internal")},setHover:function(e){this.endpoint&&this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged()&&this.endpoint.setHover(e)},isFull:function(){return 0===this._jsPlumb.maxConnections||!(this.isFloating()||this._jsPlumb.maxConnections<0||this.connections.length<this._jsPlumb.maxConnections)},isFloating:function(){return null!=this.anchor&&this.anchor.isFloating},isConnectedTo:function(e){var t=!1;if(e)for(var n=0;n<this.connections.length;n++)if(this.connections[n].endpoints[1]===e||this.connections[n].endpoints[0]===e){t=!0;break}return t},getConnectionCost:function(){return this._jsPlumb.connectionCost},setConnectionCost:function(e){this._jsPlumb.connectionCost=e},areConnectionsDirected:function(){return this._jsPlumb.connectionsDirected},setConnectionsDirected:function(e){this._jsPlumb.connectionsDirected=e},setElementId:function(e){this.elementId=e,this.anchor.elementId=e},setReferenceElement:function(t){this.element=e.getElement(t)},setDragAllowedWhenFull:function(e){this.dragAllowedWhenFull=e},equals:function(e){return this.anchor.equals(e.anchor)},getUuid:function(){return this._jsPlumb.uuid},computeAnchor:function(e){return this.anchor.compute(e)}}),this.jsPlumbInstance.prototype.EndpointDropHandler=function(e){return function(n){var i=e.jsPlumb;e.removeClass(i.endpointDropAllowedClass),e.removeClass(i.endpointDropForbiddenClass);var r=i.getDropEvent(arguments),o=i.getDragObject(arguments),s=i.getAttribute(o,"dragId"),a=(i.getAttribute(o,"elId"),i.getAttribute(o,"originalScope")),c=i.getFloatingConnectionFor(s);if(null!=c){var l=null!=c.suspendedEndpoint;if(!l||null!=c.suspendedEndpoint._jsPlumb){var u=e.getEndpoint(c);if(null!=u){if(e.isRedrop(c,e))return c._forceReattach=!0,c.setHover(!1),void(e.maybeCleanup&&e.maybeCleanup(u));var h=i.getFloatingAnchorIndex(c);if(0===h&&!e.isSource||1===h&&!e.isTarget)e.maybeCleanup&&e.maybeCleanup(u);else{e.onDrop&&e.onDrop(c),a&&i.setDragScope(o,a);var d=e.isFull(n);if(d&&u.fire("maxConnections",{endpoint:this,connection:c,maxConnections:u._jsPlumb.maxConnections},r),!d&&e.enabled()){var f=!0;0===h?(c.floatingElement=c.source,c.floatingId=c.sourceId,c.floatingEndpoint=c.endpoints[0],c.floatingIndex=0,c.source=e.element,c.sourceId=e.elementId):(c.floatingElement=c.target,c.floatingId=c.targetId,c.floatingEndpoint=c.endpoints[1],c.floatingIndex=1,c.target=e.element,c.targetId=e.elementId),l&&c.suspendedEndpoint.id!==u.id&&(c.isDetachAllowed(c)&&c.endpoints[h].isDetachAllowed(c)&&c.suspendedEndpoint.isDetachAllowed(c)&&i.checkCondition("beforeDetach",c)||(f=!1));var p=function(n){c.endpoints[h].detachFromConnection(c),c.suspendedEndpoint&&c.suspendedEndpoint.detachFromConnection(c),c.endpoints[h]=u,u.addConnection(c);var o=u.getParameters();for(var s in o)c.setParameter(s,o[s]);if(l){var a=c.suspendedEndpoint.elementId;i.fireMoveEvent({index:h,originalSourceId:0===h?a:c.sourceId,newSourceId:0===h?u.elementId:c.sourceId,originalTargetId:1===h?a:c.targetId,newTargetId:1===h?u.elementId:c.targetId,originalSourceEndpoint:0===h?c.suspendedEndpoint:c.endpoints[0],newSourceEndpoint:0===h?u:c.endpoints[0],originalTargetEndpoint:1===h?c.suspendedEndpoint:c.endpoints[1],newTargetEndpoint:1===h?u:c.endpoints[1],connection:c},r)}else o.draggable&&i.initDraggable(this.element,e.dragOptions,"internal",i);(1===h?i.anchorManager.updateOtherEndpoint(c.sourceId,c.floatingId,c.targetId,c):i.anchorManager.sourceChanged(c.floatingId,c.sourceId,c,c.source),c.endpoints[0].finalEndpoint)&&(c.endpoints[0].detachFromConnection(c),c.endpoints[0]=c.endpoints[0].finalEndpoint,c.endpoints[0].addConnection(c));t.isObject(n)&&c.mergeData(n),i.finaliseConnection(c,null,r,!1),c.setHover(!1)}.bind(this);if(f=f&&e.isDropAllowed(c.sourceId,c.targetId,c.scope,c,u))return p(f),!0;c.suspendedEndpoint&&(c.endpoints[h]=c.suspendedEndpoint,c.setHover(!1),c._forceDetach=!0,0===h?(c.source=c.suspendedEndpoint.element,c.sourceId=c.suspendedEndpoint.elementId):(c.target=c.suspendedEndpoint.element,c.targetId=c.suspendedEndpoint.elementId),c.suspendedEndpoint.addConnection(c),1===h?i.anchorManager.updateOtherEndpoint(c.sourceId,c.floatingId,c.targetId,c):i.anchorManager.sourceChanged(c.floatingId,c.sourceId,c,c.source),i.repaint(c.sourceId),c._forceDetach=!1)}e.maybeCleanup&&e.maybeCleanup(u),i.currentlyDragging=!1}}}}}}}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i=function(e,n,i,r,o){if(!e.Defaults.DoNotThrowErrors&&null==t.Connectors[n][i])throw{msg:"jsPlumb: unknown connector type '"+i+"'"};return new t.Connectors[n][i](r,o)},r=function(e,t,n){return e?n.makeAnchor(e,t,n):null},o=function(e,t,i,r){null!=t&&(t._jsPlumbConnections=t._jsPlumbConnections||{},r?delete t._jsPlumbConnections[e.id]:t._jsPlumbConnections[e.id]=!0,n.isEmpty(t._jsPlumbConnections)?i.removeClass(t,i.connectedClass):i.addClass(t,i.connectedClass))};t.Connection=function(e){var i=e.newEndpoint;this.id=e.id,this.connector=null,this.idPrefix="_jsplumb_c_",this.defaultLabelLocation=.5,this.defaultOverlayKeys=["Overlays","ConnectionOverlays"],this.previousConnection=e.previousConnection,this.source=t.getElement(e.source),this.target=t.getElement(e.target),t.OverlayCapableJsPlumbUIComponent.apply(this,arguments),e.sourceEndpoint?(this.source=e.sourceEndpoint.getElement(),this.sourceId=e.sourceEndpoint.elementId):this.sourceId=this._jsPlumb.instance.getId(this.source),e.targetEndpoint?(this.target=e.targetEndpoint.getElement(),this.targetId=e.targetEndpoint.elementId):this.targetId=this._jsPlumb.instance.getId(this.target),this.scope=e.scope,this.endpoints=[],this.endpointStyles=[];var r=this._jsPlumb.instance;r.manage(this.sourceId,this.source),r.manage(this.targetId,this.target),this._jsPlumb.visible=!0,this._jsPlumb.editable=!0===e.editable,this._jsPlumb.params={cssClass:e.cssClass,container:e.container,"pointer-events":e["pointer-events"],editorParams:e.editorParams,overlays:e.overlays},this._jsPlumb.lastPaintedAt=null,this.bind("mouseover",function(){this.setHover(!0)}.bind(this)),this.bind("mouseout",function(){this.setHover(!1)}.bind(this)),this.editableRequested=!1!==e.editable,this.setEditable=function(e){return!!this.connector&&this.connector.setEditable(e)},this.isEditable=function(){return!!this.connector&&this.connector.isEditable()},this.isEditing=function(){return!!this.connector&&this.connector.isEditing()},this.makeEndpoint=function(t,n,o,s){return o=o||this._jsPlumb.instance.getId(n),this.prepareEndpoint(r,i,this,s,t?0:1,e,n,o)},e.type&&(e.endpoints=e.endpoints||this._jsPlumb.instance.deriveEndpointAndAnchorSpec(e.type).endpoints);var o=this.makeEndpoint(!0,this.source,this.sourceId,e.sourceEndpoint),s=this.makeEndpoint(!1,this.target,this.targetId,e.targetEndpoint);o&&n.addToList(e.endpointsByElement,this.sourceId,o),s&&n.addToList(e.endpointsByElement,this.targetId,s),this.scope||(this.scope=this.endpoints[0].scope),null!=e.deleteEndpointsOnEmpty&&(this.endpoints[0].setDeleteOnEmpty(e.deleteEndpointsOnEmpty),this.endpoints[1].setDeleteOnEmpty(e.deleteEndpointsOnEmpty));var a=r.Defaults.ConnectionsDetachable;!1===e.detachable&&(a=!1),!1===this.endpoints[0].connectionsDetachable&&(a=!1),!1===this.endpoints[1].connectionsDetachable&&(a=!1);var c=e.reattach||this.endpoints[0].reattachConnections||this.endpoints[1].reattachConnections||r.Defaults.ReattachConnections;this.appendToDefaultType({detachable:a,reattach:c,paintStyle:this.endpoints[0].connectorStyle||this.endpoints[1].connectorStyle||e.paintStyle||r.Defaults.PaintStyle||t.Defaults.PaintStyle,hoverPaintStyle:this.endpoints[0].connectorHoverStyle||this.endpoints[1].connectorHoverStyle||e.hoverPaintStyle||r.Defaults.HoverPaintStyle||t.Defaults.HoverPaintStyle});var l=r.getSuspendedAt();if(!r.isSuspendDrawing()){var u=r.getCachedData(this.sourceId),h=u.o,d=u.s,f=r.getCachedData(this.targetId),p=f.o,g=f.s,m=l||r.timestamp(),v=this.endpoints[0].anchor.compute({xy:[h.left,h.top],wh:d,element:this.endpoints[0],elementId:this.endpoints[0].elementId,txy:[p.left,p.top],twh:g,tElement:this.endpoints[1],timestamp:m});this.endpoints[0].paint({anchorLoc:v,timestamp:m}),v=this.endpoints[1].anchor.compute({xy:[p.left,p.top],wh:g,element:this.endpoints[1],elementId:this.endpoints[1].elementId,txy:[h.left,h.top],twh:d,tElement:this.endpoints[0],timestamp:m}),this.endpoints[1].paint({anchorLoc:v,timestamp:m})}this.getTypeDescriptor=function(){return"connection"},this.getAttachedElements=function(){return this.endpoints},this.isDetachable=function(){return!0===this._jsPlumb.detachable},this.setDetachable=function(e){this._jsPlumb.detachable=!0===e},this.isReattach=function(){return!0===this._jsPlumb.reattach||!0===this.endpoints[0].reattachConnections||!0===this.endpoints[1].reattachConnections},this.setReattach=function(e){this._jsPlumb.reattach=!0===e},this._jsPlumb.cost=e.cost||this.endpoints[0].getConnectionCost(),this._jsPlumb.directed=e.directed,null==e.directed&&(this._jsPlumb.directed=this.endpoints[0].areConnectionsDirected());var y=t.extend({},this.endpoints[1].getParameters());t.extend(y,this.endpoints[0].getParameters()),t.extend(y,this.getParameters()),this.setParameters(y),this.setConnector(this.endpoints[0].connector||this.endpoints[1].connector||e.connector||r.Defaults.Connector||t.Defaults.Connector,!0),e.geometry&&this.connector.setGeometry(e.geometry);var b=null!=e.data&&n.isObject(e.data)?e.data:{};this.getData=function(){return b},this.setData=function(e){b=e||{}},this.mergeData=function(e){b=t.extend(b,e)};var w=["default",this.endpoints[0].connectionType,this.endpoints[1].connectionType,e.type].join(" ");/[^\s]/.test(w)&&this.addType(w,e.data,!0),this.updateConnectedClass()},n.extend(t.Connection,t.OverlayCapableJsPlumbUIComponent,{applyType:function(e,n,i){var r=null;null!=e.connector&&(null==(r=this.getCachedTypeItem("connector",i.connector))&&(r=this.prepareConnector(e.connector,i.connector),this.cacheTypeItem("connector",r,i.connector)),this.setPreparedConnector(r)),null!=e.detachable&&this.setDetachable(e.detachable),null!=e.reattach&&this.setReattach(e.reattach),e.scope&&(this.scope=e.scope),null!=e.cssClass&&this.canvas&&this._jsPlumb.instance.addClass(this.canvas,e.cssClass);var o=null;e.anchor?null==(o=this.getCachedTypeItem("anchors",i.anchor))&&(o=[this._jsPlumb.instance.makeAnchor(e.anchor),this._jsPlumb.instance.makeAnchor(e.anchor)],this.cacheTypeItem("anchors",o,i.anchor)):e.anchors&&null==(o=this.getCachedTypeItem("anchors",i.anchors))&&(o=[this._jsPlumb.instance.makeAnchor(e.anchors[0]),this._jsPlumb.instance.makeAnchor(e.anchors[1])],this.cacheTypeItem("anchors",o,i.anchors)),null!=o&&(this.endpoints[0].anchor=o[0],this.endpoints[1].anchor=o[1],this.endpoints[1].anchor.isDynamic&&this._jsPlumb.instance.repaint(this.endpoints[1].elementId)),t.OverlayCapableJsPlumbUIComponent.applyType(this,e)},addClass:function(e,t){t&&(this.endpoints[0].addClass(e),this.endpoints[1].addClass(e),this.suspendedEndpoint&&this.suspendedEndpoint.addClass(e)),this.connector&&this.connector.addClass(e)},removeClass:function(e,t){t&&(this.endpoints[0].removeClass(e),this.endpoints[1].removeClass(e),this.suspendedEndpoint&&this.suspendedEndpoint.removeClass(e)),this.connector&&this.connector.removeClass(e)},isVisible:function(){return this._jsPlumb.visible},setVisible:function(e){this._jsPlumb.visible=e,this.connector&&this.connector.setVisible(e),this.repaint()},cleanup:function(){this.updateConnectedClass(!0),this.endpoints=null,this.source=null,this.target=null,null!=this.connector&&(this.connector.cleanup(!0),this.connector.destroy(!0)),this.connector=null},updateConnectedClass:function(e){this._jsPlumb&&(o(this,this.source,this._jsPlumb.instance,e),o(this,this.target,this._jsPlumb.instance,e))},setHover:function(t){this.connector&&this._jsPlumb&&!this._jsPlumb.instance.isConnectionBeingDragged()&&(this.connector.setHover(t),e.jsPlumb[t?"addClass":"removeClass"](this.source,this._jsPlumb.instance.hoverSourceClass),e.jsPlumb[t?"addClass":"removeClass"](this.target,this._jsPlumb.instance.hoverTargetClass))},getUuids:function(){return[this.endpoints[0].getUuid(),this.endpoints[1].getUuid()]},getCost:function(){return this._jsPlumb?this._jsPlumb.cost:-1/0},setCost:function(e){this._jsPlumb.cost=e},isDirected:function(){return this._jsPlumb.directed},getConnector:function(){return this.connector},getGeometry:function(){return this.connector?this.connector.getGeometry():null},setGeometry:function(e){this.connector&&this.connector.setGeometry(e)},prepareConnector:function(e,t){var r,o={_jsPlumb:this._jsPlumb.instance,cssClass:(this._jsPlumb.params.cssClass||"")+(this.isEditable()?this._jsPlumb.instance.editableConnectorClass:""),container:this._jsPlumb.params.container,"pointer-events":this._jsPlumb.params["pointer-events"],editable:this.editableRequested},s=this._jsPlumb.instance.getRenderMode();return n.isString(e)?r=i(this._jsPlumb.instance,s,e,o,this):n.isArray(e)&&(r=1===e.length?i(this._jsPlumb.instance,s,e[0],o,this):i(this._jsPlumb.instance,s,e[0],n.merge(e[1],o),this)),null!=t&&(r.typeId=t),r},setPreparedConnector:function(e,t,n,i){if(this.connector!==e){var r,o="";if(null!=this.connector&&(o=(r=this.connector).getClass(),this.connector.cleanup(),this.connector.destroy()),this.connector=e,i&&this.cacheTypeItem("connector",e,i),this.canvas=this.connector.canvas,this.bgCanvas=this.connector.bgCanvas,this.addClass(o),this.canvas&&(this.canvas._jsPlumb=this),this.bgCanvas&&(this.bgCanvas._jsPlumb=this),null!=r)for(var s=this.getOverlays(),a=0;a<s.length;a++)s[a].transfer&&s[a].transfer(this.connector);n||this.setListenerComponent(this.connector),t||this.repaint()}},setConnector:function(e,t,n,i){var r=this.prepareConnector(e,i);this.setPreparedConnector(r,t,n,i)},paint:function(e){if(!this._jsPlumb.instance.isSuspendDrawing()&&this._jsPlumb.visible){var t=(e=e||{}).timestamp,n=this.targetId,i=this.sourceId;if(null==t||t!==this._jsPlumb.lastPaintedAt){var r=this._jsPlumb.instance.updateOffset({elId:i}).o,o=this._jsPlumb.instance.updateOffset({elId:n}).o,s=this.endpoints[0],a=this.endpoints[1],c=s.anchor.getCurrentLocation({xy:[r.left,r.top],wh:[r.width,r.height],element:s,timestamp:t}),l=a.anchor.getCurrentLocation({xy:[o.left,o.top],wh:[o.width,o.height],element:a,timestamp:t});this.connector.resetBounds(),this.connector.compute({sourcePos:c,targetPos:l,sourceEndpoint:this.endpoints[0],targetEndpoint:this.endpoints[1],"stroke-width":this._jsPlumb.paintStyleInUse.strokeWidth,sourceInfo:r,targetInfo:o});var u={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};for(var h in this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(h)){var d=this._jsPlumb.overlays[h];d.isVisible()&&(this._jsPlumb.overlayPlacements[h]=d.draw(this.connector,this._jsPlumb.paintStyleInUse,this.getAbsoluteOverlayPosition(d)),u.minX=Math.min(u.minX,this._jsPlumb.overlayPlacements[h].minX),u.maxX=Math.max(u.maxX,this._jsPlumb.overlayPlacements[h].maxX),u.minY=Math.min(u.minY,this._jsPlumb.overlayPlacements[h].minY),u.maxY=Math.max(u.maxY,this._jsPlumb.overlayPlacements[h].maxY))}var f=parseFloat(this._jsPlumb.paintStyleInUse.strokeWidth||1)/2,p=parseFloat(this._jsPlumb.paintStyleInUse.strokeWidth||0),g={xmin:Math.min(this.connector.bounds.minX-(f+p),u.minX),ymin:Math.min(this.connector.bounds.minY-(f+p),u.minY),xmax:Math.max(this.connector.bounds.maxX+(f+p),u.maxX),ymax:Math.max(this.connector.bounds.maxY+(f+p),u.maxY)};for(var m in this.connector.paint(this._jsPlumb.paintStyleInUse,null,g),this._jsPlumb.overlays)if(this._jsPlumb.overlays.hasOwnProperty(m)){var v=this._jsPlumb.overlays[m];v.isVisible()&&v.paint(this._jsPlumb.overlayPlacements[m],g)}}this._jsPlumb.lastPaintedAt=t}},repaint:function(e){e=e||{},this.paint({elId:this.sourceId,recalc:!(!1===e.recalc),timestamp:e.timestamp})},prepareEndpoint:function(e,n,i,o,s,a,c,l){var u;if(o)i.endpoints[s]=o,o.addConnection(i);else{a.endpoints||(a.endpoints=[null,null]);var h=a.endpoints[s]||a.endpoint||e.Defaults.Endpoints[s]||t.Defaults.Endpoints[s]||e.Defaults.Endpoint||t.Defaults.Endpoint;a.endpointStyles||(a.endpointStyles=[null,null]),a.endpointHoverStyles||(a.endpointHoverStyles=[null,null]);var d=a.endpointStyles[s]||a.endpointStyle||e.Defaults.EndpointStyles[s]||t.Defaults.EndpointStyles[s]||e.Defaults.EndpointStyle||t.Defaults.EndpointStyle;null==d.fill&&null!=a.paintStyle&&(d.fill=a.paintStyle.stroke),null==d.outlineStroke&&null!=a.paintStyle&&(d.outlineStroke=a.paintStyle.outlineStroke),null==d.outlineWidth&&null!=a.paintStyle&&(d.outlineWidth=a.paintStyle.outlineWidth);var f=a.endpointHoverStyles[s]||a.endpointHoverStyle||e.Defaults.EndpointHoverStyles[s]||t.Defaults.EndpointHoverStyles[s]||e.Defaults.EndpointHoverStyle||t.Defaults.EndpointHoverStyle;null!=a.hoverPaintStyle&&(null==f&&(f={}),null==f.fill&&(f.fill=a.hoverPaintStyle.stroke));var p=a.anchors?a.anchors[s]:a.anchor?a.anchor:r(e.Defaults.Anchors[s],l,e)||r(t.Defaults.Anchors[s],l,e)||r(e.Defaults.Anchor,l,e)||r(t.Defaults.Anchor,l,e);u=n({paintStyle:d,hoverPaintStyle:f,endpoint:h,connections:[i],uuid:a.uuids?a.uuids[s]:null,anchor:p,source:c,scope:a.scope,reattach:a.reattach||e.Defaults.ReattachConnections,detachable:a.detachable||e.Defaults.ConnectionsDetachable}),null==o&&u.setDeleteOnEmpty(!0),i.endpoints[s]=u,!1===a.drawEndpoints&&u.setVisible(!1,!0,!0)}return u}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this.jsPlumbUtil,t=this.jsPlumb;t.AnchorManager=function(n){var i={},r={},o={},s={},a="identity",c=["left","top","right","bottom"],l={},u=this,h={},d=n.jsPlumbInstance,f={},p=function(e,t,n,i,r,o){if(e===t)return{orientation:a,a:["top","top"]};var s=Math.atan2(i.centery-n.centery,i.centerx-n.centerx),l=Math.atan2(n.centery-i.centery,n.centerx-i.centerx),u=[],h={};!function(e,t){for(var n=0;n<e.length;n++)h[e[n]]={left:[t[n].left,t[n].centery],right:[t[n].right,t[n].centery],top:[t[n].centerx,t[n].top],bottom:[t[n].centerx,t[n].bottom]}}(["source","target"],[n,i]);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)u.push({source:c[d],target:c[f],dist:Biltong.lineLength(h.source[c[d]],h.target[c[f]])});u.sort(function(e,t){return e.dist<t.dist?-1:e.dist>t.dist?1:0});for(var p=u[0].source,g=u[0].target,m=0;m<u.length&&(p=!r.isContinuous||r.isEdgeSupported(u[m].source)?u[m].source:null,g=!o.isContinuous||o.isEdgeSupported(u[m].target)?u[m].target:null,null==p||null==g);m++);return r.isContinuous&&r.setCurrentFace(p),o.isContinuous&&o.setCurrentFace(g),{a:[p,g],theta:s,theta2:l}},g=function(e){return function(t,n){return!1===(e?t[0][0]<n[0][0]:t[0][0]>n[0][0])?-1:1}},m={top:function(e,t){return e[0]>t[0]?1:-1},right:g(!0),bottom:g(!0),left:function(e,t){return(e[0][0]<0?-Math.PI-e[0][0]:Math.PI-e[0][0])>(t[0][0]<0?-Math.PI-t[0][0]:Math.PI-t[0][0])?1:-1}},v=function(e,t){var n=d.getCachedData(e),i=n.s,o=n.o,a=function(t,n,i,o,a,c,l){if(o.length>0)for(var u=function(e,t,n,i,r,o,s){for(var a=[],c=t[r?0:1]/(i.length+1),l=0;l<i.length;l++){var u=(l+1)*c,h=o*t[r?1:0];s&&(u=t[r?0:1]-u);var d=r?u:h,f=n[0]+d,p=d/t[0],g=r?h:u,m=n[1]+g,v=g/t[1];a.push([f,m,p,v,i[l][1],i[l][2]])}return a}(0,n,i,(v=m[t],o.sort(v)),a,c,"right"===t||"top"===t),h=function(e,t){r[e.id]=[t[0],t[1],t[2],t[3]],s[e.id]=l},d=0;d<u.length;d++){var f=u[d][4],p=f.endpoints[0].elementId===e,g=f.endpoints[1].elementId===e;p&&h(f.endpoints[0],u[d]),g&&h(f.endpoints[1],u[d])}var v};a("bottom",i,[o.left,o.top],t.bottom,!0,1,[0,1]),a("top",i,[o.left,o.top],t.top,!0,0,[0,-1]),a("left",i,[o.left,o.top],t.left,!1,0,[-1,0]),a("right",i,[o.left,o.top],t.right,!1,1,[1,0])};this.reset=function(){i={},l={},h={}},this.addFloatingConnection=function(e,t){f[e]=t},this.removeFloatingConnection=function(e){delete f[e]},this.newConnection=function(n){var i=n.sourceId,r=n.targetId,o=n.endpoints,s=!0,a=function(a,c,u,h,d){i===r&&u.isContinuous&&(n._jsPlumb.instance.removeElement(o[1].canvas),s=!1),e.addToList(l,h,[d,c,u.constructor===t.DynamicAnchor])};a(0,o[0],o[0].anchor,r,n),s&&a(0,o[1],o[1].anchor,i,n)};var y=function(t){!function(t,n){if(t){var i=function(e){return e[4]===n};e.removeWithFunction(t.top,i),e.removeWithFunction(t.left,i),e.removeWithFunction(t.bottom,i),e.removeWithFunction(t.right,i)}}(h[t.elementId],t.id)};this.connectionDetached=function(t,n){var i=t.connection||t,r=t.sourceId,o=t.targetId,s=i.endpoints,a=function(t,n,i,r,o){e.removeWithFunction(l[r],function(e){return e[0].id===o.id})};a(0,s[1],s[1].anchor,r,i),a(0,s[0],s[0].anchor,o,i),i.floatingId&&(a(i.floatingIndex,i.floatingEndpoint,i.floatingEndpoint.anchor,i.floatingId,i),y(i.floatingEndpoint)),y(i.endpoints[0]),y(i.endpoints[1]),n||(u.redraw(i.sourceId),i.targetId!==i.sourceId&&u.redraw(i.targetId))},this.add=function(t,n){e.addToList(i,n,t)},this.changeId=function(e,t){l[t]=l[e],i[t]=i[e],delete l[e],delete i[e]},this.getConnectionsFor=function(e){return l[e]||[]},this.getEndpointsFor=function(e){return i[e]||[]},this.deleteEndpoint=function(t){e.removeWithFunction(i[t.elementId],function(e){return e.id===t.id}),y(t)},this.clearFor=function(e){delete i[e],i[e]=[]};var b=function(t,i,r,o,s,a,c,l,u,h,d,f){var p,g,m=-1,v=o.endpoints[c],y=v.id,b=[1,0][c],w=[[i,r],o,s,a,y],x=t[u],_=v._continuousAnchorEdge?t[v._continuousAnchorEdge]:null;if(_){var k=e.findWithFunction(_,function(e){return e[4]===y});if(-1!==k)for(_.splice(k,1),p=0;p<_.length;p++)g=_[p][1],e.addWithFunction(d,g,function(e){return e.id===g.id}),e.addWithFunction(f,_[p][1].endpoints[c],function(e){return e.id===g.endpoints[c].id}),e.addWithFunction(f,_[p][1].endpoints[b],function(e){return e.id===g.endpoints[b].id})}for(p=0;p<x.length;p++)g=x[p][1],1===n.idx&&x[p][3]===a&&-1===m&&(m=p),e.addWithFunction(d,g,function(e){return e.id===g.id}),e.addWithFunction(f,x[p][1].endpoints[c],function(e){return e.id===g.endpoints[c].id}),e.addWithFunction(f,x[p][1].endpoints[b],function(e){return e.id===g.endpoints[b].id});var C=l?-1!==m?m:0:x.length;x.splice(C,0,w),v._continuousAnchorEdge=u};this.updateOtherEndpoint=function(n,i,r,o){var s=e.findWithFunction(l[n],function(e){return e[0].id===o.id}),a=e.findWithFunction(l[i],function(e){return e[0].id===o.id});-1!==s&&(l[n][s][0]=o,l[n][s][1]=o.endpoints[1],l[n][s][2]=o.endpoints[1].anchor.constructor===t.DynamicAnchor),a>-1&&(l[i].splice(a,1),e.addToList(l,r,[o,o.endpoints[0],o.endpoints[0].anchor.constructor===t.DynamicAnchor])),o.updateConnectedClass()},this.sourceChanged=function(n,i,r,o){if(n!==i){r.sourceId=i,r.source=o,e.removeWithFunction(l[n],function(e){return e[0].id===r.id});var s=e.findWithFunction(l[r.targetId],function(e){return e[0].id===r.id});s>-1&&(l[r.targetId][s][0]=r,l[r.targetId][s][1]=r.endpoints[0],l[r.targetId][s][2]=r.endpoints[0].anchor.constructor===t.DynamicAnchor),e.addToList(l,i,[r,r.endpoints[1],r.endpoints[1].anchor.constructor===t.DynamicAnchor]),r.endpoints[1].anchor.isContinuous&&(r.source===r.target?r._jsPlumb.instance.removeElement(r.endpoints[1].canvas):null==r.endpoints[1].canvas.parentNode&&r._jsPlumb.instance.appendElement(r.endpoints[1].canvas)),r.updateConnectedClass()}},this.rehomeEndpoint=function(e,t,n){var r=i[t]||[],o=d.getId(n);if(o!==t){var s=r.indexOf(e);if(s>-1){var a=r.splice(s,1)[0];u.add(a,o)}}for(var c=0;c<e.connections.length;c++)e.connections[c].sourceId===t?u.sourceChanged(t,e.elementId,e.connections[c],e.element):e.connections[c].targetId===t&&(e.connections[c].targetId=e.elementId,e.connections[c].target=e.element,u.updateOtherEndpoint(e.connections[c].sourceId,t,e.elementId,e.connections[c]))},this.redraw=function(n,r,o,s,a,c){if(!d.isSuspendDrawing()){var u=i[n]||[],g=l[n]||[],m=[],y=[],w=[];o=o||d.timestamp(),s=s||{left:0,top:0},r&&(r={left:r.left+s.left,top:r.top+s.top});for(var x=d.updateOffset({elId:n,offset:r,recalc:!1,timestamp:o}),_={},k=0;k<g.length;k++){var C=g[k][0],E=C.sourceId,A=C.targetId,S=C.endpoints[0].anchor.isContinuous,F=C.endpoints[1].anchor.isContinuous;if(S||F){var T=E+"_"+A,D=_[T],L=C.sourceId===n?1:0;S&&!h[E]&&(h[E]={top:[],right:[],bottom:[],left:[]}),F&&!h[A]&&(h[A]={top:[],right:[],bottom:[],left:[]}),n!==A&&d.updateOffset({elId:A,timestamp:o}),n!==E&&d.updateOffset({elId:E,timestamp:o});var P=d.getCachedData(A),R=d.getCachedData(E);A===E&&(S||F)?(b(h[E],-Math.PI/2,0,C,!1,A,0,!1,"top",0,m,y),b(h[A],-Math.PI/2,0,C,!1,E,1,!1,"top",0,m,y)):(D||(D=p(E,A,R.o,P.o,C.endpoints[0].anchor,C.endpoints[1].anchor),_[T]=D),S&&b(h[E],D.theta,0,C,!1,A,0,!1,D.a[0],0,m,y),F&&b(h[A],D.theta2,-1,C,!0,E,1,!0,D.a[1],0,m,y)),S&&e.addWithFunction(w,E,function(e){return e===E}),F&&e.addWithFunction(w,A,function(e){return e===A}),e.addWithFunction(m,C,function(e){return e.id===C.id}),(S&&0===L||F&&1===L)&&e.addWithFunction(y,C.endpoints[L],function(e){return e.id===C.endpoints[L].id})}}for(k=0;k<u.length;k++)0===u[k].connections.length&&u[k].anchor.isContinuous&&(h[n]||(h[n]={top:[],right:[],bottom:[],left:[]}),b(h[n],-Math.PI/2,0,{endpoints:[u[k],u[k]],paint:function(){}},!1,n,0,!1,u[k].anchor.getDefaultFace(),0,m,y),e.addWithFunction(w,n,function(e){return e===n}));for(k=0;k<w.length;k++)v(w[k],h[w[k]]);for(k=0;k<u.length;k++)u[k].paint({timestamp:o,offset:x,dimensions:x.s,recalc:!0!==c});for(k=0;k<y.length;k++){var M=d.getCachedData(y[k].elementId);y[k].paint({timestamp:o,offset:M,dimensions:M.s})}for(k=0;k<g.length;k++){var B=g[k][1];if(B.anchor.constructor===t.DynamicAnchor){B.paint({elementWithPrecedence:n,timestamp:o}),e.addWithFunction(m,g[k][0],function(e){return e.id===g[k][0].id});for(var O=0;O<B.connections.length;O++)B.connections[O]!==g[k][0]&&e.addWithFunction(m,B.connections[O],function(e){return e.id===B.connections[O].id})}else e.addWithFunction(m,g[k][0],function(e){return e.id===g[k][0].id})}var j=f[n];for(j&&j.paint({timestamp:o,recalc:!1,elId:n}),k=0;k<m.length;k++)m[k].paint({elId:n,timestamp:o,recalc:!1,clearEdits:a})}};d.continuousAnchorFactory={get:function(t){return new function(t){e.EventGenerator.apply(this),this.type="Continuous",this.isDynamic=!0,this.isContinuous=!0;for(var n=t.faces||["top","right","bottom","left"],i=!(!1===t.clockwise),a={},c={top:"bottom",right:"left",left:"right",bottom:"top"},l={top:"right",right:"bottom",left:"top",bottom:"left"},u={top:"left",right:"top",left:"bottom",bottom:"right"},h=i?l:u,d=i?u:l,f=t.cssClass||"",p=null,g=null,m=["left","right"],v=["top","bottom"],y=null,b=0;b<n.length;b++)a[n[b]]=!0;this.getDefaultFace=function(){return 0===n.length?"top":n[0]},this.verifyEdge=function(e){return a[e]?e:a[c[e]]?c[e]:a[h[e]]?h[e]:a[d[e]]?d[e]:e},this.isEdgeSupported=function(e){return null==y?null==g?!0===a[e]:g===e:-1!==y.indexOf(e)},this.setCurrentFace=function(e){p=e},this.getCurrentFace=function(){return p},this.lockCurrentFace=function(){g=p},this.unlockCurrentFace=function(){g=null},this.lockCurrentAxis=function(){null!=p&&(y="left"===p||"right"===p?m:v)},this.unlockCurrentAxis=function(){y=null},this.compute=function(e){return o[e.element.id]||r[e.element.id]||[0,0]},this.getCurrentLocation=function(e){return o[e.element.id]||r[e.element.id]||[0,0]},this.getOrientation=function(e){return s[e.id]||[0,0]},this.clearUserDefinedLocation=function(){delete o[t.elementId]},this.setUserDefinedLocation=function(e){o[t.elementId]=e},this.getCssClass=function(){return f}}(t)},clear:function(e){delete o[e],delete r[e]}}},t.Anchor=function(t){this.x=t.x||0,this.y=t.y||0,this.elementId=t.elementId,this.cssClass=t.cssClass||"",this.userDefinedLocation=null,this.orientation=t.orientation||[0,0],this.lastReturnValue=null,this.offsets=t.offsets||[0,0],this.timestamp=null,e.EventGenerator.apply(this),this.compute=function(e){var t=e.xy,n=e.wh,i=e.timestamp;return e.clearUserDefinedLocation&&(this.userDefinedLocation=null),i&&i===this.timestamp?this.lastReturnValue:(null!=this.userDefinedLocation?this.lastReturnValue=this.userDefinedLocation:this.lastReturnValue=[t[0]+this.x*n[0]+this.offsets[0],t[1]+this.y*n[1]+this.offsets[1]],this.timestamp=i,this.lastReturnValue)},this.getCurrentLocation=function(e){return e=e||{},null==this.lastReturnValue||null!=e.timestamp&&this.timestamp!==e.timestamp?this.compute(e):this.lastReturnValue}},e.extend(t.Anchor,e.EventGenerator,{equals:function(e){if(!e)return!1;var t=e.getOrientation(),n=this.getOrientation();return this.x===e.x&&this.y===e.y&&this.offsets[0]===e.offsets[0]&&this.offsets[1]===e.offsets[1]&&n[0]===t[0]&&n[1]===t[1]},getUserDefinedLocation:function(){return this.userDefinedLocation},setUserDefinedLocation:function(e){this.userDefinedLocation=e},clearUserDefinedLocation:function(){this.userDefinedLocation=null},getOrientation:function(){return this.orientation},getCssClass:function(){return this.cssClass}}),t.FloatingAnchor=function(e){t.Anchor.apply(this,arguments);var n=e.reference,i=e.referenceCanvas,r=t.getSize(i),o=null,s=null;this.orientation=null,this.x=0,this.y=0,this.isFloating=!0,this.compute=function(e){var t=e.xy,n=[t[0]+r[0]/2,t[1]+r[1]/2];return s=n,n},this.getOrientation=function(e){if(o)return o;var t=n.getOrientation(e);return[0*Math.abs(t[0])*-1,0*Math.abs(t[1])*-1]},this.over=function(e,t){o=e.getOrientation(t)},this.out=function(){o=null},this.getCurrentLocation=function(e){return null==s?this.compute(e):s}},e.extend(t.FloatingAnchor,t.Anchor);t.DynamicAnchor=function(e){t.Anchor.apply(this,arguments),this.isDynamic=!0,this.anchors=[],this.elementId=e.elementId,this.jsPlumbInstance=e.jsPlumbInstance;for(var n=0;n<e.anchors.length;n++)this.anchors[n]=(i=e.anchors[n],r=this.jsPlumbInstance,o=this.elementId,i.constructor===t.Anchor?i:r.makeAnchor(i,o,r));var i,r,o;this.getAnchors=function(){return this.anchors},this.locked=!1;var s=this.anchors.length>0?this.anchors[0]:null,a=s,c=this,l=function(e,t,n,i,r){var o=i[0]+e.x*r[0],s=i[1]+e.y*r[1],a=i[0]+r[0]/2,c=i[1]+r[1]/2;return Math.sqrt(Math.pow(t-o,2)+Math.pow(n-s,2))+Math.sqrt(Math.pow(a-o,2)+Math.pow(c-s,2))},u=e.selector||function(e,t,n,i,r){for(var o=n[0]+i[0]/2,s=n[1]+i[1]/2,a=-1,c=1/0,u=0;u<r.length;u++){var h=l(r[u],o,s,e,t);h<c&&(a=u+0,c=h)}return r[a]};this.compute=function(e){var t=e.xy,n=e.wh,i=e.txy,r=e.twh;this.timestamp=e.timestamp;var o=c.getUserDefinedLocation();return null!=o?o:this.locked||null==i||null==r?s.compute(e):(e.timestamp=null,s=u(t,n,i,r,this.anchors),this.x=s.x,this.y=s.y,s!==a&&this.fire("anchorChanged",s),a=s,s.compute(e))},this.getCurrentLocation=function(e){return this.getUserDefinedLocation()||(null!=s?s.getCurrentLocation(e):null)},this.getOrientation=function(e){return null!=s?s.getOrientation(e):[0,0]},this.over=function(e,t){null!=s&&s.over(e,t)},this.out=function(){null!=s&&s.out()},this.getCssClass=function(){return s&&s.getCssClass()||""}},e.extend(t.DynamicAnchor,t.Anchor);var n=function(e,n,i,r,o,s){t.Anchors[o]=function(t){var a=t.jsPlumbInstance.makeAnchor([e,n,i,r,0,0],t.elementId,t.jsPlumbInstance);return a.type=o,s&&s(a,t),a}};n(.5,0,0,-1,"TopCenter"),n(.5,1,0,1,"BottomCenter"),n(0,.5,-1,0,"LeftMiddle"),n(1,.5,1,0,"RightMiddle"),n(.5,0,0,-1,"Top"),n(.5,1,0,1,"Bottom"),n(0,.5,-1,0,"Left"),n(1,.5,1,0,"Right"),n(.5,.5,0,0,"Center"),n(1,0,0,-1,"TopRight"),n(1,1,0,1,"BottomRight"),n(0,0,0,-1,"TopLeft"),n(0,1,0,1,"BottomLeft"),t.Defaults.DynamicAnchors=function(e){return e.jsPlumbInstance.makeAnchors(["TopCenter","RightMiddle","BottomCenter","LeftMiddle"],e.elementId,e.jsPlumbInstance)},t.Anchors.AutoDefault=function(e){var n=e.jsPlumbInstance.makeDynamicAnchor(t.Defaults.DynamicAnchors(e));return n.type="AutoDefault",n};var i=function(e,n){t.Anchors[e]=function(t){var i=t.jsPlumbInstance.makeAnchor(["Continuous",{faces:n}],t.elementId,t.jsPlumbInstance);return i.type=e,i}};t.Anchors.Continuous=function(e){return e.jsPlumbInstance.continuousAnchorFactory.get(e)},i("ContinuousLeft",["left"]),i("ContinuousTop",["top"]),i("ContinuousBottom",["bottom"]),i("ContinuousRight",["right"]),n(0,0,0,0,"Assign",function(e,t){var n=t.position||"Fixed";e.positionFinder=n.constructor===String?t.jsPlumbInstance.AnchorPositionFinders[n]:n,e.constructorParams=t}),this.jsPlumbInstance.prototype.AnchorPositionFinders={Fixed:function(e,t,n){return[(e.left-t.left)/n[0],(e.top-t.top)/n[1]]},Grid:function(e,t,n,i){var r=e.left-t.left,o=e.top-t.top,s=n[0]/i.grid[0],a=n[1]/i.grid[1],c=Math.floor(r/s),l=Math.floor(o/a);return[(c*s+s/2)/n[0],(l*a+a/2)/n[1]]}},t.Anchors.Perimeter=function(e){var t=(e=e||{}).anchorCount||60,n=e.shape;if(!n)throw new Error("no shape supplied to Perimeter Anchor type");var i=function(){for(var e=2*Math.PI/t,n=0,i=[],r=0;r<t;r++){var o=.5+.5*Math.sin(n),s=.5+.5*Math.cos(n);i.push([o,s,0,0]),n+=e}return i},r=function(e){for(var n=t/e.length,i=[],r=function(e,r,o,s,a){for(var c=(o-e)/(n=t*a),l=(s-r)/n,u=0;u<n;u++)i.push([e+c*u,r+l*u,0,0])},o=0;o<e.length;o++)r.apply(null,e[o]);return i},o=function(e){for(var t=[],n=0;n<e.length;n++)t.push([e[n][0],e[n][1],e[n][2],e[n][3],1/e.length]);return r(t)},s=function(){return o([[0,0,1,0],[1,0,1,1],[1,1,0,1],[0,1,0,0]])},a={Circle:i,Ellipse:i,Diamond:function(){return o([[.5,0,1,.5],[1,.5,.5,1],[.5,1,0,.5],[0,.5,.5,0]])},Rectangle:s,Square:s,Triangle:function(){return o([[.5,0,1,1],[1,1,0,1],[0,1,.5,0]])},Path:function(e){for(var t=e.points,n=[],i=0,o=0;o<t.length-1;o++){var s=Math.sqrt(Math.pow(t[o][2]-t[o][0])+Math.pow(t[o][3]-t[o][1]));i+=s,n.push([t[o][0],t[o][1],t[o+1][0],t[o+1][1],s])}for(var a=0;a<n.length;a++)n[a][4]=n[a][4]/i;return r(n)}};if(!a[n])throw new Error("Shape ["+n+"] is unknown by Perimeter Anchor type");var c=a[n](e);e.rotation&&(c=function(e,t){for(var n=[],i=t/180*Math.PI,r=0;r<e.length;r++){var o=e[r][0]-.5,s=e[r][1]-.5;n.push([o*Math.cos(i)-s*Math.sin(i)+.5,o*Math.sin(i)+s*Math.cos(i)+.5,e[r][2],e[r][3]])}return n}(c,e.rotation));var l=e.jsPlumbInstance.makeDynamicAnchor(c);return l.type="Perimeter",l}}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this,t=e.jsPlumb,n=e.jsPlumbUtil,i=e.Biltong;t.Segments={AbstractSegment:function(e){this.params=e,this.findClosestPointOnPath=function(e,t){return{d:1/0,x:null,y:null,l:null}},this.getBounds=function(){return{minX:Math.min(e.x1,e.x2),minY:Math.min(e.y1,e.y2),maxX:Math.max(e.x1,e.x2),maxY:Math.max(e.y1,e.y2)}}},Straight:function(e){var n,r,o,s,a,c,l;t.Segments.AbstractSegment.apply(this,arguments);this.type="Straight",this.getLength=function(){return n},this.getGradient=function(){return r},this.getCoordinates=function(){return{x1:s,y1:c,x2:a,y2:l}},this.setCoordinates=function(e){s=e.x1,c=e.y1,a=e.x2,l=e.y2,n=Math.sqrt(Math.pow(a-s,2)+Math.pow(l-c,2)),r=i.gradient({x:s,y:c},{x:a,y:l}),o=-1/r},this.setCoordinates({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}),this.getBounds=function(){return{minX:Math.min(s,a),minY:Math.min(c,l),maxX:Math.max(s,a),maxY:Math.max(c,l)}},this.pointOnPath=function(e,t){if(0!==e||t){if(1!==e||t){var r=t?e>0?e:n+e:e*n;return i.pointOnLine({x:s,y:c},{x:a,y:l},r)}return{x:a,y:l}}return{x:s,y:c}},this.gradientAtPoint=function(e){return r},this.pointAlongPathFrom=function(e,t,n){var r=this.pointOnPath(e,n),o=t<=0?{x:s,y:c}:{x:a,y:l};return t<=0&&Math.abs(t)>1&&(t*=-1),i.pointOnLine(r,o,t)};var u=function(e,t,n){return n>=Math.min(e,t)&&n<=Math.max(e,t)},h=function(e,t,n){return Math.abs(n-e)<Math.abs(n-t)?e:t};this.findClosestPointOnPath=function(e,t){var d={d:1/0,x:null,y:null,l:null,x1:s,x2:a,y1:c,y2:l};if(0===r)d.y=c,d.x=u(s,a,e)?e:h(s,a,e);else if(r===1/0||r===-1/0)d.x=s,d.y=u(c,l,t)?t:h(c,l,t);else{var f=c-r*s,p=(t-o*e-f)/(r-o),g=r*p+f;d.x=u(s,a,p)?p:h(s,a,p),d.y=u(c,l,g)?g:h(c,l,g)}var m=i.lineLength([d.x,d.y],[s,c]);return d.d=i.lineLength([e,t],[d.x,d.y]),d.l=m/n,d}},Arc:function(e){t.Segments.AbstractSegment.apply(this,arguments);var n=function(t,n){return i.theta([e.cx,e.cy],[t,n])},r=2*Math.PI;this.radius=e.r,this.anticlockwise=e.ac,this.type="Arc",e.startAngle&&e.endAngle?(this.startAngle=e.startAngle,this.endAngle=e.endAngle,this.x1=e.cx+this.radius*Math.cos(e.startAngle),this.y1=e.cy+this.radius*Math.sin(e.startAngle),this.x2=e.cx+this.radius*Math.cos(e.endAngle),this.y2=e.cy+this.radius*Math.sin(e.endAngle)):(this.startAngle=n(e.x1,e.y1),this.endAngle=n(e.x2,e.y2),this.x1=e.x1,this.y1=e.y1,this.x2=e.x2,this.y2=e.y2),this.endAngle<0&&(this.endAngle+=r),this.startAngle<0&&(this.startAngle+=r);var o=this.endAngle<this.startAngle?this.endAngle+r:this.endAngle;this.sweep=Math.abs(o-this.startAngle),this.anticlockwise&&(this.sweep=r-this.sweep);var s=2*Math.PI*this.radius,a=this.sweep/r,c=s*a;this.getLength=function(){return c},this.getBounds=function(){return{minX:e.cx-e.r,maxX:e.cx+e.r,minY:e.cy-e.r,maxY:e.cy+e.r}};var l=function(e){var t=Math.floor(e),n=Math.ceil(e);return e-t<1e-10?t:n-e<1e-10?n:e};this.pointOnPath=function(t,n){if(0===t)return{x:this.x1,y:this.y1,theta:this.startAngle};if(1===t)return{x:this.x2,y:this.y2,theta:this.endAngle};n&&(t/=c);var i=function(e,t){if(e.anticlockwise){var n=e.startAngle<e.endAngle?e.startAngle+r:e.startAngle;return n-Math.abs(n-e.endAngle)*t}var i=e.endAngle<e.startAngle?e.endAngle+r:e.endAngle,o=Math.abs(i-e.startAngle);return e.startAngle+o*t}(this,t),o=e.cx+e.r*Math.cos(i),s=e.cy+e.r*Math.sin(i);return{x:l(o),y:l(s),theta:i}},this.gradientAtPoint=function(t,n){var r=this.pointOnPath(t,n),o=i.normal([e.cx,e.cy],[r.x,r.y]);return this.anticlockwise||o!==1/0&&o!==-1/0||(o*=-1),o},this.pointAlongPathFrom=function(t,n,i){var r=this.pointOnPath(t,i),o=n/s*2*Math.PI,a=this.anticlockwise?-1:1,c=r.theta+a*o;return{x:e.cx+this.radius*Math.cos(c),y:e.cy+this.radius*Math.sin(c)}}},Bezier:function(n){this.curve=[{x:n.x1,y:n.y1},{x:n.cp1x,y:n.cp1y},{x:n.cp2x,y:n.cp2y},{x:n.x2,y:n.y2}];t.Segments.AbstractSegment.apply(this,arguments);this.bounds={minX:Math.min(n.x1,n.x2,n.cp1x,n.cp2x),minY:Math.min(n.y1,n.y2,n.cp1y,n.cp2y),maxX:Math.max(n.x1,n.x2,n.cp1x,n.cp2x),maxY:Math.max(n.y1,n.y2,n.cp1y,n.cp2y)},this.type="Bezier";var i=function(t,n,i){return i&&(n=e.jsBezier.locationAlongCurveFrom(t,n>0?0:1,n)),n};this.pointOnPath=function(t,n){return t=i(this.curve,t,n),e.jsBezier.pointOnCurve(this.curve,t)},this.gradientAtPoint=function(t,n){return t=i(this.curve,t,n),e.jsBezier.gradientAtPoint(this.curve,t)},this.pointAlongPathFrom=function(t,n,r){return t=i(this.curve,t,r),e.jsBezier.pointAlongCurveFrom(this.curve,t,n)},this.getLength=function(){return e.jsBezier.getLength(this.curve)},this.getBounds=function(){return this.bounds}}},t.SegmentRenderer={getPath:function(e){return{Straight:function(){var t=e.getCoordinates();return"M "+t.x1+" "+t.y1+" L "+t.x2+" "+t.y2},Bezier:function(){var t=e.params;return"M "+t.x1+" "+t.y1+" C "+t.cp1x+" "+t.cp1y+" "+t.cp2x+" "+t.cp2y+" "+t.x2+" "+t.y2},Arc:function(){var t=e.params,n=e.sweep>Math.PI?1:0,i=e.anticlockwise?0:1;return"M"+e.x1+" "+e.y1+" A "+e.radius+" "+t.r+" 0 "+n+","+i+" "+e.x2+" "+e.y2}}[e.type]()}};var r=function(){this.resetBounds=function(){this.bounds={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}},this.resetBounds()};t.Connectors.AbstractConnector=function(e){r.apply(this,arguments);var o=[],s=0,a=[],c=[],l=e.stub||0,u=n.isArray(l)?l[0]:l,h=n.isArray(l)?l[1]:l,d=e.gap||0,f=n.isArray(d)?d[0]:d,p=n.isArray(d)?d[1]:d,g=null,m=!1,v=null,y=null,b=!1!==e.editable&&null!=t.ConnectorEditors&&null!=t.ConnectorEditors[this.type],w=this.setGeometry=function(e,t){m=!t,y=e},x=this.getGeometry=function(){return y};this.getPathData=function(){for(var e="",n=0;n<o.length;n++)e+=t.SegmentRenderer.getPath(o[n]),e+=" ";return e},this.hasBeenEdited=function(){return m},this.isEditing=function(){return null!=this.editor&&this.editor.isActive()},this.setEditable=function(e){return b=!(!e||null==t.ConnectorEditors||null==t.ConnectorEditors[this.type]||null!=this.overrideSetEditable&&!this.overrideSetEditable())&&e},this.isEditable=function(){return b},this.findSegmentForPoint=function(e,t){for(var n={d:1/0,s:null,x:null,y:null,l:null},i=0;i<o.length;i++){var r=o[i].findClosestPointOnPath(e,t);r.d<n.d&&(n.d=r.d,n.l=r.l,n.x=r.x,n.y=r.y,n.s=o[i],n.x1=r.x1,n.x2=r.x2,n.y1=r.y1,n.y2=r.y2,n.index=i)}return n};var _=function(e,t){t&&(e=e>0?e/s:(s+e)/s);for(var n=a.length-1,i=1,r=0;r<a.length;r++)if(a[r][1]>=e){n=r,i=1===e?1:0===e?0:(e-a[r][0])/c[r];break}return{segment:o[n],proportion:i,index:n}};this.setSegments=function(e){g=[],s=0;for(var t=0;t<e.length;t++)g.push(e[t]),s+=e[t].getLength()},this.getLength=function(){return s};var k=function(e){this.strokeWidth=e.strokeWidth;var t=i.quadrant(e.sourcePos,e.targetPos),n=e.targetPos[0]<e.sourcePos[0],r=e.targetPos[1]<e.sourcePos[1],o=e.strokeWidth||1,s=e.sourceEndpoint.anchor.getOrientation(e.sourceEndpoint),a=e.targetEndpoint.anchor.getOrientation(e.targetEndpoint),c=n?e.targetPos[0]:e.sourcePos[0],l=r?e.targetPos[1]:e.sourcePos[1],d=Math.abs(e.targetPos[0]-e.sourcePos[0]),g=Math.abs(e.targetPos[1]-e.sourcePos[1]);if(0===s[0]&&0===s[1]||0===a[0]&&0===a[1]){var m=d>g?0:1,v=[1,0][m];a=[],(s=[])[m]=e.sourcePos[m]>e.targetPos[m]?-1:1,a[m]=e.sourcePos[m]>e.targetPos[m]?1:-1,s[v]=0,a[v]=0}var y=n?d+f*s[0]:f*s[0],b=r?g+f*s[1]:f*s[1],w=n?p*a[0]:d+p*a[0],x=r?p*a[1]:g+p*a[1],_=s[0]*a[0]+s[1]*a[1],k={sx:y,sy:b,tx:w,ty:x,lw:o,xSpan:Math.abs(w-y),ySpan:Math.abs(x-b),mx:(y+w)/2,my:(b+x)/2,so:s,to:a,x:c,y:l,w:d,h:g,segment:t,startStubX:y+s[0]*u,startStubY:b+s[1]*u,endStubX:w+a[0]*h,endStubY:x+a[1]*h,isXGreaterThanStubTimes2:Math.abs(y-w)>u+h,isYGreaterThanStubTimes2:Math.abs(b-x)>u+h,opposite:-1===_,perpendicular:0===_,orthogonal:1===_,sourceAxis:0===s[0]?"y":"x",points:[c,l,d,g,y,b,w,x],stubs:[u,h]};return k.anchorOrientation=k.opposite?"opposite":k.orthogonal?"orthogonal":"perpendicular",k};this.getSegments=function(){return o},this.updateBounds=function(e){var t=e.getBounds();this.bounds.minX=Math.min(this.bounds.minX,t.minX),this.bounds.maxX=Math.max(this.bounds.maxX,t.maxX),this.bounds.minY=Math.min(this.bounds.minY,t.minY),this.bounds.maxY=Math.max(this.bounds.maxY,t.maxY)};return this.pointOnPath=function(e,t){var n=_(e,t);return n.segment&&n.segment.pointOnPath(n.proportion,!1)||[0,0]},this.gradientAtPoint=function(e,t){var n=_(e,t);return n.segment&&n.segment.gradientAtPoint(n.proportion,!1)||0},this.pointAlongPathFrom=function(e,t,n){var i=_(e,n);return i.segment&&i.segment.pointAlongPathFrom(i.proportion,t,!1)||[0,0]},this.compute=function(e){v=k.call(this,e),s=o.length=a.length=c.length=0,this._compute(v,e),this.x=v.points[0],this.y=v.points[1],this.w=v.points[2],this.h=v.points[3],this.segment=v.segment,function(){for(var e=0,t=0;t<o.length;t++){var n=o[t].getLength();c[t]=n/s,a[t]=[e,e+=n/s]}}()},{addSegment:function(e,n,i){if(i.x1!==i.x2||i.y1!==i.y2){var r=new t.Segments[n](i);o.push(r),s+=r.getLength(),e.updateBounds(r)}},prepareCompute:k,sourceStub:u,targetStub:h,maxStub:Math.max(u,h),sourceGap:f,targetGap:p,maxGap:Math.max(f,p),setGeometry:w,getGeometry:x}},n.extend(t.Connectors.AbstractConnector,r),t.Endpoints.AbstractEndpoint=function(e){return r.apply(this,arguments),{compute:this.compute=function(e,t,n,i){var r=this._compute.apply(this,arguments);return this.x=r[0],this.y=r[1],this.w=r[2],this.h=r[3],this.bounds.minX=this.x,this.bounds.minY=this.y,this.bounds.maxX=this.x+this.w,this.bounds.maxY=this.y+this.h,r},cssClass:e.cssClass}},n.extend(t.Endpoints.AbstractEndpoint,r),t.Endpoints.Dot=function(e){this.type="Dot";t.Endpoints.AbstractEndpoint.apply(this,arguments);e=e||{},this.radius=e.radius||10,this.defaultOffset=.5*this.radius,this.defaultInnerRadius=this.radius/3,this._compute=function(e,t,n,i){this.radius=n.radius||this.radius;var r=e[0]-this.radius,o=e[1]-this.radius,s=2*this.radius,a=2*this.radius;if(n.stroke){var c=n.strokeWidth||1;r-=c,o-=c,s+=2*c,a+=2*c}return[r,o,s,a,this.radius]}},n.extend(t.Endpoints.Dot,t.Endpoints.AbstractEndpoint),t.Endpoints.Rectangle=function(e){this.type="Rectangle";t.Endpoints.AbstractEndpoint.apply(this,arguments);e=e||{},this.width=e.width||20,this.height=e.height||20,this._compute=function(e,t,n,i){var r=n.width||this.width,o=n.height||this.height;return[e[0]-r/2,e[1]-o/2,r,o]}},n.extend(t.Endpoints.Rectangle,t.Endpoints.AbstractEndpoint);var o=function(e){t.jsPlumbUIComponent.apply(this,arguments),this._jsPlumb.displayElements=[]};n.extend(o,t.jsPlumbUIComponent,{getDisplayElements:function(){return this._jsPlumb.displayElements},appendDisplayElement:function(e){this._jsPlumb.displayElements.push(e)}}),t.Endpoints.Image=function(i){this.type="Image",o.apply(this,arguments),t.Endpoints.AbstractEndpoint.apply(this,arguments);var r=i.onload,s=i.src||i.url,a=i.cssClass?" "+i.cssClass:"";this._jsPlumb.img=new Image,this._jsPlumb.ready=!1,this._jsPlumb.initialized=!1,this._jsPlumb.deleted=!1,this._jsPlumb.widthToUse=i.width,this._jsPlumb.heightToUse=i.height,this._jsPlumb.endpoint=i.endpoint,this._jsPlumb.img.onload=function(){null!=this._jsPlumb&&(this._jsPlumb.ready=!0,this._jsPlumb.widthToUse=this._jsPlumb.widthToUse||this._jsPlumb.img.width,this._jsPlumb.heightToUse=this._jsPlumb.heightToUse||this._jsPlumb.img.height,r&&r(this))}.bind(this),this._jsPlumb.endpoint.setImage=function(e,t){var n=e.constructor===String?e:e.src;r=t,this._jsPlumb.img.src=n,null!=this.canvas&&this.canvas.setAttribute("src",this._jsPlumb.img.src)}.bind(this),this._jsPlumb.endpoint.setImage(s,r),this._compute=function(e,t,n,i){return this.anchorPoint=e,this._jsPlumb.ready?[e[0]-this._jsPlumb.widthToUse/2,e[1]-this._jsPlumb.heightToUse/2,this._jsPlumb.widthToUse,this._jsPlumb.heightToUse]:[0,0,0,0]},this.canvas=t.createElement("img",{position:"absolute",margin:0,padding:0,outline:0},this._jsPlumb.instance.endpointClass+a),this._jsPlumb.widthToUse&&this.canvas.setAttribute("width",this._jsPlumb.widthToUse),this._jsPlumb.heightToUse&&this.canvas.setAttribute("height",this._jsPlumb.heightToUse),this._jsPlumb.instance.appendElement(this.canvas),this.actuallyPaint=function(e,t,i){if(!this._jsPlumb.deleted){this._jsPlumb.initialized||(this.canvas.setAttribute("src",this._jsPlumb.img.src),this.appendDisplayElement(this.canvas),this._jsPlumb.initialized=!0);var r=this.anchorPoint[0]-this._jsPlumb.widthToUse/2,o=this.anchorPoint[1]-this._jsPlumb.heightToUse/2;n.sizeElement(this.canvas,r,o,this._jsPlumb.widthToUse,this._jsPlumb.heightToUse)}},this.paint=function(t,n){null!=this._jsPlumb&&(this._jsPlumb.ready?this.actuallyPaint(t,n):e.setTimeout(function(){this.paint(t,n)}.bind(this),200))}},n.extend(t.Endpoints.Image,[o,t.Endpoints.AbstractEndpoint],{cleanup:function(e){e&&(this._jsPlumb.deleted=!0,this.canvas&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null)}}),t.Endpoints.Blank=function(e){t.Endpoints.AbstractEndpoint.apply(this,arguments);this.type="Blank",o.apply(this,arguments),this._compute=function(e,t,n,i){return[e[0],e[1],10,0]};var i=e.cssClass?" "+e.cssClass:"";this.canvas=t.createElement("div",{display:"block",width:"1px",height:"1px",background:"transparent",position:"absolute"},this._jsPlumb.instance.endpointClass+i),this._jsPlumb.instance.appendElement(this.canvas),this.paint=function(e,t){n.sizeElement(this.canvas,this.x,this.y,this.w,this.h)}},n.extend(t.Endpoints.Blank,[t.Endpoints.AbstractEndpoint,o],{cleanup:function(){this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}}),t.Endpoints.Triangle=function(e){this.type="Triangle",t.Endpoints.AbstractEndpoint.apply(this,arguments);var n=this;(e=e||{}).width=e.width||55,e.height=e.height||55,this.width=e.width,this.height=e.height,this._compute=function(e,t,i,r){var o=i.width||n.width,s=i.height||n.height;return[e[0]-o/2,e[1]-s/2,o,s]}};var s=t.Overlays.AbstractOverlay=function(e){this.visible=!0,this.isAppendedAtTopLevel=!0,this.component=e.component,this.loc=null==e.location?.5:e.location,this.endpointLoc=null==e.endpointLocation?[.5,.5]:e.endpointLocation,this.visible=!1!==e.visible};s.prototype={cleanup:function(e){e&&(this.component=null,this.canvas=null,this.endpointLoc=null)},reattach:function(e,t){},setVisible:function(e){this.visible=e,this.component.repaint()},isVisible:function(){return this.visible},hide:function(){this.setVisible(!1)},show:function(){this.setVisible(!0)},incrementLocation:function(e){this.loc+=e,this.component.repaint()},setLocation:function(e){this.loc=e,this.component.repaint()},getLocation:function(){return this.loc},updateFrom:function(){}},t.Overlays.Arrow=function(e){this.type="Arrow",s.apply(this,arguments),this.isAppendedAtTopLevel=!1,e=e||{};var r=this;this.length=e.length||20,this.width=e.width||20,this.id=e.id;var o=(e.direction||1)<0?-1:1,a=e.paintStyle||{"stroke-width":1},c=e.foldback||.623;this.computeMaxSize=function(){return 1.5*r.width},this.elementCreated=function(n,i){if(this.path=n,e.events)for(var r in e.events)t.on(n,r,e.events[r])},this.draw=function(e,t){var r,s,l,u;if(e.pointAlongPathFrom){if(n.isString(this.loc)||this.loc>1||this.loc<0){var h=parseInt(this.loc,10),d=this.loc<0?1:0;r=e.pointAlongPathFrom(d,h,!1),s=e.pointAlongPathFrom(d,h-o*this.length/2,!1),l=i.pointOnLine(r,s,this.length)}else if(1===this.loc){if(r=e.pointOnPath(this.loc),s=e.pointAlongPathFrom(this.loc,-this.length),l=i.pointOnLine(r,s,this.length),-1===o){var f=l;l=r,r=f}}else if(0===this.loc){if(l=e.pointOnPath(this.loc),s=e.pointAlongPathFrom(this.loc,this.length),r=i.pointOnLine(l,s,this.length),-1===o){var p=l;l=r,r=p}}else r=e.pointAlongPathFrom(this.loc,o*this.length/2),s=e.pointOnPath(this.loc),l=i.pointOnLine(r,s,this.length);var g={hxy:r,tail:u=i.perpendicularLineTo(r,l,this.width),cxy:i.pointOnLine(r,l,c*this.length)},m=a.stroke||t.stroke,v=a.fill||t.stroke;return{component:e,d:g,"stroke-width":a.strokeWidth||t.strokeWidth,stroke:m,fill:v,minX:Math.min(r.x,u[0].x,u[1].x),maxX:Math.max(r.x,u[0].x,u[1].x),minY:Math.min(r.y,u[0].y,u[1].y),maxY:Math.max(r.y,u[0].y,u[1].y)}}return{component:e,minX:0,maxX:0,minY:0,maxY:0}}},n.extend(t.Overlays.Arrow,s,{updateFrom:function(e){this.length=e.length||this.length,this.width=e.width||this.width,this.direction=null!=e.direction?e.direction:this.direction,this.foldback=e.foldback||this.foldback}}),t.Overlays.PlainArrow=function(e){e=e||{};var n=t.extend(e,{foldback:1});t.Overlays.Arrow.call(this,n),this.type="PlainArrow"},n.extend(t.Overlays.PlainArrow,t.Overlays.Arrow),t.Overlays.Diamond=function(e){var n=(e=e||{}).length||40,i=t.extend(e,{length:n/2,foldback:2});t.Overlays.Arrow.call(this,i),this.type="Diamond"},n.extend(t.Overlays.Diamond,t.Overlays.Arrow);var a=function(e,t){return(null==e._jsPlumb.cachedDimensions||t)&&(e._jsPlumb.cachedDimensions=e.getDimensions()),e._jsPlumb.cachedDimensions},c=function(e){t.jsPlumbUIComponent.apply(this,arguments),s.apply(this,arguments);var i=this.fire;this.fire=function(){i.apply(this,arguments),this.component&&this.component.fire.apply(this.component,arguments)},this.detached=!1,this.id=e.id,this._jsPlumb.div=null,this._jsPlumb.initialised=!1,this._jsPlumb.component=e.component,this._jsPlumb.cachedDimensions=null,this._jsPlumb.create=e.create,this._jsPlumb.initiallyInvisible=!1===e.visible,this.getElement=function(){if(null==this._jsPlumb.div){var n=this._jsPlumb.div=t.getElement(this._jsPlumb.create(this._jsPlumb.component));n.style.position="absolute",n.className=this._jsPlumb.instance.overlayClass+" "+(this.cssClass?this.cssClass:e.cssClass?e.cssClass:""),this._jsPlumb.instance.appendElement(n),this._jsPlumb.instance.getId(n),this.canvas=n;var i="translate(-50%, -50%)";n.style.webkitTransform=i,n.style.mozTransform=i,n.style.msTransform=i,n.style.oTransform=i,n.style.transform=i,n._jsPlumb=this,!1===e.visible&&(n.style.display="none")}return this._jsPlumb.div},this.draw=function(e,t,i){var r=a(this);if(null!=r&&2===r.length){var o={x:0,y:0};if(i)o={x:i[0],y:i[1]};else if(e.pointOnPath){var s=this.loc,c=!1;(n.isString(this.loc)||this.loc<0||this.loc>1)&&(s=parseInt(this.loc,10),c=!0),o=e.pointOnPath(s,c)}else{var l=this.loc.constructor===Array?this.loc:this.endpointLoc;o={x:l[0]*e.w,y:l[1]*e.h}}var u=o.x-r[0]/2,h=o.y-r[1]/2;return{component:e,d:{minx:u,miny:h,td:r,cxy:o},minX:u,maxX:u+r[0],minY:h,maxY:h+r[1]}}return{minX:0,maxX:0,minY:0,maxY:0}}};n.extend(c,[t.jsPlumbUIComponent,s],{getDimensions:function(){return[1,1]},setVisible:function(e){this._jsPlumb.div&&(this._jsPlumb.div.style.display=e?"block":"none",e&&this._jsPlumb.initiallyInvisible&&(a(this,!0),this.component.repaint(),this._jsPlumb.initiallyInvisible=!1))},clearCachedDimensions:function(){this._jsPlumb.cachedDimensions=null},cleanup:function(e){e?null!=this._jsPlumb.div&&(this._jsPlumb.div._jsPlumb=null,this._jsPlumb.instance.removeElement(this._jsPlumb.div)):(this._jsPlumb&&this._jsPlumb.div&&this._jsPlumb.div.parentNode&&this._jsPlumb.div.parentNode.removeChild(this._jsPlumb.div),this.detached=!0)},reattach:function(e,t){null!=this._jsPlumb.div&&e.getContainer().appendChild(this._jsPlumb.div),this.detached=!1},computeMaxSize:function(){var e=a(this);return Math.max(e[0],e[1])},paint:function(e,t){this._jsPlumb.initialised||(this.getElement(),e.component.appendDisplayElement(this._jsPlumb.div),this._jsPlumb.initialised=!0,this.detached&&this._jsPlumb.div.parentNode.removeChild(this._jsPlumb.div)),this._jsPlumb.div.style.left=e.component.x+e.d.minx+"px",this._jsPlumb.div.style.top=e.component.y+e.d.miny+"px"}}),t.Overlays.Custom=function(e){this.type="Custom",c.apply(this,arguments)},n.extend(t.Overlays.Custom,c),t.Overlays.GuideLines=function(){var e=this;e.length=50,e.strokeWidth=5,this.type="GuideLines",s.apply(this,arguments),t.jsPlumbUIComponent.apply(this,arguments),this.draw=function(t,n){var r=t.pointAlongPathFrom(e.loc,e.length/2),o=t.pointOnPath(e.loc),s=i.pointOnLine(r,o,e.length),a=i.perpendicularLineTo(r,s,40),c=i.perpendicularLineTo(s,r,20);return{connector:t,head:r,tail:s,headLine:c,tailLine:a,minX:Math.min(r.x,s.x,c[0].x,c[1].x),minY:Math.min(r.y,s.y,c[0].y,c[1].y),maxX:Math.max(r.x,s.x,c[0].x,c[1].x),maxY:Math.max(r.y,s.y,c[0].y,c[1].y)}}},t.Overlays.Label=function(e){this.labelStyle=e.labelStyle;this.cssClass=null!=this.labelStyle?this.labelStyle.cssClass:null;var n=t.extend({create:function(){return t.createElement("div")}},e);if(t.Overlays.Custom.call(this,n),this.type="Label",this.label=e.label||"",this.labelText=null,this.labelStyle){var i=this.getElement();if(this.labelStyle.font=this.labelStyle.font||"12px sans-serif",i.style.font=this.labelStyle.font,i.style.color=this.labelStyle.color||"black",this.labelStyle.fill&&(i.style.background=this.labelStyle.fill),this.labelStyle.borderWidth>0){var r=this.labelStyle.borderStyle?this.labelStyle.borderStyle:"black";i.style.border=this.labelStyle.borderWidth+"px solid "+r}this.labelStyle.padding&&(i.style.padding=this.labelStyle.padding)}},n.extend(t.Overlays.Label,t.Overlays.Custom,{cleanup:function(e){e&&(this.div=null,this.label=null,this.labelText=null,this.cssClass=null,this.labelStyle=null)},getLabel:function(){return this.label},setLabel:function(e){this.label=e,this.labelText=null,this.clearCachedDimensions(),this.update(),this.component.repaint()},getDimensions:function(){return this.update(),c.prototype.getDimensions.apply(this,arguments)},update:function(){if("function"==typeof this.label){var e=this.label(this);this.getElement().innerHTML=e.replace(/\r\n/g,"<br/>")}else null==this.labelText&&(this.labelText=this.label,this.getElement().innerHTML=this.labelText.replace(/\r\n/g,"<br/>"))},updateFrom:function(e){null!=e.label&&this.setLabel(e.label)}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this;e.jsPlumb.extend(e.jsPlumbInstance.prototype,{getEventManager:function(){return(n=(t=this)._mottle)||(n=t._mottle=new e.Mottle),n;var t,n},on:function(e,t,n){return this.getEventManager().on.apply(this,arguments),this},off:function(e,t,n){return this.getEventManager().off.apply(this,arguments),this}})}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this,t=e.jsPlumbUtil,n=e.jsPlumbInstance,i="stop",r="revert",o="_jsPlumbGroup",s="show",a="hide",c=function(e){var n={},i={},r={},c=this;function l(t,n){for(var i=t.getMembers(),r=0;r<i.length;r++)e[n?s:a](i[r],!0)}e.bind("connection",function(e){null!=e.source[o]&&null!=e.target[o]&&e.source[o]===e.target[o]?(i[e.connection.id]=e.source[o],r[e.connection.id]=e.source[o]):(null!=e.source[o]&&(t.suggest(e.source[o].connections.source,e.connection),i[e.connection.id]=e.source[o]),null!=e.target[o]&&(t.suggest(e.target[o].connections.target,e.connection),r[e.connection.id]=e.target[o]))}),e.bind("internal.connectionDetached",function(e){!function(e){delete e.proxies;var n,o=i[e.id];null!=o&&(n=function(t){return t.id===e.id},t.removeWithFunction(o.connections.source,n),t.removeWithFunction(o.connections.target,n),delete i[e.id]),null!=(o=r[e.id])&&(n=function(t){return t.id===e.id},t.removeWithFunction(o.connections.source,n),t.removeWithFunction(o.connections.target,n),delete r[e.id])}(e.connection)}),e.bind("connectionMoved",function(e){var t=(0===e.index?i:r)[e.connection.id];if(t){var n=t.connections[0===e.index?"source":"target"],o=n.indexOf(e.connection);-1!==o&&n.splice(o,1)}}),this.addGroup=function(t){e.addClass(t.getEl(),"jtk-group-expanded"),n[t.id]=t,t.manager=this,d(t),e.fire("group:add",{group:t})},this.addToGroup=function(t,n,i){if(t=this.getGroup(t)){var r=t.getEl();if(n._isJsPlumbGroup)return;var o=n._jsPlumbGroup;if(o!==t){var s=e.getOffset(n,!0),a=t.collapsed?e.getOffset(r,!0):e.getOffset(t.getDragArea(),!0);null!=o&&(o.remove(n,i),c.updateConnectionsForGroup(o)),t.add(n,i);var l=function(e,n){var i=0===n?1:0;e.each(function(e){e.setVisible(!1),e.endpoints[i].element._jsPlumbGroup===t?(e.endpoints[i].setVisible(!1),c.expandConnection(e,i,t)):(e.endpoints[n].setVisible(!1),c.collapseConnection(e,n,t))})};t.collapsed&&(l(e.select({source:n}),0),l(e.select({target:n}),1));var u=e.getId(n);e.dragManager.setParent(n,u,r,e.getId(r),s);var h={left:s.left-a.left,top:s.top-a.top};e.setPosition(n,h),e.dragManager.revalidateParent(n,u,s),c.updateConnectionsForGroup(t),e.revalidate(u),setTimeout(function(){e.fire("group:addMember",{group:t,el:n})},0)}}},this.removeFromGroup=function(e,t,n){(e=this.getGroup(e))&&e.remove(t,null,n)},this.getGroup=function(e){var i=e;if(t.isString(e)&&null==(i=n[e]))throw new TypeError("No such group ["+e+"]");return i},this.getGroups=function(){var e=[];for(var t in n)e.push(n[t]);return e},this.removeGroup=function(t,i,r,o){t=this.getGroup(t),this.expandGroup(t,!0),t[i?"removeAll":"orphanAll"](r,o),e.remove(t.getEl()),delete n[t.id],delete e._groups[t.id],e.fire("group:remove",{group:t})},this.removeAllGroups=function(e,t,i){for(var r in n)this.removeGroup(n[r],e,t,i)};var u=this.collapseConnection=function(t,n,i){var r,s=i.getEl(),a=e.getId(s),c=t.endpoints[n].elementId,l=t.endpoints[0===n?1:0].element;l[o]&&!l[o].shouldProxy()&&l[o].collapsed||(t.proxies=t.proxies||[],(r=t.proxies[n]?t.proxies[n].ep:e.addEndpoint(s,{endpoint:i.getEndpoint(t,n),anchor:i.getAnchor(t,n),parameters:{isProxyEndpoint:!0}})).setDeleteOnEmpty(!0),t.proxies[n]={ep:r,originalEp:t.endpoints[n]},0===n?e.anchorManager.sourceChanged(c,a,t,s):(e.anchorManager.updateOtherEndpoint(t.endpoints[0].elementId,c,a,t),t.target=s,t.targetId=a),t.proxies[n].originalEp.detachFromConnection(t,null,!0),r.connections=[t],t.endpoints[n]=r,t.setVisible(!0))};this.collapseGroup=function(t){if(null!=(t=this.getGroup(t))&&!t.collapsed){var n=t.getEl();if(l(t,!1),t.shouldProxy()){var i=function(e,n){for(var i=0;i<e.length;i++){var r=e[i];u(r,n,t)}};i(t.connections.source,0),i(t.connections.target,1)}t.collapsed=!0,e.removeClass(n,"jtk-group-expanded"),e.addClass(n,"jtk-group-collapsed"),e.revalidate(n),e.fire("group:collapse",{group:t})}};var h=this.expandConnection=function(t,n,i){if(null!=t.proxies&&null!=t.proxies[n]){var r=e.getId(i.getEl()),o=t.proxies[n].originalEp.element,s=t.proxies[n].originalEp.elementId;t.endpoints[n]=t.proxies[n].originalEp,0===n?e.anchorManager.sourceChanged(r,s,t,o):(e.anchorManager.updateOtherEndpoint(t.endpoints[0].elementId,r,s,t),t.target=o,t.targetId=s),t.proxies[n].ep.detachFromConnection(t,null),t.proxies[n].originalEp.addConnection(t),delete t.proxies[n]}};function d(t){var n=t.getMembers(),o=e.getConnections({source:n,scope:"*"},!0),s=e.getConnections({target:n,scope:"*"},!0),a={};t.connections.source.length=0,t.connections.target.length=0;var c=function(e){for(var n=0;n<e.length;n++)a[e[n].id]||(a[e[n].id]=!0,e[n].source._jsPlumbGroup===t?(e[n].target._jsPlumbGroup!==t&&t.connections.source.push(e[n]),i[e[n].id]=t):e[n].target._jsPlumbGroup===t&&(t.connections.target.push(e[n]),r[e[n].id]=t))};c(o),c(s)}this.expandGroup=function(t,n){if(null!=(t=this.getGroup(t))&&t.collapsed){var i=t.getEl();if(l(t,!0),t.shouldProxy()){var r=function(e,n){for(var i=0;i<e.length;i++){var r=e[i];h(r,n,t)}};r(t.connections.source,0),r(t.connections.target,1)}t.collapsed=!1,e.addClass(i,"jtk-group-expanded"),e.removeClass(i,"jtk-group-collapsed"),e.revalidate(i),this.repaintGroup(t),n||e.fire("group:expand",{group:t})}},this.repaintGroup=function(t){for(var n=(t=this.getGroup(t)).getMembers(),i=0;i<n.length;i++)e.revalidate(n[i])},this.updateConnectionsForGroup=d,this.refreshAllGroups=function(){for(var t in n)d(n[t]),e.dragManager.updateOffsets(e.getId(n[t].getEl()))}};n.prototype.addGroup=function(n){var s=this;if(s._groups=s._groups||{},null!=s._groups[n.id])throw new TypeError("cannot create Group ["+n.id+"]; a Group with that ID exists");if(null!=n.el[o])throw new TypeError("cannot create Group ["+n.id+"]; the given element is already a Group");var a=new function(n,s){var a=this,c=s.el;this.getEl=function(){return c},this.id=s.id||t.uuid(),c._isJsPlumbGroup=!0;var l=this.getDragArea=function(){var e=n.getSelector(c,"[jtk-group-content]");return e&&e.length>0?e[0]:c},u=!0===s.ghost,h=u||!0===s.constrain,d=!1!==s.revert,f=!0===s.orphan,p=!0===s.prune,g=!0===s.dropOverride,m=!1!==s.proxied,v=[];if(this.connections={source:[],target:[],internal:[]},this.getAnchor=function(e,t){return s.anchor||"Continuous"},this.getEndpoint=function(e,t){return s.endpoint||["Dot",{radius:10}]},this.collapsed=!1,!1!==s.draggable){var y={stop:function(e){n.fire("groupDragStop",jsPlumb.extend(e,{group:a}))},scope:"_jsPlumbGroupDrag"};s.dragOptions&&e.jsPlumb.extend(y,s.dragOptions),n.draggable(s.el,y)}!1!==s.droppable&&n.droppable(s.el,{drop:function(e){var t=e.drag.el;if(!t._isJsPlumbGroup){var i=t._jsPlumbGroup;if(i!==a){if(null!=i&&i.overrideDrop(t,a))return;n.getGroupManager().addToGroup(a,t,!1)}}}});var b=function(e,t){for(var n=null==e.nodeType?e:[e],i=0;i<n.length;i++)t(n[i])};function w(e,t){var i=function(e){return e.offsetParent}(e),r=n.getSize(i),o=n.getSize(e),s=t[0],a=s+o[0],c=t[1],l=c+o[1];return a>0&&s<r[0]&&l>0&&c<r[1]}function x(e){var t=n.getId(e),i=n.getOffset(e);e.parentNode.removeChild(e),n.getContainer().appendChild(e),n.setPosition(e,i),delete e._jsPlumbGroup,C(e),n.dragManager.clearParent(e,t)}function _(e){if(!w(e.el,e.pos)){var t=e.el._jsPlumbGroup;p?n.remove(e.el):x(e.el),t.remove(e.el)}}function k(e){var t=n.getId(e);n.revalidate(e),n.dragManager.revalidateParent(e,t)}function C(e){e._katavorioDrag&&((p||f)&&e._katavorioDrag.off(i,_),p||f||!d||(e._katavorioDrag.off(r,k),e._katavorioDrag.setRevert(null)))}function E(e){e._katavorioDrag&&((p||f)&&e._katavorioDrag.on(i,_),h&&e._katavorioDrag.setConstrain(!0),u&&e._katavorioDrag.setUseGhostProxy(!0),p||f||!d||(e._katavorioDrag.on(r,k),e._katavorioDrag.setRevert(function(e,t){return!w(e,t)})))}this.overrideDrop=function(e,t){return g&&(d||p||f)},this.add=function(e,t){var i=l();b(e,function(e){if(null!=e._jsPlumbGroup){if(e._jsPlumbGroup===a)return;e._jsPlumbGroup.remove(e,!0,t,!1)}e._jsPlumbGroup=a,v.push(e),n.isAlreadyDraggable(e)&&E(e),e.parentNode!==i&&i.appendChild(e),t||n.fire("group:addMember",{group:a,el:e})}),n.getGroupManager().updateConnectionsForGroup(a)},this.remove=function(e,i,r,o){b(e,function(e){if(delete e._jsPlumbGroup,t.removeWithFunction(v,function(t){return t===e}),i)try{a.getDragArea().removeChild(e)}catch(e){jsPlumbUtil.log("Could not remove element from Group "+e)}C(e),r||n.fire("group:removeMember",{group:a,el:e})}),o||n.getGroupManager().updateConnectionsForGroup(a)},this.removeAll=function(e,t){for(var i=0,r=v.length;i<r;i++)a.remove(v[0],e,t,!0);v.length=0,n.getGroupManager().updateConnectionsForGroup(a)},this.orphanAll=function(){for(var e=0;e<v.length;e++)x(v[e]);v.length=0},this.getMembers=function(){return v},c[o]=this,n.bind("elementDraggable",function(e){e.el._jsPlumbGroup===this&&E(e.el)}.bind(this)),this.shouldProxy=function(){return m},n.getGroupManager().addGroup(this)}(s,n);return s._groups[a.id]=a,n.collapsed&&this.collapseGroup(a),a},n.prototype.addToGroup=function(e,t,n){var i=function(t){var i=this.getId(t);this.manage(i,t),this.getGroupManager().addToGroup(e,t,n)}.bind(this);if(Array.isArray(t))for(var r=0;r<t.length;r++)i(t[r]);else i(t)},n.prototype.removeFromGroup=function(e,t,n){this.getGroupManager().removeFromGroup(e,t,n)},n.prototype.removeGroup=function(e,t,n,i){this.getGroupManager().removeGroup(e,t,n,i)},n.prototype.removeAllGroups=function(e,t,n){this.getGroupManager().removeAllGroups(e,t,n)},n.prototype.getGroup=function(e){return this.getGroupManager().getGroup(e)},n.prototype.getGroups=function(){return this.getGroupManager().getGroups()},n.prototype.expandGroup=function(e){this.getGroupManager().expandGroup(e)},n.prototype.collapseGroup=function(e){this.getGroupManager().collapseGroup(e)},n.prototype.repaintGroup=function(e){this.getGroupManager().repaintGroup(e)},n.prototype.toggleGroup=function(e){null!=(e=this.getGroupManager().getGroup(e))&&this.getGroupManager()[e.collapsed?"expandGroup":"collapseGroup"](e)},n.prototype.getGroupManager=function(){var e=this._groupManager;return null==e&&(e=this._groupManager=new c(this)),e},n.prototype.removeGroupManager=function(){delete this._groupManager},n.prototype.getGroupFor=function(e){if(e=this.getElement(e))return e[o]}}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this.jsPlumb,t=this.jsPlumbUtil;e.Connectors.Flowchart=function(t){this.type="Flowchart",(t=t||{}).stub=null==t.stub?30:t.stub;var n,i=e.Connectors.AbstractConnector.apply(this,arguments),r=null==t.midpoint?.5:t.midpoint,o=!0===t.alwaysRespectStubs,s=null,a=null,c=null!=t.cornerRadius?t.cornerRadius:0,l=(t.loopbackRadius,function(e){return e<0?-1:0===e?0:1}),u=function(e){return[l(e[2]-e[0]),l(e[3]-e[1])]},h=function(e,t,n,i){if(s!==t||a!==n){var r=null==s?i.sx:s,o=null==a?i.sy:a,c=r===t?"v":"h";s=t,a=n,e.push([r,o,t,n,c])}},d=function(e){return Math.sqrt(Math.pow(e[0]-e[2],2)+Math.pow(e[1]-e[3],2))},f=function(e){var t=[];return t.push.apply(t,e),t};this._compute=function(e,t){n=[],s=null,a=null;var l=this.getGeometry(),p=[e.x,e.y],g=[e.x+e.w,e.y+e.h];if((this.hasBeenEdited()||this.isEditing())&&null!=l&&null!=l.segments&&l.segments.length>0)n=l.segments,i.setGeometry({segments:n,sourcePos:p,targetPos:g});else{var m=function(){return[e.startStubX,e.startStubY,e.endStubX,e.endStubY]},v={perpendicular:m,orthogonal:m,opposite:function(t){var n=e,i="x"===t?0:1;return!o&&{x:function(){return 1===n.so[i]&&(n.startStubX>n.endStubX&&n.tx>n.startStubX||n.sx>n.endStubX&&n.tx>n.sx)||-1===n.so[i]&&(n.startStubX<n.endStubX&&n.tx<n.startStubX||n.sx<n.endStubX&&n.tx<n.sx)},y:function(){return 1===n.so[i]&&(n.startStubY>n.endStubY&&n.ty>n.startStubY||n.sy>n.endStubY&&n.ty>n.sy)||-1===n.so[i]&&(n.startStubY<n.endStubY&&n.ty<n.startStubY||n.sy<n.endStubY&&n.ty<n.sy)}}[t]()?{x:[(e.sx+e.tx)/2,e.startStubY,(e.sx+e.tx)/2,e.endStubY],y:[e.startStubX,(e.sy+e.ty)/2,e.endStubX,(e.sy+e.ty)/2]}[t]:[e.startStubX,e.startStubY,e.endStubX,e.endStubY]}}[e.anchorOrientation](e.sourceAxis),y="x"===e.sourceAxis?0:1,b="x"===e.sourceAxis?1:0,w=v[y],x=v[b],_=v[y+2],k=v[b+2];h(n,v[0],v[1],e);var C=e.startStubX+(e.endStubX-e.startStubX)*r,E=e.startStubY+(e.endStubY-e.startStubY)*r,A={x:[0,1],y:[1,0]},S={perpendicular:function(t){var n=e,i={x:[[n.startStubX,n.endStubX],null,[n.endStubX,n.startStubX]],y:[[n.startStubY,n.endStubY],null,[n.endStubY,n.startStubY]]},r={x:[[C,n.startStubY],[C,n.endStubY]],y:[[n.startStubX,E],[n.endStubX,E]]},o={x:[[n.endStubX,n.startStubY]],y:[[n.startStubX,n.endStubY]]},s={x:[[n.startStubX,n.endStubY],[n.endStubX,n.endStubY]],y:[[n.endStubX,n.startStubY],[n.endStubX,n.endStubY]]},a={x:[[n.startStubX,E],[n.endStubX,E],[n.endStubX,n.endStubY]],y:[[C,n.startStubY],[C,n.endStubY],[n.endStubX,n.endStubY]]},c={x:[n.startStubY,n.endStubY],y:[n.startStubX,n.endStubX]},l=A[t][0],u=A[t][1],h=n.so[l]+1,d=n.to[u]+1,f=-1===n.to[u]&&c[t][1]<c[t][0]||1===n.to[u]&&c[t][1]>c[t][0],p=i[t][h][0],g=i[t][h][1],m={x:[[[1,2,3,4],null,[2,1,4,3]],null,[[4,3,2,1],null,[3,4,1,2]]],y:[[[3,2,1,4],null,[2,3,4,1]],null,[[4,1,2,3],null,[1,4,3,2]]]}[t][h][d];return n.segment===m[3]||n.segment===m[2]&&f?r[t]:n.segment===m[2]&&g<p?o[t]:n.segment===m[2]&&g>=p||n.segment===m[1]&&!f?a[t]:n.segment===m[0]||n.segment===m[1]&&f?s[t]:void 0},orthogonal:function(t,n,i,r,o){var s=e,a={x:-1===s.so[0]?Math.min(n,r):Math.max(n,r),y:-1===s.so[1]?Math.min(n,r):Math.max(n,r)}[t];return{x:[[a,i],[a,o],[r,o]],y:[[i,a],[o,a],[o,r]]}[t]},opposite:function(n,r,o,s){var a=e,c={x:"y",y:"x"}[n],l={x:"height",y:"width"}[n],u=a["is"+n.toUpperCase()+"GreaterThanStubTimes2"];if(t.sourceEndpoint.elementId===t.targetEndpoint.elementId){var h=o+(1-t.sourceEndpoint.anchor[c])*t.sourceInfo[l]+i.maxStub;return{x:[[r,h],[s,h]],y:[[h,r],[h,s]]}[n]}return!u||1===a.so[y]&&r>s||-1===a.so[y]&&r<s?{x:[[r,E],[s,E]],y:[[C,r],[C,s]]}[n]:1===a.so[y]&&r<s||-1===a.so[y]&&r>s?{x:[[C,a.sy],[C,a.ty]],y:[[a.sx,E],[a.tx,E]]}[n]:void 0}}[e.anchorOrientation](e.sourceAxis,w,x,_,k);if(S)for(var F=0;F<S.length;F++)h(n,S[F][0],S[F][1],e);h(n,v[2],v[3],e),h(n,e.tx,e.ty,e),i.setGeometry({segments:n,sourcePos:p,targetPos:g},!0)}!function(e,t,n){for(var r,o,s,a=null,l=0;l<t.length-1;l++){if(a=a||f(t[l]),r=f(t[l+1]),o=u(a),s=u(r),c>0&&a[4]!==r[4]){var h=Math.min(c,d(a),d(r));a[2]-=o[0]*h,a[3]-=o[1]*h,r[0]+=s[0]*h,r[1]+=s[1]*h;var p=o[1]===s[0]&&1===s[0]||o[1]===s[0]&&0===s[0]&&o[0]!==s[1]||o[1]===s[0]&&-1===s[0],g=(r[1]>a[3]?1:-1)==(r[0]>a[2]?1:-1),m=g&&p||!g&&!p?r[0]:a[2],v=g&&p||!g&&!p?a[3]:r[1];i.addSegment(e,"Straight",{x1:a[0],y1:a[1],x2:a[2],y2:a[3]}),i.addSegment(e,"Arc",{r:h,x1:a[2],y1:a[3],x2:r[0],y2:r[1],cx:m,cy:v,ac:p})}else{var y=a[2]===a[0]?0:a[2]>a[0]?n.lw/2:-n.lw/2,b=a[3]===a[1]?0:a[3]>a[1]?n.lw/2:-n.lw/2;i.addSegment(e,"Straight",{x1:a[0]-y,y1:a[1]-b,x2:a[2]+y,y2:a[3]+b})}a=r}null!=r&&i.addSegment(e,"Straight",{x1:r[0],y1:r[1],x2:r[2],y2:r[3]})}(this,n,e)}},t.extend(e.Connectors.Flowchart,e.Connectors.AbstractConnector)}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this.jsPlumb,t=this.jsPlumbUtil;e.Connectors.AbstractBezierConnector=function(t){var n,i=!1!==(t=t||{}).showLoopback,r=(t.curviness,t.margin||5),o=(t.proximityLimit,t.orientation&&"clockwise"===t.orientation),s=t.loopbackRadius||25,a=!1;return this.overrideSetEditable=function(){return!a},this._compute=function(e,t){var c=t.sourcePos,l=t.targetPos,u=Math.abs(c[0]-l[0]),h=Math.abs(c[1]-l[1]);if(i&&t.sourceEndpoint.elementId===t.targetEndpoint.elementId){a=!0;var d=t.sourcePos[0],f=t.sourcePos[1]-r,p=d,g=f-s,m=p-s,v=g-s;u=2*s,h=2*s,e.points[0]=m,e.points[1]=v,e.points[2]=u,e.points[3]=h,n.addSegment(this,"Arc",{loopback:!0,x1:d-m+4,y1:f-v,startAngle:0,endAngle:2*Math.PI,r:s,ac:!o,x2:d-m-4,y2:f-v,cx:p-m,cy:g-v})}else a=!1,this._computeBezier(e,t,c,l,u,h)},n=e.Connectors.AbstractConnector.apply(this,arguments)},t.extend(e.Connectors.AbstractBezierConnector,e.Connectors.AbstractConnector);var n=function(t){t=t||{},this.type="Bezier";var n=e.Connectors.AbstractBezierConnector.apply(this,arguments),i=t.curviness||150;this.getCurviness=function(){return i},this._findControlPoint=function(e,t,n,r,o,s,a){var c=[];return s[0]!==a[0]||s[1]===a[1]?(0===a[0]?c.push(n[0]<t[0]?e[0]+10:e[0]-10):c.push(e[0]+i*a[0]),0===a[1]?c.push(n[1]<t[1]?e[1]+10:e[1]-10):c.push(e[1]+i*s[1])):(0===s[0]?c.push(t[0]<n[0]?e[0]+10:e[0]-10):c.push(e[0]-i*s[0]),0===s[1]?c.push(t[1]<n[1]?e[1]+10:e[1]-10):c.push(e[1]+i*a[1])),c},this._computeBezier=function(e,t,i,r,o,s){var a,c,l=this.getGeometry(),u=i[0]<r[0]?o:0,h=i[1]<r[1]?s:0,d=i[0]<r[0]?0:o,f=i[1]<r[1]?0:s;(this.hasBeenEdited()||this.isEditing())&&null!=l&&null!=l.controlPoints&&null!=l.controlPoints[0]&&null!=l.controlPoints[1]?(a=l.controlPoints[0],c=l.controlPoints[1]):(a=this._findControlPoint([u,h],i,r,t.sourceEndpoint,t.targetEndpoint,e.so,e.to),c=this._findControlPoint([d,f],r,i,t.targetEndpoint,t.sourceEndpoint,e.to,e.so)),n.setGeometry({controlPoints:[a,c],sourcePos:i,targetPos:r},!0),n.addSegment(this,"Bezier",{x1:u,y1:h,x2:d,y2:f,cp1x:a[0],cp1y:a[1],cp2x:c[0],cp2y:c[1]})}};e.Connectors.Bezier=n,t.extend(n,e.Connectors.AbstractBezierConnector)}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this.jsPlumb,t=this.jsPlumbUtil,n=function(t){t=t||{},this.type="StateMachine";var n,i=e.Connectors.AbstractBezierConnector.apply(this,arguments),r=t.curviness||10,o=t.margin||5,s=t.proximityLimit||80;t.orientation&&t.orientation;this._computeBezier=function(e,t,a,c,l,u){var h=t.sourcePos[0]<t.targetPos[0]?0:l,d=t.sourcePos[1]<t.targetPos[1]?0:u,f=t.sourcePos[0]<t.targetPos[0]?l:0,p=t.sourcePos[1]<t.targetPos[1]?u:0;0===t.sourcePos[2]&&(h-=o),1===t.sourcePos[2]&&(h+=o),0===t.sourcePos[3]&&(d-=o),1===t.sourcePos[3]&&(d+=o),0===t.targetPos[2]&&(f-=o),1===t.targetPos[2]&&(f+=o),0===t.targetPos[3]&&(p-=o),1===t.targetPos[3]&&(p+=o);var g,m,v,y,b,w,x,_,k=(h+f)/2,C=(d+p)/2,E=(w=d,_=p,(b=h)<=(x=f)&&_<=w?1:b<=x&&w<=_?2:x<=b&&_>=w?3:4),A=Math.sqrt(Math.pow(f-h,2)+Math.pow(p-d,2)),S=i.getGeometry();(this.hasBeenEdited()||this.isEditing())&&null!=S?(g=S.controlPoints[0][0],v=S.controlPoints[0][1],m=S.controlPoints[1][0],y=S.controlPoints[1][1]):(g=(n=function(e,t,n,i,r,o,s,a,c){return a<=c?[e,t]:1===n?i[3]<=0&&r[3]>=1?[e+(i[2]<.5?-1*o:o),t]:i[2]>=1&&r[2]<=0?[e,t+(i[3]<.5?-1*s:s)]:[e+-1*o,t+-1*s]:2===n?i[3]>=1&&r[3]<=0?[e+(i[2]<.5?-1*o:o),t]:i[2]>=1&&r[2]<=0?[e,t+(i[3]<.5?-1*s:s)]:[e+o,t+-1*s]:3===n?i[3]>=1&&r[3]<=0?[e+(i[2]<.5?-1*o:o),t]:i[2]<=0&&r[2]>=1?[e,t+(i[3]<.5?-1*s:s)]:[e+-1*o,t+-1*s]:4===n?i[3]<=0&&r[3]>=1?[e+(i[2]<.5?-1*o:o),t]:i[2]<=0&&r[2]>=1?[e,t+(i[3]<.5?-1*s:s)]:[e+o,t+-1*s]:void 0}(k,C,E,t.sourcePos,t.targetPos,r,r,A,s))[0],m=n[0],v=n[1],y=n[1],i.setGeometry({controlPoints:[n,n],sourcePos:a,targetPos:c,quadrant:E,curviness:r},!0)),i.addSegment(this,"Bezier",{x1:f,y1:p,x2:h,y2:d,cp1x:g,cp1y:v,cp2x:m,cp2y:y})}};e.Connectors.StateMachine=n,t.extend(n,e.Connectors.AbstractBezierConnector)}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this.jsPlumb,t=this.jsPlumbUtil,n=function(t){this.type="Straight";var n=e.Connectors.AbstractConnector.apply(this,arguments);this._compute=function(e,t){n.addSegment(this,"Straight",{x1:e.sx,y1:e.sy,x2:e.startStubX,y2:e.startStubY}),n.addSegment(this,"Straight",{x1:e.startStubX,y1:e.startStubY,x2:e.endStubX,y2:e.endStubY}),n.addSegment(this,"Straight",{x1:e.endStubX,y1:e.endStubY,x2:e.tx,y2:e.ty})}};e.Connectors.Straight=n,t.extend(n,e.Connectors.AbstractConnector)}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this.jsPlumb,t=this.jsPlumbUtil,n={"stroke-linejoin":"stroke-linejoin","stroke-dashoffset":"stroke-dashoffset","stroke-linecap":"stroke-linecap"},i="http://www.w3.org/2000/svg",r=function(e,t){for(var n in t)e.setAttribute(n,""+t[n])},o=function(t,n){return(n=n||{}).version="1.1",n.xmlns=i,e.createElementNS(i,t,null,null,n)},s=function(e){return"position:absolute;left:"+e[0]+"px;top:"+e[1]+"px"},a=function(e){for(var t=e.querySelectorAll(" defs,linearGradient,radialGradient"),n=0;n<t.length;n++)t[n].parentNode.removeChild(t[n])},c=function(e,t,i,r,s){if(t.setAttribute("fill",i.fill?i.fill:"none"),t.setAttribute("stroke",i.stroke?i.stroke:"none"),i.gradient?function(e,t,n,i,r){var s,c="jsplumb_gradient_"+r._jsPlumb.instance.idstamp();a(e),s=n.gradient.offset?o("radialGradient",{id:c}):o("linearGradient",{id:c,gradientUnits:"userSpaceOnUse"});var l=o("defs");e.appendChild(l),l.appendChild(s);for(var u=0;u<n.gradient.stops.length;u++){var h=1===r.segment||2===r.segment?u:n.gradient.stops.length-1-u,d=n.gradient.stops[h][1],f=o("stop",{offset:Math.floor(100*n.gradient.stops[u][0])+"%","stop-color":d});s.appendChild(f)}var p=n.stroke?"stroke":"fill";t.setAttribute(p,"url(#"+c+")")}(e,t,i,0,s):(a(e),t.setAttribute("style","")),i.strokeWidth&&t.setAttribute("stroke-width",i.strokeWidth),i.dashstyle&&i.strokeWidth&&!i["stroke-dasharray"]){var c=-1===i.dashstyle.indexOf(",")?" ":",",l="";i.dashstyle.split(c).forEach(function(e){l+=Math.floor(e*i.strokeWidth)+c}),t.setAttribute("stroke-dasharray",l)}else i["stroke-dasharray"]&&t.setAttribute("stroke-dasharray",i["stroke-dasharray"]);for(var u in n)i[u]&&t.setAttribute(n[u],i[u])},l=function(e,t,n){e.childNodes.length>n?e.insertBefore(t,e.childNodes[n]):e.appendChild(t)};t.svg={node:o,attr:r,pos:s};var u=function(n){var i=n.pointerEventsSpec||"all",a={};e.jsPlumbUIComponent.apply(this,n.originalArgs),this.canvas=null,this.path=null,this.svg=null,this.bgCanvas=null;var c=n.cssClass+" "+(n.originalArgs[0].cssClass||""),l={style:"",width:0,height:0,"pointer-events":i,position:"absolute"};this.svg=o("svg",l),n.useDivWrapper?(this.canvas=e.createElement("div",{position:"absolute"}),t.sizeElement(this.canvas,0,0,1,1),this.canvas.className=c):(r(this.svg,{class:c}),this.canvas=this.svg),n._jsPlumb.appendElement(this.canvas,n.originalArgs[0].parent),n.useDivWrapper&&this.canvas.appendChild(this.svg);var u=[this.canvas];return this.getDisplayElements=function(){return u},this.appendDisplayElement=function(e){u.push(e)},this.paint=function(e,i,o){if(null!=e){var c,l=[this.x,this.y],u=[this.w,this.h];null!=o&&(o.xmin<0&&(l[0]+=o.xmin),o.ymin<0&&(l[1]+=o.ymin),u[0]=o.xmax+(o.xmin<0?-o.xmin:0),u[1]=o.ymax+(o.ymin<0?-o.ymin:0)),n.useDivWrapper?(t.sizeElement(this.canvas,l[0],l[1],u[0],u[1]),l[0]=0,l[1]=0,c=s([0,0])):c=s([l[0],l[1]]),a.paint.apply(this,arguments),r(this.svg,{style:c,width:u[0]||0,height:u[1]||0})}},{renderer:a}};t.extend(u,e.jsPlumbUIComponent,{cleanup:function(e){e||null==this.typeId?(this.canvas&&(this.canvas._jsPlumb=null),this.svg&&(this.svg._jsPlumb=null),this.bgCanvas&&(this.bgCanvas._jsPlumb=null),this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.bgCanvas&&this.bgCanvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.svg=null,this.canvas=null,this.path=null,this.group=null):(this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.bgCanvas&&this.bgCanvas.parentNode&&this.bgCanvas.parentNode.removeChild(this.bgCanvas))},reattach:function(e){var t=e.getContainer();this.canvas&&null==this.canvas.parentNode&&t.appendChild(this.canvas),this.bgCanvas&&null==this.bgCanvas.parentNode&&t.appendChild(this.bgCanvas)},setVisible:function(e){this.canvas&&(this.canvas.style.display=e?"block":"none")}}),e.ConnectorRenderers.svg=function(t){var n=this,i=u.apply(this,[{cssClass:t._jsPlumb.connectorClass+(this.isEditable()?" "+t._jsPlumb.editableConnectorClass:""),originalArgs:arguments,pointerEventsSpec:"none",_jsPlumb:t._jsPlumb}]),s=this.setEditable;this.setEditable=function(t){var n=s.apply(this,[t]);e[n?"addClass":"removeClass"](this.canvas,this._jsPlumb.instance.editableConnectorClass)},i.renderer.paint=function(i,s,a){var u=n.getSegments(),h=[0,0];if(a.xmin<0&&(h[0]=-a.xmin),a.ymin<0&&(h[1]=-a.ymin),u.length>0){var d={d:n.getPathData(),transform:"translate("+h[0]+","+h[1]+")","pointer-events":t["pointer-events"]||"visibleStroke"},f=null;n.x,n.y,n.w,n.h;if(i.outlineStroke){var p=i.outlineWidth||1,g=i.strokeWidth+2*p;delete(f=e.extend({},i)).gradient,f.stroke=i.outlineStroke,f.strokeWidth=g,null==n.bgPath?(n.bgPath=o("path",d),e.addClass(n.bgPath,e.connectorOutlineClass),l(n.svg,n.bgPath,0)):r(n.bgPath,d),c(n.svg,n.bgPath,f,0,n)}null==n.path?(n.path=o("path",d),l(n.svg,n.path,i.outlineStroke?1:0)):r(n.path,d),c(n.svg,n.path,i,0,n)}}},t.extend(e.ConnectorRenderers.svg,u);var h=e.SvgEndpoint=function(t){u.apply(this,[{cssClass:t._jsPlumb.endpointClass,originalArgs:arguments,pointerEventsSpec:"all",useDivWrapper:!0,_jsPlumb:t._jsPlumb}]).renderer.paint=function(t){var n=e.extend({},t);n.outlineStroke&&(n.stroke=n.outlineStroke),null==this.node?(this.node=this.makeNode(n),this.svg.appendChild(this.node)):null!=this.updateNode&&this.updateNode(this.node),c(this.svg,this.node,n,(this.x,this.y,this.w,this.h),this),s(this.node,(this.x,this.y))}.bind(this)};t.extend(h,u),e.Endpoints.svg.Dot=function(){e.Endpoints.Dot.apply(this,arguments),h.apply(this,arguments),this.makeNode=function(e){return o("circle",{cx:this.w/2,cy:this.h/2,r:this.radius})},this.updateNode=function(e){r(e,{cx:this.w/2,cy:this.h/2,r:this.radius})}},t.extend(e.Endpoints.svg.Dot,[e.Endpoints.Dot,h]),e.Endpoints.svg.Rectangle=function(){e.Endpoints.Rectangle.apply(this,arguments),h.apply(this,arguments),this.makeNode=function(e){return o("rect",{width:this.w,height:this.h})},this.updateNode=function(e){r(e,{width:this.w,height:this.h})}},t.extend(e.Endpoints.svg.Rectangle,[e.Endpoints.Rectangle,h]),e.Connectors.svg.Flowchart=function(){e.Connectors.Flowchart.apply(this,arguments),e.ConnectorRenderers.svg.apply(this,arguments)},t.extend(e.Connectors.svg.Flowchart,[e.Connectors.Flowchart,e.ConnectorRenderers.svg]),e.Connectors.svg.Bezier=function(){e.Connectors.Bezier.apply(this,arguments),e.ConnectorRenderers.svg.apply(this,arguments)},t.extend(e.Connectors.svg.Bezier,[e.Connectors.Bezier,e.ConnectorRenderers.svg]),e.Connectors.svg.Straight=function(){e.Connectors.Straight.apply(this,arguments),e.ConnectorRenderers.svg.apply(this,arguments)},t.extend(e.Connectors.svg.Straight,[e.Connectors.Straight,e.ConnectorRenderers.svg]),e.Connectors.svg.StateMachine=function(){e.Connectors.StateMachine.apply(this,arguments),e.ConnectorRenderers.svg.apply(this,arguments)},t.extend(e.Connectors.svg.StateMachine,[e.Connectors.StateMachine,e.ConnectorRenderers.svg]),e.Endpoints.svg.Image=e.Endpoints.Image,e.Endpoints.svg.Blank=e.Endpoints.Blank,e.Overlays.svg.Label=e.Overlays.Label,e.Overlays.svg.Custom=e.Overlays.Custom;var d=function(t,n){t.apply(this,n),e.jsPlumbUIComponent.apply(this,n),this.isAppendedAtTopLevel=!1;this.path=null,this.paint=function(e,t){if(e.component.svg&&t){null==this.path&&(this.path=o("path",{"pointer-events":"all"}),e.component.svg.appendChild(this.path),this.elementCreated&&this.elementCreated(this.path,e.component),this.canvas=e.component.svg);var s=n&&1===n.length&&n[0].cssClass||"",a=[0,0];t.xmin<0&&(a[0]=-t.xmin),t.ymin<0&&(a[1]=-t.ymin),r(this.path,{d:i(e.d),class:s,stroke:e.stroke?e.stroke:null,fill:e.fill?e.fill:null,transform:"translate("+a[0]+","+a[1]+")"})}};var i=function(e){return isNaN(e.cxy.x)||isNaN(e.cxy.y)?"":"M"+e.hxy.x+","+e.hxy.y+" L"+e.tail[0].x+","+e.tail[0].y+" L"+e.cxy.x+","+e.cxy.y+" L"+e.tail[1].x+","+e.tail[1].y+" L"+e.hxy.x+","+e.hxy.y};this.transfer=function(e){e.canvas&&this.path&&this.path.parentNode&&(this.path.parentNode.removeChild(this.path),e.canvas.appendChild(this.path))}};t.extend(d,[e.jsPlumbUIComponent,e.Overlays.AbstractOverlay],{cleanup:function(e){null!=this.path&&(e?this._jsPlumb.instance.removeElement(this.path):this.path.parentNode&&this.path.parentNode.removeChild(this.path))},reattach:function(e,t){this.path&&t.canvas&&t.canvas.appendChild(this.path)},setVisible:function(e){null!=this.path&&(this.path.style.display=e?"block":"none")}}),e.Overlays.svg.Arrow=function(){d.apply(this,[e.Overlays.Arrow,arguments])},t.extend(e.Overlays.svg.Arrow,[e.Overlays.Arrow,d]),e.Overlays.svg.PlainArrow=function(){d.apply(this,[e.Overlays.PlainArrow,arguments])},t.extend(e.Overlays.svg.PlainArrow,[e.Overlays.PlainArrow,d]),e.Overlays.svg.Diamond=function(){d.apply(this,[e.Overlays.Diamond,arguments])},t.extend(e.Overlays.svg.Diamond,[e.Overlays.Diamond,d]),e.Overlays.svg.GuideLines=function(){var t,n,i=null,s=this;e.Overlays.GuideLines.apply(this,arguments),this.paint=function(e,c){null==i&&(i=o("path"),e.connector.svg.appendChild(i),s.attachListeners(i,e.connector),s.attachListeners(i,s),t=o("path"),e.connector.svg.appendChild(t),s.attachListeners(t,e.connector),s.attachListeners(t,s),n=o("path"),e.connector.svg.appendChild(n),s.attachListeners(n,e.connector),s.attachListeners(n,s));var l=[0,0];c.xmin<0&&(l[0]=-c.xmin),c.ymin<0&&(l[1]=-c.ymin),r(i,{d:a(e.head,e.tail),stroke:"red",fill:null,transform:"translate("+l[0]+","+l[1]+")"}),r(t,{d:a(e.tailLine[0],e.tailLine[1]),stroke:"blue",fill:null,transform:"translate("+l[0]+","+l[1]+")"}),r(n,{d:a(e.headLine[0],e.headLine[1]),stroke:"green",fill:null,transform:"translate("+l[0]+","+l[1]+")"})};var a=function(e,t){return"M "+e.x+","+e.y+" L"+t.x+","+t.y}},t.extend(e.Overlays.svg.GuideLines,e.Overlays.GuideLines)}.call("undefined"!=typeof window?window:this),function(){"use strict";var e=this.jsPlumb,t=this.jsPlumbUtil,n=this.Katavorio,i=this.Biltong,r=function(t,r){var o="_katavorio_"+(r=r||"main"),s=t[o],a=t.getEventManager();return s||((s=new n({bind:a.on,unbind:a.off,getSize:e.getSize,getConstrainingRectangle:function(e){return[e.parentNode.scrollWidth,e.parentNode.scrollHeight]},getPosition:function(e,n){var i=t.getOffset(e,n,e._katavorioDrag?e.offsetParent:null);return[i.left,i.top]},setPosition:function(e,t){e.style.left=t[0]+"px",e.style.top=t[1]+"px"},addClass:e.addClass,removeClass:e.removeClass,intersects:i.intersects,indexOf:function(e,t){return e.indexOf(t)},scope:t.getDefaultScope(),css:{noSelect:t.dragSelectClass,droppable:"jtk-droppable",draggable:"jtk-draggable",drag:"jtk-drag",selected:"jtk-drag-selected",active:"jtk-drag-active",hover:"jtk-drag-hover",ghostProxy:"jtk-ghost-proxy"}})).setZoom(t.getZoom()),t[o]=s,t.bind("zoom",s.setZoom)),s};e.extend(this.jsPlumbInstance.prototype,{animationSupported:!0,getElement:function(e){return null==e?null:"string"==typeof(e="string"==typeof e?e:null!=e.length&&null==e.enctype?e[0]:e)?document.getElementById(e):e},removeElement:function(e){r(this).elementRemoved(e),this.getEventManager().remove(e)},doAnimate:function(n,i,r){r=r||{};var o=this.getOffset(n),s=function(e,n){var i=function(i){if(null!=n[i]){if(t.isString(n[i])){var r=n[i].match(/-=/)?-1:1,o=n[i].substring(2);return e[i]+r*o}return n[i]}return e[i]};return[i("left"),i("top")]}(o,i),a=s[0]-o.left,c=s[1]-o.top,l=r.duration||250,u=l/15,h=15/l*a,d=15/l*c,f=0,p=setInterval(function(){e.setPosition(n,{left:o.left+h*(f+1),top:o.top+d*(f+1)}),null!=r.step&&r.step(f,Math.ceil(u)),++f>=u&&(window.clearInterval(p),null!=r.complete&&r.complete())},15)},destroyDraggable:function(e,t){r(this,t).destroyDraggable(e)},unbindDraggable:function(e,t,n,i){r(this,i).destroyDraggable(e,t,n)},destroyDroppable:function(e,t){r(this,t).destroyDroppable(e)},unbindDroppable:function(e,t,n,i){r(this,i).destroyDroppable(e,t,n)},initDraggable:function(e,t,n){r(this,n).draggable(e,t)},initDroppable:function(e,t,n){r(this,n).droppable(e,t)},isAlreadyDraggable:function(e){return null!=e._katavorioDrag},isDragSupported:function(e,t){return!0},isDropSupported:function(e,t){return!0},isElementDraggable:function(t){return(t=e.getElement(t))._katavorioDrag&&t._katavorioDrag.isEnabled()},getDragObject:function(e){return e[0].drag.getDragElement()},getDragScope:function(e){return e._katavorioDrag&&e._katavorioDrag.scopes.join(" ")||""},getDropEvent:function(e){return e[0].e},getUIPosition:function(e,t){var n=e[0].el;if(null==n.offsetParent)return null;var i=e[0].finalPos||e[0].pos,r={left:i[0],top:i[1]};if(n._katavorioDrag&&n.offsetParent!==this.getContainer()){var o=this.getOffset(n.offsetParent);r.left+=o.left,r.top+=o.top}return r},setDragFilter:function(e,t,n){e._katavorioDrag&&e._katavorioDrag.setFilter(t,n)},setElementDraggable:function(t,n){(t=e.getElement(t))._katavorioDrag&&t._katavorioDrag.setEnabled(n)},setDragScope:function(e,t){e._katavorioDrag&&e._katavorioDrag.k.setDragScope(e,t)},setDropScope:function(e,t){e._katavorioDrop&&e._katavorioDrop.length>0&&e._katavorioDrop[0].k.setDropScope(e,t)},addToPosse:function(t,n){var i=Array.prototype.slice.call(arguments,1),o=r(this);e.each(t,function(t){(t=[e.getElement(t)]).push.apply(t,i),o.addToPosse.apply(o,t)})},setPosse:function(t,n){var i=Array.prototype.slice.call(arguments,1),o=r(this);e.each(t,function(t){(t=[e.getElement(t)]).push.apply(t,i),o.setPosse.apply(o,t)})},removeFromPosse:function(t,n){var i=Array.prototype.slice.call(arguments,1),o=r(this);e.each(t,function(t){(t=[e.getElement(t)]).push.apply(t,i),o.removeFromPosse.apply(o,t)})},removeFromAllPosses:function(t){var n=r(this);e.each(t,function(t){n.removeFromAllPosses(e.getElement(t))})},setPosseState:function(t,n,i){var o=r(this);e.each(t,function(t){o.setPosseState(e.getElement(t),n,i)})},dragEvents:{start:"start",stop:"stop",drag:"drag",step:"step",over:"over",out:"out",drop:"drop",complete:"complete",beforeStart:"beforeStart"},animEvents:{step:"step",complete:"complete"},stopDrag:function(e){e._katavorioDrag&&e._katavorioDrag.abort()},addToDragSelection:function(e){r(this).select(e)},removeFromDragSelection:function(e){r(this).deselect(e)},clearDragSelection:function(){r(this).deselectAll()},trigger:function(e,t,n,i){this.getEventManager().trigger(e,t,n,i)},doReset:function(){for(var e in this)0===e.indexOf("_katavorio_")&&this[e].reset()}});var o,s;o=e.init,(s=function(){/complete|loaded|interactive/.test(document.readyState)&&void 0!==document.body&&null!=document.body?o():setTimeout(s,9)})()}.call("undefined"!=typeof window?window:this)},function(e,t,n){"use strict";let i=n(102);e.exports=((t,n)=>{const r=t.Assertion,o=t.assert,s=n.proxify;function a(e){if("function"!=typeof e._obj.then)throw new TypeError(n.inspect(e._obj)+" is not a thenable.");if("function"!=typeof(t=e._obj).catch&&"function"==typeof t.always&&"function"==typeof t.done&&"function"==typeof t.fail&&"function"==typeof t.pipe&&"function"==typeof t.progress&&"function"==typeof t.state)throw new TypeError("Chai as Promised is incompatible with thenables of jQuery<3.0.0, sorry! Please upgrade jQuery or use another Promises/A+ compatible library (see http://promisesaplus.com/).");var t}function c(e){return void 0===s?e:s(e)}function l(e,t){n.addMethod(r.prototype,e,function(){return a(this),t.apply(this,arguments)})}function u(e,t){n.addProperty(r.prototype,e,function(){return a(this),c(t.apply(this,arguments))})}function h(e,t){e.then(()=>t(),t)}function d(e,t,n){e.assert(!0,null,t,n.expected,n.actual)}function f(e,t,n){e.assert(!1,t,null,n.expected,n.actual)}function p(e){return"function"==typeof e.then?e:e._obj}function g(e){return e instanceof Error?e.toString():i.getConstructorName(e)}n.checkError&&(i=n.checkError);const m=Object.getOwnPropertyNames(r.prototype),v={};for(const e of m)v[e]=Object.getOwnPropertyDescriptor(r.prototype,e);function y(t,i,r){if(!n.flag(i,"eventually"))return t.apply(i,r),i;const o=p(i).then(t=>(i._obj=t,n.flag(i,"eventually",!1),r?e.exports.transformAsserterArgs(r):r)).then(e=>(t.apply(i,e),i._obj));return e.exports.transferPromiseness(i,o),i}u("fulfilled",function(){const t=p(this).then(e=>(d(this,"expected promise not to be fulfilled but it was fulfilled with #{act}",{actual:e}),e),e=>(f(this,"expected promise to be fulfilled but it was rejected with #{act}",{actual:g(e)}),e));return e.exports.transferPromiseness(this,t),this}),u("rejected",function(){const t=p(this).then(e=>(f(this,"expected promise to be rejected but it was fulfilled with #{act}",{actual:e}),e),e=>(d(this,"expected promise not to be rejected but it was rejected with #{act}",{actual:g(e)}),e));return e.exports.transferPromiseness(this,t),this}),l("rejectedWith",function(t,r,o){let s=null;const a=n.flag(this,"negate")||!1;if(void 0===t&&void 0===r&&void 0===o)return this.rejected;void 0!==o&&n.flag(this,"message",o),t instanceof RegExp||"string"==typeof t?(r=t,t=null):t&&t instanceof Error?s=t.toString():"function"==typeof t?s=i.getConstructorName(t):t=null;const c=Boolean(t&&r);let l="including";r instanceof RegExp&&(l="matching");const u=p(this).then(e=>{let n=null,i=null;return t?(n="expected promise to be rejected with #{exp} but it was fulfilled with #{act}",i=s):r&&(n=`expected promise to be rejected with an error ${l} #{exp} but `+"it was fulfilled with #{act}",i=r),f(this,n,{expected:i,actual:e}),e},e=>{const n=t&&(t instanceof Error?i.compatibleInstance(e,t):i.compatibleConstructor(e,t)),o=r&&i.compatibleMessage(e,r),u=g(e);return a&&c?n&&o&&this.assert(!0,null,"expected promise not to be rejected with #{exp} but it was rejected with #{act}",s,u):(t&&this.assert(n,"expected promise to be rejected with #{exp} but it was rejected with #{act}","expected promise not to be rejected with #{exp} but it was rejected with #{act}",s,u),r&&this.assert(o,`expected promise to be rejected with an error ${l} #{exp} but got `+"#{act}",`expected promise not to be rejected with an error ${l} #{exp}`,r,i.getMessage(e))),e});return e.exports.transferPromiseness(this,u),this}),u("eventually",function(){return n.flag(this,"eventually",!0),this}),l("notify",function(e){return h(p(this),e),this}),l("become",function(e,t){return this.eventually.deep.equal(e,t)}),m.filter(e=>"assert"!==e&&"function"==typeof v[e].value).forEach(e=>{r.overwriteMethod(e,e=>(function(){return y(e,this,arguments)}))}),m.filter(e=>"_obj"!==e&&"function"==typeof v[e].get).forEach(e=>{r.prototype.__methods.hasOwnProperty(e)?r.overwriteChainableMethod(e,e=>(function(){return y(e,this,arguments)}),e=>(function(){return y(e,this)})):r.overwriteProperty(e,e=>(function(){return c(y(e,this))}))});const b=Object.getOwnPropertyNames(o).filter(e=>"function"==typeof o[e]);o.isFulfilled=((e,t)=>new r(e,t).to.be.fulfilled),o.isRejected=((e,t,n,i)=>{return new r(e,i).to.be.rejectedWith(t,n,i)}),o.becomes=((e,t,n)=>o.eventually.deepEqual(e,t,n)),o.doesNotBecome=((e,t,n)=>o.eventually.notDeepEqual(e,t,n)),o.eventually={},b.forEach(e=>{o.eventually[e]=function(i){const r=Array.prototype.slice.call(arguments,1);let s;const a=arguments[o[e].length-1];"string"==typeof a&&(s=(e=>{throw new t.AssertionError(`${a}\n\nOriginal reason: ${n.inspect(e)}`)}));const c=i.then(t=>o[e].apply(o,[t].concat(r)),s);return c.notify=(e=>{h(c,e)}),c}})}),e.exports.transferPromiseness=((e,t)=>{e.then=t.then.bind(t)}),e.exports.transformAsserterArgs=(e=>e)},function(e,t){
|
||
/*!
|
||
* chai
|
||
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e,t){
|
||
/*!
|
||
* Chai dependencies.
|
||
*/
|
||
var n=e.Assertion,i=t.flag,r=e.assert=function(t,i){new n(null,null,e.assert,!0).assert(t,i,"[ negation message unavailable ]")};
|
||
/*!
|
||
* Module export.
|
||
*/r.fail=function(t,n,i,o){throw i=i||"assert.fail()",new e.AssertionError(i,{actual:t,expected:n,operator:o},r.fail)},r.isOk=function(e,t){new n(e,t,r.isOk,!0).is.ok},r.isNotOk=function(e,t){new n(e,t,r.isNotOk,!0).is.not.ok},r.equal=function(e,t,o){var s=new n(e,o,r.equal,!0);s.assert(t==i(s,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,!0)},r.notEqual=function(e,t,o){var s=new n(e,o,r.notEqual,!0);s.assert(t!=i(s,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,!0)},r.strictEqual=function(e,t,i){new n(e,i,r.strictEqual,!0).to.equal(t)},r.notStrictEqual=function(e,t,i){new n(e,i,r.notStrictEqual,!0).to.not.equal(t)},r.deepEqual=r.deepStrictEqual=function(e,t,i){new n(e,i,r.deepEqual,!0).to.eql(t)},r.notDeepEqual=function(e,t,i){new n(e,i,r.notDeepEqual,!0).to.not.eql(t)},r.isAbove=function(e,t,i){new n(e,i,r.isAbove,!0).to.be.above(t)},r.isAtLeast=function(e,t,i){new n(e,i,r.isAtLeast,!0).to.be.least(t)},r.isBelow=function(e,t,i){new n(e,i,r.isBelow,!0).to.be.below(t)},r.isAtMost=function(e,t,i){new n(e,i,r.isAtMost,!0).to.be.most(t)},r.isTrue=function(e,t){new n(e,t,r.isTrue,!0).is.true},r.isNotTrue=function(e,t){new n(e,t,r.isNotTrue,!0).to.not.equal(!0)},r.isFalse=function(e,t){new n(e,t,r.isFalse,!0).is.false},r.isNotFalse=function(e,t){new n(e,t,r.isNotFalse,!0).to.not.equal(!1)},r.isNull=function(e,t){new n(e,t,r.isNull,!0).to.equal(null)},r.isNotNull=function(e,t){new n(e,t,r.isNotNull,!0).to.not.equal(null)},r.isNaN=function(e,t){new n(e,t,r.isNaN,!0).to.be.NaN},r.isNotNaN=function(e,t){new n(e,t,r.isNotNaN,!0).not.to.be.NaN},r.exists=function(e,t){new n(e,t,r.exists,!0).to.exist},r.notExists=function(e,t){new n(e,t,r.notExists,!0).to.not.exist},r.isUndefined=function(e,t){new n(e,t,r.isUndefined,!0).to.equal(void 0)},r.isDefined=function(e,t){new n(e,t,r.isDefined,!0).to.not.equal(void 0)},r.isFunction=function(e,t){new n(e,t,r.isFunction,!0).to.be.a("function")},r.isNotFunction=function(e,t){new n(e,t,r.isNotFunction,!0).to.not.be.a("function")},r.isObject=function(e,t){new n(e,t,r.isObject,!0).to.be.a("object")},r.isNotObject=function(e,t){new n(e,t,r.isNotObject,!0).to.not.be.a("object")},r.isArray=function(e,t){new n(e,t,r.isArray,!0).to.be.an("array")},r.isNotArray=function(e,t){new n(e,t,r.isNotArray,!0).to.not.be.an("array")},r.isString=function(e,t){new n(e,t,r.isString,!0).to.be.a("string")},r.isNotString=function(e,t){new n(e,t,r.isNotString,!0).to.not.be.a("string")},r.isNumber=function(e,t){new n(e,t,r.isNumber,!0).to.be.a("number")},r.isNotNumber=function(e,t){new n(e,t,r.isNotNumber,!0).to.not.be.a("number")},r.isFinite=function(e,t){new n(e,t,r.isFinite,!0).to.be.finite},r.isBoolean=function(e,t){new n(e,t,r.isBoolean,!0).to.be.a("boolean")},r.isNotBoolean=function(e,t){new n(e,t,r.isNotBoolean,!0).to.not.be.a("boolean")},r.typeOf=function(e,t,i){new n(e,i,r.typeOf,!0).to.be.a(t)},r.notTypeOf=function(e,t,i){new n(e,i,r.notTypeOf,!0).to.not.be.a(t)},r.instanceOf=function(e,t,i){new n(e,i,r.instanceOf,!0).to.be.instanceOf(t)},r.notInstanceOf=function(e,t,i){new n(e,i,r.notInstanceOf,!0).to.not.be.instanceOf(t)},r.include=function(e,t,i){new n(e,i,r.include,!0).include(t)},r.notInclude=function(e,t,i){new n(e,i,r.notInclude,!0).not.include(t)},r.deepInclude=function(e,t,i){new n(e,i,r.deepInclude,!0).deep.include(t)},r.notDeepInclude=function(e,t,i){new n(e,i,r.notDeepInclude,!0).not.deep.include(t)},r.nestedInclude=function(e,t,i){new n(e,i,r.nestedInclude,!0).nested.include(t)},r.notNestedInclude=function(e,t,i){new n(e,i,r.notNestedInclude,!0).not.nested.include(t)},r.deepNestedInclude=function(e,t,i){new n(e,i,r.deepNestedInclude,!0).deep.nested.include(t)},r.notDeepNestedInclude=function(e,t,i){new n(e,i,r.notDeepNestedInclude,!0).not.deep.nested.include(t)},r.ownInclude=function(e,t,i){new n(e,i,r.ownInclude,!0).own.include(t)},r.notOwnInclude=function(e,t,i){new n(e,i,r.notOwnInclude,!0).not.own.include(t)},r.deepOwnInclude=function(e,t,i){new n(e,i,r.deepOwnInclude,!0).deep.own.include(t)},r.notDeepOwnInclude=function(e,t,i){new n(e,i,r.notDeepOwnInclude,!0).not.deep.own.include(t)},r.match=function(e,t,i){new n(e,i,r.match,!0).to.match(t)},r.notMatch=function(e,t,i){new n(e,i,r.notMatch,!0).to.not.match(t)},r.property=function(e,t,i){new n(e,i,r.property,!0).to.have.property(t)},r.notProperty=function(e,t,i){new n(e,i,r.notProperty,!0).to.not.have.property(t)},r.propertyVal=function(e,t,i,o){new n(e,o,r.propertyVal,!0).to.have.property(t,i)},r.notPropertyVal=function(e,t,i,o){new n(e,o,r.notPropertyVal,!0).to.not.have.property(t,i)},r.deepPropertyVal=function(e,t,i,o){new n(e,o,r.deepPropertyVal,!0).to.have.deep.property(t,i)},r.notDeepPropertyVal=function(e,t,i,o){new n(e,o,r.notDeepPropertyVal,!0).to.not.have.deep.property(t,i)},r.ownProperty=function(e,t,i){new n(e,i,r.ownProperty,!0).to.have.own.property(t)},r.notOwnProperty=function(e,t,i){new n(e,i,r.notOwnProperty,!0).to.not.have.own.property(t)},r.ownPropertyVal=function(e,t,i,o){new n(e,o,r.ownPropertyVal,!0).to.have.own.property(t,i)},r.notOwnPropertyVal=function(e,t,i,o){new n(e,o,r.notOwnPropertyVal,!0).to.not.have.own.property(t,i)},r.deepOwnPropertyVal=function(e,t,i,o){new n(e,o,r.deepOwnPropertyVal,!0).to.have.deep.own.property(t,i)},r.notDeepOwnPropertyVal=function(e,t,i,o){new n(e,o,r.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,i)},r.nestedProperty=function(e,t,i){new n(e,i,r.nestedProperty,!0).to.have.nested.property(t)},r.notNestedProperty=function(e,t,i){new n(e,i,r.notNestedProperty,!0).to.not.have.nested.property(t)},r.nestedPropertyVal=function(e,t,i,o){new n(e,o,r.nestedPropertyVal,!0).to.have.nested.property(t,i)},r.notNestedPropertyVal=function(e,t,i,o){new n(e,o,r.notNestedPropertyVal,!0).to.not.have.nested.property(t,i)},r.deepNestedPropertyVal=function(e,t,i,o){new n(e,o,r.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,i)},r.notDeepNestedPropertyVal=function(e,t,i,o){new n(e,o,r.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,i)},r.lengthOf=function(e,t,i){new n(e,i,r.lengthOf,!0).to.have.lengthOf(t)},r.hasAnyKeys=function(e,t,i){new n(e,i,r.hasAnyKeys,!0).to.have.any.keys(t)},r.hasAllKeys=function(e,t,i){new n(e,i,r.hasAllKeys,!0).to.have.all.keys(t)},r.containsAllKeys=function(e,t,i){new n(e,i,r.containsAllKeys,!0).to.contain.all.keys(t)},r.doesNotHaveAnyKeys=function(e,t,i){new n(e,i,r.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)},r.doesNotHaveAllKeys=function(e,t,i){new n(e,i,r.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)},r.hasAnyDeepKeys=function(e,t,i){new n(e,i,r.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)},r.hasAllDeepKeys=function(e,t,i){new n(e,i,r.hasAllDeepKeys,!0).to.have.all.deep.keys(t)},r.containsAllDeepKeys=function(e,t,i){new n(e,i,r.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)},r.doesNotHaveAnyDeepKeys=function(e,t,i){new n(e,i,r.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)},r.doesNotHaveAllDeepKeys=function(e,t,i){new n(e,i,r.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)},r.throws=function(e,t,o,s){("string"==typeof t||t instanceof RegExp)&&(o=t,t=null);var a=new n(e,s,r.throws,!0).to.throw(t,o);return i(a,"object")},r.doesNotThrow=function(e,t,i,o){("string"==typeof t||t instanceof RegExp)&&(i=t,t=null),new n(e,o,r.doesNotThrow,!0).to.not.throw(t,i)},r.operator=function(o,s,a,c){var l;switch(s){case"==":l=o==a;break;case"===":l=o===a;break;case">":l=o>a;break;case">=":l=o>=a;break;case"<":l=o<a;break;case"<=":l=o<=a;break;case"!=":l=o!=a;break;case"!==":l=o!==a;break;default:throw c=c?c+": ":c,new e.AssertionError(c+'Invalid operator "'+s+'"',void 0,r.operator)}var u=new n(l,c,r.operator,!0);u.assert(!0===i(u,"object"),"expected "+t.inspect(o)+" to be "+s+" "+t.inspect(a),"expected "+t.inspect(o)+" to not be "+s+" "+t.inspect(a))},r.closeTo=function(e,t,i,o){new n(e,o,r.closeTo,!0).to.be.closeTo(t,i)},r.approximately=function(e,t,i,o){new n(e,o,r.approximately,!0).to.be.approximately(t,i)},r.sameMembers=function(e,t,i){new n(e,i,r.sameMembers,!0).to.have.same.members(t)},r.notSameMembers=function(e,t,i){new n(e,i,r.notSameMembers,!0).to.not.have.same.members(t)},r.sameDeepMembers=function(e,t,i){new n(e,i,r.sameDeepMembers,!0).to.have.same.deep.members(t)},r.notSameDeepMembers=function(e,t,i){new n(e,i,r.notSameDeepMembers,!0).to.not.have.same.deep.members(t)},r.sameOrderedMembers=function(e,t,i){new n(e,i,r.sameOrderedMembers,!0).to.have.same.ordered.members(t)},r.notSameOrderedMembers=function(e,t,i){new n(e,i,r.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)},r.sameDeepOrderedMembers=function(e,t,i){new n(e,i,r.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)},r.notSameDeepOrderedMembers=function(e,t,i){new n(e,i,r.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)},r.includeMembers=function(e,t,i){new n(e,i,r.includeMembers,!0).to.include.members(t)},r.notIncludeMembers=function(e,t,i){new n(e,i,r.notIncludeMembers,!0).to.not.include.members(t)},r.includeDeepMembers=function(e,t,i){new n(e,i,r.includeDeepMembers,!0).to.include.deep.members(t)},r.notIncludeDeepMembers=function(e,t,i){new n(e,i,r.notIncludeDeepMembers,!0).to.not.include.deep.members(t)},r.includeOrderedMembers=function(e,t,i){new n(e,i,r.includeOrderedMembers,!0).to.include.ordered.members(t)},r.notIncludeOrderedMembers=function(e,t,i){new n(e,i,r.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)},r.includeDeepOrderedMembers=function(e,t,i){new n(e,i,r.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)},r.notIncludeDeepOrderedMembers=function(e,t,i){new n(e,i,r.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)},r.oneOf=function(e,t,i){new n(e,i,r.oneOf,!0).to.be.oneOf(t)},r.changes=function(e,t,i,o){3===arguments.length&&"function"==typeof t&&(o=i,i=null),new n(e,o,r.changes,!0).to.change(t,i)},r.changesBy=function(e,t,i,o,s){if(4===arguments.length&&"function"==typeof t){var a=o;o=i,s=a}else 3===arguments.length&&(o=i,i=null);new n(e,s,r.changesBy,!0).to.change(t,i).by(o)},r.doesNotChange=function(e,t,i,o){return 3===arguments.length&&"function"==typeof t&&(o=i,i=null),new n(e,o,r.doesNotChange,!0).to.not.change(t,i)},r.changesButNotBy=function(e,t,i,o,s){if(4===arguments.length&&"function"==typeof t){var a=o;o=i,s=a}else 3===arguments.length&&(o=i,i=null);new n(e,s,r.changesButNotBy,!0).to.change(t,i).but.not.by(o)},r.increases=function(e,t,i,o){return 3===arguments.length&&"function"==typeof t&&(o=i,i=null),new n(e,o,r.increases,!0).to.increase(t,i)},r.increasesBy=function(e,t,i,o,s){if(4===arguments.length&&"function"==typeof t){var a=o;o=i,s=a}else 3===arguments.length&&(o=i,i=null);new n(e,s,r.increasesBy,!0).to.increase(t,i).by(o)},r.doesNotIncrease=function(e,t,i,o){return 3===arguments.length&&"function"==typeof t&&(o=i,i=null),new n(e,o,r.doesNotIncrease,!0).to.not.increase(t,i)},r.increasesButNotBy=function(e,t,i,o,s){if(4===arguments.length&&"function"==typeof t){var a=o;o=i,s=a}else 3===arguments.length&&(o=i,i=null);new n(e,s,r.increasesButNotBy,!0).to.increase(t,i).but.not.by(o)},r.decreases=function(e,t,i,o){return 3===arguments.length&&"function"==typeof t&&(o=i,i=null),new n(e,o,r.decreases,!0).to.decrease(t,i)},r.decreasesBy=function(e,t,i,o,s){if(4===arguments.length&&"function"==typeof t){var a=o;o=i,s=a}else 3===arguments.length&&(o=i,i=null);new n(e,s,r.decreasesBy,!0).to.decrease(t,i).by(o)},r.doesNotDecrease=function(e,t,i,o){return 3===arguments.length&&"function"==typeof t&&(o=i,i=null),new n(e,o,r.doesNotDecrease,!0).to.not.decrease(t,i)},r.doesNotDecreaseBy=function(e,t,i,o,s){if(4===arguments.length&&"function"==typeof t){var a=o;o=i,s=a}else 3===arguments.length&&(o=i,i=null);return new n(e,s,r.doesNotDecreaseBy,!0).to.not.decrease(t,i).by(o)},r.decreasesButNotBy=function(e,t,i,o,s){if(4===arguments.length&&"function"==typeof t){var a=o;o=i,s=a}else 3===arguments.length&&(o=i,i=null);new n(e,s,r.decreasesButNotBy,!0).to.decrease(t,i).but.not.by(o)}
|
||
/*!
|
||
* ### .ifError(object)
|
||
*
|
||
* Asserts if value is not a false value, and throws if it is a true value.
|
||
* This is added to allow for chai to be a drop-in replacement for Node's
|
||
* assert class.
|
||
*
|
||
* var err = new Error('I am a custom error');
|
||
* assert.ifError(err); // Rethrows err!
|
||
*
|
||
* @name ifError
|
||
* @param {Object} object
|
||
* @namespace Assert
|
||
* @api public
|
||
*/,r.ifError=function(e){if(e)throw e},r.isExtensible=function(e,t){new n(e,t,r.isExtensible,!0).to.be.extensible},r.isNotExtensible=function(e,t){new n(e,t,r.isNotExtensible,!0).to.not.be.extensible},r.isSealed=function(e,t){new n(e,t,r.isSealed,!0).to.be.sealed},r.isNotSealed=function(e,t){new n(e,t,r.isNotSealed,!0).to.not.be.sealed},r.isFrozen=function(e,t){new n(e,t,r.isFrozen,!0).to.be.frozen},r.isNotFrozen=function(e,t){new n(e,t,r.isNotFrozen,!0).to.not.be.frozen},r.isEmpty=function(e,t){new n(e,t,r.isEmpty,!0).to.be.empty},r.isNotEmpty=function(e,t){new n(e,t,r.isNotEmpty,!0).to.not.be.empty},
|
||
/*!
|
||
* Aliases.
|
||
*/
|
||
function e(t,n){return r[n]=r[t],e}("isOk","ok")("isNotOk","notOk")("throws","throw")("throws","Throw")("isExtensible","extensible")("isNotExtensible","notExtensible")("isSealed","sealed")("isNotSealed","notSealed")("isFrozen","frozen")("isNotFrozen","notFrozen")("isEmpty","empty")("isNotEmpty","notEmpty")}},function(e,t){
|
||
/*!
|
||
* chai
|
||
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e,t){var n=e.Assertion;function i(){Object.defineProperty(Object.prototype,"should",{set:function(e){Object.defineProperty(this,"should",{value:e,enumerable:!0,configurable:!0,writable:!0})},get:function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||"function"==typeof Symbol&&this instanceof Symbol?new n(this.valueOf(),null,e):new n(this,null,e)},configurable:!0});var t={fail:function(n,i,r,o){throw r=r||"should.fail()",new e.AssertionError(r,{actual:n,expected:i,operator:o},t.fail)},equal:function(e,t,i){new n(e,i).to.equal(t)},Throw:function(e,t,i,r){new n(e,r).to.Throw(t,i)},exist:function(e,t){new n(e,t).to.exist},not:{}};return t.not.equal=function(e,t,i){new n(e,i).to.not.equal(t)},t.not.Throw=function(e,t,i,r){new n(e,r).to.not.Throw(t,i)},t.not.exist=function(e,t){new n(e,t).to.not.exist},t.throw=t.Throw,t.not.throw=t.not.Throw,t}e.should=i,e.Should=i}},function(e,t){
|
||
/*!
|
||
* chai
|
||
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e,t){e.expect=function(t,n){return new e.Assertion(t,n)},e.expect.fail=function(t,n,i,r){throw i=i||"expect.fail()",new e.AssertionError(i,{actual:t,expected:n,operator:r},e.expect.fail)}}},function(e,t){
|
||
/*!
|
||
* chai
|
||
* http://chaijs.com
|
||
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e,t){var n=e.Assertion,i=e.AssertionError,r=t.flag;function o(e,n){n&&r(this,"message",n),e=e.toLowerCase();var i=r(this,"object"),o=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";this.assert(e===t.type(i).toLowerCase(),"expected #{this} to be "+o+e,"expected #{this} not to be "+o+e)}function s(e,n){return t.isNaN(e)&&t.isNaN(n)||e===n}function a(){r(this,"contains",!0)}function c(e,o){o&&r(this,"message",o);var a=r(this,"object"),c=t.type(a).toLowerCase(),l=r(this,"message"),u=r(this,"negate"),h=r(this,"ssfi"),d=r(this,"deep"),f=d?"deep ":"";l=l?l+": ":"";var p=!1;switch(c){case"string":p=-1!==a.indexOf(e);break;case"weakset":if(d)throw new i(l+"unable to use .deep.include with WeakSet",void 0,h);p=a.has(e);break;case"map":var g=d?t.eql:s;a.forEach(function(t){p=p||g(t,e)});break;case"set":d?a.forEach(function(n){p=p||t.eql(n,e)}):p=a.has(e);break;case"array":p=d?a.some(function(n){return t.eql(n,e)}):-1!==a.indexOf(e);break;default:if(e!==Object(e))throw new i(l+"object tested must be an array, a map, an object, a set, a string, or a weakset, but "+c+" given",void 0,h);var m=Object.keys(e),v=null,y=0;if(m.forEach(function(o){var s=new n(a);if(t.transferFlags(this,s,!0),r(s,"lockSsfi",!0),u&&1!==m.length)try{s.property(o,e[o])}catch(e){if(!t.checkError.compatibleConstructor(e,i))throw e;null===v&&(v=e),y++}else s.property(o,e[o])},this),u&&m.length>1&&y===m.length)throw v;return}this.assert(p,"expected #{this} to "+f+"include "+t.inspect(e),"expected #{this} to not "+f+"include "+t.inspect(e))}function l(){var e=r(this,"object"),n=t.type(e);this.assert("Arguments"===n,"expected #{this} to be arguments but got "+n,"expected #{this} to not be arguments")}function u(e,t){t&&r(this,"message",t);var n=r(this,"object");if(r(this,"deep"))return this.eql(e);this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}function h(e,n){n&&r(this,"message",n),this.assert(t.eql(e,r(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}function d(e,o){o&&r(this,"message",o);var s=r(this,"object"),a=r(this,"doLength"),c=r(this,"message"),l=c?c+": ":"",u=r(this,"ssfi"),h=t.type(s).toLowerCase(),d=t.type(e).toLowerCase(),f=!0;if(a&&new n(s,c,u,!0).to.have.property("length"),a||"date"!==h||"date"===d)if("number"===d||!a&&"number"!==h)if(a||"date"===h||"number"===h)f=!1;else{errorMessage=l+"expected "+("string"===h?"'"+s+"'":s)+" to be a number or a date"}else errorMessage=l+"the argument to above must be a number";else errorMessage=l+"the argument to above must be a date";if(f)throw new i(errorMessage,void 0,u);if(a){var p=s.length;this.assert(p>e,"expected #{this} to have a length above #{exp} but got #{act}","expected #{this} to not have a length above #{exp}",e,p)}else this.assert(s>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e)}function f(e,o){o&&r(this,"message",o);var s=r(this,"object"),a=r(this,"doLength"),c=r(this,"message"),l=c?c+": ":"",u=r(this,"ssfi"),h=t.type(s).toLowerCase(),d=t.type(e).toLowerCase(),f=!0;if(a&&new n(s,c,u,!0).to.have.property("length"),a||"date"!==h||"date"===d)if("number"===d||!a&&"number"!==h)if(a||"date"===h||"number"===h)f=!1;else{errorMessage=l+"expected "+("string"===h?"'"+s+"'":s)+" to be a number or a date"}else errorMessage=l+"the argument to least must be a number";else errorMessage=l+"the argument to least must be a date";if(f)throw new i(errorMessage,void 0,u);if(a){var p=s.length;this.assert(p>=e,"expected #{this} to have a length at least #{exp} but got #{act}","expected #{this} to have a length below #{exp}",e,p)}else this.assert(s>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e)}function p(e,o){o&&r(this,"message",o);var s=r(this,"object"),a=r(this,"doLength"),c=r(this,"message"),l=c?c+": ":"",u=r(this,"ssfi"),h=t.type(s).toLowerCase(),d=t.type(e).toLowerCase(),f=!0;if(a&&new n(s,c,u,!0).to.have.property("length"),a||"date"!==h||"date"===d)if("number"===d||!a&&"number"!==h)if(a||"date"===h||"number"===h)f=!1;else{errorMessage=l+"expected "+("string"===h?"'"+s+"'":s)+" to be a number or a date"}else errorMessage=l+"the argument to below must be a number";else errorMessage=l+"the argument to below must be a date";if(f)throw new i(errorMessage,void 0,u);if(a){var p=s.length;this.assert(p<e,"expected #{this} to have a length below #{exp} but got #{act}","expected #{this} to not have a length below #{exp}",e,p)}else this.assert(s<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e)}function g(e,o){o&&r(this,"message",o);var s=r(this,"object"),a=r(this,"doLength"),c=r(this,"message"),l=c?c+": ":"",u=r(this,"ssfi"),h=t.type(s).toLowerCase(),d=t.type(e).toLowerCase(),f=!0;if(a&&new n(s,c,u,!0).to.have.property("length"),a||"date"!==h||"date"===d)if("number"===d||!a&&"number"!==h)if(a||"date"===h||"number"===h)f=!1;else{errorMessage=l+"expected "+("string"===h?"'"+s+"'":s)+" to be a number or a date"}else errorMessage=l+"the argument to most must be a number";else errorMessage=l+"the argument to most must be a date";if(f)throw new i(errorMessage,void 0,u);if(a){var p=s.length;this.assert(p<=e,"expected #{this} to have a length at most #{exp} but got #{act}","expected #{this} to have a length above #{exp}",e,p)}else this.assert(s<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e)}function m(e,n){n&&r(this,"message",n);var o=r(this,"object"),s=r(this,"ssfi"),a=r(this,"message");try{var c=o instanceof e}catch(n){if(n instanceof TypeError)throw new i((a=a?a+": ":"")+"The instanceof assertion needs a constructor but "+t.type(e)+" was given.",void 0,s);throw n}var l=t.getName(e);null===l&&(l="an unnamed constructor"),this.assert(c,"expected #{this} to be an instance of "+l,"expected #{this} to not be an instance of "+l)}function v(e,n,o){o&&r(this,"message",o);var s=r(this,"nested"),a=r(this,"own"),c=r(this,"message"),l=r(this,"object"),u=r(this,"ssfi");if(s&&a)throw new i((c=c?c+": ":"")+'The "nested" and "own" flags cannot be combined.',void 0,u);if(null===l||void 0===l)throw new i((c=c?c+": ":"")+"Target cannot be null or undefined.",void 0,u);var h,d=r(this,"deep"),f=r(this,"negate"),p=s?t.getPathInfo(l,e):null,g=s?p.value:l[e],m="";d&&(m+="deep "),a&&(m+="own "),s&&(m+="nested "),m+="property ",h=a?Object.prototype.hasOwnProperty.call(l,e):s?p.exists:t.hasProperty(l,e),f&&1!==arguments.length||this.assert(h,"expected #{this} to have "+m+t.inspect(e),"expected #{this} to not have "+m+t.inspect(e)),arguments.length>1&&this.assert(h&&(d?t.eql(n,g):n===g),"expected #{this} to have "+m+t.inspect(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+t.inspect(e)+" of #{act}",n,g),r(this,"object",g)}function y(e,t,n){r(this,"own",!0),v.apply(this,arguments)}function b(e,n,i){"string"==typeof n&&(i=n,n=null),i&&r(this,"message",i);var o=r(this,"object"),s=Object.getOwnPropertyDescriptor(Object(o),e);s&&n?this.assert(t.eql(n,s),"expected the own property descriptor for "+t.inspect(e)+" on #{this} to match "+t.inspect(n)+", got "+t.inspect(s),"expected the own property descriptor for "+t.inspect(e)+" on #{this} to not match "+t.inspect(n),n,s,!0):this.assert(s,"expected #{this} to have an own property descriptor for "+t.inspect(e),"expected #{this} to not have an own property descriptor for "+t.inspect(e)),r(this,"object",s)}function w(){r(this,"doLength",!0)}function x(e,t){t&&r(this,"message",t);var i=r(this,"object"),o=r(this,"message"),s=r(this,"ssfi");new n(i,o,s,!0).to.have.property("length");var a=i.length;this.assert(a==e,"expected #{this} to have a length of #{exp} but got #{act}","expected #{this} to not have a length of #{act}",e,a)}function _(e,t){t&&r(this,"message",t);var n=r(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e)}function k(e){var n,o=r(this,"object"),s=t.type(o),a=t.type(e),c=r(this,"ssfi"),l=r(this,"deep"),u="",h=!0,d=r(this,"message"),f=(d=d?d+": ":"")+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if("Map"===s||"Set"===s)u=l?"deeply ":"",p=[],o.forEach(function(e,t){p.push(t)}),"Array"!==a&&(e=Array.prototype.slice.call(arguments));else{switch(p=t.getOwnEnumerableProperties(o),a){case"Array":if(arguments.length>1)throw new i(f,void 0,c);break;case"Object":if(arguments.length>1)throw new i(f,void 0,c);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(e){return"symbol"==typeof e?e:String(e)})}if(!e.length)throw new i(d+"keys required",void 0,c);var p,g=e.length,m=r(this,"any"),v=r(this,"all"),y=e;if(m||v||(v=!0),m&&(h=y.some(function(e){return p.some(function(n){return l?t.eql(e,n):e===n})})),v&&(h=y.every(function(e){return p.some(function(n){return l?t.eql(e,n):e===n})}),r(this,"contains")||(h=h&&e.length==p.length)),g>1){var b=(e=e.map(function(e){return t.inspect(e)})).pop();v&&(n=e.join(", ")+", and "+b),m&&(n=e.join(", ")+", or "+b)}else n=t.inspect(e[0]);n=(g>1?"keys ":"key ")+n,n=(r(this,"contains")?"contain ":"have ")+n,this.assert(h,"expected #{this} to "+u+n,"expected #{this} to not "+u+n,y.slice(0).sort(t.compareByInspect),p.sort(t.compareByInspect),!0)}function C(e,i,o){o&&r(this,"message",o);var s,a=r(this,"object"),c=r(this,"ssfi"),l=r(this,"message"),u=r(this,"negate")||!1;new n(a,l,c,!0).is.a("function"),(e instanceof RegExp||"string"==typeof e)&&(i=e,e=null);try{a()}catch(e){s=e}var h=void 0===e&&void 0===i,d=Boolean(e&&i),f=!1,p=!1;if(h||!h&&!u){var g="an error";e instanceof Error?g="#{exp}":e&&(g=t.checkError.getConstructorName(e)),this.assert(s,"expected #{this} to throw "+g,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),s instanceof Error?s.toString():"string"==typeof s?s:s&&t.checkError.getConstructorName(s))}if(e&&s){if(e instanceof Error)t.checkError.compatibleInstance(s,e)===u&&(d&&u?f=!0:this.assert(u,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(s&&!u?" but #{act} was thrown":""),e.toString(),s.toString()));t.checkError.compatibleConstructor(s,e)===u&&(d&&u?f=!0:this.assert(u,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(s?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&t.checkError.getConstructorName(e),s instanceof Error?s.toString():s&&t.checkError.getConstructorName(s)))}if(s&&void 0!==i&&null!==i){var m="including";i instanceof RegExp&&(m="matching"),t.checkError.compatibleMessage(s,i)===u&&(d&&u?p=!0:this.assert(u,"expected #{this} to throw error "+m+" #{exp} but got #{act}","expected #{this} to throw error not "+m+" #{exp}",i,t.checkError.getMessage(s)))}f&&p&&this.assert(u,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(s?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&t.checkError.getConstructorName(e),s instanceof Error?s.toString():s&&t.checkError.getConstructorName(s)),r(this,"object",s)}function E(e,n){n&&r(this,"message",n);var i=r(this,"object"),o=r(this,"itself"),s="function"!=typeof i||o?i[e]:i.prototype[e];this.assert("function"==typeof s,"expected #{this} to respond to "+t.inspect(e),"expected #{this} to not respond to "+t.inspect(e))}function A(e,n){n&&r(this,"message",n);var i=e(r(this,"object"));this.assert(i,"expected #{this} to satisfy "+t.objDisplay(e),"expected #{this} to not satisfy"+t.objDisplay(e),!r(this,"negate"),i)}function S(e,t,o){o&&r(this,"message",o);var s=r(this,"object"),a=r(this,"message"),c=r(this,"ssfi");if(new n(s,a,c,!0).is.a("number"),"number"!=typeof e||"number"!=typeof t)throw new i((a=a?a+": ":"")+"the arguments to closeTo or approximately must be numbers",void 0,c);this.assert(Math.abs(s-e)<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t)}function F(e,t,i){i&&r(this,"message",i);var o,s=r(this,"object"),a=r(this,"message"),c=r(this,"ssfi");new n(s,a,c,!0).is.a("function"),t?(new n(e,a,c,!0).to.have.property(t),o=e[t]):(new n(e,a,c,!0).is.a("function"),o=e()),s();var l=void 0===t||null===t?e():e[t],u=void 0===t||null===t?o:"."+t;r(this,"deltaMsgObj",u),r(this,"initialDeltaValue",o),r(this,"finalDeltaValue",l),r(this,"deltaBehavior","change"),r(this,"realDelta",l!==o),this.assert(o!==l,"expected "+u+" to change","expected "+u+" to not change")}function T(e,t,i){i&&r(this,"message",i);var o,s=r(this,"object"),a=r(this,"message"),c=r(this,"ssfi");new n(s,a,c,!0).is.a("function"),t?(new n(e,a,c,!0).to.have.property(t),o=e[t]):(new n(e,a,c,!0).is.a("function"),o=e()),new n(o,a,c,!0).is.a("number"),s();var l=void 0===t||null===t?e():e[t],u=void 0===t||null===t?o:"."+t;r(this,"deltaMsgObj",u),r(this,"initialDeltaValue",o),r(this,"finalDeltaValue",l),r(this,"deltaBehavior","increase"),r(this,"realDelta",l-o),this.assert(l-o>0,"expected "+u+" to increase","expected "+u+" to not increase")}function D(e,t,i){i&&r(this,"message",i);var o,s=r(this,"object"),a=r(this,"message"),c=r(this,"ssfi");new n(s,a,c,!0).is.a("function"),t?(new n(e,a,c,!0).to.have.property(t),o=e[t]):(new n(e,a,c,!0).is.a("function"),o=e()),new n(o,a,c,!0).is.a("number"),s();var l=void 0===t||null===t?e():e[t],u=void 0===t||null===t?o:"."+t;r(this,"deltaMsgObj",u),r(this,"initialDeltaValue",o),r(this,"finalDeltaValue",l),r(this,"deltaBehavior","decrease"),r(this,"realDelta",o-l),this.assert(l-o<0,"expected "+u+" to decrease","expected "+u+" to not decrease")}["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does"].forEach(function(e){n.addProperty(e)}),n.addProperty("not",function(){r(this,"negate",!0)}),n.addProperty("deep",function(){r(this,"deep",!0)}),n.addProperty("nested",function(){r(this,"nested",!0)}),n.addProperty("own",function(){r(this,"own",!0)}),n.addProperty("ordered",function(){r(this,"ordered",!0)}),n.addProperty("any",function(){r(this,"any",!0),r(this,"all",!1)}),n.addProperty("all",function(){r(this,"all",!0),r(this,"any",!1)}),n.addChainableMethod("an",o),n.addChainableMethod("a",o),n.addChainableMethod("include",c,a),n.addChainableMethod("contain",c,a),n.addChainableMethod("contains",c,a),n.addChainableMethod("includes",c,a),n.addProperty("ok",function(){this.assert(r(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),n.addProperty("true",function(){this.assert(!0===r(this,"object"),"expected #{this} to be true","expected #{this} to be false",!r(this,"negate"))}),n.addProperty("false",function(){this.assert(!1===r(this,"object"),"expected #{this} to be false","expected #{this} to be true",!!r(this,"negate"))}),n.addProperty("null",function(){this.assert(null===r(this,"object"),"expected #{this} to be null","expected #{this} not to be null")}),n.addProperty("undefined",function(){this.assert(void 0===r(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined")}),n.addProperty("NaN",function(){this.assert(t.isNaN(r(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")}),n.addProperty("exist",function(){var e=r(this,"object");this.assert(null!==e&&void 0!==e,"expected #{this} to exist","expected #{this} to not exist")}),n.addProperty("empty",function(){var e,n=r(this,"object"),o=r(this,"ssfi"),s=r(this,"message");switch(s=s?s+": ":"",t.type(n).toLowerCase()){case"array":case"string":e=n.length;break;case"map":case"set":e=n.size;break;case"weakmap":case"weakset":throw new i(s+".empty was passed a weak collection",void 0,o);case"function":var a=s+".empty was passed a function "+t.getName(n);throw new i(a.trim(),void 0,o);default:if(n!==Object(n))throw new i(s+".empty was passed non-string primitive "+t.inspect(n),void 0,o);e=Object.keys(n).length}this.assert(0===e,"expected #{this} to be empty","expected #{this} not to be empty")}),n.addProperty("arguments",l),n.addProperty("Arguments",l),n.addMethod("equal",u),n.addMethod("equals",u),n.addMethod("eq",u),n.addMethod("eql",h),n.addMethod("eqls",h),n.addMethod("above",d),n.addMethod("gt",d),n.addMethod("greaterThan",d),n.addMethod("least",f),n.addMethod("gte",f),n.addMethod("below",p),n.addMethod("lt",p),n.addMethod("lessThan",p),n.addMethod("most",g),n.addMethod("lte",g),n.addMethod("within",function(e,o,s){s&&r(this,"message",s);var a=r(this,"object"),c=r(this,"doLength"),l=r(this,"message"),u=l?l+": ":"",h=r(this,"ssfi"),d=t.type(a).toLowerCase(),f=t.type(e).toLowerCase(),p=t.type(o).toLowerCase(),g=!0,m="date"===f&&"date"===p?e.toUTCString()+".."+o.toUTCString():e+".."+o;if(c&&new n(a,l,h,!0).to.have.property("length"),c||"date"!==d||"date"===f&&"date"===p)if("number"===f&&"number"===p||!c&&"number"!==d)if(c||"date"===d||"number"===d)g=!1;else{errorMessage=u+"expected "+("string"===d?"'"+a+"'":a)+" to be a number or a date"}else errorMessage=u+"the arguments to within must be numbers";else errorMessage=u+"the arguments to within must be dates";if(g)throw new i(errorMessage,void 0,h);if(c){var v=a.length;this.assert(v>=e&&v<=o,"expected #{this} to have a length within "+m,"expected #{this} to not have a length within "+m)}else this.assert(a>=e&&a<=o,"expected #{this} to be within "+m,"expected #{this} to not be within "+m)}),n.addMethod("instanceof",m),n.addMethod("instanceOf",m),n.addMethod("property",v),n.addMethod("ownProperty",y),n.addMethod("haveOwnProperty",y),n.addMethod("ownPropertyDescriptor",b),n.addMethod("haveOwnPropertyDescriptor",b),n.addChainableMethod("length",x,w),n.addChainableMethod("lengthOf",x,w),n.addMethod("match",_),n.addMethod("matches",_),n.addMethod("string",function(e,i){i&&r(this,"message",i);var o=r(this,"object"),s=r(this,"message"),a=r(this,"ssfi");new n(o,s,a,!0).is.a("string"),this.assert(~o.indexOf(e),"expected #{this} to contain "+t.inspect(e),"expected #{this} to not contain "+t.inspect(e))}),n.addMethod("keys",k),n.addMethod("key",k),n.addMethod("throw",C),n.addMethod("throws",C),n.addMethod("Throw",C),n.addMethod("respondTo",E),n.addMethod("respondsTo",E),n.addProperty("itself",function(){r(this,"itself",!0)}),n.addMethod("satisfy",A),n.addMethod("satisfies",A),n.addMethod("closeTo",S),n.addMethod("approximately",S),n.addMethod("members",function(e,i){i&&r(this,"message",i);var o=r(this,"object"),s=r(this,"message"),a=r(this,"ssfi");new n(o,s,a,!0).to.be.an("array"),new n(e,s,a,!0).to.be.an("array");var c,l,u,h=r(this,"contains"),d=r(this,"ordered");h?(l="expected #{this} to be "+(c=d?"an ordered superset":"a superset")+" of #{exp}",u="expected #{this} to not be "+c+" of #{exp}"):(l="expected #{this} to have the same "+(c=d?"ordered members":"members")+" as #{exp}",u="expected #{this} to not have the same "+c+" as #{exp}");var f=r(this,"deep")?t.eql:void 0;this.assert(function(e,t,n,i,r){if(!i){if(e.length!==t.length)return!1;t=t.slice()}return e.every(function(e,o){if(r)return n?n(e,t[o]):e===t[o];if(!n){var s=t.indexOf(e);return-1!==s&&(i||t.splice(s,1),!0)}return t.some(function(r,o){return!!n(e,r)&&(i||t.splice(o,1),!0)})})}(e,o,f,h,d),l,u,e,o,!0)}),n.addMethod("oneOf",function(e,t){t&&r(this,"message",t);var i=r(this,"object"),o=r(this,"message"),s=r(this,"ssfi");new n(e,o,s,!0).to.be.an("array"),this.assert(e.indexOf(i)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,i)}),n.addMethod("change",F),n.addMethod("changes",F),n.addMethod("increase",T),n.addMethod("increases",T),n.addMethod("decrease",D),n.addMethod("decreases",D),n.addMethod("by",function(e,t){t&&r(this,"message",t);var n,i=r(this,"deltaMsgObj"),o=r(this,"initialDeltaValue"),s=r(this,"finalDeltaValue"),a=r(this,"deltaBehavior"),c=r(this,"realDelta");n="change"===a?Math.abs(s-o)===Math.abs(e):c===Math.abs(e),this.assert(n,"expected "+i+" to "+a+" by "+e,"expected "+i+" to not "+a+" by "+e)}),n.addProperty("extensible",function(){var e=r(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible")}),n.addProperty("sealed",function(){var e=r(this,"object"),t=e!==Object(e)||Object.isSealed(e);this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed")}),n.addProperty("frozen",function(){var e=r(this,"object"),t=e!==Object(e)||Object.isFrozen(e);this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen")}),n.addProperty("finite",function(e){var t=r(this,"object");this.assert("number"==typeof t&&isFinite(t),"expected #{this} to be a finite number","expected #{this} to not be a finite number")})}},function(e,t,n){
|
||
/*!
|
||
* chai
|
||
* http://chaijs.com
|
||
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
var i=n(59);e.exports=function(e,t){
|
||
/*!
|
||
* Module dependencies.
|
||
*/
|
||
var n=e.AssertionError,r=t.flag;
|
||
/*!
|
||
* Module export.
|
||
*/
|
||
/*!
|
||
* Assertion Constructor
|
||
*
|
||
* Creates object for chaining.
|
||
*
|
||
* `Assertion` objects contain metadata in the form of flags. Three flags can
|
||
* be assigned during instantiation by passing arguments to this constructor:
|
||
*
|
||
* - `object`: This flag contains the target of the assertion. For example, in
|
||
* the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
|
||
* contain `numKittens` so that the `equal` assertion can reference it when
|
||
* needed.
|
||
*
|
||
* - `message`: This flag contains an optional custom error message to be
|
||
* prepended to the error message that's generated by the assertion when it
|
||
* fails.
|
||
*
|
||
* - `ssfi`: This flag stands for "start stack function indicator". It
|
||
* contains a function reference that serves as the starting point for
|
||
* removing frames from the stack trace of the error that's created by the
|
||
* assertion when it fails. The goal is to provide a cleaner stack trace to
|
||
* end users by removing Chai's internal functions. Note that it only works
|
||
* in environments that support `Error.captureStackTrace`, and only when
|
||
* `Chai.config.includeStack` hasn't been set to `false`.
|
||
*
|
||
* - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
|
||
* should retain its current value, even as assertions are chained off of
|
||
* this object. This is usually set to `true` when creating a new assertion
|
||
* from within another assertion. It's also temporarily set to `true` before
|
||
* an overwritten assertion gets called by the overwriting assertion.
|
||
*
|
||
* @param {Mixed} obj target of the assertion
|
||
* @param {String} msg (optional) custom error message
|
||
* @param {Function} ssfi (optional) starting point for removing stack frames
|
||
* @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked
|
||
* @api private
|
||
*/
|
||
function o(e,n,i,s){return r(this,"ssfi",i||o),r(this,"lockSsfi",s),r(this,"object",e),r(this,"message",n),t.proxify(this)}e.Assertion=o,Object.defineProperty(o,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),i.includeStack},set:function(e){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),i.includeStack=e}}),Object.defineProperty(o,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),i.showDiff},set:function(e){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),i.showDiff=e}}),o.addProperty=function(e,n){t.addProperty(this.prototype,e,n)},o.addMethod=function(e,n){t.addMethod(this.prototype,e,n)},o.addChainableMethod=function(e,n,i){t.addChainableMethod(this.prototype,e,n,i)},o.overwriteProperty=function(e,n){t.overwriteProperty(this.prototype,e,n)},o.overwriteMethod=function(e,n){t.overwriteMethod(this.prototype,e,n)},o.overwriteChainableMethod=function(e,n,i){t.overwriteChainableMethod(this.prototype,e,n,i)},o.prototype.assert=function(e,o,s,a,c,l){var u=t.test(this,arguments);if(!1!==l&&(l=!0),void 0===a&&void 0===c&&(l=!1),!0!==i.showDiff&&(l=!1),!u){o=t.getMessage(this,arguments);var h=t.getActual(this,arguments);throw new n(o,{actual:h,expected:a,showDiff:l},i.includeStack?this.assert:r(this,"ssfi"))}},
|
||
/*!
|
||
* ### ._obj
|
||
*
|
||
* Quick reference to stored `actual` value for plugin developers.
|
||
*
|
||
* @api private
|
||
*/
|
||
Object.defineProperty(o.prototype,"_obj",{get:function(){return r(this,"object")},set:function(e){r(this,"object",e)}})}},function(e,t){e.exports=Number.isNaN||
|
||
/*!
|
||
* Chai - isNaN utility
|
||
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
||
* MIT Licensed
|
||
*/
|
||
function(e){return e!=e}},function(e,t,n){
|
||
/*!
|
||
* Chai - getOwnEnumerableProperties utility
|
||
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
/*!
|
||
* Module dependancies
|
||
*/
|
||
var i=n(103);e.exports=function(e){return Object.keys(e).concat(i(e))}},function(e,t,n){
|
||
/*!
|
||
* Chai - compareByInspect utility
|
||
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
/*!
|
||
* Module dependancies
|
||
*/
|
||
var i=n(79);e.exports=function(e,t){return i(e)<i(t)?-1:1}},function(e,t,n){
|
||
/*!
|
||
* Chai - overwriteChainableMethod utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
var i=n(60),r=n(58);e.exports=function(e,t,n,o){var s=e.__methods[t],a=s.chainingBehavior;s.chainingBehavior=function(){var e=o(a).call(this);if(void 0!==e)return e;var t=new i.Assertion;return r(this,t),t};var c=s.method;s.method=function(){var e=n(c).apply(this,arguments);if(void 0!==e)return e;var t=new i.Assertion;return r(this,t),t}}},function(e,t,n){
|
||
/*!
|
||
* Chai - addChainingMethod utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
/*!
|
||
* Module dependencies
|
||
*/
|
||
var i=n(77),r=n(60),o=n(51),s=n(76),a=n(58),c="function"==typeof Object.setPrototypeOf,l=function(){},u=Object.getOwnPropertyNames(l).filter(function(e){var t=Object.getOwnPropertyDescriptor(l,e);return"object"!=typeof t||!t.configurable}),h=Function.prototype.call,d=Function.prototype.apply;e.exports=function(e,t,n,l){"function"!=typeof l&&(l=function(){});var f={method:n,chainingBehavior:l};e.__methods||(e.__methods={}),e.__methods[t]=f,Object.defineProperty(e,t,{get:function(){f.chainingBehavior.call(this);var n=function(){o(this,"lockSsfi")||o(this,"ssfi",n);var e=f.method.apply(this,arguments);if(void 0!==e)return e;var t=new r.Assertion;return a(this,t),t};if(i(n,t,!0),c){var l=Object.create(this);l.call=h,l.apply=d,Object.setPrototypeOf(n,l)}else{Object.getOwnPropertyNames(e).forEach(function(t){if(-1===u.indexOf(t)){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i)}})}return a(this,n),s(n)},configurable:!0})}},function(e,t,n){
|
||
/*!
|
||
* Chai - overwriteMethod utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
var i=n(77),r=n(60),o=n(51),s=n(76),a=n(58);e.exports=function(e,t,n){var c=e[t],l=function(){throw new Error(t+" is not a function")};c&&"function"==typeof c&&(l=c);var u=function(){o(this,"lockSsfi")||o(this,"ssfi",u);var e=o(this,"lockSsfi");o(this,"lockSsfi",!0);var t=n(l).apply(this,arguments);if(o(this,"lockSsfi",e),void 0!==t)return t;var i=new r.Assertion;return a(this,i),i};i(u,t,!1),e[t]=s(u,t)}},function(e,t,n){
|
||
/*!
|
||
* Chai - overwriteProperty utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
var i=n(60),r=n(51),o=n(78),s=n(58);e.exports=function(e,t,n){var a=Object.getOwnPropertyDescriptor(e,t),c=function(){};a&&"function"==typeof a.get&&(c=a.get),Object.defineProperty(e,t,{get:function e(){o()||r(this,"lockSsfi")||r(this,"ssfi",e);var t=r(this,"lockSsfi");r(this,"lockSsfi",!0);var a=n(c).call(this);if(r(this,"lockSsfi",t),void 0!==a)return a;var l=new i.Assertion;return s(this,l),l},configurable:!0})}},function(e,t,n){
|
||
/*!
|
||
* Chai - addMethod utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
var i=n(77),r=n(60),o=n(51),s=n(76),a=n(58);e.exports=function(e,t,n){var c=function(){o(this,"lockSsfi")||o(this,"ssfi",c);var e=n.apply(this,arguments);if(void 0!==e)return e;var t=new r.Assertion;return a(this,t),t};i(c,t,!1),e[t]=s(c,t)}},function(e,t,n){
|
||
/*!
|
||
* Chai - addProperty utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
var i=n(60),r=n(51),o=n(78),s=n(58);e.exports=function(e,t,n){n=void 0===n?function(){}:n,Object.defineProperty(e,t,{get:function e(){o()||r(this,"lockSsfi")||r(this,"ssfi",e);var t=n.call(this);if(void 0!==t)return t;var a=new i.Assertion;return s(this,a),a},configurable:!0})}},function(e,t,n){"use strict";
|
||
/*!
|
||
* deep-eql
|
||
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/var i=n(87);function r(){this._key="chai/deep-eql__"+Math.random()+Date.now()}r.prototype={get:function(e){return e[this._key]},set:function(e,t){Object.isExtensible(e)&&Object.defineProperty(e,this._key,{value:t,configurable:!0})}};var o="function"==typeof WeakMap?WeakMap:r;
|
||
/*!
|
||
* Check to see if the MemoizeMap has recorded a result of the two operands
|
||
*
|
||
* @param {Mixed} leftHandOperand
|
||
* @param {Mixed} rightHandOperand
|
||
* @param {MemoizeMap} memoizeMap
|
||
* @returns {Boolean|null} result
|
||
*/function s(e,t,n){if(!n||m(e)||m(t))return null;var i=n.get(e);if(i){var r=i.get(t);if("boolean"==typeof r)return r}return null}
|
||
/*!
|
||
* Set the result of the equality into the MemoizeMap
|
||
*
|
||
* @param {Mixed} leftHandOperand
|
||
* @param {Mixed} rightHandOperand
|
||
* @param {MemoizeMap} memoizeMap
|
||
* @param {Boolean} result
|
||
*/function a(e,t,n,i){if(n&&!m(e)&&!m(t)){var r=n.get(e);r?r.set(t,i):((r=new o).set(t,i),n.set(e,r))}}
|
||
/*!
|
||
* Primary Export
|
||
*/function c(e,t,n){if(n&&n.comparator)return u(e,t,n);var i=l(e,t);return null!==i?i:u(e,t,n)}function l(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t||!m(e)&&!m(t)&&null}
|
||
/*!
|
||
* The main logic of the `deepEqual` function.
|
||
*
|
||
* @param {Mixed} leftHandOperand
|
||
* @param {Mixed} rightHandOperand
|
||
* @param {Object} [options] (optional) Additional options
|
||
* @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
|
||
* @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
|
||
complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
|
||
references to blow the stack.
|
||
* @return {Boolean} equal match
|
||
*/function u(e,t,n){(n=n||{}).memoize=!1!==n.memoize&&(n.memoize||new o);var r=n&&n.comparator,u=s(e,t,n.memoize);if(null!==u)return u;var m=s(t,e,n.memoize);if(null!==m)return m;if(r){var v=r(e,t);if(!1===v||!0===v)return a(e,t,n.memoize,v),v;var y=l(e,t);if(null!==y)return y}var b=i(e);if(b!==i(t))return a(e,t,n.memoize,!1),!1;a(e,t,n.memoize,!0);var w=function(e,t,n,i){switch(n){case"String":case"Number":case"Boolean":case"Date":return c(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":case"Error":return e===t;case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return d(e,t,i);case"RegExp":
|
||
/*!
|
||
* Compare two Regular Expressions for equality.
|
||
*
|
||
* @param {RegExp} leftHandOperand
|
||
* @param {RegExp} rightHandOperand
|
||
* @return {Boolean} result
|
||
*/
|
||
return function(e,t){return e.toString()===t.toString()}
|
||
/*!
|
||
* Compare two Sets/Maps for equality. Faster than other equality functions.
|
||
*
|
||
* @param {Set} leftHandOperand
|
||
* @param {Set} rightHandOperand
|
||
* @param {Object} [options] (Optional)
|
||
* @return {Boolean} result
|
||
*/(e,t);case"Generator":
|
||
/*!
|
||
* Simple equality for generator objects such as those returned by generator functions.
|
||
*
|
||
* @param {Iterable} leftHandOperand
|
||
* @param {Iterable} rightHandOperand
|
||
* @param {Object} [options] (Optional)
|
||
* @return {Boolean} result
|
||
*/
|
||
return function(e,t,n){return d(p(e),p(t),n)}
|
||
/*!
|
||
* Determine if the given object has an @@iterator function.
|
||
*
|
||
* @param {Object} target
|
||
* @return {Boolean} `true` if the object has an @@iterator function.
|
||
*/(e,t,i);case"DataView":return d(new Uint8Array(e.buffer),new Uint8Array(t.buffer),i);case"ArrayBuffer":return d(new Uint8Array(e),new Uint8Array(t),i);case"Set":case"Map":return h(e,t,i);default:
|
||
/*!
|
||
* Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
|
||
* for each enumerable key in the object.
|
||
*
|
||
* @param {Mixed} leftHandOperand
|
||
* @param {Mixed} rightHandOperand
|
||
* @param {Object} [options] (Optional)
|
||
* @return {Boolean} result
|
||
*/
|
||
return function(e,t,n){var i=g(e),r=g(t);if(i.length&&i.length===r.length)return i.sort(),r.sort(),!1!==d(i,r)&&
|
||
/*!
|
||
* Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
|
||
* each key. If any value of the given key is not equal, the function will return false (early).
|
||
*
|
||
* @param {Mixed} leftHandOperand
|
||
* @param {Mixed} rightHandOperand
|
||
* @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
|
||
* @param {Object} [options] (Optional)
|
||
* @return {Boolean} result
|
||
*/
|
||
function(e,t,n,i){var r=n.length;if(0===r)return!0;for(var o=0;o<r;o+=1)if(!1===c(e[n[o]],t[n[o]],i))return!1;return!0}(e,t,i,n);var o=f(e),s=f(t);if(o.length&&o.length===s.length)return o.sort(),s.sort(),d(o,s,n);if(0===i.length&&0===o.length&&0===r.length&&0===s.length)return!0;return!1}
|
||
/*!
|
||
* Returns true if the argument is a primitive.
|
||
*
|
||
* This intentionally returns true for all objects that can be compared by reference,
|
||
* including functions and symbols.
|
||
*
|
||
* @param {Mixed} value
|
||
* @return {Boolean} result
|
||
*/(e,t,i)}}(e,t,b,n);return a(e,t,n.memoize,w),w}function h(e,t,n){if(e.size!==t.size)return!1;if(0===e.size)return!0;var i=[],r=[];return e.forEach(function(e,t){i.push([e,t])}),t.forEach(function(e,t){r.push([e,t])}),d(i.sort(),r.sort(),n)}
|
||
/*!
|
||
* Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
|
||
*
|
||
* @param {Iterable} leftHandOperand
|
||
* @param {Iterable} rightHandOperand
|
||
* @param {Object} [options] (Optional)
|
||
* @return {Boolean} result
|
||
*/function d(e,t,n){var i=e.length;if(i!==t.length)return!1;if(0===i)return!0;for(var r=-1;++r<i;)if(!1===c(e[r],t[r],n))return!1;return!0}
|
||
/*!
|
||
* Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
|
||
* This will consume the iterator - which could have side effects depending on the @@iterator implementation.
|
||
*
|
||
* @param {Object} target
|
||
* @returns {Array} an array of entries from the @@iterator function
|
||
*/
|
||
function f(e){if(function(e){return"undefined"!=typeof Symbol&&"object"==typeof e&&void 0!==Symbol.iterator&&"function"==typeof e[Symbol.iterator]}(e))try{return p(e[Symbol.iterator]())}catch(e){return[]}return[]}
|
||
/*!
|
||
* Gets all entries from a Generator. This will consume the generator - which could have side effects.
|
||
*
|
||
* @param {Generator} target
|
||
* @returns {Array} an array of entries from the Generator.
|
||
*/function p(e){for(var t=e.next(),n=[t.value];!1===t.done;)t=e.next(),n.push(t.value);return n}
|
||
/*!
|
||
* Gets all own and inherited enumerable keys from a target.
|
||
*
|
||
* @param {Object} target
|
||
* @returns {Array} an array of own and inherited enumerable keys from the target.
|
||
*/function g(e){var t=[];for(var n in e)t.push(n);return t}function m(e){return null===e||"object"!=typeof e}e.exports=c,e.exports.MemoizeMap=o},function(e,t){
|
||
/*!
|
||
* Chai - getEnumerableProperties utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=function(e){var t=[];for(var n in e)t.push(n);return t}},function(e,t,n){
|
||
/*!
|
||
* Chai - message composition utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
/*!
|
||
* Module dependancies
|
||
*/
|
||
var i=n(51),r=n(107),o=(n(79),n(104));e.exports=function(e,t){var n=i(e,"negate"),s=i(e,"object"),a=t[3],c=r(e,t),l=n?t[2]:t[1],u=i(e,"message");return"function"==typeof l&&(l=l()),l=(l=l||"").replace(/#\{this\}/g,function(){return o(s)}).replace(/#\{act\}/g,function(){return o(c)}).replace(/#\{exp\}/g,function(){return o(a)}),u?u+": "+l:l}},function(e,t,n){
|
||
/*!
|
||
* Chai - expectTypes utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
var i=n(108),r=n(51),o=n(87);e.exports=function(e,t){var n=r(e,"message"),s=r(e,"ssfi");n=n?n+": ":"",e=r(e,"object"),(t=t.map(function(e){return e.toLowerCase()})).sort();var a=t.map(function(e,n){var i=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an":"a";return(t.length>1&&n===t.length-1?"or ":"")+i+" "+e}).join(", "),c=o(e).toLowerCase();if(!t.some(function(e){return c===e}))throw new i(n+"object tested must be "+a+", but "+c+" given",void 0,s)}},function(e,t,n){
|
||
/*!
|
||
* Chai - test utility
|
||
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
/*!
|
||
* Module dependancies
|
||
*/
|
||
var i=n(51);e.exports=function(e,t){var n=i(e,"negate"),r=t[0];return n?!r:r}},function(e,t,n){"use strict";function i(e,t){return void 0!==e&&null!==e&&t in Object(e)}function r(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(function(e){var t=/^\[(\d+)\]$/.exec(e);return t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.\[\]])/g,"$1")}})}function o(e,t,n){var i=e,r=null;n=void 0===n?t.length:n;for(var o=0;o<n;o++){var s=t[o];i&&(i=void 0===s.p?i[s.i]:i[s.p],o===n-1&&(r=i))}return r}function s(e,t){var n=r(t),s=n[n.length-1],a={parent:n.length>1?o(e,n,n.length-1):e,name:s.p||s.i,value:o(e,n)};return a.exists=i(a.parent,a.name),a}e.exports={hasProperty:i,getPathInfo:s,getPathValue:function(e,t){return s(e,t).value},setPathValue:function(e,t,n){return function(e,t,n){for(var i=e,r=n.length,o=null,s=0;s<r;s++){var a=null,c=null;if(o=n[s],s===r-1)i[a=void 0===o.p?o.i:o.p]=t;else if(void 0!==o.p&&i[o.p])i=i[o.p];else if(void 0!==o.i&&i[o.i])i=i[o.i];else{var l=n[s+1];a=void 0===o.p?o.i:o.p,c=void 0===l.p?[]:{},i[a]=c,i=i[a]}}}(e,n,r(t)),e}}},function(e,t,n){
|
||
/*!
|
||
* chai
|
||
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
|
||
* MIT Licensed
|
||
*/
|
||
/*!
|
||
* Dependencies that are used for multiple exports are required here only once
|
||
*/
|
||
var i=n(178);
|
||
/*!
|
||
* test utility
|
||
*/t.test=n(177),
|
||
/*!
|
||
* type utility
|
||
*/
|
||
t.type=n(87),
|
||
/*!
|
||
* expectTypes utility
|
||
*/
|
||
t.expectTypes=n(176),
|
||
/*!
|
||
* message utility
|
||
*/
|
||
t.getMessage=n(175),
|
||
/*!
|
||
* actual utility
|
||
*/
|
||
t.getActual=n(107),
|
||
/*!
|
||
* Inspect util
|
||
*/
|
||
t.inspect=n(79),
|
||
/*!
|
||
* Object Display util
|
||
*/
|
||
t.objDisplay=n(104),
|
||
/*!
|
||
* Flag utility
|
||
*/
|
||
t.flag=n(51),
|
||
/*!
|
||
* Flag transferring utility
|
||
*/
|
||
t.transferFlags=n(58),
|
||
/*!
|
||
* Deep equal utility
|
||
*/
|
||
t.eql=n(173),
|
||
/*!
|
||
* Deep path info
|
||
*/
|
||
t.getPathInfo=i.getPathInfo,
|
||
/*!
|
||
* Check if a property exists
|
||
*/
|
||
t.hasProperty=i.hasProperty,
|
||
/*!
|
||
* Function name
|
||
*/
|
||
t.getName=n(106),
|
||
/*!
|
||
* add Property
|
||
*/
|
||
t.addProperty=n(172),
|
||
/*!
|
||
* add Method
|
||
*/
|
||
t.addMethod=n(171),
|
||
/*!
|
||
* overwrite Property
|
||
*/
|
||
t.overwriteProperty=n(170),
|
||
/*!
|
||
* overwrite Method
|
||
*/
|
||
t.overwriteMethod=n(169),
|
||
/*!
|
||
* Add a chainable method
|
||
*/
|
||
t.addChainableMethod=n(168),
|
||
/*!
|
||
* Overwrite chainable method
|
||
*/
|
||
t.overwriteChainableMethod=n(167),
|
||
/*!
|
||
* Compare by inspect method
|
||
*/
|
||
t.compareByInspect=n(166),
|
||
/*!
|
||
* Get own enumerable property symbols method
|
||
*/
|
||
t.getOwnEnumerablePropertySymbols=n(103),
|
||
/*!
|
||
* Get own enumerable properties method
|
||
*/
|
||
t.getOwnEnumerableProperties=n(165),
|
||
/*!
|
||
* Checks error against a given set of criteria
|
||
*/
|
||
t.checkError=n(102),
|
||
/*!
|
||
* Proxify util
|
||
*/
|
||
t.proxify=n(76),
|
||
/*!
|
||
* addLengthGuard util
|
||
*/
|
||
t.addLengthGuard=n(77),
|
||
/*!
|
||
* isProxyEnabled helper
|
||
*/
|
||
t.isProxyEnabled=n(78),
|
||
/*!
|
||
* isNaN method
|
||
*/
|
||
t.isNaN=n(164)},function(e,t,n){e.exports=n(60)},,,function(e,t){for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);e.exports=function(e,t){var i=t||0,r=n;return r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+"-"+r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]+r[e[i++]]}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(n){var i=new Uint8Array(16);e.exports=function(){return n(i),i}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";var i=n(114),r=n(42),o=n(91),s=n(90),a=n(67),c=n(121),l=n(56);function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in c)if(c.hasOwnProperty(t)&&c[t].magic===e)return c[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=i(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,i,r=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index<r;)t=e.readInt(2),n=e.readInt(2),i=e.readData(n),this.extraFields[t]={id:t,length:n,value:i}},handleUTF8:function(){var e=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=r.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var o=r.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=i(e.value);return 1!==t.readInt(1)?null:s(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=i(e.value);return 1!==t.readInt(1)?null:s(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},e.exports=u},function(e,t,n){"use strict";var i=n(111);function r(e){i.call(this,e)}n(42).inherits(r,i),r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";var i=n(112);function r(e){i.call(this,e)}n(42).inherits(r,i),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=r},function(e,t,n){"use strict";var i=n(114),r=n(42),o=n(115),s=n(186),a=(n(67),n(56));function c(e){this.files=[],this.loadOptions=e}c.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+r.pretty(t)+", expected "+r.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var i=this.reader.readString(4)===t;return this.reader.setIndex(n),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",n=r.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,i=this.zip64EndOfCentralSize-44;0<i;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw!this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===r.MAX_VALUE_16BITS||this.diskWithCentralDirStart===r.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===r.MAX_VALUE_16BITS||this.centralDirRecords===r.MAX_VALUE_16BITS||this.centralDirSize===r.MAX_VALUE_32BITS||this.centralDirOffset===r.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var i=t-n;if(i>0)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(e){this.reader=i(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=c},function(e,t,n){"use strict";var i=n(42),r=n(68),o=n(67),s=(i=n(42),n(189)),a=n(122),c=n(81);function l(e){return new r.Promise(function(t,n){var i=e.decompressed.getContentWorker().pipe(new a);i.on("error",function(e){n(e)}).on("end",function(){i.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}e.exports=function(e,t){var n=this;return t=i.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),c.isNode&&c.isStream(e)?r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new s(t);return n.load(e),n}).then(function(e){var n=[r.Promise.resolve(e)],i=e.files;if(t.checkCRC32)for(var o=0;o<i.length;o++)n.push(l(i[o]));return r.Promise.all(n)}).then(function(e){for(var i=e.shift(),r=i.files,o=0;o<r.length;o++){var s=r[o];n.file(s.fileNameStr,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders})}return i.zipComment.length&&(n.comment=i.zipComment),n})}},function(e,t,n){"use strict";var i=n(42),r=n(50);function o(e,t){r.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}i.inherits(o,r),o.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},o.prototype.pause=function(){return!!r.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=o},function(e,t,n){"use strict";var i=n(42),r=n(50),o=n(67),s=n(90),a=n(115),c=function(e,t){var n,i="";for(n=0;n<t;n++)i+=String.fromCharCode(255&e),e>>>=8;return i},l=function(e,t,n,r,l,u){var h,d,f=e.file,p=e.compression,g=u!==o.utf8encode,m=i.transformTo("string",u(f.name)),v=i.transformTo("string",o.utf8encode(f.name)),y=f.comment,b=i.transformTo("string",u(y)),w=i.transformTo("string",o.utf8encode(y)),x=v.length!==f.name.length,_=w.length!==y.length,k="",C="",E="",A=f.dir,S=f.date,F={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(F.crc32=e.crc32,F.compressedSize=e.compressedSize,F.uncompressedSize=e.uncompressedSize);var T=0;t&&(T|=8),g||!x&&!_||(T|=2048);var D,L,P=0,R=0;A&&(P|=16),"UNIX"===l?(R=798,P|=(D=f.unixPermissions,L=D,D||(L=A?16893:33204),(65535&L)<<16)):(R=20,P|=63&(f.dosPermissions||0)),h=S.getUTCHours(),h<<=6,h|=S.getUTCMinutes(),h<<=5,h|=S.getUTCSeconds()/2,d=S.getUTCFullYear()-1980,d<<=4,d|=S.getUTCMonth()+1,d<<=5,d|=S.getUTCDate(),x&&(C=c(1,1)+c(s(m),4)+v,k+="up"+c(C.length,2)+C),_&&(E=c(1,1)+c(s(b),4)+w,k+="uc"+c(E.length,2)+E);var M="";return M+="\n\0",M+=c(T,2),M+=p.magic,M+=c(h,2),M+=c(d,2),M+=c(F.crc32,4),M+=c(F.compressedSize,4),M+=c(F.uncompressedSize,4),M+=c(m.length,2),M+=c(k.length,2),{fileRecord:a.LOCAL_FILE_HEADER+M+m+k,dirRecord:a.CENTRAL_FILE_HEADER+c(R,2)+M+c(b.length,2)+"\0\0\0\0"+c(P,4)+c(r,4)+m+k+b}};function u(e,t,n,i){r.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(u,r),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,r.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-i-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=l(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=l(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return a.DATA_DESCRIPTOR+c(e.crc32,4)+c(e.compressedSize,4)+c(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,r=function(e,t,n,r,o){var s=i.transformTo("string",o(r));return a.CENTRAL_DIRECTORY_END+"\0\0\0\0"+c(e,2)+c(e,2)+c(t,4)+c(n,4)+c(s.length,2)+s}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},u.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(e){var t=this._sources;if(!r.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},u.prototype.lock=function(){r.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},e.exports=u},function(e,t,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t,n){"use strict";var i=n(55),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,c,l,u,h,d){var f,p,g,m,v,y,b,w,x,_=d.bits,k=0,C=0,E=0,A=0,S=0,F=0,T=0,D=0,L=0,P=0,R=null,M=0,B=new i.Buf16(16),O=new i.Buf16(16),j=null,I=0;for(k=0;k<=15;k++)B[k]=0;for(C=0;C<c;C++)B[t[n+C]]++;for(S=_,A=15;A>=1&&0===B[A];A--);if(S>A&&(S=A),0===A)return l[u++]=20971520,l[u++]=20971520,d.bits=1,0;for(E=1;E<A&&0===B[E];E++);for(S<E&&(S=E),D=1,k=1;k<=15;k++)if(D<<=1,(D-=B[k])<0)return-1;if(D>0&&(0===e||1!==A))return-1;for(O[1]=0,k=1;k<15;k++)O[k+1]=O[k]+B[k];for(C=0;C<c;C++)0!==t[n+C]&&(h[O[t[n+C]]++]=C);if(0===e?(R=j=h,y=19):1===e?(R=r,M-=257,j=o,I-=257,y=256):(R=s,j=a,y=-1),P=0,C=0,k=E,v=u,F=S,T=0,g=-1,m=(L=1<<S)-1,1===e&&L>852||2===e&&L>592)return 1;for(;;){b=k-T,h[C]<y?(w=0,x=h[C]):h[C]>y?(w=j[I+h[C]],x=R[M+h[C]]):(w=96,x=0),f=1<<k-T,E=p=1<<F;do{l[v+(P>>T)+(p-=f)]=b<<24|w<<16|x|0}while(0!==p);for(f=1<<k-1;P&f;)f>>=1;if(0!==f?(P&=f-1,P+=f):P=0,C++,0==--B[k]){if(k===A)break;k=t[n+h[C]]}if(k>S&&(P&m)!==g){for(0===T&&(T=S),v+=E,D=1<<(F=k-T);F+T<A&&!((D-=B[F+T])<=0);)F++,D<<=1;if(L+=1<<F,1===e&&L>852||2===e&&L>592)return 1;l[g=P&m]=S<<24|F<<16|v-u|0}}return 0!==P&&(l[v+P]=k-T<<24|64<<16|0),d.bits=S,0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,i,r,o,s,a,c,l,u,h,d,f,p,g,m,v,y,b,w,x,_,k,C,E,A;n=e.state,i=e.next_in,E=e.input,r=i+(e.avail_in-5),o=e.next_out,A=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),c=n.dmax,l=n.wsize,u=n.whave,h=n.wnext,d=n.window,f=n.hold,p=n.bits,g=n.lencode,m=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{p<15&&(f+=E[i++]<<p,p+=8,f+=E[i++]<<p,p+=8),b=g[f&v];t:for(;;){if(f>>>=w=b>>>24,p-=w,0===(w=b>>>16&255))A[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(f&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}x=65535&b,(w&=15)&&(p<w&&(f+=E[i++]<<p,p+=8),x+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=E[i++]<<p,p+=8,f+=E[i++]<<p,p+=8),b=m[f&y];n:for(;;){if(f>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=m[(65535&b)+(f&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(_=65535&b,p<(w&=15)&&(f+=E[i++]<<p,(p+=8)<w&&(f+=E[i++]<<p,p+=8)),(_+=f&(1<<w)-1)>c){e.msg="invalid distance too far back",n.mode=30;break e}if(f>>>=w,p-=w,_>(w=o-s)){if((w=_-w)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(k=0,C=d,0===h){if(k+=l-w,w<x){x-=w;do{A[o++]=d[k++]}while(--w);k=o-_,C=A}}else if(h<w){if(k+=l+h-w,(w-=h)<x){x-=w;do{A[o++]=d[k++]}while(--w);if(k=0,h<x){x-=w=h;do{A[o++]=d[k++]}while(--w);k=o-_,C=A}}}else if(k+=h-w,w<x){x-=w;do{A[o++]=d[k++]}while(--w);k=o-_,C=A}for(;x>2;)A[o++]=C[k++],A[o++]=C[k++],A[o++]=C[k++],x-=3;x&&(A[o++]=C[k++],x>1&&(A[o++]=C[k++]))}else{k=o-_;do{A[o++]=A[k++],A[o++]=A[k++],A[o++]=A[k++],x-=3}while(x>2);x&&(A[o++]=A[k++],x>1&&(A[o++]=A[k++]))}break}}break}}while(i<r&&o<a);i-=x=p>>3,f&=(1<<(p-=x<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=o<a?a-o+257:257-(o-a),n.hold=f,n.bits=p}},function(e,t,n){"use strict";var i=n(55),r=n(120),o=n(119),s=n(195),a=n(194),c=0,l=1,u=2,h=4,d=5,f=6,p=0,g=1,m=2,v=-2,y=-3,b=-4,w=-5,x=8,_=1,k=2,C=3,E=4,A=5,S=6,F=7,T=8,D=9,L=10,P=11,R=12,M=13,B=14,O=15,j=16,I=17,$=18,N=19,W=20,z=21,H=22,V=23,U=24,K=25,G=26,q=27,Y=28,X=29,Z=30,Q=31,J=32,ee=852,te=592,ne=15;function ie(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function re(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=_,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(ee),t.distcode=t.distdyn=new i.Buf32(te),t.sane=1,t.back=-1,p):v}function oe(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):v}function se(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,oe(e))):v}function ae(e,t){var n,r;return e?(r=new function(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0},e.state=r,r.window=null,(n=se(e,t))!==p&&(e.state=null),n):v}var ce,le,ue=!0;function he(e){if(ue){var t;for(ce=new i.Buf32(512),le=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(l,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(u,e.lens,0,32,le,0,e.work,{bits:5}),ue=!1}e.lencode=ce,e.lenbits=9,e.distcode=le,e.distbits=5}function de(e,t,n,r){var o,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new i.Buf8(s.wsize)),r>=s.wsize?(i.arraySet(s.window,t,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>r&&(o=r),i.arraySet(s.window,t,n-r,o,s.wnext),(r-=o)?(i.arraySet(s.window,t,n-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}t.inflateReset=oe,t.inflateReset2=se,t.inflateResetKeep=re,t.inflateInit=function(e){return ae(e,ne)},t.inflateInit2=ae,t.inflate=function(e,t){var n,ee,te,ne,re,oe,se,ae,ce,le,ue,fe,pe,ge,me,ve,ye,be,we,xe,_e,ke,Ce,Ee,Ae=0,Se=new i.Buf8(4),Fe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return v;(n=e.state).mode===R&&(n.mode=M),re=e.next_out,te=e.output,se=e.avail_out,ne=e.next_in,ee=e.input,oe=e.avail_in,ae=n.hold,ce=n.bits,le=oe,ue=se,ke=p;e:for(;;)switch(n.mode){case _:if(0===n.wrap){n.mode=M;break}for(;ce<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if(2&n.wrap&&35615===ae){n.check=0,Se[0]=255&ae,Se[1]=ae>>>8&255,n.check=o(n.check,Se,2,0),ae=0,ce=0,n.mode=k;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",n.mode=Z;break}if((15&ae)!==x){e.msg="unknown compression method",n.mode=Z;break}if(ce-=4,_e=8+(15&(ae>>>=4)),0===n.wbits)n.wbits=_e;else if(_e>n.wbits){e.msg="invalid window size",n.mode=Z;break}n.dmax=1<<_e,e.adler=n.check=1,n.mode=512&ae?L:R,ae=0,ce=0;break;case k:for(;ce<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if(n.flags=ae,(255&n.flags)!==x){e.msg="unknown compression method",n.mode=Z;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Z;break}n.head&&(n.head.text=ae>>8&1),512&n.flags&&(Se[0]=255&ae,Se[1]=ae>>>8&255,n.check=o(n.check,Se,2,0)),ae=0,ce=0,n.mode=C;case C:for(;ce<32;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}n.head&&(n.head.time=ae),512&n.flags&&(Se[0]=255&ae,Se[1]=ae>>>8&255,Se[2]=ae>>>16&255,Se[3]=ae>>>24&255,n.check=o(n.check,Se,4,0)),ae=0,ce=0,n.mode=E;case E:for(;ce<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}n.head&&(n.head.xflags=255&ae,n.head.os=ae>>8),512&n.flags&&(Se[0]=255&ae,Se[1]=ae>>>8&255,n.check=o(n.check,Se,2,0)),ae=0,ce=0,n.mode=A;case A:if(1024&n.flags){for(;ce<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}n.length=ae,n.head&&(n.head.extra_len=ae),512&n.flags&&(Se[0]=255&ae,Se[1]=ae>>>8&255,n.check=o(n.check,Se,2,0)),ae=0,ce=0}else n.head&&(n.head.extra=null);n.mode=S;case S:if(1024&n.flags&&((fe=n.length)>oe&&(fe=oe),fe&&(n.head&&(_e=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,ee,ne,fe,_e)),512&n.flags&&(n.check=o(n.check,ee,fe,ne)),oe-=fe,ne+=fe,n.length-=fe),n.length))break e;n.length=0,n.mode=F;case F:if(2048&n.flags){if(0===oe)break e;fe=0;do{_e=ee[ne+fe++],n.head&&_e&&n.length<65536&&(n.head.name+=String.fromCharCode(_e))}while(_e&&fe<oe);if(512&n.flags&&(n.check=o(n.check,ee,fe,ne)),oe-=fe,ne+=fe,_e)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=T;case T:if(4096&n.flags){if(0===oe)break e;fe=0;do{_e=ee[ne+fe++],n.head&&_e&&n.length<65536&&(n.head.comment+=String.fromCharCode(_e))}while(_e&&fe<oe);if(512&n.flags&&(n.check=o(n.check,ee,fe,ne)),oe-=fe,ne+=fe,_e)break e}else n.head&&(n.head.comment=null);n.mode=D;case D:if(512&n.flags){for(;ce<16;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if(ae!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Z;break}ae=0,ce=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=R;break;case L:for(;ce<32;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}e.adler=n.check=ie(ae),ae=0,ce=0,n.mode=P;case P:if(0===n.havedict)return e.next_out=re,e.avail_out=se,e.next_in=ne,e.avail_in=oe,n.hold=ae,n.bits=ce,m;e.adler=n.check=1,n.mode=R;case R:if(t===d||t===f)break e;case M:if(n.last){ae>>>=7&ce,ce-=7&ce,n.mode=q;break}for(;ce<3;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}switch(n.last=1&ae,ce-=1,3&(ae>>>=1)){case 0:n.mode=B;break;case 1:if(he(n),n.mode=W,t===f){ae>>>=2,ce-=2;break e}break;case 2:n.mode=I;break;case 3:e.msg="invalid block type",n.mode=Z}ae>>>=2,ce-=2;break;case B:for(ae>>>=7&ce,ce-=7&ce;ce<32;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Z;break}if(n.length=65535&ae,ae=0,ce=0,n.mode=O,t===f)break e;case O:n.mode=j;case j:if(fe=n.length){if(fe>oe&&(fe=oe),fe>se&&(fe=se),0===fe)break e;i.arraySet(te,ee,ne,fe,re),oe-=fe,ne+=fe,se-=fe,re+=fe,n.length-=fe;break}n.mode=R;break;case I:for(;ce<14;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if(n.nlen=257+(31&ae),ae>>>=5,ce-=5,n.ndist=1+(31&ae),ae>>>=5,ce-=5,n.ncode=4+(15&ae),ae>>>=4,ce-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Z;break}n.have=0,n.mode=$;case $:for(;n.have<n.ncode;){for(;ce<3;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}n.lens[Fe[n.have++]]=7&ae,ae>>>=3,ce-=3}for(;n.have<19;)n.lens[Fe[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Ce={bits:n.lenbits},ke=a(c,n.lens,0,19,n.lencode,0,n.work,Ce),n.lenbits=Ce.bits,ke){e.msg="invalid code lengths set",n.mode=Z;break}n.have=0,n.mode=N;case N:for(;n.have<n.nlen+n.ndist;){for(;ve=(Ae=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ye=65535&Ae,!((me=Ae>>>24)<=ce);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if(ye<16)ae>>>=me,ce-=me,n.lens[n.have++]=ye;else{if(16===ye){for(Ee=me+2;ce<Ee;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if(ae>>>=me,ce-=me,0===n.have){e.msg="invalid bit length repeat",n.mode=Z;break}_e=n.lens[n.have-1],fe=3+(3&ae),ae>>>=2,ce-=2}else if(17===ye){for(Ee=me+3;ce<Ee;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}ce-=me,_e=0,fe=3+(7&(ae>>>=me)),ae>>>=3,ce-=3}else{for(Ee=me+7;ce<Ee;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}ce-=me,_e=0,fe=11+(127&(ae>>>=me)),ae>>>=7,ce-=7}if(n.have+fe>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Z;break}for(;fe--;)n.lens[n.have++]=_e}}if(n.mode===Z)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Z;break}if(n.lenbits=9,Ce={bits:n.lenbits},ke=a(l,n.lens,0,n.nlen,n.lencode,0,n.work,Ce),n.lenbits=Ce.bits,ke){e.msg="invalid literal/lengths set",n.mode=Z;break}if(n.distbits=6,n.distcode=n.distdyn,Ce={bits:n.distbits},ke=a(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Ce),n.distbits=Ce.bits,ke){e.msg="invalid distances set",n.mode=Z;break}if(n.mode=W,t===f)break e;case W:n.mode=z;case z:if(oe>=6&&se>=258){e.next_out=re,e.avail_out=se,e.next_in=ne,e.avail_in=oe,n.hold=ae,n.bits=ce,s(e,ue),re=e.next_out,te=e.output,se=e.avail_out,ne=e.next_in,ee=e.input,oe=e.avail_in,ae=n.hold,ce=n.bits,n.mode===R&&(n.back=-1);break}for(n.back=0;ve=(Ae=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ye=65535&Ae,!((me=Ae>>>24)<=ce);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if(ve&&0==(240&ve)){for(be=me,we=ve,xe=ye;ve=(Ae=n.lencode[xe+((ae&(1<<be+we)-1)>>be)])>>>16&255,ye=65535&Ae,!(be+(me=Ae>>>24)<=ce);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}ae>>>=be,ce-=be,n.back+=be}if(ae>>>=me,ce-=me,n.back+=me,n.length=ye,0===ve){n.mode=G;break}if(32&ve){n.back=-1,n.mode=R;break}if(64&ve){e.msg="invalid literal/length code",n.mode=Z;break}n.extra=15&ve,n.mode=H;case H:if(n.extra){for(Ee=n.extra;ce<Ee;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}n.length+=ae&(1<<n.extra)-1,ae>>>=n.extra,ce-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=V;case V:for(;ve=(Ae=n.distcode[ae&(1<<n.distbits)-1])>>>16&255,ye=65535&Ae,!((me=Ae>>>24)<=ce);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if(0==(240&ve)){for(be=me,we=ve,xe=ye;ve=(Ae=n.distcode[xe+((ae&(1<<be+we)-1)>>be)])>>>16&255,ye=65535&Ae,!(be+(me=Ae>>>24)<=ce);){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}ae>>>=be,ce-=be,n.back+=be}if(ae>>>=me,ce-=me,n.back+=me,64&ve){e.msg="invalid distance code",n.mode=Z;break}n.offset=ye,n.extra=15&ve,n.mode=U;case U:if(n.extra){for(Ee=n.extra;ce<Ee;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}n.offset+=ae&(1<<n.extra)-1,ae>>>=n.extra,ce-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Z;break}n.mode=K;case K:if(0===se)break e;if(fe=ue-se,n.offset>fe){if((fe=n.offset-fe)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Z;break}fe>n.wnext?(fe-=n.wnext,pe=n.wsize-fe):pe=n.wnext-fe,fe>n.length&&(fe=n.length),ge=n.window}else ge=te,pe=re-n.offset,fe=n.length;fe>se&&(fe=se),se-=fe,n.length-=fe;do{te[re++]=ge[pe++]}while(--fe);0===n.length&&(n.mode=z);break;case G:if(0===se)break e;te[re++]=n.length,se--,n.mode=z;break;case q:if(n.wrap){for(;ce<32;){if(0===oe)break e;oe--,ae|=ee[ne++]<<ce,ce+=8}if(ue-=se,e.total_out+=ue,n.total+=ue,ue&&(e.adler=n.check=n.flags?o(n.check,te,ue,re-ue):r(n.check,te,ue,re-ue)),ue=se,(n.flags?ae:ie(ae))!==n.check){e.msg="incorrect data check",n.mode=Z;break}ae=0,ce=0}n.mode=Y;case Y:if(n.wrap&&n.flags){for(;ce<32;){if(0===oe)break e;oe--,ae+=ee[ne++]<<ce,ce+=8}if(ae!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Z;break}ae=0,ce=0}n.mode=X;case X:ke=g;break e;case Z:ke=y;break e;case Q:return b;case J:default:return v}return e.next_out=re,e.avail_out=se,e.next_in=ne,e.avail_in=oe,n.hold=ae,n.bits=ce,(n.wsize||ue!==e.avail_out&&n.mode<Z&&(n.mode<q||t!==h))&&de(e,e.output,e.next_out,ue-e.avail_out)?(n.mode=Q,b):(le-=e.avail_in,ue-=e.avail_out,e.total_in+=le,e.total_out+=ue,n.total+=ue,n.wrap&&ue&&(e.adler=n.check=n.flags?o(n.check,te,ue,e.next_out-ue):r(n.check,te,ue,e.next_out-ue)),e.data_type=n.bits+(n.last?64:0)+(n.mode===R?128:0)+(n.mode===W||n.mode===O?256:0),(0===le&&0===ue||t===h)&&ke===p&&(ke=w),ke)},t.inflateEnd=function(e){if(!e||!e.state)return v;var t=e.state;return t.window&&(t.window=null),e.state=null,p},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?v:(n.head=t,t.done=!1,p):v},t.inflateSetDictionary=function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==P?v:n.mode===P&&r(1,t,i,0)!==n.check?y:de(e,t,i,i)?(n.mode=Q,b):(n.havedict=1,p):v},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";var i=n(196),r=n(55),o=n(118),s=n(116),a=n(89),c=n(117),l=n(193),u=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==s.Z_OK)throw new Error(a[n]);this.header=new l,i.inflateGetHeader(this.strm,this.header)}function d(e,t){var n=new h(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}h.prototype.push=function(e,t){var n,a,c,l,h,d,f=this.strm,p=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(n=i.inflate(f,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&g&&(d="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===u.call(g)?new Uint8Array(g):g,n=i.inflateSetDictionary(this.strm,d)),n===s.Z_BUF_ERROR&&!0===m&&(n=s.Z_OK,m=!1),n!==s.Z_STREAM_END&&n!==s.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==s.Z_STREAM_END&&(0!==f.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(c=o.utf8border(f.output,f.next_out),l=f.next_out-c,h=o.buf2string(f.output,c),f.next_out=l,f.avail_out=p-l,l&&r.arraySet(f.output,f.output,c,l,0),this.onData(h)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==s.Z_STREAM_END);return n===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),f.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=h,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},function(e,t,n){"use strict";var i=n(55),r=4,o=0,s=1,a=2;function c(e){for(var t=e.length;--t>=0;)e[t]=0}var l=0,u=1,h=2,d=29,f=256,p=f+1+d,g=30,m=19,v=2*p+1,y=15,b=16,w=7,x=256,_=16,k=17,C=18,E=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=new Array(2*(p+2));c(T);var D=new Array(2*g);c(D);var L=new Array(512);c(L);var P=new Array(256);c(P);var R=new Array(d);c(R);var M,B,O,j=new Array(g);function I(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}function $(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function N(e){return e<256?L[e]:L[256+(e>>>7)]}function W(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function z(e,t,n){e.bi_valid>b-n?(e.bi_buf|=t<<e.bi_valid&65535,W(e,e.bi_buf),e.bi_buf=t>>b-e.bi_valid,e.bi_valid+=n-b):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function H(e,t,n){z(e,n[2*t],n[2*t+1])}function V(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function U(e,t,n){var i,r,o=new Array(y+1),s=0;for(i=1;i<=y;i++)o[i]=s=s+n[i-1]<<1;for(r=0;r<=t;r++){var a=e[2*r+1];0!==a&&(e[2*r]=V(o[a]++,a))}}function K(e){var t;for(t=0;t<p;t++)e.dyn_ltree[2*t]=0;for(t=0;t<g;t++)e.dyn_dtree[2*t]=0;for(t=0;t<m;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*x]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function G(e){e.bi_valid>8?W(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function q(e,t,n,i){var r=2*t,o=2*n;return e[r]<e[o]||e[r]===e[o]&&i[t]<=i[n]}function Y(e,t,n){for(var i=e.heap[n],r=n<<1;r<=e.heap_len&&(r<e.heap_len&&q(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!q(t,i,e.heap[r],e.depth));)e.heap[n]=e.heap[r],n=r,r<<=1;e.heap[n]=i}function X(e,t,n){var i,r,o,s,a=0;if(0!==e.last_lit)do{i=e.pending_buf[e.d_buf+2*a]<<8|e.pending_buf[e.d_buf+2*a+1],r=e.pending_buf[e.l_buf+a],a++,0===i?H(e,r,t):(H(e,(o=P[r])+f+1,t),0!==(s=E[o])&&z(e,r-=R[o],s),H(e,o=N(--i),n),0!==(s=A[o])&&z(e,i-=j[o],s))}while(a<e.last_lit);H(e,x,t)}function Z(e,t){var n,i,r,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=v,n=0;n<c;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(r=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[r]=0,e.opt_len--,a&&(e.static_len-=s[2*r+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)Y(e,o,n);r=c;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Y(e,o,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,o[2*r]=o[2*n]+o[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,o[2*n+1]=o[2*i+1]=r,e.heap[1]=r++,Y(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,r,o,s,a,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,p=t.stat_desc.max_length,g=0;for(o=0;o<=y;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<v;n++)(o=c[2*c[2*(i=e.heap[n])+1]+1]+1)>p&&(o=p,g++),c[2*i+1]=o,i>l||(e.bl_count[o]++,s=0,i>=f&&(s=d[i-f]),a=c[2*i],e.opt_len+=a*(o+s),h&&(e.static_len+=a*(u[2*i+1]+s)));if(0!==g){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(i=e.bl_count[o];0!==i;)(r=e.heap[--n])>l||(c[2*r+1]!==o&&(e.opt_len+=(o-c[2*r+1])*c[2*r],c[2*r+1]=o),i--)}}(e,t),U(o,l,e.bl_count)}function Q(e,t,n){var i,r,o=-1,s=t[1],a=0,c=7,l=4;for(0===s&&(c=138,l=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)r=s,s=t[2*(i+1)+1],++a<c&&r===s||(a<l?e.bl_tree[2*r]+=a:0!==r?(r!==o&&e.bl_tree[2*r]++,e.bl_tree[2*_]++):a<=10?e.bl_tree[2*k]++:e.bl_tree[2*C]++,a=0,o=r,0===s?(c=138,l=3):r===s?(c=6,l=3):(c=7,l=4))}function J(e,t,n){var i,r,o=-1,s=t[1],a=0,c=7,l=4;for(0===s&&(c=138,l=3),i=0;i<=n;i++)if(r=s,s=t[2*(i+1)+1],!(++a<c&&r===s)){if(a<l)do{H(e,r,e.bl_tree)}while(0!=--a);else 0!==r?(r!==o&&(H(e,r,e.bl_tree),a--),H(e,_,e.bl_tree),z(e,a-3,2)):a<=10?(H(e,k,e.bl_tree),z(e,a-3,3)):(H(e,C,e.bl_tree),z(e,a-11,7));a=0,o=r,0===s?(c=138,l=3):r===s?(c=6,l=3):(c=7,l=4)}}c(j);var ee=!1;function te(e,t,n,r){z(e,(l<<1)+(r?1:0),3),function(e,t,n,r){G(e),r&&(W(e,n),W(e,~n)),i.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}t._tr_init=function(e){ee||(function(){var e,t,n,i,r,o=new Array(y+1);for(n=0,i=0;i<d-1;i++)for(R[i]=n,e=0;e<1<<E[i];e++)P[n++]=i;for(P[n-1]=i,r=0,i=0;i<16;i++)for(j[i]=r,e=0;e<1<<A[i];e++)L[r++]=i;for(r>>=7;i<g;i++)for(j[i]=r<<7,e=0;e<1<<A[i]-7;e++)L[256+r++]=i;for(t=0;t<=y;t++)o[t]=0;for(e=0;e<=143;)T[2*e+1]=8,e++,o[8]++;for(;e<=255;)T[2*e+1]=9,e++,o[9]++;for(;e<=279;)T[2*e+1]=7,e++,o[7]++;for(;e<=287;)T[2*e+1]=8,e++,o[8]++;for(U(T,p+1,o),e=0;e<g;e++)D[2*e+1]=5,D[2*e]=V(e,5);M=new I(T,E,f+1,p,y),B=new I(D,A,0,g,y),O=new I(new Array(0),S,0,m,w)}(),ee=!0),e.l_desc=new $(e.dyn_ltree,M),e.d_desc=new $(e.dyn_dtree,B),e.bl_desc=new $(e.bl_tree,O),e.bi_buf=0,e.bi_valid=0,K(e)},t._tr_stored_block=te,t._tr_flush_block=function(e,t,n,i){var c,l,d=0;e.level>0?(e.strm.data_type===a&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return s;for(t=32;t<f;t++)if(0!==e.dyn_ltree[2*t])return s;return o}(e)),Z(e,e.l_desc),Z(e,e.d_desc),d=function(e){var t;for(Q(e,e.dyn_ltree,e.l_desc.max_code),Q(e,e.dyn_dtree,e.d_desc.max_code),Z(e,e.bl_desc),t=m-1;t>=3&&0===e.bl_tree[2*F[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),c=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=c&&(c=l)):c=l=n+5,n+4<=c&&-1!==t?te(e,t,n,i):e.strategy===r||l===c?(z(e,(u<<1)+(i?1:0),3),X(e,T,D)):(z(e,(h<<1)+(i?1:0),3),function(e,t,n,i){var r;for(z(e,t-257,5),z(e,n-1,5),z(e,i-4,4),r=0;r<i;r++)z(e,e.bl_tree[2*F[r]+1],3);J(e,e.dyn_ltree,t-1),J(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,d+1),X(e,e.dyn_ltree,e.dyn_dtree)),K(e),i&&G(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(P[n]+f+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){z(e,u<<1,3),H(e,x,T),function(e){16===e.bi_valid?(W(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,n){"use strict";var i,r=n(55),o=n(198),s=n(120),a=n(119),c=n(89),l=0,u=1,h=3,d=4,f=5,p=0,g=1,m=-2,v=-3,y=-5,b=-1,w=1,x=2,_=3,k=4,C=0,E=2,A=8,S=9,F=15,T=8,D=286,L=30,P=19,R=2*D+1,M=15,B=3,O=258,j=O+B+1,I=32,$=42,N=69,W=73,z=91,H=103,V=113,U=666,K=1,G=2,q=3,Y=4,X=3;function Z(e,t){return e.msg=c[t],t}function Q(e){return(e<<1)-(e>4?9:0)}function J(e){for(var t=e.length;--t>=0;)e[t]=0}function ee(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(r.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function te(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ee(e.strm)}function ne(e,t){e.pending_buf[e.pending++]=t}function ie(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function re(e,t){var n,i,r=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-j?e.strstart-(e.w_size-j):0,l=e.window,u=e.w_mask,h=e.prev,d=e.strstart+O,f=l[o+s-1],p=l[o+s];e.prev_length>=e.good_match&&(r>>=2),a>e.lookahead&&(a=e.lookahead);do{if(l[(n=t)+s]===p&&l[n+s-1]===f&&l[n]===l[o]&&l[++n]===l[o+1]){o+=2,n++;do{}while(l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<d);if(i=O-(d-o),o=d-O,i>s){if(e.match_start=t,s=i,i>=a)break;f=l[o+s-1],p=l[o+s]}}}while((t=h[t&u])>c&&0!=--r);return s<=e.lookahead?s:e.lookahead}function oe(e){var t,n,i,o,c,l,u,h,d,f,p=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-j)){r.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=n=e.hash_size;do{i=e.head[--t],e.head[t]=i>=p?i-p:0}while(--n);t=n=p;do{i=e.prev[--t],e.prev[t]=i>=p?i-p:0}while(--n);o+=p}if(0===e.strm.avail_in)break;if(l=e.strm,u=e.window,h=e.strstart+e.lookahead,d=o,f=void 0,(f=l.avail_in)>d&&(f=d),n=0===f?0:(l.avail_in-=f,r.arraySet(u,l.input,l.next_in,f,h),1===l.state.wrap?l.adler=s(l.adler,u,f,h):2===l.state.wrap&&(l.adler=a(l.adler,u,f,h)),l.next_in+=f,l.total_in+=f,f),e.lookahead+=n,e.lookahead+e.insert>=B)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+B-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<B)););}while(e.lookahead<j&&0!==e.strm.avail_in)}function se(e,t){for(var n,i;;){if(e.lookahead<j){if(oe(e),e.lookahead<j&&t===l)return K;if(0===e.lookahead)break}if(n=0,e.lookahead>=B&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+B-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-j&&(e.match_length=re(e,n)),e.match_length>=B)if(i=o._tr_tally(e,e.strstart-e.match_start,e.match_length-B),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=B){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+B-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=e.strstart<B-1?e.strstart:B-1,t===d?(te(e,!0),0===e.strm.avail_out?q:Y):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:G}function ae(e,t){for(var n,i,r;;){if(e.lookahead<j){if(oe(e),e.lookahead<j&&t===l)return K;if(0===e.lookahead)break}if(n=0,e.lookahead>=B&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+B-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=B-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-j&&(e.match_length=re(e,n),e.match_length<=5&&(e.strategy===w||e.match_length===B&&e.strstart-e.match_start>4096)&&(e.match_length=B-1)),e.prev_length>=B&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-B,i=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-B),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+B-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=B-1,e.strstart++,i&&(te(e,!1),0===e.strm.avail_out))return K}else if(e.match_available){if((i=o._tr_tally(e,0,e.window[e.strstart-1]))&&te(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return K}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<B-1?e.strstart:B-1,t===d?(te(e,!0),0===e.strm.avail_out?q:Y):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:G}function ce(e,t,n,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=i,this.func=r}function le(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=E,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?$:V,e.adler=2===t.wrap?0:1,t.last_flush=l,o._tr_init(t),p):Z(e,m)}function ue(e){var t,n=le(e);return n===p&&((t=e.state).window_size=2*t.w_size,J(t.head),t.max_lazy_match=i[t.level].max_lazy,t.good_match=i[t.level].good_length,t.nice_match=i[t.level].nice_length,t.max_chain_length=i[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=B-1,t.match_available=0,t.ins_h=0),n}function he(e,t,n,i,o,s){if(!e)return m;var a=1;if(t===b&&(t=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),o<1||o>S||n!==A||i<8||i>15||t<0||t>9||s<0||s>k)return Z(e,m);8===i&&(i=9);var c=new function(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=A,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(2*R),this.dyn_dtree=new r.Buf16(2*(2*L+1)),this.bl_tree=new r.Buf16(2*(2*P+1)),J(this.dyn_ltree),J(this.dyn_dtree),J(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(M+1),this.heap=new r.Buf16(2*D+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*D+1),J(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0};return e.state=c,c.strm=e,c.wrap=a,c.gzhead=null,c.w_bits=i,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+B-1)/B),c.window=new r.Buf8(2*c.w_size),c.head=new r.Buf16(c.hash_size),c.prev=new r.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new r.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=s,c.method=n,ue(e)}i=[new ce(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(oe(e),0===e.lookahead&&t===l)return K;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+n;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,te(e,!1),0===e.strm.avail_out))return K;if(e.strstart-e.block_start>=e.w_size-j&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?q:Y):(e.strstart>e.block_start&&(te(e,!1),e.strm.avail_out),K)}),new ce(4,4,8,4,se),new ce(4,5,16,8,se),new ce(4,6,32,32,se),new ce(4,4,16,16,ae),new ce(8,16,32,32,ae),new ce(8,16,128,128,ae),new ce(8,32,128,256,ae),new ce(32,128,258,1024,ae),new ce(32,258,258,4096,ae)],t.deflateInit=function(e,t){return he(e,t,A,F,T,C)},t.deflateInit2=he,t.deflateReset=ue,t.deflateResetKeep=le,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?m:(e.state.gzhead=t,p):m},t.deflate=function(e,t){var n,r,s,c;if(!e||!e.state||t>f||t<0)return e?Z(e,m):m;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||r.status===U&&t!==d)return Z(e,0===e.avail_out?y:m);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===$)if(2===r.wrap)e.adler=0,ne(r,31),ne(r,139),ne(r,8),r.gzhead?(ne(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),ne(r,255&r.gzhead.time),ne(r,r.gzhead.time>>8&255),ne(r,r.gzhead.time>>16&255),ne(r,r.gzhead.time>>24&255),ne(r,9===r.level?2:r.strategy>=x||r.level<2?4:0),ne(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(ne(r,255&r.gzhead.extra.length),ne(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=a(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=N):(ne(r,0),ne(r,0),ne(r,0),ne(r,0),ne(r,0),ne(r,9===r.level?2:r.strategy>=x||r.level<2?4:0),ne(r,X),r.status=V);else{var v=A+(r.w_bits-8<<4)<<8;v|=(r.strategy>=x||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(v|=I),v+=31-v%31,r.status=V,ie(r,v),0!==r.strstart&&(ie(r,e.adler>>>16),ie(r,65535&e.adler)),e.adler=1}if(r.status===N)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),ee(e),s=r.pending,r.pending!==r.pending_buf_size));)ne(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=W)}else r.status=W;if(r.status===W)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),ee(e),s=r.pending,r.pending===r.pending_buf_size)){c=1;break}c=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,ne(r,c)}while(0!==c);r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),0===c&&(r.gzindex=0,r.status=z)}else r.status=z;if(r.status===z)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),ee(e),s=r.pending,r.pending===r.pending_buf_size)){c=1;break}c=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,ne(r,c)}while(0!==c);r.gzhead.hcrc&&r.pending>s&&(e.adler=a(e.adler,r.pending_buf,r.pending-s,s)),0===c&&(r.status=H)}else r.status=H;if(r.status===H&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&ee(e),r.pending+2<=r.pending_buf_size&&(ne(r,255&e.adler),ne(r,e.adler>>8&255),e.adler=0,r.status=V)):r.status=V),0!==r.pending){if(ee(e),0===e.avail_out)return r.last_flush=-1,p}else if(0===e.avail_in&&Q(t)<=Q(n)&&t!==d)return Z(e,y);if(r.status===U&&0!==e.avail_in)return Z(e,y);if(0!==e.avail_in||0!==r.lookahead||t!==l&&r.status!==U){var b=r.strategy===x?function(e,t){for(var n;;){if(0===e.lookahead&&(oe(e),0===e.lookahead)){if(t===l)return K;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?q:Y):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:G}(r,t):r.strategy===_?function(e,t){for(var n,i,r,s,a=e.window;;){if(e.lookahead<=O){if(oe(e),e.lookahead<=O&&t===l)return K;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=B&&e.strstart>0&&(i=a[r=e.strstart-1])===a[++r]&&i===a[++r]&&i===a[++r]){s=e.strstart+O;do{}while(i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&r<s);e.match_length=O-(s-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=B?(n=o._tr_tally(e,1,e.match_length-B),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?q:Y):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:G}(r,t):i[r.level].func(r,t);if(b!==q&&b!==Y||(r.status=U),b===K||b===q)return 0===e.avail_out&&(r.last_flush=-1),p;if(b===G&&(t===u?o._tr_align(r):t!==f&&(o._tr_stored_block(r,0,0,!1),t===h&&(J(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),ee(e),0===e.avail_out))return r.last_flush=-1,p}return t!==d?p:r.wrap<=0?g:(2===r.wrap?(ne(r,255&e.adler),ne(r,e.adler>>8&255),ne(r,e.adler>>16&255),ne(r,e.adler>>24&255),ne(r,255&e.total_in),ne(r,e.total_in>>8&255),ne(r,e.total_in>>16&255),ne(r,e.total_in>>24&255)):(ie(r,e.adler>>>16),ie(r,65535&e.adler)),ee(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?p:g)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==$&&t!==N&&t!==W&&t!==z&&t!==H&&t!==V&&t!==U?Z(e,m):(e.state=null,t===V?Z(e,v):p):m},t.deflateSetDictionary=function(e,t){var n,i,o,a,c,l,u,h,d=t.length;if(!e||!e.state)return m;if(2===(a=(n=e.state).wrap)||1===a&&n.status!==$||n.lookahead)return m;for(1===a&&(e.adler=s(e.adler,t,d,0)),n.wrap=0,d>=n.w_size&&(0===a&&(J(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new r.Buf8(n.w_size),r.arraySet(h,t,d-n.w_size,n.w_size,0),t=h,d=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=d,e.next_in=0,e.input=t,oe(n);n.lookahead>=B;){i=n.strstart,o=n.lookahead-(B-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+B-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++}while(--o);n.strstart=i,n.lookahead=B-1,oe(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=B-1,n.match_available=0,e.next_in=l,e.input=u,e.avail_in=c,n.wrap=a,p},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,n){"use strict";var i=n(199),r=n(55),o=n(118),s=n(89),a=n(117),c=Object.prototype.toString,l=0,u=-1,h=0,d=8;function f(e){if(!(this instanceof f))return new f(e);this.options=r.assign({level:u,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==l)throw new Error(s[n]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=i.deflateSetDictionary(this.strm,p))!==l)throw new Error(s[n]);this._dict_set=!0}}function p(e,t){var n=new f(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}f.prototype.push=function(e,t){var n,s,a=this.strm,u=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===c.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new r.Buf8(u),a.next_out=0,a.avail_out=u),1!==(n=i.deflate(a,s))&&n!==l)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(a.output,a.next_out))):this.onData(r.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===s?(n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===l):2!==s||(this.onEnd(l),a.avail_out=0,!0)},f.prototype.onData=function(e){this.chunks.push(e)},f.prototype.onEnd=function(e){e===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=f,t.deflate=p,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,p(e,t)}},function(e,t,n){"use strict";var i={};(0,n(55).assign)(i,n(200),n(197),n(116)),e.exports=i},function(e,t,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=n(201),o=n(42),s=n(50),a=i?"uint8array":"array";function c(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}t.magic="\b\0",o.inherits(c,s),c.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,e.data),!1)},c.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},t.compressWorker=function(e){return new c("Deflate",e)},t.uncompressWorker=function(){return new c("Inflate",{})}},function(e,t,n){"use strict";var i=n(121),r=n(192);t.generateWorker=function(e,t,n){var o=new r(t.streamFiles,n,t.platform,t.encodeFileName),s=0;try{e.forEach(function(e,n){s++;var r=function(e,t){var n=e||t,r=i[n];if(!r)throw new Error(n+" is not a valid compression method !");return r}(n.options.compression,t.compression),a=n.options.compressionOptions||t.compressionOptions||{},c=n.dir,l=n.date;n._compressWorker(r,a).withStreamInfo("file",{name:e,dir:c,date:l,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)}),o.entriesCount=s}catch(e){o.error(e)}return o}},function(e,t,n){"use strict";var i=n(126),r=n(124),o=n(67),s=n(91),a=n(50),c=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};c.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var s=!this._dataBinary;s&&!r&&(t=t.pipe(new o.Utf8EncodeWorker)),!s&&r&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new a("error")).error(e)}return new i(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof s&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new o.Utf8EncodeWorker)),s.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof a?this._data:new r(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<l.length;h++)c.prototype[l[h]]=u;e.exports=c},function(e,t,n){"use strict";var i=n(140).Readable;function r(e,t,n){i.call(this,t),this._helper=e;var r=this;e.on("data",function(e,t){r.push(e)||r._helper.pause(),n&&n(t)}).on("error",function(e){r.emit("error",e)}).on("end",function(){r.push(null)})}n(42).inherits(r,i),r.prototype._read=function(){this._helper.resume()},e.exports=r},function(e,t,n){"use strict";var i=n(50),r=n(42);function o(e){i.call(this,"ConvertWorker to "+e),this.destType=e}r.inherits(o,i),o.prototype.processChunk=function(e){this.push({data:r.transformTo(this.destType,e.data),meta:e.meta})},e.exports=o},function(e,t,n){"use strict";(function(t){var n,i,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var o=0,s=new r(u),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),n=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)n="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){u(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(u,0)};else{var c=new t.MessageChannel;c.port1.onmessage=u,n=function(){c.port2.postMessage(0)}}var l=[];function u(){var e,t;i=!0;for(var n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}i=!1}e.exports=function(e){1!==l.push(e)||i||n()}}).call(this,n(52))},function(e,t,n){"use strict";var i=n(207);function r(){}var o={},s=["REJECTED"],a=["FULFILLED"],c=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==r&&f(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(e,t,n){i(function(){var i;try{i=t(n)}catch(t){return o.reject(e,t)}i===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,i)})}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function i(t){n||(n=!0,o.reject(e,t))}function r(t){n||(n=!0,o.resolve(e,t))}var s=p(function(){t(r,i)});"error"===s.status&&i(s.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}e.exports=l,l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var n=new this.constructor(r);this.state!==c?h(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t));return n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return o.reject(e,n.value);var i=n.value;if(i)f(e,i);else{e.state=a,e.outcome=t;for(var r=-1,s=e.queue.length;++r<s;)e.queue[r].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var n=-1,i=e.queue.length;++n<i;)e.queue[n].callRejected(t);return e},l.resolve=function(e){if(e instanceof this)return e;return o.resolve(new this(r),e)},l.reject=function(e){var t=new this(r);return o.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);var s=new Array(n),a=0,c=-1,l=new this(r);for(;++c<n;)u(e[c],c);return l;function u(e,r){t.resolve(e).then(function(e){s[r]=e,++a!==n||i||(i=!0,o.resolve(l,s))},function(e){i||(i=!0,o.reject(l,e))})}},l.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);var s=-1,a=new this(r);for(;++s<n;)c=e[s],t.resolve(c).then(function(e){i||(i=!0,o.resolve(a,e))},function(e){i||(i=!0,o.reject(a,e))});var c;return a}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){e.exports=n(80).document&&document.documentElement},function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var i,r,o,s=n(129),a=n(211),c=n(210),l=n(127),u=n(80),h=u.process,d=u.setImmediate,f=u.clearImmediate,p=u.MessageChannel,g=0,m={},v=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},y=function(e){v.call(e.data)};d&&f||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++g]=function(){a("function"==typeof e?e:Function(e),t)},i(g),g},f=function(e){delete m[e]},"process"==n(209)(h)?i=function(e){h.nextTick(s(v,e,1))}:p?(o=(r=new p).port2,r.port1.onmessage=y,i=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(e){u.postMessage(e+"","*")},u.addEventListener("message",y,!1)):i="onreadystatechange"in l("script")?function(e){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),v.call(e)}}:function(e){setTimeout(s(v,e,1),0)}),e.exports={set:d,clear:f}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(93);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){e.exports=!n(92)&&!n(128)(function(){return 7!=Object.defineProperty(n(127)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(93);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var i=n(216),r=n(215),o=n(214),s=Object.defineProperty;t.f=n(92)?Object.defineProperty:function(e,t,n){if(i(e),t=o(t,!0),i(n),r)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var i=n(217),r=n(213);e.exports=n(92)?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var i=n(80),r=n(130),o=n(129),s=n(218),a=function(e,t,n){var c,l,u,h=e&a.F,d=e&a.G,f=e&a.S,p=e&a.P,g=e&a.B,m=e&a.W,v=d?r:r[t]||(r[t]={}),y=v.prototype,b=d?i:f?i[t]:(i[t]||{}).prototype;for(c in d&&(n=t),n)(l=!h&&b&&void 0!==b[c])&&c in v||(u=l?b[c]:n[c],v[c]=d&&"function"!=typeof b[c]?n[c]:g&&l?o(u,i):m&&b[c]==u?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(u):p&&"function"==typeof u?o(Function.call,u):u,p&&((v.virtual||(v.virtual={}))[c]=u,e&a.R&&y&&!y[c]&&s(y,c,u)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,e.exports=a},function(e,t,n){var i=n(220),r=n(212);i(i.G+i.B,{setImmediate:r.set,clearImmediate:r.clear})},function(e,t,n){n(221),e.exports=n(130).setImmediate},function(e,t,n){e.exports=n(95).PassThrough},function(e,t,n){e.exports=n(95).Transform},function(e,t,n){e.exports=n(61)},function(e,t,n){e.exports=n(94)},function(e,t,n){"use strict";e.exports=o;var i=n(132),r=n(69);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}r.inherits=n(66),r.inherits(o,i),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this,n(52))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,r,o,s,a,c=1,l={},u=!1,h=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick(function(){p(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},i=function(e){o.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(r=h.documentElement,i=function(e){var t=h.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(p,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),i=function(t){e.postMessage(s+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return l[c]=r,i(c),c++},d.clearImmediate=f}function f(e){delete l[e]}function p(e){if(u)setTimeout(p,0,e);else{var t=l[e];if(t){u=!0;try{!function(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(n,i)}}(t)}finally{f(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(52),n(70))},function(e,t,n){"use strict";var i=n(82).Buffer,r=n(136);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t,n,r,o=i.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=o,r=a,t.copy(n,r),a+=s.data.length,s=s.next;return o},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t,n){e.exports=r;var i=n(96).EventEmitter;function r(){i.call(this)}n(66)(r,i),r.Readable=n(95),r.Writable=n(226),r.Duplex=n(225),r.Transform=n(224),r.PassThrough=n(223),r.Stream=r,r.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",c));var s=!1;function a(){s||(s=!0,e.end())}function c(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",r),e.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",c),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",l),e.on("error",l),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}},function(e,t){t.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,c=(1<<a)-1,l=c>>1,u=-7,h=n?r-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+h],h+=d,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=256*s+e[t+h],h+=d,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),o-=l}return(f?-1:1)*s*Math.pow(2,o-i)},t.write=function(e,t,n,i,r,o){var s,a,c,l=8*o-r-1,u=(1<<l)-1,h=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,r),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=255&a,f+=p,a/=256,r-=8);for(s=s<<r|a,l+=r;l>0;e[n+f]=255&s,f+=p,s/=256,l-=8);e[n+f-p]|=128*g}},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){for(var t,n=l(e),i=n[0],s=n[1],a=new o(function(e,t,n){return 3*(t+n)/4-n}(0,i,s)),c=0,u=s>0?i-4:i,h=0;h<u;h+=4)t=r[e.charCodeAt(h)]<<18|r[e.charCodeAt(h+1)]<<12|r[e.charCodeAt(h+2)]<<6|r[e.charCodeAt(h+3)],a[c++]=t>>16&255,a[c++]=t>>8&255,a[c++]=255&t;2===s&&(t=r[e.charCodeAt(h)]<<2|r[e.charCodeAt(h+1)]>>4,a[c++]=255&t);1===s&&(t=r[e.charCodeAt(h)]<<10|r[e.charCodeAt(h+1)]<<4|r[e.charCodeAt(h+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t);return a},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],s=0,a=n-r;s<a;s+=16383)o.push(u(e,s,s+16383>a?a:s+16383));1===r?(t=e[n-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")};for(var i=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)i[a]=s[a],r[s.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,o,s=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t,n){"use strict";var i=n(67),r=n(42),o=n(50),s=n(126),a=n(125),c=n(91),l=n(204),u=n(203),h=n(81),d=n(191),f=function(e,t,n){var i,s=r.getTypeOf(t),u=r.extend(n||{},a);u.date=u.date||new Date,null!==u.compression&&(u.compression=u.compression.toUpperCase()),"string"==typeof u.unixPermissions&&(u.unixPermissions=parseInt(u.unixPermissions,8)),u.unixPermissions&&16384&u.unixPermissions&&(u.dir=!0),u.dosPermissions&&16&u.dosPermissions&&(u.dir=!0),u.dir&&(e=g(e)),u.createFolders&&(i=p(e))&&m.call(this,i,!0);var f="string"===s&&!1===u.binary&&!1===u.base64;n&&void 0!==n.binary||(u.binary=!f),(t instanceof c&&0===t.uncompressedSize||u.dir||!t||0===t.length)&&(u.base64=!1,u.binary=!0,t="",u.compression="STORE",s="string");var v=null;v=t instanceof c||t instanceof o?t:h.isNode&&h.isStream(t)?new d(e,t):r.prepareContent(e,t,u.binary,u.optimizedBinaryString,u.base64);var y=new l(e,v,u);this.files[e]=y},p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:a.createFolders,e=g(e),this.files[e]||f.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,i;for(t in this.files)this.files.hasOwnProperty(t)&&(i=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,i))},filter:function(e){var t=[];return this.forEach(function(n,i){e(n,i)&&t.push(i)}),t},file:function(e,t,n){if(1===arguments.length){if(v(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var r=this.files[this.root+e];return r&&!r.dir?r:null}return e=this.root+e,f.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(v(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=m.call(this,t),i=this.clone();return i.root=n.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),i=0;i<n.length;i++)delete this.files[n[i].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=r.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");r.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var a=n.comment||this.comment||"";t=u.generateWorker(this,n,a)}catch(e){(t=new o("error")).error(e)}return new s(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};e.exports=y},function(e,t,n){var i,r,o;o=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var i=n(2).mergeOpts,r=n(1),o=r.lineBreak,s=r.allLineBreaks;function a(e){return e.replace(/\s+$/g,"")}e.exports.Beautifier=function(e,t,n,r){var c,l,u,h,d,f,p,g,m,v,y,b,w,x,_,k,C,E,A,S,F;e=e||"",void 0!==(t=i(t=t||{},"html")).wrap_line_length&&0!==parseInt(t.wrap_line_length,10)||void 0===t.max_char||0===parseInt(t.max_char,10)||(t.wrap_line_length=t.max_char),l=void 0!==t.indent_inner_html&&t.indent_inner_html,u=void 0===t.indent_body_inner_html||t.indent_body_inner_html,h=void 0===t.indent_head_inner_html||t.indent_head_inner_html,d=void 0===t.indent_size?4:parseInt(t.indent_size,10),f=void 0===t.indent_char?" ":t.indent_char,g=void 0===t.brace_style?"collapse":t.brace_style,p=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),m=t.unformatted||["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","address","big","dt","ins","strike","tt"],v=t.content_unformatted||["pre"],y=void 0===t.preserve_newlines||t.preserve_newlines,b=y?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,w=void 0!==t.indent_handlebars&&t.indent_handlebars,x=void 0===t.wrap_attributes?"auto":t.wrap_attributes,_=isNaN(parseInt(t.wrap_attributes_indent_size,10))?d:parseInt(t.wrap_attributes_indent_size,10),k="force"===x.substr(0,"force".length),C="force-expand-multiline"===x,E="force-aligned"===x,A=void 0!==t.end_with_newline&&t.end_with_newline,S="object"==typeof t.extra_liners&&t.extra_liners?t.extra_liners.concat():"string"==typeof t.extra_liners?t.extra_liners.split(","):"head,body,/html".split(","),F=t.eol?t.eol:"auto",t.indent_with_tabs&&(f="\t",d=1),"auto"===F&&(F="\n",e&&o.test(e||"")&&(F=e.match(o)[0])),F=F.replace(/\\r/,"\r").replace(/\\n/,"\n"),e=e.replace(s,"\n"),this.beautify=function(){for((c=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=l,this.indent_body_inner_html=u,this.indent_head_inner_html=h,this.Utils={whitespace:"\n\r\t ".split(""),single_token:t.void_elements||["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","?php","basefont","isindex"],extra_liners:S,in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])return!0;return!1}},this.is_whitespace=function(e){for(var t=0;t<e.length;t++)if(!this.Utils.in_array(e.charAt(t),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)y&&"\n"===e&&this.newlines<=b&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(e){return this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e),!0):(this.line_char_count++,e.push(" "),!1)},this.get_content=function(){for(var e="",t=[],n=0;"<"!==this.input.charAt(this.pos)||2===n;){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(n<2&&this.traverse_whitespace())this.space_or_wrap(t);else{if(e=this.input.charAt(this.pos),w){if("{"===e?n+=1:n<2&&(n=0),"}"===e&&n>0&&0==n--)break;var i=this.input.substr(this.pos,3);if("{{#"===i||"{{/"===i)break;if("{{!"===i)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",n=new RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos<r&&(t=this.input.substring(this.pos,r),this.pos=r),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,n,i,r="",o=[],s="",a=!1,c=!0,l=!1,u=this.pos,h=this.line_char_count,d=!1;e=void 0!==e&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=u,this.line_char_count=h),o.length?o.join(""):["","TK_EOF"];if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace))a=!0;else{if("'"!==r&&'"'!==r||(r+=this.get_unformatted(r),a=!0),"="===r&&(a=!1),i=this.input.substr(this.pos-1),!C||!l||d||">"!==r&&"/"!==r||i.match(/^\/?\s*>/)&&(a=!1,d=!0,this.print_newline(!1,o),this.print_indentation(o)),o.length&&"="!==o[o.length-1]&&">"!==r&&a){var f=this.space_or_wrap(o)&&"/"!==r&&!k;if(a=!1,k&&"/"!==r){var p=!1;C&&c&&(p=!(null!==i.match(/^\S*(="([^"]|\\")*")?\s*\/?\s*>/))),c&&!p||(this.print_newline(!1,o),this.print_indentation(o),f=!0)}if(f){l=!0;var g=_;E&&(g=o.indexOf(" ")+1);for(var y=0;y<g;y++)o.push(" ")}if(c)for(var b=0;b<o.length;b++)if(" "===o[b]){c=!1;break}}if(w&&"<"===n&&r+this.input.charAt(this.pos)==="{{"&&(r+=this.get_unformatted("}}"),o.length&&" "!==o[o.length-1]&&"<"!==o[o.length-1]&&(r=" "+r),a=!0),"<"!==r||n||(t=this.pos-1,n="<"),w&&!n&&o.length>=2&&"{"===o[o.length-1]&&"{"===o[o.length-2]&&(t="#"===r||"/"===r||"!"===r?this.pos-3:this.pos-2,n="{"),this.line_char_count++,o.push(r),o[1]&&("!"===o[1]||"?"===o[1]||"%"===o[1])){o=[this.get_comment(t)];break}if(w&&o[1]&&"{"===o[1]&&o[2]&&"!"===o[2]){o=[this.get_comment(t)];break}if(w&&"{"===n&&o.length>2&&"}"===o[o.length-2]&&"}"===o[o.length-1])break}}while(">"!==r);var x,A,S=o.join("");x=-1!==S.indexOf(" ")?S.indexOf(" "):-1!==S.indexOf("\n")?S.indexOf("\n"):"{"===S.charAt(0)?S.indexOf("}"):S.indexOf(">"),A="<"!==S.charAt(0)&&w?"#"===S.charAt(2)?3:2:1;var F=S.substring(A,x).toLowerCase();return"/"===S.charAt(S.length-2)||this.Utils.in_array(F,this.Utils.single_token)?e||(this.tag_type="SINGLE"):w&&"{"===S.charAt(0)&&"else"===F?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(F,m)||this.is_unformatted(F,v)?(s=this.get_unformatted("</"+F+">",S),o.push(s),this.pos,this.tag_type="SINGLE"):"script"===F&&(-1===S.search("type")||S.search("type")>-1&&S.search(/\b(text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect)/)>-1)?e||(this.record_tag(F),this.tag_type="SCRIPT"):"style"===F&&(-1===S.search("type")||S.search("type")>-1&&S.search("text/css")>-1)?e||(this.record_tag(F),this.tag_type="STYLE"):"!"===F.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===F.charAt(0)?(this.retrieve_tag(F.substring(1)),this.tag_type="END"):(this.record_tag(F),"html"!==F.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(o),this.Utils.in_array(F,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=u,this.line_char_count=h),o.join("")},this.get_comment=function(e){var t="",n=">",i=!1;this.pos=e;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((t+=r).charAt(t.length-1)!==n.charAt(n.length-1)||-1===t.indexOf(n));)!i&&t.length<10&&(0===t.indexOf("<![if")?(n="<![endif]>",i=!0):0===t.indexOf("<![cdata[")?(n="]]>",i=!0):0===t.indexOf("<![")?(n="]>",i=!0):0===t.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===t.indexOf("{{!--")?(n="--}}",i=!0):0===t.indexOf("{{!")?5===t.length&&-1===t.indexOf("{{!--")&&(n="}}",i=!0):0===t.indexOf("<?")?(n="?>",i=!0):0===t.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!==t.toLowerCase().indexOf(e))return"";var n="",i="",r=!0,o=function(e){var t="";return{add:function(n){var i=t+n.toLowerCase();t=i.length<=e.length?i:i.substr(i.length-e.length,e.length)},doesNotMatch:function(){return-1===t.indexOf(e)}}}(e);do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!r){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,o.add(n),this.line_char_count++,r=!0,w&&"{"===n&&i.length&&"{"===i.charAt(i.length-2)&&(i+=this.get_unformatted("}}"))}while(o.doesNotMatch());return i},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]}return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!==e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var n=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n[1],t))},this.printer=function(e,t,n,i,r){this.input=e||"",this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n"),this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=r,this.indent_level=0,this.wrap_line_length=i,this.line_char_count=0;for(var o=0;o<this.indent_size;o++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!==t[t.length-1])&&("\n"!==t[t.length-1]&&(t[t.length-1]=a(t[t.length-1])),t.push("\n"))},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){this.is_whitespace(e)&&!this.output.length||((e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=e.replace(/^\s+/g,"")),this.print_token_raw(e))},this.print_token_raw=function(e){this.newlines>0&&(e=a(e)),e&&""!==e&&(e.length>1&&"\n"===e.charAt(e.length-1)?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(t>0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}).printer(e,f,d,p,g);;){var i=c.get_token();if(c.token_text=i[0],c.token_type=i[1],"TK_EOF"===c.token_type)break;switch(c.token_type){case"TK_TAG_START":c.print_newline(!1,c.output),c.print_token(c.token_text),c.indent_content&&(!c.indent_body_inner_html&&c.token_text.match(/<body(?:.*)>/)||!c.indent_head_inner_html&&c.token_text.match(/<head(?:.*)>/)||c.indent(),c.indent_content=!1),c.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":c.print_newline(!1,c.output),c.print_token(c.token_text),c.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===c.last_token&&""===c.last_text){var o=(c.token_text.match(/\w+/)||[])[0],s=null;c.output.length&&(s=c.output[c.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),(null===s||s[1]!==o&&!c.Utils.in_array(s[1],m))&&c.print_newline(!1,c.output)}c.print_token(c.token_text),c.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var x=c.token_text.match(/^\s*<([a-z-]+)/i);x&&c.Utils.in_array(x[1],m)||c.print_newline(!1,c.output),c.print_token(c.token_text),c.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":for(var T=!1,D=c.output.length-1;D>=0&&"\n"!==c.output[D];D--)if(c.output[D].match(/{{#if/)){T=!0;break}T||c.print_newline(!1,c.output),c.print_token(c.token_text),c.indent_content&&(c.indent(),c.indent_content=!1),c.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":c.print_token(c.token_text),c.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==c.token_text){c.print_newline(!1,c.output);var L,P=c.token_text,R=1;"TK_SCRIPT"===c.token_type?L="function"==typeof n&&n:"TK_STYLE"===c.token_type&&(L="function"==typeof r&&r),"keep"===t.indent_scripts?R=0:"separate"===t.indent_scripts&&(R=-c.indent_level);var M=c.get_full_indent(R);if(L){var B=function(){this.eol="\n"};B.prototype=t;var O=new B;P=L(P.replace(/^\s*/,M),O)}else{var j=P.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(c.indent_string).length-1,I=c.get_full_indent(R-j);P=P.replace(/^\s*/,M).replace(/\r\n|\r|\n/g,"\n"+I).replace(/\s+$/,"")}P&&(c.print_token_raw(P),c.print_newline(!0,c.output))}c.current_mode="TAG";break;default:""!==c.token_text&&c.print_token(c.token_text)}c.last_token=c.token_type,c.last_text=c.token_text}var $=c.output.join("").replace(/[\r\n\t ]+$/,"");return A&&($+="\n"),"\n"!==F&&($=$.replace(/[\n]/g,F)),$}}},function(e,t){var n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i=new RegExp("["+n+"]"),r=new RegExp("["+n+"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|"+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g"),t.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||e>=170&&i.test(String.fromCharCode(e)))},t.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||e>=170&&r.test(String.fromCharCode(e))))}},function(e,t){e.exports.mergeOpts=function(e,t){var n,i={};for(n in e)n!==t&&(i[n]=e[n]);if(t in e)for(n in e[t])i[n]=e[t][n];return i}},function(e,t,n){var i=n(0).Beautifier;e.exports=function(e,t,n,r){return new i(e,t,n,r).beautify()}}]),i=[n,n(100),n(99)],void 0===(r=function(e){var t=n(100),i=n(99);return{html_beautify:function(e,n){return o(e,n,t.js_beautify,i.css_beautify)}}}.apply(t,i))||(e.exports=r)}]]);
|
||
//# sourceMappingURL=vendor.bundle.js.map |