diff --git a/deploy/jN/lib/es5-shim.js b/deploy/jN/lib/es5-shim.js new file mode 100644 index 0000000..80e3308 --- /dev/null +++ b/deploy/jN/lib/es5-shim.js @@ -0,0 +1,29 @@ +/**! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2014 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ +(function(){function r(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)}function v(){}function A(a){a=+a;a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(0=b){if(a==this.length)return E.apply(this,c),[];if(0==a)return z.apply(this,c),[]}e=s.call(this,a,a+b);c.push.apply(c,s.call(this,a+b,this.length));c.unshift.apply(c,s.call(this,0,a));c.unshift(0,this.length); +y.apply(this,c);return e}return y.call(this,a,b)}}1!=[].unshift(0)&&(z=Array.prototype.unshift,Array.prototype.unshift=function(){z.apply(this,arguments);return this.length});Array.isArray||(Array.isArray=function(a){return"[object Array]"==l(a)});var m=Object("a"),q="a"!=m[0]||!(0 in m),m=function(a){var b=!0;a&&a.call("foo",function(a,c,d){"object"!==typeof d&&(b=!1)});return!!a&&b};Array.prototype.forEach&&m(Array.prototype.forEach)||(Array.prototype.forEach=function(a,b){var e=r(this),c=q&&"[object String]"== +l(this)?this.split(""):e,d=-1,g=c.length>>>0;if("[object Function]"!=l(a))throw new TypeError;for(;++d>>0,g=Array(d);if("[object Function]"!=l(a))throw new TypeError(a+" is not a function");for(var h=0;h>>0,g=[],h;if("[object Function]"!=l(a))throw new TypeError(a+" is not a function");for(var u=0;u>>0;if("[object Function]"!=l(a))throw new TypeError(a+" is not a function");for(var g=0;g>>0;if("[object Function]"!=l(a))throw new TypeError(a+" is not a function");for(var g=0;g>>0;if("[object Function]"!= +l(a))throw new TypeError(a+" is not a function");if(!c&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var d=0,g;if(2<=arguments.length)g=arguments[1];else{do{if(d in e){g=e[d++];break}if(++d>=c)throw new TypeError("reduce of empty array with no initial value");}while(1)}for(;d>>0;if("[object Function]"!=l(a))throw new TypeError(a+" is not a function");if(!c&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var d,c=c-1;if(2<=arguments.length)d=arguments[1];else{do{if(c in e){d=e[c--];break}if(0>--c)throw new TypeError("reduceRight of empty array with no initial value");}while(1)}if(0>c)return d;do c in this&&(d=a.call(void 0,d,e[c],c,b));while(c--);return d});Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf= +function(a){var b=q&&"[object String]"==l(this)?this.split(""):r(this),e=b.length>>>0;if(!e)return-1;var c=0;1>>0;if(!e)return-1;var c=e-1;1c?"-":9999=c?-4:-6);for(b=a.length;b--;)e=a[b],10>e&&(a[b]="0"+e);return c+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"});n=!1;try{n=Date.prototype.toJSON&&null===(new Date(NaN)).toJSON()&&-1!==(new Date(-621987552E5)).toJSON().indexOf("-000001")&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(K){}n||(Date.prototype.toJSON=function(a){a=Object(this);var b;if(w(a))b= +a;else if(b=a.valueOf,"function"!==typeof b||(b=b.call(a),!w(b)))if(b=a.toString,"function"!==typeof b||(b=b.call(a),!w(b)))throw new TypeError;if("number"===typeof b&&!isFinite(b))return null;b=a.toISOString;if("function"!=typeof b)throw new TypeError("toISOString property is not callable");return b.call(a)});if(!Date.parse||isNaN(Date.parse("2000-01-01T00:00:00.000Z")))Date=function(a){function b(c,e,f,d,g,l,m){var p=arguments.length;return this instanceof a?(p=1==p&&String(c)===c?new a(b.parse(c)): +7<=p?new a(c,e,f,d,g,l,m):6<=p?new a(c,e,f,d,g,l):5<=p?new a(c,e,f,d,g):4<=p?new a(c,e,f,d):3<=p?new a(c,e,f):2<=p?new a(c,e):1<=p?new a(c):new a,p.constructor=b,p):a.apply(this,arguments)}function e(a,c){var b=1m&&60>p&&1E3>n&&-1g&&24>s&&60>d&&-1=f)?f:NaN}return a.parse.apply(this,arguments)};return b}(Date);Date.now||(Date.now=function(){return(new Date).getTime()});Number.prototype.toFixed&&"0.000"===(8E-5).toFixed(3)&&"0"!==(0.9).toFixed(0)&&"1.25"===(1.255).toFixed(2)&&"1000000000000000128"===(0xde0b6b3a7640080).toFixed(0)||function(){function a(a,b){for(var c=-1;++cd||20= +f||1E21<=f)return String(f);g="";0>f&&(g="-",f=-f);k="0";if(1E-21k?f*c(2,-k,1):f/c(2,k,1);f*=4503599627370496;k=52-k;if(0>>0;f=b.exec(c);){g=f.index+f[0].length;if(g>h&&(d.push(c.slice(h,f.index)),!a&&1=e))break;b.lastIndex===f.index&&b.lastIndex++}h===c.length?!m&&b.test("")||d.push(""):d.push(c.slice(h));return d.length>e?d.slice(0, +e):d}}():"0".split(void 0,0).length&&(String.prototype.split=function(a,b){return void 0===a&&0===b?[]:D.apply(this,arguments)});if("".substr&&"b"!=="0b".substr(-1)){var H=String.prototype.substr;String.prototype.substr=function(a,b){return H.call(this,0>a?0>(a=this.length+a)?0:a:a,b)}}n="\t\n\x0B\f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||n.trim()){n="["+n+"]";var I=RegExp("^"+n+n+"*"),J= +RegExp(n+n+"*$");String.prototype.trim=function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(I,"").replace(J,"")}}if(8!==parseInt(n+"08")||22!==parseInt(n+"0x16"))parseInt=function(a){var b=/^0[xX]/;return function(e,c){e=String(e).trim();+c||(c=b.test(e)?16:10);return a(e,c)}}(parseInt)})(); diff --git a/deploy/jN/lib/es6-shim.js b/deploy/jN/lib/es6-shim.js new file mode 100644 index 0000000..f7c5e90 --- /dev/null +++ b/deploy/jN/lib/es6-shim.js @@ -0,0 +1,50 @@ +// ES6-shim 0.10.1 (c) 2013-2014 Paul Miller (http://paulmillr.com) +// ES6-shim may be freely distributed under the MIT license. +// For more details and documentation: +// https://github.com/paulmillr/es6-shim/ +// Fixed for usage in Notepad++, may work incorrectly because jN uses shitty IE 7 engine + +(function(g){var z=function(g){try{g()}catch(q){return!1}return!0},F=function(g,q){try{var m=function(){g.apply(this,arguments)};if(!m.__proto__)return!1;Object.setPrototypeOf(m,g);m.prototype=Object.create(g.prototype,{constructor:{value:g}});return q(m)}catch(z){return!1}},I=function(){var g=!1;if(String.prototype.startsWith)try{"/a/".startsWith(/a/)}catch(q){g=!0}return g},E=function(){var v="undefined"===typeof global?this:global,q=isFinite,m;if(m=!!Object.defineProperty)try{Object.defineProperty({}, +"x",{}),m=!0}catch(E){m=!1}var A=m;m=I();var G=Array.prototype.slice,J=String.prototype.indexOf,t=Object.prototype.toString,K=Object.prototype.hasOwnProperty,l=function(a,b){Object.keys(b).forEach(function(c){var d=b[c];if(!(c in a))try{if(A)Object.defineProperty(a,c,{configurable:!0,enumerable:!1,writable:!0,value:d});else try{a[c]=d}catch(f){eval(c+"=d")}}catch(h){}})},w="object"===typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";"function"==typeof Set&&"function"===typeof(new Set)["@@iterator"]&& +(w="@@iterator");var p=function(a,b){b||(b=function(){return this});var c={};c[w]=b;l(a,c)},H=function(a){var b=t.call(a),c="[object Arguments]"===b;c||(c="[object Array]"!==b&&null!==a&&"object"===typeof a&&"number"===typeof a.length&&0<=a.length&&"[object Function]"===t.call(a.callee));return c},B=function(a){if(!e.TypeIsObject(a))throw new TypeError("bad object");a._es6construct||(a.constructor&&e.IsCallable(a.constructor["@@create"])&&(a=a.constructor["@@create"](a)),l(a,{_es6construct:!0})); +return a},e={CheckObjectCoercible:function(a,b){if(null==a)throw new TypeError(b||"Cannot call method on "+a);return a},TypeIsObject:function(a){return null!=a&&Object(a)===a},ToObject:function(a,b){return Object(e.CheckObjectCoercible(a,b))},IsCallable:function(a){return"function"===typeof a&&"[object Function]"===t.call(a)},ToInt32:function(a){return a>>0},ToUint32:function(a){return a>>>0},ToInteger:function(a){a=+a;return Number.isNaN(a)?0:0!==a&&Number.isFinite(a)?Math.sign(a)*Math.floor(Math.abs(a)): +a},ToLength:function(a){a=e.ToInteger(a);return 0>=a?0:a>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:a},SameValue:function(a,b){return a===b?0===a?1/a===1/b:!0:Number.isNaN(a)&&Number.isNaN(b)},SameValueZero:function(a,b){return a===b||Number.isNaN(a)&&Number.isNaN(b)},IsIterable:function(a){return e.TypeIsObject(a)&&(a[w]!==g||H(a))},GetIterator:function(a){if(H(a))return new ArrayIterator(a,"value");a=a[w]();if(!e.TypeIsObject(a))throw new TypeError("bad iterator");return a},IteratorNext:function(a){var b= +1a?c:0.5b?1:0):0===b?(k=h=0,c=-Infinity===1/b?1:0):(c=0>b,b=Math.abs(b),b>=Math.pow(2,-126)?(h=Math.min(Math.floor(Math.log(b)/Math.LN2),1023),k=a(b/Math.pow(2,h)*Math.pow(2,23)),2<=k/Math.pow(2,23)&&(h+=1,k=1),127>=1;h.reverse();k=h.join("");c=parseInt(k.substring(0,1),2)?-1:1;h=parseInt(k.substring(1,9),2);k=parseInt(k.substring(9),2);return 255===h?0!==k?NaN:Infinity*c:0c?-0:0}};if("undefined"!==typeof Float32Array){var c=new Float32Array(1);b.toFloat32=function(a){c[0]=a;return c[0]}}return b}();l(String,{fromCodePoint:function(){for(var a=G.call(arguments, +0,arguments.length),b=[],c,d=0,f=a.length;dc||1114111c?b.push(String.fromCharCode(c)):(c-=65536,b.push(String.fromCharCode((c>>10)+55296)),b.push(String.fromCharCode(c%1024+56320)))}return b.join("")},raw:function(a){var b=G.call(arguments,1,arguments.length),c=e.ToObject(a,"bad callSite").raw,c=e.ToObject(c,"bad raw value"),d=Object.keys(c).length,d=e.ToLength(d);if(0===d)return"";for(var f= +[],h=0,k,n;h=d)break;n=b[k];if(n===g)break;k=String(n);f.push(k);h++}return f.join("")}});var C={repeat:function(){var a=function(b,c){if(1>c)return"";if(c%2)return a(b,c-1)+b;var d=a(b,c/2);return d+d};return function(b){var c=String(e.CheckObjectCoercible(this));b=e.ToInteger(b);if(0>b||Infinity===b)throw new RangeError("Invalid String#repeat value");return a(c,b)}}(),startsWith:function(a){var b=String(e.CheckObjectCoercible(this));if("[object RegExp]"=== +t.call(a))throw new TypeError('Cannot call method "startsWith" with a regex');a=String(a);var c=Math.max(e.ToInteger(1c||c>=d)return g;a=b.charCodeAt(c);if(55296>a||56319b||57343=a.length)return this._s= +g,{value:g,done:!0};var c=a.charCodeAt(b);55296>c||56319c||57343a?Math.max(f+a,0):Math.min(a,f);b=0>b?Math.max(f+b,0):Math.min(b,f);d=d===g?f:e.ToInteger(d);d=0>d?Math.max(f+d,0):Math.min(d,f);f=Math.min(d- +b,f-a);d=1;for(bb?Math.max(f+b,0):Math.min(b,f);ba?NaN:1===a?0:Infinity===a?a:Math.log(a+Math.sqrt(a*a-1))},asinh:function(a){a=Number(a);return 0!==a&&q(a)?0>a?-Math.asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a},atanh:function(a){a=Number(a);return Number.isNaN(a)||-1>a||1a;b&&(a=-a);a=Math.pow(a,1/3);return b?-a:a},clz32:function(a){a=Number(a);if(Number.isNaN(a))return NaN;a=e.ToUint32(a);return 0===a?32:32-a.toString(2).length},cosh:function(a){a=Number(a);if(0===a)return 1;if(Number.isNaN(a))return NaN;if(!q(a))return Infinity;0>a&&(a=-a);return 21c;c++){for(var d=2,e=1;d<=c;d++)e*=d;b+=Math.pow(a,c)/e}return b},hypot:function(a,b){var c=!1,d=!0,e=!1,h=[];Array.prototype.every.call(arguments,function(a){a=Number(a);Number.isNaN(a)?c=!0:Infinity===a||-Infinity===a?e=!0:0!==a&&(d=!1);if(e)return!1;c||h.push(Math.abs(a));return!0});if(e)return Infinity;if(c)return NaN;if(d)return 0;h.sort(function(a,b){return b-a});var k=h[0],n=h.map(function(a){return a/deploy/jN/k}).reduce(function(a,b){return a+b*b},0);return k* +Math.sqrt(n)},log2:function(a){return Math.log(a)*Math.LOG2E},log10:function(a){return Math.log(a)*Math.LOG10E},log1p:function(a){a=Number(a);if(-1>a||Number.isNaN(a))return NaN;if(0===a||Infinity===a)return a;if(-1===a)return-Infinity;var b=0;if(0>a||1c;c++)b=0===c%2?b-Math.pow(a,c)/c:b+Math.pow(a,c)/c;return b},sign:function(a){a=+a;return 0===a||Number.isNaN(a)?a:0>a?-1:1},sinh:function(a){a=Number(a);return q(a)&&0!==a?(Math.exp(a)-Math.exp(-a))/2:a},tanh:function(a){a= +Number(a);return Number.isNaN(a)||0===a?a:Infinity===a?1:-Infinity===a?-1:(Math.exp(a)-Math.exp(-a))/(Math.exp(a)+Math.exp(-a))},trunc:function(a){a=Number(a);return 0>a?-Math.floor(-a):Math.floor(a)},imul:function(a,b){var c=a&65535,d=b&65535;return c*d+((a>>>16&65535)*d+c*(b>>>16&65535)<<16>>>0)|0},fround:function(a){return 0===a||Infinity===a||-Infinity===a||Number.isNaN(a)?a:L.toFloat32(Number(a))}};l(Math,m);-5!==Math.imul(4294967295,5)&&(Math.imul=m.imul);m=function(){var a,b;e.IsPromise=function(a){return e.TypeIsObject(a)&& +a._promiseConstructor&&a._status!==g?!0:!1};var c=function(a){if(!e.IsCallable(a))throw new TypeError("bad promise constructor");var b=this;b.promise=e.Construct(a,[function(a,c){b.resolve=a;b.reject=c}]);if(!b.promise._es6construct)throw new TypeError("bad promise constructor");if(!e.IsCallable(b.resolve)||!e.IsCallable(b.reject))throw new TypeError("bad promise constructor");};a=function(){var a=[];window.addEventListener("message",function(b){b.source==window&&"zero-timeout-message"==b.data&&(b.stopPropagation(), +0!==a.length&&a.shift()())},!0);return function(b){a.push(b);window.postMessage("zero-timeout-message","*")}};a=function(){var a=this.Promise;return a&&a.resolve&&function(b){return a.resolve().then(b)}};var d;d="function"==typeof setImmediate&&e.IsCallable(setImmediate)?setImmediate.bind(v):"object"===typeof process&&process.nextTick?process.nextTick:a()||function(a){setTimeout(a,0)};var f=function(a,b){a.forEach(function(a){d(function(){var c=a.handler,d=a.capability,e=d.resolve,k=d.reject;try{var f= +c(b);if(f===d.promise)throw new TypeError("self resolution");h(f,d)||e(f)}catch(r){k(r)}})})},h=function(a,b){if(!e.TypeIsObject(a))return!1;var c=b.resolve,d=b.reject;try{var h=a.then;if(!e.IsCallable(h))return!1;h.call(a,c,d)}catch(k){d(k)}return!0},k=function(a,b,d){return function(e){if(e===a)return d(new TypeError("self resolution"));var k=new c(a._promiseConstructor);return h(e,k)?k.promise.then(b,d):b(e)}};a=function(a){var b=this,b=B(b);if(!b._promiseConstructor)throw new TypeError("bad promise"); +if(b._status!==g)throw new TypeError("promise already initialized");if(!e.IsCallable(a))throw new TypeError("not a valid resolver");b._status="unresolved";b._resolveReactions=[];b._rejectReactions=[];var c=function(a){if("unresolved"===b._status){var c=b._resolveReactions;b._result=a;b._resolveReactions=g;b._rejectReactions=g;b._status="has-resolution";f(c,a)}},d=function(a){if("unresolved"===b._status){var c=b._rejectReactions;b._result=a;b._resolveReactions=g;b._rejectReactions=g;b._status="has-rejection"; +f(c,a)}};try{a(c,d)}catch(h){d(h)}return b};b=a.prototype;l(a,{"@@create":function(a){var c=this.prototype||b;a=a||Object.create(c);l(a,{_status:g,_result:g,_resolveReactions:g,_rejectReactions:g,_promiseConstructor:g});a._promiseConstructor=this;return a}});var n=function(a,b,c,d){var h=!1;return function(e){h||(h=!0,b[a]=e,0===--d.count&&(e=c.resolve,e(b)))}};a.all=function(a){var b=new c(this),d=b.resolve,h=b.reject;try{if(!e.IsIterable(a))throw new TypeError("bad iterable");var k=e.GetIterator(a); +a=[];for(var f={count:1},g=0;;g++){var l=e.IteratorNext(k);if(l.done)break;var m=this.resolve(l.value),p=n(g,a,b,f);f.count++;m.then(p,b.reject)}0===--f.count&&d(a)}catch(q){h(q)}return b.promise};a.race=function(a){var b=new c(this),d=b.resolve,h=b.reject;try{if(!e.IsIterable(a))throw new TypeError("bad iterable");for(var k=e.GetIterator(a);;){var f=e.IteratorNext(k);if(f.done)break;this.resolve(f.value).then(d,h)}}catch(g){h(g)}return b.promise};a.reject=function(a){var b=new c(this),d=b.reject; +d(a);return b.promise};a.resolve=function(a){if(e.IsPromise(a)&&a._promiseConstructor===this)return a;var b=new c(this),d=b.resolve;d(a);return b.promise};a.prototype["catch"]=function(a){return this.then(g,a)};a.prototype.then=function(a,b){if(!e.IsPromise(this))throw new TypeError("not a promise");var d=new c(this.constructor);e.IsCallable(b)||(b=function(a){throw a;});e.IsCallable(a)||(a=function(a){return a});var h=k(this,a,b),h={capability:d,handler:h},g={capability:d,handler:b};switch(this._status){case "unresolved":this._resolveReactions.push(h); +this._rejectReactions.push(g);break;case "has-resolution":f([h],this._result);break;case "has-rejection":f([g],this._result);break;default:throw new TypeError("unexpected");}return d.promise};return a}();l(v,{Promise:m});F(this.Promise,function(a){return a.resolve(42)instanceof a})||(Promise=m);if(A){var s=function(a){var b=typeof a;return"string"===b?"$"+a:"number"===b?a:null},x=function(){return Object.create?Object.create(null):{}},y={Map:function(){function a(a,b){this.key=a;this.value=b;this.prev= +this.next=null}function b(a,b){this.i=this.head=a._head;this.kind=b}function c(b){var c;c=B(this);if(!c._es6map)throw new TypeError("bad map");var d=new a(null,null);d.next=d.prev=d;l(c,{_head:d,_storage:x(),_size:0});if(b!==g&&null!==b){b=e.GetIterator(b);d=c.set;if(!e.IsCallable(d))throw new TypeError("bad map");for(;;){var f=e.IteratorNext(b);if(f.done)break;f=f.value;if(!e.TypeIsObject(f))throw new TypeError("expected iterable of pairs");d.call(c,f[0],f[1])}}return c}var d={};a.prototype.isRemoved= +function(){return this.key===d};b.prototype={next:function(){var a=this.i,b=this.kind,c=this.head;if(this.i===g)return{value:g,done:!0};for(;a.isRemoved()&&a!==c;)a=a.prev;for(;a.next!==c;)if(a=a.next,!a.isRemoved())return b="key"===b?a.key:"value"===b?a.value:[a.key,a.value],this.i=a,{value:b,done:!1};this.i=g;return{value:g,done:!0}}};p(b.prototype);var f=c.prototype;l(c,{"@@create":function(a){var b=this.prototype||f;a=a||Object.create(b);l(a,{_es6map:!0});return a}});Object.defineProperty(c.prototype, +"size",{configurable:!0,enumerable:!1,get:function(){if("undefined"===typeof this._size)throw new TypeError("size method called on incompatible Map");return this._size}});l(c.prototype,{get:function(a){var b=s(a);if(null!==b)return(a=this._storage[b])?a.value:g;for(var c=b=this._head;(c=c.next)!==b;)if(e.SameValueZero(c.key,a))return c.value;return g},has:function(a){var b=s(a);if(null!==b)return"undefined"!==typeof this._storage[b];for(var c=b=this._head;(c=c.next)!==b;)if(e.SameValueZero(c.key, +a))return!0;return!1},set:function(b,c){var d=this._head,f=d,g,l=s(b);if(null!==l){if("undefined"!==typeof this._storage[l]){this._storage[l].value=c;return}g=this._storage[l]=new a(b,c);f=d.prev}for(;(f=f.next)!==d;)if(e.SameValueZero(f.key,b)){f.value=c;return}g=g||new a(b,c);e.SameValue(-0,b)&&(g.key=0);g.next=this._head;g.prev=this._head.prev;g.prev.next=g;g.next.prev=g;this._size+=1},"delete":function(a){var b=this._head,c=b,f=s(a);if(null!==f){if("undefined"===typeof this._storage[f])return!1; +c=this._storage[f].prev;delete this._storage[f]}for(;(c=c.next)!==b;)if(e.SameValueZero(c.key,a))return c.key=c.value=d,c.prev.next=c.next,c.next.prev=c.prev,this._size-=1,!0;return!1},clear:function(){this._size=0;this._storage=x();for(var a=this._head,b,c=a.next;(b=c)!==a;)b.key=b.value=d,c=b.next,b.next=b.prev=a;a.next=a.prev=a},keys:function(){return new b(this,"key")},values:function(){return new b(this,"value")},entries:function(){return new b(this,"key+value")},forEach:function(a){for(var b= +1