From 78ccdc7ac54e3ba0251264b3d1a871f71a161bc0 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Fri, 13 Jan 2017 20:02:17 -0800 Subject: [PATCH] DOM: Simplify CustomEvent polyfill --- dom.js | 7 +++---- polyfill.js | 16 ++++++++++++++++ polyfill.min.js | 4 ++-- web.js | 16 ++++++++++++++++ web.min.js | 2 +- 5 files changed, 38 insertions(+), 7 deletions(-) diff --git a/dom.js b/dom.js index 3d6ce7c..a9c35a5 100644 --- a/dom.js +++ b/dom.js @@ -217,16 +217,15 @@ // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent // Needed for: IE (function () { - if ('CustomEvent' in global) { - if ( typeof global.CustomEvent === "function" ) return false; - } + if ('CustomEvent' in global && typeof global.CustomEvent === "function") + return; function CustomEvent ( event, params ) { params = params || { bubbles: false, cancelable: false, detail: undefined }; var evt = document.createEvent( 'CustomEvent' ); evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); return evt; } - CustomEvent.prototype = window.Event.prototype; + CustomEvent.prototype = global.Event.prototype; global.CustomEvent = CustomEvent; })(); diff --git a/polyfill.js b/polyfill.js index 625b535..178c50e 100644 --- a/polyfill.js +++ b/polyfill.js @@ -4800,6 +4800,22 @@ function __cons(t, a) { }); }()); + // CustomEvent + // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent + // Needed for: IE + (function () { + if ('CustomEvent' in global && typeof global.CustomEvent === "function") + return; + function CustomEvent ( event, params ) { + params = params || { bubbles: false, cancelable: false, detail: undefined }; + var evt = document.createEvent( 'CustomEvent' ); + evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); + return evt; + } + CustomEvent.prototype = global.Event.prototype; + global.CustomEvent = CustomEvent; + })(); + // Shim for DOM Events for IE7- // http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html // Use addEvent(object, event, handler) instead of object.addEventListener(event, handler) diff --git a/polyfill.min.js b/polyfill.min.js index 4217024..79b90c3 100644 --- a/polyfill.min.js +++ b/polyfill.min.js @@ -1,3 +1,3 @@ function __cons(t,a){return eval("new t("+a.map(function(t,e){return"a["+e+"]"}).join(",")+")")}Object.getPrototypeOf||(Object.getPrototypeOf=function(t){if(t!==Object(t))throw TypeError("Object.getPrototypeOf called on non-object");return t.__proto__||t.constructor.prototype||Object.prototype}),"function"!=typeof Object.getOwnPropertyNames&&(Object.getOwnPropertyNames=function(t){if(t!==Object(t))throw TypeError("Object.getOwnPropertyNames called on non-object");var e,r=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(e);return r}),"function"!=typeof Object.create&&(Object.create=function(t,e){function r(){}if("object"!=typeof t)throw TypeError();r.prototype=t;var n=new r;if(t&&(n.constructor=r),void 0!==e){if(e!==Object(e))throw TypeError();Object.defineProperties(n,e)}return n}),function(){if(!Object.defineProperty||!function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}()){var t=Object.defineProperty;Object.defineProperty=function(e,r,n){if(t)try{return t(e,r,n)}catch(o){}if(e!==Object(e))throw TypeError("Object.defineProperty called on non-object");return Object.prototype.__defineGetter__&&"get"in n&&Object.prototype.__defineGetter__.call(e,r,n.get),Object.prototype.__defineSetter__&&"set"in n&&Object.prototype.__defineSetter__.call(e,r,n.set),"value"in n&&(e[r]=n.value),e}}}(),"function"!=typeof Object.defineProperties&&(Object.defineProperties=function(t,e){if(t!==Object(t))throw TypeError("Object.defineProperties called on non-object");var r;for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&Object.defineProperty(t,r,e[r]);return t}),Object.keys||(Object.keys=function(t){if(t!==Object(t))throw TypeError("Object.keys called on non-object");var e,r=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(e);return r}),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw TypeError("Bind must be called on a function");var e=Array.prototype.slice.call(arguments,1),r=this,n=function(){},o=function(){return r.apply(this instanceof n?this:t,e.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),o.prototype=new n,o}),Array.isArray=Array.isArray||function(t){return Boolean(t&&"[object Array]"===Object.prototype.toString.call(Object(t)))},Array.prototype.indexOf||(Array.prototype.indexOf=function(t){if(void 0===this||null===this)throw TypeError();var e=Object(this),r=e.length>>>0;if(0===r)return-1;var n=0;if(arguments.length>0&&(n=Number(arguments[1]),isNaN(n)?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=r)return-1;for(var o=n>=0?n:Math.max(r-Math.abs(n),0);o>>0;if(0===r)return-1;var n=r;arguments.length>1&&(n=Number(arguments[1]),n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))));for(var o=n>=0?Math.min(n,r-1):r-Math.abs(n);o>=0;o--)if(o in e&&e[o]===t)return o;return-1}),Array.prototype.every||(Array.prototype.every=function(t){if(void 0===this||null===this)throw TypeError();var e=Object(this),r=e.length>>>0;if("function"!=typeof t)throw TypeError();var n,o=arguments[1];for(n=0;n>>0;if("function"!=typeof t)throw TypeError();var n,o=arguments[1];for(n=0;n>>0;if("function"!=typeof t)throw TypeError();var n,o=arguments[1];for(n=0;n>>0;if("function"!=typeof t)throw TypeError();var n=[];n.length=r;var o,i=arguments[1];for(o=0;o>>0;if("function"!=typeof t)throw TypeError();var n,o=[],i=arguments[1];for(n=0;n>>0;if("function"!=typeof t)throw TypeError();if(0===r&&1===arguments.length)throw TypeError();var n,o=0;if(arguments.length>=2)n=arguments[1];else for(;;){if(o in e){n=e[o++];break}if(++o>=r)throw TypeError()}for(;o>>0;if("function"!=typeof t)throw TypeError();if(0===r&&1===arguments.length)throw TypeError();var n,o=r-1;if(arguments.length>=2)n=arguments[1];else for(;;){if(o in this){n=this[o--];break}if(--o<0)throw TypeError()}for(;o>=0;)o in e&&(n=t.call(void 0,n,e[o],o,e)),o--;return n}),String.prototype.trim||(String.prototype.trim=function(){return String(this).replace(/^\s+/,"").replace(/\s+$/,"")}),Date.now||(Date.now=function(){return Number(new Date)}),Date.prototype.toISOString||(Date.prototype.toISOString=function(){function t(t){return("00"+t).slice(-2)}function e(t){return("000"+t).slice(-3)}return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+e(this.getUTCMilliseconds())+"Z"}),function(t){"use strict";function e(e){return e===t?k:e}function r(t,r,n){var o=t[r];t[r]=function(){var t=e(this),r=n.apply(t,arguments);return r!==k?r:o.apply(t,arguments)}}function n(t,e){for(var r=Object.getOwnPropertyDescriptor(t,e),n=Object.getPrototypeOf(t);!r&&n;)r=Object.getOwnPropertyDescriptor(n,e),n=Object.getPrototypeOf(n);return r}function o(t,e,r,n){e in t&&!n&&!I||("function"==typeof r?Object.defineProperty(t,e,{value:r,configurable:!0,enumerable:!1,writable:!0}):Object.defineProperty(t,e,{value:r,configurable:!1,enumerable:!1,writable:!1}))}function i(t,e,r){Object.defineProperty(t,e,{value:r,configurable:!1,enumerable:!1,writable:!0})}function a(){function t(t){var e=t.valueOf,n=D(null);return Object.defineProperty(t,"valueOf",{value:function(r){return function(o){return o===r?n:e.apply(t,arguments)}}(r),configurable:!0,writeable:!0,enumerable:!1}),n}function e(t){var e="function"==typeof t.valueOf&&t.valueOf(r);return e===t?null:e}var r=D(null);return{clear:function(){r=D(null)},remove:function(t){var r=e(t);return!(!r||!g(r,"value"))&&(delete r.value,!0)},get:function(t,r){var n=e(t);return n&&g(n,"value")?n.value:r},has:function(t){var r=e(t);return Boolean(r&&g(r,"value"))},set:function(r,n){var o=e(r)||t(r);o.value=n}}}function u(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===e?"null":e instanceof t.Symbol?"symbol":"object"}}function c(t){return t=Number(t),F(t)?0:0===t||t===1/0||t===-(1/0)?t:(t<0?-1:1)*z(X(t))}function s(t){return t>>>0}function f(t){if(null===t||t===k)throw TypeError();return Object(t)}function l(t){var e=c(t);return e<=0?0:e===1/0?9007199254740991:J(e,9007199254740991)}function p(t){return"function"==typeof t}function h(t){return!!/Constructor/.test(Object.prototype.toString.call(t))||(!!/Function/.test(Object.prototype.toString.call(t))||"function"==typeof t)}function y(t,e){if(typeof t!=typeof e)return!1;switch(typeof t){case"undefined":return!0;case"number":return t!==t&&e!==e||(0===t&&0===e?1/t===1/e:t===e);case"boolean":case"string":case"object":default:return t===e}}function v(t,e){if(typeof t!=typeof e)return!1;switch(typeof t){case"undefined":return!0;case"number":return t!==t&&e!==e||t===e;case"boolean":case"string":case"object":default:return t===e}}function d(t,e){var r=f(t);return r[e]}function m(t,e){var r=d(t,e);if(r===k||null===r)return k;if(!p(r))throw TypeError();return r}function b(t,e){for(;t;){if(Object.prototype.hasOwnProperty.call(t,e))return!0;if("object"!==u(t))return!1;t=Object.getPrototypeOf(t)}return!1}function g(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function E(t,e){arguments.length<2&&(e=m(t,at));var r=e.call(t);if("object"!==u(r))throw TypeError();return r}function w(t,e){if(arguments.length<2)var r=t.next();else r=t.next(e);if("object"!==u(r))throw TypeError();return r}function S(t){return t.value}function T(t,e){var r=w(t,e),n=r.done;return Boolean(n)!==!0&&r}function O(t,e){var r={};return r.value=t,r.done=e,r}function j(t,e,r){var n=function(){e.apply(k,r)};L(n)}function _(t){}function R(t){var e=[];if(Object(t)!==t)return e;for(var r=new Set;null!==t;)Object.getOwnPropertyNames(t).forEach(function(n){if(!r.has(n)){var o=Object.getOwnPropertyDescriptor(t,n);o&&(r.add(n),o.enumerable&&e.push(n))}}),t=Object.getPrototypeOf(t);return e[at]()}function P(t){return Object.getOwnPropertyNames(t)}function D(t,e){return Object.create(t,e)}function A(){}function M(t,e){var r=String(t),n=new A;return i(n,"[[IteratedString]]",r),i(n,"[[StringIteratorNextIndex]]",0),i(n,"[[StringIterationKind]]",e),n}function N(){}function x(t,e){var r=f(t),n=new N;return i(n,"[[IteratedObject]]",r),i(n,"[[ArrayIteratorNextIndex]]",0),i(n,"[[ArrayIterationKind]]",e),n}var C,I=!1,k=void 0,L=function(t,e){return t?function(e){t.resolve().then(function(){e()})}:e?function(t){e(t)}:function(t){setTimeout(t,0)}}(t.Promise,t.setImmediate),F=t.isNaN,U=t.parseInt,q=t.parseFloat,W=Math.E,B=Math.LOG10E,H=Math.LOG2E,X=Math.abs,G=Math.ceil,V=Math.exp,z=Math.floor,$=Math.log,K=Math.max,J=Math.min,Y=Math.pow,Z=Math.random,Q=Math.sqrt,tt=String.prototype.match,et=String.prototype.replace,rt=String.prototype.search,nt=String.prototype.split,ot=Object.create(null);!function(){function r(t){return Array(t+1).join("x").replace(/x/g,function(){return Z()<.5?"‌":"‍"})}function n(t){if(!(this instanceof n))return new n(t,a);if(this instanceof n&&arguments[1]!==a)throw TypeError();var e=t===k?k:String(t);return i(this,"[[SymbolData]]",r(128)),i(this,"[[Description]]",e),u[this]=this,this}var a=Object.create(null),u={};C=function(t){return u[t]};var c=[];"Symbol"in t&&!I||(t.Symbol=n),o(n,"for",function(t){for(var e=String(t),r=0;r>24):16711680&t?e(t>>16)+8:65280&t?e(t>>8)+16:e(t)+24}),o(Math,"cosh",function(t){return t=Number(t),(Y(W,t)+Y(W,-t))/2}),o(Math,"expm1",function(t){return t=Number(t),y(t,-0)?-0:X(t)<1e-5?t+.5*t*t:V(t)-1}),o(Math,"fround",function(t){return F(t)?NaN:1/t===+(1/0)||1/t===-(1/0)||t===+(1/0)||t===-(1/0)?t:new Float32Array([t])[0]}),o(Math,"hypot",function(){for(var t=[],e=0,r=!1,n=0;ne&&(e=o),t[n]=o}if(r)return NaN;if(0===e)return 0;var i=0;for(n=0;n>>16&65535,i=65535&r,a=n>>>16&65535,u=65535&n;return i*u+(o*u+i*a<<16>>>0)|0},"imul"in Math&&0===Math.imul(1,2147483648)),o(Math,"log1p",function(t){return t=Number(t),t<-1?NaN:y(t,-0)?-0:X(t)>1e-4?$(1+t):(-.5*t+1)*t}),o(Math,"log10",function(t){return t=Number(t),$(t)*B}),o(Math,"log2",function(t){return t=Number(t),$(t)*H}),o(Math,"sign",function(t){return t=Number(t),t<0?-1:t>0?1:t}),o(Math,"sinh",function(t){return t=Number(t),y(t,-0)?t:(Y(W,t)-Y(W,-t))/2}),o(Math,"tanh",function(t){t=Number(t);var e=Y(W,2*t)-1,r=Y(W,2*t)+1;return y(t,-0)?t:e===r?1:e/r}),o(Math,"trunc",function(t){return t=Number(t),F(t)?NaN:t<0?G(t):z(t)});var pt=function(){var t={},e=Symbol();return t[Symbol.match]=function(){return e},"".match(t)===e}();o(String,"fromCodePoint",function(){for(var t=arguments,e=t.length,r=[],n=0;n1114111)throw RangeError("Invalid code point "+i);i<65536?r.push(String.fromCharCode(i)):(i-=65536,r.push(String.fromCharCode((i>>10)+55296)),r.push(String.fromCharCode(i%1024+56320))),n+=1}return r.join("")}),o(String,"raw",function dt(t){var e=[].slice.call(arguments,1),r=Object(t),n=r.raw,dt=Object(n),o=dt.length,i=l(o);if(i<=0)return"";for(var a=[],u=0;;){var c=dt[u],s=String(c);if(a.push(s),u+1===i)return a.join("");c=e[u];var f=String(c);a.push(f),u+=1}}),o(String.prototype,"codePointAt",function(t){var r=e(this),n=String(r),o=c(t),i=n.length;if(o<0||o>=i)return k;var a=n.charCodeAt(o);if(a<55296||a>56319||o+1===i)return a;var u=n.charCodeAt(o+1);return u<56320||u>57343?a:1024*(a-55296)+(u-56320)+65536}),o(String.prototype,"endsWith",function(t){var r=arguments[1],n=e(this),o=String(n),i=String(t),a=o.length,u=r===k?a:c(r),s=J(K(u,0),a),f=i.length,l=s-f;return!(l<0)&&o.substring(l,l+f)===i}),o(String.prototype,"includes",function(t){var r=arguments[1],n=e(this),o=String(n),i=String(t),a=c(r),u=o.length,s=J(K(a,0),u);return o.indexOf(i,s)!==-1}),o(String.prototype,"match",function(t){var r=e(this),n=String(r);if(b(t,ut))var o=t;else o=new RegExp(t);return o[ut](n)},!pt),o(String.prototype,"repeat",function(t){var r=e(this),n=String(r),o=c(t);if(o<0)throw RangeError();if(o===1/0)throw RangeError();var i=new Array(o+1).join(n);return i}),o(String.prototype,"replace",function(t,r){var n=e(this);return b(t,ct)?t[ct](n,r):et.call(n,t,r)},!pt),o(String.prototype,"search",function(t){var r=e(this),n=String(r);if(b(t,st))var o=t;else o=new RegExp(t);return o[st](n)},!pt),o(String.prototype,"split",function(t,r){var n=e(this);return b(t,ft)?t[ft](n,r):nt.call(n,t,r)},!pt),o(String.prototype,"startsWith",function(t){var r=arguments[1],n=e(this),o=String(n),i=String(t),a=c(r),u=o.length,s=J(K(a,0),u),f=i.length;return!(f+s>u)&&o.substring(s,s+f)===i}),o(String.prototype,at,function(){return M(this,"value")});var ht=Object.create(it);A.prototype=ht,o(ht,"next",function(){var t=f(this),e=String(t["[[IteratedString]]"]),r=t["[[StringIteratorNextIndex]]"],n=e.length;if(r>=n)return i(t,"[[StringIteratorNextIndex]]",1/0),O(k,!0);var o=e.codePointAt(r);return i(t,"[[StringIteratorNextIndex]]",r+(o>65535?2:1)),O(String.fromCodePoint(o),!1)}),o(ht,lt,"String Iterator"),"flags"in RegExp.prototype||Object.defineProperty(RegExp.prototype,"flags",{get:function(){var t=String(this);return t.substring(t.lastIndexOf("/")+1)}}),o(RegExp.prototype,ut,function(t){var r=e(this);return tt.call(t,r)}),o(RegExp.prototype,ct,function(t,r){var n=e(this);return et.call(t,n,r)}),o(RegExp.prototype,st,function(t){var r=e(this);return rt.call(t,r)}),o(RegExp.prototype,ft,function(t,r){var n=e(this);return nt.call(t,n,r)}),o(Array,"from",function(t){var r=arguments[1],n=arguments[2],o=e(this);if(r===k)var i=!1;else{if(!p(r))throw TypeError();var a=n;i=!0}var u=m(t,at);if(u!==k){if(h(o))var c=new o;else c=new Array(0);for(var s=E(t,u),y=0;;){var v=T(s);if(v===!1)return c.length=y,c;var d=S(v);if(i)var b=r.call(a,d);else b=d;c[y]=b,y+=1}}var g=f(t),w=g.length,O=l(w);for(c=h(o)?new o(O):new Array(O),y=0;y0;){var m=String(s),g=String(a),E=b(n,m);if(E){var w=n[m];n[g]=w}else delete n[g];s+=v,a+=v,d-=1}return n});var yt="entries"in Array.prototype&&"next"in[].entries();o(Array.prototype,"entries",function(){return x(this,"key+value")},!yt),o(Array.prototype,"fill",function(t){var e=arguments[1],r=arguments[2],n=f(this),o=n.length,i=l(o);i=K(i,0);var a,u=c(e);a=u<0?K(i+u,0):J(u,i);var s;s=r===k?i:c(r);var p;for(p=s<0?K(i+s,0):J(s,i);a1?arguments[1]:k,i=0;i1?arguments[1]:k,i=0;i=l)return i(t,"[[ArrayIteratorNextIndex]]",1/0),O(k,!0);if(r=a,i(t,"[[ArrayIteratorNextIndex]]",a+1),c.indexOf("value")!==-1&&(n=o[r]),c.indexOf("key+value")!==-1)return O([r,n],!1);if(c.indexOf("key")!==-1)return O(r,!1);if("value"===c)return O(n,!1);throw Error("Internal error")}),o(vt,lt,"Array Iterator"),["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(r){if(r in t){var n=t[r];o(n,"from",function(t){var r=arguments[1],n=arguments[2],o=e(this);if(!h(o))throw TypeError();if(r===k)var i=!1;else{if(p(r))throw TypeError();var a=n;i=!0}var u=m(t,at);if(u!==k){for(var c=E(t,u),s=[],y=!0;y!==!1;)if(y=T(c),y!==!1){var v=S(y);s.push(v)}for(var d=s.length,b=new o(d),g=0;gr?1:0}var e=arguments[0];return Array.prototype.sort.call(this,t)}),o(n.prototype,"values",Array.prototype.values),o(n.prototype,at,n.prototype.values),o(n.prototype,lt,r)}}),function(){function r(){var t=e(this),r=arguments[0];if("object"!==u(t))throw TypeError();if("[[MapData]]"in t)throw TypeError();if(r!==k){var n=t.set;if(!p(n))throw TypeError();var o=E(f(r))}if(i(t,"[[MapData]]",{keys:[],values:[]}),o===k)return t;for(;;){var a=T(o);if(a===!1)return t;var c=S(a);if("object"!==u(c))throw TypeError();var s=c[0],l=c[1];n.call(t,s,l)}return t}function n(t,e){var r;if(e===e)return t.keys.indexOf(e);for(r=0;r=0?o.values[i]:k}),o(r.prototype,"has",function(t){var r=e(this);if("object"!==u(r))throw TypeError();if(!("[[MapData]]"in r))throw TypeError();if(r["[[MapData]]"]===k)throw TypeError();var o=r["[[MapData]]"];return n(o,t)>=0}),o(r.prototype,"keys",function(){var t=e(this);if("object"!==u(t))throw TypeError();return c(t,"key")}),o(r.prototype,"set",function(t,r){var o=e(this);if("object"!==u(o))throw TypeError();if(!("[[MapData]]"in o))throw TypeError();if(o["[[MapData]]"]===k)throw TypeError();var i=o["[[MapData]]"],a=n(i,t);return a<0&&(a=i.keys.length),y(t,-0)&&(t=0),i.keys[a]=t,i.values[a]=r,o}),Object.defineProperty(r.prototype,"size",{get:function(){var t=e(this);if("object"!==u(t))throw TypeError();if(!("[[MapData]]"in t))throw TypeError();if(t["[[MapData]]"]===k)throw TypeError();for(var r=t["[[MapData]]"],n=0,o=0;o=0)var s=c;else s=u+c,s<0&&(s=0);for(;s>16&255)),o.push(String.fromCharCode(i>>8&255)),o.push(String.fromCharCode(255&i)),a=0,i=0),r+=1;return 12===a?(i>>=4,o.push(String.fromCharCode(255&i))):18===a&&(i>>=2,o.push(String.fromCharCode(i>>8&255)),o.push(String.fromCharCode(255&i))),o.join("")}function r(t){t=String(t);var e,r,o,i,a,u,c,s=0,f=[];if(/[^\x00-\xFF]/.test(t))throw Error("InvalidCharacterError");for(;s>2,a=(3&e)<<4|r>>4,u=(15&r)<<2|o>>6,c=63&o,s===t.length+2?(u=64,c=64):s===t.length+1&&(c=64),f.push(n.charAt(i),n.charAt(a),n.charAt(u),n.charAt(c));return f.join("")}if(!("atob"in t&&"btoa"in t)){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.atob=e,t.btoa=r}}(),function(){function e(t){return t.offsetWidth>0&&t.offsetHeight>0}function r(){var t=a;a=Object.create(null),c=-1,Object.keys(t).forEach(function(r){var n=t[r];n.element&&!e(n.element)||n.callback(Date.now())})}function n(e,n){var o=++u;return a[o]={callback:e,element:n},c===-1&&(c=t.setTimeout(r,1e3/i)),o}function o(e){delete a[e],0===Object.keys(a).length&&(t.clearTimeout(c),c=-1)}if(!("requestAnimationFrame"in t)){var i=60,a=Object.create(null),u=0,c=-1;t.requestAnimationFrame=n,t.cancelAnimationFrame=o}}())}(self),function(t){function e(t,e){t&&Object.keys(e).forEach(function(r){if(!(r in t||r in t.prototype))try{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(e,r))}catch(n){t[r]=e[r]}})}function r(t){var e=null;return t=t.map(function(t){return t instanceof Node?t:document.createTextNode(t)}),1===t.length?e=t[0]:(e=document.createDocumentFragment(),t.forEach(function(t){e.appendChild(t)})),e}if("window"in t&&"document"in t){document.querySelectorAll||(document.querySelectorAll=function(t){var e,r=document.createElement("style"),n=[];for(document.documentElement.firstChild.appendChild(r),document._qsa=[],r.styleSheet.cssText=t+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),r.parentNode.removeChild(r);document._qsa.length;)e=document._qsa.shift(),e.style.removeAttribute("x-qsa"),n.push(e);return document._qsa=null,n}),document.querySelector||(document.querySelector=function(t){var e=document.querySelectorAll(t);return e.length?e[0]:null}),document.getElementsByClassName||(document.getElementsByClassName=function(t){return t=String(t).replace(/^|\s+/g,"."),document.querySelectorAll(t)}),t.Node=t.Node||function(){throw TypeError("Illegal constructor")},Node.ELEMENT_NODE=1,Node.ATTRIBUTE_NODE=2,Node.TEXT_NODE=3,Node.CDATA_SECTION_NODE=4,Node.ENTITY_REFERENCE_NODE=5,Node.ENTITY_NODE=6,Node.PROCESSING_INSTRUCTION_NODE=7,Node.COMMENT_NODE=8,Node.DOCUMENT_NODE=9,Node.DOCUMENT_TYPE_NODE=10,Node.DOCUMENT_FRAGMENT_NODE=11,Node.NOTATION_NODE=12,t.DOMException=t.DOMException||function(){throw TypeError("Illegal constructor")},DOMException.INDEX_SIZE_ERR=1,DOMException.DOMSTRING_SIZE_ERR=2,DOMException.HIERARCHY_REQUEST_ERR=3,DOMException.WRONG_DOCUMENT_ERR=4,DOMException.INVALID_CHARACTER_ERR=5,DOMException.NO_DATA_ALLOWED_ERR=6,DOMException.NO_MODIFICATION_ALLOWED_ERR=7,DOMException.NOT_FOUND_ERR=8,DOMException.NOT_SUPPORTED_ERR=9,DOMException.INUSE_ATTRIBUTE_ERR=10,DOMException.INVALID_STATE_ERR=11,DOMException.SYNTAX_ERR=12,DOMException.INVALID_MODIFICATION_ERR=13,DOMException.NAMESPACE_ERR=14,DOMException.INVALID_ACCESS_ERR=15,function(){function e(t,e,r){if("function"==typeof e){"DOMContentLoaded"===t&&(t="load");var n=this,o=function(t){t._timeStamp=Date.now(),t._currentTarget=n,e.call(this,t),t._currentTarget=null};this["_"+t+e]=o,this.attachEvent("on"+t,o)}}function r(t,e,r){if("function"==typeof e){"DOMContentLoaded"===t&&(t="load");var n=this["_"+t+e];n&&(this.detachEvent("on"+t,n),this["_"+t+e]=null)}}"Element"in t&&!Element.prototype.addEventListener&&Object.defineProperty&&(Event.CAPTURING_PHASE=1,Event.AT_TARGET=2,Event.BUBBLING_PHASE=3,Object.defineProperties(Event.prototype,{CAPTURING_PHASE:{get:function(){return 1}},AT_TARGET:{get:function(){return 2}},BUBBLING_PHASE:{get:function(){return 3}},target:{get:function(){return this.srcElement}},currentTarget:{get:function(){return this._currentTarget}},eventPhase:{get:function(){return this.srcElement===this.currentTarget?Event.AT_TARGET:Event.BUBBLING_PHASE}},bubbles:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"resize":case"scroll":case"select":case"change":case"submit":case"reset":return!0}return!1}},cancelable:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"submit":return!0}return!1}},timeStamp:{get:function(){return this._timeStamp}},stopPropagation:{value:function(){this.cancelBubble=!0}},preventDefault:{value:function(){this.returnValue=!1}},defaultPrevented:{get:function(){return this.returnValue===!1}}}),[Window,HTMLDocument,Element].forEach(function(t){t.prototype.addEventListener=e,t.prototype.removeEventListener=r}))}(),window.addEvent=function(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent&&(t["e"+e+r]=r,t[e+r]=function(){var n=window.event;n.currentTarget=t,n.preventDefault=function(){n.returnValue=!1},n.stopPropagation=function(){n.cancelBubble=!0},n.target=n.srcElement,n.timeStamp=Date.now(),t["e"+e+r].call(this,n)},t.attachEvent("on"+e,t[e+r]))},window.removeEvent=function(t,e,r){t.removeEventListener?t.removeEventListener(e,r,!1):t.detachEvent&&(t.detachEvent("on"+e,t[e+r]),t[e+r]=null,t["e"+e+r]=null)},function(){function e(t,e){function r(t){return t.length?t.split(/\s+/g):[]}function n(t,e){var n=r(e),o=n.indexOf(t);return o!==-1&&n.splice(o,1),n.join(" ")}if(Object.defineProperties(this,{length:{get:function(){return r(t[e]).length}},item:{value:function(n){var o=r(t[e]);return 0<=n&&n=0&&i.item(e)!==this;);return e>-1}));var n={prepend:function(){var t=[].slice.call(arguments);t=r(t),this.insertBefore(t,this.firstChild)},append:function(){var t=[].slice.call(arguments);t=r(t),this.appendChild(t)}};e(t.Document||t.HTMLDocument,n),e(t.DocumentFragment,n),e(t.Element,n);var o={before:function(){var t=[].slice.call(arguments),e=this.parentNode;if(e){for(var n=this.previousSibling;t.indexOf(n)!==-1;)n=n.previousSibling;var o=r(t);e.insertBefore(o,n?n.nextSibling:e.firstChild)}},after:function(){var t=[].slice.call(arguments),e=this.parentNode;if(e){for(var n=this.nextSibling;t.indexOf(n)!==-1;)n=n.nextSibling;var o=r(t);e.insertBefore(o,n)}},replaceWith:function(){var t=[].slice.call(arguments),e=this.parentNode;if(e){for(var n=this.nextSibling;t.indexOf(n)!==-1;)n=n.nextSibling;var o=r(t);this.parentNode===e?e.replaceChild(o,this):e.insertBefore(o,n)}},remove:function(){this.parentNode&&this.parentNode.removeChild(this)}};e(t.DocumentType,o),e(t.Element,o),e(t.CharacterData,o)}}(self),function(t){"window"in t&&"document"in t&&(t.XMLHttpRequest=t.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw Error("This browser does not support XMLHttpRequest.")},XMLHttpRequest.UNSENT=0,XMLHttpRequest.OPENED=1,XMLHttpRequest.HEADERS_RECEIVED=2,XMLHttpRequest.LOADING=3,XMLHttpRequest.DONE=4,function(){function e(t){if(this._data=[],t)for(var e=0;e=t.length)return{done:!0,value:void 0};var n=t[r++];return{done:!1,value:"key"===e?n.name:"value"===e?n.value:[n.name,n.value]}}}function a(e,i){function a(){var t=f.href.replace(/#$|\?$|\?(?=#)/g,"");f.href!==t&&(f.href=t)}function s(){h._setList(f.search?r(f.search.substring(1)):[]),h._update_steps()}if(!(this instanceof t.URL))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator.");i&&(e=function(){if(u)return new c(e,i).href;var t;if(document.implementation&&document.implementation.createHTMLDocument?t=document.implementation.createHTMLDocument(""):document.implementation&&document.implementation.createDocument?(t=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),t.documentElement.appendChild(t.createElement("head")),t.documentElement.appendChild(t.createElement("body"))):window.ActiveXObject&&(t=new window.ActiveXObject("htmlfile"),t.write(""),t.close()),!t)throw Error("base not supported");var r=t.createElement("base");r.href=i,t.getElementsByTagName("head")[0].appendChild(r);var n=t.createElement("a");return n.href=e,n.href}());var f=n(e||""),l=function(){if(!("defineProperties"in Object))return!1;try{var t={};return Object.defineProperties(t,{prop:{get:function(){return!0}}}),t.prop}catch(e){return!1}}(),p=l?this:document.createElement("a"),h=new o(f.search?f.search.substring(1):null);return h._url_object=p,Object.defineProperties(p,{href:{get:function(){return f.href},set:function(t){f.href=t,a(),s()},enumerable:!0,configurable:!0},origin:{get:function(){return"origin"in f?f.origin:this.protocol+"//"+this.host},enumerable:!0,configurable:!0},protocol:{get:function(){return f.protocol},set:function(t){f.protocol=t},enumerable:!0,configurable:!0},username:{get:function(){return f.username},set:function(t){f.username=t},enumerable:!0,configurable:!0},password:{get:function(){return f.password},set:function(t){f.password=t},enumerable:!0,configurable:!0},host:{get:function(){var t={"http:":/:80$/,"https:":/:443$/,"ftp:":/:21$/}[f.protocol];return t?f.host.replace(t,""):f.host},set:function(t){f.host=t},enumerable:!0,configurable:!0},hostname:{get:function(){return f.hostname},set:function(t){f.hostname=t},enumerable:!0,configurable:!0},port:{get:function(){return f.port},set:function(t){f.port=t},enumerable:!0,configurable:!0},pathname:{get:function(){return"/"!==f.pathname.charAt(0)?"/"+f.pathname:f.pathname},set:function(t){f.pathname=t},enumerable:!0,configurable:!0},search:{get:function(){return f.search},set:function(t){f.search!==t&&(f.search=t,a(),s())},enumerable:!0,configurable:!0},searchParams:{get:function(){return h},enumerable:!0,configurable:!0},hash:{get:function(){return f.hash},set:function(t){f.hash=t,a()},enumerable:!0,configurable:!0},toString:{value:function(){return f.toString()},enumerable:!1,configurable:!0},valueOf:{value:function(){return f.valueOf()},enumerable:!1,configurable:!0}}),p}var u,c=t.URL;try{if(c){if(u=new t.URL("http://example.com"),"searchParams"in u)return;"href"in u||(u=void 0)}}catch(s){}if(Object.defineProperties(o.prototype,{append:{value:function(t,e){this._list.push({name:t,value:e}),this._update_steps()},writable:!0,enumerable:!0,configurable:!0},"delete":{value:function(t){for(var e=0;e1?arguments[1]:void 0;this._list.forEach(function(r,n){t.call(e,r.value,r.name)})},writable:!0,enumerable:!0,configurable:!0},toString:{value:function(){return e(this._list)},writable:!0,enumerable:!1,configurable:!0}}),"Symbol"in t&&"iterator"in t.Symbol&&(Object.defineProperty(o.prototype,t.Symbol.iterator,{value:o.prototype.entries,writable:!0,enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,t.Symbol.iterator,{value:function(){return this},writable:!0,enumerable:!0,configurable:!0})),c)for(var f in c)c.hasOwnProperty(f)&&"function"==typeof c[f]&&(a[f]=c[f]);t.URL=a,t.URLSearchParams=o}(self),function(t){function e(t){if(t=String(t),t.match(/[^\x00-\xFF]/))throw TypeError("Not a valid ByteString");return t}function r(t){return t=String(t),t.replace(/([\u0000-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF])/g,function(t){return/^[\uD800-\uDFFF]$/.test(t)?"�":t})}function n(t){return 65535&t}function o(t){return String(t).replace(/[a-z]/g,function(t){return t.toUpperCase()})}function i(t){return t=o(t),"CONNECT"===t||"TRACE"===t||"TRACK"===t}function a(t){var e=o(t);return"DELETE"===e||"GET"===e||"HEAD"===e||"OPTIONS"===e||"POST"===e||"PUT"===e?e:t}function u(t){return/^[!#$%&'*+\-.09A-Z^_`a-z|~]+$/.test(t)}function c(t){return!0}function s(t){t=String(t).toLowerCase();var e={"accept-charset":!0,"accept-encoding":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,cookie2:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,origin:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,via:!0};return e[t]||"proxy-"===t.substring(0,6)||"sec-"===t.substring(0,4)}function f(t){t=String(t).toLowerCase();var e={"set-cookie":!0,"set-cookie2":!0};return e[t]}function l(t,e){return t=String(t).toLowerCase(),"accept"===t||"accept-language"===t||"content-language"===t||"content-type"===t&&["application/x-www-form-encoded","multipart/form-data","text/plain"].indexOf(e)!==-1}function p(t){this._guard="none",this._headerList=[],t&&h(this,t)}function h(t,e){e instanceof p?e._headerList.forEach(function(e){t.append(e[0],e[1])}):Array.isArray(e)?e.forEach(function(e){if(!Array.isArray(e)||2!==e.length)throw TypeError();t.append(e[0],e[1])}):(e=Object(e),Object.keys(e).forEach(function(r){t.append(r,e[r])}))}function y(t){this._headers=t,this._index=0}function v(t){this._stream=t,this.bodyUsed=!1}function d(t,n){if(arguments.length<1)throw TypeError("Not enough arguments");if(v.call(this,null),this.method="GET",this.url="",this.headers=new p,this.headers._guard="request",this.referrer=null,this.mode=null,this.credentials="omit",t instanceof d){if(t.bodyUsed)throw TypeError();t.bodyUsed=!0,this.method=t.method,this.url=t.url,this.headers=new p(t.headers),this.headers._guard=t.headers._guard,this.credentials=t.credentials,this._stream=t._stream}else t=r(t),this.url=String(new URL(t,self.location));if(n=Object(n),"method"in n){var o=e(n.method);if(i(o))throw TypeError();this.method=a(o)}"headers"in n&&(this.headers=new p,h(this.headers,n.headers)),"body"in n&&(this._stream=n.body),"credentials"in n&&["omit","same-origin","include"].indexOf(n.credentials)!==-1&&(this.credentials=n.credentials)}function m(t,e){if(arguments.length<1&&(t=""),this.headers=new p,this.headers._guard="response",t instanceof XMLHttpRequest&&"_url"in t){var o=t;return this.type="basic",this.url=r(o._url),this.status=o.status,this.ok=200<=this.status&&this.status<=299,this.statusText=o.statusText,o.getAllResponseHeaders().split(/\r?\n/).filter(function(t){return t.length}).forEach(function(t){var e=t.indexOf(":");this.headers.append(t.substring(0,e),t.substring(e+2))},this),void v.call(this,o.responseText)}v.call(this,t),e=Object(e)||{},this.url="";var i="status"in e?n(e.status):200;if(i<200||i>599)throw RangeError();this.status=i,this.ok=200<=this.status&&this.status<=299; -var a="statusText"in e?String(e.statusText):"OK";if(/[^\x00-\xFF]/.test(a))throw TypeError();this.statusText=a,"headers"in e&&h(this.headers,e),this.type="basic"}function b(t,e){return new Promise(function(r,n){var o=new d(t,e),i=new XMLHttpRequest,a=!0;i._url=o.url;try{i.open(o.method,o.url,a)}catch(u){throw TypeError(u.message)}for(var c=o.headers[Symbol.iterator](),s=c.next();!s.done;s=c.next())i.setRequestHeader(s.value[0],s.value[1]);"include"===o.credentials&&(i.withCredentials=!0),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&(0===i.status?n(new TypeError("Network error")):r(new m(i)))},i.send(o._stream)})}p.prototype={append:function(t,r){if(t=e(t),!u(t)||!c(r))throw TypeError();if("immutable"===this._guard)throw TypeError();"request"===this._guard&&s(t)||("request-no-CORS"!==this._guard||l(t,r))&&("response"===this._guard&&f(t)||(t=t.toLowerCase(),this._headerList.push([t,r])))},"delete":function(t){if(t=e(t),!u(t))throw TypeError();if("immutable"===this._guard)throw TypeError();if(("request"!==this._guard||!s(t))&&("request-no-CORS"!==this._guard||l(t,"invalid"))&&("response"!==this._guard||!f(t))){t=t.toLowerCase();for(var r=0;r=this._headers._headerList.length?{value:void 0,done:!0}:{value:this._headers._headerList[this._index++],done:!1}},y.prototype[Symbol.iterator]=function(){return this},v.prototype={arrayBuffer:function(){if(this.bodyUsed)return Promise.reject(TypeError());if(this.bodyUsed=!0,this._stream instanceof ArrayBuffer)return Promise.resolve(this._stream);var t=this._stream;return new Promise(function(e,r){var n=unescape(encodeURIComponent(t)).split("").map(function(t){return t.charCodeAt(0)});e(new Uint8Array(n).buffer)})},blob:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof Blob?Promise.resolve(this._stream):Promise.resolve(new Blob([this._stream])))},formData:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof FormData?Promise.resolve(this._stream):Promise.reject(Error("Not yet implemented")))},json:function(){if(this.bodyUsed)return Promise.reject(TypeError());this.bodyUsed=!0;var t=this;return new Promise(function(e,r){e(JSON.parse(t._stream))})},text:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,Promise.resolve(String(this._stream)))}},d.prototype=v.prototype,m.prototype=v.prototype,m.redirect=function(){throw Error("Not supported")},"fetch"in t||(t.Headers=p,t.Request=d,t.Response=m,t.fetch=b)}(self); +if("[[WeakSetData]]"in t)throw TypeError();if(r!==k){var n=t.add;if(!p(n))throw TypeError();var o=E(f(r))}if(i(t,"[[WeakSetData]]",new a),o===k)return t;for(;;){var c=T(o);if(c===!1)return t;var s=S(c);n.call(t,s)}return t}"WeakSet"in t&&!I||(t.WeakSet=r);var n={};r.prototype=n,o(r.prototype,"add",function(t){var r=e(this);if("object"!==u(r))throw TypeError();if(r["[[WeakSetData]]"]===k)throw TypeError();if("object"!==u(t))throw TypeError("Expected object");return r["[[WeakSetData]]"].set(t,!0),r}),o(r.prototype,"delete",function(t){var r=e(this);if("object"!==u(r))throw TypeError();if(r["[[WeakSetData]]"]===k)throw TypeError();if("object"!==u(t))throw TypeError("Expected object");return r["[[WeakSetData]]"].remove(t)}),o(r.prototype,"has",function(t){var r=e(this);if("object"!==u(r))throw TypeError();if(r["[[WeakSetData]]"]===k)throw TypeError();if("object"!==u(t))throw TypeError("Expected object");return r["[[WeakSetData]]"].has(t)}),o(t.WeakSet.prototype,lt,"WeakSet"),function(){var e=new t.WeakSet,r=t.WeakSet.prototype.add;o(t.WeakSet.prototype,"add",function(){return r.apply(this,arguments),this},e.add({})!==e)}()}(),function(){"ArrayBuffer"in t&&(o(ArrayBuffer,"isView",function(t){return"object"===u(t)&&("buffer"in t&&t.buffer instanceof ArrayBuffer)}),o(ArrayBuffer.prototype,lt,"ArrayBuffer"))}(),function(){"DataView"in t&&o(DataView.prototype,lt,"DataView")}(),o(JSON,lt,"JSON"),o(it,at,function(){return this}),function(){function r(t){var e={"[[value]]":!1},r=a();i(r,"[[Promise]]",t),i(r,"[[AlreadyResolved]]",e);var o=n();return i(o,"[[Promise]]",t),i(o,"[[AlreadyResolved]]",e),{"[[Resolve]]":r,"[[Reject]]":o}}function n(){var t=function(e){var r=t["[[Promise]]"],n=t["[[AlreadyResolved]]"];return n["[[value]]"]?k:(i(n,"[[value]]",!0),v(r,e))};return t}function a(){var t=function(e){var r=t["[[Promise]]"],n=t["[[AlreadyResolved]]"];if(n["[[value]]"])return k;if(i(n,"[[value]]",!0),y(e,r)){var o=TypeError();return v(r,o)}if("object"!==u(e))return c(r,e);try{var a=e.then}catch(a){return v(r,a)}return p(a)?(j("PromiseJobs",b,[r,e,a]),k):c(r,e)};return t}function c(t,e){var r=t["[[PromiseFulfillReactions]]"];return i(t,"[[PromiseResult]]",e),i(t,"[[PromiseFulfillReactions]]",k),i(t,"[[PromiseRejectReactions]]",k),i(t,"[[PromiseState]]","fulfilled"),d(r,e)}function s(t){return f(k,t)}function f(t,e){var r={};i(r,"[[Promise]]",t),i(r,"[[Resolve]]",k),i(r,"[[Reject]]",k);var n=l();i(n,"[[Capability]]",r);var o=t=new e(n);if(i(r,"[[Promise]]",t),!p(r["[[Resolve]]"]))throw TypeError();if(!p(r["[[Reject]]"]))throw TypeError();if("object"===u(o)&&!y(t,o))throw TypeError();return r}function l(){var t=function(e,r){var n=t["[[Capability]]"];if(n["[[Resolve]]"]!==k)throw TypeError();if(n["[[Reject]]"]!==k)throw TypeError();return i(n,"[[Resolve]]",e),i(n,"[[Reject]]",r),k};return t}function h(t){return"object"===u(t)&&("[[PromiseState]]"in t&&t["[[PromiseState]]"]!==k)}function v(t,e){var r=t["[[PromiseRejectReactions]]"];return i(t,"[[PromiseResult]]",e),i(t,"[[PromiseFulfillReactions]]",k),i(t,"[[PromiseRejectReactions]]",k),i(t,"[[PromiseState]]","rejected"),d(r,e)}function d(t,e){for(var r=0,n=t.length;r=0)var s=c;else s=u+c,s<0&&(s=0);for(;s>16&255)),o.push(String.fromCharCode(i>>8&255)),o.push(String.fromCharCode(255&i)),a=0,i=0),r+=1;return 12===a?(i>>=4,o.push(String.fromCharCode(255&i))):18===a&&(i>>=2,o.push(String.fromCharCode(i>>8&255)),o.push(String.fromCharCode(255&i))),o.join("")}function r(t){t=String(t);var e,r,o,i,a,u,c,s=0,f=[];if(/[^\x00-\xFF]/.test(t))throw Error("InvalidCharacterError");for(;s>2,a=(3&e)<<4|r>>4,u=(15&r)<<2|o>>6,c=63&o,s===t.length+2?(u=64,c=64):s===t.length+1&&(c=64),f.push(n.charAt(i),n.charAt(a),n.charAt(u),n.charAt(c));return f.join("")}if(!("atob"in t&&"btoa"in t)){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.atob=e,t.btoa=r}}(),function(){function e(t){return t.offsetWidth>0&&t.offsetHeight>0}function r(){var t=a;a=Object.create(null),c=-1,Object.keys(t).forEach(function(r){var n=t[r];n.element&&!e(n.element)||n.callback(Date.now())})}function n(e,n){var o=++u;return a[o]={callback:e,element:n},c===-1&&(c=t.setTimeout(r,1e3/i)),o}function o(e){delete a[e],0===Object.keys(a).length&&(t.clearTimeout(c),c=-1)}if(!("requestAnimationFrame"in t)){var i=60,a=Object.create(null),u=0,c=-1;t.requestAnimationFrame=n,t.cancelAnimationFrame=o}}())}(self),function(t){function e(t,e){t&&Object.keys(e).forEach(function(r){if(!(r in t||r in t.prototype))try{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(e,r))}catch(n){t[r]=e[r]}})}function r(t){var e=null;return t=t.map(function(t){return t instanceof Node?t:document.createTextNode(t)}),1===t.length?e=t[0]:(e=document.createDocumentFragment(),t.forEach(function(t){e.appendChild(t)})),e}if("window"in t&&"document"in t){document.querySelectorAll||(document.querySelectorAll=function(t){var e,r=document.createElement("style"),n=[];for(document.documentElement.firstChild.appendChild(r),document._qsa=[],r.styleSheet.cssText=t+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),r.parentNode.removeChild(r);document._qsa.length;)e=document._qsa.shift(),e.style.removeAttribute("x-qsa"),n.push(e);return document._qsa=null,n}),document.querySelector||(document.querySelector=function(t){var e=document.querySelectorAll(t);return e.length?e[0]:null}),document.getElementsByClassName||(document.getElementsByClassName=function(t){return t=String(t).replace(/^|\s+/g,"."),document.querySelectorAll(t)}),t.Node=t.Node||function(){throw TypeError("Illegal constructor")},Node.ELEMENT_NODE=1,Node.ATTRIBUTE_NODE=2,Node.TEXT_NODE=3,Node.CDATA_SECTION_NODE=4,Node.ENTITY_REFERENCE_NODE=5,Node.ENTITY_NODE=6,Node.PROCESSING_INSTRUCTION_NODE=7,Node.COMMENT_NODE=8,Node.DOCUMENT_NODE=9,Node.DOCUMENT_TYPE_NODE=10,Node.DOCUMENT_FRAGMENT_NODE=11,Node.NOTATION_NODE=12,t.DOMException=t.DOMException||function(){throw TypeError("Illegal constructor")},DOMException.INDEX_SIZE_ERR=1,DOMException.DOMSTRING_SIZE_ERR=2,DOMException.HIERARCHY_REQUEST_ERR=3,DOMException.WRONG_DOCUMENT_ERR=4,DOMException.INVALID_CHARACTER_ERR=5,DOMException.NO_DATA_ALLOWED_ERR=6,DOMException.NO_MODIFICATION_ALLOWED_ERR=7,DOMException.NOT_FOUND_ERR=8,DOMException.NOT_SUPPORTED_ERR=9,DOMException.INUSE_ATTRIBUTE_ERR=10,DOMException.INVALID_STATE_ERR=11,DOMException.SYNTAX_ERR=12,DOMException.INVALID_MODIFICATION_ERR=13,DOMException.NAMESPACE_ERR=14,DOMException.INVALID_ACCESS_ERR=15,function(){function e(t,e,r){if("function"==typeof e){"DOMContentLoaded"===t&&(t="load");var n=this,o=function(t){t._timeStamp=Date.now(),t._currentTarget=n,e.call(this,t),t._currentTarget=null};this["_"+t+e]=o,this.attachEvent("on"+t,o)}}function r(t,e,r){if("function"==typeof e){"DOMContentLoaded"===t&&(t="load");var n=this["_"+t+e];n&&(this.detachEvent("on"+t,n),this["_"+t+e]=null)}}"Element"in t&&!Element.prototype.addEventListener&&Object.defineProperty&&(Event.CAPTURING_PHASE=1,Event.AT_TARGET=2,Event.BUBBLING_PHASE=3,Object.defineProperties(Event.prototype,{CAPTURING_PHASE:{get:function(){return 1}},AT_TARGET:{get:function(){return 2}},BUBBLING_PHASE:{get:function(){return 3}},target:{get:function(){return this.srcElement}},currentTarget:{get:function(){return this._currentTarget}},eventPhase:{get:function(){return this.srcElement===this.currentTarget?Event.AT_TARGET:Event.BUBBLING_PHASE}},bubbles:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"resize":case"scroll":case"select":case"change":case"submit":case"reset":return!0}return!1}},cancelable:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"submit":return!0}return!1}},timeStamp:{get:function(){return this._timeStamp}},stopPropagation:{value:function(){this.cancelBubble=!0}},preventDefault:{value:function(){this.returnValue=!1}},defaultPrevented:{get:function(){return this.returnValue===!1}}}),[Window,HTMLDocument,Element].forEach(function(t){t.prototype.addEventListener=e,t.prototype.removeEventListener=r}))}(),function(){function e(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),r}"CustomEvent"in t&&"function"==typeof t.CustomEvent||(e.prototype=t.Event.prototype,t.CustomEvent=e)}(),window.addEvent=function(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent&&(t["e"+e+r]=r,t[e+r]=function(){var n=window.event;n.currentTarget=t,n.preventDefault=function(){n.returnValue=!1},n.stopPropagation=function(){n.cancelBubble=!0},n.target=n.srcElement,n.timeStamp=Date.now(),t["e"+e+r].call(this,n)},t.attachEvent("on"+e,t[e+r]))},window.removeEvent=function(t,e,r){t.removeEventListener?t.removeEventListener(e,r,!1):t.detachEvent&&(t.detachEvent("on"+e,t[e+r]),t[e+r]=null,t["e"+e+r]=null)},function(){function e(t,e){function r(t){return t.length?t.split(/\s+/g):[]}function n(t,e){var n=r(e),o=n.indexOf(t);return o!==-1&&n.splice(o,1),n.join(" ")}if(Object.defineProperties(this,{length:{get:function(){return r(t[e]).length}},item:{value:function(n){var o=r(t[e]);return 0<=n&&n=0&&i.item(e)!==this;);return e>-1}));var n={prepend:function(){var t=[].slice.call(arguments);t=r(t),this.insertBefore(t,this.firstChild)},append:function(){var t=[].slice.call(arguments);t=r(t),this.appendChild(t)}};e(t.Document||t.HTMLDocument,n),e(t.DocumentFragment,n),e(t.Element,n);var o={before:function(){var t=[].slice.call(arguments),e=this.parentNode;if(e){for(var n=this.previousSibling;t.indexOf(n)!==-1;)n=n.previousSibling;var o=r(t);e.insertBefore(o,n?n.nextSibling:e.firstChild)}},after:function(){var t=[].slice.call(arguments),e=this.parentNode;if(e){for(var n=this.nextSibling;t.indexOf(n)!==-1;)n=n.nextSibling;var o=r(t);e.insertBefore(o,n)}},replaceWith:function(){var t=[].slice.call(arguments),e=this.parentNode;if(e){for(var n=this.nextSibling;t.indexOf(n)!==-1;)n=n.nextSibling;var o=r(t);this.parentNode===e?e.replaceChild(o,this):e.insertBefore(o,n)}},remove:function(){this.parentNode&&this.parentNode.removeChild(this)}};e(t.DocumentType,o),e(t.Element,o),e(t.CharacterData,o)}}(self),function(t){"window"in t&&"document"in t&&(t.XMLHttpRequest=t.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw Error("This browser does not support XMLHttpRequest.")},XMLHttpRequest.UNSENT=0,XMLHttpRequest.OPENED=1,XMLHttpRequest.HEADERS_RECEIVED=2,XMLHttpRequest.LOADING=3,XMLHttpRequest.DONE=4,function(){function e(t){if(this._data=[],t)for(var e=0;e=t.length)return{done:!0,value:void 0};var n=t[r++];return{done:!1,value:"key"===e?n.name:"value"===e?n.value:[n.name,n.value]}}}function a(e,i){function a(){var t=f.href.replace(/#$|\?$|\?(?=#)/g,"");f.href!==t&&(f.href=t)}function s(){h._setList(f.search?r(f.search.substring(1)):[]),h._update_steps()}if(!(this instanceof t.URL))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator.");i&&(e=function(){if(u)return new c(e,i).href;var t;if(document.implementation&&document.implementation.createHTMLDocument?t=document.implementation.createHTMLDocument(""):document.implementation&&document.implementation.createDocument?(t=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),t.documentElement.appendChild(t.createElement("head")),t.documentElement.appendChild(t.createElement("body"))):window.ActiveXObject&&(t=new window.ActiveXObject("htmlfile"),t.write(""),t.close()),!t)throw Error("base not supported");var r=t.createElement("base");r.href=i,t.getElementsByTagName("head")[0].appendChild(r);var n=t.createElement("a");return n.href=e,n.href}());var f=n(e||""),l=function(){if(!("defineProperties"in Object))return!1;try{var t={};return Object.defineProperties(t,{prop:{get:function(){return!0}}}),t.prop}catch(e){return!1}}(),p=l?this:document.createElement("a"),h=new o(f.search?f.search.substring(1):null);return h._url_object=p,Object.defineProperties(p,{href:{get:function(){return f.href},set:function(t){f.href=t,a(),s()},enumerable:!0,configurable:!0},origin:{get:function(){return"origin"in f?f.origin:this.protocol+"//"+this.host},enumerable:!0,configurable:!0},protocol:{get:function(){return f.protocol},set:function(t){f.protocol=t},enumerable:!0,configurable:!0},username:{get:function(){return f.username},set:function(t){f.username=t},enumerable:!0,configurable:!0},password:{get:function(){return f.password},set:function(t){f.password=t},enumerable:!0,configurable:!0},host:{get:function(){var t={"http:":/:80$/,"https:":/:443$/,"ftp:":/:21$/}[f.protocol];return t?f.host.replace(t,""):f.host},set:function(t){f.host=t},enumerable:!0,configurable:!0},hostname:{get:function(){return f.hostname},set:function(t){f.hostname=t},enumerable:!0,configurable:!0},port:{get:function(){return f.port},set:function(t){f.port=t},enumerable:!0,configurable:!0},pathname:{get:function(){return"/"!==f.pathname.charAt(0)?"/"+f.pathname:f.pathname},set:function(t){f.pathname=t},enumerable:!0,configurable:!0},search:{get:function(){return f.search},set:function(t){f.search!==t&&(f.search=t,a(),s())},enumerable:!0,configurable:!0},searchParams:{get:function(){return h},enumerable:!0,configurable:!0},hash:{get:function(){return f.hash},set:function(t){f.hash=t,a()},enumerable:!0,configurable:!0},toString:{value:function(){return f.toString()},enumerable:!1,configurable:!0},valueOf:{value:function(){return f.valueOf()},enumerable:!1,configurable:!0}}),p}var u,c=t.URL;try{if(c){if(u=new t.URL("http://example.com"),"searchParams"in u)return;"href"in u||(u=void 0)}}catch(s){}if(Object.defineProperties(o.prototype,{append:{value:function(t,e){this._list.push({name:t,value:e}),this._update_steps()},writable:!0,enumerable:!0,configurable:!0},"delete":{value:function(t){for(var e=0;e1?arguments[1]:void 0;this._list.forEach(function(r,n){t.call(e,r.value,r.name)})},writable:!0,enumerable:!0,configurable:!0},toString:{value:function(){return e(this._list)},writable:!0,enumerable:!1,configurable:!0}}),"Symbol"in t&&"iterator"in t.Symbol&&(Object.defineProperty(o.prototype,t.Symbol.iterator,{value:o.prototype.entries,writable:!0,enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,t.Symbol.iterator,{value:function(){return this},writable:!0,enumerable:!0,configurable:!0})),c)for(var f in c)c.hasOwnProperty(f)&&"function"==typeof c[f]&&(a[f]=c[f]);t.URL=a,t.URLSearchParams=o}(self),function(t){function e(t){if(t=String(t),t.match(/[^\x00-\xFF]/))throw TypeError("Not a valid ByteString");return t}function r(t){return t=String(t),t.replace(/([\u0000-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF])/g,function(t){return/^[\uD800-\uDFFF]$/.test(t)?"�":t})}function n(t){return 65535&t}function o(t){return String(t).replace(/[a-z]/g,function(t){return t.toUpperCase()})}function i(t){return t=o(t),"CONNECT"===t||"TRACE"===t||"TRACK"===t}function a(t){var e=o(t);return"DELETE"===e||"GET"===e||"HEAD"===e||"OPTIONS"===e||"POST"===e||"PUT"===e?e:t}function u(t){return/^[!#$%&'*+\-.09A-Z^_`a-z|~]+$/.test(t)}function c(t){return!0}function s(t){t=String(t).toLowerCase();var e={"accept-charset":!0,"accept-encoding":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,cookie2:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,origin:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,via:!0};return e[t]||"proxy-"===t.substring(0,6)||"sec-"===t.substring(0,4)}function f(t){t=String(t).toLowerCase();var e={"set-cookie":!0,"set-cookie2":!0};return e[t]}function l(t,e){return t=String(t).toLowerCase(),"accept"===t||"accept-language"===t||"content-language"===t||"content-type"===t&&["application/x-www-form-encoded","multipart/form-data","text/plain"].indexOf(e)!==-1}function p(t){this._guard="none",this._headerList=[],t&&h(this,t)}function h(t,e){e instanceof p?e._headerList.forEach(function(e){t.append(e[0],e[1])}):Array.isArray(e)?e.forEach(function(e){if(!Array.isArray(e)||2!==e.length)throw TypeError();t.append(e[0],e[1])}):(e=Object(e),Object.keys(e).forEach(function(r){t.append(r,e[r])}))}function y(t){this._headers=t,this._index=0}function v(t){this._stream=t,this.bodyUsed=!1}function d(t,n){if(arguments.length<1)throw TypeError("Not enough arguments");if(v.call(this,null),this.method="GET",this.url="",this.headers=new p,this.headers._guard="request",this.referrer=null,this.mode=null,this.credentials="omit",t instanceof d){if(t.bodyUsed)throw TypeError();t.bodyUsed=!0,this.method=t.method,this.url=t.url,this.headers=new p(t.headers),this.headers._guard=t.headers._guard,this.credentials=t.credentials,this._stream=t._stream}else t=r(t),this.url=String(new URL(t,self.location));if(n=Object(n),"method"in n){var o=e(n.method);if(i(o))throw TypeError();this.method=a(o)}"headers"in n&&(this.headers=new p,h(this.headers,n.headers)),"body"in n&&(this._stream=n.body),"credentials"in n&&["omit","same-origin","include"].indexOf(n.credentials)!==-1&&(this.credentials=n.credentials)}function m(t,e){if(arguments.length<1&&(t=""),this.headers=new p,this.headers._guard="response",t instanceof XMLHttpRequest&&"_url"in t){var o=t;return this.type="basic",this.url=r(o._url),this.status=o.status,this.ok=200<=this.status&&this.status<=299,this.statusText=o.statusText,o.getAllResponseHeaders().split(/\r?\n/).filter(function(t){return t.length}).forEach(function(t){ +var e=t.indexOf(":");this.headers.append(t.substring(0,e),t.substring(e+2))},this),void v.call(this,o.responseText)}v.call(this,t),e=Object(e)||{},this.url="";var i="status"in e?n(e.status):200;if(i<200||i>599)throw RangeError();this.status=i,this.ok=200<=this.status&&this.status<=299;var a="statusText"in e?String(e.statusText):"OK";if(/[^\x00-\xFF]/.test(a))throw TypeError();this.statusText=a,"headers"in e&&h(this.headers,e),this.type="basic"}function b(t,e){return new Promise(function(r,n){var o=new d(t,e),i=new XMLHttpRequest,a=!0;i._url=o.url;try{i.open(o.method,o.url,a)}catch(u){throw TypeError(u.message)}for(var c=o.headers[Symbol.iterator](),s=c.next();!s.done;s=c.next())i.setRequestHeader(s.value[0],s.value[1]);"include"===o.credentials&&(i.withCredentials=!0),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&(0===i.status?n(new TypeError("Network error")):r(new m(i)))},i.send(o._stream)})}p.prototype={append:function(t,r){if(t=e(t),!u(t)||!c(r))throw TypeError();if("immutable"===this._guard)throw TypeError();"request"===this._guard&&s(t)||("request-no-CORS"!==this._guard||l(t,r))&&("response"===this._guard&&f(t)||(t=t.toLowerCase(),this._headerList.push([t,r])))},"delete":function(t){if(t=e(t),!u(t))throw TypeError();if("immutable"===this._guard)throw TypeError();if(("request"!==this._guard||!s(t))&&("request-no-CORS"!==this._guard||l(t,"invalid"))&&("response"!==this._guard||!f(t))){t=t.toLowerCase();for(var r=0;r=this._headers._headerList.length?{value:void 0,done:!0}:{value:this._headers._headerList[this._index++],done:!1}},y.prototype[Symbol.iterator]=function(){return this},v.prototype={arrayBuffer:function(){if(this.bodyUsed)return Promise.reject(TypeError());if(this.bodyUsed=!0,this._stream instanceof ArrayBuffer)return Promise.resolve(this._stream);var t=this._stream;return new Promise(function(e,r){var n=unescape(encodeURIComponent(t)).split("").map(function(t){return t.charCodeAt(0)});e(new Uint8Array(n).buffer)})},blob:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof Blob?Promise.resolve(this._stream):Promise.resolve(new Blob([this._stream])))},formData:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof FormData?Promise.resolve(this._stream):Promise.reject(Error("Not yet implemented")))},json:function(){if(this.bodyUsed)return Promise.reject(TypeError());this.bodyUsed=!0;var t=this;return new Promise(function(e,r){e(JSON.parse(t._stream))})},text:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,Promise.resolve(String(this._stream)))}},d.prototype=v.prototype,m.prototype=v.prototype,m.redirect=function(){throw Error("Not supported")},"fetch"in t||(t.Headers=p,t.Request=d,t.Response=m,t.fetch=b)}(self); diff --git a/web.js b/web.js index 1e9cf2b..6d2a5f4 100644 --- a/web.js +++ b/web.js @@ -399,6 +399,22 @@ }); }()); + // CustomEvent + // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent + // Needed for: IE + (function () { + if ('CustomEvent' in global && typeof global.CustomEvent === "function") + return; + function CustomEvent ( event, params ) { + params = params || { bubbles: false, cancelable: false, detail: undefined }; + var evt = document.createEvent( 'CustomEvent' ); + evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); + return evt; + } + CustomEvent.prototype = global.Event.prototype; + global.CustomEvent = CustomEvent; + })(); + // Shim for DOM Events for IE7- // http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html // Use addEvent(object, event, handler) instead of object.addEventListener(event, handler) diff --git a/web.min.js b/web.min.js index b24fdfc..81063e4 100644 --- a/web.min.js +++ b/web.min.js @@ -1 +1 @@ -!function(e){"window"in e&&"document"in e&&(document.head=document.head||document.getElementsByTagName("head")[0],["abbr","article","aside","audio","bdi","canvas","data","datalist","details","dialog","figcaption","figure","footer","header","hgroup","main","mark","meter","nav","output","picture","progress","section","summary","template","time","video"].forEach(function(e){document.createElement(e)}),!("dataset"in document.createElement("span"))&&"Element"in e&&Element.prototype&&Object.defineProperty&&Object.defineProperty(Element.prototype,"dataset",{get:function(){for(var e=Object.create(null),t=0;t>16&255)),i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o)),a=0,o=0),n+=1;return 12===a?(o>>=4,i.push(String.fromCharCode(255&o))):18===a&&(o>>=2,i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o))),i.join("")}function n(e){e=String(e);var t,n,i,o,a,s,u,c=0,l=[];if(/[^\x00-\xFF]/.test(e))throw Error("InvalidCharacterError");for(;c>2,a=(3&t)<<4|n>>4,s=(15&n)<<2|i>>6,u=63&i,c===e.length+2?(s=64,u=64):c===e.length+1&&(u=64),l.push(r.charAt(o),r.charAt(a),r.charAt(s),r.charAt(u));return l.join("")}if(!("atob"in e&&"btoa"in e)){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.atob=t,e.btoa=n}}(),function(){function t(e){return e.offsetWidth>0&&e.offsetHeight>0}function n(){var e=a;a=Object.create(null),u=-1,Object.keys(e).forEach(function(n){var r=e[n];r.element&&!t(r.element)||r.callback(Date.now())})}function r(t,r){var i=++s;return a[i]={callback:t,element:r},u===-1&&(u=e.setTimeout(n,1e3/o)),i}function i(t){delete a[t],0===Object.keys(a).length&&(e.clearTimeout(u),u=-1)}if(!("requestAnimationFrame"in e)){var o=60,a=Object.create(null),s=0,u=-1;e.requestAnimationFrame=r,e.cancelAnimationFrame=i}}())}(self),function(e){function t(e,t){e&&Object.keys(t).forEach(function(n){if(!(n in e||n in e.prototype))try{Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}catch(r){e[n]=t[n]}})}function n(e){var t=null;return e=e.map(function(e){return e instanceof Node?e:document.createTextNode(e)}),1===e.length?t=e[0]:(t=document.createDocumentFragment(),e.forEach(function(e){t.appendChild(e)})),t}if("window"in e&&"document"in e){document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),r=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)t=document._qsa.shift(),t.style.removeAttribute("x-qsa"),r.push(t);return document._qsa=null,r}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),document.getElementsByClassName||(document.getElementsByClassName=function(e){return e=String(e).replace(/^|\s+/g,"."),document.querySelectorAll(e)}),e.Node=e.Node||function(){throw TypeError("Illegal constructor")},Node.ELEMENT_NODE=1,Node.ATTRIBUTE_NODE=2,Node.TEXT_NODE=3,Node.CDATA_SECTION_NODE=4,Node.ENTITY_REFERENCE_NODE=5,Node.ENTITY_NODE=6,Node.PROCESSING_INSTRUCTION_NODE=7,Node.COMMENT_NODE=8,Node.DOCUMENT_NODE=9,Node.DOCUMENT_TYPE_NODE=10,Node.DOCUMENT_FRAGMENT_NODE=11,Node.NOTATION_NODE=12,e.DOMException=e.DOMException||function(){throw TypeError("Illegal constructor")},DOMException.INDEX_SIZE_ERR=1,DOMException.DOMSTRING_SIZE_ERR=2,DOMException.HIERARCHY_REQUEST_ERR=3,DOMException.WRONG_DOCUMENT_ERR=4,DOMException.INVALID_CHARACTER_ERR=5,DOMException.NO_DATA_ALLOWED_ERR=6,DOMException.NO_MODIFICATION_ALLOWED_ERR=7,DOMException.NOT_FOUND_ERR=8,DOMException.NOT_SUPPORTED_ERR=9,DOMException.INUSE_ATTRIBUTE_ERR=10,DOMException.INVALID_STATE_ERR=11,DOMException.SYNTAX_ERR=12,DOMException.INVALID_MODIFICATION_ERR=13,DOMException.NAMESPACE_ERR=14,DOMException.INVALID_ACCESS_ERR=15,function(){function t(e,t,n){if("function"==typeof t){"DOMContentLoaded"===e&&(e="load");var r=this,i=function(e){e._timeStamp=Date.now(),e._currentTarget=r,t.call(this,e),e._currentTarget=null};this["_"+e+t]=i,this.attachEvent("on"+e,i)}}function n(e,t,n){if("function"==typeof t){"DOMContentLoaded"===e&&(e="load");var r=this["_"+e+t];r&&(this.detachEvent("on"+e,r),this["_"+e+t]=null)}}"Element"in e&&!Element.prototype.addEventListener&&Object.defineProperty&&(Event.CAPTURING_PHASE=1,Event.AT_TARGET=2,Event.BUBBLING_PHASE=3,Object.defineProperties(Event.prototype,{CAPTURING_PHASE:{get:function(){return 1}},AT_TARGET:{get:function(){return 2}},BUBBLING_PHASE:{get:function(){return 3}},target:{get:function(){return this.srcElement}},currentTarget:{get:function(){return this._currentTarget}},eventPhase:{get:function(){return this.srcElement===this.currentTarget?Event.AT_TARGET:Event.BUBBLING_PHASE}},bubbles:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"resize":case"scroll":case"select":case"change":case"submit":case"reset":return!0}return!1}},cancelable:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"submit":return!0}return!1}},timeStamp:{get:function(){return this._timeStamp}},stopPropagation:{value:function(){this.cancelBubble=!0}},preventDefault:{value:function(){this.returnValue=!1}},defaultPrevented:{get:function(){return this.returnValue===!1}}}),[Window,HTMLDocument,Element].forEach(function(e){e.prototype.addEventListener=t,e.prototype.removeEventListener=n}))}(),window.addEvent=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&(e["e"+t+n]=n,e[t+n]=function(){var r=window.event;r.currentTarget=e,r.preventDefault=function(){r.returnValue=!1},r.stopPropagation=function(){r.cancelBubble=!0},r.target=r.srcElement,r.timeStamp=Date.now(),e["e"+t+n].call(this,r)},e.attachEvent("on"+t,e[t+n]))},window.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&(e.detachEvent("on"+t,e[t+n]),e[t+n]=null,e["e"+t+n]=null)},function(){function t(e,t){function n(e){return e.length?e.split(/\s+/g):[]}function r(e,t){var r=n(t),i=r.indexOf(e);return i!==-1&&r.splice(i,1),r.join(" ")}if(Object.defineProperties(this,{length:{get:function(){return n(e[t]).length}},item:{value:function(r){var i=n(e[t]);return 0<=r&&r=0&&o.item(t)!==this;);return t>-1}));var r={prepend:function(){var e=[].slice.call(arguments);e=n(e),this.insertBefore(e,this.firstChild)},append:function(){var e=[].slice.call(arguments);e=n(e),this.appendChild(e)}};t(e.Document||e.HTMLDocument,r),t(e.DocumentFragment,r),t(e.Element,r);var i={before:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var r=this.previousSibling;e.indexOf(r)!==-1;)r=r.previousSibling;var i=n(e);t.insertBefore(i,r?r.nextSibling:t.firstChild)}},after:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var r=this.nextSibling;e.indexOf(r)!==-1;)r=r.nextSibling;var i=n(e);t.insertBefore(i,r)}},replaceWith:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var r=this.nextSibling;e.indexOf(r)!==-1;)r=r.nextSibling;var i=n(e);this.parentNode===t?t.replaceChild(i,this):t.insertBefore(i,r)}},remove:function(){this.parentNode&&this.parentNode.removeChild(this)}};t(e.DocumentType,i),t(e.Element,i),t(e.CharacterData,i)}}(self),function(e){"window"in e&&"document"in e&&(e.XMLHttpRequest=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("This browser does not support XMLHttpRequest.")},XMLHttpRequest.UNSENT=0,XMLHttpRequest.OPENED=1,XMLHttpRequest.HEADERS_RECEIVED=2,XMLHttpRequest.LOADING=3,XMLHttpRequest.DONE=4,function(){function t(e){if(this._data=[],e)for(var t=0;t=e.length)return{done:!0,value:void 0};var r=e[n++];return{done:!1,value:"key"===t?r.name:"value"===t?r.value:[r.name,r.value]}}}function a(t,o){function a(){var e=l.href.replace(/#$|\?$|\?(?=#)/g,"");l.href!==e&&(l.href=e)}function c(){d._setList(l.search?n(l.search.substring(1)):[]),d._update_steps()}if(!(this instanceof e.URL))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator.");o&&(t=function(){if(s)return new u(t,o).href;var e;if(document.implementation&&document.implementation.createHTMLDocument?e=document.implementation.createHTMLDocument(""):document.implementation&&document.implementation.createDocument?(e=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),e.documentElement.appendChild(e.createElement("head")),e.documentElement.appendChild(e.createElement("body"))):window.ActiveXObject&&(e=new window.ActiveXObject("htmlfile"),e.write(""),e.close()),!e)throw Error("base not supported");var n=e.createElement("base");n.href=o,e.getElementsByTagName("head")[0].appendChild(n);var r=e.createElement("a");return r.href=t,r.href}());var l=r(t||""),h=function(){if(!("defineProperties"in Object))return!1;try{var e={};return Object.defineProperties(e,{prop:{get:function(){return!0}}}),e.prop}catch(t){return!1}}(),f=h?this:document.createElement("a"),d=new i(l.search?l.search.substring(1):null);return d._url_object=f,Object.defineProperties(f,{href:{get:function(){return l.href},set:function(e){l.href=e,a(),c()},enumerable:!0,configurable:!0},origin:{get:function(){return"origin"in l?l.origin:this.protocol+"//"+this.host},enumerable:!0,configurable:!0},protocol:{get:function(){return l.protocol},set:function(e){l.protocol=e},enumerable:!0,configurable:!0},username:{get:function(){return l.username},set:function(e){l.username=e},enumerable:!0,configurable:!0},password:{get:function(){return l.password},set:function(e){l.password=e},enumerable:!0,configurable:!0},host:{get:function(){var e={"http:":/:80$/,"https:":/:443$/,"ftp:":/:21$/}[l.protocol];return e?l.host.replace(e,""):l.host},set:function(e){l.host=e},enumerable:!0,configurable:!0},hostname:{get:function(){return l.hostname},set:function(e){l.hostname=e},enumerable:!0,configurable:!0},port:{get:function(){return l.port},set:function(e){l.port=e},enumerable:!0,configurable:!0},pathname:{get:function(){return"/"!==l.pathname.charAt(0)?"/"+l.pathname:l.pathname},set:function(e){l.pathname=e},enumerable:!0,configurable:!0},search:{get:function(){return l.search},set:function(e){l.search!==e&&(l.search=e,a(),c())},enumerable:!0,configurable:!0},searchParams:{get:function(){return d},enumerable:!0,configurable:!0},hash:{get:function(){return l.hash},set:function(e){l.hash=e,a()},enumerable:!0,configurable:!0},toString:{value:function(){return l.toString()},enumerable:!1,configurable:!0},valueOf:{value:function(){return l.valueOf()},enumerable:!1,configurable:!0}}),f}var s,u=e.URL;try{if(u){if(s=new e.URL("http://example.com"),"searchParams"in s)return;"href"in s||(s=void 0)}}catch(c){}if(Object.defineProperties(i.prototype,{append:{value:function(e,t){this._list.push({name:e,value:t}),this._update_steps()},writable:!0,enumerable:!0,configurable:!0},"delete":{value:function(e){for(var t=0;t1?arguments[1]:void 0;this._list.forEach(function(n,r){e.call(t,n.value,n.name)})},writable:!0,enumerable:!0,configurable:!0},toString:{value:function(){return t(this._list)},writable:!0,enumerable:!1,configurable:!0}}),"Symbol"in e&&"iterator"in e.Symbol&&(Object.defineProperty(i.prototype,e.Symbol.iterator,{value:i.prototype.entries,writable:!0,enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,e.Symbol.iterator,{value:function(){return this},writable:!0,enumerable:!0,configurable:!0})),u)for(var l in u)u.hasOwnProperty(l)&&"function"==typeof u[l]&&(a[l]=u[l]);e.URL=a,e.URLSearchParams=i}(self),function(e){function t(e){if(e=String(e),e.match(/[^\x00-\xFF]/))throw TypeError("Not a valid ByteString");return e}function n(e){return e=String(e),e.replace(/([\u0000-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF])/g,function(e){return/^[\uD800-\uDFFF]$/.test(e)?"�":e})}function r(e){return 65535&e}function i(e){return String(e).replace(/[a-z]/g,function(e){return e.toUpperCase()})}function o(e){return e=i(e),"CONNECT"===e||"TRACE"===e||"TRACK"===e}function a(e){var t=i(e);return"DELETE"===t||"GET"===t||"HEAD"===t||"OPTIONS"===t||"POST"===t||"PUT"===t?t:e}function s(e){return/^[!#$%&'*+\-.09A-Z^_`a-z|~]+$/.test(e)}function u(e){return!0}function c(e){e=String(e).toLowerCase();var t={"accept-charset":!0,"accept-encoding":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,cookie2:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,origin:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,via:!0};return t[e]||"proxy-"===e.substring(0,6)||"sec-"===e.substring(0,4)}function l(e){e=String(e).toLowerCase();var t={"set-cookie":!0,"set-cookie2":!0};return t[e]}function h(e,t){return e=String(e).toLowerCase(),"accept"===e||"accept-language"===e||"content-language"===e||"content-type"===e&&["application/x-www-form-encoded","multipart/form-data","text/plain"].indexOf(t)!==-1}function f(e){this._guard="none",this._headerList=[],e&&d(this,e)}function d(e,t){t instanceof f?t._headerList.forEach(function(t){e.append(t[0],t[1])}):Array.isArray(t)?t.forEach(function(t){if(!Array.isArray(t)||2!==t.length)throw TypeError();e.append(t[0],t[1])}):(t=Object(t),Object.keys(t).forEach(function(n){e.append(n,t[n])}))}function p(e){this._headers=e,this._index=0}function m(e){this._stream=e,this.bodyUsed=!1}function g(e,r){if(arguments.length<1)throw TypeError("Not enough arguments");if(m.call(this,null),this.method="GET",this.url="",this.headers=new f,this.headers._guard="request",this.referrer=null,this.mode=null,this.credentials="omit",e instanceof g){if(e.bodyUsed)throw TypeError();e.bodyUsed=!0,this.method=e.method,this.url=e.url,this.headers=new f(e.headers),this.headers._guard=e.headers._guard,this.credentials=e.credentials,this._stream=e._stream}else e=n(e),this.url=String(new URL(e,self.location));if(r=Object(r),"method"in r){var i=t(r.method);if(o(i))throw TypeError();this.method=a(i)}"headers"in r&&(this.headers=new f,d(this.headers,r.headers)),"body"in r&&(this._stream=r.body),"credentials"in r&&["omit","same-origin","include"].indexOf(r.credentials)!==-1&&(this.credentials=r.credentials)}function E(e,t){if(arguments.length<1&&(e=""),this.headers=new f,this.headers._guard="response",e instanceof XMLHttpRequest&&"_url"in e){var i=e;return this.type="basic",this.url=n(i._url),this.status=i.status,this.ok=200<=this.status&&this.status<=299,this.statusText=i.statusText,i.getAllResponseHeaders().split(/\r?\n/).filter(function(e){return e.length}).forEach(function(e){var t=e.indexOf(":");this.headers.append(e.substring(0,t),e.substring(t+2))},this),void m.call(this,i.responseText)}m.call(this,e),t=Object(t)||{},this.url="";var o="status"in t?r(t.status):200;if(o<200||o>599)throw RangeError();this.status=o,this.ok=200<=this.status&&this.status<=299;var a="statusText"in t?String(t.statusText):"OK";if(/[^\x00-\xFF]/.test(a))throw TypeError();this.statusText=a,"headers"in t&&d(this.headers,t),this.type="basic"}function v(e,t){return new Promise(function(n,r){var i=new g(e,t),o=new XMLHttpRequest,a=!0;o._url=i.url;try{o.open(i.method,i.url,a)}catch(s){throw TypeError(s.message)}for(var u=i.headers[Symbol.iterator](),c=u.next();!c.done;c=u.next())o.setRequestHeader(c.value[0],c.value[1]);"include"===i.credentials&&(o.withCredentials=!0),o.onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&(0===o.status?r(new TypeError("Network error")):n(new E(o)))},o.send(i._stream)})}f.prototype={append:function(e,n){if(e=t(e),!s(e)||!u(n))throw TypeError();if("immutable"===this._guard)throw TypeError();"request"===this._guard&&c(e)||("request-no-CORS"!==this._guard||h(e,n))&&("response"===this._guard&&l(e)||(e=e.toLowerCase(),this._headerList.push([e,n])))},"delete":function(e){if(e=t(e),!s(e))throw TypeError();if("immutable"===this._guard)throw TypeError();if(("request"!==this._guard||!c(e))&&("request-no-CORS"!==this._guard||h(e,"invalid"))&&("response"!==this._guard||!l(e))){e=e.toLowerCase();for(var n=0;n=this._headers._headerList.length?{value:void 0,done:!0}:{value:this._headers._headerList[this._index++],done:!1}},p.prototype[Symbol.iterator]=function(){return this},m.prototype={arrayBuffer:function(){if(this.bodyUsed)return Promise.reject(TypeError());if(this.bodyUsed=!0,this._stream instanceof ArrayBuffer)return Promise.resolve(this._stream);var e=this._stream;return new Promise(function(t,n){var r=unescape(encodeURIComponent(e)).split("").map(function(e){return e.charCodeAt(0)});t(new Uint8Array(r).buffer)})},blob:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof Blob?Promise.resolve(this._stream):Promise.resolve(new Blob([this._stream])))},formData:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof FormData?Promise.resolve(this._stream):Promise.reject(Error("Not yet implemented")))},json:function(){if(this.bodyUsed)return Promise.reject(TypeError());this.bodyUsed=!0;var e=this;return new Promise(function(t,n){t(JSON.parse(e._stream))})},text:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,Promise.resolve(String(this._stream)))}},g.prototype=m.prototype,E.prototype=m.prototype,E.redirect=function(){throw Error("Not supported")},"fetch"in e||(e.Headers=f,e.Request=g,e.Response=E,e.fetch=v)}(self); +!function(e){"window"in e&&"document"in e&&(document.head=document.head||document.getElementsByTagName("head")[0],["abbr","article","aside","audio","bdi","canvas","data","datalist","details","dialog","figcaption","figure","footer","header","hgroup","main","mark","meter","nav","output","picture","progress","section","summary","template","time","video"].forEach(function(e){document.createElement(e)}),!("dataset"in document.createElement("span"))&&"Element"in e&&Element.prototype&&Object.defineProperty&&Object.defineProperty(Element.prototype,"dataset",{get:function(){for(var e=Object.create(null),t=0;t>16&255)),i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o)),a=0,o=0),n+=1;return 12===a?(o>>=4,i.push(String.fromCharCode(255&o))):18===a&&(o>>=2,i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o))),i.join("")}function n(e){e=String(e);var t,n,i,o,a,s,u,c=0,l=[];if(/[^\x00-\xFF]/.test(e))throw Error("InvalidCharacterError");for(;c>2,a=(3&t)<<4|n>>4,s=(15&n)<<2|i>>6,u=63&i,c===e.length+2?(s=64,u=64):c===e.length+1&&(u=64),l.push(r.charAt(o),r.charAt(a),r.charAt(s),r.charAt(u));return l.join("")}if(!("atob"in e&&"btoa"in e)){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.atob=t,e.btoa=n}}(),function(){function t(e){return e.offsetWidth>0&&e.offsetHeight>0}function n(){var e=a;a=Object.create(null),u=-1,Object.keys(e).forEach(function(n){var r=e[n];r.element&&!t(r.element)||r.callback(Date.now())})}function r(t,r){var i=++s;return a[i]={callback:t,element:r},u===-1&&(u=e.setTimeout(n,1e3/o)),i}function i(t){delete a[t],0===Object.keys(a).length&&(e.clearTimeout(u),u=-1)}if(!("requestAnimationFrame"in e)){var o=60,a=Object.create(null),s=0,u=-1;e.requestAnimationFrame=r,e.cancelAnimationFrame=i}}())}(self),function(e){function t(e,t){e&&Object.keys(t).forEach(function(n){if(!(n in e||n in e.prototype))try{Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}catch(r){e[n]=t[n]}})}function n(e){var t=null;return e=e.map(function(e){return e instanceof Node?e:document.createTextNode(e)}),1===e.length?t=e[0]:(t=document.createDocumentFragment(),e.forEach(function(e){t.appendChild(e)})),t}if("window"in e&&"document"in e){document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),r=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)t=document._qsa.shift(),t.style.removeAttribute("x-qsa"),r.push(t);return document._qsa=null,r}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),document.getElementsByClassName||(document.getElementsByClassName=function(e){return e=String(e).replace(/^|\s+/g,"."),document.querySelectorAll(e)}),e.Node=e.Node||function(){throw TypeError("Illegal constructor")},Node.ELEMENT_NODE=1,Node.ATTRIBUTE_NODE=2,Node.TEXT_NODE=3,Node.CDATA_SECTION_NODE=4,Node.ENTITY_REFERENCE_NODE=5,Node.ENTITY_NODE=6,Node.PROCESSING_INSTRUCTION_NODE=7,Node.COMMENT_NODE=8,Node.DOCUMENT_NODE=9,Node.DOCUMENT_TYPE_NODE=10,Node.DOCUMENT_FRAGMENT_NODE=11,Node.NOTATION_NODE=12,e.DOMException=e.DOMException||function(){throw TypeError("Illegal constructor")},DOMException.INDEX_SIZE_ERR=1,DOMException.DOMSTRING_SIZE_ERR=2,DOMException.HIERARCHY_REQUEST_ERR=3,DOMException.WRONG_DOCUMENT_ERR=4,DOMException.INVALID_CHARACTER_ERR=5,DOMException.NO_DATA_ALLOWED_ERR=6,DOMException.NO_MODIFICATION_ALLOWED_ERR=7,DOMException.NOT_FOUND_ERR=8,DOMException.NOT_SUPPORTED_ERR=9,DOMException.INUSE_ATTRIBUTE_ERR=10,DOMException.INVALID_STATE_ERR=11,DOMException.SYNTAX_ERR=12,DOMException.INVALID_MODIFICATION_ERR=13,DOMException.NAMESPACE_ERR=14,DOMException.INVALID_ACCESS_ERR=15,function(){function t(e,t,n){if("function"==typeof t){"DOMContentLoaded"===e&&(e="load");var r=this,i=function(e){e._timeStamp=Date.now(),e._currentTarget=r,t.call(this,e),e._currentTarget=null};this["_"+e+t]=i,this.attachEvent("on"+e,i)}}function n(e,t,n){if("function"==typeof t){"DOMContentLoaded"===e&&(e="load");var r=this["_"+e+t];r&&(this.detachEvent("on"+e,r),this["_"+e+t]=null)}}"Element"in e&&!Element.prototype.addEventListener&&Object.defineProperty&&(Event.CAPTURING_PHASE=1,Event.AT_TARGET=2,Event.BUBBLING_PHASE=3,Object.defineProperties(Event.prototype,{CAPTURING_PHASE:{get:function(){return 1}},AT_TARGET:{get:function(){return 2}},BUBBLING_PHASE:{get:function(){return 3}},target:{get:function(){return this.srcElement}},currentTarget:{get:function(){return this._currentTarget}},eventPhase:{get:function(){return this.srcElement===this.currentTarget?Event.AT_TARGET:Event.BUBBLING_PHASE}},bubbles:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"resize":case"scroll":case"select":case"change":case"submit":case"reset":return!0}return!1}},cancelable:{get:function(){switch(this.type){case"click":case"dblclick":case"mousedown":case"mouseup":case"mouseover":case"mouseout":case"mousewheel":case"keydown":case"keypress":case"keyup":case"submit":return!0}return!1}},timeStamp:{get:function(){return this._timeStamp}},stopPropagation:{value:function(){this.cancelBubble=!0}},preventDefault:{value:function(){this.returnValue=!1}},defaultPrevented:{get:function(){return this.returnValue===!1}}}),[Window,HTMLDocument,Element].forEach(function(e){e.prototype.addEventListener=t,e.prototype.removeEventListener=n}))}(),function(){function t(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"CustomEvent"in e&&"function"==typeof e.CustomEvent||(t.prototype=e.Event.prototype,e.CustomEvent=t)}(),window.addEvent=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&(e["e"+t+n]=n,e[t+n]=function(){var r=window.event;r.currentTarget=e,r.preventDefault=function(){r.returnValue=!1},r.stopPropagation=function(){r.cancelBubble=!0},r.target=r.srcElement,r.timeStamp=Date.now(),e["e"+t+n].call(this,r)},e.attachEvent("on"+t,e[t+n]))},window.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&(e.detachEvent("on"+t,e[t+n]),e[t+n]=null,e["e"+t+n]=null)},function(){function t(e,t){function n(e){return e.length?e.split(/\s+/g):[]}function r(e,t){var r=n(t),i=r.indexOf(e);return i!==-1&&r.splice(i,1),r.join(" ")}if(Object.defineProperties(this,{length:{get:function(){return n(e[t]).length}},item:{value:function(r){var i=n(e[t]);return 0<=r&&r=0&&o.item(t)!==this;);return t>-1}));var r={prepend:function(){var e=[].slice.call(arguments);e=n(e),this.insertBefore(e,this.firstChild)},append:function(){var e=[].slice.call(arguments);e=n(e),this.appendChild(e)}};t(e.Document||e.HTMLDocument,r),t(e.DocumentFragment,r),t(e.Element,r);var i={before:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var r=this.previousSibling;e.indexOf(r)!==-1;)r=r.previousSibling;var i=n(e);t.insertBefore(i,r?r.nextSibling:t.firstChild)}},after:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var r=this.nextSibling;e.indexOf(r)!==-1;)r=r.nextSibling;var i=n(e);t.insertBefore(i,r)}},replaceWith:function(){var e=[].slice.call(arguments),t=this.parentNode;if(t){for(var r=this.nextSibling;e.indexOf(r)!==-1;)r=r.nextSibling;var i=n(e);this.parentNode===t?t.replaceChild(i,this):t.insertBefore(i,r)}},remove:function(){this.parentNode&&this.parentNode.removeChild(this)}};t(e.DocumentType,i),t(e.Element,i),t(e.CharacterData,i)}}(self),function(e){"window"in e&&"document"in e&&(e.XMLHttpRequest=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("This browser does not support XMLHttpRequest.")},XMLHttpRequest.UNSENT=0,XMLHttpRequest.OPENED=1,XMLHttpRequest.HEADERS_RECEIVED=2,XMLHttpRequest.LOADING=3,XMLHttpRequest.DONE=4,function(){function t(e){if(this._data=[],e)for(var t=0;t=e.length)return{done:!0,value:void 0};var r=e[n++];return{done:!1,value:"key"===t?r.name:"value"===t?r.value:[r.name,r.value]}}}function a(t,o){function a(){var e=l.href.replace(/#$|\?$|\?(?=#)/g,"");l.href!==e&&(l.href=e)}function c(){d._setList(l.search?n(l.search.substring(1)):[]),d._update_steps()}if(!(this instanceof e.URL))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator.");o&&(t=function(){if(s)return new u(t,o).href;var e;if(document.implementation&&document.implementation.createHTMLDocument?e=document.implementation.createHTMLDocument(""):document.implementation&&document.implementation.createDocument?(e=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),e.documentElement.appendChild(e.createElement("head")),e.documentElement.appendChild(e.createElement("body"))):window.ActiveXObject&&(e=new window.ActiveXObject("htmlfile"),e.write(""),e.close()),!e)throw Error("base not supported");var n=e.createElement("base");n.href=o,e.getElementsByTagName("head")[0].appendChild(n);var r=e.createElement("a");return r.href=t,r.href}());var l=r(t||""),h=function(){if(!("defineProperties"in Object))return!1;try{var e={};return Object.defineProperties(e,{prop:{get:function(){return!0}}}),e.prop}catch(t){return!1}}(),f=h?this:document.createElement("a"),d=new i(l.search?l.search.substring(1):null);return d._url_object=f,Object.defineProperties(f,{href:{get:function(){return l.href},set:function(e){l.href=e,a(),c()},enumerable:!0,configurable:!0},origin:{get:function(){return"origin"in l?l.origin:this.protocol+"//"+this.host},enumerable:!0,configurable:!0},protocol:{get:function(){return l.protocol},set:function(e){l.protocol=e},enumerable:!0,configurable:!0},username:{get:function(){return l.username},set:function(e){l.username=e},enumerable:!0,configurable:!0},password:{get:function(){return l.password},set:function(e){l.password=e},enumerable:!0,configurable:!0},host:{get:function(){var e={"http:":/:80$/,"https:":/:443$/,"ftp:":/:21$/}[l.protocol];return e?l.host.replace(e,""):l.host},set:function(e){l.host=e},enumerable:!0,configurable:!0},hostname:{get:function(){return l.hostname},set:function(e){l.hostname=e},enumerable:!0,configurable:!0},port:{get:function(){return l.port},set:function(e){l.port=e},enumerable:!0,configurable:!0},pathname:{get:function(){return"/"!==l.pathname.charAt(0)?"/"+l.pathname:l.pathname},set:function(e){l.pathname=e},enumerable:!0,configurable:!0},search:{get:function(){return l.search},set:function(e){l.search!==e&&(l.search=e,a(),c())},enumerable:!0,configurable:!0},searchParams:{get:function(){return d},enumerable:!0,configurable:!0},hash:{get:function(){return l.hash},set:function(e){l.hash=e,a()},enumerable:!0,configurable:!0},toString:{value:function(){return l.toString()},enumerable:!1,configurable:!0},valueOf:{value:function(){return l.valueOf()},enumerable:!1,configurable:!0}}),f}var s,u=e.URL;try{if(u){if(s=new e.URL("http://example.com"),"searchParams"in s)return;"href"in s||(s=void 0)}}catch(c){}if(Object.defineProperties(i.prototype,{append:{value:function(e,t){this._list.push({name:e,value:t}),this._update_steps()},writable:!0,enumerable:!0,configurable:!0},"delete":{value:function(e){for(var t=0;t1?arguments[1]:void 0;this._list.forEach(function(n,r){e.call(t,n.value,n.name)})},writable:!0,enumerable:!0,configurable:!0},toString:{value:function(){return t(this._list)},writable:!0,enumerable:!1,configurable:!0}}),"Symbol"in e&&"iterator"in e.Symbol&&(Object.defineProperty(i.prototype,e.Symbol.iterator,{value:i.prototype.entries,writable:!0,enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,e.Symbol.iterator,{value:function(){return this},writable:!0,enumerable:!0,configurable:!0})),u)for(var l in u)u.hasOwnProperty(l)&&"function"==typeof u[l]&&(a[l]=u[l]);e.URL=a,e.URLSearchParams=i}(self),function(e){function t(e){if(e=String(e),e.match(/[^\x00-\xFF]/))throw TypeError("Not a valid ByteString");return e}function n(e){return e=String(e),e.replace(/([\u0000-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF])/g,function(e){return/^[\uD800-\uDFFF]$/.test(e)?"�":e})}function r(e){return 65535&e}function i(e){return String(e).replace(/[a-z]/g,function(e){return e.toUpperCase()})}function o(e){return e=i(e),"CONNECT"===e||"TRACE"===e||"TRACK"===e}function a(e){var t=i(e);return"DELETE"===t||"GET"===t||"HEAD"===t||"OPTIONS"===t||"POST"===t||"PUT"===t?t:e}function s(e){return/^[!#$%&'*+\-.09A-Z^_`a-z|~]+$/.test(e)}function u(e){return!0}function c(e){e=String(e).toLowerCase();var t={"accept-charset":!0,"accept-encoding":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,cookie2:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,origin:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,via:!0};return t[e]||"proxy-"===e.substring(0,6)||"sec-"===e.substring(0,4)}function l(e){e=String(e).toLowerCase();var t={"set-cookie":!0,"set-cookie2":!0};return t[e]}function h(e,t){return e=String(e).toLowerCase(),"accept"===e||"accept-language"===e||"content-language"===e||"content-type"===e&&["application/x-www-form-encoded","multipart/form-data","text/plain"].indexOf(t)!==-1}function f(e){this._guard="none",this._headerList=[],e&&d(this,e)}function d(e,t){t instanceof f?t._headerList.forEach(function(t){e.append(t[0],t[1])}):Array.isArray(t)?t.forEach(function(t){if(!Array.isArray(t)||2!==t.length)throw TypeError();e.append(t[0],t[1])}):(t=Object(t),Object.keys(t).forEach(function(n){e.append(n,t[n])}))}function p(e){this._headers=e,this._index=0}function m(e){this._stream=e,this.bodyUsed=!1}function g(e,r){if(arguments.length<1)throw TypeError("Not enough arguments");if(m.call(this,null),this.method="GET",this.url="",this.headers=new f,this.headers._guard="request",this.referrer=null,this.mode=null,this.credentials="omit",e instanceof g){if(e.bodyUsed)throw TypeError();e.bodyUsed=!0,this.method=e.method,this.url=e.url,this.headers=new f(e.headers),this.headers._guard=e.headers._guard,this.credentials=e.credentials,this._stream=e._stream}else e=n(e),this.url=String(new URL(e,self.location));if(r=Object(r),"method"in r){var i=t(r.method);if(o(i))throw TypeError();this.method=a(i)}"headers"in r&&(this.headers=new f,d(this.headers,r.headers)),"body"in r&&(this._stream=r.body),"credentials"in r&&["omit","same-origin","include"].indexOf(r.credentials)!==-1&&(this.credentials=r.credentials)}function E(e,t){if(arguments.length<1&&(e=""),this.headers=new f,this.headers._guard="response",e instanceof XMLHttpRequest&&"_url"in e){var i=e;return this.type="basic",this.url=n(i._url),this.status=i.status,this.ok=200<=this.status&&this.status<=299,this.statusText=i.statusText,i.getAllResponseHeaders().split(/\r?\n/).filter(function(e){return e.length}).forEach(function(e){var t=e.indexOf(":");this.headers.append(e.substring(0,t),e.substring(t+2))},this),void m.call(this,i.responseText)}m.call(this,e),t=Object(t)||{},this.url="";var o="status"in t?r(t.status):200;if(o<200||o>599)throw RangeError();this.status=o,this.ok=200<=this.status&&this.status<=299;var a="statusText"in t?String(t.statusText):"OK";if(/[^\x00-\xFF]/.test(a))throw TypeError();this.statusText=a,"headers"in t&&d(this.headers,t),this.type="basic"}function v(e,t){return new Promise(function(n,r){var i=new g(e,t),o=new XMLHttpRequest,a=!0;o._url=i.url;try{o.open(i.method,i.url,a)}catch(s){throw TypeError(s.message)}for(var u=i.headers[Symbol.iterator](),c=u.next();!c.done;c=u.next())o.setRequestHeader(c.value[0],c.value[1]);"include"===i.credentials&&(o.withCredentials=!0),o.onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&(0===o.status?r(new TypeError("Network error")):n(new E(o)))},o.send(i._stream)})}f.prototype={append:function(e,n){if(e=t(e),!s(e)||!u(n))throw TypeError();if("immutable"===this._guard)throw TypeError();"request"===this._guard&&c(e)||("request-no-CORS"!==this._guard||h(e,n))&&("response"===this._guard&&l(e)||(e=e.toLowerCase(),this._headerList.push([e,n])))},"delete":function(e){if(e=t(e),!s(e))throw TypeError();if("immutable"===this._guard)throw TypeError();if(("request"!==this._guard||!c(e))&&("request-no-CORS"!==this._guard||h(e,"invalid"))&&("response"!==this._guard||!l(e))){e=e.toLowerCase();for(var n=0;n=this._headers._headerList.length?{value:void 0,done:!0}:{value:this._headers._headerList[this._index++],done:!1}},p.prototype[Symbol.iterator]=function(){return this},m.prototype={arrayBuffer:function(){if(this.bodyUsed)return Promise.reject(TypeError());if(this.bodyUsed=!0,this._stream instanceof ArrayBuffer)return Promise.resolve(this._stream);var e=this._stream;return new Promise(function(t,n){var r=unescape(encodeURIComponent(e)).split("").map(function(e){return e.charCodeAt(0)});t(new Uint8Array(r).buffer)})},blob:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof Blob?Promise.resolve(this._stream):Promise.resolve(new Blob([this._stream])))},formData:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,this._stream instanceof FormData?Promise.resolve(this._stream):Promise.reject(Error("Not yet implemented")))},json:function(){if(this.bodyUsed)return Promise.reject(TypeError());this.bodyUsed=!0;var e=this;return new Promise(function(t,n){t(JSON.parse(e._stream))})},text:function(){return this.bodyUsed?Promise.reject(TypeError()):(this.bodyUsed=!0,Promise.resolve(String(this._stream)))}},g.prototype=m.prototype,E.prototype=m.prototype,E.redirect=function(){throw Error("Not supported")},"fetch"in e||(e.Headers=f,e.Request=g,e.Response=E,e.fetch=v)}(self);