mixfill
Version:
A polyfill library
1 lines • 19 kB
JavaScript
"document"in self&&!("classList"in document.createElement("_"))&&!function(a){"use strict";if("Element"in a){var b="classList",c="prototype",d=a.Element[c],e=Object,f=String[c].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(""===b)throw new h("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))throw new h("INVALID_CHARACTER_ERR","String contains an invalid character");return g.call(a,b)},j=function(a){for(var b=f.call(a.getAttribute("class")||""),c=b?b.split(/\s+/):[],d=0,e=c.length;e>d;d++)this.push(c[d]);this._updateClassName=function(){a.setAttribute("class",this.toString())}},k=j[c]=[],l=function(){return new j(this)};if(h[c]=Error[c],k.item=function(a){return this[a]||null},k.contains=function(a){return a+="",-1!==i(this,a)},k.add=function(){var a,b=arguments,c=0,d=b.length,e=!1;do a=b[c]+"",-1===i(this,a)&&(this.push(a),e=!0);while(++c<d);e&&this._updateClassName()},k.remove=function(){var a,b,c=arguments,d=0,e=c.length,f=!1;do for(a=c[d]+"",b=i(this,a);-1!==b;)this.splice(b,1),f=!0,b=i(this,a);while(++d<e);f&&this._updateClassName()},k.toggle=function(a,b){a+="";var c=this.contains(a),d=c?b!==!0&&"remove":b!==!1&&"add";return d&&this[d](a),!c},k.toString=function(){return this.join(" ")},e.defineProperty){var m={get:l,enumerable:!0,configurable:!0};try{e.defineProperty(d,b,m)}catch(n){-2146823252===n.number&&(m.enumerable=!1,e.defineProperty(d,b,m))}}else e[c].__defineGetter__&&d.__defineGetter__(b,l)}}(self),function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.returnExports=b()}(this,function(){function a(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}function b(a){var b=typeof a;return null===a||"undefined"===b||"boolean"===b||"number"===b||"string"===b}function c(a){var c,d,e;if(b(a))return a;if(d=a.valueOf,p(d)&&(c=d.call(a),b(c)))return c;if(e=a.toString,p(e)&&(c=e.call(a),b(c)))return c;throw new TypeError}function d(){}var e,f=Array.prototype,g=Object.prototype,h=Function.prototype,i=String.prototype,j=Number.prototype,k=f.slice,l=f.splice,m=(f.push,f.unshift),n=h.call,o=g.toString,p=function(a){return"[object Function]"===g.toString.call(a)},q=function(a){return"[object RegExp]"===g.toString.call(a)},r=function(a){return"[object Array]"===o.call(a)},s=function(a){return"[object String]"===o.call(a)},t=function(a){var b=o.call(a),c="[object Arguments]"===b;return c||(c=!r(b)&&null!==a&&"object"==typeof a&&"number"==typeof a.length&&a.length>=0&&p(a.callee)),c},u=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(a){return!1}}();e=u?function(a,b,c,d){!d&&b in a||Object.defineProperty(a,b,{configurable:!0,enumerable:!1,writable:!0,value:c})}:function(a,b,c,d){!d&&b in a||(a[b]=c)};var v=function(a,b,c){for(var d in b)g.hasOwnProperty.call(b,d)&&e(a,d,b[d],c)},w=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)},x=function(a){return a>>>0};v(h,{bind:function(a){var b=this;if(!p(b))throw new TypeError("Function.prototype.bind called on incompatible "+b);for(var c=k.call(arguments,1),e=function(){if(this instanceof i){var d=b.apply(this,c.concat(k.call(arguments)));return Object(d)===d?d:this}return b.apply(a,c.concat(k.call(arguments)))},f=Math.max(0,b.length-c.length),g=[],h=0;f>h;h++)g.push("$"+h);var i=Function("binder","return function ("+g.join(",")+"){return binder.apply(this,arguments)}")(e);return b.prototype&&(d.prototype=b.prototype,i.prototype=new d,d.prototype=null),i}});var y,z,A,B,C,D=n.bind(g.hasOwnProperty);(C=D(g,"__defineGetter__"))&&(y=n.bind(g.__defineGetter__),z=n.bind(g.__defineSetter__),A=n.bind(g.__lookupGetter__),B=n.bind(g.__lookupSetter__));var E=function(){var a=[1,2],b=a.splice();return 2===a.length&&r(b)&&0===b.length}();v(f,{splice:function(){return 0===arguments.length?[]:l.apply(this,arguments)}},E);var F=function(){var a={};return f.splice.call(a,0,0,1),1===a.length}();v(f,{splice:function(b,c){if(0===arguments.length)return[];var d=arguments;return this.length=Math.max(a(this.length),0),arguments.length>0&&"number"!=typeof c&&(d=k.call(arguments),d.length<2?d.push(this.length-b):d[1]=a(c)),l.apply(this,d)}},!F);var G=1!==[].unshift(0);v(f,{unshift:function(){return m.apply(this,arguments),this.length}},G),v(Array,{isArray:r});var H=Object("a"),I="a"!==H[0]||!(0 in H),J=function(a){var b=!0,c=!0;return a&&(a.call("foo",function(a,c,d){"object"!=typeof d&&(b=!1)}),a.call([1],function(){"use strict";c="string"==typeof this},"x")),!!a&&b&&c};v(f,{forEach:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=arguments[1],e=-1,f=c.length>>>0;if(!p(a))throw new TypeError;for(;++e<f;)e in c&&a.call(d,c[e],e,b)}},!J(f.forEach)),v(f,{map:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if(!p(a))throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}},!J(f.map)),v(f,{filter:function(a){var b,c=w(this),d=I&&s(this)?this.split(""):c,e=d.length>>>0,f=[],g=arguments[1];if(!p(a))throw new TypeError(a+" is not a function");for(var h=0;e>h;h++)h in d&&(b=d[h],a.call(g,b,h,c)&&f.push(b));return f}},!J(f.filter)),v(f,{every:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if(!p(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}},!J(f.every)),v(f,{some:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if(!p(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&a.call(e,c[f],f,b))return!0;return!1}},!J(f.some));var K=!1;f.reduce&&(K="object"==typeof f.reduce.call("es5",function(a,b,c,d){return d})),v(f,{reduce:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=c.length>>>0;if(!p(a))throw new TypeError(a+" is not a function");if(!d&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var e,f=0;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f++];break}if(++f>=d)throw new TypeError("reduce of empty array with no initial value")}for(;d>f;f++)f in c&&(e=a.call(void 0,e,c[f],f,b));return e}},!K);var L=!1;f.reduceRight&&(L="object"==typeof f.reduceRight.call("es5",function(a,b,c,d){return d})),v(f,{reduceRight:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=c.length>>>0;if(!p(a))throw new TypeError(a+" is not a function");if(!d&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var e,f=d-1;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f--];break}if(--f<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>f)return e;do f in c&&(e=a.call(void 0,e,c[f],f,b));while(f--);return e}},!L);var M=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);v(f,{indexOf:function(b){var c=I&&s(this)?this.split(""):w(this),d=c.length>>>0;if(!d)return-1;var e=0;for(arguments.length>1&&(e=a(arguments[1])),e=e>=0?e:Math.max(0,d+e);d>e;e++)if(e in c&&c[e]===b)return e;return-1}},M);var N=Array.prototype.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);v(f,{lastIndexOf:function(b){var c=I&&s(this)?this.split(""):w(this),d=c.length>>>0;if(!d)return-1;var e=d-1;for(arguments.length>1&&(e=Math.min(e,a(arguments[1]))),e=e>=0?e:d-Math.abs(e);e>=0;e--)if(e in c&&b===c[e])return e;return-1}},N);var O=!{toString:null}.propertyIsEnumerable("toString"),P=function(){}.propertyIsEnumerable("prototype"),Q=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],R=Q.length;v(Object,{keys:function(a){var b=p(a),c=t(a),d=null!==a&&"object"==typeof a,e=d&&s(a);if(!d&&!b&&!c)throw new TypeError("Object.keys called on a non-object");var f=[],g=P&&b;if(e||c)for(var h=0;h<a.length;++h)f.push(String(h));else for(var i in a)g&&"prototype"===i||!D(a,i)||f.push(String(i));if(O)for(var j=a.constructor,k=j&&j.prototype===a,l=0;R>l;l++){var m=Q[l];k&&"constructor"===m||!D(a,m)||f.push(m)}return f}});var S=Object.keys&&function(){return 2===Object.keys(arguments).length}(1,2),T=Object.keys;v(Object,{keys:function(a){return T(t(a)?f.slice.call(a):a)}},!S);var U=-621987552e5,V="-000001",W=Date.prototype.toISOString&&-1===new Date(U).toISOString().indexOf(V);v(Date.prototype,{toISOString:function(){var a,b,c,d,e;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(d=this.getUTCFullYear(),e=this.getUTCMonth(),d+=Math.floor(e/12),e=(e%12+12)%12,a=[e+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],d=(0>d?"-":d>9999?"+":"")+("00000"+Math.abs(d)).slice(d>=0&&9999>=d?-4:-6),b=a.length;b--;)c=a[b],10>c&&(a[b]="0"+c);return d+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}},W);var X=!1;try{X=Date.prototype.toJSON&&null===new Date(0/0).toJSON()&&-1!==new Date(U).toJSON().indexOf(V)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(Y){}X||(Date.prototype.toJSON=function(){var a,b=Object(this),d=c(b);if("number"==typeof d&&!isFinite(d))return null;if(a=b.toISOString,"function"!=typeof a)throw new TypeError("toISOString property is not callable");return a.call(b)});var Z=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),$=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z")),_=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));(!Date.parse||_||$||!Z)&&(Date=function(a){function b(c,d,e,f,g,h,i){var j=arguments.length;if(this instanceof a){var k=1===j&&String(c)===c?new a(b.parse(c)):j>=7?new a(c,d,e,f,g,h,i):j>=6?new a(c,d,e,f,g,h):j>=5?new a(c,d,e,f,g):j>=4?new a(c,d,e,f):j>=3?new a(c,d,e):j>=2?new a(c,d):j>=1?new a(c):new a;return k.constructor=b,k}return a.apply(this,arguments)}function c(a,b){var c=b>1?1:0;return f[b]+Math.floor((a-1969+c)/4)-Math.floor((a-1901+c)/100)+Math.floor((a-1601+c)/400)+365*(a-1970)}function d(b){return Number(new a(1970,0,1,0,0,0,b))}var e=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),f=[0,31,59,90,120,151,181,212,243,273,304,334,365];for(var g in a)b[g]=a[g];return b.now=a.now,b.UTC=a.UTC,b.prototype=a.prototype,b.prototype.constructor=b,b.parse=function(b){var f=e.exec(b);if(f){var g,h=Number(f[1]),i=Number(f[2]||1)-1,j=Number(f[3]||1)-1,k=Number(f[4]||0),l=Number(f[5]||0),m=Number(f[6]||0),n=Math.floor(1e3*Number(f[7]||0)),o=Boolean(f[4]&&!f[8]),p="-"===f[9]?1:-1,q=Number(f[10]||0),r=Number(f[11]||0);return(l>0||m>0||n>0?24:25)>k&&60>l&&60>m&&1e3>n&&i>-1&&12>i&&24>q&&60>r&&j>-1&&j<c(h,i+1)-c(h,i)&&(g=60*(24*(c(h,i)+j)+k+q*p),g=1e3*(60*(g+l+r*p)+m)+n,o&&(g=d(g)),g>=-864e13&&864e13>=g)?g:0/0}return a.parse.apply(this,arguments)},b}(Date)),Date.now||(Date.now=function(){return(new Date).getTime()});var ab=j.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),bb={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(a,b){for(var c=-1;++c<bb.size;)b+=a*bb.data[c],bb.data[c]=b%bb.base,b=Math.floor(b/bb.base)},divide:function(a){for(var b=bb.size,c=0;--b>=0;)c+=bb.data[b],bb.data[b]=Math.floor(c/a),c=c%a*bb.base},numToString:function(){for(var a=bb.size,b="";--a>=0;)if(""!==b||0===a||0!==bb.data[a]){var c=String(bb.data[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b},pow:function nb(a,b,c){return 0===b?c:b%2===1?nb(a,b-1,c*a):nb(a*a,b/2,c)},log:function(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}};v(j,{toFixed:function(a){var b,c,d,e,f,g,h,i;if(b=Number(a),b=b!==b?0:Math.floor(b),0>b||b>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(c=Number(this),c!==c)return"NaN";if(-1e21>=c||c>=1e21)return String(c);if(d="",0>c&&(d="-",c=-c),e="0",c>1e-21)if(f=bb.log(c*bb.pow(2,69,1))-69,g=0>f?c*bb.pow(2,-f,1):c/bb.pow(2,f,1),g*=4503599627370496,f=52-f,f>0){for(bb.multiply(0,g),h=b;h>=7;)bb.multiply(1e7,0),h-=7;for(bb.multiply(bb.pow(10,h,1),0),h=f-1;h>=23;)bb.divide(1<<23),h-=23;bb.divide(1<<h),bb.multiply(1,1),bb.divide(2),e=bb.numToString()}else bb.multiply(0,g),bb.multiply(1<<-f,0),e=bb.numToString()+"0.00000000000000000000".slice(2,2+b);return b>0?(i=e.length,e=b>=i?d+"0.0000000000000000000".slice(0,b-i+2)+e:d+e.slice(0,i-b)+"."+e.slice(i-b)):e=d+e,e}},ab);var cb=i.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var a=void 0===/()??/.exec("")[1];i.split=function(b,c){var d=this;if(void 0===b&&0===c)return[];if("[object RegExp]"!==o.call(b))return cb.call(this,b,c);var e,g,h,i,j=[],k=(b.ignoreCase?"i":"")+(b.multiline?"m":"")+(b.extended?"x":"")+(b.sticky?"y":""),l=0;for(b=new RegExp(b.source,k+"g"),d+="",a||(e=new RegExp("^"+b.source+"$(?!\\s)",k)),c=void 0===c?-1>>>0:x(c);(g=b.exec(d))&&(h=g.index+g[0].length,!(h>l&&(j.push(d.slice(l,g.index)),!a&&g.length>1&&g[0].replace(e,function(){for(var a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(g[a]=void 0)}),g.length>1&&g.index<d.length&&f.push.apply(j,g.slice(1)),i=g[0].length,l=h,j.length>=c)));)b.lastIndex===g.index&&b.lastIndex++;return l===d.length?(i||!b.test(""))&&j.push(""):j.push(d.slice(l)),j.length>c?j.slice(0,c):j}}():"0".split(void 0,0).length&&(i.split=function(a,b){return void 0===a&&0===b?[]:cb.call(this,a,b)});var db=i.replace,eb=function(){var a=[];return"x".replace(/x(.)?/g,function(b,c){a.push(c)}),1===a.length&&"undefined"==typeof a[0]}();eb||(i.replace=function(a,b){var c=p(b),d=q(a)&&/\)[*?]/.test(a.source);if(c&&d){var e=function(c){var d=arguments.length,e=a.lastIndex;a.lastIndex=0;var f=a.exec(c);return a.lastIndex=e,f.push(arguments[d-2],arguments[d-1]),b.apply(this,f)};return db.call(this,a,e)}return db.call(this,a,b)});var fb=i.substr,gb="".substr&&"b"!=="0b".substr(-1);v(i,{substr:function(a,b){return fb.call(this,0>a&&(a=this.length+a)<0?0:a,b)}},gb);var hb=" \n\f\r \u2028\u2029",ib="",jb="["+hb+"]",kb=new RegExp("^"+jb+jb+"*"),lb=new RegExp(jb+jb+"*$"),mb=i.trim&&(hb.trim()||!ib.trim());v(i,{trim:function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(kb,"").replace(lb,"")}},mb),(8!==parseInt(hb+"08")||22!==parseInt(hb+"0x16"))&&(parseInt=function(a){var b=/^0[xX]/;return function(c,d){return c=String(c).trim(),Number(d)||(d=b.test(c)?16:10),a(c,d)}}(parseInt))}),function(){if(!document.addEventListener&&window.Element&&window.Event){var a="__events",b="__immediateStopped";Event.prototype.NONE=Event.NONE=0,Event.prototype.CAPTURING_PHASE=Event.CAPTURING_PHASE=1,Event.prototype.AT_TARGET=Event.AT_TARGET=2,Event.prototype.BUBBLING_PHASE=Event.BUBBLING_PHASE=3,Event.prototype.preventDefault=function(){this.cancelable!==!1&&(this.returnValue=!1)},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},Event.prototype.stopImmediatePropagation=function(){this[b]=this.cancelBubble=!0};for(var c=function(a,b){return a.timeStamp=+new Date,a.target||(a.target=a.srcElement||b),a.pageX=a.clientX+document.documentElement.scrollLeft,a.pageY=a.clientY+document.documentElement.scrollTop,a.relatedTarget="mouseover"==a.type?a.fromElement:"mouseout"==a.type?a.toElement:null,a},d=function(a,b,c){for(var d=0;d<a.length;d++){var e=a[d];if(e.useCapture==c&&e.listener==b)return d}return-1},e=function(a,b,c){a.currentTarget=c,"function"==typeof b?b.call(c,a):b.handleEvent(a)},f=function(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b},g=function(c,d,f){c.eventPhase=f;for(var g=0;g<d.length;g++){for(var h=d[g],i=[],j=(h[a]||{})[c.type]||[],k=0;k<j.length;k++){var l=j[k];l.useCapture&&f==Event.BUBBLING_PHASE||(l.useCapture||f!=Event.CAPTURING_PHASE)&&i.push(l.listener)}for(k=0;k<i.length;)try{for(;k<i.length;){var m=i[k++];if(e(c,m,h),c[b])return!0}}catch(n){setTimeout(function(){throw n},0)}if(c.cancelBubble)return!0}return!1},h=function(a){c(a,this);var b=f(a.target);return b.length&&g(a,b,Event.CAPTURING_PHASE)?a.returnValue:g(a,[a.target],Event.AT_TARGET)?a.returnValue:b.length&&a.bubbles!==!1&&(b.reverse(),g(a,b,Event.BUBBLING_PHASE))?a.returnValue:(a.stopPropagation(),a.returnValue)},i=({addEventListener:function(b,c,e){var f=(this[a]||{})[b]||[],g=f.length;if(!(d(f,c,e)>-1)){if(a in this)var i=this[a];else{var i={_handler:h.bind(this)};this[a]=i}b in i||(i[b]=[]),i[b].push({listener:c,useCapture:e}),g||this.attachEvent("on"+b,i._handler)}},removeEventListener:function(b,c,e){var f=(this[a]||{})[b]||[],g=d(f,c,e);-1!=g&&(f.splice(g,1),f.length||this.detachEvent("on"+b,this[a]._handler))},dispatchEvent:function(a){return a.returnValue=!0,h.call(this,a)}}),j=[Element,window.constructor,document.constructor];j.length;){var k=j.pop();for(var l in i)k.prototype[l]=i[l]}}}(),function(){if(!window.CustomEvent&&document.createEventObject)return void(window.CustomEvent=function(a,b){if(!arguments.length)throw new Error("Not enough arguments");var c={type:a,bubbles:!1,cancelable:!1,detail:null},d=document.createEventObject();for(var e in c)d[e]=c[e];for(var e in b)d[e]=b[e];return d});try{new CustomEvent("test")}catch(a){var b=function(a,b){if(!arguments.length)throw new Error("Not enough arguments");var c={bubbles:!1,cancelable:!1,detail:null};for(var d in b)c[d]=b[d];var e=document.createEvent("CustomEvent");return e.initCustomEvent(a,c.bubbles,c.cancelable,c.detail),e};b.prototype=(window.CustomEvent||window.Event).prototype,window.CustomEvent=b}}(),function(){document.addEventListener("readystatechange",function(){if("complete"==document.readyState){var a=new CustomEvent("DOMContentLoaded");document.dispatchEvent(a)}})}(),function(){if(!window.MouseEvent)return void(window.MouseEvent=function(a,b){if(!arguments.length)throw new Error("Not enough arguments");var c={type:a,cancelable:!1,bubbles:!1},d=document.createEventObject();for(var e in c)d[e]=c[e];for(var e in b)d[e]=b[e];return d});try{new MouseEvent("click")}catch(a){var b=function(a,b){if(!arguments.length)throw new Error("Not enough arguments");var c={type:a,bubbles:!1,cancelable:!1,view:window,detail:1,screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altLey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null};for(var d in b)c[d]=b[d];var e=document.createEvent("MouseEvent");return e.initMouseEvent(c.type,c.bubbles,c.cancelable,c.view,c.detail,c.screenX,c.screenY,c.clientX,c.clientY,c.ctrlKey,c.altKey,c.shiftKey,c.metaKey,c.button,c.relatedTarget),e};b.prototype=window.MouseEvent.prototype,window.MouseEvent=b}}();