(function(d){d.indexOf=d.indexOf||function(e){for(var b=0,a=this.length;b<a;b++)if(b in this&&this[b]===e)return b;return-1};d.lastIndexOf=d.lastIndexOf||function(e){for(var b=this.length-1;b>=0;b--)if(b in this&&this[b]===e)return b;return-1};d.forEach=d.forEach||function(e,b){for(var a=0,c=this.length;a<c;a++)a in this&&e.call(b,this[a],a,this)};d.map=d.map||function(e,b){for(var a=[],c=0,f=this.length;c<f;c++)if(c in this)a[c]=e.call(b,this[c],c,this);return a};d.filter=d.filter||function(e,b){for(var a=
[],c=0,f=this.length;c<f;c++)c in this&&e.call(b,this[c],c,this)&&a.push(this[c]);return a};d.every=d.every||function(e,b){for(var a=0,c=this.length;a<c;a++)if(a in this&&!e.call(b,this[a],a,this))return false;return true};d.some=d.some||function(e,b){for(var a=0,c=this.length;a<c;a++)if(a in this&&e.call(b,this[a],a,this))return true;return false};d.reduce=d.reduce||function(e,b){var a=0,c=this.length;if(arguments.length<2){if(this.length==0)throw new TypeError("reduce of empty array with no initial value");
for(;a<c;a++)if(a in this){b=this[a];a++;break}}for(;a<c;a++)if(a in this)b=e(b,this[a],a,this);return b};d.reduceRight=d.reduceRight||function(e,b){var a=this.length-1;if(arguments.length<2){if(this.length==0)throw new TypeError("reduce of empty array with no initial value");for(;a>=0;a--)if(a in this){b=this[a];a--;break}}for(;a>=0;a--)if(a in this)b=e(b,this[a],a,this);return b}})(Array.prototype);
