UNPKG

zombiebox

Version:

ZombieBox is a JavaScript framework for development of Smart TV and STB applications

56 lines (55 loc) 27.9 kB
/* ES6/DOM4 polyfill | @version 0.8.8 | MIT License | github.com/termi */ void function(){"use strict";var k=void 0,l=!0,p=null,r=!1;function u(a,b){return Number.isNaN(a)||b&1&&0===a||b&128&&Infinity===a||b&256&&-Infinity===a?a:b&4&&0===a||b&2048&&-1===a?-Infinity:b&32&&1===a||b&512&&Infinity===a?Infinity:b&16&&1===a||b&64&&1===a?0:b&1024&&-Infinity===a?-1:b&2&&0===a?1:l}function x(){}function ia(a,b){a+="";var c=this.contains(a),e=c?b!==l&&"remove":b!==r&&"add";if(e)this[e](a);return c}function Z(a){return a}function ja(){return r}function ka(){}function $(a){var b=Object.create(DOMException.prototype);b.code= DOMException[a];b.message=a+": DOM Exception "+b.code;throw b;}function w(a,b){for(var c=1;c<arguments.length;c++){var e=arguments[c],j;for(j in e)B(e,j)&&!B(a,j)&&(a[j]=e[j])}return a}function C(a,b,c){return R.call(a,b,G.call(arguments,2))}var f=this,D=f._,K=Object.prototype,s=String.prototype,t=Array.prototype,R=D&&D.apply||Function.prototype.apply,G=t.slice,sa=t.splice,ta,E,S=s.split,d=Function.prototype.bind,H=(f.opera||f.attachEvent||/\n/.test(d))&&d||function(a,b){var c=this,e;return 1<arguments.length? (e=G.call(arguments,1),function(){return R.call(c,a,e.concat(G.call(arguments)))}):function(){return R.call(c,a,arguments)}},B=H.call(Function.prototype.call,K.hasOwnProperty),v="a"!==Object("a")[0]||!(0 in Object("a"))?function(a,b){a==p&&!b&&x("invalid object");return a&&"[object String]"===la.call(a)?S.call(a,""):Object(a)}:function(a,b){a==p&&!b&&x("invalid object");return Object(a)},la=K.toString,g=f.Element&&f.Element.prototype||{},I=f.Node&&f.Node.prototype||{},L=H.call(document.__orig__createElement__|| document.createElement,document),q=L("p"),F,aa=1,ba,Da=/^(\w+)?((?:\.(?:[\w\-]+))+)?$|^#([\w\-]+$)/,Ea=/\s*([,>+~ ])\s*/g,ma,J,y,ca,M,ua,T,da,va,wa,N,O,z,na,oa,ea,P,Q,U,fa,V,n=f.Date,A,xa,ya,ga,W,pa,X,qa=D&&D.isPlainObject||function(a){return a&&"[object Object]"===la.call(a)};ta="attachEvent"in document&&"all"in document&&"uniqueId"in document.documentElement&&+((/msie (\d+)/i.exec(navigator.userAgent)||[])[1]||0)||p;f.HTMLDocument||(f.HTMLDocument=f.Document);f.Document||(f.Document=f.HTMLDocument); f.DocumentFragment||(f.DocumentFragment=f.HTMLDocument);document.head||(document.head=document.getElementsByTagName("HEAD")[0]);Object.append=w;Object.extend||(Object.extend=function(a,b){for(var c=1,e=arguments.length,j;c<e;c++)if(j=arguments[c])for(var d in j)B(j,d)&&(a[d]=j[d]);return a});Object.isPlainObject||(Object.isPlainObject=qa);Function.prototype.bind|| (Function.prototype.bind=function(a,b){"function"!=typeof this&&(ta?!(this&&"apply"in this):0!==ea.call(this+"").indexOf("function"))&&x("Function.prototype.bind called on incompatible "+this);var c=this,e,j;1<arguments.length?(e=G.call(arguments,1),j=function(){return R.call(c,qa(this)&&this instanceof j?this:a,e.concat(G.call(arguments)))}):j=function(){return R.call(c,qa(this)&&this instanceof j?this:a,arguments)};c.prototype&&(j.prototype=Object.create(c.prototype));return j});var ha,za,Aa=!{toString:p}.propertyIsEnumerable("toString"); Aa&&(ha="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),za=ha.length);w(Object,{keys:function(a){("object"!=typeof a&&"function"!=typeof a||a===p)&&x("Object.keys called on a non-object");var b=[],c;for(c in a)B(a,c)&&b.push(c);if(Aa)for(c=0;c<za;c++)B(a,ha[c])&&b.push(ha[c]);return b},getOwnPropertyNames:function(a){return Object.keys(a)},seal:Z,freeze:Z,preventExtensions:Z,isSealed:ja,isFrozen:ja,isExtensible:function(a){Object(a)!==a&& x("invalid object");for(var b="",c;B(a,b);)b+="?";a[b]=l;c=B(a,b);delete a[b];return c},getPrototypeOf:function(a){return a.__proto__||(a.constructor?a.constructor.prototype:K)},create:function(a,b){var c;a===p?c={__proto__:p}:("object"!=typeof a&&x("typeof prototype["+typeof a+"] != 'object'"),ka.prototype=a,c=new ka,ka.prototype=p,c.__proto__=a);b&&Object.defineProperties(c,b);return c},isObject:function(a){var b;return a&&("object"===(b=typeof a)||"function"===b)}});if(Object.getOwnPropertyDescriptor){var d= function(a){try{return a.a=0,0===Object.getOwnPropertyDescriptor(a,"a").value}catch(b){return r}},Y;if(!(Y=!d({})))if(!(Y=!d(q)))if(!(Y=!document.__proto__)){try{Object.getOwnPropertyDescriptor(document.__proto__,"firstChild"),J=l}catch(Ga){J=r}Y=!J}Y&&(V=Object.getOwnPropertyDescriptor)}if(Object.defineProperty&&(d=function(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){return r}},!d({})||!d(q)))U=Object.defineProperty,fa=Object.defineProperties;if(!Object.defineProperty|| U)Object.defineProperty=function(a,b,c){("object"!=typeof a&&"function"!=typeof a||a===p)&&x("Object.defineProperty called on non-object: "+a);("object"!=typeof c&&"function"!=typeof c||c===p)&&x("Property description must be an object: "+c);if(U)try{return U.call(Object,a,b,c)}catch(e){if(-2146823252===e.number){c.enumerable=r;try{return U.call(Object,a,b,c)}catch(j){}}}if(c.value!==k)if(a.__defineGetter__&&(a.__lookupGetter__(b)||a.__lookupSetter__(b))){var d=a.__proto__;a.__proto__=K;delete a[b]; a[b]=c.value;a.__proto__=d}else a[b]=c.value;else a.__defineGetter__?(c.get!==k&&a.__defineGetter__(b,c.get),c.set!==k&&a.__defineSetter__(b,c.set)):Object.defineProperty.sham?(c.get!==k&&(a["get"+b]=c.get),c.set!==k&&(a["set"+b]=c.set)):x("getters & setters not supported");return a};g.ie&&(Object.defineProperty.sham=l);if(!Object.defineProperties||fa)Object.defineProperties=function(a,b){if(fa)try{return fa.call(Object,a,b)}catch(c){}for(var e in b)B(b,e)&&Object.defineProperty(a,e,b[e]);return a}; if(!Object.getOwnPropertyDescriptor||V)Object.getOwnPropertyDescriptor=function(a,b){("object"!=typeof a&&"function"!=typeof a||a===p)&&x("Object.getOwnPropertyDescriptor called on a non-object: "+a);if(V)try{return V.call(Object,a,b)}catch(c){}if(B(a,b)){var e={enumerable:l,configurable:l},j,d;if(a.__defineGetter__){var h=a.__proto__;a.__proto__=K;j=a.__lookupGetter__(b);d=a.__lookupSetter__(b);a.__proto__=h}else Object.defineProperty.sham&&(j=a["get"+b],d=a["set"+b]);if(j||d)return j&&(e.get=j), d&&(e.set=d),e;e.value=a[b];return e}};if(!Object.getPropertyDescriptor||V){var Ba=Object.getPropertyDescriptor;Object.getPropertyDescriptor=function(a,b){if(Ba)try{return Ba.call(Object,a,b)}catch(c){}for(var e=Object.getOwnPropertyDescriptor(a,b),j=a;!e&&(j=Object.getPrototypeOf(j));)e=Object.getOwnPropertyDescriptor(j,b);return e}}w(Object,{getOwnPropertyDescriptors:function(a){var b={};z.call(Object.getOwnPropertyNames(a),function(b){this[b]=Object.getOwnPropertyDescriptor(a,b)},b);return b}});2!==[1,2].splice(0).length&&(t.splice=function(a,b){if(!arguments.length)return[];arguments[0]==k&&(arguments[0]=0);1===arguments.length&&(arguments[1]=this.length-arguments[0]);return sa.apply(this,arguments)});O=function(a,b,c){var e="function"===typeof this&&this!==Array;if(!e&&b)return N.call(a,b,c);var j=v(a,l),d,h;if(e)d=j.length>>>0,h=e&&v(new this(d));else{try{h=G.call(j)}catch(f){h=p}d=j.length>>>0;if(h&&h.length===d)return h;h=Array(d)}if(b)for(e=0;e<d;e++)e in j&&(h[e]=C(b,c, j[e],e,a));else for(e=0;e<d;e++)e in j&&(h[e]=j[e]);return h};w(Array,{from:O,of:function(a){return O(arguments)}});oa=t.find&&t.findIndex?p:function(a,b,c){var e=v(this),j=e.length>>>0,d,h=0;for(;h<j;++h)if(h in e&&(d=e[h],C(a,b,d,h,this)))return c?h:d;return c?-1:k};w(t,{contains:function(a){return!!~this.indexOf(a)},find:function(a,b){return oa.call(this,a,b,r)},findIndex:function(a,b){return oa.call(this,a,b,l)}});z=t.forEach||function(a,b){for(var c=v(this),e=c.length>>>0,j= -1;++j<e;)j in c&&C(a,b,c[j],j,this)};N=t.map||function(a,b){var c=v(this),e=c.length>>>0,j=Array(e),d;for(d=0;d<e;d++)d in c&&(j[d]=C(a,b,c[d],d,this));return j};Array.isArray||(Array.isArray=function(a){return"[object Array]"===la.call(a)});na=t.every&&t.some?p:function(a,b,c){c===k&&(c=l);for(var e=v(this),j=e.length>>>0,d=0,h=c;d<j&&h==c;++d)d in e&&(h=C(a,b,e[d],d,this));return h};w(t,{reduce:function(a,b){var c=v(this),e=c.length>>>0,d=0;0===e&&1>=arguments.length&&x("Array length is 0 and no second argument"); for(b===k&&(b=(++d,c[0]));d<e;++d)d in c&&(b=C(a,k,b,c[d],d,this));return b},reduceRight:function(a,b){var c=v(this),e=c.length>>>0;0===e&&1>=arguments.length&&x("Array length is 0 and no second argument");--e;for(b===k&&(b=(--e,c[e+1]));0<=e;--e)e in c&&(b=C(a,k,b,c[e],e,this));return b},forEach:z,indexOf:function(a,b){var c=v(this),e=c.length>>>0;if(!e||(b=Number.toInteger(b))>=e)return-1;for(b=(e+b)%e;b<e&&(!(b in c)||c[b]!==a);b++);return b^e?b:-1},lastIndexOf:function(a,b){var c=v(this),e=c.length>>> 0,d;if(!e)return-1;d=e-1;b!==k&&(d=Math.min(d,Number.toInteger(b)));for(d=0<=d?d:e-Math.abs(d);0<=d;d--)if(d in c&&c[d]===a)return d;return-1},every:function(a,b){return na.call(this,a,b)},some:function(a,b){return na.call(this,a,b,r)},filter:function(a,b){var c=v(this),e=c.length>>>0,d=[],f,h;for(h=0;h<e;h++)h in c&&(f=c[h],C(a,b,f,h,this)&&d.push(f));return d},map:N});z.call("join forEach every some map filter reduce reduceRight indexOf lastIndexOf slice contains find findIndex".split(" "),function(a){this[a]|| (this[a]=H.call(function(b){return this[a].apply(b,G.call(arguments,1))},t))},Array);if(!s.trim||"\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".trim()||!(P=s.trimLeft)||!(Q=s.trimRight))d="[\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]",P=function(){return String(this).replace(P.__re,"")},P.__re=RegExp("^"+d+d+"*"),Q=function(){return String(this).replace(Q.__re, "")},Q.__re=RegExp(d+d+"*$");if(!s.trim||"\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".trim())s.trim=function(){return P.call(Q.call(this))};ea=s.trim;"0".split(k,0).length&&(s.split=function(a,b){return a===k&&0===b?[]:S.call(this,a,b)});E=s.contains||function(a,b){return-1!==this.indexOf(a,b)};w(s,{repeat:function(a){if(0>(a=Number.toInteger(a)))return"";for(var b="",c=this;a;)if(a&1&&(b+=c),a>>=1)c+=c;return b}, startsWith:function(a,b){a+="";b=+b||0;0>b&&(b=0);return!a.length?l:this.charCodeAt(b)===a.charCodeAt(0)&&this.indexOf(a,b)===b},endsWith:function(a,b){var c=this.length;b===k&&(b=c);b=+b;a+="";var e=a.length;if(!e)return l;if(!b||1>b)return r;b=(c<b?c:b)-e;return 0<=b&&this.charCodeAt(b+e-1)===a.charCodeAt(e-1)&&this.lastIndexOf(a,b)===b},contains:E,reverse:function(){return S.call(this+"","").reverse().join("")},trimLeft:P,trimRight:Q,codePointAt:function(a){var b=String(this),c=b.length,e;if(0> (a|=0)||a>=c)return NaN;e=b.charCodeAt(a);if(55296>e||56319<e||a+1==c)return e;a=b.charCodeAt(a+1);return 56320>a||57343<e?e:(e-55296<<1024)+(a-56320)+65536}});String.fromCodePoint||(String.fromCodePoint=function(a){for(var b=arguments.length,c=[],e;b--;){e=arguments[b];if(0>e||1114111<e)throw new RangeError;65536>e?c.unshift(e):(e-=65536,c.unshift(55296|e>>10,56320|e&1023))}return String.fromCharCode.apply(String,c)});w(Number,{MAX_INTEGER:9007199254740991,EPSILON:2.220446049250313E-16,parseInt:f.parseInt, parseFloat:f.parseFloat,isNaN:function(a){return"number"===typeof a&&f.isNaN(a)},isFinite:function(a){return"number"===typeof a&&f.isFinite(a)},isInteger:function(a){return Number.isFinite(a)&&-9007199254740992<=a&&a<=Number.MAX_INTEGER&&Math.floor(a)===a},toInteger:function(a){a=+a;return f.isNaN(a)?0:0===a||!f.isFinite(a)?a:(0>a?-1:1)*Math.floor(Math.abs(a))}});Number.isNumeric=function(a){return!f.isNaN(f.parseFloat(a))&&f.isFinite(a)};w(f.Math,{acosh:function(a){var b=u(a=+a,144);return b===l? 1>a?NaN:Math.log(a+Math.sqrt(a*a-1)):b},asinh:function(a){var b=u(a=+a,392);return b===l?Math.log(a+Math.sqrt(a*a+1)):b},atanh:function(a){var b=u(a=+a,2081);return b===l?-1>a||1<a?NaN:0.5*Math.log((1+a)/(1-a)):b},cbrt:function(a){var b=u(a=+a,385);if(b===l){var c=0>a;c&&(a=-a);b=Math.pow(a,1/3);return c?-b:b}return b},cosh:function(a){var b=u(a=+a,385);return b===l?(0>a&&(a=-a),21<a?Math.exp(a)/2:(Math.exp(a)+Math.exp(-a))/2):b},expm1:function(a){var b=u(a=+a,1153);return b===l?-1E-5<a&&1E-5>a?a+ 0.5*a*a:Math.exp(a)-1:b},hypot:function(a,b,c){if(0===a+b+c)return 0;c==p&&(c=0);var e;return l!==(e=u(a=+a,384))||l!==(e=u(b=+b,384))||l!==(e=u(c=+c,384))?e:Math.sqrt(a*a+b*b+c*c)},log2:function(a){var b=u(a=+a,196);return b===l?0>a?NaN:Math.log(a)*Math.LOG2E:b},log10:function(a){var b=u(a=+a,196);return b===l?0>a?NaN:Math.log(a)*Math.LOG10E:b},log1p:function(a){var b=u(a=+a,2177);return b===l?-1>a?NaN:-1E-4<a&&1E-4>a?(-0.5*a+1)*a:Math.log(1+a):b},sign:function(a){a=+a;return 0>a?-1:0<a?1:a},sinh:function(a){var b= u(a=+a,385);return b===l?(Math.exp(a)-Math.exp(-a))/2:b},tanh:function(a){var b=u(a=+a,1025);if(b===l){if(Infinity===a)return 1;b=Math.exp(a);a=Math.exp(-a);return(b-a)/(b+a)}return b},trunc:function(a){var b=u(a=+a,385);return b===l?a-a%1:b},imul:function(a,b){var c=a&65535,e=b&65535;return c*e+((a>>>16&65535)*e+c*(b>>>16&65535)<<16>>>0)|0}});l;s=function(a,b){var c=document.createEvent("Events");b=b||{};c.initEvent(a,b.bubbles||r,b.cancelable||r);"isTrusted"in c||(c.f=r);return c};try{y=Event.prototype, new Event("click")}catch(Ha){f.Event=s,y?s.prototype=y:y=s.prototype}J=function(a,b){var c,e;try{c=document.createEvent("CustomEvent")}catch(d){c=document.createEvent("Event")}b=b||{};e=b.detail!==k?b.detail:p;(c.initCustomEvent||(c.detail=e,c.initEvent)).call(c,a,b.bubbles||r,b.cancelable||r,e);"isTrusted"in c||(c.f=r);return c};try{ca=(f.CustomEvent||Event).prototype,new CustomEvent("magic")}catch(Ia){if(f.CustomEvent=J,ca||y)J.prototype=ca||y}try{d=document.createEvent("Event")}catch(Ja){d={}}"defaultPrevented"in d||(Object.defineProperty(y,"defaultPrevented",{value:r}),ua=y.preventDefault,y.preventDefault=function(){this.defaultPrevented=l;ua.apply(this,arguments)});"stopImmediatePropagation"in d||(M=function(a){var b=this.d,c=this.e;if("function"!==typeof b)if(b&&"handleEvent"in b)c=b,b=b.handleEvent;else return;if(a.timeStamp&&a.__stopNow===a.timeStamp)a.stopPropagation();else return b.apply(c,arguments)},y.stopImmediatePropagation=function(){this.__stopNow=this.timeStamp||(this.timeStamp=(new Date).getTime())}); if("addEventListener"in q&&!q.addEventListener.__shim__){d=0;try{ba=function(){d++},q.addEventListener("click",ba),q.addEventListener("click",ba),q.click?q.click():q.dispatchEvent(new s("click"))}catch(Ka){}if(0==d||2==d||M){var Ca=2==d;z.call([f.HTMLDocument&&f.HTMLDocument.prototype||f.document,f.Window&&f.Window.prototype||f,I],function(a){if(a){var b=a.addEventListener,c=a.removeEventListener;b&&(a.addEventListener=function(a,c,d){var f,m;d=d||r;if(Ca||M){m="_e_8vj"+(d?"-":"")+(c.__UUID__||(c.__UUID__= ++aa))+a;if(!(f=this._))f=this._={};if(m in f)return;c=M?f[m]=H.call(M,{d:c,e:this}):f[m]=k;c}return b.call(this,a,c,d)},c&&(a.removeEventListener=function(a,b,d){var f,m;d=d||r;if(Ca||M)if((f=this._)&&f[m="_e_8vj"+(d?"-":"")+b.__UUID__+a])b=f[m],delete f[m];return c.call(this,a,b,d)}))}})}}T=function(a,b,c){this.__getter__=H.call(a,c);this.__setter__=H.call(b,c);this.length=0;this.value="";this.b()};da=function(a,b){var c=b||"",e=!!a.length;if(e){for(;0<a.length;)delete a[--a.length];a.value=""}c&& ((c=ea.call(c))&&S.call(c,/\s+/g).forEach(da.add,a),a.value=b);e&&a.__setter__&&a.__setter__(a.value)};da.add=function(a){this[this.length++]=a};w(T.prototype,{b:function(){var a=this.__getter__();a!==this.value&&da(this,a)},c:function(a,b){0===b&&$("WRONG_ARGUMENTS_ERR");""===a&&$("SYNTAX_ERR");/\s+/g.test(a)&&$("INVALID_CHARACTER_ERR")},add:function(){var a=arguments,b=0,c=a.length,e,d,f,h=r;this.b();this.c(p,c);d=this.value;f=" "+d+" ";do e=a[b]+"",this.c(e),E.call(f," "+e+" ")||(d+=(0<b||d&&!d.match(/\s+$/g)? " ":"")+e,this[this.length++]=e,h=l);while(++b<c);h&&(this.value=d,this.__setter__&&this.__setter__(this.value))},remove:function(){var a=arguments,b=0,c=a.length,e,d,f,h=[],m={};this.b();this.c(p,c);d=this.value;f=d.length;do e=a[b]+"",this.c(e),m[e]=p;while(++b<c);a=S.call(d," ");d="";b=0;for(c=a.length;b<c;++b)if(!((e=a[b])in m))h.push(e),d+=(b?" ":"")+e;if(f!==d.length){for(b=this.length-1;0<=b;--b)if(!(this[b]=h[b]))this.length--,delete this[b];this.value=d;this.__setter__&&this.__setter__(this.value)}}, contains:function(a){this.c(a,arguments.length);this.b();return E.call(" "+this.value+" "," "+a+" ")},item:function(a){this.b();return this[a]||p},toggle:ia});T.prototype.toString=function(){this.b();return this.value||""};f.DOMStringCollection=T;d="AT_TARGET";if(!y[d]||Event[d])d={CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3},w(y,d),w(Event,d);if(f.getComputedStyle)try{f.getComputedStyle(q)}catch(La){f.getComputedStyle=H.call(function(a,b){return this.call(f,a,b||p)},f.getComputedStyle)}d=!("classList"in q)?k:(q.classList.add(1,2),q.classList.contains(2))&&l||r;d||(d===k?(wa=function(a){this.className=a},va=function(){return this.className},Object.defineProperty(g,"classList",{get:function(){if(this.tagName){var a=this._||(this._={});a._ccl_||(a._ccl_=new T(va,wa,this));return a._ccl_}}})):d===r&&((d=f.DOMTokenList)&&(d=d.prototype))&&!function(a,b,c){d.add=function(){z.call(N.call(arguments,c),a,this)};d.remove=function(){z.call(N.call(arguments,c),b,this)};d.toggle=ia}.call(p,d.add,d.remove,function(a){return a+ ""}));"parentElement"in q||Object.defineProperty(g,"parentElement",{get:function(){var a=this.parentNode;return a&&1===a.nodeType?a:p}});"contains"in q||(f.Node.prototype.contains=function(a){return!!(this.compareDocumentPosition(a)&16)});"insertAdjacentHTML"in q||(f.HTMLElement.prototype.insertAdjacentHTML=function(a,b){var c=this.ownerDocument.createElement("_"),e={beforebegin:"before",afterbegin:"prepend",beforeend:"append",afterend:"after"},d;c.innerHTML=b;(c=c.childNodes)&&(c.length&&(d=this[e[a]]))&& d.apply(this,c)});if(document.importNode&&!document.importNode.shim)try{document.importNode(q)}catch(Ma){var Fa=document.importNode;delete document.importNode;document.importNode=function(a,b){b===k&&(b=l);return Fa.call(this,a,b)}}try{q.cloneNode()}catch(Na){[I,Comment&&Comment.prototype,g,ProcessingInstruction&&ProcessingInstruction.prototype,Document.prototype,DocumentType&&DocumentType.prototype,DocumentFragment.prototype].forEach(function(a){if(a){var b=a.cloneNode;delete a.cloneNode;a.cloneNode= function(a){a===k&&(a=l);return b.call(this,a)}}})}g.matchesSelector||(g.matchesSelector=g.webkitMatchesSelector||g.mozMatchesSelector||g.msMatchesSelector||g.oMatchesSelector||function(a,b){if(!a)return r;if("*"===a)return l;var c,e,d,f=0,h,m,g;b?"length"in b&&!("nodeType"in b)?c=b[0]:(c=b,b=k):c=this;do if(g=r,c===document.documentElement?g=":root"===a:c===document.body&&(g="BODY"===a.toUpperCase()),!g)if(a=ea.call(a.replace(Ea,"$1")),h=a.match(Da))switch(a.charAt(0)){case "#":g=c.id===a.slice(1); break;default:if((g=!h[1]||!("tagName"in c)||c.tagName.toUpperCase()===h[1].toUpperCase())&&h[2]){d=-1;m=h[2].slice(1).split(".");for(h=" "+c.className+" ";m[++d]&&g;)g=E.call(h," "+m[d]+" ")}}else{if(!/([,>+~ ])/.test(a)&&(e=c.parentNode)&&e.querySelector)g=e.querySelector(a)===c;if(!g&&(e=c.ownerDocument)){m=e.querySelectorAll(a);for(d=-1;!g&&m[++d];)g=m[d]===c}}while(g&&b&&(c=b[++f]));return b&&"length"in b?g&&b.length==f:g});document.documentElement.matchesSelector||(document.documentElement.matchesSelector= g.matchesSelector);"matches"in g||(g.matches=document.documentElement.matches=g.matchesSelector||r);if(!q.prepend){F=function(a){var b=p,c=0,d=a.length;a=N.call(a,F.h);if(1===d)return a[0];b=document.createDocumentFragment();a=O(a);for(c=0;c<d;++c)b.appendChild(a[c]);return b};F.h=function(a){return"string"===typeof a?document.createTextNode(a):a};w(g,{after:function(){this.parentNode&&this.parentNode.insertBefore(F(arguments),this.nextSibling)},before:function(){this.parentNode&&this.parentNode.insertBefore(F(arguments), this)},append:function(){this.appendChild(F(arguments))},prepend:function(){this.insertBefore(F(arguments),this.firstChild)},replace:function(){this.parentNode&&this.parentNode.replaceChild(F(arguments),this)},remove:function(){this.parentNode&&this.parentNode.removeChild(this)}});if(d=f.CharacterData||f.Text)d=d.prototype;d||(d=I);d&&(d.after||(d.after=g.after),d.before||(d.before=g.before),d.replace||(d.replace=g.replace),d.remove||(d.remove=g.remove));if(!("prepend"in document)&&(d=f.Document)&& (d=d.prototype))document.prepend=d.prepend=function(){g.prepend.apply(this.documentElement,arguments)},document.append=d.append=function(){g.append.apply(this.documentElement,arguments)},f.DocumentFragment.prototype.prepend=g.prepend,f.DocumentFragment.prototype.append=g.append}d=document.createElement("select");d.innerHTML="<option>0</option>";try{d.remove()}catch(Oa){d=r}if(d===r||!d.childNodes.length)(d=f.HTMLSelectElement)&&((d=d.prototype)&&"remove"in d)&&!function(a,b){Object.defineProperty(a, "remove",{value:function(a){arguments.length?b.apply(this,arguments):Element.prototype.remove.call(this)}})}.call(p,d,d.remove);!("find"in document)&&"querySelector"in q&&(ma=/(\:scope)(?=[ >~+])/gi,(f.Document.prototype||document).find=f.DocumentFragment.prototype.find=function(a,b){b&&("length"in b&&!("nodeType"in b)||(b=[b]))||(b=[this]);var c,d=0,f=b.length,g;do g=b[d],a=a.replace(ma,9==g.nodeType?":root":function(){return"#"+(g.id||(g.id="find__UUID__"+ ++aa))}),c=g.querySelector(a);while(!c&& ++d<f);return c||p},(f.Document.prototype||document).findAll=f.DocumentFragment.prototype.findAll=function(a,b){b&&("length"in b&&!("nodeType"in b)||(b=[b]))||(b=[this]);var c=[],d=0,f=b.length,g,h,m,n,q,s,u={},t;do if(g=b[d],a=a.replace(ma,9==g.nodeType?":root":function(){return"#"+(g.id||(g.id="find__UUID__"+ ++aa))}),h=g.querySelectorAll(a),1<f){n=0;for(q=h.length;n<q;++n)if(m=h[n],t=r,s=m.getAttribute("data-__UUID__")||(t=l,m.setAttribute("data-__UUID__",s=++aa),s),t||!(s in u))u[s]=p,c.push(h[n])}else c= O(h);while(++d<f);return c});"find"in g||(g.find=g.querySelector,g.findAll=g.querySelectorAll);"labels"in L("input")||Object.defineProperty(g,"labels",{enumerable:l,get:function(){if(E.call(" INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT ",(" "+this.nodeName+" ").toUpperCase())){for(var a=this,b=this.id?O(document.querySelectorAll("label[for='"+this.id+"']")):[],c=b.length-1;(a=a.parentNode)&&(!a.control||a.control===this);)if("LABEL"===a.nodeName.toUpperCase()){for(;b[c]&&b[c].compareDocumentPosition(a)& 2;)c--;sa.call(b,c+1,0,a)}return b}}});"control"in L("label")||(W=function(a,b){for(var c=0,d=a.length;c<d;c++){var f=a[c],g=b(f);if(g||f.childNodes&&0<f.childNodes.length&&(g=W(f.childNodes,b)))return g}return p},W.g=function(a){return E.call(" INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT "," "+a.nodeName.toUpperCase()+" ")?a:p},Object.defineProperty((d=f.HTMLLabelElement)&&d.prototype||g,"control",{enumerable:l,get:function(){return"LABEL"!==this.nodeName.toUpperCase()?k:this.hasAttribute("for")? document.getElementById(this.htmlFor):W(this.childNodes,W.g)}}));"reversed"in L("ol")||(pa=function(a){var b=a.getAttribute("reversed"),c,d;"on"===a.getAttribute("data-reversed-p__UUID__")!==(b!==p)&&(c=a.children,d=a.getAttribute("start"),d!==p&&(d=+d,isNaN(d)&&(d=p)),b!==p?(a.setAttribute("data-reversed-p__UUID__","on"),d===p&&(d=c.length),z.call(c,function(a){a.value=d--})):(a.removeAttribute("data-reversed-p__UUID__"),c[0]&&(c[0].value=d||0),z.call(c,function(a){a.removeAttribute("value")})))}, Object.defineProperty((d=f.HTMLOListElement)&&d.prototype||g,"reversed",{get:function(){return"OL"!==(this.nodeName||"").toUpperCase()?k:this.getAttribute("reversed")!==p},set:function(a){if("OL"===(this.nodeName||"").toUpperCase())return this[(a?"set":"remove")+"Attribute"]("reversed",""),pa(this),a}}),document.addEventListener&&(X=function(){document.removeEventListener("DOMContentLoaded",X,r);X=p;z.call(document.getElementsByTagName("ol"),pa)},"complete"==document.readyState?X():document.addEventListener("DOMContentLoaded", X,r)));z.call([(d=f.HTMLAllCollection)&&d.prototype,(d=f.HTMLCollection)&&d.prototype,(d=f.NodeList)&&d.prototype,document.getElementsByClassName&&document.getElementsByClassName(""),document.querySelectorAll&&document.querySelectorAll("#z"),document.documentElement.children],function(a,b){var c;if(3>b||a&&!("map"in a)&&!Array.isArray(a))(c=3>b?a:a.__proto__||a.constructor&&a.constructor.prototype)&&(c!==t&&c!==K)&&this(c)},z.bind("join forEach every some map filter reduce reduceRight indexOf lastIndexOf slice contains find findIndex splice concat reverse push pop shift unshift sort".split(" "), function(a,b){var c;a in this||(c={configurable:l,enumerable:r,writable:l},c.value=15>b?t[a]:function(){$("NO_MODIFICATION_ALLOWED_ERR")},Object.defineProperty(this,a,c))}));(d=L("form")).innerHTML="<input type=radio name=t value=1><input type=radio checked name=t value=2>";d.t&&2!==d.t.value&&(d=(d=d.t)&&(d=d.constructor)&&d.prototype||(d=f.NodeList)&&d.prototype)&&d!==Object.prototype&&Object.defineProperty(d,"value",{get:function(){var a=this.length,b;if(a&&(b=this[0])&&"INPUT"===(b.nodeName+"").toUpperCase()&& "form"in b)for(;b=this[--a];)if(b&&"RADIO"===(b.type+"").toUpperCase()&&b.checked)return b.value},set:function(a){var b=this.length,c;if(b&&(c=this[0])&&"INPUT"===(c.nodeName+"").toUpperCase()&&"form"in c)for(;c=this[--b];)if(c&&"RADIO"===(c.type+"").toUpperCase()&&c.checked)return c.value=a,c.value},configurable:l});if(!n.prototype.toISOString||"1969-12-31T23:59:59.999Z"!==(new n(-1)).toISOString()||E.call((new n(-621987552E5)).toISOString(),"-000001"))n.prototype.toISOString=function(){var a,b, c,d;if(!f.isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");d=this.getUTCFullYear();a=this.getUTCMonth();d+=~~(a/12);a=[(a%12+12)%12+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];d=(0>d?"-":9999<d?"+":"")+("00000"+Math.abs(d)).slice(0<=d&&9999>=d?-4:-6);for(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"};n.now|| (n.now=function(){return(new n).getTime()});if(!(I=!n.prototype.toJSON))if(!(I=E.call((new n(-621987552E5)).toJSON(),"-000001"))){var ra;a:{try{ra=n.prototype.toJSON.call({toISOString:function(){return-1}});break a}catch(Pa){}ra=k}I=~ra}I&&(n.prototype.toJSON=function(){return C(this.toISOString,this)});A=function(a,b,c,d,f,g,h){var m=arguments.length;return this instanceof n?(m=1==m&&String(a)===a?new n(Date.parse(a)):7<=m?new n(a,b,c,d,f,g,h):6<=m?new n(a,b,c,d,f,g):5<=m?new n(a,b,c,d,f):4<=m?new n(a, b,c,d):3<=m?new n(a,b,c):2<=m?new n(a,b):1<=m?new n(a):new n,m.constructor=A,m):n.apply(this,arguments)};xa=RegExp("^(\\d{4}|[\\+\\-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$");ya=[0,31,59,90,120,151,181,212,243,273,304,334,365];ga=function(a,b){var c=1<b?1:0;return ya[b]+Math.floor((a-1969+c)/4)-Math.floor((a-1901+c)/100)+Math.floor((a-1601+c)/400)+365*(a-1970)};for(d in n)A[d]=n[d];A.now=n.now;A.UTC=n.UTC;A.prototype= n.prototype;A.prototype.constructor=A;A.parse=function(a){var b=xa.exec(a);if(b){var c=Number(b[1]),d=Number(b[2]||1)-1,f=Number(b[3]||1)-1,g=Number(b[4]||0),h=Number(b[5]||0),m=Number(b[6]||0),q=Number(b[7]||0),s=!b[4]||b[8]?0:Number(new n(1970,0)),t="-"===b[9]?1:-1,u=Number(b[10]||0),b=Number(b[11]||0);if(g<(0<h||0<m||0<q?24:25)&&60>h&&60>m&&1E3>q&&-1<d&&12>d&&24>u&&60>b&&-1<f&&f<ga(c,d+1)-ga(c,d))if(c=60*(24*(ga(c,d)+f)+g+u*t),c=1E3*(60*(c+h+b*t)+m)+q+s,-864E13<=c&&864E13>=c)return c;return NaN}return n.parse.apply(this, arguments)};f.Date=A;if(D&&D.ielt9shims)if(z.call(D.ielt9shims,C),D.orig_)f._=D.orig_;else try{delete f._}catch(Qa){}w=d=q=L=t=s=s=J=y=ca=ba=ia=g=A=ja=Z=D=p;x=function(a){throw new TypeError(a);}}.call(window);