varr="undefined"!=typeofwindow&&"undefined"!=typeofdocument,o=["Edge","Trident","Firefox"],n=0,i=0;i<o.length;i+=1)if(r&&navigator.userAgent.indexOf(o[i])>=0){n=1;break}vara=r&&window.Promise?function(t){vare=!1;returnfunction(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){vare=!1;returnfunction(){e||(e=!0,setTimeout(function(){e=!1,t()},n))}};functionl(t){returnt&&"[object Function]"==={}.toString.call(t)}functions(t,e){if(1!==t.nodeType)return[];varr=t.ownerDocument.defaultView.getComputedStyle(t,null);returne?r[e]:r}functionc(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}functiond(t){if(!t)returndocument.body;switch(t.nodeName){case"HTML":case"BODY":returnt.ownerDocument.body;case"#document":returnt.body}vare=s(t),r=e.overflow,o=e.overflowX,n=e.overflowY;return/(auto|scroll|overlay)/.test(r+n+o)?t:d(c(t))}varu=r&&!(!window.MSInputMethodContext||!document.documentMode),p=r&&/MSIE 10/.test(navigator.userAgent);functionf(t){return11===t?u:10===t?p:u||p}functionm(t){if(!t)returndocument.documentElement;for(vare=f(10)?document.body:null,r=t.offsetParent||null;r===e&&t.nextElementSibling;)r=(t=t.nextElementSibling).offsetParent;varo=r&&r.nodeName;returno&&"BODY"!==o&&"HTML"!==o?-1!==["TH","TD","TABLE"].indexOf(r.nodeName)&&"static"===s(r,"position")?m(r):r:t?t.ownerDocument.documentElement:document.documentElement}functionh(t){returnnull!==t.parentNode?h(t.parentNode):t}functiong(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))returndocument.documentElement;varr=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,o=r?t:e,n=r?e:t,i=document.createRange();i.setStart(o,0),i.setEnd(n,0);vara,l,s=i.commonAncestorContainer;if(t!==s&&e!==s||o.contains(n))return"BODY"===(l=(a=s).nodeName)||"HTML"!==l&&m(a.firstElementChild)!==a?m(s):s;varc=h(t);returnc.host?g(c.host,e):g(t,h(e).host)}functionb(t){vare="top"===(arguments.length>1&&void0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",r=t.nodeName;if("BODY"===r||"HTML"===r){varo=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||o)[e]}returnt[e]}functionv(t,e){varr="x"===e?"Left":"Top",o="Left"===r?"Right":"Bottom";returnparseFloat(t["border"+r+"Width"],10)+parseFloat(t["border"+o+"Width"],10)}functionx(t,e,r,o){returnMath.max(e["offset"+t],e["scroll"+t],r["client"+t],r["offset"+t],r["scroll"+t],f(10)?parseInt(r["offset"+t])+parseInt(o["margin"+("Height"===t?"Top":"Left")])+parseInt(o["margin"+("Height"===t?"Bottom":"Right")]):0)}functiony(t){vare=t.body,r=t.documentElement,o=f(10)&&getComputedStyle(r);return{height:x("Height",e,r,o),width:x("Width",e,r,o)}}varw=function(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")},k=function(){functiont(t,e){for(varr=0;r<e.length;r++){varo=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,r,o){returnr&&t(e.prototype,r),o&&t(e,o),e}}(),_=function(t,e,r){returneint?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},S=Object.assign||function(t){for(vare=1;e<arguments.length;e++){varr=arguments[e];for(varoinr)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}returnt};functionC(t){returnS({},t,{right:t.left+t.width,bottom:t.top+t.height})}functionO(t){vare={};try{if(f(10)){e=t.getBoundingClientRect();varr=b(t,"top"),o=b(t,"left");e.top+=r,e.left+=o,e.bottom+=r,e.right+=o}elsee=t.getBoundingClientRect()}catch(t){}varn={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},i="HTML"===t.nodeName?y(t.ownerDocument):{},a=i.width||t.clientWidth||n.right-n.left,l=i.height||t.clientHeight||n.bottom-n.top,c=t.offsetWidth-a,d=t.offsetHeight-l;if(c||d){varu=s(t);c-=v(u,"x"),d-=v(u,"y"),n.width-=c,n.height-=d}returnC(n)}functionT(t,e){varr=arguments.length>2&&void0!==arguments[2]&&arguments[2],o=f(10),n="HTML"===e.nodeName,i=O(t),a=O(e),l=d(t),c=s(e),u=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10);r&&n&&(a.top=Math.max(a.top,0
varo=r(216),n=r(217),i=r(218);functiona(){returns.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functionl(t,e){if(a()<e)thrownewRangeError("Invalid typed array length");returns.TYPED_ARRAY_SUPPORT?(t=newUint8Array(e)).__proto__=s.prototype:(null===t&&(t=news(e)),t.length=e),t}functions(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||thisinstanceofs))returnnews(t,e,r);if("number"==typeoft){if("string"==typeofe)thrownewError("If encoding is specified then the first argument must be a string");returnu(this,t)}returnc(this,t,e,r)}functionc(t,e,r,o){if("number"==typeofe)thrownewTypeError('"value" argument must not be a number');return"undefined"!=typeofArrayBuffer&&einstanceofArrayBuffer?function(t,e,r,o){if(e.byteLength,r<0||e.byteLength<r)thrownewRangeError("'offset' is out of bounds");if(e.byteLength<r+(o||0))thrownewRangeError("'length' is out of bounds");e=void0===r&&void0===o?newUint8Array(e):void0===o?newUint8Array(e,r):newUint8Array(e,r,o);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=p(t,e);returnt}(t,e,r,o):"string"==typeofe?function(t,e,r){"string"==typeofr&&""!==r||(r="utf8");if(!s.isEncoding(r))thrownewTypeError('"encoding" must be a valid string encoding');varo=0|m(e,r),n=(t=l(t,o)).write(e,r);n!==o&&(t=t.slice(0,n));returnt}(t,e,r):function(t,e){if(s.isBuffer(e)){varr=0|f(e.length);return0===(t=l(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeofArrayBuffer&&e.bufferinstanceofArrayBuffer||"length"ine)return"number"!=typeofe.length||(o=e.length)!=o?l(t,0):p(t,e);if("Buffer"===e.type&&i(e.data))returnp(t,e.data)}varo;thrownewTypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}functiond(t){if("number"!=typeoft)thrownewTypeError('"size" argument must be a number');if(t<0)thrownewRangeError('"size" argument must not be negative')}functionu(t,e){if(d(e),t=l(t,e<0?0:0|f(e)),!s.TYPED_ARRAY_SUPPORT)for(varr=0;r<e;++r)t[r]=0;returnt}functionp(t,e){varr=e.length<0?0:0|f(e.length);t=l(t,r);for(varo=0;o<r;o+=1)t[o]=255&e[o];returnt}functionf(t){if(t>=a())thrownewRangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return0|t}functionm(t,e){if(s.isBuffer(t))returnt.length;if("undefined"!=typeofArrayBuffer&&"function"==typeofArrayBuffer.isView&&(ArrayBuffer.isView(t)||tinstanceofArrayBuffer))returnt.byteLength;"string"!=typeoft&&(t=""+t);varr=t.length;if(0===r)return0;for(varo=!1;;)switch(e){case"ascii":case"latin1":case"binary":returnr;case"utf8":case"utf-8":casevoid0:returnR(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return2*r;case"hex":returnr>>>1;case"base64":returnq(t).length;default:if(o)returnR(t).length;e=(""+e).toLowerCase(),o=!0}}functionh(t,e,r){varo=!1;if((void0===e||e<0)&&(e=0),e>this.length)return"";if((void0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":returnE(this,e,r);case"utf8":case"utf-8":returnO(this,e,r);case"ascii":returnB(this,e,r);case"latin1":case"binary":returnA(this,e,r);case"base64":returnC(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnP(this,e,r);default:if(o)thrownewTypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}functiong(t,e,r){varo=t[e];t[e]=t[r],t[r]=o}functionb(t,e,r,o,n){if(0===t.length)return-1;if("string"==typeofr?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}elseif(r<0){if(!n)return-1;r=0}if("string"==typeofe&&(e=s.from(e,o)),s.isBuffer(e))return0===e.length?-1:v(t,e,r,o,n);if("number"==typeofe)returne&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeofUint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,o,n);thrownewTypeError("val must be string, number or Buffer")}functionv(t,e,r,o,n){vari,a=1,l=t.length,s=e.length;if(void0!==o&&("ucs2"===(o=String(o).toLowerCase())