@turf/turf
Version:
a JavaScript library for performing geospatial operations with GeoJSON
1 lines • 634 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).turf={})}(this,(function(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=u(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function h(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function g(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})})),n}var y,v,d=Object.prototype.toString,m=function(t){var n=d.call(t),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==t&&"object"===e(t)&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===d.call(t.callee)),r};var _=Array.prototype.slice,b=m,x=Object.keys,E=x?function(t){return x(t)}:function(){if(v)return y;var t;if(v=1,!Object.keys){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=m,o=Object.prototype.propertyIsEnumerable,a=!o.call({toString:null},"toString"),s=o.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!c["$"+t]&&n.call(window,t)&&null!==window[t]&&"object"===e(window[t]))try{l(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();t=function(t){var o=null!==t&&"object"===e(t),c="[object Function]"===r.call(t),f=i(t),p=o&&"[object String]"===r.call(t),g=[];if(!o&&!c&&!f)throw new TypeError("Object.keys called on a non-object");var y=s&&c;if(p&&t.length>0&&!n.call(t,0))for(var v=0;v<t.length;++v)g.push(String(v));if(f&&t.length>0)for(var d=0;d<t.length;++d)g.push(String(d));else for(var m in t)y&&"prototype"===m||!n.call(t,m)||g.push(String(m));if(a)for(var _=function(t){if("undefined"==typeof window||!h)return l(t);try{return l(t)}catch(t){return!1}}(t),b=0;b<u.length;++b)_&&"constructor"===u[b]||!n.call(t,u[b])||g.push(u[b]);return g}}return y=t}(),w=Object.keys;E.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return b(t)?w(_.call(t)):w(t)})}else Object.keys=E;return Object.keys||E};var k,S=E,I=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===e(Symbol.iterator))return!0;var t={},n=Symbol("test"),r=Object(n);if("string"==typeof n)return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(n in t[n]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[0]!==n)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,n);if(42!==o.value||!0!==o.enumerable)return!1}return!0},P="undefined"!=typeof Symbol&&Symbol,N=I,M=function(){return"function"==typeof P&&("function"==typeof Symbol&&("symbol"===e(P("foo"))&&("symbol"===e(Symbol("bar"))&&N())))},O={foo:{}},L=Object,R=Object.prototype.toString,C=Math.max,T=function(t,e){for(var n=[],r=0;r<t.length;r+=1)n[r]=t[r];for(var i=0;i<e.length;i+=1)n[i+t.length]=e[i];return n},A=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==R.apply(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,r=function(t,e){for(var n=[],r=e||0,i=0;r<t.length;r+=1,i+=1)n[i]=t[r];return n}(arguments,1),i=C(0,e.length-r.length),o=[],a=0;a<i;a++)o[a]="$"+a;if(n=Function("binder","return function ("+function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n}(o,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var i=e.apply(this,T(r,arguments));return Object(i)===i?i:this}return e.apply(t,T(r,arguments))})),e.prototype){var s=function(){};s.prototype=e.prototype,n.prototype=new s,s.prototype=null}return n},D=Function.prototype.bind||A,j=Function.prototype.call,F=Object.prototype.hasOwnProperty,B=D.call(j,F),q=SyntaxError,V=Function,G=TypeError,Y=function(t){try{return V('"use strict"; return ('+t+").constructor;")()}catch(t){}},z=Object.getOwnPropertyDescriptor;if(z)try{z({},"")}catch(t){z=null}var U=function(){throw new G},X=z?function(){try{return U}catch(t){try{return z(arguments,"callee").get}catch(t){return U}}}():U,W=M(),H={__proto__:O}.foo===O.foo&&!({__proto__:null}instanceof L),Z=Object.getPrototypeOf||(H?function(t){return t.__proto__}:null),J={},$="undefined"!=typeof Uint8Array&&Z?Z(Uint8Array):k,Q={"%AggregateError%":"undefined"==typeof AggregateError?k:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?k:ArrayBuffer,"%ArrayIteratorPrototype%":W&&Z?Z([][Symbol.iterator]()):k,"%AsyncFromSyncIteratorPrototype%":k,"%AsyncFunction%":J,"%AsyncGenerator%":J,"%AsyncGeneratorFunction%":J,"%AsyncIteratorPrototype%":J,"%Atomics%":"undefined"==typeof Atomics?k:Atomics,"%BigInt%":"undefined"==typeof BigInt?k:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?k:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?k:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?k:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?k:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?k:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?k:FinalizationRegistry,"%Function%":V,"%GeneratorFunction%":J,"%Int8Array%":"undefined"==typeof Int8Array?k:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?k:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?k:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":W&&Z?Z(Z([][Symbol.iterator]())):k,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":e(JSON))?JSON:k,"%Map%":"undefined"==typeof Map?k:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&W&&Z?Z((new Map)[Symbol.iterator]()):k,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?k:Promise,"%Proxy%":"undefined"==typeof Proxy?k:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?k:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?k:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&W&&Z?Z((new Set)[Symbol.iterator]()):k,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?k:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":W&&Z?Z(""[Symbol.iterator]()):k,"%Symbol%":W?Symbol:k,"%SyntaxError%":q,"%ThrowTypeError%":X,"%TypedArray%":$,"%TypeError%":G,"%Uint8Array%":"undefined"==typeof Uint8Array?k:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?k:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?k:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?k:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?k:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?k:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?k:WeakSet};if(Z)try{null.error}catch(t){var K=Z(Z(t));Q["%Error.prototype%"]=K}var tt=function t(e){var n;if("%AsyncFunction%"===e)n=Y("async function () {}");else if("%GeneratorFunction%"===e)n=Y("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=Y("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&Z&&(n=Z(i.prototype))}return Q[e]=n,n},et={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},nt=D,rt=B,it=nt.call(Function.call,Array.prototype.concat),ot=nt.call(Function.apply,Array.prototype.splice),at=nt.call(Function.call,String.prototype.replace),st=nt.call(Function.call,String.prototype.slice),ut=nt.call(Function.call,RegExp.prototype.exec),lt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ct=/\\(\\)?/g,ht=function(t,e){var n,r=t;if(rt(et,r)&&(r="%"+(n=et[r])[0]+"%"),rt(Q,r)){var i=Q[r];if(i===J&&(i=tt(r)),void 0===i&&!e)throw new G("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new q("intrinsic "+t+" does not exist!")},ft=function(t,e){if("string"!=typeof t||0===t.length)throw new G("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new G('"allowMissing" argument must be a boolean');if(null===ut(/^%?[^%]*%?$/,t))throw new q("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=st(t,0,1),n=st(t,-1);if("%"===e&&"%"!==n)throw new q("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new q("invalid intrinsic syntax, expected opening `%`");var r=[];return at(t,lt,(function(t,e,n,i){r[r.length]=n?at(i,ct,"$1"):e||t})),r}(t),r=n.length>0?n[0]:"",i=ht("%"+r+"%",e),o=i.name,a=i.value,s=!1,u=i.alias;u&&(r=u[0],ot(n,it([0,1],u)));for(var l=1,c=!0;l<n.length;l+=1){var h=n[l],f=st(h,0,1),p=st(h,-1);if(('"'===f||"'"===f||"`"===f||'"'===p||"'"===p||"`"===p)&&f!==p)throw new q("property names with quotes must have matching quotes");if("constructor"!==h&&c||(s=!0),rt(Q,o="%"+(r+="."+h)+"%"))a=Q[o];else if(null!=a){if(!(h in a)){if(!e)throw new G("base intrinsic for "+t+" exists, but the property is not available.");return}if(z&&l+1>=n.length){var g=z(a,h);a=(c=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[h]}else c=rt(a,h),a=a[h];c&&!s&&(Q[o]=a)}}return a},pt=ft("%Object.defineProperty%",!0),gt=function(){if(pt)try{return pt({},"a",{value:1}),!0}catch(t){return!1}return!1};gt.hasArrayLengthDefineBug=function(){if(!gt())return null;try{return 1!==pt([],"length",{value:1}).length}catch(t){return!0}};var yt=gt,vt=ft("%Object.getOwnPropertyDescriptor%",!0);if(vt)try{vt([],"length")}catch(t){vt=null}var dt=vt,mt=yt(),_t=ft,bt=mt&&_t("%Object.defineProperty%",!0);if(bt)try{bt({},"a",{value:1})}catch(t){bt=!1}var xt=_t("%SyntaxError%"),Et=_t("%TypeError%"),wt=dt,kt=function(t,n,r){if(!t||"object"!==e(t)&&"function"!=typeof t)throw new Et("`obj` must be an object or a function`");if("string"!=typeof n&&"symbol"!==e(n))throw new Et("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new Et("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new Et("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new Et("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new Et("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,s=arguments.length>6&&arguments[6],u=!!wt&&wt(t,n);if(bt)bt(t,n,{configurable:null===a&&u?u.configurable:!a,enumerable:null===i&&u?u.enumerable:!i,value:r,writable:null===o&&u?u.writable:!o});else{if(!s&&(i||o||a))throw new xt("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[n]=r}},St=S,It="function"==typeof Symbol&&"symbol"===e(Symbol("foo")),Pt=Object.prototype.toString,Nt=Array.prototype.concat,Mt=kt,Ot=yt(),Lt=function(t,e,n,r){if(e in t)if(!0===r){if(t[e]===n)return}else if("function"!=typeof(i=r)||"[object Function]"!==Pt.call(i)||!r())return;var i;Ot?Mt(t,e,n,!0):Mt(t,e,n)},Rt=function(t,e){var n=arguments.length>2?arguments[2]:{},r=St(e);It&&(r=Nt.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i<r.length;i+=1)Lt(t,r[i],e[r[i]],n[r[i]])};Rt.supportsDescriptors=!!Ot;var Ct=Rt,Tt={exports:{}},At=ft,Dt=kt,jt=yt(),Ft=dt,Bt=At("%TypeError%"),qt=At("%Math.floor%"),Vt=function(t,e){if("function"!=typeof t)throw new Bt("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||qt(e)!==e)throw new Bt("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,i=!0;if("length"in t&&Ft){var o=Ft(t,"length");o&&!o.configurable&&(r=!1),o&&!o.writable&&(i=!1)}return(r||i||!n)&&(jt?Dt(t,"length",e,!0,!0):Dt(t,"length",e)),t};!function(t){var e=D,n=ft,r=Vt,i=n("%TypeError%"),o=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||e.call(a,o),u=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch(t){u=null}t.exports=function(t){if("function"!=typeof t)throw new i("a function is required");var n=s(e,a,arguments);return r(n,1+l(0,t.length-(arguments.length-1)),!0)};var c=function(){return s(e,o,arguments)};u?u(t.exports,"apply",{value:c}):t.exports.apply=c}(Tt);var Gt=Tt.exports,Yt=ft,zt=Gt,Ut=zt(Yt("String.prototype.indexOf")),Xt=function(t,e){var n=Yt(t,!!e);return"function"==typeof n&&Ut(t,".prototype.")>-1?zt(n):n},Wt=S,Ht=I(),Zt=Xt,Jt=Object,$t=Zt("Array.prototype.push"),Qt=Zt("Object.prototype.propertyIsEnumerable"),Kt=Ht?Object.getOwnPropertySymbols:null,te=function(t,e){if(null==t)throw new TypeError("target must be an object");var n=Jt(t);if(1===arguments.length)return n;for(var r=1;r<arguments.length;++r){var i=Jt(arguments[r]),o=Wt(i),a=Ht&&(Object.getOwnPropertySymbols||Kt);if(a)for(var s=a(i),u=0;u<s.length;++u){var l=s[u];Qt(i,l)&&$t(o,l)}for(var c=0;c<o.length;++c){var h=o[c];if(Qt(i,h)){var f=i[h];n[h]=f}}}return n},ee=te,ne=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),n={},r=0;r<e.length;++r)n[e[r]]=e[r];var i=Object.assign({},n),o="";for(var a in i)o+=a;return t!==o}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}return!1}()?ee:Object.assign:ee},re=Ct,ie=ne,oe=Ct,ae=te,se=ne,ue=function(){var t=ie();return re(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},le=Gt.apply(se()),ce=function(t,e){return le(Object,arguments)};oe(ce,{getPolyfill:se,implementation:ae,shim:ue});var he=ce,fe=function(){return"string"==typeof function(){}.name},pe=Object.getOwnPropertyDescriptor;if(pe)try{pe([],"length")}catch(t){pe=null}fe.functionsHaveConfigurableNames=function(){if(!fe()||!pe)return!1;var t=pe((function(){}),"name");return!!t&&!!t.configurable};var ge=Function.prototype.bind;fe.boundFunctionsHaveNames=function(){return fe()&&"function"==typeof ge&&""!==function(){}.bind().name};var ye=fe,ve=kt,de=yt(),me=ye.functionsHaveConfigurableNames(),_e=TypeError,be=function(t,e){if("function"!=typeof t)throw new _e("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!me||(de?ve(t,"name",e,!0,!0):ve(t,"name",e)),t},xe=Object,Ee=TypeError,we=be((function(){if(null!=this&&this!==xe(this))throw new Ee("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0),ke=we,Se=Ct.supportsDescriptors,Ie=Object.getOwnPropertyDescriptor,Pe=function(){if(Se&&"gim"===/a/gim.flags){var t=Ie(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(n,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return ke},Ne=Ct.supportsDescriptors,Me=Pe,Oe=Object.getOwnPropertyDescriptor,Le=Object.defineProperty,Re=TypeError,Ce=Object.getPrototypeOf,Te=/a/,Ae=Ct,De=we,je=Pe,Fe=function(){if(!Ne||!Ce)throw new Re("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=Me(),e=Ce(Te),n=Oe(e,"flags");return n&&n.get===t||Le(e,"flags",{configurable:!0,enumerable:!1,get:t}),t},Be=Gt(je());Ae(Be,{getPolyfill:je,implementation:De,shim:Fe});var qe=Be,Ve=Symbol.iterator,Ge="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Ye=[],ze=[],Ue="undefined"!=typeof Uint8Array?Uint8Array:Array,Xe=!1;function We(){Xe=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)Ye[e]=t[e],ze[t.charCodeAt(e)]=e;ze["-".charCodeAt(0)]=62,ze["_".charCodeAt(0)]=63}function He(t,e,n){for(var r,i,o=[],a=e;a<n;a+=3)r=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(Ye[(i=r)>>18&63]+Ye[i>>12&63]+Ye[i>>6&63]+Ye[63&i]);return o.join("")}function Ze(t){var e;Xe||We();for(var n=t.length,r=n%3,i="",o=[],a=16383,s=0,u=n-r;s<u;s+=a)o.push(He(t,s,s+a>u?u:s+a));return 1===r?(e=t[n-1],i+=Ye[e>>2],i+=Ye[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=Ye[e>>10],i+=Ye[e>>4&63],i+=Ye[e<<2&63],i+="="),o.push(i),o.join("")}function Je(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)}function $e(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,h=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,g=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=g,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=g,a/=256,l-=8);t[n+p-g]|=128*y}var Qe={}.toString,Ke=Array.isArray||function(t){return"[object Array]"==Qe.call(t)};function tn(){return nn.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function en(t,e){if(tn()<e)throw new RangeError("Invalid typed array length");return nn.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=nn.prototype:(null===t&&(t=new nn(e)),t.length=e),t}function nn(t,e,n){if(!(nn.TYPED_ARRAY_SUPPORT||this instanceof nn))return new nn(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return an(this,t)}return rn(this,t,e,n)}function rn(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);nn.TYPED_ARRAY_SUPPORT?(t=e).__proto__=nn.prototype:t=sn(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!nn.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|cn(e,n);t=en(t,r);var i=t.write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(ln(e)){var n=0|un(e.length);return 0===(t=en(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?en(t,0):sn(t,e);if("Buffer"===e.type&&Ke(e.data))return sn(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function on(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function an(t,e){if(on(e),t=en(t,e<0?0:0|un(e)),!nn.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function sn(t,e){var n=e.length<0?0:0|un(e.length);t=en(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function un(t){if(t>=tn())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+tn().toString(16)+" bytes");return 0|t}function ln(t){return!(null==t||!t._isBuffer)}function cn(t,e){if(ln(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return jn(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Fn(t).length;default:if(r)return jn(t).length;e=(""+e).toLowerCase(),r=!0}}function hn(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return In(this,e,n);case"utf8":case"utf-8":return En(this,e,n);case"ascii":return kn(this,e,n);case"latin1":case"binary":return Sn(this,e,n);case"base64":return xn(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pn(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function fn(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function pn(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=nn.from(e,r)),ln(e))return 0===e.length?-1:gn(t,e,n,r,i);if("number"==typeof e)return e&=255,nn.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):gn(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function gn(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(l(t,o+f)!==l(e,f)){h=!1;break}if(h)return o}return-1}function yn(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function vn(t,e,n,r){return Bn(jn(e,t.length-n),t,n,r)}function dn(t,e,n,r){return Bn(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function mn(t,e,n,r){return dn(t,e,n,r)}function _n(t,e,n,r){return Bn(Fn(e),t,n,r)}function bn(t,e,n,r){return Bn(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function xn(t,e,n){return 0===e&&n===t.length?Ze(t):Ze(t.slice(e,n))}function En(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,u,l=t[i],c=null,h=l>239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(t){var e=t.length;if(e<=wn)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=wn));return n}(r)}nn.TYPED_ARRAY_SUPPORT=void 0===Ge.TYPED_ARRAY_SUPPORT||Ge.TYPED_ARRAY_SUPPORT,tn(),nn.poolSize=8192,nn._augment=function(t){return t.__proto__=nn.prototype,t},nn.from=function(t,e,n){return rn(null,t,e,n)},nn.TYPED_ARRAY_SUPPORT&&(nn.prototype.__proto__=Uint8Array.prototype,nn.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&nn[Symbol.species]),nn.alloc=function(t,e,n){return function(t,e,n,r){return on(e),e<=0?en(t,e):void 0!==n?"string"==typeof r?en(t,e).fill(n,r):en(t,e).fill(n):en(t,e)}(null,t,e,n)},nn.allocUnsafe=function(t){return an(null,t)},nn.allocUnsafeSlow=function(t){return an(null,t)},nn.isBuffer=function(t){return null!=t&&(!!t._isBuffer||qn(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&qn(t.slice(0,0))}(t))},nn.compare=function(t,e){if(!ln(t)||!ln(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},nn.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},nn.concat=function(t,e){if(!Ke(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return nn.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=nn.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(!ln(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},nn.byteLength=cn,nn.prototype._isBuffer=!0,nn.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)fn(this,e,e+1);return this},nn.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)fn(this,e,e+3),fn(this,e+1,e+2);return this},nn.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)fn(this,e,e+7),fn(this,e+1,e+6),fn(this,e+2,e+5),fn(this,e+3,e+4);return this},nn.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?En(this,0,t):hn.apply(this,arguments)},nn.prototype.equals=function(t){if(!ln(t))throw new TypeError("Argument must be a Buffer");return this===t||0===nn.compare(this,t)},nn.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},nn.prototype.compare=function(t,e,n,r,i){if(!ln(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(r,i),l=t.slice(e,n),c=0;c<s;++c)if(u[c]!==l[c]){o=u[c],a=l[c];break}return o<a?-1:a<o?1:0},nn.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},nn.prototype.indexOf=function(t,e,n){return pn(this,t,e,n,!0)},nn.prototype.lastIndexOf=function(t,e,n){return pn(this,t,e,n,!1)},nn.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return yn(this,t,e,n);case"utf8":case"utf-8":return vn(this,t,e,n);case"ascii":return dn(this,t,e,n);case"latin1":case"binary":return mn(this,t,e,n);case"base64":return _n(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bn(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},nn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var wn=4096;function kn(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function Sn(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function In(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=Dn(t[o]);return i}function Pn(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function Nn(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function Mn(t,e,n,r,i,o){if(!ln(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function On(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function Ln(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function Rn(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Cn(t,e,n,r,i){return i||Rn(t,0,n,4),$e(t,e,n,r,23,4),n+4}function Tn(t,e,n,r,i){return i||Rn(t,0,n,8),$e(t,e,n,r,52,8),n+8}nn.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),nn.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=nn.prototype;else{var i=e-t;n=new nn(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},nn.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||Nn(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},nn.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||Nn(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},nn.prototype.readUInt8=function(t,e){return e||Nn(t,1,this.length),this[t]},nn.prototype.readUInt16LE=function(t,e){return e||Nn(t,2,this.length),this[t]|this[t+1]<<8},nn.prototype.readUInt16BE=function(t,e){return e||Nn(t,2,this.length),this[t]<<8|this[t+1]},nn.prototype.readUInt32LE=function(t,e){return e||Nn(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},nn.prototype.readUInt32BE=function(t,e){return e||Nn(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},nn.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||Nn(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},nn.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||Nn(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},nn.prototype.readInt8=function(t,e){return e||Nn(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},nn.prototype.readInt16LE=function(t,e){e||Nn(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},nn.prototype.readInt16BE=function(t,e){e||Nn(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},nn.prototype.readInt32LE=function(t,e){return e||Nn(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},nn.prototype.readInt32BE=function(t,e){return e||Nn(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},nn.prototype.readFloatLE=function(t,e){return e||Nn(t,4,this.length),Je(this,t,!0,23,4)},nn.prototype.readFloatBE=function(t,e){return e||Nn(t,4,this.length),Je(this,t,!1,23,4)},nn.prototype.readDoubleLE=function(t,e){return e||Nn(t,8,this.length),Je(this,t,!0,52,8)},nn.prototype.readDoubleBE=function(t,e){return e||Nn(t,8,this.length),Je(this,t,!1,52,8)},nn.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||Mn(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},nn.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||Mn(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},nn.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,1,255,0),nn.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},nn.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,2,65535,0),nn.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):On(this,t,e,!0),e+2},nn.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,2,65535,0),nn.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):On(this,t,e,!1),e+2},nn.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,4,4294967295,0),nn.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):Ln(this,t,e,!0),e+4},nn.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,4,4294967295,0),nn.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Ln(this,t,e,!1),e+4},nn.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);Mn(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},nn.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);Mn(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},nn.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,1,127,-128),nn.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},nn.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,2,32767,-32768),nn.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):On(this,t,e,!0),e+2},nn.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,2,32767,-32768),nn.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):On(this,t,e,!1),e+2},nn.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,4,2147483647,-2147483648),nn.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Ln(this,t,e,!0),e+4},nn.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||Mn(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),nn.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Ln(this,t,e,!1),e+4},nn.prototype.writeFloatLE=function(t,e,n){return Cn(this,t,e,!0,n)},nn.prototype.writeFloatBE=function(t,e,n){return Cn(this,t,e,!1,n)},nn.prototype.writeDoubleLE=function(t,e,n){return Tn(this,t,e,!0,n)},nn.prototype.writeDoubleBE=function(t,e,n){return Tn(this,t,e,!1,n)},nn.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!nn.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},nn.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!nn.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=ln(t)?t:jn(new nn(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var An=/[^+\/0-9A-Za-z-_]/g;function Dn(t){return t<16?"0"+t.toString(16):t.toString(16)}function jn(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Fn(t){return function(t){var e,n,r,i,o,a;Xe||We();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[s-2]?2:"="===t[s-1]?1:0,a=new Ue(3*s/4-o),r=o>0?s-4:s;var u=0;for(e=0,n=0;e<r;e+=4,n+=3)i=ze[t.charCodeAt(e)]<<18|ze[t.charCodeAt(e+1)]<<12|ze[t.charCodeAt(e+2)]<<6|ze[t.charCodeAt(e+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=ze[t.charCodeAt(e)]<<2|ze[t.charCodeAt(e+1)]>>4,a[u++]=255&i):1===o&&(i=ze[t.charCodeAt(e)]<<10|ze[t.charCodeAt(e+1)]<<4|ze[t.charCodeAt(e+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(An,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Bn(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function qn(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function Vn(){throw new Error("setTimeout has not been defined")}function Gn(){throw new Error("clearTimeout has not been defined")}var Yn=Vn,zn=Gn;function Un(t){if(Yn===setTimeout)return setTimeout(t,0);if((Yn===Vn||!Yn)&&setTimeout)return Yn=setTimeout,setTimeout(t,0);try{return Yn(t,0)}catch(e){try{return Yn.call(null,t,0)}catch(e){return Yn.call(this,t,0)}}}"function"==typeof Ge.setTimeout&&(Yn=setTimeout),"function"==typeof Ge.clearTimeout&&(zn=clearTimeout);var Xn,Wn=[],Hn=!1,Zn=-1;function Jn(){Hn&&Xn&&(Hn=!1,Xn.length?Wn=Xn.concat(Wn):Zn=-1,Wn.length&&$n())}function $n(){if(!Hn){var t=Un(Jn);Hn=!0;for(var e=Wn.length;e;){for(Xn=Wn,Wn=[];++Zn<e;)Xn&&Xn[Zn].run();Zn=-1,e=Wn.length}Xn=null,Hn=!1,function(t){if(zn===clearTimeout)return clearTimeout(t);if((zn===Gn||!zn)&&clearTimeout)return zn=clearTimeout,clearTimeout(t);try{return zn(t)}catch(e){try{return zn.call(null,t)}catch(e){return zn.call(this,t)}}}(t)}}function Qn(t,e){this.fun=t,this.array=e}Qn.prototype.run=function(){this.fun.apply(null,this.array)};function Kn(){}var tr=Kn,er=Kn,nr=Kn,rr=Kn,ir=Kn,or=Kn,ar=Kn;var sr=Ge.performance||{},ur=sr.now||sr.mozNow||sr.msNow||sr.oNow||sr.webkitNow||function(){return(new Date).getTime()};var lr=new Date;var cr={nextTick:function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Wn.push(new Qn(t,e)),1!==Wn.length||Hn||Un($n)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:tr,addListener:er,once:nr,off:rr,removeListener:ir,removeAllListeners:or,emit:ar,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*ur.call(sr),n=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(n-=t[0],(r-=t[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-lr)/1e3}},hr="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},fr=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},pr=/%[sdj%]/g;function gr(t){if(!Or(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(_r(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(t).replace(pr,(function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),a=r[n];n<i;a=r[++n])Pr(a)||!Tr(a)?o+=" "+a:o+=" "+_r(a);return o}function yr(t,e){if(Rr(Ge.process))return function(){return yr(t,e).apply(this,arguments)};if(!0===cr.noDeprecation)return t;var n=!1;return function(){if(!n){if(cr.throwDeprecation)throw new Error(e);cr.traceDeprecation?console.trace(e):console.error(e),n=!0}return t.apply(this,arguments)}}var vr,dr={};function mr(t){if(Rr(vr)&&(vr=cr.env.NODE_DEBUG||""),t=t.toUpperCase(),!dr[t])if(new RegExp("\\b"+t+"\\b","i").test(vr)){dr[t]=function(){var e=gr.apply(null,arguments);console.error("%s %d: %s",t,0,e)}}else dr[t]=function(){};return dr[t]}function _r(t,e){var n={seen:[],stylize:xr};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Ir(e)?n.showHidden=e:e&&zr(n,e),Rr(n.showHidden)&&(n.showHidden=!1),Rr(n.depth)&&(n.depth=2),Rr(n.colors)&&(n.colors=!1),Rr(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=br),Er(n,t,n.depth)}function br(t,e){var n=_r.styles[e];return n?"["+_r.colors[n][0]+"m"+t+"["+_r.colors[n][1]+"m":t}function xr(t,e){return t}function Er(t,e,n){if(t.customInspect&&e&&jr(e.inspect)&&e.inspect!==_r&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(n,t);return Or(r)||(r=Er(t,r,n)),r}var i=function(t,e){if(Rr(e))return t.stylize("undefined","undefined");if(Or(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(Mr(e))return t.stylize(""+e,"number");if(Ir(e))return t.stylize(""+e,"boolean");if(Pr(e))return t.stylize("null","null")}(t,e);if(i)return i;var o=Object.keys(e),a=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),Dr(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return wr(e);if(0===o.length){if(jr(e)){var s=e.name?": "+e.name:"";return t.stylize("[Function"+s+"]","special")}if(Cr(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Ar(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Dr(e))return wr(e)}var u,l="",c=!1,h=["{","}"];(Sr(e)&&(c=!0,h=["[","]"]),jr(e))&&(l=" [Function"+(e.name?": "+e.name:"")+"]");return Cr(e)&&(l=" "+RegExp.prototype.toString.call(e)),Ar(e)&&(l=" "+Date.prototype.toUTCString.call(e)),Dr(e)&&(l=" "+wr(e)),0!==o.length||c&&0!=e.length?n<0?Cr(e)?t.stylize(RegExp