@byteplus/rtc 4.66.20 → 4.66.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Copyright (c) 2025 The BytePlusRTC project authors. All Rights Reserved.
3
3
  * @brief BytePlusRTC Advance API
4
- * version: 4.66.20
4
+ * version: 4.66.21
5
5
  */
6
6
  var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var check=function(e){return e&&e.Math===Math&&e},globalThis_1=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),fails$x=function(e){try{return!!e()}catch(e){return!0}},fails$w=fails$x,functionBindNative=!fails$w((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),NATIVE_BIND$4=functionBindNative,FunctionPrototype$4=Function.prototype,apply$7=FunctionPrototype$4.apply,call$o=FunctionPrototype$4.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$4?call$o.bind(apply$7):function(){return call$o.apply(apply$7,arguments)}),NATIVE_BIND$3=functionBindNative,FunctionPrototype$3=Function.prototype,call$n=FunctionPrototype$3.call,uncurryThisWithBind=NATIVE_BIND$3&&FunctionPrototype$3.bind.bind(call$n,call$n),functionUncurryThis=NATIVE_BIND$3?uncurryThisWithBind:function(e){return function(){return call$n.apply(e,arguments)}},uncurryThis$x=functionUncurryThis,toString$f=uncurryThis$x({}.toString),stringSlice$2=uncurryThis$x("".slice),classofRaw$2=function(e){return stringSlice$2(toString$f(e),8,-1)},classofRaw$1=classofRaw$2,uncurryThis$w=functionUncurryThis,functionUncurryThisClause=function(e){if("Function"===classofRaw$1(e))return uncurryThis$w(e)},documentAll="object"==typeof document&&document.all,isCallable$n=void 0===documentAll&&void 0!==documentAll?function(e){return"function"==typeof e||e===documentAll}:function(e){return"function"==typeof e},objectGetOwnPropertyDescriptor={},fails$v=fails$x,descriptors=!fails$v((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),NATIVE_BIND$2=functionBindNative,call$m=Function.prototype.call,functionCall=NATIVE_BIND$2?call$m.bind(call$m):function(){return call$m.apply(call$m,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable$1={}.propertyIsEnumerable,getOwnPropertyDescriptor$a=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$a&&!$propertyIsEnumerable$1.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor$a(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable$1;var match,version,createPropertyDescriptor$7=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},uncurryThis$v=functionUncurryThis,fails$u=fails$x,classof$f=classofRaw$2,$Object$4=Object,split=uncurryThis$v("".split),indexedObject=fails$u((function(){return!$Object$4("z").propertyIsEnumerable(0)}))?function(e){return"String"===classof$f(e)?split(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$6=function(e){return null==e},isNullOrUndefined$5=isNullOrUndefined$6,$TypeError$l=TypeError,requireObjectCoercible$9=function(e){if(isNullOrUndefined$5(e))throw new $TypeError$l("Can't call method on "+e);return e},IndexedObject$3=indexedObject,requireObjectCoercible$8=requireObjectCoercible$9,toIndexedObject$a=function(e){return IndexedObject$3(requireObjectCoercible$8(e))},isCallable$m=isCallable$n,isObject$k=function(e){return"object"==typeof e?null!==e:isCallable$m(e)},path$q={},path$p=path$q,globalThis$s=globalThis_1,isCallable$l=isCallable$n,aFunction=function(e){return isCallable$l(e)?e:void 0},getBuiltIn$g=function(e,t){return arguments.length<2?aFunction(path$p[e])||aFunction(globalThis$s[e]):path$p[e]&&path$p[e][t]||globalThis$s[e]&&globalThis$s[e][t]},uncurryThis$u=functionUncurryThis,objectIsPrototypeOf=uncurryThis$u({}.isPrototypeOf),globalThis$r=globalThis_1,navigator$1=globalThis$r.navigator,userAgent$6=navigator$1&&navigator$1.userAgent,environmentUserAgent=userAgent$6?String(userAgent$6):"",globalThis$q=globalThis_1,userAgent$5=environmentUserAgent,process$3=globalThis$q.process,Deno$1=globalThis$q.Deno,versions=process$3&&process$3.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8;v8&&(version=(match=v8.split("."))[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version&&userAgent$5&&(!(match=userAgent$5.match(/Edge\/(\d+)/))||match[1]>=74)&&(match=userAgent$5.match(/Chrome\/(\d+)/))&&(version=+match[1]);var environmentV8Version=version,V8_VERSION$3=environmentV8Version,fails$t=fails$x,globalThis$p=globalThis_1,$String$5=globalThis$p.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$t((function(){var e=Symbol("symbol detection");return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$3&&V8_VERSION$3<41})),NATIVE_SYMBOL$5=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$5&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$f=getBuiltIn$g,isCallable$k=isCallable$n,isPrototypeOf$n=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$5=USE_SYMBOL_AS_UID$1?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$f("Symbol");return isCallable$k(t)&&isPrototypeOf$n(t.prototype,$Object$3(e))},$String$4=String,tryToString$7=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$j=isCallable$n,tryToString$6=tryToString$7,$TypeError$k=TypeError,aCallable$j=function(e){if(isCallable$j(e))return e;throw new $TypeError$k(tryToString$6(e)+" is not a function")},aCallable$i=aCallable$j,isNullOrUndefined$4=isNullOrUndefined$6,getMethod$3=function(e,t){var r=e[t];return isNullOrUndefined$4(r)?void 0:aCallable$i(r)},call$l=functionCall,isCallable$i=isCallable$n,isObject$j=isObject$k,$TypeError$j=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$i(r=e.toString)&&!isObject$j(n=call$l(r,e)))return n;if(isCallable$i(r=e.valueOf)&&!isObject$j(n=call$l(r,e)))return n;if("string"!==t&&isCallable$i(r=e.toString)&&!isObject$j(n=call$l(r,e)))return n;throw new $TypeError$j("Can't convert object to primitive value")},sharedStore={exports:{}},isPure=!0,globalThis$o=globalThis_1,defineProperty$f=Object.defineProperty,defineGlobalProperty$1=function(e,t){try{defineProperty$f(globalThis$o,e,{value:t,configurable:!0,writable:!0})}catch(r){globalThis$o[e]=t}return t},globalThis$n=globalThis_1,defineGlobalProperty=defineGlobalProperty$1,SHARED="__core-js_shared__",store$3=sharedStore.exports=globalThis$n[SHARED]||defineGlobalProperty(SHARED,{});(store$3.versions||(store$3.versions=[])).push({version:"3.39.0",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedStoreExports=sharedStore.exports,store$2=sharedStoreExports,shared$7=function(e,t){return store$2[e]||(store$2[e]=t||{})},requireObjectCoercible$7=requireObjectCoercible$9,$Object$2=Object,toObject$f=function(e){return $Object$2(requireObjectCoercible$7(e))},uncurryThis$t=functionUncurryThis,toObject$e=toObject$f,hasOwnProperty=uncurryThis$t({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$e(e),t)},uncurryThis$s=functionUncurryThis,id$1=0,postfix=Math.random(),toString$e=uncurryThis$s(1..toString),uid$4=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$e(++id$1+postfix,36)},globalThis$m=globalThis_1,shared$6=shared$7,hasOwn$j=hasOwnProperty_1,uid$3=uid$4,NATIVE_SYMBOL$4=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$4=globalThis$m.Symbol,WellKnownSymbolsStore$2=shared$6("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$4.for||Symbol$4:Symbol$4&&Symbol$4.withoutSetter||uid$3,wellKnownSymbol$o=function(e){return hasOwn$j(WellKnownSymbolsStore$2,e)||(WellKnownSymbolsStore$2[e]=NATIVE_SYMBOL$4&&hasOwn$j(Symbol$4,e)?Symbol$4[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore$2[e]},call$k=functionCall,isObject$i=isObject$k,isSymbol$4=isSymbol$5,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$n=wellKnownSymbol$o,$TypeError$i=TypeError,TO_PRIMITIVE=wellKnownSymbol$n("toPrimitive"),toPrimitive$8=function(e,t){if(!isObject$i(e)||isSymbol$4(e))return e;var r,n=getMethod$2(e,TO_PRIMITIVE);if(n){if(void 0===t&&(t="default"),r=call$k(n,e,t),!isObject$i(r)||isSymbol$4(r))return r;throw new $TypeError$i("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPrimitive$7=toPrimitive$8,isSymbol$3=isSymbol$5,toPropertyKey$4=function(e){var t=toPrimitive$7(e,"string");return isSymbol$3(t)?t:t+""},globalThis$l=globalThis_1,isObject$h=isObject$k,document$3=globalThis$l.document,EXISTS$1=isObject$h(document$3)&&isObject$h(document$3.createElement),documentCreateElement$1=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$j=descriptors,fails$s=fails$x,createElement$1=documentCreateElement$1,ie8DomDefine=!DESCRIPTORS$j&&!fails$s((function(){return 7!==Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a})),DESCRIPTORS$i=descriptors,call$j=functionCall,propertyIsEnumerableModule$2=objectPropertyIsEnumerable,createPropertyDescriptor$6=createPropertyDescriptor$7,toIndexedObject$9=toIndexedObject$a,toPropertyKey$3=toPropertyKey$4,hasOwn$i=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$i?$getOwnPropertyDescriptor$2:function(e,t){if(e=toIndexedObject$9(e),t=toPropertyKey$3(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$2(e,t)}catch(e){}if(hasOwn$i(e,t))return createPropertyDescriptor$6(!call$j(propertyIsEnumerableModule$2.f,e,t),e[t])};var fails$r=fails$x,isCallable$h=isCallable$n,replacement=/#|\.prototype\./,isForced$2=function(e,t){var r=data[normalize(e)];return r===POLYFILL||r!==NATIVE&&(isCallable$h(t)?fails$r(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,uncurryThis$r=functionUncurryThisClause,aCallable$h=aCallable$j,NATIVE_BIND$1=functionBindNative,bind$q=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(e,t){return aCallable$h(e),void 0===t?e:NATIVE_BIND$1?bind$q(e,t):function(){return e.apply(t,arguments)}},objectDefineProperty={},DESCRIPTORS$h=descriptors,fails$q=fails$x,v8PrototypeDefineBug=DESCRIPTORS$h&&fails$q((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),isObject$g=isObject$k,$String$3=String,$TypeError$h=TypeError,anObject$g=function(e){if(isObject$g(e))return e;throw new $TypeError$h($String$3(e)+" is not an object")},DESCRIPTORS$g=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$f=anObject$g,toPropertyKey$2=toPropertyKey$4,$TypeError$g=TypeError,$defineProperty$1=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$g?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){if(anObject$f(e),t=toPropertyKey$2(t),anObject$f(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]){var n=$getOwnPropertyDescriptor$1(e,t);n&&n[WRITABLE]&&(e[t]=r.value,r={configurable:CONFIGURABLE$1 in r?r[CONFIGURABLE$1]:n[CONFIGURABLE$1],enumerable:ENUMERABLE in r?r[ENUMERABLE]:n[ENUMERABLE],writable:!1})}return $defineProperty$1(e,t,r)}:$defineProperty$1:function(e,t,r){if(anObject$f(e),t=toPropertyKey$2(t),anObject$f(r),IE8_DOM_DEFINE)try{return $defineProperty$1(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new $TypeError$g("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var DESCRIPTORS$f=descriptors,definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$5=createPropertyDescriptor$7,createNonEnumerableProperty$8=DESCRIPTORS$f?function(e,t,r){return definePropertyModule$4.f(e,t,createPropertyDescriptor$5(1,r))}:function(e,t,r){return e[t]=r,e},globalThis$k=globalThis_1,apply$6=functionApply,uncurryThis$q=functionUncurryThisClause,isCallable$g=isCallable$n,getOwnPropertyDescriptor$9=objectGetOwnPropertyDescriptor.f,isForced$1=isForced_1,path$o=path$q,bind$p=functionBindContext,createNonEnumerableProperty$7=createNonEnumerableProperty$8,hasOwn$h=hasOwnProperty_1,wrapConstructor=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return apply$6(e,this,arguments)};return t.prototype=e.prototype,t},_export=function(e,t){var r,n,o,a,i,s,l,c,u,$=e.target,p=e.global,f=e.stat,d=e.proto,_=p?globalThis$k:f?globalThis$k[$]:globalThis$k[$]&&globalThis$k[$].prototype,y=p?path$o:path$o[$]||createNonEnumerableProperty$7(path$o,$,{})[$],h=y.prototype;for(a in t)n=!(r=isForced$1(p?a:$+(f?".":"#")+a,e.forced))&&_&&hasOwn$h(_,a),s=y[a],n&&(l=e.dontCallGetSet?(u=getOwnPropertyDescriptor$9(_,a))&&u.value:_[a]),i=n&&l?l:t[a],(r||d||typeof s!=typeof i)&&(c=e.bind&&n?bind$p(i,globalThis$k):e.wrap&&n?wrapConstructor(i):d&&isCallable$g(i)?uncurryThis$q(i):i,(e.sham||i&&i.sham||s&&s.sham)&&createNonEnumerableProperty$7(c,"sham",!0),createNonEnumerableProperty$7(y,a,c),d&&(hasOwn$h(path$o,o=$+"Prototype")||createNonEnumerableProperty$7(path$o,o,{}),createNonEnumerableProperty$7(path$o[o],a,i),e.real&&h&&(r||!h[a])&&createNonEnumerableProperty$7(h,a,i)))},uncurryThis$p=functionUncurryThis,arraySlice$5=uncurryThis$p([].slice),uncurryThis$o=functionUncurryThis,aCallable$g=aCallable$j,isObject$f=isObject$k,hasOwn$g=hasOwnProperty_1,arraySlice$4=arraySlice$5,NATIVE_BIND=functionBindNative,$Function=Function,concat$9=uncurryThis$o([].concat),join=uncurryThis$o([].join),factories={},construct$7=function(e,t,r){if(!hasOwn$g(factories,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";factories[t]=$Function("C,a","return new C("+join(n,",")+")")}return factories[t](e,r)},functionBind=NATIVE_BIND?$Function.bind:function(e){var t=aCallable$g(this),r=t.prototype,n=arraySlice$4(arguments,1),o=function(){var r=concat$9(n,arraySlice$4(arguments));return this instanceof o?construct$7(t,r.length,r):t.apply(e,r)};return isObject$f(r)&&(o.prototype=r),o},wellKnownSymbol$m=wellKnownSymbol$o,TO_STRING_TAG$3=wellKnownSymbol$m("toStringTag"),test$1={};test$1[TO_STRING_TAG$3]="z";var toStringTagSupport="[object z]"===String(test$1),TO_STRING_TAG_SUPPORT$2=toStringTagSupport,isCallable$f=isCallable$n,classofRaw=classofRaw$2,wellKnownSymbol$l=wellKnownSymbol$o,TO_STRING_TAG$2=wellKnownSymbol$l("toStringTag"),$Object$1=Object,CORRECT_ARGUMENTS="Arguments"===classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$e=TO_STRING_TAG_SUPPORT$2?classofRaw:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=$Object$1(e),TO_STRING_TAG$2))?r:CORRECT_ARGUMENTS?classofRaw(t):"Object"===(n=classofRaw(t))&&isCallable$f(t.callee)?"Arguments":n},uncurryThis$n=functionUncurryThis,isCallable$e=isCallable$n,store$1=sharedStoreExports,functionToString=uncurryThis$n(Function.toString);isCallable$e(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)});var inspectSource$2=store$1.inspectSource,uncurryThis$m=functionUncurryThis,fails$p=fails$x,isCallable$d=isCallable$n,classof$d=classof$e,getBuiltIn$e=getBuiltIn$g,inspectSource$1=inspectSource$2,noop=function(){},construct$6=getBuiltIn$e("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$2=uncurryThis$m(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.test(noop),isConstructorModern=function(e){if(!isCallable$d(e))return!1;try{return construct$6(noop,[],e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$d(e))return!1;switch(classof$d(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$2(constructorRegExp,inspectSource$1(e))}catch(e){return!0}};isConstructorLegacy.sham=!0;var isConstructor$4=!construct$6||fails$p((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,isConstructor$3=isConstructor$4,tryToString$5=tryToString$7,$TypeError$f=TypeError,aConstructor$2=function(e){if(isConstructor$3(e))return e;throw new $TypeError$f(tryToString$5(e)+" is not a constructor")},objectDefineProperties={},ceil$1=Math.ceil,floor=Math.floor,mathTrunc=Math.trunc||function(e){var t=+e;return(t>0?floor:ceil$1)(t)},trunc2=mathTrunc,toIntegerOrInfinity$6=function(e){var t=+e;return t!=t||0===t?0:trunc2(t)},toIntegerOrInfinity$5=toIntegerOrInfinity$6,max$2=Math.max,min$2=Math.min,toAbsoluteIndex$3=function(e,t){var r=toIntegerOrInfinity$5(e);return r<0?max$2(r+t,0):min$2(r,t)},toIntegerOrInfinity$4=toIntegerOrInfinity$6,min$1=Math.min,toLength$2=function(e){var t=toIntegerOrInfinity$4(e);return t>0?min$1(t,9007199254740991):0},toLength$1=toLength$2,lengthOfArrayLike$b=function(e){return toLength$1(e.length)},toIndexedObject$8=toIndexedObject$a,toAbsoluteIndex$2=toAbsoluteIndex$3,lengthOfArrayLike$a=lengthOfArrayLike$b,createMethod$5=function(e){return function(t,r,n){var o=toIndexedObject$8(t),a=lengthOfArrayLike$a(o);if(0===a)return!e&&-1;var i,s=toAbsoluteIndex$2(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},hiddenKeys$6={},uncurryThis$l=functionUncurryThis,hasOwn$f=hasOwnProperty_1,toIndexedObject$7=toIndexedObject$a,indexOf$7=arrayIncludes.indexOf,hiddenKeys$5=hiddenKeys$6,push$c=uncurryThis$l([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$7(e),o=0,a=[];for(r in n)!hasOwn$f(hiddenKeys$5,r)&&hasOwn$f(n,r)&&push$c(a,r);for(;t.length>o;)hasOwn$f(n,r=t[o++])&&(~indexOf$7(a,r)||push$c(a,r));return a},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$3=Object.keys||function(e){return internalObjectKeys$1(e,enumBugKeys$2)},DESCRIPTORS$e=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$3=objectDefineProperty,anObject$e=anObject$g,toIndexedObject$6=toIndexedObject$a,objectKeys$2=objectKeys$3;objectDefineProperties.f=DESCRIPTORS$e&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$e(e);for(var r,n=toIndexedObject$6(t),o=objectKeys$2(t),a=o.length,i=0;a>i;)definePropertyModule$3.f(e,r=o[i++],n[r]);return e};var activeXDocument,getBuiltIn$d=getBuiltIn$g,html$2=getBuiltIn$d("document","documentElement"),shared$5=shared$7,uid$2=uid$4,keys$d=shared$5("keys"),sharedKey$4=function(e){return keys$d[e]||(keys$d[e]=uid$2(e))},anObject$d=anObject$g,definePropertiesModule$1=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$4=hiddenKeys$6,html$1=html$2,documentCreateElement=documentCreateElement$1,sharedKey$3=sharedKey$4,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html$1.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys$1.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys$1[e]];return NullProtoObject()};hiddenKeys$4[IE_PROTO$1]=!0;var objectCreate=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject$d(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule$1.f(r,t)},$$1f=_export,getBuiltIn$c=getBuiltIn$g,apply$5=functionApply,bind$o=functionBind,aConstructor$1=aConstructor$2,anObject$c=anObject$g,isObject$e=isObject$k,create$b=objectCreate,fails$o=fails$x,nativeConstruct=getBuiltIn$c("Reflect","construct"),ObjectPrototype$2=Object.prototype,push$b=[].push,NEW_TARGET_BUG=fails$o((function(){function e(){}return!(nativeConstruct((function(){}),[],e)instanceof e)})),ARGS_BUG=!fails$o((function(){nativeConstruct((function(){}))})),FORCED$9=NEW_TARGET_BUG||ARGS_BUG;$$1f({target:"Reflect",stat:!0,forced:FORCED$9,sham:FORCED$9},{construct:function(e,t){aConstructor$1(e),anObject$c(t);var r=arguments.length<3?e:aConstructor$1(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(e,t,r);if(e===r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return apply$5(push$b,n,t),new(apply$5(bind$o,e,n))}var o=r.prototype,a=create$b(isObject$e(o)?o:ObjectPrototype$2),i=apply$5(e,a,t);return isObject$e(i)?i:a}});var path$n=path$q,construct$5=path$n.Reflect.construct,parent$1_=construct$5,construct$4=parent$1_,parent$1Z=construct$4,construct$3=parent$1Z,parent$1Y=construct$3,construct$2=parent$1Y,construct$1=construct$2,_Reflect$construct$1=getDefaultExportFromCjs(construct$1),construct2=construct$1,_Reflect$construct=getDefaultExportFromCjs(construct2),$$1e=_export,toObject$d=toObject$f,nativeKeys=objectKeys$3,fails$n=fails$x,FAILS_ON_PRIMITIVES$2=fails$n((function(){nativeKeys(1)}));$$1e({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$2},{keys:function(e){return nativeKeys(toObject$d(e))}});var path$m=path$q,keys$c=path$m.Object.keys,parent$1X=keys$c,keys$b=parent$1X,parent$1W=keys$b,keys$a=parent$1W,parent$1V=keys$a,keys$9=parent$1V,keys$8=keys$9,_Object$keys$1=getDefaultExportFromCjs(keys$8),classof$c=classof$e,$String$2=String,toString$d=function(e){if("Symbol"===classof$c(e))throw new TypeError("Cannot convert a Symbol value to a string");return $String$2(e)},objectGetOwnPropertyNames={},internalObjectKeys=objectKeysInternal,enumBugKeys=enumBugKeys$3,hiddenKeys$3=enumBugKeys.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys(e,hiddenKeys$3)};var objectGetOwnPropertyNamesExternal={},classof$b=classofRaw$2,toIndexedObject$5=toIndexedObject$a,$getOwnPropertyNames$1=objectGetOwnPropertyNames.f,arraySlice$3=arraySlice$5,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return $getOwnPropertyNames$1(e)}catch(e){return arraySlice$3(windowNames)}};objectGetOwnPropertyNamesExternal.f=function(e){return windowNames&&"Window"===classof$b(e)?getWindowNames(e):$getOwnPropertyNames$1(toIndexedObject$5(e))};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var createNonEnumerableProperty$6=createNonEnumerableProperty$8,defineBuiltIn$6=function(e,t,r,n){return n&&n.enumerable?e[t]=r:createNonEnumerableProperty$6(e,t,r),e},defineProperty$e=objectDefineProperty,defineBuiltInAccessor$3=function(e,t,r){return defineProperty$e.f(e,t,r)},wellKnownSymbolWrapped={},wellKnownSymbol$k=wellKnownSymbol$o;wellKnownSymbolWrapped.f=wellKnownSymbol$k;var set$a,get$5,has$5,path$l=path$q,hasOwn$e=hasOwnProperty_1,wrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,defineProperty$d=objectDefineProperty.f,wellKnownSymbolDefine=function(e){var t=path$l.Symbol||(path$l.Symbol={});hasOwn$e(t,e)||defineProperty$d(t,e,{value:wrappedWellKnownSymbolModule$1.f(e)})},call$i=functionCall,getBuiltIn$b=getBuiltIn$g,wellKnownSymbol$j=wellKnownSymbol$o,defineBuiltIn$5=defineBuiltIn$6,symbolDefineToPrimitive=function(){var e=getBuiltIn$b("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=wellKnownSymbol$j("toPrimitive");t&&!t[n]&&defineBuiltIn$5(t,n,(function(e){return call$i(r,this)}),{arity:1})},TO_STRING_TAG_SUPPORT$1=toStringTagSupport,classof$a=classof$e,objectToString=TO_STRING_TAG_SUPPORT$1?{}.toString:function(){return"[object "+classof$a(this)+"]"},TO_STRING_TAG_SUPPORT=toStringTagSupport,defineProperty$c=objectDefineProperty.f,createNonEnumerableProperty$5=createNonEnumerableProperty$8,hasOwn$d=hasOwnProperty_1,toString$c=objectToString,wellKnownSymbol$i=wellKnownSymbol$o,TO_STRING_TAG$1=wellKnownSymbol$i("toStringTag"),setToStringTag$8=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(hasOwn$d(o,TO_STRING_TAG$1)||defineProperty$c(o,TO_STRING_TAG$1,{configurable:!0,value:t}),n&&!TO_STRING_TAG_SUPPORT&&createNonEnumerableProperty$5(o,"toString",toString$c))},globalThis$j=globalThis_1,isCallable$c=isCallable$n,WeakMap$1=globalThis$j.WeakMap,weakMapBasicDetection=isCallable$c(WeakMap$1)&&/native code/.test(String(WeakMap$1)),NATIVE_WEAK_MAP=weakMapBasicDetection,globalThis$i=globalThis_1,isObject$d=isObject$k,createNonEnumerableProperty$4=createNonEnumerableProperty$8,hasOwn$c=hasOwnProperty_1,shared$4=sharedStoreExports,sharedKey$2=sharedKey$4,hiddenKeys$2=hiddenKeys$6,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$3=globalThis$i.TypeError,WeakMap=globalThis$i.WeakMap,enforce=function(e){return has$5(e)?get$5(e):set$a(e,{})},getterFor=function(e){return function(t){var r;if(!isObject$d(t)||(r=get$5(t)).type!==e)throw new TypeError$3("Incompatible receiver, "+e+" required");return r}};if(NATIVE_WEAK_MAP||shared$4.state){var store=shared$4.state||(shared$4.state=new WeakMap);store.get=store.get,store.has=store.has,store.set=store.set,set$a=function(e,t){if(store.has(e))throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get$5=function(e){return store.get(e)||{}},has$5=function(e){return store.has(e)}}else{var STATE=sharedKey$2("state");hiddenKeys$2[STATE]=!0,set$a=function(e,t){if(hasOwn$c(e,STATE))throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$4(e,STATE,t),t},get$5=function(e){return hasOwn$c(e,STATE)?e[STATE]:{}},has$5=function(e){return hasOwn$c(e,STATE)}}var internalState={set:set$a,get:get$5,has:has$5,enforce:enforce,getterFor:getterFor},classof$9=classofRaw$2,isArray$d=Array.isArray||function(e){return"Array"===classof$9(e)},isArray$c=isArray$d,isConstructor$2=isConstructor$4,isObject$c=isObject$k,wellKnownSymbol$h=wellKnownSymbol$o,SPECIES$5=wellKnownSymbol$h("species"),$Array$2=Array,arraySpeciesConstructor$1=function(e){var t;return isArray$c(e)&&(t=e.constructor,(isConstructor$2(t)&&(t===$Array$2||isArray$c(t.prototype))||isObject$c(t)&&null===(t=t[SPECIES$5]))&&(t=void 0)),void 0===t?$Array$2:t},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$4=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},bind$n=functionBindContext,uncurryThis$k=functionUncurryThis,IndexedObject$2=indexedObject,toObject$c=toObject$f,lengthOfArrayLike$9=lengthOfArrayLike$b,arraySpeciesCreate$3=arraySpeciesCreate$4,push$a=uncurryThis$k([].push),createMethod$4=function(e){var t=1===e,r=2===e,n=3===e,o=4===e,a=6===e,i=7===e,s=5===e||a;return function(l,c,u,$){for(var p,f,d=toObject$c(l),_=IndexedObject$2(d),y=lengthOfArrayLike$9(_),h=bind$n(c,u),g=0,b=$||arraySpeciesCreate$3,m=t?b(l,y):r||i?b(l,0):void 0;y>g;g++)if((s||g in _)&&(f=h(p=_[g],g,d),e))if(t)m[g]=f;else if(f)switch(e){case 3:return!0;case 5:return p;case 6:return g;case 2:push$a(m,p)}else switch(e){case 4:return!1;case 7:push$a(m,p)}return a?-1:n||o?o:m}},arrayIteration={forEach:createMethod$4(0),map:createMethod$4(1),filter:createMethod$4(2),some:createMethod$4(3),every:createMethod$4(4),find:createMethod$4(5),findIndex:createMethod$4(6),filterReject:createMethod$4(7)},$$1d=_export,globalThis$h=globalThis_1,call$h=functionCall,uncurryThis$j=functionUncurryThis,DESCRIPTORS$d=descriptors,NATIVE_SYMBOL$3=symbolConstructorDetection,fails$m=fails$x,hasOwn$b=hasOwnProperty_1,isPrototypeOf$m=objectIsPrototypeOf,anObject$b=anObject$g,toIndexedObject$4=toIndexedObject$a,toPropertyKey$1=toPropertyKey$4,$toString=toString$d,createPropertyDescriptor$4=createPropertyDescriptor$7,nativeObjectCreate=objectCreate,objectKeys$1=objectKeys$3,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor,definePropertyModule$2=objectDefineProperty,definePropertiesModule=objectDefineProperties,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,defineBuiltIn$4=defineBuiltIn$6,defineBuiltInAccessor$2=defineBuiltInAccessor$3,shared$3=shared$7,sharedKey$1=sharedKey$4,hiddenKeys$1=hiddenKeys$6,uid$1=uid$4,wellKnownSymbol$g=wellKnownSymbol$o,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol$m=wellKnownSymbolDefine,defineSymbolToPrimitive$1=symbolDefineToPrimitive,setToStringTag$7=setToStringTag$8,InternalStateModule$5=internalState,$forEach$1=arrayIteration.forEach,HIDDEN=sharedKey$1("hidden"),SYMBOL="Symbol",PROTOTYPE="prototype",setInternalState$5=InternalStateModule$5.set,getInternalState$2=InternalStateModule$5.getterFor(SYMBOL),ObjectPrototype$1=Object[PROTOTYPE],$Symbol=globalThis$h.Symbol,SymbolPrototype=$Symbol&&$Symbol[PROTOTYPE],RangeError$1=globalThis$h.RangeError,TypeError$2=globalThis$h.TypeError,QObject=globalThis$h.QObject,nativeGetOwnPropertyDescriptor$1=getOwnPropertyDescriptorModule$2.f,nativeDefineProperty=definePropertyModule$2.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule$1.f,push$9=uncurryThis$j([].push),AllSymbols=shared$3("symbols"),ObjectPrototypeSymbols=shared$3("op-symbols"),WellKnownSymbolsStore$1=shared$3("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild,fallbackDefineProperty=function(e,t,r){var n=nativeGetOwnPropertyDescriptor$1(ObjectPrototype$1,t);n&&delete ObjectPrototype$1[t],nativeDefineProperty(e,t,r),n&&e!==ObjectPrototype$1&&nativeDefineProperty(ObjectPrototype$1,t,n)},setSymbolDescriptor=DESCRIPTORS$d&&fails$m((function(){return 7!==nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a}))?fallbackDefineProperty:nativeDefineProperty,wrap=function(e,t){var r=AllSymbols[e]=nativeObjectCreate(SymbolPrototype);return setInternalState$5(r,{type:SYMBOL,tag:e,description:t}),DESCRIPTORS$d||(r.description=t),r},$defineProperty=function(e,t,r){e===ObjectPrototype$1&&$defineProperty(ObjectPrototypeSymbols,t,r),anObject$b(e);var n=toPropertyKey$1(t);return anObject$b(r),hasOwn$b(AllSymbols,n)?(r.enumerable?(hasOwn$b(e,HIDDEN)&&e[HIDDEN][n]&&(e[HIDDEN][n]=!1),r=nativeObjectCreate(r,{enumerable:createPropertyDescriptor$4(0,!1)})):(hasOwn$b(e,HIDDEN)||nativeDefineProperty(e,HIDDEN,createPropertyDescriptor$4(1,nativeObjectCreate(null))),e[HIDDEN][n]=!0),setSymbolDescriptor(e,n,r)):nativeDefineProperty(e,n,r)},$defineProperties=function(e,t){anObject$b(e);var r=toIndexedObject$4(t),n=objectKeys$1(r).concat($getOwnPropertySymbols(r));return $forEach$1(n,(function(t){DESCRIPTORS$d&&!call$h($propertyIsEnumerable,r,t)||$defineProperty(e,t,r[t])})),e},$create=function(e,t){return void 0===t?nativeObjectCreate(e):$defineProperties(nativeObjectCreate(e),t)},$propertyIsEnumerable=function(e){var t=toPropertyKey$1(e),r=call$h(nativePropertyIsEnumerable,this,t);return!(this===ObjectPrototype$1&&hasOwn$b(AllSymbols,t)&&!hasOwn$b(ObjectPrototypeSymbols,t))&&(!(r||!hasOwn$b(this,t)||!hasOwn$b(AllSymbols,t)||hasOwn$b(this,HIDDEN)&&this[HIDDEN][t])||r)},$getOwnPropertyDescriptor=function(e,t){var r=toIndexedObject$4(e),n=toPropertyKey$1(t);if(r!==ObjectPrototype$1||!hasOwn$b(AllSymbols,n)||hasOwn$b(ObjectPrototypeSymbols,n)){var o=nativeGetOwnPropertyDescriptor$1(r,n);return!o||!hasOwn$b(AllSymbols,n)||hasOwn$b(r,HIDDEN)&&r[HIDDEN][n]||(o.enumerable=!0),o}},$getOwnPropertyNames=function(e){var t=nativeGetOwnPropertyNames(toIndexedObject$4(e)),r=[];return $forEach$1(t,(function(e){hasOwn$b(AllSymbols,e)||hasOwn$b(hiddenKeys$1,e)||push$9(r,e)})),r},$getOwnPropertySymbols=function(e){var t=e===ObjectPrototype$1,r=nativeGetOwnPropertyNames(t?ObjectPrototypeSymbols:toIndexedObject$4(e)),n=[];return $forEach$1(r,(function(e){!hasOwn$b(AllSymbols,e)||t&&!hasOwn$b(ObjectPrototype$1,e)||push$9(n,AllSymbols[e])})),n};NATIVE_SYMBOL$3||(defineBuiltIn$4(SymbolPrototype=($Symbol=function(){if(isPrototypeOf$m(SymbolPrototype,this))throw new TypeError$2("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?$toString(arguments[0]):void 0,t=uid$1(e),r=function(e){var n=void 0===this?globalThis$h:this;n===ObjectPrototype$1&&call$h(r,ObjectPrototypeSymbols,e),hasOwn$b(n,HIDDEN)&&hasOwn$b(n[HIDDEN],t)&&(n[HIDDEN][t]=!1);var o=createPropertyDescriptor$4(1,e);try{setSymbolDescriptor(n,t,o)}catch(e){if(!(e instanceof RangeError$1))throw e;fallbackDefineProperty(n,t,o)}};return DESCRIPTORS$d&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$1,t,{configurable:!0,set:r}),wrap(t,e)})[PROTOTYPE],"toString",(function(){return getInternalState$2(this).tag})),defineBuiltIn$4($Symbol,"withoutSetter",(function(e){return wrap(uid$1(e),e)})),propertyIsEnumerableModule$1.f=$propertyIsEnumerable,definePropertyModule$2.f=$defineProperty,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule$2.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule$2.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule$3.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(e){return wrap(wellKnownSymbol$g(e),e)},DESCRIPTORS$d&&defineBuiltInAccessor$2(SymbolPrototype,"description",{configurable:!0,get:function(){return getInternalState$2(this).description}})),$$1d({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$3,sham:!NATIVE_SYMBOL$3},{Symbol:$Symbol}),$forEach$1(objectKeys$1(WellKnownSymbolsStore$1),(function(e){defineWellKnownSymbol$m(e)})),$$1d({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$3},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$$1d({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3,sham:!DESCRIPTORS$d},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),$$1d({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$3},{getOwnPropertyNames:$getOwnPropertyNames}),defineSymbolToPrimitive$1(),setToStringTag$7($Symbol,SYMBOL),hiddenKeys$1[HIDDEN]=!0;var NATIVE_SYMBOL$2=symbolConstructorDetection,symbolRegistryDetection=NATIVE_SYMBOL$2&&!!Symbol.for&&!!Symbol.keyFor,$$1c=_export,getBuiltIn$a=getBuiltIn$g,hasOwn$a=hasOwnProperty_1,toString$b=toString$d,shared$2=shared$7,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$2("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$2("symbol-to-string-registry");$$1c({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(e){var t=toString$b(e);if(hasOwn$a(StringToSymbolRegistry,t))return StringToSymbolRegistry[t];var r=getBuiltIn$a("Symbol")(t);return StringToSymbolRegistry[t]=r,SymbolToStringRegistry$1[r]=t,r}});var $$1b=_export,hasOwn$9=hasOwnProperty_1,isSymbol$2=isSymbol$5,tryToString$4=tryToString$7,shared$1=shared$7,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared$1("symbol-to-string-registry");$$1b({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function(e){if(!isSymbol$2(e))throw new TypeError(tryToString$4(e)+" is not a symbol");if(hasOwn$9(SymbolToStringRegistry,e))return SymbolToStringRegistry[e]}});var uncurryThis$i=functionUncurryThis,isArray$b=isArray$d,isCallable$b=isCallable$n,classof$8=classofRaw$2,toString$a=toString$d,push$8=uncurryThis$i([].push),getJsonReplacerFunction=function(e){if(isCallable$b(e))return e;if(isArray$b(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?push$8(r,o):"number"!=typeof o&&"Number"!==classof$8(o)&&"String"!==classof$8(o)||push$8(r,toString$a(o))}var a=r.length,i=!0;return function(e,t){if(i)return i=!1,t;if(isArray$b(this))return t;for(var n=0;n<a;n++)if(r[n]===e)return t}}},$$1a=_export,getBuiltIn$9=getBuiltIn$g,apply$4=functionApply,call$g=functionCall,uncurryThis$h=functionUncurryThis,fails$l=fails$x,isCallable$a=isCallable$n,isSymbol$1=isSymbol$5,arraySlice$2=arraySlice$5,getReplacerFunction=getJsonReplacerFunction,NATIVE_SYMBOL$1=symbolConstructorDetection,$String$1=String,$stringify=getBuiltIn$9("JSON","stringify"),exec$1=uncurryThis$h(/./.exec),charAt$2=uncurryThis$h("".charAt),charCodeAt$1=uncurryThis$h("".charCodeAt),replace$2=uncurryThis$h("".replace),numberToString=uncurryThis$h(1..toString),tester=/[\uD800-\uDFFF]/g,low=/^[\uD800-\uDBFF]$/,hi=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION=!NATIVE_SYMBOL$1||fails$l((function(){var e=getBuiltIn$9("Symbol")("stringify detection");return"[null]"!==$stringify([e])||"{}"!==$stringify({a:e})||"{}"!==$stringify(Object(e))})),ILL_FORMED_UNICODE=fails$l((function(){return'"\\udf06\\ud834"'!==$stringify("\udf06\ud834")||'"\\udead"'!==$stringify("\udead")})),stringifyWithSymbolsFix=function(e,t){var r=arraySlice$2(arguments),n=getReplacerFunction(t);if(isCallable$a(n)||void 0!==e&&!isSymbol$1(e))return r[1]=function(e,t){if(isCallable$a(n)&&(t=call$g(n,this,$String$1(e),t)),!isSymbol$1(t))return t},apply$4($stringify,null,r)},fixIllFormed=function(e,t,r){var n=charAt$2(r,t-1),o=charAt$2(r,t+1);return exec$1(low,e)&&!exec$1(hi,o)||exec$1(hi,e)&&!exec$1(low,n)?"\\u"+numberToString(charCodeAt$1(e,0),16):e};$stringify&&$$1a({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION||ILL_FORMED_UNICODE},{stringify:function(e,t,r){var n=arraySlice$2(arguments),o=apply$4(WRONG_SYMBOLS_CONVERSION?stringifyWithSymbolsFix:$stringify,null,n);return ILL_FORMED_UNICODE&&"string"==typeof o?replace$2(o,tester,fixIllFormed):o}});var $$19=_export,NATIVE_SYMBOL=symbolConstructorDetection,fails$k=fails$x,getOwnPropertySymbolsModule$2=objectGetOwnPropertySymbols,toObject$b=toObject$f,FORCED$8=!NATIVE_SYMBOL||fails$k((function(){getOwnPropertySymbolsModule$2.f(1)}));$$19({target:"Object",stat:!0,forced:FORCED$8},{getOwnPropertySymbols:function(e){var t=getOwnPropertySymbolsModule$2.f;return t?t(toObject$b(e)):[]}});var path$k=path$q,getOwnPropertySymbols$5=path$k.Object.getOwnPropertySymbols,parent$1U=getOwnPropertySymbols$5,getOwnPropertySymbols$4=parent$1U,parent$1T=getOwnPropertySymbols$4,getOwnPropertySymbols$3=parent$1T,parent$1S=getOwnPropertySymbols$3,getOwnPropertySymbols$2=parent$1S,getOwnPropertySymbols$1=getOwnPropertySymbols$2,_Object$getOwnPropertySymbols$1=getDefaultExportFromCjs(getOwnPropertySymbols$1),fails$j=fails$x,wellKnownSymbol$f=wellKnownSymbol$o,V8_VERSION$2=environmentV8Version,SPECIES$4=wellKnownSymbol$f("species"),arrayMethodHasSpeciesSupport$5=function(e){return V8_VERSION$2>=51||!fails$j((function(){var t=[];return(t.constructor={})[SPECIES$4]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},$$18=_export,$filter=arrayIteration.filter,arrayMethodHasSpeciesSupport$4=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport$4("filter");$$18({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$3},{filter:function(e){return $filter(this,e,arguments.length>1?arguments[1]:void 0)}});var globalThis$g=globalThis_1,path$j=path$q,getBuiltInPrototypeMethod$i=function(e,t){var r=path$j[e+"Prototype"],n=r&&r[t];if(n)return n;var o=globalThis$g[e],a=o&&o.prototype;return a&&a[t]},getBuiltInPrototypeMethod$h=getBuiltInPrototypeMethod$i,filter$5=getBuiltInPrototypeMethod$h("Array","filter"),isPrototypeOf$l=objectIsPrototypeOf,method$f=filter$5,ArrayPrototype$f=Array.prototype,filter$4=function(e){var t=e.filter;return e===ArrayPrototype$f||isPrototypeOf$l(ArrayPrototype$f,e)&&t===ArrayPrototype$f.filter?method$f:t},parent$1R=filter$4,filter$3=parent$1R,parent$1Q=filter$3,filter$2=parent$1Q,parent$1P=filter$2,filter$1=parent$1P,filter2=filter$1,_filterInstanceProperty=getDefaultExportFromCjs(filter2),getOwnPropertyDescriptor$8={exports:{}},$$17=_export,fails$i=fails$x,toIndexedObject$3=toIndexedObject$a,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,DESCRIPTORS$c=descriptors,FORCED$7=!DESCRIPTORS$c||fails$i((function(){nativeGetOwnPropertyDescriptor(1)}));$$17({target:"Object",stat:!0,forced:FORCED$7,sham:!DESCRIPTORS$c},{getOwnPropertyDescriptor:function(e,t){return nativeGetOwnPropertyDescriptor(toIndexedObject$3(e),t)}});var path$i=path$q,Object$4=path$i.Object,getOwnPropertyDescriptor$7=getOwnPropertyDescriptor$8.exports=function(e,t){return Object$4.getOwnPropertyDescriptor(e,t)};Object$4.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$7.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$8.exports,parent$1O=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$6=parent$1O,parent$1N=getOwnPropertyDescriptor$6,getOwnPropertyDescriptor$5=parent$1N,parent$1M=getOwnPropertyDescriptor$5,getOwnPropertyDescriptor$4=parent$1M,getOwnPropertyDescriptor$3=getOwnPropertyDescriptor$4,_Object$getOwnPropertyDescriptor$1=getDefaultExportFromCjs(getOwnPropertyDescriptor$3),DESCRIPTORS$b=descriptors,isArray$a=isArray$d,$TypeError$e=TypeError,getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$b&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(e,t){if(isArray$a(e)&&!getOwnPropertyDescriptor$2(e,"length").writable)throw new $TypeError$e("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},$TypeError$d=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$4=function(e){if(e>MAX_SAFE_INTEGER)throw $TypeError$d("Maximum allowed index exceeded");return e},$$16=_export,toObject$a=toObject$f,lengthOfArrayLike$8=lengthOfArrayLike$b,setArrayLength$1=arraySetLength,doesNotExceedSafeInteger$3=doesNotExceedSafeInteger$4,fails$h=fails$x,INCORRECT_TO_LENGTH=fails$h((function(){return 4294967297!==[].push.call({length:4294967296},1)})),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},FORCED$6=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$16({target:"Array",proto:!0,arity:1,forced:FORCED$6},{push:function(e){var t=toObject$a(this),r=lengthOfArrayLike$8(t),n=arguments.length;doesNotExceedSafeInteger$3(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return setArrayLength$1(t,r),r}});var getBuiltInPrototypeMethod$g=getBuiltInPrototypeMethod$i,push$7=getBuiltInPrototypeMethod$g("Array","push"),isPrototypeOf$k=objectIsPrototypeOf,method$e=push$7,ArrayPrototype$e=Array.prototype,push$6=function(e){var t=e.push;return e===ArrayPrototype$e||isPrototypeOf$k(ArrayPrototype$e,e)&&t===ArrayPrototype$e.push?method$e:t},parent$1L=push$6,push$5=parent$1L,parent$1K=push$5,push$4=parent$1K,parent$1J=push$4,push$3=parent$1J,push$2=push$3,_pushInstanceProperty=getDefaultExportFromCjs(push$2),fails$g=fails$x,arrayMethodIsStrict$4=function(e,t){var r=[][e];return!!r&&fails$g((function(){r.call(null,t||function(){return 1},1)}))},$forEach=arrayIteration.forEach,arrayMethodIsStrict$3=arrayMethodIsStrict$4,STRICT_METHOD$1=arrayMethodIsStrict$3("forEach"),arrayForEach=STRICT_METHOD$1?[].forEach:function(e){return $forEach(this,e,arguments.length>1?arguments[1]:void 0)},$$15=_export,forEach$8=arrayForEach;$$15({target:"Array",proto:!0,forced:[].forEach!==arrayForEach},{forEach:arrayForEach});var getBuiltInPrototypeMethod$f=getBuiltInPrototypeMethod$i,forEach$7=getBuiltInPrototypeMethod$f("Array","forEach"),parent$1I=forEach$7,forEach$6=parent$1I,classof$7=classof$e,hasOwn$8=hasOwnProperty_1,isPrototypeOf$j=objectIsPrototypeOf,method$d=forEach$6,ArrayPrototype$d=Array.prototype,DOMIterables$3={DOMTokenList:!0,NodeList:!0},forEach$5=function(e){var t=e.forEach;return e===ArrayPrototype$d||isPrototypeOf$j(ArrayPrototype$d,e)&&t===ArrayPrototype$d.forEach||hasOwn$8(DOMIterables$3,classof$7(e))?method$d:t},parent$1H=forEach$5,forEach$4=parent$1H,parent$1G=forEach$4,forEach$3=parent$1G,forEach$2=forEach$3,_forEachInstanceProperty$1=getDefaultExportFromCjs(forEach$2),getBuiltIn$8=getBuiltIn$g,uncurryThis$g=functionUncurryThis,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$a=anObject$g,concat$8=uncurryThis$g([].concat),ownKeys$3=getBuiltIn$8("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule$1.f(anObject$a(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$8(t,r(e)):t},DESCRIPTORS$a=descriptors,definePropertyModule$1=objectDefineProperty,createPropertyDescriptor$3=createPropertyDescriptor$7,createProperty$5=function(e,t,r){DESCRIPTORS$a?definePropertyModule$1.f(e,t,createPropertyDescriptor$3(0,r)):e[t]=r},$$14=_export,DESCRIPTORS$9=descriptors,ownKeys$2=ownKeys$3,toIndexedObject$2=toIndexedObject$a,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,createProperty$4=createProperty$5;$$14({target:"Object",stat:!0,sham:!DESCRIPTORS$9},{getOwnPropertyDescriptors:function(e){for(var t,r,n=toIndexedObject$2(e),o=getOwnPropertyDescriptorModule$1.f,a=ownKeys$2(n),i={},s=0;a.length>s;)void 0!==(r=o(n,t=a[s++]))&&createProperty$4(i,t,r);return i}});var path$h=path$q,getOwnPropertyDescriptors$4=path$h.Object.getOwnPropertyDescriptors,parent$1F=getOwnPropertyDescriptors$4,getOwnPropertyDescriptors$3=parent$1F,parent$1E=getOwnPropertyDescriptors$3,getOwnPropertyDescriptors$2=parent$1E,parent$1D=getOwnPropertyDescriptors$2,getOwnPropertyDescriptors$1=parent$1D,getOwnPropertyDescriptors2=getOwnPropertyDescriptors$1,_Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors2),defineProperties$6={exports:{}},$$13=_export,DESCRIPTORS$8=descriptors,defineProperties$5=objectDefineProperties.f;$$13({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$5,sham:!DESCRIPTORS$8},{defineProperties:defineProperties$5});var path$g=path$q,Object$3=path$g.Object,defineProperties$4=defineProperties$6.exports=function(e,t){return Object$3.defineProperties(e,t)};Object$3.defineProperties.sham&&(defineProperties$4.sham=!0);var definePropertiesExports=defineProperties$6.exports,parent$1C=definePropertiesExports,defineProperties$3=parent$1C,parent$1B=defineProperties$3,defineProperties$2=parent$1B,parent$1A=defineProperties$2,defineProperties$1=parent$1A,defineProperties4=defineProperties$1,_Object$defineProperties=getDefaultExportFromCjs(defineProperties4),defineProperty$b={exports:{}},$$12=_export,DESCRIPTORS$7=descriptors,defineProperty$a=objectDefineProperty.f;$$12({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$a,sham:!DESCRIPTORS$7},{defineProperty:defineProperty$a});var path$f=path$q,Object$2=path$f.Object,defineProperty$9=defineProperty$b.exports=function(e,t,r){return Object$2.defineProperty(e,t,r)};Object$2.defineProperty.sham&&(defineProperty$9.sham=!0);var definePropertyExports=defineProperty$b.exports,parent$1z=definePropertyExports,defineProperty$8=parent$1z,parent$1y=defineProperty$8,defineProperty$7=parent$1y,parent$1x=defineProperty$7,defineProperty$6=parent$1x,defineProperty$5=defineProperty$6,_Object$defineProperty$1=getDefaultExportFromCjs(defineProperty$5),$$11=_export,fails$f=fails$x,isArray$9=isArray$d,isObject$b=isObject$k,toObject$9=toObject$f,lengthOfArrayLike$7=lengthOfArrayLike$b,doesNotExceedSafeInteger$2=doesNotExceedSafeInteger$4,createProperty$3=createProperty$5,arraySpeciesCreate$2=arraySpeciesCreate$4,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$5,wellKnownSymbol$e=wellKnownSymbol$o,V8_VERSION$1=environmentV8Version,IS_CONCAT_SPREADABLE=wellKnownSymbol$e("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$1>=51||!fails$f((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),isConcatSpreadable=function(e){if(!isObject$b(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray$9(e)},FORCED$5=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$3("concat");$$11({target:"Array",proto:!0,arity:1,forced:FORCED$5},{concat:function(e){var t,r,n,o,a,i=toObject$9(this),s=arraySpeciesCreate$2(i,0),l=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(a=-1===t?i:arguments[t]))for(o=lengthOfArrayLike$7(a),doesNotExceedSafeInteger$2(l+o),r=0;r<o;r++,l++)r in a&&createProperty$3(s,l,a[r]);else doesNotExceedSafeInteger$2(l+1),createProperty$3(s,l++,a);return s.length=l,s}});var defineWellKnownSymbol$l=wellKnownSymbolDefine;defineWellKnownSymbol$l("asyncIterator");var defineWellKnownSymbol$k=wellKnownSymbolDefine;defineWellKnownSymbol$k("hasInstance");var defineWellKnownSymbol$j=wellKnownSymbolDefine;defineWellKnownSymbol$j("isConcatSpreadable");var defineWellKnownSymbol$i=wellKnownSymbolDefine;defineWellKnownSymbol$i("iterator");var defineWellKnownSymbol$h=wellKnownSymbolDefine;defineWellKnownSymbol$h("match");var defineWellKnownSymbol$g=wellKnownSymbolDefine;defineWellKnownSymbol$g("matchAll");var defineWellKnownSymbol$f=wellKnownSymbolDefine;defineWellKnownSymbol$f("replace");var defineWellKnownSymbol$e=wellKnownSymbolDefine;defineWellKnownSymbol$e("search");var defineWellKnownSymbol$d=wellKnownSymbolDefine;defineWellKnownSymbol$d("species");var defineWellKnownSymbol$c=wellKnownSymbolDefine;defineWellKnownSymbol$c("split");var defineWellKnownSymbol$b=wellKnownSymbolDefine,defineSymbolToPrimitive=symbolDefineToPrimitive;defineWellKnownSymbol$b("toPrimitive"),defineSymbolToPrimitive();var getBuiltIn$7=getBuiltIn$g,defineWellKnownSymbol$a=wellKnownSymbolDefine,setToStringTag$6=setToStringTag$8;defineWellKnownSymbol$a("toStringTag"),setToStringTag$6(getBuiltIn$7("Symbol"),"Symbol");var defineWellKnownSymbol$9=wellKnownSymbolDefine;defineWellKnownSymbol$9("unscopables");var globalThis$f=globalThis_1,setToStringTag$5=setToStringTag$8;setToStringTag$5(globalThis$f.JSON,"JSON",!0);var IteratorPrototype$1,PrototypeOfArrayIteratorPrototype,arrayIterator,path$e=path$q,symbol$4=path$e.Symbol,iterators={},DESCRIPTORS$6=descriptors,hasOwn$7=hasOwnProperty_1,FunctionPrototype$2=Function.prototype,getDescriptor=DESCRIPTORS$6&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$7(FunctionPrototype$2,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$6||DESCRIPTORS$6&&getDescriptor(FunctionPrototype$2,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},fails$e=fails$x,correctPrototypeGetter=!fails$e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),hasOwn$6=hasOwnProperty_1,isCallable$9=isCallable$n,toObject$8=toObject$f,sharedKey=sharedKey$4,CORRECT_PROTOTYPE_GETTER$1=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER$1?$Object.getPrototypeOf:function(e){var t=toObject$8(e);if(hasOwn$6(t,IE_PROTO))return t[IE_PROTO];var r=t.constructor;return isCallable$9(r)&&t instanceof r?r.prototype:t instanceof $Object?ObjectPrototype:null},fails$d=fails$x,isCallable$8=isCallable$n,isObject$a=isObject$k,create$a=objectCreate,getPrototypeOf$7=objectGetPrototypeOf,defineBuiltIn$3=defineBuiltIn$6,wellKnownSymbol$d=wellKnownSymbol$o,ITERATOR$5=wellKnownSymbol$d("iterator"),BUGGY_SAFARI_ITERATORS$1=!1;[].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$7(getPrototypeOf$7(arrayIterator)))!==Object.prototype&&(IteratorPrototype$1=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$a(IteratorPrototype$1)||fails$d((function(){var e={};return IteratorPrototype$1[ITERATOR$5].call(e)!==e}));isCallable$8((IteratorPrototype$1=NEW_ITERATOR_PROTOTYPE?{}:create$a(IteratorPrototype$1))[ITERATOR$5])||defineBuiltIn$3(IteratorPrototype$1,ITERATOR$5,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype$1,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},IteratorPrototype=iteratorsCore.IteratorPrototype,create$9=objectCreate,createPropertyDescriptor$2=createPropertyDescriptor$7,setToStringTag$4=setToStringTag$8,Iterators$5=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(e,t,r,n){var o=t+" Iterator";return e.prototype=create$9(IteratorPrototype,{next:createPropertyDescriptor$2(+!n,r)}),setToStringTag$4(e,o,!1,!0),Iterators$5[o]=returnThis$1,e},uncurryThis$f=functionUncurryThis,aCallable$f=aCallable$j,functionUncurryThisAccessor=function(e,t,r){try{return uncurryThis$f(aCallable$f(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},isObject$9=isObject$k,isPossiblePrototype$1=function(e){return isObject$9(e)||null===e},isPossiblePrototype=isPossiblePrototype$1,$String=String,$TypeError$c=TypeError,aPossiblePrototype$1=function(e){if(isPossiblePrototype(e))return e;throw new $TypeError$c("Can't set "+$String(e)+" as a prototype")},uncurryThisAccessor=functionUncurryThisAccessor,isObject$8=isObject$k,requireObjectCoercible$6=requireObjectCoercible$9,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=uncurryThisAccessor(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return requireObjectCoercible$6(r),aPossiblePrototype(n),isObject$8(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),$$10=_export,call$f=functionCall,FunctionName=functionName,createIteratorConstructor=iteratorCreateConstructor,getPrototypeOf$6=objectGetPrototypeOf,setToStringTag$3=setToStringTag$8,defineBuiltIn$2=defineBuiltIn$6,wellKnownSymbol$c=wellKnownSymbol$o,Iterators$4=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER;FunctionName.CONFIGURABLE,IteratorsCore.IteratorPrototype;var BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol$c("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(e,t,r,n,o,a,i){createIteratorConstructor(r,t,n);var s,l,c,u=function(e){if(e===o&&_)return _;if(!BUGGY_SAFARI_ITERATORS&&e&&e in f)return f[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}},$=t+" Iterator",p=!1,f=e.prototype,d=f[ITERATOR$4]||f["@@iterator"]||o&&f[o],_=!BUGGY_SAFARI_ITERATORS&&d||u(o),y="Array"===t&&f.entries||d;if(y&&(s=getPrototypeOf$6(y.call(new e)))!==Object.prototype&&s.next&&(setToStringTag$3(s,$,!0,!0),Iterators$4[$]=returnThis),PROPER_FUNCTION_NAME&&o===VALUES&&d&&d.name!==VALUES&&(p=!0,_=function(){return call$f(d,this)}),o)if(l={values:u(VALUES),keys:a?_:u(KEYS),entries:u(ENTRIES)},i)for(c in l)(BUGGY_SAFARI_ITERATORS||p||!(c in f))&&defineBuiltIn$2(f,c,l[c]);else $$10({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||p},l);return i&&f[ITERATOR$4]!==_&&defineBuiltIn$2(f,ITERATOR$4,_,{name:o}),Iterators$4[t]=_,l},createIterResultObject$3=function(e,t){return{value:e,done:t}},toIndexedObject$1=toIndexedObject$a,Iterators$3=iterators,InternalStateModule$4=internalState;objectDefineProperty.f;var defineIterator$2=iteratorDefine,createIterResultObject$2=createIterResultObject$3,ARRAY_ITERATOR="Array Iterator",setInternalState$4=InternalStateModule$4.set,getInternalState$1=InternalStateModule$4.getterFor(ARRAY_ITERATOR);defineIterator$2(Array,"Array",(function(e,t){setInternalState$4(this,{type:ARRAY_ITERATOR,target:toIndexedObject$1(e),index:0,kind:t})}),(function(){var e=getInternalState$1(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,createIterResultObject$2(void 0,!0);switch(e.kind){case"keys":return createIterResultObject$2(r,!1);case"values":return createIterResultObject$2(t[r],!1)}return createIterResultObject$2([r,t[r]],!1)}),"values"),Iterators$3.Arguments=Iterators$3.Array;var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$2=domIterables,globalThis$e=globalThis_1,setToStringTag$2=setToStringTag$8,Iterators$2=iterators;for(var COLLECTION_NAME in DOMIterables$2)setToStringTag$2(globalThis$e[COLLECTION_NAME],COLLECTION_NAME),Iterators$2[COLLECTION_NAME]=Iterators$2.Array;var parent$1w=symbol$4,symbol$3=parent$1w,wellKnownSymbol$b=wellKnownSymbol$o,defineProperty$4=objectDefineProperty.f,METADATA$1=wellKnownSymbol$b("metadata"),FunctionPrototype$1=Function.prototype;void 0===FunctionPrototype$1[METADATA$1]&&defineProperty$4(FunctionPrototype$1,METADATA$1,{value:null});var defineWellKnownSymbol$8=wellKnownSymbolDefine;defineWellKnownSymbol$8("asyncDispose");var defineWellKnownSymbol$7=wellKnownSymbolDefine;defineWellKnownSymbol$7("dispose");var defineWellKnownSymbol$6=wellKnownSymbolDefine;defineWellKnownSymbol$6("metadata");var parent$1v=symbol$3,symbol$2=parent$1v,getBuiltIn$6=getBuiltIn$g,uncurryThis$e=functionUncurryThis,Symbol$3=getBuiltIn$6("Symbol"),keyFor2=Symbol$3.keyFor,thisSymbolValue$1=uncurryThis$e(Symbol$3.prototype.valueOf),symbolIsRegistered=Symbol$3.isRegisteredSymbol||function(e){try{return void 0!==keyFor2(thisSymbolValue$1(e))}catch(e){return!1}},$$$=_export,isRegisteredSymbol$1=symbolIsRegistered;$$$({target:"Symbol",stat:!0},{isRegisteredSymbol:isRegisteredSymbol$1});for(var shared=shared$7,getBuiltIn$5=getBuiltIn$g,uncurryThis$d=functionUncurryThis,isSymbol=isSymbol$5,wellKnownSymbol$a=wellKnownSymbol$o,Symbol$2=getBuiltIn$5("Symbol"),$isWellKnownSymbol=Symbol$2.isWellKnownSymbol,getOwnPropertyNames4=getBuiltIn$5("Object","getOwnPropertyNames"),thisSymbolValue=uncurryThis$d(Symbol$2.prototype.valueOf),WellKnownSymbolsStore=shared("wks"),i$1=0,symbolKeys=getOwnPropertyNames4(Symbol$2),symbolKeysLength=symbolKeys.length;i$1<symbolKeysLength;i$1++)try{var symbolKey=symbolKeys[i$1];isSymbol(Symbol$2[symbolKey])&&wellKnownSymbol$a(symbolKey)}catch(e){}var symbolIsWellKnown=function(e){if($isWellKnownSymbol&&$isWellKnownSymbol(e))return!0;try{for(var t=thisSymbolValue(e),r=0,n=getOwnPropertyNames4(WellKnownSymbolsStore),o=n.length;r<o;r++)if(WellKnownSymbolsStore[n[r]]==t)return!0}catch(e){}return!1},$$_=_export,isWellKnownSymbol$1=symbolIsWellKnown;$$_({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:isWellKnownSymbol$1});var defineWellKnownSymbol$5=wellKnownSymbolDefine;defineWellKnownSymbol$5("customMatcher");var defineWellKnownSymbol$4=wellKnownSymbolDefine;defineWellKnownSymbol$4("observable");var $$Z=_export,isRegisteredSymbol2=symbolIsRegistered;$$Z({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:isRegisteredSymbol2});var $$Y=_export,isWellKnownSymbol2=symbolIsWellKnown;$$Y({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:isWellKnownSymbol2});var defineWellKnownSymbol$3=wellKnownSymbolDefine;defineWellKnownSymbol$3("matcher");var defineWellKnownSymbol$2=wellKnownSymbolDefine;defineWellKnownSymbol$2("metadataKey");var defineWellKnownSymbol$1=wellKnownSymbolDefine;defineWellKnownSymbol$1("patternMatch");var defineWellKnownSymbol=wellKnownSymbolDefine;defineWellKnownSymbol("replaceAll");var parent$1u=symbol$2,symbol$1=parent$1u,symbol=symbol$1,_Symbol=getDefaultExportFromCjs(symbol),uncurryThis$c=functionUncurryThis,toIntegerOrInfinity$3=toIntegerOrInfinity$6,toString$9=toString$d,requireObjectCoercible$5=requireObjectCoercible$9,charAt$1=uncurryThis$c("".charAt),charCodeAt=uncurryThis$c("".charCodeAt),stringSlice$1=uncurryThis$c("".slice),createMethod$3=function(e){return function(t,r){var n,o,a=toString$9(requireObjectCoercible$5(t)),i=toIntegerOrInfinity$3(r),s=a.length;return i<0||i>=s?e?"":void 0:(n=charCodeAt(a,i))<55296||n>56319||i+1===s||(o=charCodeAt(a,i+1))<56320||o>57343?e?charAt$1(a,i):n:e?stringSlice$1(a,i,i+2):o-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt=stringMultibyte.charAt,toString$8=toString$d,InternalStateModule$3=internalState,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$3,STRING_ITERATOR="String Iterator",setInternalState$3=InternalStateModule$3.set,getInternalState=InternalStateModule$3.getterFor(STRING_ITERATOR);defineIterator$1(String,"String",(function(e){setInternalState$3(this,{type:STRING_ITERATOR,string:toString$8(e),index:0})}),(function(){var e,t=getInternalState(this),r=t.string,n=t.index;return n>=r.length?createIterResultObject$1(void 0,!0):(e=charAt(r,n),t.index+=e.length,createIterResultObject$1(e,!1))}));var WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,iterator$4=WrappedWellKnownSymbolModule$1.f("iterator"),parent$1t=iterator$4,iterator$3=parent$1t,parent$1s=iterator$3,iterator$2=parent$1s,parent$1r=iterator$2,iterator$1=parent$1r,iterator=iterator$1,_Symbol$iterator=getDefaultExportFromCjs(iterator);function _typeof(e){return(_typeof="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof _Symbol&&e.constructor===_Symbol&&e!==_Symbol.prototype?"symbol":typeof e})(e)}var WrappedWellKnownSymbolModule=wellKnownSymbolWrapped,toPrimitive$6=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$1q=toPrimitive$6,toPrimitive$5=parent$1q,parent$1p=toPrimitive$5,toPrimitive$4=parent$1p,parent$1o=toPrimitive$4,toPrimitive$3=parent$1o,toPrimitive$2=toPrimitive$3,_Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive$2);function toPrimitive$1(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[_Symbol$toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function toPropertyKey(e){var t=toPrimitive$1(e,"string");return"symbol"==_typeof(t)?t:t+""}function _defineProperty(e,t,r){return(t=toPropertyKey(t))in e?_Object$defineProperty$1(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ownKeys$1(e,t){var r=_Object$keys$1(e);if(_Object$getOwnPropertySymbols$1){var n=_Object$getOwnPropertySymbols$1(e);t&&(n=_filterInstanceProperty(n).call(n,(function(t){return _Object$getOwnPropertyDescriptor$1(e,t).enumerable}))),_pushInstanceProperty(r).apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r,n,o=null!=arguments[t]?arguments[t]:{};t%2?_forEachInstanceProperty$1(r=ownKeys$1(Object(o),!0)).call(r,(function(t){_defineProperty(e,t,o[t])})):_Object$getOwnPropertyDescriptors?_Object$defineProperties(e,_Object$getOwnPropertyDescriptors(o)):_forEachInstanceProperty$1(n=ownKeys$1(Object(o))).call(n,(function(t){_Object$defineProperty$1(e,t,_Object$getOwnPropertyDescriptor$1(o,t))}))}return e}var $$X=_export,DESCRIPTORS$5=descriptors,create$8=objectCreate;$$X({target:"Object",stat:!0,sham:!DESCRIPTORS$5},{create:create$8});var path$d=path$q,Object$1=path$d.Object,create$7=function(e,t){return Object$1.create(e,t)},parent$1n=create$7,create$6=parent$1n,parent$1m=create$6,create$5=parent$1m,parent$1l=create$5,create$4=parent$1l,create$3=create$4,_Object$create$1=getDefaultExportFromCjs(create$3),$$W=_export,fails$c=fails$x,toObject$7=toObject$f,nativeGetPrototypeOf=objectGetPrototypeOf,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,FAILS_ON_PRIMITIVES$1=fails$c((function(){nativeGetPrototypeOf(1)}));$$W({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$1,sham:!CORRECT_PROTOTYPE_GETTER},{getPrototypeOf:function(e){return nativeGetPrototypeOf(toObject$7(e))}});var path$c=path$q,getPrototypeOf$5=path$c.Object.getPrototypeOf,parent$1k=getPrototypeOf$5,getPrototypeOf$4=parent$1k,parent$1j=getPrototypeOf$4,getPrototypeOf$3=parent$1j,parent$1i=getPrototypeOf$3,getPrototypeOf$2=parent$1i,getPrototypeOf$1=getPrototypeOf$2,_Object$getPrototypeOf=getDefaultExportFromCjs(getPrototypeOf$1),$$V=_export,setPrototypeOf$6=objectSetPrototypeOf;$$V({target:"Object",stat:!0},{setPrototypeOf:setPrototypeOf$6});var path$b=path$q,setPrototypeOf$5=path$b.Object.setPrototypeOf,parent$1h=setPrototypeOf$5,setPrototypeOf$4=parent$1h,parent$1g=setPrototypeOf$4,setPrototypeOf$3=parent$1g,parent$1f=setPrototypeOf$3,setPrototypeOf$2=parent$1f,setPrototypeOf$1=setPrototypeOf$2,_Object$setPrototypeOf=getDefaultExportFromCjs(setPrototypeOf$1),hasOwn$5=hasOwnProperty_1,ownKeys2=ownKeys$3,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys2(t),o=definePropertyModule.f,a=getOwnPropertyDescriptorModule.f,i=0;i<n.length;i++){var s=n[i];hasOwn$5(e,s)||r&&hasOwn$5(r,s)||o(e,s,a(t,s))}},isObject$7=isObject$k,createNonEnumerableProperty$3=createNonEnumerableProperty$8,installErrorCause$1=function(e,t){isObject$7(t)&&"cause"in t&&createNonEnumerableProperty$3(e,"cause",t.cause)},uncurryThis$b=functionUncurryThis,$Error$1=Error,replace$1=uncurryThis$b("".replace),TEST=String(new $Error$1("zxcasd").stack),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(e,t){if(IS_V8_OR_CHAKRA_STACK&&"string"==typeof e&&!$Error$1.prepareStackTrace)for(;t--;)e=replace$1(e,V8_OR_CHAKRA_STACK_ENTRY,"");return e},fails$b=fails$x,createPropertyDescriptor$1=createPropertyDescriptor$7,errorStackInstallable=!fails$b((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",createPropertyDescriptor$1(1,7)),7!==e.stack)})),createNonEnumerableProperty$2=createNonEnumerableProperty$8,clearErrorStack=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(e,t,r,n){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(e,t):createNonEnumerableProperty$2(e,"stack",clearErrorStack(r,n)))},wellKnownSymbol$9=wellKnownSymbol$o,Iterators$1=iterators,ITERATOR$3=wellKnownSymbol$9("iterator"),ArrayPrototype$c=Array.prototype,isArrayIteratorMethod$2=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype$c[ITERATOR$3]===e)},classof$6=classof$e,getMethod$1=getMethod$3,isNullOrUndefined$3=isNullOrUndefined$6,Iterators=iterators,wellKnownSymbol$8=wellKnownSymbol$o,ITERATOR$2=wellKnownSymbol$8("iterator"),getIteratorMethod$8=function(e){if(!isNullOrUndefined$3(e))return getMethod$1(e,ITERATOR$2)||getMethod$1(e,"@@iterator")||Iterators[classof$6(e)]},call$e=functionCall,aCallable$e=aCallable$j,anObject$9=anObject$g,tryToString$3=tryToString$7,getIteratorMethod$7=getIteratorMethod$8,$TypeError$b=TypeError,getIterator$2=function(e,t){var r=arguments.length<2?getIteratorMethod$7(e):t;if(aCallable$e(r))return anObject$9(call$e(r,e));throw new $TypeError$b(tryToString$3(e)+" is not iterable")},call$d=functionCall,anObject$8=anObject$g,getMethod=getMethod$3,iteratorClose$2=function(e,t,r){var n,o;anObject$8(e);try{if(!(n=getMethod(e,"return"))){if("throw"===t)throw r;return r}n=call$d(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return anObject$8(n),r},bind$m=functionBindContext,call$c=functionCall,anObject$7=anObject$g,tryToString$2=tryToString$7,isArrayIteratorMethod$1=isArrayIteratorMethod$2,lengthOfArrayLike$6=lengthOfArrayLike$b,isPrototypeOf$i=objectIsPrototypeOf,getIterator$1=getIterator$2,getIteratorMethod$6=getIteratorMethod$8,iteratorClose$1=iteratorClose$2,$TypeError$a=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$l=function(e,t,r){var n,o,a,i,s,l,c,u=r&&r.that,$=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),f=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),_=bind$m(t,u),y=function(e){return n&&iteratorClose$1(n,"normal",e),new Result(!0,e)},h=function(e){return $?(anObject$7(e),d?_(e[0],e[1],y):_(e[0],e[1])):d?_(e,y):_(e)};if(p)n=e.iterator;else if(f)n=e;else{if(!(o=getIteratorMethod$6(e)))throw new $TypeError$a(tryToString$2(e)+" is not iterable");if(isArrayIteratorMethod$1(o)){for(a=0,i=lengthOfArrayLike$6(e);i>a;a++)if((s=h(e[a]))&&isPrototypeOf$i(ResultPrototype,s))return s;return new Result(!1)}n=getIterator$1(e,o)}for(l=p?e.next:n.next;!(c=call$c(l,n)).done;){try{s=h(c.value)}catch(e){iteratorClose$1(n,"throw",e)}if("object"==typeof s&&s&&isPrototypeOf$i(ResultPrototype,s))return s}return new Result(!1)},toString$7=toString$d,normalizeStringArgument$1=function(e,t){return void 0===e?arguments.length<2?"":t:toString$7(e)},$$U=_export,isPrototypeOf$h=objectIsPrototypeOf,getPrototypeOf2=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,copyConstructorProperties=copyConstructorProperties$1,create$2=objectCreate,createNonEnumerableProperty$1=createNonEnumerableProperty$8,createPropertyDescriptor=createPropertyDescriptor$7,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,iterate$k=iterate$l,normalizeStringArgument=normalizeStringArgument$1,wellKnownSymbol$7=wellKnownSymbol$o,TO_STRING_TAG=wellKnownSymbol$7("toStringTag"),$Error=Error,push$1=[].push,$AggregateError=function(e,t){var r,n=isPrototypeOf$h(AggregateErrorPrototype,this);setPrototypeOf?r=setPrototypeOf(new $Error,n?getPrototypeOf2(this):AggregateErrorPrototype):(r=n?this:create$2(AggregateErrorPrototype),createNonEnumerableProperty$1(r,TO_STRING_TAG,"Error")),void 0!==t&&createNonEnumerableProperty$1(r,"message",normalizeStringArgument(t)),installErrorStack(r,$AggregateError,r.stack,1),arguments.length>2&&installErrorCause(r,arguments[2]);var o=[];return iterate$k(e,push$1,{that:o}),createNonEnumerableProperty$1(r,"errors",o),r};setPrototypeOf?setPrototypeOf($AggregateError,$Error):copyConstructorProperties($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=create$2($Error.prototype,{constructor:createPropertyDescriptor(1,$AggregateError),message:createPropertyDescriptor(1,""),name:createPropertyDescriptor(1,"AggregateError")});$$U({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var $location,defer,channel,port,globalThis$d=globalThis_1,userAgent$4=environmentUserAgent,classof$5=classofRaw$2,userAgentStartsWith=function(e){return userAgent$4.slice(0,e.length)===e},environment=userAgentStartsWith("Bun/")?"BUN":userAgentStartsWith("Cloudflare-Workers")?"CLOUDFLARE":userAgentStartsWith("Deno/")?"DENO":userAgentStartsWith("Node.js/")?"NODE":globalThis$d.Bun&&"string"==typeof Bun.version?"BUN":globalThis$d.Deno&&"object"==typeof Deno.version?"DENO":"process"===classof$5(globalThis$d.process)?"NODE":globalThis$d.window&&globalThis$d.document?"BROWSER":"REST",ENVIRONMENT$2=environment,environmentIsNode="NODE"===ENVIRONMENT$2,getBuiltIn$4=getBuiltIn$g,defineBuiltInAccessor$1=defineBuiltInAccessor$3,wellKnownSymbol$6=wellKnownSymbol$o,DESCRIPTORS$4=descriptors,SPECIES$3=wellKnownSymbol$6("species"),setSpecies$2=function(e){var t=getBuiltIn$4(e);DESCRIPTORS$4&&t&&!t[SPECIES$3]&&defineBuiltInAccessor$1(t,SPECIES$3,{configurable:!0,get:function(){return this}})},isPrototypeOf$g=objectIsPrototypeOf,$TypeError$9=TypeError,anInstance$3=function(e,t){if(isPrototypeOf$g(t,e))return e;throw new $TypeError$9("Incorrect invocation")},anObject$6=anObject$g,aConstructor=aConstructor$2,isNullOrUndefined$2=isNullOrUndefined$6,wellKnownSymbol$5=wellKnownSymbol$o,SPECIES$2=wellKnownSymbol$5("species"),speciesConstructor$2=function(e,t){var r,n=anObject$6(e).constructor;return void 0===n||isNullOrUndefined$2(r=anObject$6(n)[SPECIES$2])?t:aConstructor(r)},$TypeError$8=TypeError,validateArgumentsLength$2=function(e,t){if(e<t)throw new $TypeError$8("Not enough arguments");return e},userAgent$3=environmentUserAgent,environmentIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$3),globalThis$c=globalThis_1,apply$3=functionApply,bind$l=functionBindContext,isCallable$7=isCallable$n,hasOwn$4=hasOwnProperty_1,fails$a=fails$x,html=html$2,arraySlice$1=arraySlice$5,createElement=documentCreateElement$1,validateArgumentsLength$1=validateArgumentsLength$2,IS_IOS$1=environmentIsIos,IS_NODE$3=environmentIsNode,set$9=globalThis$c.setImmediate,clear=globalThis$c.clearImmediate,process$2=globalThis$c.process,Dispatch=globalThis$c.Dispatch,Function$2=globalThis$c.Function,MessageChannel=globalThis$c.MessageChannel,String$1=globalThis$c.String,counter=0,queue$2={},ONREADYSTATECHANGE="onreadystatechange";fails$a((function(){$location=globalThis$c.location}));var run=function(e){if(hasOwn$4(queue$2,e)){var t=queue$2[e];delete queue$2[e],t()}},runner=function(e){return function(){run(e)}},eventListener=function(e){run(e.data)},globalPostMessageDefer=function(e){globalThis$c.postMessage(String$1(e),$location.protocol+"//"+$location.host)};set$9&&clear||(set$9=function(e){validateArgumentsLength$1(arguments.length,1);var t=isCallable$7(e)?e:Function$2(e),r=arraySlice$1(arguments,1);return queue$2[++counter]=function(){apply$3(t,void 0,r)},defer(counter),counter},clear=function(e){delete queue$2[e]},IS_NODE$3?defer=function(e){process$2.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=eventListener,defer=bind$l(port.postMessage,port)):globalThis$c.addEventListener&&isCallable$7(globalThis$c.postMessage)&&!globalThis$c.importScripts&&$location&&"file:"!==$location.protocol&&!fails$a(globalPostMessageDefer)?(defer=globalPostMessageDefer,globalThis$c.addEventListener("message",eventListener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$9,clear:clear},globalThis$b=globalThis_1,DESCRIPTORS$3=descriptors,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,safeGetBuiltIn$1=function(e){if(!DESCRIPTORS$3)return globalThis$b[e];var t=getOwnPropertyDescriptor$1(globalThis$b,e);return t&&t.value},Queue$2=function(){this.head=null,this.tail=null};Queue$2.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var notify$1,toggle,node,promise$6,then,queue$1=Queue$2,userAgent$2=environmentUserAgent,environmentIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$2)&&"undefined"!=typeof Pebble,userAgent$1=environmentUserAgent,environmentIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent$1),globalThis$a=globalThis_1,safeGetBuiltIn=safeGetBuiltIn$1,bind$k=functionBindContext,macrotask=task$1.set,Queue$1=queue$1,IS_IOS=environmentIsIos,IS_IOS_PEBBLE=environmentIsIosPebble,IS_WEBOS_WEBKIT=environmentIsWebosWebkit,IS_NODE$2=environmentIsNode,MutationObserver=globalThis$a.MutationObserver||globalThis$a.WebKitMutationObserver,document$2=globalThis$a.document,process$1=globalThis$a.process,Promise$2=globalThis$a.Promise,microtask$1=safeGetBuiltIn("queueMicrotask");if(!microtask$1){var queue=new Queue$1,flush=function(){var e,t;for(IS_NODE$2&&(e=process$1.domain)&&e.exit();t=queue.get();)try{t()}catch(e){throw queue.head&&notify$1(),e}e&&e.enter()};IS_IOS||IS_NODE$2||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$2&&Promise$2.resolve?((promise$6=Promise$2.resolve(void 0)).constructor=Promise$2,then=bind$k(promise$6.then,promise$6),notify$1=function(){then(flush)}):IS_NODE$2?notify$1=function(){process$1.nextTick(flush)}:(macrotask=bind$k(macrotask,globalThis$a),notify$1=function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}),microtask$1=function(e){queue.head||notify$1(),queue.add(e)}}var microtask_1=microtask$1,hostReportErrors$1=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}},perform$6=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},globalThis$9=globalThis_1,promiseNativeConstructor=globalThis$9.Promise,globalThis$8=globalThis_1,NativePromiseConstructor$5=promiseNativeConstructor,isCallable$6=isCallable$n,isForced=isForced_1,inspectSource=inspectSource$2,wellKnownSymbol$4=wellKnownSymbol$o,ENVIRONMENT$1=environment,V8_VERSION=environmentV8Version,NativePromisePrototype$2=NativePromiseConstructor$5&&NativePromiseConstructor$5.prototype,SPECIES$1=wellKnownSymbol$4("species"),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$6(globalThis$8.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",(function(){var e=inspectSource(NativePromiseConstructor$5),t=e!==String(NativePromiseConstructor$5);if(!t&&66===V8_VERSION)return!0;if(!NativePromisePrototype$2.catch||!NativePromisePrototype$2.finally)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){var r=new NativePromiseConstructor$5((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[SPECIES$1]=n,!(SUBCLASSING=r.then((function(){}))instanceof n))return!0}return!(t||"BROWSER"!==ENVIRONMENT$1&&"DENO"!==ENVIRONMENT$1||NATIVE_PROMISE_REJECTION_EVENT$1)})),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$d=aCallable$j,$TypeError$7=TypeError,PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new $TypeError$7("Bad Promise constructor");t=e,r=n})),this.resolve=aCallable$d(t),this.reject=aCallable$d(r)};newPromiseCapability$2.f=function(e){return new PromiseCapability(e)};var $$T=_export,IS_NODE$1=environmentIsNode,globalThis$7=globalThis_1,call$b=functionCall,defineBuiltIn$1=defineBuiltIn$6,setToStringTag$1=setToStringTag$8,setSpecies$1=setSpecies$2,aCallable$c=aCallable$j,isCallable$5=isCallable$n,isObject$6=isObject$k,anInstance$2=anInstance$3,speciesConstructor$1=speciesConstructor$2,task=task$1.set,microtask=microtask_1,hostReportErrors=hostReportErrors$1,perform$5=perform$6,Queue=queue$1,InternalStateModule$2=internalState,NativePromiseConstructor$4=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$7=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT;PromiseConstructorDetection.SUBCLASSING;var Internal,OwnPromiseCapability,PromiseWrapper,getInternalPromiseState=InternalStateModule$2.getterFor(PROMISE),setInternalState$2=InternalStateModule$2.set,NativePromisePrototype$1=NativePromiseConstructor$4&&NativePromiseConstructor$4.prototype,PromiseConstructor=NativePromiseConstructor$4,PromisePrototype=NativePromisePrototype$1,TypeError$1=globalThis$7.TypeError,document$1=globalThis$7.document,process=globalThis$7.process,newPromiseCapability$1=newPromiseCapabilityModule$7.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&globalThis$7.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$6(e)||!isCallable$5(t=e.then))&&t},callReaction=function(e,t){var r,n,o,a=t.value,i=t.state===FULFILLED,s=i?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(i||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),o=!0)),r===e.promise?c(new TypeError$1("Promise-chain cycle")):(n=isThenable(r))?call$b(n,r,l,c):l(r)):c(a)}catch(e){u&&!o&&u.exit(),c(e)}},notify=function(e,t){e.notified||(e.notified=!0,microtask((function(){for(var r,n=e.reactions;r=n.get();)callReaction(r,e);e.notified=!1,t&&!e.rejection&&onUnhandled(e)})))},dispatchEvent=function(e,t,r){var n,o;DISPATCH_EVENT?((n=document$1.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),globalThis$7.dispatchEvent(n)):n={promise:t,reason:r},!NATIVE_PROMISE_REJECTION_EVENT&&(o=globalThis$7["on"+e])?o(n):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",r)},onUnhandled=function(e){call$b(task,globalThis$7,(function(){var t,r=e.facade,n=e.value;if(isUnhandled(e)&&(t=perform$5((function(){IS_NODE$1?process.emit("unhandledRejection",n,r):dispatchEvent(UNHANDLED_REJECTION,r,n)})),e.rejection=IS_NODE$1||isUnhandled(e)?UNHANDLED:HANDLED,t.error))throw t.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){call$b(task,globalThis$7,(function(){var t=e.facade;IS_NODE$1?process.emit("rejectionHandled",t):dispatchEvent(REJECTION_HANDLED,t,e.value)}))},bind$j=function(e,t,r){return function(n){e(t,n,r)}},internalReject=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new TypeError$1("Promise can't be resolved itself");var n=isThenable(t);n?microtask((function(){var r={done:!1};try{call$b(n,t,bind$j(internalResolve,r,e),bind$j(internalReject,r,e))}catch(t){internalReject(r,t,e)}})):(e.value=t,e.state=FULFILLED,notify(e,!1))}catch(t){internalReject({done:!1},t,e)}}};FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance$2(this,PromisePrototype),aCallable$c(e),call$b(Internal,this);var t=getInternalPromiseState(this);try{e(bind$j(internalResolve,t),bind$j(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState$2(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:null})}).prototype=defineBuiltIn$1(PromisePrototype,"then",(function(e,t){var r=getInternalPromiseState(this),n=newPromiseCapability$1(speciesConstructor$1(this,PromiseConstructor));return r.parent=!0,n.ok=!isCallable$5(e)||e,n.fail=isCallable$5(t)&&t,n.domain=IS_NODE$1?process.domain:void 0,r.state===PENDING?r.reactions.add(n):microtask((function(){callReaction(n,r)})),n.promise})),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$j(internalResolve,t),this.reject=bind$j(internalReject,t)},newPromiseCapabilityModule$7.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),$$T({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag$1(PromiseConstructor,PROMISE,!1,!0),setSpecies$1(PROMISE);var wellKnownSymbol$3=wellKnownSymbol$o,ITERATOR$1=wellKnownSymbol$3("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$1]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration$2=function(e,t){try{if(!t&&!SAFE_CLOSING)return!1}catch(e){return!1}var r=!1;try{var n={};n[ITERATOR$1]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},NativePromiseConstructor$3=promiseNativeConstructor,checkCorrectnessOfIteration$1=checkCorrectnessOfIteration$2,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration$1((function(e){NativePromiseConstructor$3.all(e).then(void 0,(function(){}))})),$$S=_export,call$a=functionCall,aCallable$b=aCallable$j,newPromiseCapabilityModule$6=newPromiseCapability$2,perform$4=perform$6,iterate$j=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$3=promiseStaticsIncorrectIteration;$$S({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$3},{all:function(e){var t=this,r=newPromiseCapabilityModule$6.f(t),n=r.resolve,o=r.reject,a=perform$4((function(){var r=aCallable$b(t.resolve),a=[],i=0,s=1;iterate$j(e,(function(e){var l=i++,c=!1;s++,call$a(r,t,e).then((function(e){c||(c=!0,a[l]=e,--s||n(a))}),o)})),--s||n(a)}));return a.error&&o(a.value),r.promise}});var $$R=_export,FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor$2=promiseNativeConstructor;promiseNativeConstructor&&promiseNativeConstructor.prototype,$$R({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}});var $$Q=_export,call$9=functionCall,aCallable$a=aCallable$j,newPromiseCapabilityModule$5=newPromiseCapability$2,perform$3=perform$6,iterate$i=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$2=promiseStaticsIncorrectIteration;$$Q({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$2},{race:function(e){var t=this,r=newPromiseCapabilityModule$5.f(t),n=r.reject,o=perform$3((function(){var o=aCallable$a(t.resolve);iterate$i(e,(function(e){call$9(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var $$P=_export,newPromiseCapabilityModule$4=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR;$$P({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule$4.f(this);return(0,t.reject)(e),t.promise}});var anObject$5=anObject$g,isObject$5=isObject$k,newPromiseCapability=newPromiseCapability$2,promiseResolve$2=function(e,t){if(anObject$5(e),isObject$5(t)&&t.constructor===e)return t;var r=newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},$$O=_export,getBuiltIn$3=getBuiltIn$g,IS_PURE$1=isPure,NativePromiseConstructor$1=promiseNativeConstructor,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve$1=promiseResolve$2,PromiseConstructorWrapper=getBuiltIn$3("Promise"),CHECK_WRAPPER=!FORCED_PROMISE_CONSTRUCTOR;$$O({target:"Promise",stat:!0,forced:IS_PURE$1},{resolve:function(e){return promiseResolve$1(CHECK_WRAPPER&&this===PromiseConstructorWrapper?NativePromiseConstructor$1:this,e)}});var $$N=_export,call$8=functionCall,aCallable$9=aCallable$j,newPromiseCapabilityModule$3=newPromiseCapability$2,perform$2=perform$6,iterate$h=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration;$$N({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION$1},{allSettled:function(e){var t=this,r=newPromiseCapabilityModule$3.f(t),n=r.resolve,o=r.reject,a=perform$2((function(){var r=aCallable$9(t.resolve),o=[],a=0,i=1;iterate$h(e,(function(e){var s=a++,l=!1;i++,call$8(r,t,e).then((function(e){l||(l=!0,o[s]={status:"fulfilled",value:e},--i||n(o))}),(function(e){l||(l=!0,o[s]={status:"rejected",reason:e},--i||n(o))}))})),--i||n(o)}));return a.error&&o(a.value),r.promise}});var $$M=_export,call$7=functionCall,aCallable$8=aCallable$j,getBuiltIn$2=getBuiltIn$g,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$6,iterate$g=iterate$l,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,PROMISE_ANY_ERROR="No one promise resolved";$$M({target:"Promise",stat:!0,forced:PROMISE_STATICS_INCORRECT_ITERATION},{any:function(e){var t=this,r=getBuiltIn$2("AggregateError"),n=newPromiseCapabilityModule$2.f(t),o=n.resolve,a=n.reject,i=perform$1((function(){var n=aCallable$8(t.resolve),i=[],s=0,l=1,c=!1;iterate$g(e,(function(e){var u=s++,$=!1;l++,call$7(n,t,e).then((function(e){$||c||(c=!0,o(e))}),(function(e){$||c||($=!0,i[u]=e,--l||a(new r(i,PROMISE_ANY_ERROR)))}))})),--l||a(new r(i,PROMISE_ANY_ERROR))}));return i.error&&a(i.value),n.promise}});var $$L=_export,globalThis$6=globalThis_1,apply$2=functionApply,slice$7=arraySlice$5,newPromiseCapabilityModule$1=newPromiseCapability$2,aCallable$7=aCallable$j,perform=perform$6,Promise$1=globalThis$6.Promise,ACCEPT_ARGUMENTS=!1,FORCED$4=!Promise$1||!Promise$1.try||perform((function(){Promise$1.try((function(e){ACCEPT_ARGUMENTS=8===e}),8)})).error||!ACCEPT_ARGUMENTS;$$L({target:"Promise",stat:!0,forced:FORCED$4},{try:function(e){var t=arguments.length>1?slice$7(arguments,1):[],r=newPromiseCapabilityModule$1.f(this),n=perform((function(){return apply$2(aCallable$7(e),void 0,t)}));return(n.error?r.reject:r.resolve)(n.value),r.promise}});var $$K=_export,newPromiseCapabilityModule=newPromiseCapability$2;$$K({target:"Promise",stat:!0},{withResolvers:function(){var e=newPromiseCapabilityModule.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var $$J=_export,NativePromiseConstructor=promiseNativeConstructor,fails$9=fails$x,getBuiltIn$1=getBuiltIn$g,isCallable$4=isCallable$n,speciesConstructor=speciesConstructor$2,promiseResolve=promiseResolve$2,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails$9((function(){NativePromisePrototype.finally.call({then:function(){}},(function(){}))}));$$J({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(e){var t=speciesConstructor(this,getBuiltIn$1("Promise")),r=isCallable$4(e);return this.then(r?function(r){return promiseResolve(t,e()).then((function(){return r}))}:e,r?function(r){return promiseResolve(t,e()).then((function(){throw r}))}:e)}});var path$a=path$q,promise$5=path$a.Promise,parent$1e=promise$5,promise$4=parent$1e,parent$1d=promise$4,promise$3=parent$1d,parent$1c=promise$3,promise$2=parent$1c,promise$1=promise$2,_Promise$1=getDefaultExportFromCjs(promise$1),$$I=_export,uncurryThis$a=functionUncurryThis,isArray$8=isArray$d,nativeReverse=uncurryThis$a([].reverse),test=[1,2];$$I({target:"Array",proto:!0,forced:String(test)===String(test.reverse())},{reverse:function(){return isArray$8(this)&&(this.length=this.length),nativeReverse(this)}});var getBuiltInPrototypeMethod$e=getBuiltInPrototypeMethod$i,reverse$5=getBuiltInPrototypeMethod$e("Array","reverse"),isPrototypeOf$f=objectIsPrototypeOf,method$c=reverse$5,ArrayPrototype$b=Array.prototype,reverse$4=function(e){var t=e.reverse;return e===ArrayPrototype$b||isPrototypeOf$f(ArrayPrototype$b,e)&&t===ArrayPrototype$b.reverse?method$c:t},parent$1b=reverse$4,reverse$3=parent$1b,parent$1a=reverse$3,reverse$2=parent$1a,parent$19=reverse$2,reverse$1=parent$19,reverse2=reverse$1,_reverseInstanceProperty=getDefaultExportFromCjs(reverse2),$$H=_export,isArray$7=isArray$d,isConstructor$1=isConstructor$4,isObject$4=isObject$k,toAbsoluteIndex$1=toAbsoluteIndex$3,lengthOfArrayLike$5=lengthOfArrayLike$b,toIndexedObject=toIndexedObject$a,createProperty$2=createProperty$5,wellKnownSymbol$2=wellKnownSymbol$o,arrayMethodHasSpeciesSupport$2=arrayMethodHasSpeciesSupport$5,nativeSlice=arraySlice$5,HAS_SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport$2("slice"),SPECIES=wellKnownSymbol$2("species"),$Array$1=Array,max$1=Math.max;$$H({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$2},{slice:function(e,t){var r,n,o,a=toIndexedObject(this),i=lengthOfArrayLike$5(a),s=toAbsoluteIndex$1(e,i),l=toAbsoluteIndex$1(void 0===t?i:t,i);if(isArray$7(a)&&(r=a.constructor,(isConstructor$1(r)&&(r===$Array$1||isArray$7(r.prototype))||isObject$4(r)&&null===(r=r[SPECIES]))&&(r=void 0),r===$Array$1||void 0===r))return nativeSlice(a,s,l);for(n=new(void 0===r?$Array$1:r)(max$1(l-s,0)),o=0;s<l;s++,o++)s in a&&createProperty$2(n,o,a[s]);return n.length=o,n}});var getBuiltInPrototypeMethod$d=getBuiltInPrototypeMethod$i,slice$6=getBuiltInPrototypeMethod$d("Array","slice"),isPrototypeOf$e=objectIsPrototypeOf,method$b=slice$6,ArrayPrototype$a=Array.prototype,slice$5=function(e){var t=e.slice;return e===ArrayPrototype$a||isPrototypeOf$e(ArrayPrototype$a,e)&&t===ArrayPrototype$a.slice?method$b:t},parent$18=slice$5,slice$4=parent$18,parent$17=slice$4,slice$3=parent$17,parent$16=slice$3,slice$2=parent$16,slice$1=slice$2,_sliceInstanceProperty$1=getDefaultExportFromCjs(slice$1);function _regeneratorRuntime(){
7
7
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
8
- _regeneratorRuntime=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=_Object$defineProperty$1||function(e,t,r){e[t]=r.value},a="function"==typeof _Symbol?_Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,r){return _Object$defineProperty$1(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var a=t&&t.prototype instanceof h?t:h,i=_Object$create$1(a.prototype),s=new R(n||[]);return o(i,"_invoke",{value:T(e,r,s)}),i}function $(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="suspendedYield",d="executing",_="completed",y={};function h(){}function g(){}function b(){}var m={};c(m,i,(function(){return this}));var S=_Object$getPrototypeOf&&_Object$getPrototypeOf(_Object$getPrototypeOf(C([])));S&&S!==r&&n.call(S,i)&&(m=S);var E=b.prototype=h.prototype=_Object$create$1(m);function O(e){var t;_forEachInstanceProperty$1(t=["next","throw","return"]).call(t,(function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,t){function r(o,a,i,s){var l=$(e[o],e,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==_typeof(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function T(t,r,n){var o=p;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===_){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var l=I(s,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=$(t,r,n);if("normal"===c.type){if(o=n.done?_:f,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=_,n.method="throw",n.arg=c.arg)}}}function I(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=$(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(e){var t,r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),_pushInstanceProperty(t=this.tryEntries).call(t,r)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty$1(e).call(e,P,this),this.reset(!0)}function C(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(_typeof(t)+" is not iterable")}return g.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return _Object$setPrototypeOf?_Object$setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=_Object$create$1(E),e},t.awrap=function(e){return{__await:e}},O(v.prototype),c(v.prototype,s,(function(){return this})),t.AsyncIterator=v,t.async=function(e,r,n,o,a){void 0===a&&(a=_Promise$1);var i=new v(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(E),c(E,l,"Generator"),c(E,i,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)_pushInstanceProperty(r).call(r,n);return _reverseInstanceProperty(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=C,R.prototype={constructor:R,reset:function(t){var r;if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,_forEachInstanceProperty$1(r=this.tryEntries).call(r,w),!t)for(var o in this)"t"===o.charAt(0)&&n.call(this,o)&&!isNaN(+_sliceInstanceProperty$1(o).call(o,1))&&(this[o]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),w(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):_Promise$1.resolve(l).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new _Promise$1((function(n,o){var a=e.apply(t,r);function i(e){asyncGeneratorStep(a,n,o,i,s,"next",e)}function s(e){asyncGeneratorStep(a,n,o,i,s,"throw",e)}i(void 0)}))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty$1(e,toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),_Object$defineProperty$1(e,"prototype",{writable:!1}),e}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],(function(){})))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}var $$G=_export,bind$i=functionBind;$$G({target:"Function",proto:!0,forced:Function.bind!==bind$i},{bind:bind$i});var getBuiltInPrototypeMethod$c=getBuiltInPrototypeMethod$i,bind$h=getBuiltInPrototypeMethod$c("Function","bind"),isPrototypeOf$d=objectIsPrototypeOf,method$a=bind$h,FunctionPrototype=Function.prototype,bind$g=function(e){var t=e.bind;return e===FunctionPrototype||isPrototypeOf$d(FunctionPrototype,e)&&t===FunctionPrototype.bind?method$a:t},parent$15=bind$g,bind$f=parent$15,parent$14=bind$f,bind$e=parent$14,parent$13=bind$e,bind$d=parent$13,bind$c=bind$d,_bindInstanceProperty$1=getDefaultExportFromCjs(bind$c);function _getPrototypeOf(e){var t;return(_getPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty$1(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){var r;return(_setPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty$1(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=_Object$create$1(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty$1(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}var defineProperty$3=defineProperty$5,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$3),getOwnPropertyDescriptor5=getOwnPropertyDescriptor$3,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor5),toIntegerOrInfinity$2=toIntegerOrInfinity$6,toString$6=toString$d,requireObjectCoercible$4=requireObjectCoercible$9,$RangeError$1=RangeError,stringRepeat=function(e){var t=toString$6(requireObjectCoercible$4(this)),r="",n=toIntegerOrInfinity$2(e);if(n<0||n===1/0)throw new $RangeError$1("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$9=functionUncurryThis,toLength=toLength$2,toString$5=toString$d,$repeat=stringRepeat,requireObjectCoercible$3=requireObjectCoercible$9,repeat2=uncurryThis$9($repeat),stringSlice=uncurryThis$9("".slice),ceil=Math.ceil,createMethod$2=function(e){return function(t,r,n){var o,a,i=toString$5(requireObjectCoercible$3(t)),s=toLength(r),l=i.length,c=void 0===n?" ":toString$5(n);return s<=l||""===c?i:((a=repeat2(c,ceil((o=s-l)/c.length))).length>o&&(a=stringSlice(a,0,o)),e?i+a:a+i)}},stringPad={start:createMethod$2(!1),end:createMethod$2(!0)},uncurryThis$8=functionUncurryThis,fails$8=fails$x,padStart$7=stringPad.start,$RangeError=RangeError,$isFinite=isFinite,abs=Math.abs,DatePrototype=Date.prototype,nativeDateToISOString=DatePrototype.toISOString,thisTimeValue$1=uncurryThis$8(DatePrototype.getTime),getUTCDate=uncurryThis$8(DatePrototype.getUTCDate),getUTCFullYear=uncurryThis$8(DatePrototype.getUTCFullYear),getUTCHours=uncurryThis$8(DatePrototype.getUTCHours),getUTCMilliseconds=uncurryThis$8(DatePrototype.getUTCMilliseconds),getUTCMinutes=uncurryThis$8(DatePrototype.getUTCMinutes),getUTCMonth=uncurryThis$8(DatePrototype.getUTCMonth),getUTCSeconds=uncurryThis$8(DatePrototype.getUTCSeconds),dateToIsoString=fails$8((function(){return"0385-07-25T07:06:39.999Z"!==nativeDateToISOString.call(new Date(-50000000000001))}))||!fails$8((function(){nativeDateToISOString.call(new Date(NaN))}))?function(){if(!$isFinite(thisTimeValue$1(this)))throw new $RangeError("Invalid time value");var e=this,t=getUTCFullYear(e),r=getUTCMilliseconds(e),n=t<0?"-":t>9999?"+":"";return n+padStart$7(abs(t),n?6:4,0)+"-"+padStart$7(getUTCMonth(e)+1,2,0)+"-"+padStart$7(getUTCDate(e),2,0)+"T"+padStart$7(getUTCHours(e),2,0)+":"+padStart$7(getUTCMinutes(e),2,0)+":"+padStart$7(getUTCSeconds(e),2,0)+"."+padStart$7(r,3,0)+"Z"}:nativeDateToISOString,$$F=_export,call$6=functionCall,toObject$6=toObject$f,toPrimitive=toPrimitive$8,toISOString2=dateToIsoString,classof$4=classofRaw$2,fails$7=fails$x,FORCED$3=fails$7((function(){return null!==new Date(NaN).toJSON()||1!==call$6(Date.prototype.toJSON,{toISOString:function(){return 1}})}));$$F({target:"Date",proto:!0,forced:FORCED$3},{toJSON:function(e){var t=toObject$6(this),r=toPrimitive(t,"number");return"number"!=typeof r||isFinite(r)?"toISOString"in t||"Date"!==classof$4(t)?t.toISOString():call$6(toISOString2,t):null}});var path$9=path$q,apply$1=functionApply;path$9.JSON||(path$9.JSON={stringify:JSON.stringify});var stringify$6=function(e,t,r){return apply$1(path$9.JSON.stringify,null,arguments)},parent$12=stringify$6,stringify$5=parent$12,parent$11=stringify$5,stringify$4=parent$11,parent$10=stringify$4,stringify$3=parent$10,stringify$2=stringify$3,stringify$1=stringify$2,_JSON$stringify=getDefaultExportFromCjs(stringify$1),forEach$1=forEach$2,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$1),keys$7=keys$8,_Object$keys=getDefaultExportFromCjs(keys$7),promise=promise$1,_Promise=getDefaultExportFromCjs(promise),whitespaces$2="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis$7=functionUncurryThis,requireObjectCoercible$2=requireObjectCoercible$9,toString$4=toString$d,whitespaces$1=whitespaces$2,replace=uncurryThis$7("".replace),ltrim=RegExp("^["+whitespaces$1+"]+"),rtrim=RegExp("(^|[^"+whitespaces$1+"])["+whitespaces$1+"]+$"),createMethod$1=function(e){return function(t){var r=toString$4(requireObjectCoercible$2(t));return 1&e&&(r=replace(r,ltrim,"")),2&e&&(r=replace(r,rtrim,"$1")),r}},stringTrim={start:createMethod$1(1),end:createMethod$1(2),trim:createMethod$1(3)},globalThis$5=globalThis_1,fails$6=fails$x,uncurryThis$6=functionUncurryThis,toString$3=toString$d,trim=stringTrim.trim,whitespaces=whitespaces$2,$parseInt$1=globalThis$5.parseInt,Symbol$1=globalThis$5.Symbol,ITERATOR=Symbol$1&&Symbol$1.iterator,hex=/^[+-]?0x/i,exec=uncurryThis$6(hex.exec),FORCED$2=8!==$parseInt$1(whitespaces+"08")||22!==$parseInt$1(whitespaces+"0x16")||ITERATOR&&!fails$6((function(){$parseInt$1(Object(ITERATOR))})),numberParseInt=FORCED$2?function(e,t){var r=trim(toString$3(e));return $parseInt$1(r,t>>>0||(exec(hex,r)?16:10))}:$parseInt$1,$$E=_export,$parseInt=numberParseInt;$$E({global:!0,forced:parseInt!==numberParseInt},{parseInt:numberParseInt});var path$8=path$q,_parseInt$6=path$8.parseInt,parent$$=_parseInt$6,_parseInt$5=parent$$,parent$_=_parseInt$5,_parseInt$4=parent$_,parent$Z=_parseInt$4,_parseInt$3=parent$Z,_parseInt$2=_parseInt$3,_parseInt=_parseInt$2,_parseInt$1=getDefaultExportFromCjs(_parseInt),$$D=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("map");$$D({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{map:function(e){return $map(this,e,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$b=getBuiltInPrototypeMethod$i,map$c=getBuiltInPrototypeMethod$b("Array","map"),isPrototypeOf$c=objectIsPrototypeOf,method$9=map$c,ArrayPrototype$9=Array.prototype,map$b=function(e){var t=e.map;return e===ArrayPrototype$9||isPrototypeOf$c(ArrayPrototype$9,e)&&t===ArrayPrototype$9.map?method$9:t},parent$Y=map$b,map$a=parent$Y,parent$X=map$a,map$9=parent$X,parent$W=map$9,map$8=parent$W,map$7=map$8,map$6=map$7,_mapInstanceProperty=getDefaultExportFromCjs(map$6),slice2=slice$1,_sliceInstanceProperty=getDefaultExportFromCjs(slice2),$$C=_export,$every=arrayIteration.every,arrayMethodIsStrict$2=arrayMethodIsStrict$4,STRICT_METHOD=arrayMethodIsStrict$2("every");$$C({target:"Array",proto:!0,forced:!STRICT_METHOD},{every:function(e){return $every(this,e,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$a=getBuiltInPrototypeMethod$i,every$6=getBuiltInPrototypeMethod$a("Array","every"),isPrototypeOf$b=objectIsPrototypeOf,method$8=every$6,ArrayPrototype$8=Array.prototype,every$5=function(e){var t=e.every;return e===ArrayPrototype$8||isPrototypeOf$b(ArrayPrototype$8,e)&&t===ArrayPrototype$8.every?method$8:t},parent$V=every$5,every$4=parent$V,parent$U=every$4,every$3=parent$U,parent$T=every$3,every$2=parent$T,every$1=every$2,every2=every$1,_everyInstanceProperty=getDefaultExportFromCjs(every2),getBuiltInPrototypeMethod$9=getBuiltInPrototypeMethod$i,concat$7=getBuiltInPrototypeMethod$9("Array","concat"),isPrototypeOf$a=objectIsPrototypeOf,method$7=concat$7,ArrayPrototype$7=Array.prototype,concat$6=function(e){var t=e.concat;return e===ArrayPrototype$7||isPrototypeOf$a(ArrayPrototype$7,e)&&t===ArrayPrototype$7.concat?method$7:t},parent$S=concat$6,concat$5=parent$S,parent$R=concat$5,concat$4=parent$R,parent$Q=concat$4,concat$3=parent$Q,concat$2=concat$3,concat$1=concat$2,_concatInstanceProperty=getDefaultExportFromCjs(concat$1),create$1=create$3,_Object$create=getDefaultExportFromCjs(create$1),getOwnPropertySymbols2=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols2),eventemitter3={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,a||e,i),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}_Object$create&&(n.prototype=_Object$create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?_sliceInstanceProperty(n).call(n,1):n);return _Object$getOwnPropertySymbols?_concatInstanceProperty(o).call(o,_Object$getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,a=n.length,i=new Array(a);o<a;o++)i[o]=n[o].fn;return i},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,a,i){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],$=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),$){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,a),!0;case 6:return u.fn.call(u.context,t,n,o,a,i),!0}for(c=1,l=new Array($-1);c<$;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),$){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,o);break;default:if(!l)for(p=1,l=new Array($-1);p<$;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||i(this,a);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&i(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(eventemitter3);var eventemitter3Exports=eventemitter3.exports;function _callSuper$3(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?_Reflect$construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}var ExtensionBase=function(){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _defineProperty(r=_callSuper$3(this,e,_concatInstanceProperty(t=[]).call(t,o)),"monitor",void 0),_defineProperty(r,"logger",void 0),r}return _inherits(e,eventemitter3Exports.EventEmitter),_createClass(e,[{key:"isSupported",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"_reportName",get:function(){return"plugin<".concat(this.name,">")}}]);var t}(),getIteratorMethod$5=getIteratorMethod$8,getIteratorMethod_1=getIteratorMethod$5,parent$P=getIteratorMethod_1,getIteratorMethod$4=parent$P,parent$O=getIteratorMethod$4,getIteratorMethod$3=parent$O,parent$N=getIteratorMethod$3,getIteratorMethod$2=parent$N,getIteratorMethod$1=getIteratorMethod$2,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$1),$$B=_export,isArray$6=isArray$d;$$B({target:"Array",stat:!0},{isArray:isArray$6});var path$7=path$q,isArray$5=path$7.Array.isArray,parent$M=isArray$5,isArray$4=parent$M,parent$L=isArray$4,isArray$3=parent$L,parent$K=isArray$3,isArray$2=parent$K,isArray$1=isArray$2,_Array$isArray=getDefaultExportFromCjs(isArray$1),anObject$4=anObject$g,iteratorClose=iteratorClose$2,callWithSafeIterationClosing$1=function(e,t,r,n){try{return n?t(anObject$4(r)[0],r[1]):t(r)}catch(t){iteratorClose(e,"throw",t)}},bind$b=functionBindContext,call$5=functionCall,toObject$5=toObject$f,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod=isArrayIteratorMethod$2,isConstructor3=isConstructor$4,lengthOfArrayLike$4=lengthOfArrayLike$b,createProperty$1=createProperty$5,getIterator=getIterator$2,getIteratorMethod=getIteratorMethod$8,$Array=Array,arrayFrom=function(e){var t=toObject$5(e),r=isConstructor3(this),n=arguments.length,o=n>1?arguments[1]:void 0,a=void 0!==o;a&&(o=bind$b(o,n>2?arguments[2]:void 0));var i,s,l,c,u,$,p=getIteratorMethod(t),f=0;if(!p||this===$Array&&isArrayIteratorMethod(p))for(i=lengthOfArrayLike$4(t),s=r?new this(i):$Array(i);i>f;f++)$=a?o(t[f],f):t[f],createProperty$1(s,f,$);else for(s=r?new this:[],u=(c=getIterator(t,p)).next;!(l=call$5(u,c)).done;f++)$=a?callWithSafeIterationClosing(c,o,[l.value,f],!0):l.value,createProperty$1(s,f,$);return s.length=f,s},$$A=_export,from$5=arrayFrom,checkCorrectnessOfIteration=checkCorrectnessOfIteration$2,INCORRECT_ITERATION=!checkCorrectnessOfIteration((function(e){Array.from(e)}));$$A({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$5});var path$6=path$q,from$4=path$6.Array.from,parent$J=from$4,from$3=parent$J,parent$I=from$3,from$2=parent$I,parent$H=from$2,from$1=parent$H,from2=from$1,_Array$from=getDefaultExportFromCjs(from2);function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){if(e){var r;if("string"==typeof e)return _arrayLikeToArray(e,t);var n=_sliceInstanceProperty$1(r={}.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}var internalMetadata={exports:{}},fails$5=fails$x,arrayBufferNonExtensible=fails$5((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$4=fails$x,isObject$3=isObject$k,classof$3=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES=fails$4((function(){$isExtensible(1)})),objectIsExtensible=FAILS_ON_PRIMITIVES||ARRAY_BUFFER_NON_EXTENSIBLE?function(e){return!!isObject$3(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE||"ArrayBuffer"!==classof$3(e))&&(!$isExtensible||$isExtensible(e)))}:$isExtensible,fails$3=fails$x,freezing=!fails$3((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$z=_export,uncurryThis$5=functionUncurryThis,hiddenKeys=hiddenKeys$6,isObject$2=isObject$k,hasOwn$3=hasOwnProperty_1,defineProperty$2=objectDefineProperty.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible2=objectIsExtensible,uid=uid$4,FREEZING=freezing,REQUIRED=!1,METADATA=uid("meta"),id=0,setMetadata=function(e){defineProperty$2(e,METADATA,{value:{objectID:"O"+id++,weakData:{}}})},fastKey$1=function(e,t){if(!isObject$2(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn$3(e,METADATA)){if(!isExtensible2(e))return"F";if(!t)return"E";setMetadata(e)}return e[METADATA].objectID},getWeakData=function(e,t){if(!hasOwn$3(e,METADATA)){if(!isExtensible2(e))return!0;if(!t)return!1;setMetadata(e)}return e[METADATA].weakData},onFreeze=function(e){return FREEZING&&REQUIRED&&isExtensible2(e)&&!hasOwn$3(e,METADATA)&&setMetadata(e),e},enable=function(){meta.enable=function(){},REQUIRED=!0;var e=getOwnPropertyNamesModule.f,t=uncurryThis$5([].splice),r={};r[METADATA]=1,e(r).length&&(getOwnPropertyNamesModule.f=function(r){for(var n=e(r),o=0,a=n.length;o<a;o++)if(n[o]===METADATA){t(n,o,1);break}return n},$$z({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule.f}))},meta=internalMetadata.exports={enable:enable,fastKey:fastKey$1,getWeakData:getWeakData,onFreeze:onFreeze};hiddenKeys[METADATA]=!0;var internalMetadataExports=internalMetadata.exports,$$y=_export,globalThis$4=globalThis_1,InternalMetadataModule=internalMetadataExports,fails$2=fails$x,createNonEnumerableProperty=createNonEnumerableProperty$8,iterate$f=iterate$l,anInstance$1=anInstance$3,isCallable$3=isCallable$n,isObject$1=isObject$k,isNullOrUndefined$1=isNullOrUndefined$6,setToStringTag=setToStringTag$8,defineProperty$1=objectDefineProperty.f,forEach2=arrayIteration.forEach,DESCRIPTORS$2=descriptors,InternalStateModule$1=internalState,setInternalState$1=InternalStateModule$1.set,internalStateGetterFor$1=InternalStateModule$1.getterFor,collection$1=function(e,t,r){var n,o=-1!==e.indexOf("Map"),a=-1!==e.indexOf("Weak"),i=o?"set":"add",s=globalThis$4[e],l=s&&s.prototype,c={};if(DESCRIPTORS$2&&isCallable$3(s)&&(a||l.forEach&&!fails$2((function(){(new s).entries().next()})))){var u=(n=t((function(t,r){setInternalState$1(anInstance$1(t,u),{type:e,collection:new s}),isNullOrUndefined$1(r)||iterate$f(r,t[i],{that:t,AS_ENTRIES:o})}))).prototype,$=internalStateGetterFor$1(e);forEach2(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"===e||"set"===e;!(e in l)||a&&"clear"===e||createNonEnumerableProperty(u,e,(function(r,n){var o=$(this).collection;if(!t&&a&&!isObject$1(r))return"get"===e&&void 0;var i=o[e](0===r?0:r,n);return t?this:i}))})),a||defineProperty$1(u,"size",{configurable:!0,get:function(){return $(this).collection.size}})}else n=r.getConstructor(t,e,o,i),InternalMetadataModule.enable();return setToStringTag(n,e,!1,!0),c[e]=n,$$y({global:!0,forced:!0},c),a||r.setStrong(n,e,o),n},defineBuiltIn=defineBuiltIn$6,defineBuiltIns$1=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:defineBuiltIn(e,n,t[n],r);return e},create4=objectCreate,defineBuiltInAccessor=defineBuiltInAccessor$3,defineBuiltIns=defineBuiltIns$1,bind$a=functionBindContext,anInstance=anInstance$3,isNullOrUndefined=isNullOrUndefined$6,iterate$e=iterate$l,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$3,setSpecies=setSpecies$2,DESCRIPTORS$1=descriptors,fastKey=internalMetadataExports.fastKey,InternalStateModule=internalState,setInternalState=InternalStateModule.set,internalStateGetterFor=InternalStateModule.getterFor,collectionStrong$1={getConstructor:function(e,t,r,n){var o=e((function(e,o){anInstance(e,a),setInternalState(e,{type:t,index:create4(null),first:null,last:null,size:0}),DESCRIPTORS$1||(e.size=0),isNullOrUndefined(o)||iterate$e(o,e[n],{that:e,AS_ENTRIES:r})})),a=o.prototype,i=internalStateGetterFor(t),s=function(e,t,r){var n,o,a=i(e),s=l(e,t);return s?s.value=r:(a.last=s={index:o=fastKey(t,!0),key:t,value:r,previous:n=a.last,next:null,removed:!1},a.first||(a.first=s),n&&(n.next=s),DESCRIPTORS$1?a.size++:e.size++,"F"!==o&&(a.index[o]=s)),e},l=function(e,t){var r,n=i(e),o=fastKey(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===t)return r};return defineBuiltIns(a,{clear:function(){for(var e=i(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=create4(null),DESCRIPTORS$1?e.size=0:this.size=0},delete:function(e){var t=this,r=i(t),n=l(t,e);if(n){var o=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=o),o&&(o.previous=a),r.first===n&&(r.first=o),r.last===n&&(r.last=a),DESCRIPTORS$1?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=i(this),n=bind$a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),defineBuiltIns(a,r?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),DESCRIPTORS$1&&defineBuiltInAccessor(a,"size",{configurable:!0,get:function(){return i(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=internalStateGetterFor(t),a=internalStateGetterFor(n);defineIterator(e,t,(function(e,t){setInternalState(this,{type:n,target:e,state:o(e),kind:t,last:null})}),(function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?createIterResultObject("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=null,createIterResultObject(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies(t)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong);var caller$1=function(e,t){return 1===t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},getBuiltIn=getBuiltIn$g,caller=caller$1,Map$5=getBuiltIn("Map"),mapHelpers={Map:Map$5,set:caller("set",2),get:caller("get",1),has:caller("has",1),remove:caller("delete",1),proto:Map$5.prototype},$$x=_export,uncurryThis$4=functionUncurryThis,aCallable$6=aCallable$j,requireObjectCoercible$1=requireObjectCoercible$9,iterate$d=iterate$l,MapHelpers$9=mapHelpers,IS_PURE=isPure,Map$4=MapHelpers$9.Map,has$4=MapHelpers$9.has,get$4=MapHelpers$9.get,set$8=MapHelpers$9.set,push2=uncurryThis$4([].push);$$x({target:"Map",stat:!0,forced:IS_PURE},{groupBy:function(e,t){requireObjectCoercible$1(e),aCallable$6(t);var r=new Map$4,n=0;return iterate$d(e,(function(e){var o=t(e,n++);has$4(r,o)?push2(get$4(r,o),e):set$8(r,o,[e])})),r}});var path$5=path$q,map$5=path$5.Map,parent$G=map$5,map$4=parent$G,parent$F=map$4,map$3=parent$F,bind$9=functionBindContext,anObject$3=anObject$g,toObject$4=toObject$f,iterate$c=iterate$l,collectionFrom=function(e,t,r){return function(n){var o=toObject$4(n),a=arguments.length,i=a>1?arguments[1]:void 0,s=void 0!==i,l=s?bind$9(i,a>2?arguments[2]:void 0):void 0,c=new e,u=0;return iterate$c(o,(function(e){var n=s?l(e,u++):e;r?t(c,anObject$3(n)[0],n[1]):t(c,n)})),c}},$$w=_export,MapHelpers$8=mapHelpers,createCollectionFrom=collectionFrom;$$w({target:"Map",stat:!0,forced:!0},{from:createCollectionFrom(MapHelpers$8.Map,MapHelpers$8.set,!0)});var anObject$2=anObject$g,collectionOf=function(e,t,r){return function(){for(var n=new e,o=arguments.length,a=0;a<o;a++){var i=arguments[a];r?t(n,anObject$2(i)[0],i[1]):t(n,i)}return n}},$$v=_export,MapHelpers$7=mapHelpers,createCollectionOf=collectionOf;$$v({target:"Map",stat:!0,forced:!0},{of:createCollectionOf(MapHelpers$7.Map,MapHelpers$7.set,!0)});var $$u=_export,call$4=functionCall,iterate$b=iterate$l,isCallable$2=isCallable$n,aCallable$5=aCallable$j,Map$3=mapHelpers.Map;$$u({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(isCallable$2(this)?this:Map$3);aCallable$5(t);var n=aCallable$5(r.set);return iterate$b(e,(function(e){call$4(n,r,t(e),e)})),r}});var tryToString$1=tryToString$7,$TypeError$6=TypeError,aMap$g=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw new $TypeError$6(tryToString$1(e)+" is not a map")},$$t=_export,aMap$f=aMap$g,remove=mapHelpers.remove;$$t({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aMap$f(this),r=!0,n=0,o=arguments.length;n<o;n++)e=remove(t,arguments[n]),r=r&&e;return!!r}});var $$s=_export,aMap$e=aMap$g,MapHelpers$6=mapHelpers,get$3=MapHelpers$6.get,has$3=MapHelpers$6.has,set$7=MapHelpers$6.set;$$s({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,o=aMap$e(this);return has$3(o,e)?(r=get$3(o,e),"update"in t&&(r=t.update(r,e,o),set$7(o,e,r)),r):(n=t.insert(e,o),set$7(o,e,n),n)}});var call$3=functionCall,iterateSimple$1=function(e,t,r){for(var n,o,a=r?e:e.iterator,i=e.next;!(n=call$3(i,a)).done;)if(void 0!==(o=t(n.value)))return o},iterateSimple=iterateSimple$1,mapIterate=function(e,t,r){return r?iterateSimple(e.entries(),(function(e){return t(e[1],e[0])}),!0):e.forEach(t)},$$r=_export,bind$8=functionBindContext,aMap$d=aMap$g,iterate$a=mapIterate;$$r({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=aMap$d(this),r=bind$8(e,arguments.length>1?arguments[1]:void 0);return!1!==iterate$a(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var $$q=_export,bind$7=functionBindContext,aMap$c=aMap$g,MapHelpers$5=mapHelpers,iterate$9=mapIterate,Map$2=MapHelpers$5.Map,set$6=MapHelpers$5.set;$$q({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aMap$c(this),r=bind$7(e,arguments.length>1?arguments[1]:void 0),n=new Map$2;return iterate$9(t,(function(e,o){r(e,o,t)&&set$6(n,o,e)})),n}});var $$p=_export,bind$6=functionBindContext,aMap$b=aMap$g,iterate$8=mapIterate;$$p({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=aMap$b(this),r=bind$6(e,arguments.length>1?arguments[1]:void 0),n=iterate$8(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var $$o=_export,bind$5=functionBindContext,aMap$a=aMap$g,iterate$7=mapIterate;$$o({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=aMap$a(this),r=bind$5(e,arguments.length>1?arguments[1]:void 0),n=iterate$7(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var sameValueZero$1=function(e,t){return e===t||e!=e&&t!=t},$$n=_export,sameValueZero=sameValueZero$1,aMap$9=aMap$g,iterate$6=mapIterate;$$n({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iterate$6(aMap$9(this),(function(t){if(sameValueZero(t,e))return!0}),!0)}});var $$m=_export,aMap$8=aMap$g,MapHelpers$4=mapHelpers,get$2=MapHelpers$4.get,has$2=MapHelpers$4.has,set$5=MapHelpers$4.set;$$m({target:"Map",proto:!0,real:!0,forced:!0},{getOrInsert:function(e,t){return has$2(aMap$8(this),e)?get$2(this,e):(set$5(this,e,t),t)}});var $$l=_export,aCallable$4=aCallable$j,aMap$7=aMap$g,MapHelpers$3=mapHelpers,get$1=MapHelpers$3.get,has$1=MapHelpers$3.has,set$4=MapHelpers$3.set;$$l({target:"Map",proto:!0,real:!0,forced:!0},{getOrInsertComputed:function(e,t){if(aMap$7(this),aCallable$4(t),has$1(this,e))return get$1(this,e);0===e&&1/e==-1/0&&(e=0);var r=t(e);return set$4(this,e,r),r}});var $$k=_export,aMap$6=aMap$g,iterate$5=mapIterate;$$k({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=iterate$5(aMap$6(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var $$j=_export,bind$4=functionBindContext,aMap$5=aMap$g,MapHelpers$2=mapHelpers,iterate$4=mapIterate,Map$1=MapHelpers$2.Map,set$3=MapHelpers$2.set;$$j({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=aMap$5(this),r=bind$4(e,arguments.length>1?arguments[1]:void 0),n=new Map$1;return iterate$4(t,(function(e,o){set$3(n,r(e,o,t),e)})),n}});var $$i=_export,bind$3=functionBindContext,aMap$4=aMap$g,MapHelpers$1=mapHelpers,iterate$3=mapIterate,Map=MapHelpers$1.Map,set$2=MapHelpers$1.set;$$i({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=aMap$4(this),r=bind$3(e,arguments.length>1?arguments[1]:void 0),n=new Map;return iterate$3(t,(function(e,o){set$2(n,o,r(e,o,t))})),n}});var $$h=_export,aMap$3=aMap$g,iterate$2=iterate$l,set$1=mapHelpers.set;$$h({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=aMap$3(this),r=arguments.length,n=0;n<r;)iterate$2(arguments[n++],(function(e,r){set$1(t,e,r)}),{AS_ENTRIES:!0});return t}});var $$g=_export,aCallable$3=aCallable$j,aMap$2=aMap$g,iterate$1=mapIterate,$TypeError$5=TypeError;$$g({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aMap$2(this),r=arguments.length<2,n=r?void 0:arguments[1];if(aCallable$3(e),iterate$1(t,(function(o,a){r?(r=!1,n=o):n=e(n,o,a,t)})),r)throw new $TypeError$5("Reduce of empty map with no initial value");return n}});var $$f=_export,bind$2=functionBindContext,aMap$1=aMap$g,iterate=mapIterate;$$f({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=aMap$1(this),r=bind$2(e,arguments.length>1?arguments[1]:void 0);return!0===iterate(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var $$e=_export,aCallable$2=aCallable$j,aMap=aMap$g,MapHelpers=mapHelpers,$TypeError$4=TypeError,get=MapHelpers.get,has=MapHelpers.has,set=MapHelpers.set;$$e({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=aMap(this),n=arguments.length;aCallable$2(t);var o=has(r,e);if(!o&&n<3)throw new $TypeError$4("Updating absent value");var a=o?get(r,e):aCallable$2(n>2?arguments[2]:void 0)(e,r);return set(r,e,t(a,e,r)),r}});var call$2=functionCall,aCallable$1=aCallable$j,isCallable$1=isCallable$n,anObject$1=anObject$g,$TypeError$3=TypeError,mapUpsert=function(e,t){var r,n=anObject$1(this),o=aCallable$1(n.get),a=aCallable$1(n.has),i=aCallable$1(n.set),s=arguments.length>2?arguments[2]:void 0;if(!isCallable$1(t)&&!isCallable$1(s))throw new $TypeError$3("At least one callback required");return call$2(a,n,e)?(r=call$2(o,n,e),isCallable$1(t)&&(r=t(r),call$2(i,n,e,r))):isCallable$1(s)&&(r=s(),call$2(i,n,e,r)),r},$$d=_export,upsert$1=mapUpsert;$$d({target:"Map",proto:!0,real:!0,forced:!0},{upsert:upsert$1});var $$c=_export,upsert2=mapUpsert;$$c({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:upsert2});var parent$E=map$3,map$2=parent$E,map$1=map$2,map2=map$1,_Map=getDefaultExportFromCjs(map2),RTCExtensionType=function(e){return e[e.CAPTURE=0]="CAPTURE",e[e.PRE_PROCESSING=1]="PRE_PROCESSING",e[e.ENCODE=2]="ENCODE",e[e.TRANSFER=3]="TRANSFER",e[e.POST_PROCESSING=4]="POST_PROCESSING",e[e.DECODE=5]="DECODE",e[e.RENDERING=6]="RENDERING",e}(RTCExtensionType||{}),StreamIndex=function(e){return e[e.STREAM_INDEX_MAIN=0]="STREAM_INDEX_MAIN",e[e.STREAM_INDEX_SCREEN=1]="STREAM_INDEX_SCREEN",e}(StreamIndex||{});function _callSuper$2(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?_Reflect$construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}var PreProcessingExtension=function(){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _defineProperty(r=_callSuper$2(this,e,_concatInstanceProperty(t=[]).call(t,o)),"type",RTCExtensionType.PRE_PROCESSING),r}return _inherits(e,ExtensionBase),_createClass(e)}();function reportExtensionApiCall(e,t,r){var n=r.value;r.value=function(){for(var e,r=this.monitor,o=this.name,a=_concatInstanceProperty(e="".concat(o,".")).call(e,t),i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];null==r||r.report("rtc_sdk_api_call",{sdk_api_name:a,message:_JSON$stringify(s),error_code:0});var c=n.apply(this,s);return"function"==typeof(null==c?void 0:c.then)?c.then((function(e){return null==r||r.report("rtc_sdk_callback",{sdk_callback_name:a,error_code:0,message:_JSON$stringify(e||{})}),e})).catch((function(e){throw null==r||r.report("rtc_sdk_callback",{sdk_callback_name:a,error_code:e.code||-1,message:e.message||""}),e})):(null==r||r.report("rtc_sdk_callback",{sdk_callback_name:a,error_code:0,message:c||""}),c)}}var getBuiltInPrototypeMethod$8=getBuiltInPrototypeMethod$i,values$6=getBuiltInPrototypeMethod$8("Array","values"),parent$D=values$6,values$5=parent$D,classof$2=classof$e,hasOwn$2=hasOwnProperty_1,isPrototypeOf$9=objectIsPrototypeOf,method$6=values$5,ArrayPrototype$6=Array.prototype,DOMIterables$1={DOMTokenList:!0,NodeList:!0},values$4=function(e){var t=e.values;return e===ArrayPrototype$6||isPrototypeOf$9(ArrayPrototype$6,e)&&t===ArrayPrototype$6.values||hasOwn$2(DOMIterables$1,classof$2(e))?method$6:t},parent$C=values$4,values$3=parent$C,parent$B=values$3,values$2=parent$B,values$1=values$2,values=values$1,_valuesInstanceProperty=getDefaultExportFromCjs(values),$$b=_export,uncurryThis$3=functionUncurryThis,$Date=Date,thisTimeValue=uncurryThis$3($Date.prototype.getTime);$$b({target:"Date",stat:!0},{now:function(){return thisTimeValue(new $Date)}});var path$4=path$q,now$5=path$4.Date.now,parent$A=now$5,now$4=parent$A,parent$z=now$4,now$3=parent$z,parent$y=now$3,now$2=parent$y,now$1=now$2,now2=now$1,_Date$now=getDefaultExportFromCjs(now2),globalThis$3=globalThis_1,apply=functionApply,isCallable=isCallable$n,ENVIRONMENT=environment,USER_AGENT=environmentUserAgent,arraySlice=arraySlice$5,validateArgumentsLength=validateArgumentsLength$2,Function$1=globalThis$3.Function,WRAP=/MSIE .\./.test(USER_AGENT)||"BUN"===ENVIRONMENT&&function(){var e=globalThis$3.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}(),schedulersFix$2=function(e,t){var r=t?2:1;return WRAP?function(n,o){var a=validateArgumentsLength(arguments.length,1)>r,i=isCallable(n)?n:Function$1(n),s=a?arraySlice(arguments,r):[],l=a?function(){apply(i,this,s)}:i;return t?e(l,o):e(l)}:e},$$a=_export,globalThis$2=globalThis_1,schedulersFix$1=schedulersFix$2,setInterval$5=schedulersFix$1(globalThis$2.setInterval,!0);$$a({global:!0,bind:!0,forced:globalThis$2.setInterval!==setInterval$5},{setInterval:setInterval$5});var $$9=_export,globalThis$1=globalThis_1,schedulersFix=schedulersFix$2,setTimeout$6=schedulersFix(globalThis$1.setTimeout,!0);$$9({global:!0,bind:!0,forced:globalThis$1.setTimeout!==setTimeout$6},{setTimeout:setTimeout$6});var path$3=path$q,setTimeout$5=path$3.setTimeout,parent$x=setTimeout$5,setTimeout$4=parent$x,parent$w=setTimeout$4,setTimeout$3=parent$w,setTimeout$2=setTimeout$3,setTimeout$1=setTimeout$2,_setTimeout=getDefaultExportFromCjs(setTimeout$1),getBuiltInPrototypeMethod$7=getBuiltInPrototypeMethod$i,keys$6=getBuiltInPrototypeMethod$7("Array","keys"),parent$v=keys$6,keys$5=parent$v,classof$1=classof$e,hasOwn$1=hasOwnProperty_1,isPrototypeOf$8=objectIsPrototypeOf,method$5=keys$5,ArrayPrototype$5=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},keys$4=function(e){var t=e.keys;return e===ArrayPrototype$5||isPrototypeOf$8(ArrayPrototype$5,e)&&t===ArrayPrototype$5.keys||hasOwn$1(DOMIterables,classof$1(e))?method$5:t},parent$u=keys$4,keys$3=parent$u,parent$t=keys$3,keys$2=parent$t,keys$1=keys$2,keys3=keys$1,_keysInstanceProperty=getDefaultExportFromCjs(keys3),$$8=_export,$includes=arrayIncludes.includes,fails$1=fails$x,BROKEN_ON_SPARSE=fails$1((function(){return!Array(1).includes()}));$$8({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$6=getBuiltInPrototypeMethod$i,includes$7=getBuiltInPrototypeMethod$6("Array","includes"),isObject=isObject$k,classof=classofRaw$2,wellKnownSymbol$1=wellKnownSymbol$o,MATCH$2=wellKnownSymbol$1("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$2])?!!t:"RegExp"===classof(e))},isRegExp=isRegexp,$TypeError$2=TypeError,notARegexp=function(e){if(isRegExp(e))throw new $TypeError$2("The method doesn't accept regular expressions");return e},wellKnownSymbol=wellKnownSymbol$o,MATCH$1=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH$1]=!1,"/./"[e](t)}catch(e){}}return!1},$$7=_export,uncurryThis$2=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$9,toString$2=toString$d,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=uncurryThis$2("".indexOf);$$7({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString$2(requireObjectCoercible(this)),toString$2(notARegExp(e)),arguments.length>1?arguments[1]:void 0)}});var getRandomValues,getBuiltInPrototypeMethod$5=getBuiltInPrototypeMethod$i,includes$6=getBuiltInPrototypeMethod$5("String","includes"),isPrototypeOf$7=objectIsPrototypeOf,arrayMethod=includes$7,stringMethod=includes$6,ArrayPrototype$4=Array.prototype,StringPrototype$1=String.prototype,includes$5=function(e){var t=e.includes;return e===ArrayPrototype$4||isPrototypeOf$7(ArrayPrototype$4,e)&&t===ArrayPrototype$4.includes?arrayMethod:"string"==typeof e||e===StringPrototype$1||isPrototypeOf$7(StringPrototype$1,e)&&t===StringPrototype$1.includes?stringMethod:t},parent$s=includes$5,includes$4=parent$s,parent$r=includes$4,includes$3=parent$r,parent$q=includes$3,includes$2=parent$q,includes$1=includes$2,_includesInstanceProperty$1=getDefaultExportFromCjs(includes$1),includes4=includes$1,_includesInstanceProperty=getDefaultExportFromCjs(includes4),bind$1=bind$c,_bindInstanceProperty=getDefaultExportFromCjs(bind$1),rnds8=new Uint8Array(16);function rng(){var e,t;if(!getRandomValues&&!(getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&_bindInstanceProperty(e=crypto.getRandomValues).call(e,crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&_bindInstanceProperty(t=msCrypto.getRandomValues).call(t,msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}var REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(e){return"string"==typeof e&&REGEX.test(e)}for(var byteToHex=[],i=0;i<256;++i)byteToHex.push((i+256).toString(16).substr(1));function stringify2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase();if(!validate(r))throw TypeError("Stringified UUID is invalid");return r}function v4(e,t,r){var n=(e=e||{}).random||(e.rng||rng)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return stringify2(n)}var isSSR=function(){return"undefined"==typeof window},genUuid=function(){return v4()};function mediaTrackStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({contentHint:e.contentHint,enabled:e.enabled,id:e.id,kind:e.kind,label:e.label,muted:e.muted,readyState:e.readyState})}function mediaStreamStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({id:e.id,active:e.active})}function mediaSenderStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({track:mediaTrackStringify(e.track)})}function mediaReceiverStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({track:mediaTrackStringify(e.track)})}function mediaTransceiverStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({currentDirection:e.currentDirection,direction:e.direction,mid:e.mid,stopped:e.stopped,receiver:mediaReceiverStringify(e.receiver),sender:mediaSenderStringify(e.sender)})}var DB_NAME$1="@byted/ve-rtc",STORE_NAME="@byted/ve-rtc",STORE_CACHED_SIZE_KEY="@byted/ve-rtc-cache-size",IDB=function(){return _createClass((function e(){_classCallCheck(this,e),_defineProperty(this,"storeKey",void 0),_defineProperty(this,"logLevel",void 0),_defineProperty(this,"LogfileSize",void 0),_defineProperty(this,"db",void 0),_defineProperty(this,"logId",void 0),_defineProperty(this,"cacheLog",void 0),_defineProperty(this,"cachedSize",void 0),_defineProperty(this,"preCacheTime",void 0),_defineProperty(this,"timer",void 0),_defineProperty(this,"_getSize",(function(e){return new Blob(e).size/1048576})),this.storeKey="",this.logId=1,this.cacheLog="",this.logLevel="none",this.LogfileSize=100,this._createStore()}),[{key:"_createStore",value:function(){var e=this;if(!isSSR()&&window.indexedDB){var t=indexedDB.open(DB_NAME$1);t.onupgradeneeded=function(){t.result.createObjectStore(STORE_NAME);try{localStorage.removeItem(STORE_CACHED_SIZE_KEY)}catch(e){}},t.onerror=function(e){},t.onsuccess=function(){e.db=t.result,e._getCachedSize()}}}},{key:"_getCachedSize",value:function(){var e=this;try{var t=localStorage.getItem(STORE_CACHED_SIZE_KEY);if(t)this.cachedSize=Number(t);else _valuesInstanceProperty(this).call(this).then((function(t){e.cachedSize=e._getSize(t),e._setCachedSize()}))}catch(e){}}},{key:"_setCachedSize",value:function(){try{localStorage.setItem(STORE_CACHED_SIZE_KEY,"".concat(this.cachedSize))}catch(e){}}},{key:"_getStore",value:function(e){if(this.db)return this.db.transaction(STORE_NAME,e).objectStore(STORE_NAME)}},{key:"set",value:function(e){var t=this;return new _Promise((function(r,n){if("none"===t.logLevel)return r();var o;if(e&&t.preCacheTime&&t.preCacheTime-_Date$now()<1e3)return t.cacheLog+=_concatInstanceProperty(o="\n\n".concat(t.logId,": ")).call(o,e),t.logId++,t.timer||(t.timer=_setTimeout((function(){t.set("")}),1e3-(t.preCacheTime-_Date$now()))),r();clearTimeout(t.timer),t.timer=null;var a=t._getStore("readwrite");if(!a)return n("get store fail");t.cachedSize&&t.cachedSize>t.LogfileSize&&t.keyEarliest().then((function(e){t.get(e).then((function(r){t.del(e).then((function(){t.cachedSize=t.cachedSize-t._getSize(["".concat(r)]),t._setCachedSize()}))}))}));var i=a.get(t.storeKey);i.onsuccess=function(){try{var o,s,l,c,u,$=_concatInstanceProperty(o="".concat(i.result||"")).call(o,t.cacheLog),p=e?_concatInstanceProperty(s=_concatInstanceProperty(l="".concat($?"\n\n":"")).call(l,t.logId,": ")).call(s,e):"";a.put(_concatInstanceProperty(c="".concat($)).call(c,p),t.storeKey),e&&t.logId++,t.cacheLog="",t.cachedSize=(t.cachedSize||0)+t._getSize([_concatInstanceProperty(u="".concat(t.cacheLog)).call(u,p)]),t._setCachedSize(),t.preCacheTime=_Date$now(),r()}catch(r){var f;if(!e)return n(r);t.cacheLog+=_concatInstanceProperty(f="\n\n".concat(t.logId,": ")).call(f,e),t.logId++,n(r)}},i.onerror=function(r){var o;if(!e)return n(r);t.cacheLog+=_concatInstanceProperty(o="\n\n".concat(t.logId,": ")).call(o,e),t.logId++,n(r)}}))}},{key:"get",value:function(e){var t=this;return new _Promise((function(r,n){var o=t._getStore("readonly");if(!o)return n();var a=o.get(e);a.onsuccess=function(){r(a.result)},a.onerror=function(e){n(e)}}))}},{key:"del",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.storeKey;return new _Promise((function(r,n){var o=e._getStore("readwrite");if(!o)return n();var a=o.delete(t);a.onsuccess=function(){return r(a.result)},a.onerror=function(e){return n(e)}}))}},{key:"keyEarliest",value:function(){return _keysInstanceProperty(this).call(this).then((function(e){var t,r=_Date$now();return _forEachInstanceProperty(e).call(e,(function(e){if(e&&e.length){var n=e.split("-")[0];Number(n)<r&&(r=Number(n),t=e)}})),t}))}},{key:"keys",value:function(){var e=this;return new _Promise((function(t,r){var n=e._getStore("readonly");if(!n)return r();if(n.getAllKeys){var o=n.getAllKeys();return o.onsuccess=function(){t(o.result)},void(o.onerror=function(){r()})}var a=[];n.openCursor().onsuccess=function(){this.result&&(a.push(this.result.key),this.result.continue())},n.transaction.oncomplete=function(){return t(a)}}))}},{key:"values",value:function(){var e=this;return new _Promise((function(t,r){var n=e._getStore("readonly");if(!n)return r();if(n.getAll){var o=n.getAll();return o.onsuccess=function(){t(o.result)},void(o.onerror=function(){r()})}var a=[];n.openCursor().onsuccess=function(){this.result&&(a.push(this.result.value),this.result.continue())},n.transaction.oncomplete=function(){return t(a)}}))}},{key:"download",value:function(e){e=e||this.storeKey,this.get(e).then((function(t){var r=document.createElement("a");r.download="".concat(e,".txt"),r.href="data:text/paint;utf-8,".concat(t||""),r.click()}))}}])}(),iDB=new IDB,userAgent=environmentUserAgent,stringPadWebkitBug=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent),$$6=_export,$padStart=stringPad.start,WEBKIT_BUG=stringPadWebkitBug;$$6({target:"String",proto:!0,forced:WEBKIT_BUG},{padStart:function(e){return $padStart(this,e,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$4=getBuiltInPrototypeMethod$i,padStart$6=getBuiltInPrototypeMethod$4("String","padStart"),isPrototypeOf$6=objectIsPrototypeOf,method$4=padStart$6,StringPrototype=String.prototype,padStart$5=function(e){var t=e.padStart;return"string"==typeof e||e===StringPrototype||isPrototypeOf$6(StringPrototype,e)&&t===StringPrototype.padStart?method$4:t},parent$p=padStart$5,padStart$4=parent$p,parent$o=padStart$4,padStart$3=parent$o,parent$n=padStart$3,padStart$2=parent$n,padStart$1=padStart$2,padStart2=padStart$1,_padStartInstanceProperty=getDefaultExportFromCjs(padStart2);function _arrayWithoutHoles(e){if(_Array$isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _nonIterableSpread(){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 _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}var tryToString=tryToString$7,$TypeError$1=TypeError,deletePropertyOrThrow$1=function(e,t){if(!delete e[t])throw new $TypeError$1("Cannot delete property "+tryToString(t)+" of "+tryToString(e))},$$5=_export,toObject$3=toObject$f,toAbsoluteIndex=toAbsoluteIndex$3,toIntegerOrInfinity$1=toIntegerOrInfinity$6,lengthOfArrayLike$3=lengthOfArrayLike$b,setArrayLength=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$4,arraySpeciesCreate$1=arraySpeciesCreate$4,createProperty=createProperty$5,deletePropertyOrThrow=deletePropertyOrThrow$1,arrayMethodHasSpeciesSupport=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("splice"),max=Math.max,min=Math.min;$$5({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{splice:function(e,t){var r,n,o,a,i,s,l=toObject$3(this),c=lengthOfArrayLike$3(l),u=toAbsoluteIndex(e,c),$=arguments.length;for(0===$?r=n=0:1===$?(r=0,n=c-u):(r=$-2,n=min(max(toIntegerOrInfinity$1(t),0),c-u)),doesNotExceedSafeInteger$1(c+r-n),o=arraySpeciesCreate$1(l,n),a=0;a<n;a++)(i=u+a)in l&&createProperty(o,a,l[i]);if(o.length=n,r<n){for(a=u;a<c-n;a++)s=a+r,(i=a+n)in l?l[s]=l[i]:deletePropertyOrThrow(l,s);for(a=c;a>c-n+r;a--)deletePropertyOrThrow(l,a-1)}else if(r>n)for(a=c-n;a>u;a--)s=a+r-1,(i=a+n-1)in l?l[s]=l[i]:deletePropertyOrThrow(l,s);for(a=0;a<r;a++)l[a+u]=arguments[a+2];return setArrayLength(l,c-n+r),o}});var getBuiltInPrototypeMethod$3=getBuiltInPrototypeMethod$i,splice$6=getBuiltInPrototypeMethod$3("Array","splice"),isPrototypeOf$5=objectIsPrototypeOf,method$3=splice$6,ArrayPrototype$3=Array.prototype,splice$5=function(e){var t=e.splice;return e===ArrayPrototype$3||isPrototypeOf$5(ArrayPrototype$3,e)&&t===ArrayPrototype$3.splice?method$3:t},parent$m=splice$5,splice$4=parent$m,parent$l=splice$4,splice$3=parent$l,parent$k=splice$3,splice$2=parent$k,splice$1=splice$2,splice2=splice$1,_spliceInstanceProperty=getDefaultExportFromCjs(splice2),$$4=_export;$$4({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var path$2=path$q,isNan$5=path$2.Number.isNaN,parent$j=isNan$5,isNan$4=parent$j,parent$i=isNan$4,isNan$3=parent$i,parent$h=isNan$3,isNan$2=parent$h,isNan$1=isNan$2,isNan=isNan$1,_Number$isNaN=getDefaultExportFromCjs(isNan),$$3=_export,uncurryThis$1=functionUncurryThisClause,$indexOf=arrayIncludes.indexOf,arrayMethodIsStrict$1=arrayMethodIsStrict$4,nativeIndexOf=uncurryThis$1([].indexOf),NEGATIVE_ZERO=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$1=NEGATIVE_ZERO||!arrayMethodIsStrict$1("indexOf");$$3({target:"Array",proto:!0,forced:FORCED$1},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO?nativeIndexOf(this,e,t)||0:$indexOf(this,e,t)}});var getBuiltInPrototypeMethod$2=getBuiltInPrototypeMethod$i,indexOf$6=getBuiltInPrototypeMethod$2("Array","indexOf"),isPrototypeOf$4=objectIsPrototypeOf,method$2=indexOf$6,ArrayPrototype$2=Array.prototype,indexOf$5=function(e){var t=e.indexOf;return e===ArrayPrototype$2||isPrototypeOf$4(ArrayPrototype$2,e)&&t===ArrayPrototype$2.indexOf?method$2:t},parent$g=indexOf$5,indexOf$4=parent$g,parent$f=indexOf$4,indexOf$3=parent$f,parent$e=indexOf$3,indexOf$2=parent$e,indexOf$1=indexOf$2,indexOf2=indexOf$1,_indexOfInstanceProperty=getDefaultExportFromCjs(indexOf2),EventEmitter=function(){return _createClass((function e(){_classCallCheck(this,e),_defineProperty(this,"_all",{})}),[{key:"on",value:function(e,t){var r=this._all[e];r?r.push(t):this._all[e]=[t]}},{key:"once",value:function(e,t){var r=this,n=function(){t.apply(void 0,arguments),r.off(e,n)};this.on(e,n)}},{key:"off",value:function(e,t){var r=this._all[e];null==r||_spliceInstanceProperty(r).call(r,_indexOfInstanceProperty(r).call(r,t)>>>0,1)}},{key:"emit",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var a=this._all[e];null==a||_forEachInstanceProperty(t=_sliceInstanceProperty(a).call(a)).call(t,(function(e){return e.apply(void 0,n)}))}},{key:"safeEmit",value:function(e){try{for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return this.emit.apply(this,_concatInstanceProperty(t=[e]).call(t,n))}catch(e){console.error(e)}}},{key:"destroy",value:function(){this._all={}}}])}();function _callSuper$1(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?_Reflect$construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}var configNumberKeys=["UPLOAD_CONSOLE_LENGTH_CUT","UPLOAD_REPORT_LIMIT"];function needToNumber(e){return _includesInstanceProperty(configNumberKeys).call(configNumberKeys,e)}var Config$1=function(){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _defineProperty(r=_callSuper$1(this,e,_concatInstanceProperty(t=[]).call(t,o)),"config",{UPLOAD_CONSOLE_ON:!1,UPLOAD_CONSOLE_LENGTH_CUT:200,UPLOAD_REPORT_LIMIT:45e4,ENABLE_REPORT_IDB_BUFFER:!1}),r}return _inherits(e,EventEmitter),_createClass(e,[{key:"setParameter",value:function(e,t){if(needToNumber(e))try{var r=Number(t);if(_Number$isNaN(r))return;this.config[e]=r}catch(r){var n;return void console.warn(_concatInstanceProperty(n="Cannot convert core lib parameter ".concat(e,":")).call(n,t," into number"))}else this.config[e]=t;this.emit(e,this.config[e])}},{key:"getParameter",value:function(e){return this.config[e]}},{key:"getKeys",value:function(){return _Object$keys(this.config)}}])}(),CoreConfig=new Config$1,DESCRIPTORS=descriptors,uncurryThis=functionUncurryThis,call$1=functionCall,fails=fails$x,objectKeys=objectKeys$3,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$2=toObject$f,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty5=Object.defineProperty,concat2=uncurryThis([].concat),objectAssign=!$assign||fails((function(){if(DESCRIPTORS&&1!==$assign({b:1},$assign(defineProperty5({},"a",{enumerable:!0,get:function(){defineProperty5(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==$assign({},e)[r]||objectKeys($assign({},t)).join("")!==n}))?function(e,t){for(var r=toObject$2(e),n=arguments.length,o=1,a=getOwnPropertySymbolsModule.f,i=propertyIsEnumerableModule.f;n>o;)for(var s,l=IndexedObject$1(arguments[o++]),c=a?concat2(objectKeys(l),a(l)):objectKeys(l),u=c.length,$=0;u>$;)s=c[$++],DESCRIPTORS&&!call$1(i,l,s)||(r[s]=l[s]);return r}:$assign,$$2=_export,assign$7=objectAssign;$$2({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$7},{assign:assign$7});var path$1=path$q,assign$6=path$1.Object.assign,parent$d=assign$6,assign$5=parent$d,parent$c=assign$5,assign$4=parent$c,parent$b=assign$4,assign$3=parent$b,assign$2=assign$3,assign$1=assign$2,_Object$assign=getDefaultExportFromCjs(assign$1),aCallable=aCallable$j,toObject$1=toObject$f,IndexedObject=indexedObject,lengthOfArrayLike$2=lengthOfArrayLike$b,$TypeError=TypeError,REDUCE_EMPTY="Reduce of empty array with no initial value",createMethod=function(e){return function(t,r,n,o){var a=toObject$1(t),i=IndexedObject(a),s=lengthOfArrayLike$2(a);if(aCallable(r),0===s&&n<2)throw new $TypeError(REDUCE_EMPTY);var l=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(l in i){o=i[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw new $TypeError(REDUCE_EMPTY)}for(;e?l>=0:s>l;l+=c)l in i&&(o=r(o,i[l],l,a));return o}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$$1=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$4,CHROME_VERSION=environmentV8Version,IS_NODE=environmentIsNode,CHROME_BUG=!IS_NODE&&environmentV8Version>79&&environmentV8Version<83,FORCED=CHROME_BUG||!arrayMethodIsStrict("reduce");$$1({target:"Array",proto:!0,forced:FORCED},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,t>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$1=getBuiltInPrototypeMethod$i,reduce$6=getBuiltInPrototypeMethod$1("Array","reduce"),isPrototypeOf$3=objectIsPrototypeOf,method$1=reduce$6,ArrayPrototype$1=Array.prototype,reduce$5=function(e){var t=e.reduce;return e===ArrayPrototype$1||isPrototypeOf$3(ArrayPrototype$1,e)&&t===ArrayPrototype$1.reduce?method$1:t},parent$a=reduce$5,reduce$4=parent$a,parent$9=reduce$4,reduce$3=parent$9,parent$8=reduce$3,reduce$2=parent$8,reduce$1=reduce$2,reduce3=reduce$1,_reduceInstanceProperty=getDefaultExportFromCjs(reduce3),isArray2=isArray$d,lengthOfArrayLike$1=lengthOfArrayLike$b,doesNotExceedSafeInteger=doesNotExceedSafeInteger$4,bind2=functionBindContext,flattenIntoArray$1=function(e,t,r,n,o,a,i,s){for(var l,c,u=o,$=0,p=!!i&&bind2(i,s);$<n;)$ in r&&(l=p?p(r[$],$,t):r[$],a>0&&isArray2(l)?(c=lengthOfArrayLike$1(l),u=flattenIntoArray$1(e,t,l,c,u,a-1)-1):(doesNotExceedSafeInteger(u+1),e[u]=l),u++),$++;return u},flattenIntoArray_1=flattenIntoArray$1,$=_export,flattenIntoArray=flattenIntoArray_1,toObject=toObject$f,lengthOfArrayLike=lengthOfArrayLike$b,toIntegerOrInfinity=toIntegerOrInfinity$6,arraySpeciesCreate=arraySpeciesCreate$4;$({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=toObject(this),r=lengthOfArrayLike(t),n=arraySpeciesCreate(t,0);return n.length=flattenIntoArray(n,t,t,r,0,void 0===e?1:toIntegerOrInfinity(e)),n}});var getBuiltInPrototypeMethod=getBuiltInPrototypeMethod$i,flat$6=getBuiltInPrototypeMethod("Array","flat"),isPrototypeOf$2=objectIsPrototypeOf,method=flat$6,ArrayPrototype=Array.prototype,flat$5=function(e){var t=e.flat;return e===ArrayPrototype||isPrototypeOf$2(ArrayPrototype,e)&&t===ArrayPrototype.flat?method:t},parent$7=flat$5,flat$4=parent$7,parent$6=flat$4,flat$3=parent$6,parent$5=flat$3,flat$2=parent$5,flat$1=flat$2,flat2=flat$1,_flatInstanceProperty=getDefaultExportFromCjs(flat2),common={};!function(e){var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=_sliceInstanceProperty(Array.prototype).call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==_typeof(n))throw new TypeError(n+"must be non-object");for(var o in n)r(n,o)&&(e[o]=n[o])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),o);else for(var a=0;a<n;a++)e[o+a]=t[r+a]},flattenChunks:function(e){var t,r,n,o,a,i;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(i=new Uint8Array(n),o=0,t=0,r=e.length;t<r;t++)a=e[t],i.set(a,o),o+=a.length;return i}},o={arraySet:function(e,t,r,n,o){for(var a=0;a<n;a++)e[o+a]=t[r+a]},flattenChunks:function(e){return _concatInstanceProperty([]).apply([],e)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(t)}(common);var deflate$4={},deflate$3={},trees$1={},utils$6=common,Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(e){for(var t=e.length;--t>=0;)e[t]=0}var STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],DIST_CODE_LEN=512,static_ltree=new Array(2*(L_CODES$1+2));zero$1(static_ltree);var static_dtree=new Array(2*D_CODES$1);zero$1(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);var _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);var base_length=new Array(LENGTH_CODES$1);zero$1(base_length);var static_l_desc,static_d_desc,static_bl_desc,base_dist=new Array(D_CODES$1);function StaticTreeDesc(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function TreeDesc(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function d_code(e){return e<256?_dist_code[e]:_dist_code[256+(e>>>7)]}function put_short(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function send_bits(e,t,r){e.bi_valid>Buf_size-r?(e.bi_buf|=t<<e.bi_valid&65535,put_short(e,e.bi_buf),e.bi_buf=t>>Buf_size-e.bi_valid,e.bi_valid+=r-Buf_size):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function send_code(e,t,r){send_bits(e,r[2*t],r[2*t+1])}function bi_reverse(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function bi_flush(e){16===e.bi_valid?(put_short(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function gen_bitlen(e,t){var r,n,o,a,i,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,$=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,d=t.stat_desc.max_length,_=0;for(a=0;a<=MAX_BITS$1;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<HEAP_SIZE$1;r++)(a=l[2*l[2*(n=e.heap[r])+1]+1]+1)>d&&(a=d,_++),l[2*n+1]=a,n>c||(e.bl_count[a]++,i=0,n>=f&&(i=p[n-f]),s=l[2*n],e.opt_len+=s*(a+i),$&&(e.static_len+=s*(u[2*n+1]+i)));if(0!==_){do{for(a=d-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[d]--,_-=2}while(_>0);for(a=d;0!==a;a--)for(n=e.bl_count[a];0!==n;)(o=e.heap[--r])>c||(l[2*o+1]!==a&&(e.opt_len+=(a-l[2*o+1])*l[2*o],l[2*o+1]=a),n--)}}function gen_codes(e,t,r){var n,o,a=new Array(MAX_BITS$1+1),i=0;for(n=1;n<=MAX_BITS$1;n++)a[n]=i=i+r[n-1]<<1;for(o=0;o<=t;o++){var s=e[2*o+1];0!==s&&(e[2*o]=bi_reverse(a[s]++,s))}}function tr_static_init(){var e,t,r,n,o,a=new Array(MAX_BITS$1+1);for(r=0,n=0;n<LENGTH_CODES$1-1;n++)for(base_length[n]=r,e=0;e<1<<extra_lbits[n];e++)_length_code[r++]=n;for(_length_code[r-1]=n,o=0,n=0;n<16;n++)for(base_dist[n]=o,e=0;e<1<<extra_dbits[n];e++)_dist_code[o++]=n;for(o>>=7;n<D_CODES$1;n++)for(base_dist[n]=o<<7,e=0;e<1<<extra_dbits[n]-7;e++)_dist_code[256+o++]=n;for(t=0;t<=MAX_BITS$1;t++)a[t]=0;for(e=0;e<=143;)static_ltree[2*e+1]=8,e++,a[8]++;for(;e<=255;)static_ltree[2*e+1]=9,e++,a[9]++;for(;e<=279;)static_ltree[2*e+1]=7,e++,a[7]++;for(;e<=287;)static_ltree[2*e+1]=8,e++,a[8]++;for(gen_codes(static_ltree,L_CODES$1+1,a),e=0;e<D_CODES$1;e++)static_dtree[2*e+1]=5,static_dtree[2*e]=bi_reverse(e,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)}function init_block(e){var t;for(t=0;t<L_CODES$1;t++)e.dyn_ltree[2*t]=0;for(t=0;t<D_CODES$1;t++)e.dyn_dtree[2*t]=0;for(t=0;t<BL_CODES$1;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*END_BLOCK]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function bi_windup(e){e.bi_valid>8?put_short(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function copy_block(e,t,r,n){bi_windup(e),n&&(put_short(e,r),put_short(e,~r)),utils$6.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function smaller(e,t,r,n){var o=2*t,a=2*r;return e[o]<e[a]||e[o]===e[a]&&n[t]<=n[r]}function pqdownheap(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&smaller(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!smaller(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function compress_block(e,t,r){var n,o,a,i,s=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],o=e.pending_buf[e.l_buf+s],s++,0===n?send_code(e,o,t):(send_code(e,(a=_length_code[o])+LITERALS$1+1,t),0!==(i=extra_lbits[a])&&send_bits(e,o-=base_length[a],i),send_code(e,a=d_code(--n),r),0!==(i=extra_dbits[a])&&send_bits(e,n-=base_dist[a],i))}while(s<e.last_lit);send_code(e,END_BLOCK,t)}function build_tree(e,t){var r,n,o,a=t.dyn_tree,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=HEAP_SIZE$1,r=0;r<l;r++)0!==a[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(o=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[o]=0,e.opt_len--,s&&(e.static_len-=i[2*o+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)pqdownheap(e,a,r);o=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pqdownheap(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*o]=a[2*r]+a[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=o,e.heap[1]=o++,pqdownheap(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],gen_bitlen(e,t),gen_codes(a,c,e.bl_count)}function scan_tree(e,t,r){var n,o,a=-1,i=t[1],s=0,l=7,c=4;for(0===i&&(l=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=i,i=t[2*(n+1)+1],++s<l&&o===i||(s<c?e.bl_tree[2*o]+=s:0!==o?(o!==a&&e.bl_tree[2*o]++,e.bl_tree[2*REP_3_6]++):s<=10?e.bl_tree[2*REPZ_3_10]++:e.bl_tree[2*REPZ_11_138]++,s=0,a=o,0===i?(l=138,c=3):o===i?(l=6,c=3):(l=7,c=4))}function send_tree(e,t,r){var n,o,a=-1,i=t[1],s=0,l=7,c=4;for(0===i&&(l=138,c=3),n=0;n<=r;n++)if(o=i,i=t[2*(n+1)+1],!(++s<l&&o===i)){if(s<c)do{send_code(e,o,e.bl_tree)}while(0!=--s);else 0!==o?(o!==a&&(send_code(e,o,e.bl_tree),s--),send_code(e,REP_3_6,e.bl_tree),send_bits(e,s-3,2)):s<=10?(send_code(e,REPZ_3_10,e.bl_tree),send_bits(e,s-3,3)):(send_code(e,REPZ_11_138,e.bl_tree),send_bits(e,s-11,7));s=0,a=o,0===i?(l=138,c=3):o===i?(l=6,c=3):(l=7,c=4)}}function build_bl_tree(e){var t;for(scan_tree(e,e.dyn_ltree,e.l_desc.max_code),scan_tree(e,e.dyn_dtree,e.d_desc.max_code),build_tree(e,e.bl_desc),t=BL_CODES$1-1;t>=3&&0===e.bl_tree[2*bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function send_all_trees(e,t,r,n){var o;for(send_bits(e,t-257,5),send_bits(e,r-1,5),send_bits(e,n-4,4),o=0;o<n;o++)send_bits(e,e.bl_tree[2*bl_order[o]+1],3);send_tree(e,e.dyn_ltree,t-1),send_tree(e,e.dyn_dtree,r-1)}function detect_data_type(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return Z_BINARY;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Z_TEXT;for(t=32;t<LITERALS$1;t++)if(0!==e.dyn_ltree[2*t])return Z_TEXT;return Z_BINARY}zero$1(base_dist);var static_init_done=!1;function _tr_init(e){static_init_done||(tr_static_init(),static_init_done=!0),e.l_desc=new TreeDesc(e.dyn_ltree,static_l_desc),e.d_desc=new TreeDesc(e.dyn_dtree,static_d_desc),e.bl_desc=new TreeDesc(e.bl_tree,static_bl_desc),e.bi_buf=0,e.bi_valid=0,init_block(e)}function _tr_stored_block(e,t,r,n){send_bits(e,(STORED_BLOCK<<1)+(n?1:0),3),copy_block(e,t,r,!0)}function _tr_align(e){send_bits(e,STATIC_TREES<<1,3),send_code(e,END_BLOCK,static_ltree),bi_flush(e)}function _tr_flush_block(e,t,r,n){var o,a,i=0;e.level>0?(e.strm.data_type===Z_UNKNOWN$1&&(e.strm.data_type=detect_data_type(e)),build_tree(e,e.l_desc),build_tree(e,e.d_desc),i=build_bl_tree(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==t?_tr_stored_block(e,t,r,n):e.strategy===Z_FIXED$1||a===o?(send_bits(e,(STATIC_TREES<<1)+(n?1:0),3),compress_block(e,static_ltree,static_dtree)):(send_bits(e,(DYN_TREES<<1)+(n?1:0),3),send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,i+1),compress_block(e,e.dyn_ltree,e.dyn_dtree)),init_block(e),n&&bi_windup(e)}function _tr_tally(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(_length_code[r]+LITERALS$1+1)]++,e.dyn_dtree[2*d_code(t)]++),e.last_lit===e.lit_bufsize-1}function adler32$2(e,t,r,n){for(var o=65535&e,a=e>>>16&65535,i=0;0!==r;){r-=i=r>2e3?2e3:r;do{a=a+(o=o+t[n++]|0)|0}while(--i);o%=65521,a%=65521}return o|a<<16}trees$1._tr_init=_tr_init,trees$1._tr_stored_block=_tr_stored_block,trees$1._tr_flush_block=_tr_flush_block,trees$1._tr_tally=_tr_tally,trees$1._tr_align=_tr_align;var adler32_1=adler32$2;function makeTable(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}var crcTable=makeTable();function crc32$2(e,t,r,n){var o=crcTable,a=n+r;e^=-1;for(var i=n;i<a;i++)e=e>>>8^o[255&(e^t[i])];return~e}var configuration_table,crc32_1=crc32$2,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},utils$5=common,trees=trees$1,adler32$1=adler32_1,crc32$1=crc32_1,msg$2=messages,Z_NO_FLUSH$1=0,Z_PARTIAL_FLUSH=1,Z_FULL_FLUSH=3,Z_FINISH$2=4,Z_BLOCK$1=5,Z_OK$2=0,Z_STREAM_END$2=1,Z_STREAM_ERROR$1=-2,Z_DATA_ERROR$1=-3,Z_BUF_ERROR$1=-5,Z_DEFAULT_COMPRESSION$1=-1,Z_FILTERED=1,Z_HUFFMAN_ONLY=2,Z_RLE=3,Z_FIXED=4,Z_DEFAULT_STRATEGY$1=0,Z_UNKNOWN=2,Z_DEFLATED$2=8,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3;function err(e,t){return e.msg=msg$2[t],t}function rank(e){return(e<<1)-(e>4?9:0)}function zero(e){for(var t=e.length;--t>=0;)e[t]=0}function flush_pending(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(utils$5.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function flush_block_only(e,t){trees._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,flush_pending(e.strm)}function put_byte(e,t){e.pending_buf[e.pending++]=t}function putShortMSB(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function read_buf(e,t,r,n){var o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,utils$5.arraySet(t,e.input,e.next_in,o,r),1===e.state.wrap?e.adler=adler32$1(e.adler,t,o,r):2===e.state.wrap&&(e.adler=crc32$1(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function longest_match(e,t){var r,n,o=e.max_chain_length,a=e.strstart,i=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-MIN_LOOKAHEAD?e.strstart-(e.w_size-MIN_LOOKAHEAD):0,c=e.window,u=e.w_mask,$=e.prev,p=e.strstart+MAX_MATCH,f=c[a+i-1],d=c[a+i];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+i]===d&&c[r+i-1]===f&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do{}while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&a<p);if(n=MAX_MATCH-(p-a),a=p-MAX_MATCH,n>i){if(e.match_start=t,i=n,n>=s)break;f=c[a+i-1],d=c[a+i]}}}while((t=$[t&u])>l&&0!=--o);return i<=e.lookahead?i:e.lookahead}function fill_window(e){var t,r,n,o,a,i=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=i+(i-MIN_LOOKAHEAD)){utils$5.arraySet(e.window,e.window,i,i,0),e.match_start-=i,e.strstart-=i,e.block_start-=i,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=i?n-i:0}while(--r);t=r=i;do{n=e.prev[--t],e.prev[t]=n>=i?n-i:0}while(--r);o+=i}if(0===e.strm.avail_in)break;if(r=read_buf(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=MIN_MATCH)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+MIN_MATCH-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<MIN_MATCH)););}while(e.lookahead<MIN_LOOKAHEAD&&0!==e.strm.avail_in)}function deflate_stored(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(fill_window(e),0===e.lookahead&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE;if(e.strstart-e.block_start>=e.w_size-MIN_LOOKAHEAD&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):(e.strstart>e.block_start&&(flush_block_only(e,!1),e.strm.avail_out),BS_NEED_MORE)}function deflate_fast(e,t){for(var r,n;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(0===e.lookahead)break}if(r=0,e.lookahead>=MIN_MATCH&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,r)),e.match_length>=MIN_MATCH)if(n=trees._tr_tally(e,e.strstart-e.match_start,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=MIN_MATCH){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=trees._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}return e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),0===e.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_slow(e,t){for(var r,n,o;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(0===e.lookahead)break}if(r=0,e.lookahead>=MIN_MATCH&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=MIN_MATCH-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,r),e.match_length<=5&&(e.strategy===Z_FILTERED||e.match_length===MIN_MATCH&&e.strstart-e.match_start>4096)&&(e.match_length=MIN_MATCH-1)),e.prev_length>=MIN_MATCH&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-MIN_MATCH,n=trees._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-MIN_MATCH),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=MIN_MATCH-1,e.strstart++,n&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}else if(e.match_available){if((n=trees._tr_tally(e,0,e.window[e.strstart-1]))&&flush_block_only(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return BS_NEED_MORE}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=trees._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),0===e.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_rle(e,t){for(var r,n,o,a,i=e.window;;){if(e.lookahead<=MAX_MATCH){if(fill_window(e),e.lookahead<=MAX_MATCH&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=MIN_MATCH&&e.strstart>0&&(n=i[o=e.strstart-1])===i[++o]&&n===i[++o]&&n===i[++o]){a=e.strstart+MAX_MATCH;do{}while(n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&o<a);e.match_length=MAX_MATCH-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=MIN_MATCH?(r=trees._tr_tally(e,1,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=trees._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),0===e.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_huff(e,t){for(var r;;){if(0===e.lookahead&&(fill_window(e),0===e.lookahead)){if(t===Z_NO_FLUSH$1)return BS_NEED_MORE;break}if(e.match_length=0,r=trees._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),0===e.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function Config(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}function lm_init(e){e.window_size=2*e.w_size,zero(e.head),e.max_lazy_match=configuration_table[e.level].max_lazy,e.good_match=configuration_table[e.level].good_length,e.nice_match=configuration_table[e.level].nice_length,e.max_chain_length=configuration_table[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=MIN_MATCH-1,e.match_available=0,e.ins_h=0}function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new utils$5.Buf16(2*HEAP_SIZE),this.dyn_dtree=new utils$5.Buf16(2*(2*D_CODES+1)),this.bl_tree=new utils$5.Buf16(2*(2*BL_CODES+1)),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new utils$5.Buf16(MAX_BITS+1),this.heap=new utils$5.Buf16(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new utils$5.Buf16(2*L_CODES+1),zero(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function deflateResetKeep(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=Z_UNKNOWN,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?INIT_STATE:BUSY_STATE,e.adler=2===t.wrap?0:1,t.last_flush=Z_NO_FLUSH$1,trees._tr_init(t),Z_OK$2):err(e,Z_STREAM_ERROR$1)}function deflateReset(e){var t=deflateResetKeep(e);return t===Z_OK$2&&lm_init(e.state),t}function deflateSetHeader(e,t){return e&&e.state?2!==e.state.wrap?Z_STREAM_ERROR$1:(e.state.gzhead=t,Z_OK$2):Z_STREAM_ERROR$1}function deflateInit2(e,t,r,n,o,a){if(!e)return Z_STREAM_ERROR$1;var i=1;if(t===Z_DEFAULT_COMPRESSION$1&&(t=6),n<0?(i=0,n=-n):n>15&&(i=2,n-=16),o<1||o>MAX_MEM_LEVEL||r!==Z_DEFLATED$2||n<8||n>15||t<0||t>9||a<0||a>Z_FIXED)return err(e,Z_STREAM_ERROR$1);8===n&&(n=9);var s=new DeflateState;return e.state=s,s.strm=e,s.wrap=i,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+MIN_MATCH-1)/MIN_MATCH),s.window=new utils$5.Buf8(2*s.w_size),s.head=new utils$5.Buf16(s.hash_size),s.prev=new utils$5.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new utils$5.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,deflateReset(e)}function deflateInit(e,t){return deflateInit2(e,t,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1)}function deflate$2(e,t){var r,n,o,a;if(!e||!e.state||t>Z_BLOCK$1||t<0)return e?err(e,Z_STREAM_ERROR$1):Z_STREAM_ERROR$1;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||n.status===FINISH_STATE&&t!==Z_FINISH$2)return err(e,0===e.avail_out?Z_BUF_ERROR$1:Z_STREAM_ERROR$1);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===INIT_STATE)if(2===n.wrap)e.adler=0,put_byte(n,31),put_byte(n,139),put_byte(n,8),n.gzhead?(put_byte(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),put_byte(n,255&n.gzhead.time),put_byte(n,n.gzhead.time>>8&255),put_byte(n,n.gzhead.time>>16&255),put_byte(n,n.gzhead.time>>24&255),put_byte(n,9===n.level?2:n.strategy>=Z_HUFFMAN_ONLY||n.level<2?4:0),put_byte(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(put_byte(n,255&n.gzhead.extra.length),put_byte(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=EXTRA_STATE):(put_byte(n,0),put_byte(n,0),put_byte(n,0),put_byte(n,0),put_byte(n,0),put_byte(n,9===n.level?2:n.strategy>=Z_HUFFMAN_ONLY||n.level<2?4:0),put_byte(n,OS_CODE),n.status=BUSY_STATE);else{var i=Z_DEFLATED$2+(n.w_bits-8<<4)<<8;i|=(n.strategy>=Z_HUFFMAN_ONLY||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(i|=PRESET_DICT),i+=31-i%31,n.status=BUSY_STATE,putShortMSB(n,i),0!==n.strstart&&(putShortMSB(n,e.adler>>>16),putShortMSB(n,65535&e.adler)),e.adler=1}if(n.status===EXTRA_STATE)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),flush_pending(e),o=n.pending,n.pending!==n.pending_buf_size));)put_byte(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=NAME_STATE)}else n.status=NAME_STATE;if(n.status===NAME_STATE)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),flush_pending(e),o=n.pending,n.pending===n.pending_buf_size)){a=1;break}a=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,put_byte(n,a)}while(0!==a);n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),0===a&&(n.gzindex=0,n.status=COMMENT_STATE)}else n.status=COMMENT_STATE;if(n.status===COMMENT_STATE)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),flush_pending(e),o=n.pending,n.pending===n.pending_buf_size)){a=1;break}a=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,put_byte(n,a)}while(0!==a);n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),0===a&&(n.status=HCRC_STATE)}else n.status=HCRC_STATE;if(n.status===HCRC_STATE&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&flush_pending(e),n.pending+2<=n.pending_buf_size&&(put_byte(n,255&e.adler),put_byte(n,e.adler>>8&255),e.adler=0,n.status=BUSY_STATE)):n.status=BUSY_STATE),0!==n.pending){if(flush_pending(e),0===e.avail_out)return n.last_flush=-1,Z_OK$2}else if(0===e.avail_in&&rank(t)<=rank(r)&&t!==Z_FINISH$2)return err(e,Z_BUF_ERROR$1);if(n.status===FINISH_STATE&&0!==e.avail_in)return err(e,Z_BUF_ERROR$1);if(0!==e.avail_in||0!==n.lookahead||t!==Z_NO_FLUSH$1&&n.status!==FINISH_STATE){var s=n.strategy===Z_HUFFMAN_ONLY?deflate_huff(n,t):n.strategy===Z_RLE?deflate_rle(n,t):configuration_table[n.level].func(n,t);if(s!==BS_FINISH_STARTED&&s!==BS_FINISH_DONE||(n.status=FINISH_STATE),s===BS_NEED_MORE||s===BS_FINISH_STARTED)return 0===e.avail_out&&(n.last_flush=-1),Z_OK$2;if(s===BS_BLOCK_DONE&&(t===Z_PARTIAL_FLUSH?trees._tr_align(n):t!==Z_BLOCK$1&&(trees._tr_stored_block(n,0,0,!1),t===Z_FULL_FLUSH&&(zero(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),flush_pending(e),0===e.avail_out))return n.last_flush=-1,Z_OK$2}return t!==Z_FINISH$2?Z_OK$2:n.wrap<=0?Z_STREAM_END$2:(2===n.wrap?(put_byte(n,255&e.adler),put_byte(n,e.adler>>8&255),put_byte(n,e.adler>>16&255),put_byte(n,e.adler>>24&255),put_byte(n,255&e.total_in),put_byte(n,e.total_in>>8&255),put_byte(n,e.total_in>>16&255),put_byte(n,e.total_in>>24&255)):(putShortMSB(n,e.adler>>>16),putShortMSB(n,65535&e.adler)),flush_pending(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?Z_OK$2:Z_STREAM_END$2)}function deflateEnd(e){var t;return e&&e.state?(t=e.state.status)!==INIT_STATE&&t!==EXTRA_STATE&&t!==NAME_STATE&&t!==COMMENT_STATE&&t!==HCRC_STATE&&t!==BUSY_STATE&&t!==FINISH_STATE?err(e,Z_STREAM_ERROR$1):(e.state=null,t===BUSY_STATE?err(e,Z_DATA_ERROR$1):Z_OK$2):Z_STREAM_ERROR$1}function deflateSetDictionary(e,t){var r,n,o,a,i,s,l,c,u=t.length;if(!e||!e.state)return Z_STREAM_ERROR$1;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==INIT_STATE||r.lookahead)return Z_STREAM_ERROR$1;for(1===a&&(e.adler=adler32$1(e.adler,t,u,0)),r.wrap=0,u>=r.w_size&&(0===a&&(zero(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new utils$5.Buf8(r.w_size),utils$5.arraySet(c,t,u-r.w_size,r.w_size,0),t=c,u=r.w_size),i=e.avail_in,s=e.next_in,l=e.input,e.avail_in=u,e.next_in=0,e.input=t,fill_window(r);r.lookahead>=MIN_MATCH;){n=r.strstart,o=r.lookahead-(MIN_MATCH-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+MIN_MATCH-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=MIN_MATCH-1,fill_window(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=MIN_MATCH-1,r.match_available=0,e.next_in=s,e.input=l,e.avail_in=i,r.wrap=a,Z_OK$2}configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],deflate$3.deflateInit=deflateInit,deflate$3.deflateInit2=deflateInit2,deflate$3.deflateReset=deflateReset,deflate$3.deflateResetKeep=deflateResetKeep,deflate$3.deflateSetHeader=deflateSetHeader,deflate$3.deflate=deflate$2,deflate$3.deflateEnd=deflateEnd,deflate$3.deflateSetDictionary=deflateSetDictionary,deflate$3.deflateInfo="pako deflate (from Nodeca project)";var strings$2={},utils$4=common,STR_APPLY_OK=!0,STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,[0])}catch(e){STR_APPLY_OK=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){STR_APPLY_UIA_OK=!1}for(var _utf8len=new utils$4.Buf8(256),q=0;q<256;q++)_utf8len[q]=q>=252?6:q>=248?5:q>=240?4:q>=224?3:q>=192?2:1;function buf2binstring(e,t){if(t<65534&&(e.subarray&&STR_APPLY_UIA_OK||!e.subarray&&STR_APPLY_OK))return String.fromCharCode.apply(null,utils$4.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}function ZStream$2(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}_utf8len[254]=_utf8len[254]=1,strings$2.string2buf=function(e){var t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<i&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new utils$4.Buf8(s),a=0,o=0;a<s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<i&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},strings$2.buf2binstring=function(e){return buf2binstring(e,e.length)},strings$2.binstring2buf=function(e){for(var t=new utils$4.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},strings$2.buf2string=function(e,t){var r,n,o,a,i=t||e.length,s=new Array(2*i);for(n=0,r=0;r<i;)if((o=e[r++])<128)s[n++]=o;else if((a=_utf8len[o])>4)s[n++]=65533,r+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&r<i;)o=o<<6|63&e[r++],a--;a>1?s[n++]=65533:o<65536?s[n++]=o:(o-=65536,s[n++]=55296|o>>10&1023,s[n++]=56320|1023&o)}return buf2binstring(s,n)},strings$2.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+_utf8len[e[r]]>t?r:t};var zstream=ZStream$2,zlib_deflate=deflate$3,utils$3=common,strings$1=strings$2,msg$1=messages,ZStream$1=zstream,toString$1=Object.prototype.toString,Z_NO_FLUSH=0,Z_FINISH$1=4,Z_OK$1=0,Z_STREAM_END$1=1,Z_SYNC_FLUSH=2,Z_DEFAULT_COMPRESSION=-1,Z_DEFAULT_STRATEGY=0,Z_DEFLATED$1=8;function Deflate(e){if(!(this instanceof Deflate))return new Deflate(e);this.options=utils$3.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZStream$1,this.strm.avail_out=0;var r=zlib_deflate.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Z_OK$1)throw new Error(msg$1[r]);if(t.header&&zlib_deflate.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"==typeof t.dictionary?strings$1.string2buf(t.dictionary):"[object ArrayBuffer]"===toString$1.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=zlib_deflate.deflateSetDictionary(this.strm,n))!==Z_OK$1)throw new Error(msg$1[r]);this._dict_set=!0}}function deflate$1(e,t){var r=new Deflate(t);if(r.push(e,!0),r.err)throw r.msg||msg$1[r.err];return r.result}function deflateRaw(e,t){return(t=t||{}).raw=!0,deflate$1(e,t)}function gzip(e,t){return(t=t||{}).gzip=!0,deflate$1(e,t)}Deflate.prototype.push=function(e,t){var r,n,o=this.strm,a=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?Z_FINISH$1:Z_NO_FLUSH,"string"==typeof e?o.input=strings$1.string2buf(e):"[object ArrayBuffer]"===toString$1.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new utils$3.Buf8(a),o.next_out=0,o.avail_out=a),(r=zlib_deflate.deflate(o,n))!==Z_STREAM_END$1&&r!==Z_OK$1)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||n!==Z_FINISH$1&&n!==Z_SYNC_FLUSH)||("string"===this.options.to?this.onData(strings$1.buf2binstring(utils$3.shrinkBuf(o.output,o.next_out))):this.onData(utils$3.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&r!==Z_STREAM_END$1);return n===Z_FINISH$1?(r=zlib_deflate.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Z_OK$1):n!==Z_SYNC_FLUSH||(this.onEnd(Z_OK$1),o.avail_out=0,!0)},Deflate.prototype.onData=function(e){this.chunks.push(e)},Deflate.prototype.onEnd=function(e){e===Z_OK$1&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=utils$3.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},deflate$4.Deflate=Deflate,deflate$4.deflate=deflate$1,deflate$4.deflateRaw=deflateRaw,deflate$4.gzip=gzip;var inflate$4={},anObject=anObject$g,regexpFlags=function(){var e=anObject(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},call=functionCall,hasOwn2=hasOwnProperty_1,isPrototypeOf$1=objectIsPrototypeOf,regExpFlags=regexpFlags,RegExpPrototype$1=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$1||hasOwn2(e,"flags")||!isPrototypeOf$1(RegExpPrototype$1,e)?t:call(regExpFlags,e)},getRegExpFlags=regexpGetFlags,flags$6=getRegExpFlags,isPrototypeOf=objectIsPrototypeOf,flags$5=flags$6,RegExpPrototype=RegExp.prototype,flags_1=function(e){return e===RegExpPrototype||isPrototypeOf(RegExpPrototype,e)?flags$5(e):e.flags},parent$4=flags_1,flags$4=parent$4,parent$3=flags$4,flags$3=parent$3,parent$2=flags$3,flags$2=parent$2,flags$1=flags$2,flags=flags$1,_flagsInstanceProperty=getDefaultExportFromCjs(flags),inflate$3={},BAD$1=30,TYPE$1=12,inffast=function(e,t){var r,n,o,a,i,s,l,c,u,$,p,f,d,_,y,h,g,b,m,S,E,O,v,T,I;r=e.state,n=e.next_in,T=e.input,o=n+(e.avail_in-5),a=e.next_out,I=e.output,i=a-(t-e.avail_out),s=a+(e.avail_out-257),l=r.dmax,c=r.wsize,u=r.whave,$=r.wnext,p=r.window,f=r.hold,d=r.bits,_=r.lencode,y=r.distcode,h=(1<<r.lenbits)-1,g=(1<<r.distbits)-1;e:do{d<15&&(f+=T[n++]<<d,d+=8,f+=T[n++]<<d,d+=8),b=_[f&h];t:for(;;){if(f>>>=m=b>>>24,d-=m,0===(m=b>>>16&255))I[a++]=65535&b;else{if(!(16&m)){if(64&m){if(32&m){r.mode=TYPE$1;break e}e.msg="invalid literal/length code",r.mode=BAD$1;break e}b=_[(65535&b)+(f&(1<<m)-1)];continue t}for(S=65535&b,(m&=15)&&(d<m&&(f+=T[n++]<<d,d+=8),S+=f&(1<<m)-1,f>>>=m,d-=m),d<15&&(f+=T[n++]<<d,d+=8,f+=T[n++]<<d,d+=8),b=y[f&g];;){if(f>>>=m=b>>>24,d-=m,16&(m=b>>>16&255)){if(E=65535&b,d<(m&=15)&&(f+=T[n++]<<d,(d+=8)<m&&(f+=T[n++]<<d,d+=8)),(E+=f&(1<<m)-1)>l){e.msg="invalid distance too far back",r.mode=BAD$1;break e}if(f>>>=m,d-=m,E>(m=a-i)){if((m=E-m)>u&&r.sane){e.msg="invalid distance too far back",r.mode=BAD$1;break e}if(O=0,v=p,0===$){if(O+=c-m,m<S){S-=m;do{I[a++]=p[O++]}while(--m);O=a-E,v=I}}else if($<m){if(O+=c+$-m,(m-=$)<S){S-=m;do{I[a++]=p[O++]}while(--m);if(O=0,$<S){S-=m=$;do{I[a++]=p[O++]}while(--m);O=a-E,v=I}}}else if(O+=$-m,m<S){S-=m;do{I[a++]=p[O++]}while(--m);O=a-E,v=I}for(;S>2;)I[a++]=v[O++],I[a++]=v[O++],I[a++]=v[O++],S-=3;S&&(I[a++]=v[O++],S>1&&(I[a++]=v[O++]))}else{O=a-E;do{I[a++]=I[O++],I[a++]=I[O++],I[a++]=I[O++],S-=3}while(S>2);S&&(I[a++]=I[O++],S>1&&(I[a++]=I[O++]))}break}if(64&m){e.msg="invalid distance code",r.mode=BAD$1;break e}b=y[(65535&b)+(f&(1<<m)-1)]}}break}}while(n<o&&a<s);n-=S=d>>3,f&=(1<<(d-=S<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=a<s?s-a+257:257-(a-s),r.hold=f,r.bits=d},utils$2=common,MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lext=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],dbase=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],dext=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],inftrees=function(e,t,r,n,o,a,i,s){var l,c,u,$,p,f,d,_,y,h=s.bits,g=0,b=0,m=0,S=0,E=0,O=0,v=0,T=0,I=0,P=0,w=null,R=0,C=new utils$2.Buf16(MAXBITS+1),A=new utils$2.Buf16(MAXBITS+1),D=null,N=0;for(g=0;g<=MAXBITS;g++)C[g]=0;for(b=0;b<n;b++)C[t[r+b]]++;for(E=h,S=MAXBITS;S>=1&&0===C[S];S--);if(E>S&&(E=S),0===S)return o[a++]=20971520,o[a++]=20971520,s.bits=1,0;for(m=1;m<S&&0===C[m];m++);for(E<m&&(E=m),T=1,g=1;g<=MAXBITS;g++)if(T<<=1,(T-=C[g])<0)return-1;if(T>0&&(e===CODES$1||1!==S))return-1;for(A[1]=0,g=1;g<MAXBITS;g++)A[g+1]=A[g]+C[g];for(b=0;b<n;b++)0!==t[r+b]&&(i[A[t[r+b]]++]=b);if(e===CODES$1?(w=D=i,f=19):e===LENS$1?(w=lbase,R-=257,D=lext,N-=257,f=256):(w=dbase,D=dext,f=-1),P=0,b=0,g=m,p=a,O=E,v=0,u=-1,$=(I=1<<E)-1,e===LENS$1&&I>ENOUGH_LENS$1||e===DISTS$1&&I>ENOUGH_DISTS$1)return 1;for(;;){d=g-v,i[b]<f?(_=0,y=i[b]):i[b]>f?(_=D[N+i[b]],y=w[R+i[b]]):(_=96,y=0),l=1<<g-v,m=c=1<<O;do{o[p+(P>>v)+(c-=l)]=d<<24|_<<16|y}while(0!==c);for(l=1<<g-1;P&l;)l>>=1;if(0!==l?(P&=l-1,P+=l):P=0,b++,0==--C[g]){if(g===S)break;g=t[r+i[b]]}if(g>E&&(P&$)!==u){for(0===v&&(v=E),p+=m,T=1<<(O=g-v);O+v<S&&!((T-=C[O+v])<=0);)O++,T<<=1;if(I+=1<<O,e===LENS$1&&I>ENOUGH_LENS$1||e===DISTS$1&&I>ENOUGH_DISTS$1)return 1;o[u=P&$]=E<<24|O<<16|p-a}}return 0!==P&&(o[p+P]=g-v<<24|64<<16),s.bits=E,0},utils$1=common,adler32=adler32_1,crc32=crc32_1,inflate_fast2=inffast,inflate_table2=inftrees,CODES=0,LENS=1,DISTS=2,Z_FINISH=4,Z_BLOCK=5,Z_TREES=6,Z_OK=0,Z_STREAM_END=1,Z_NEED_DICT=2,Z_STREAM_ERROR=-2,Z_DATA_ERROR=-3,Z_MEM_ERROR=-4,Z_BUF_ERROR=-5,Z_DEFLATED=8,HEAD=1,FLAGS=2,TIME=3,OS=4,EXLEN=5,EXTRA=6,NAME=7,COMMENT=8,HCRC=9,DICTID=10,DICT=11,TYPE=12,TYPEDO=13,STORED=14,COPY_=15,COPY=16,TABLE=17,LENLENS=18,CODELENS=19,LEN_=20,LEN=21,LENEXT=22,DIST=23,DISTEXT=24,MATCH=25,LIT=26,CHECK=27,LENGTH=28,DONE=29,BAD=30,MEM=31,SYNC=32,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS;function zswap32(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new utils$1.Buf16(320),this.work=new utils$1.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new utils$1.Buf32(ENOUGH_LENS),t.distcode=t.distdyn=new utils$1.Buf32(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK):Z_STREAM_ERROR}function inflateReset(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)):Z_STREAM_ERROR}function inflateReset2(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,inflateReset(e))):Z_STREAM_ERROR}function inflateInit2(e,t){var r,n;return e?(n=new InflateState,e.state=n,n.window=null,(r=inflateReset2(e,t))!==Z_OK&&(e.state=null),r):Z_STREAM_ERROR}function inflateInit(e){return inflateInit2(e,DEF_WBITS)}var lenfix,distfix,virgin=!0;function fixedtables(e){if(virgin){var t;for(lenfix=new utils$1.Buf32(512),distfix=new utils$1.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inflate_table2(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inflate_table2(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5}function updatewindow(e,t,r,n){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new utils$1.Buf8(a.wsize)),n>=a.wsize?(utils$1.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>n&&(o=n),utils$1.arraySet(a.window,t,r-n,o,a.wnext),(n-=o)?(utils$1.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}function inflate$2(e,t){var r,n,o,a,i,s,l,c,u,$,p,f,d,_,y,h,g,b,m,S,E,O,v,T,I=0,P=new utils$1.Buf8(4),w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Z_STREAM_ERROR;(r=e.state).mode===TYPE&&(r.mode=TYPEDO),i=e.next_out,o=e.output,l=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,c=r.hold,u=r.bits,$=s,p=l,O=Z_OK;e:for(;;)switch(r.mode){case HEAD:if(0===r.wrap){r.mode=TYPEDO;break}for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(2&r.wrap&&35615===c){r.check=0,P[0]=255&c,P[1]=c>>>8&255,r.check=crc32(r.check,P,2,0),c=0,u=0,r.mode=FLAGS;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=BAD;break}if((15&c)!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(u-=4,E=8+(15&(c>>>=4)),0===r.wbits)r.wbits=E;else if(E>r.wbits){e.msg="invalid window size",r.mode=BAD;break}r.dmax=1<<E,e.adler=r.check=1,r.mode=512&c?DICTID:TYPE,c=0,u=0;break;case FLAGS:for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(r.flags=c,(255&_flagsInstanceProperty(r))!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(57344&_flagsInstanceProperty(r)){e.msg="unknown header flags set",r.mode=BAD;break}r.head&&(r.head.text=c>>8&1),512&_flagsInstanceProperty(r)&&(P[0]=255&c,P[1]=c>>>8&255,r.check=crc32(r.check,P,2,0)),c=0,u=0,r.mode=TIME;case TIME:for(;u<32;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.head&&(r.head.time=c),512&_flagsInstanceProperty(r)&&(P[0]=255&c,P[1]=c>>>8&255,P[2]=c>>>16&255,P[3]=c>>>24&255,r.check=crc32(r.check,P,4,0)),c=0,u=0,r.mode=OS;case OS:for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&_flagsInstanceProperty(r)&&(P[0]=255&c,P[1]=c>>>8&255,r.check=crc32(r.check,P,2,0)),c=0,u=0,r.mode=EXLEN;case EXLEN:if(1024&_flagsInstanceProperty(r)){for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.length=c,r.head&&(r.head.extra_len=c),512&_flagsInstanceProperty(r)&&(P[0]=255&c,P[1]=c>>>8&255,r.check=crc32(r.check,P,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(1024&_flagsInstanceProperty(r)&&((f=r.length)>s&&(f=s),f&&(r.head&&(E=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),utils$1.arraySet(r.head.extra,n,a,f,E)),512&_flagsInstanceProperty(r)&&(r.check=crc32(r.check,n,f,a)),s-=f,a+=f,r.length-=f),r.length))break e;r.length=0,r.mode=NAME;case NAME:if(2048&_flagsInstanceProperty(r)){if(0===s)break e;f=0;do{E=n[a+f++],r.head&&E&&r.length<65536&&(r.head.name+=String.fromCharCode(E))}while(E&&f<s);if(512&_flagsInstanceProperty(r)&&(r.check=crc32(r.check,n,f,a)),s-=f,a+=f,E)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=COMMENT;case COMMENT:if(4096&_flagsInstanceProperty(r)){if(0===s)break e;f=0;do{E=n[a+f++],r.head&&E&&r.length<65536&&(r.head.comment+=String.fromCharCode(E))}while(E&&f<s);if(512&_flagsInstanceProperty(r)&&(r.check=crc32(r.check,n,f,a)),s-=f,a+=f,E)break e}else r.head&&(r.head.comment=null);r.mode=HCRC;case HCRC:if(512&_flagsInstanceProperty(r)){for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(c!==(65535&r.check)){e.msg="header crc mismatch",r.mode=BAD;break}c=0,u=0}r.head&&(r.head.hcrc=_flagsInstanceProperty(r)>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=TYPE;break;case DICTID:for(;u<32;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}e.adler=r.check=zswap32(c),c=0,u=0,r.mode=DICT;case DICT:if(0===r.havedict)return e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,Z_NEED_DICT;e.adler=r.check=1,r.mode=TYPE;case TYPE:if(t===Z_BLOCK||t===Z_TREES)break e;case TYPEDO:if(r.last){c>>>=7&u,u-=7&u,r.mode=CHECK;break}for(;u<3;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}switch(r.last=1&c,u-=1,3&(c>>>=1)){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,t===Z_TREES){c>>>=2,u-=2;break e}break;case 2:r.mode=TABLE;break;case 3:e.msg="invalid block type",r.mode=BAD}c>>>=2,u-=2;break;case STORED:for(c>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=65535&c,c=0,u=0,r.mode=COPY_,t===Z_TREES)break e;case COPY_:r.mode=COPY;case COPY:if(f=r.length){if(f>s&&(f=s),f>l&&(f=l),0===f)break e;utils$1.arraySet(o,n,a,f,i),s-=f,a+=f,l-=f,i+=f,r.length-=f;break}r.mode=TYPE;break;case TABLE:for(;u<14;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(r.nlen=257+(31&c),c>>>=5,u-=5,r.ndist=1+(31&c),c>>>=5,u-=5,r.ncode=4+(15&c),c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have<r.ncode;){for(;u<3;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.lens[w[r.have++]]=7&c,c>>>=3,u-=3}for(;r.have<19;)r.lens[w[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,v={bits:r.lenbits},O=inflate_table2(CODES,r.lens,0,19,r.lencode,0,r.work,v),r.lenbits=v.bits,O){e.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have<r.nlen+r.ndist;){for(;h=(I=r.lencode[c&(1<<r.lenbits)-1])>>>16&255,g=65535&I,!((y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(g<16)c>>>=y,u-=y,r.lens[r.have++]=g;else{if(16===g){for(T=y+2;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(c>>>=y,u-=y,0===r.have){e.msg="invalid bit length repeat",r.mode=BAD;break}E=r.lens[r.have-1],f=3+(3&c),c>>>=2,u-=2}else if(17===g){for(T=y+3;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}u-=y,E=0,f=3+(7&(c>>>=y)),c>>>=3,u-=3}else{for(T=y+7;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}u-=y,E=0,f=11+(127&(c>>>=y)),c>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=BAD;break}for(;f--;)r.lens[r.have++]=E}}if(r.mode===BAD)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,v={bits:r.lenbits},O=inflate_table2(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,v),r.lenbits=v.bits,O){e.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,v={bits:r.distbits},O=inflate_table2(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,v),r.distbits=v.bits,O){e.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,t===Z_TREES)break e;case LEN_:r.mode=LEN;case LEN:if(s>=6&&l>=258){e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,inflate_fast2(e,p),i=e.next_out,o=e.output,l=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,c=r.hold,u=r.bits,r.mode===TYPE&&(r.back=-1);break}for(r.back=0;h=(I=r.lencode[c&(1<<r.lenbits)-1])>>>16&255,g=65535&I,!((y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(h&&!(240&h)){for(b=y,m=h,S=g;h=(I=r.lencode[S+((c&(1<<b+m)-1)>>b)])>>>16&255,g=65535&I,!(b+(y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}c>>>=b,u-=b,r.back+=b}if(c>>>=y,u-=y,r.back+=y,r.length=g,0===h){r.mode=LIT;break}if(32&h){r.back=-1,r.mode=TYPE;break}if(64&h){e.msg="invalid literal/length code",r.mode=BAD;break}r.extra=15&h,r.mode=LENEXT;case LENEXT:if(r.extra){for(T=r.extra;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;h=(I=r.distcode[c&(1<<r.distbits)-1])>>>16&255,g=65535&I,!((y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(!(240&h)){for(b=y,m=h,S=g;h=(I=r.distcode[S+((c&(1<<b+m)-1)>>b)])>>>16&255,g=65535&I,!(b+(y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}c>>>=b,u-=b,r.back+=b}if(c>>>=y,u-=y,r.back+=y,64&h){e.msg="invalid distance code",r.mode=BAD;break}r.offset=g,r.extra=15&h,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(T=r.extra;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(0===l)break e;if(f=p-l,r.offset>f){if((f=r.offset-f)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=BAD;break}f>r.wnext?(f-=r.wnext,d=r.wsize-f):d=r.wnext-f,f>r.length&&(f=r.length),_=r.window}else _=o,d=i-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{o[i++]=_[d++]}while(--f);0===r.length&&(r.mode=LEN);break;case LIT:if(0===l)break e;o[i++]=r.length,l--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;u<32;){if(0===s)break e;s--,c|=n[a++]<<u,u+=8}if(p-=l,e.total_out+=p,r.total+=p,p&&(e.adler=r.check=_flagsInstanceProperty(r)?crc32(r.check,o,p,i-p):adler32(r.check,o,p,i-p)),p=l,(_flagsInstanceProperty(r)?c:zswap32(c))!==r.check){e.msg="incorrect data check",r.mode=BAD;break}c=0,u=0}r.mode=LENGTH;case LENGTH:if(r.wrap&&_flagsInstanceProperty(r)){for(;u<32;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(c!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=BAD;break}c=0,u=0}r.mode=DONE;case DONE:O=Z_STREAM_END;break e;case BAD:O=Z_DATA_ERROR;break e;case MEM:return Z_MEM_ERROR;default:return Z_STREAM_ERROR}return e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,(r.wsize||p!==e.avail_out&&r.mode<BAD&&(r.mode<CHECK||t!==Z_FINISH))&&updatewindow(e,e.output,e.next_out,p-e.avail_out),$-=e.avail_in,p-=e.avail_out,e.total_in+=$,e.total_out+=p,r.total+=p,r.wrap&&p&&(e.adler=r.check=_flagsInstanceProperty(r)?crc32(r.check,o,p,e.next_out-p):adler32(r.check,o,p,e.next_out-p)),e.data_type=r.bits+(r.last?64:0)+(r.mode===TYPE?128:0)+(r.mode===LEN_||r.mode===COPY_?256:0),(0===$&&0===p||t===Z_FINISH)&&O===Z_OK&&(O=Z_BUF_ERROR),O}function inflateEnd(e){if(!e||!e.state)return Z_STREAM_ERROR;var t=e.state;return t.window&&(t.window=null),e.state=null,Z_OK}function inflateGetHeader(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,Z_OK):Z_STREAM_ERROR}function inflateSetDictionary(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&r.mode!==DICT?Z_STREAM_ERROR:r.mode===DICT&&adler32(1,t,n,0)!==r.check?Z_DATA_ERROR:updatewindow(e,t,n,n)?(r.mode=MEM,Z_MEM_ERROR):(r.havedict=1,Z_OK):Z_STREAM_ERROR}inflate$3.inflateReset=inflateReset,inflate$3.inflateReset2=inflateReset2,inflate$3.inflateResetKeep=inflateResetKeep,inflate$3.inflateInit=inflateInit,inflate$3.inflateInit2=inflateInit2,inflate$3.inflate=inflate$2,inflate$3.inflateEnd=inflateEnd,inflate$3.inflateGetHeader=inflateGetHeader,inflate$3.inflateSetDictionary=inflateSetDictionary,inflate$3.inflateInfo="pako inflate (from Nodeca project)";var constants$1={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function GZheader$1(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader$1,zlib_inflate=inflate$3,utils=common,strings=strings$2,c=constants$1,msg=messages,ZStream=zstream,GZheader=gzheader,toString2=Object.prototype.toString;function Inflate(e){if(!(this instanceof Inflate))return new Inflate(e);this.options=utils.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZStream,this.strm.avail_out=0;var r=zlib_inflate.inflateInit2(this.strm,t.windowBits);if(r!==c.Z_OK)throw new Error(msg[r]);if(this.header=new GZheader,zlib_inflate.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=strings.string2buf(t.dictionary):"[object ArrayBuffer]"===toString2.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=zlib_inflate.inflateSetDictionary(this.strm,t.dictionary))!==c.Z_OK))throw new Error(msg[r])}function inflate$1(e,t){var r=new Inflate(t);if(r.push(e,!0),r.err)throw r.msg||msg[r.err];return r.result}function inflateRaw(e,t){return(t=t||{}).raw=!0,inflate$1(e,t)}Inflate.prototype.push=function(e,t){var r,n,o,a,i,s=this.strm,l=this.options.chunkSize,u=this.options.dictionary,$=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?c.Z_FINISH:c.Z_NO_FLUSH,"string"==typeof e?s.input=strings.binstring2buf(e):"[object ArrayBuffer]"===toString2.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new utils.Buf8(l),s.next_out=0,s.avail_out=l),(r=zlib_inflate.inflate(s,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&u&&(r=zlib_inflate.inflateSetDictionary(this.strm,u)),r===c.Z_BUF_ERROR&&!0===$&&(r=c.Z_OK,$=!1),r!==c.Z_STREAM_END&&r!==c.Z_OK)return this.onEnd(r),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&r!==c.Z_STREAM_END&&(0!==s.avail_in||n!==c.Z_FINISH&&n!==c.Z_SYNC_FLUSH)||("string"===this.options.to?(o=strings.utf8border(s.output,s.next_out),a=s.next_out-o,i=strings.buf2string(s.output,o),s.next_out=a,s.avail_out=l-a,a&&utils.arraySet(s.output,s.output,o,a,0),this.onData(i)):this.onData(utils.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&($=!0)}while((s.avail_in>0||0===s.avail_out)&&r!==c.Z_STREAM_END);return r===c.Z_STREAM_END&&(n=c.Z_FINISH),n===c.Z_FINISH?(r=zlib_inflate.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===c.Z_OK):n!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),s.avail_out=0,!0)},Inflate.prototype.onData=function(e){this.chunks.push(e)},Inflate.prototype.onEnd=function(e){e===c.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=utils.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},inflate$4.Inflate=Inflate,inflate$4.inflate=inflate$1,inflate$4.inflateRaw=inflateRaw,inflate$4.ungzip=inflate$1;var assign2=common.assign,deflate=deflate$4,inflate=inflate$4,constants=constants$1,pako={};assign2(pako,deflate,inflate,constants);var pako_1=pako,pako$1=getDefaultExportFromCjs(pako_1),path=path$q,setInterval$4=path.setInterval,parent$1=setInterval$4,setInterval$3=parent$1,parent=setInterval$3,setInterval$2=parent,setInterval$1=setInterval$2,setInterval=setInterval$1,_setInterval=getDefaultExportFromCjs(setInterval),lockId=1,PromiseLock=function(){return _createClass((function e(t){_classCallCheck(this,e),_defineProperty(this,"lockingPromise",_Promise.resolve()),_defineProperty(this,"locks",0),_defineProperty(this,"name",""),_defineProperty(this,"lockId",void 0),this.lockId=lockId++,t&&(this.name=t)}),[{key:"isLocked",get:function(){return this.locks>0}},{key:"lock",value:function(){var e,t=this;this.locks+=1;var r=new _Promise((function(r){e=function(){t.locks-=1,r()}})),n=this.lockingPromise.then((function(){return e}));return this.lockingPromise=this.lockingPromise.then((function(){return r})),n}}])}(),DB_NAME="__rtc_umd_name__",indexedDB$1=function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},IndexedDBInterface=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,"storeName",void 0),_defineProperty(this,"pendingList",[]),this.storeName=t,!isSSR()&&indexedDB$1()&&this._checkAndCreateStore(t)}return _createClass(e,[{key:"_checkAndCreateStore",value:(s=_asyncToGenerator(_regeneratorRuntime().mark((function t(r,n){var o,a,i=this;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e._promiseLock.lock();case 2:if(o=t.sent,!indexedDB$1().databases){t.next=6;break}return t.next=6,new _Promise((function(e){var t=function(){return indexedDB$1().databases().finally(e)};a=_setInterval(t,100),t()})).finally((function(){return clearInterval(a)}));case 6:return t.abrupt("return",new _Promise((function(t){e.db&&(e.db.close(),delete e.db);var a=n?indexedDB$1().open(DB_NAME,n):indexedDB$1().open(DB_NAME);a.onupgradeneeded=function(){a.result.createObjectStore(r)},a.onerror=function(){console.error("IndexedDBInterface error",a.error)},a.onsuccess=function(){var n=a.result;e.db=n;try{var s;e.db.transaction(i.storeName,"readonly"),_forEachInstanceProperty(s=i.pendingList).call(s,function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,a;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.txMode,n=t.pendResolve,o=t.pendReject,e.prev=1,e.next=4,i._getStore(r);case 4:a=e.sent,n(a),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),o();case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()),t()}catch(e){t(i._checkAndCreateStore(r,n.version+1))}finally{o()}}})));case 7:case"end":return t.stop()}}),t)}))),function(e,t){return s.apply(this,arguments)})},{key:"_getStore",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function t(r){var n,o=this;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e._promiseLock.lock();case 2:return n=t.sent,t.abrupt("return",new _Promise((function(t,a){if(!e.db)return o.pendingList.push({txMode:r,pendResolve:t,pendReject:a}),void n();try{t(e.db.transaction(o.storeName,r).objectStore(o.storeName))}catch(e){return void o.pendingList.push({txMode:r,pendResolve:t,pendReject:a})}finally{n()}})));case 4:case"end":return t.stop()}}),t)}))),function(e){return i.apply(this,arguments)})},{key:"put2String",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n=_JSON$stringify(t)}catch(e){n=t}return e.next=3,this.put(n,r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"get4String",value:(o=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(t);case 2:r=e.sent;try{n=JSON.parse(r)}catch(e){n=r}return e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"put",value:(n=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getStore("readwrite");case 2:return n=e.sent,e.abrupt("return",new _Promise((function(e,o){var a=n.put(t,r);a.onsuccess=function(){e()},a.onerror=function(e){o(e)}})));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"get",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getStore("readonly");case 2:return r=e.sent,e.abrupt("return",new _Promise((function(e,n){var o=r.get(t);o.onsuccess=function(){e(o.result)},o.onerror=function(e){n(e)}})));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"del",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getStore("readwrite");case 2:return r=e.sent,e.abrupt("return",new _Promise((function(e,n){var o=r.delete(t);o.onsuccess=function(){e()},o.onerror=function(e){n(e)}})));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]);var t,r,n,o,a,i,s}();function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(_includesInstanceProperty$1(t).call(t,n))continue;r[n]=e[n]}return r}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose(e,t);if(_Object$getOwnPropertySymbols$1){var a=_Object$getOwnPropertySymbols$1(e);for(n=0;n<a.length;n++)r=a[n],_includesInstanceProperty$1(t).call(t,r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}_defineProperty(IndexedDBInterface,"db",void 0),_defineProperty(IndexedDBInterface,"state","init"),_defineProperty(IndexedDBInterface,"_promiseLock",new PromiseLock("iDB"));var _excluded=["message"];function isOutBufferItem(e){return void 0!==e.report_id}var _navigator,_context$2,_window$localStorage$1,LongStringReportor=function(){return _createClass((function e(){_classCallCheck(this,e),_defineProperty(this,"name","LongStringReportor"),_defineProperty(this,"inBuffer",[]),_defineProperty(this,"outBuffer",[])}),[{key:"push",value:function(e){var t;e.message&&this.inBuffer.push(_objectSpread2(_objectSpread2({},e),{},{message:{id:_sliceInstanceProperty(t=genUuid()).call(t,0,3),index:0,end:!0,msg:e.message}}))}},{key:"splice",value:function(e){for(var t=[],r=0;this.outBuffer.length;){var n=_JSON$stringify(this.outBuffer[0]).length;if(!(n<e))break;e-=n,r+=n,t.push(this.outBuffer.shift())}for(;this.inBuffer[0]&&e>0;){var o=this.inBuffer[0],a=o.message,i=_objectSpread2(_objectSpread2({},_objectWithoutProperties(o,_excluded)),{},{message:_objectSpread2(_objectSpread2({},a),{},{msg:""})}),s=_JSON$stringify(i).length,l=e-s,c=_objectSpread2({},i);if(l>a.msg.length)c.message.msg=a.msg,this.inBuffer.shift();else{if(!(l>=10))break;var u,$,p=_sliceInstanceProperty(u=a.msg).call(u,0,l);c.message.msg=p,c.message.end=!1,this.inBuffer[0].message.msg=_sliceInstanceProperty($=a.msg).call($,l),this.inBuffer[0].message.index++}var f=_JSON$stringify(c.message),d=f.length;e-=d+s,r+=d+s,t.push(_objectSpread2(_objectSpread2({},c),{},{message:f}))}return{payload:t,payloadSize:r}}},{key:"unshift",value:function(e){this.outBuffer=_concatInstanceProperty(e).call(e,this.outBuffer)}},{key:"get",value:function(){var e,t;return _concatInstanceProperty(e=[]).call(e,_toConsumableArray(this.outBuffer),_toConsumableArray(_mapInstanceProperty(t=this.inBuffer).call(t,(function(e){return _objectSpread2(_objectSpread2({},e),{},{message:_JSON$stringify(e.message)})}))))}},{key:"set",value:function(e){var t=this,r=[],n=[];_forEachInstanceProperty(e).call(e,(function(e){isOutBufferItem(e)?t.outBuffer.push(e):(e.message||(e.message=""),t.inBuffer.push(_objectSpread2(_objectSpread2({},e),{},{message:JSON.parse(e.message)})))})),this.outBuffer=_concatInstanceProperty(r).call(r,this.outBuffer),this.inBuffer=_concatInstanceProperty(n).call(n,this.inBuffer)}},{key:"isEmpty",value:function(){return 0===this.inBuffer.length&&0===this.outBuffer.length}}])}(),longStringReportor=new LongStringReportor,HARDCODE_UPLOAD_MAX_LIMIT=5e5,HARDCODE_UPLOAD_MIN_LIMIT=5e4,DEFAULT_UPLOAD_LIMIT=5e5,HTTP_REQUEST_TIMEOUT=1e4,REPORT_INTERVAL=2e3,defaultCommonStats={product_line:"rtc",report_version:"5",os:"web",user_agent:isSSR()?"":null===(_navigator=navigator)||void 0===_navigator?void 0:_navigator.userAgent,platform:"web",product:"webrtc",app_state:"active"},REPORT_DB_BUFFER_STORE="LogReportor",DEBUG$1="undefined"!=typeof window&&(_includesInstanceProperty(_context$2=window.location.search).call(_context$2,"_rtc_debug_")||(null===(_window$localStorage$1=window.localStorage)||void 0===_window$localStorage$1?void 0:_window$localStorage$1.getItem("_rtc_debug_"))),ReportorDBBuffer=function(){return _createClass((function e(t){_classCallCheck(this,e),_defineProperty(this,"_buffer",void 0),this._buffer=new IndexedDBInterface(t)}),[{key:"set",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._buffer.put2String(t,r);case 2:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"get",value:(e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],e.prev=1,e.next=4,this._buffer.get4String(t);case 4:n=e.sent,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(1);case 9:return e.abrupt("return",null!==(r=n)&&void 0!==r?r:[]);case 10:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(t){return e.apply(this,arguments)})}]);var e,t}(),Reportor=function(){return _createClass((function e(){var t=this;_classCallCheck(this,e),_defineProperty(this,"reportCommon",defaultCommonStats),_defineProperty(this,"reportIds",new _Map),_defineProperty(this,"dataBuffer",[]),_defineProperty(this,"reportorList",[]),_defineProperty(this,"dbBuffer",void 0),_defineProperty(this,"posting",!1),_defineProperty(this,"sucSendTimer",void 0),_defineProperty(this,"preSucTime",0),_defineProperty(this,"errSendTimer",void 0),_defineProperty(this,"errSendDelay",100),_defineProperty(this,"_logServerUrl",void 0),_defineProperty(this,"_retryCount",0),_defineProperty(this,"_reportLimit",DEFAULT_UPLOAD_LIMIT),_defineProperty(this,"_disableTimeout",!1),isSSR()||(window.addEventListener("beforeunload",(function(){clearTimeout(t.errSendTimer),clearTimeout(t.sucSendTimer),t.send(void 0,!0)})),document.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState?t.setCommonStats({app_state:"active"}):"hidden"===document.visibilityState&&t.setCommonStats({app_state:"background"})})),DEBUG$1&&(window.__rtc_debug_reportor__=this)),CoreConfig.on("UPLOAD_REPORT_LIMIT",(function(e){t.setReportLimit(e)})),CoreConfig.on("ENABLE_REPORT_IDB_BUFFER",(function(e){e&&t.enableIndexedDBBuffer()})),_setTimeout((function(){t.reportorList.push(consoleReportor),t.reportorList.push(longStringReportor)}))}),[{key:"setUrl",value:function(e){this._logServerUrl=e}},{key:"setCommonStats",value:function(e){this.reportCommon=_Object$assign(this.reportCommon,e)}},{key:"getCommonStats",value:function(){return this.reportCommon}},{key:"setReportLimit",value:function(e){this._reportLimit=Math.max(e,HARDCODE_UPLOAD_MIN_LIMIT),this._reportLimit=Math.min(e,HARDCODE_UPLOAD_MAX_LIMIT)}},{key:"getReportId",value:function(e){var t;e=null!==(t=e)&&void 0!==t?t:"__global__",this.reportIds.has(e)||this.reportIds.set(e,0);var r=this.reportIds.get(e);return void 0===r&&(reportGlobalError("no reportId in reportId map with engine-session-id ".concat(e),0,{}),r=0),this.reportIds.set(e,r+1),r}},{key:"push",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])this.send(e);else{var t,r=null!==(t=e.engine_session_id)&&void 0!==t?t:"__global__";this.reportIds.has(r)||this.reportIds.set(r,0),this.dataBuffer.push(e),!this.posting&&!this.errSendTimer&&_Date$now()-this.preSucTime>2e3&&(clearTimeout(this.sucSendTimer),this.send())}}},{key:"enableIndexedDBBuffer",value:function(){var e,t=this;this.dbBuffer||(this.dbBuffer=new ReportorDBBuffer("ReportorDBBuffer"),this.dbBuffer.get(REPORT_DB_BUFFER_STORE).then((function(e){_forEachInstanceProperty(e).call(e,(function(e){t.push(e)}))})),_forEachInstanceProperty(e=this.reportorList).call(e,(function(e){var r;null===(r=t.dbBuffer)||void 0===r||r.get(e.name).then((function(t){e.set(t)}))})))}},{key:"backup",value:function(){var e=this;try{var t,r;null===(t=this.dbBuffer)||void 0===t||t.set(_toConsumableArray(this.dataBuffer),REPORT_DB_BUFFER_STORE),_forEachInstanceProperty(r=this.reportorList).call(r,(function(t){var r;null===(r=e.dbBuffer)||void 0===r||r.set(_toConsumableArray(t.get()),t.name)}))}catch(e){reportGlobalError("Error when save log into IDB",-1,e)}}},{key:"unshift",value:function(e){var t,r;this.dataBuffer=_concatInstanceProperty(t=e[0]).call(t,this.dataBuffer),_forEachInstanceProperty(r=this.reportorList).call(r,(function(t,r){var n;t.unshift(null!==(n=e[r+1])&&void 0!==n?n:[])}))}},{key:"_splice",value:function(){var e,t,r=this,n=findSizeIndex$1(this.dataBuffer,this._reportLimit);0===n&&this.dataBuffer.length>0&&(this._reportLimit=_JSON$stringify(this.dataBuffer[0]).length+10,n=1,reportGlobalError("update report limit to ".concat(this._reportLimit),0,null));var o=_spliceInstanceProperty(e=this.dataBuffer).call(e,0,n),a=_JSON$stringify(o).length,i=[o],s=this._reportLimit-a;return _forEachInstanceProperty(t=this.reportorList).call(t,(function(e){var t=_spliceInstanceProperty(e).call(e,s),n=t.payload,o=t.payloadSize;_forEachInstanceProperty(n).call(n,(function(e){var t,n,o;void 0===e.report_id&&(e.report_id=r.getReportId(e.engine_session_id),!isSSR()&&window.__onRTCReport&&(null===(t=(n=window).__onRTCReport)||void 0===t||t.call(n,null!==(o=e.engine_session_id)&&void 0!==o?o:"global",e,r.getCommonStats())))})),i.push(n),s-=o})),i}},{key:"send",value:(e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n,o,a,i,s,l,c,u,$,p;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.backup(),o=_reduceInstanceProperty(n=this.reportorList).call(n,(function(e,t){return e&&t.isEmpty()}),!0),(t||this.dataBuffer.length||!o)&&this._logServerUrl){e.next=4;break}return e.abrupt("return");case 4:if(t||(this.posting=!0),a=[],t||(a=this._splice()),i=DEBUG$1,s={data:t||_flatInstanceProperty(a).call(a),header:_objectSpread2(_objectSpread2({},this.reportCommon),{},{http_retry_count:this._retryCount}),from:"web",os:"web",version:"1"},l={method:"POST",body:i?_JSON$stringify(s):pako$1.gzip(_JSON$stringify(s))},!this._disableTimeout)try{c=new AbortController,l.signal=c.signal,_setTimeout((function(){c.abort()}),HTTP_REQUEST_TIMEOUT)}catch(e){console.warn("AbortController is not supported"),this._disableTimeout=!0}return i||(l.headers={"Content-Encoding":"gzip","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}),p=null,e.prev=13,e.next=16,fetch(this._logServerUrl,l);case 16:if(200!==(u=e.sent).status&&304!==u.status){e.next=23;break}return e.t0=JSON,e.next=21,u.text();case 21:e.t1=e.sent,p=e.t0.parse.call(e.t0,e.t1);case 23:e.next=28;break;case 25:e.prev=25,e.t2=e.catch(13),$=e.t2;case 28:t||(this.posting=!1),p&&0===p.StatusCode?t||r||this.sucSend():(_setTimeout((function(){var e,t,r,n;reportGlobalError(_concatInstanceProperty(e="reportor post error, resJSON:".concat(null===(t=p)||void 0===t?void 0:t.toString()," err:")).call(e,$),null!==(r=null===(n=u)||void 0===n?void 0:n.status)&&void 0!==r?r:-1,$)}),0),t?this.send(t):(this.unshift(a),r?this.send():this.errSend()));case 30:case"end":return e.stop()}}),e,this,[[13,25]])}))),function(t,r){return e.apply(this,arguments)})},{key:"_getDataBufferTotalSize",value:function(){var e;return _reduceInstanceProperty(e=this.dataBuffer).call(e,(function(e,t){return e+_JSON$stringify(t).length}),0)}},{key:"sucSend",value:function(){var e=this;this.errSendDelay=100,this._retryCount=0,this.preSucTime=_Date$now();var t=this._getDataBufferTotalSize()>2*DEFAULT_UPLOAD_LIMIT?REPORT_INTERVAL/2:REPORT_INTERVAL;this.sucSendTimer=_setTimeout((function(){return e.send()}),t)}},{key:"errSend",value:function(){var e=this;this.errSendTimer=_setTimeout((function(){e.send(),delete e.errSendTimer}),this.errSendDelay),this.errSendDelay*=2,this._retryCount++}}]);var e}();function findSizeIndex$1(e,t){for(var r=0,n=0;n<e.length;n++)if((r+=_JSON$stringify(e[n]).length)>t)return n;return e.length}var commonReportor=new Reportor,Monitor=function(){return _createClass((function e(t){_classCallCheck(this,e),_defineProperty(this,"modifyIds",{pre_connection:!1}),this.id=t}),[{key:"report",value:function(e,t,r){var n,o,a,i=_objectSpread2(_objectSpread2(_objectSpread2({event_key:e,rtc_timestamp:_Date$now()},this.modifyIds),t),{},{report_id:commonReportor.getReportId(this.modifyIds.engine_session_id)});("object"===_typeof(r)&&_Object$keys(r).length>0&&(i.common_extra_info=_JSON$stringify(r)),_forEachInstanceProperty(n=_Object$keys(i)).call(n,(function(e){void 0!==i[e]&&""!==i[e]||delete i[e]})),!isSSR()&&window.__onRTCReport)&&(null===(o=(a=window).__onRTCReport)||void 0===o||o.call(a,this.modifyIds.engine_session_id,i,commonReportor.getCommonStats()));"UT"!=={}.VITE_TEST&&commonReportor.push(i)}},{key:"reportLog",value:function(e){var t=_objectSpread2(_objectSpread2({event_key:"rtc_invoke_status",sdk_api_name:"console_log",rtc_timestamp:_Date$now()},this.modifyIds),{},{message:e});consoleReportor.push(t)}},{key:"reportLongString",value:function(e,t){var r=_objectSpread2(_objectSpread2({event_key:"rtc_invoke_status",sdk_api_name:"sdk_long_string_".concat(e),rtc_timestamp:_Date$now()},this.modifyIds),{},{message:t});longStringReportor.push(r)}},{key:"set",value:function(e){this.modifyIds=_Object$assign(this.modifyIds,e)}},{key:"destroy",value:function(){}}])}(),RESET_DURATION=36e5,MessageReportor=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,"_preTime",_Date$now()),_defineProperty(this,"_one2oneNum",0),_defineProperty(this,"_one2manyNum",0),_defineProperty(this,"_one2oneMsgCache",new _Map),_defineProperty(this,"_one2manyMsgCache",new _Map),_defineProperty(this,"roomId",""),_defineProperty(this,"userId",""),_defineProperty(this,"rtsSessionId",""),_defineProperty(this,"logger",void 0),_defineProperty(this,"serverUrl","server"),this.id=t,this.logger=new Logger("MessageReportor",1)}return _createClass(e,[{key:"needReport",value:function(t){return!!e.config&&(_Date$now()-this._preTime>=RESET_DURATION&&(this._preTime=_Date$now(),this._one2oneNum=0,this._one2manyNum=0),"one2one"===t&&this._one2oneNum<e.config.max_one2one_fpt_per_hour&&Math.random()<=e.config.one2one_fpt_ratio/100||"one2many"===t&&this._one2manyNum<e.config.max_one2many_fpt_per_hour&&Math.random()<=e.config.one2many_fpt_ratio/100)}},{key:"cacheP2PMsg",value:function(t){var r;this._one2oneMsgCache.set(t.msg_id,_objectSpread2({config_version:(null===(r=e.config)||void 0===r?void 0:r.version)||""},t))}},{key:"updateP2PMsg",value:function(e,t){var r=this._one2oneMsgCache.get(e);r&&this._one2oneMsgCache.set(e,_objectSpread2(_objectSpread2({},r),t))}},{key:"cacheCustomMsg",value:function(t){var r;this._one2manyMsgCache.set(t.msg_id,_objectSpread2({config_version:(null===(r=e.config)||void 0===r?void 0:r.version)||""},t))}},{key:"updateOne2ManyMsg",value:function(e,t){var r=this._one2manyMsgCache.get(e);r&&this._one2manyMsgCache.set(e,_objectSpread2(_objectSpread2({},r),t))}},{key:"reportP2PMsg",value:function(e){var t,r=this._one2oneMsgCache.get(e);r&&(this.logger.info("reportP2PMsg",r.type,_JSON$stringify(r)),null===(t=getMonitor(this.id))||void 0===t||t.report("rts_message",r))}},{key:"reportOne2ManyMsg",value:function(e){var t,r=this._one2manyMsgCache.get(e);r&&(this.logger.info("reportOne2ManyMsg",r.type,_JSON$stringify(r)),null===(t=getMonitor(this.id))||void 0===t||t.report("rts_message",r))}},{key:"reportMsgRecv",value:function(t){var r,n;t.config_version=(null===(r=e.config)||void 0===r?void 0:r.version)||"",this.logger.info("reportMsgRecv",t.type,_JSON$stringify(t)),null===(n=getMonitor(this.id))||void 0===n||n.report("rts_message",t)}},{key:"destroy",value:function(){this._one2manyNum=0,this._one2oneNum=0,this._one2manyMsgCache.clear(),this._one2oneMsgCache.clear(),this._preTime=_Date$now(),this.roomId="",this.userId="",this.rtsSessionId=""}}])}();_defineProperty(MessageReportor,"config",void 0);var globalMonitor=new Monitor("global"),reportGlobalError=function(e,t,r){globalMonitor.report("rtc_error",{message:e,error_code:t},r)};function reportGlobalLog(e){globalMonitor.reportLog(e)}var _context$1,monitorMap=new _Map,getMonitor=function(e){return monitorMap.get(e)},ENABLE_CONSOLE_UPLOAD="undefined"!=typeof window&&_includesInstanceProperty(_context$1=window.location.search).call(_context$1,"_rtc_upload_console_"),ConsoleReportor=function(){return _createClass((function e(){var t=this;_classCallCheck(this,e),_defineProperty(this,"name","ConsoleReportor"),_defineProperty(this,"_uuid","".concat(Math.floor(899*Math.random())+100)),_defineProperty(this,"_consoleReportId",0),_defineProperty(this,"_engineReportIdMap",new _Map),_defineProperty(this,"_enabled","NULL"),_defineProperty(this,"_consoleCutLength",CoreConfig.getParameter("UPLOAD_CONSOLE_LENGTH_CUT")),_defineProperty(this,"buffer",[]),ENABLE_CONSOLE_UPLOAD&&_setTimeout((function(){t.switchOn()}),0),CoreConfig.on("UPLOAD_CONSOLE_ON",(function(e){e?t.switchOn():t.turnOff()})),CoreConfig.on("UPLOAD_CONSOLE_LENGTH_CUT",(function(e){t._consoleCutLength=e}))}),[{key:"enabled",get:function(){return"OFF"!==this._enabled}},{key:"switchOn",value:function(){"NULL"===this._enabled&&(console.log("[LoggerReportor.constructor] console upload switch ON"),this._enabled="ON")}},{key:"turnOff",value:function(){"NULL"===this._enabled&&(console.log("[LoggerReportor.constructor] console upload switch OFF"),this._enabled="OFF",this.buffer=[])}},{key:"getEngineConsoleId",value:function(e){var t,r=null!==(t=this._engineReportIdMap.get(e))&&void 0!==t?t:0;return this._engineReportIdMap.set(e,r+1),r}},{key:"report",value:function(e,t,r,n,o,a,i,s,l){var c,u,$,p,f,d,_,y,h,g,b,m=this;if("OFF"!==this._enabled){var S=getMonitor(t),E=this._consoleReportId++,O=this.getEngineConsoleId(t),v=shallowJson(l,this._consoleCutLength),T=_toConsumableArray(l),I="".concat(s).replace(/%o|%s/gi,(function(){return shallowJson([T.shift()],m._consoleCutLength)})),P=_concatInstanceProperty(c=_concatInstanceProperty(u=_concatInstanceProperty($=_concatInstanceProperty(p=_concatInstanceProperty(f=_concatInstanceProperty(d=_concatInstanceProperty(_=_concatInstanceProperty(y=_concatInstanceProperty(h=_concatInstanceProperty(g=_concatInstanceProperty(b="[".concat(this._uuid,"-")).call(b,E,"][")).call(g,t,"-")).call(h,O,"]-")).call(y,r,"-")).call(_,e,"[")).call(d,n,"]")).call(f,o,"[")).call(p,a,".")).call($,i,"] ")).call(u,I," ")).call(c,v);S?S.reportLog(P):reportGlobalLog(P)}}},{key:"push",value:function(e){"OFF"!==this._enabled&&this.buffer.push(e)}},{key:"splice",value:function(e){var t;if("ON"!==this._enabled)return{payload:[],payloadSize:0};var r=findSizeIndex(this.buffer,e),n=r.index,o=r.size;return{payload:_spliceInstanceProperty(t=this.buffer).call(t,0,n),payloadSize:o}}},{key:"unshift",value:function(e){this.buffer=_concatInstanceProperty(e).call(e,this.buffer)}},{key:"get",value:function(){return this.buffer}},{key:"set",value:function(e){this.buffer=_concatInstanceProperty(e).call(e,this.buffer)}},{key:"isEmpty",value:function(){return"OFF"===this._enabled||0===this.buffer.length}}])}();function shallowJson(e,t){return _mapInstanceProperty(e).call(e,(function(e){var r="";try{if("string"==typeof e)return e;if(void 0===e)return"undefined";if(null===e)return"null";if(e instanceof MediaStreamTrack)return mediaTrackStringify(e);if(e instanceof MediaStream)return mediaStreamStringify(e);if(e instanceof RTCRtpSender)return mediaSenderStringify(e);if(e instanceof RTCRtpReceiver)return mediaReceiverStringify(e);if(e instanceof RTCRtpTransceiver)return mediaTransceiverStringify(e);r=_JSON$stringify(e)}catch(t){r=e.toString()}return r&&r.length>=t&&(r=_sliceInstanceProperty(r).call(r,0,t)),r})).join(", ")}function findSizeIndex(e,t){for(var r=0,n=0;n<e.length;n++){var o=_JSON$stringify(e[n]).length;if((r+=o)>t)return{index:n,size:r-o}}return{index:e.length,size:r}}var _context,_window$localStorage,consoleReportor=new ConsoleReportor,HEAD_TEXT="[VERTC]",baseColor="#0050b3",colorMap=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"DEBUG","rgba(0, 0, 0, 0)")," INFO","rgba(93, 173, 226, 0)")," WARN","rgba(255, 119, 0, 0.3)"),"ERROR","rgba(255, 0, 0, 0.3)")," SUCC","rgba(0, 119, 0, 0.3)"),DEBUG="undefined"!=typeof window&&(_includesInstanceProperty(_context=window.location.search).call(_context,"_rtc_debug_")||(null===(_window$localStorage=window.localStorage)||void 0===_window$localStorage?void 0:_window$localStorage.getItem("_rtc_debug_"))),Logger=function(){return _createClass((function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"global";_classCallCheck(this,e),_defineProperty(this,"indent",void 0),_defineProperty(this,"module",void 0),_defineProperty(this,"_engineId",void 0),this.module=t,this.indent=r,this._engineId=n}),[{key:"_print",value:function(e,t){for(var r,n,o,a,i,s,l,c,u=arguments.length,$=new Array(u>2?u-2:0),p=2;p<u;p++)$[p-2]=arguments[p];var f=$.shift();try{var d,_,y,h,g,b=_concatInstanceProperty(d=[]).call(d,$),m="".concat(f).replace(/%o/gi,(function(){var e=b.shift();return _JSON$stringify(e)}));iDB.set(_concatInstanceProperty(_=_concatInstanceProperty(y=_concatInstanceProperty(h=_concatInstanceProperty(g="".concat(HEAD_TEXT,"[")).call(g,this.module,".")).call(h,t,"] ")).call(y,m," ")).call(_,_mapInstanceProperty(b).call(b,(function(e){return _JSON$stringify(e)})).join(", ")))}catch(e){}for(var S="",E=0;E<this.indent;E++)S+=" ";var O=getTimestamp();consoleReportor.report(HEAD_TEXT,this._engineId,O,e,S,this.module,t,f,$),DEBUG&&(r=console).log.apply(r,_concatInstanceProperty(n=[_concatInstanceProperty(o=_concatInstanceProperty(a=_concatInstanceProperty(i=_concatInstanceProperty(s=_concatInstanceProperty(l=_concatInstanceProperty(c="%c".concat(O,"-")).call(c,HEAD_TEXT,"%c[")).call(l,e,"]%c")).call(s,S,"[")).call(i,this.module,".")).call(a,t,"] ")).call(o,f),"color:".concat(baseColor,";"),"background-color:".concat(colorMap[e],";"),"color:".concat(baseColor,";")]).call(n,$))}},{key:"print",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=[" INFO",e]).call(t,n))}},{key:"debug",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=["DEBUG",e]).call(t,n))}},{key:"info",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=[" INFO",e]).call(t,n))}},{key:"warn",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=[" WARN",e]).call(t,n))}},{key:"error",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=["ERROR",e]).call(t,n))}},{key:"success",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=[" SUCC",e]).call(t,n))}}])}(),getTimestamp=function(){var e,t,r=new Date;return _concatInstanceProperty(e="".concat(r.toTimeString().split(" ")[0],":")).call(e,_padStartInstanceProperty(t=r.getMilliseconds().toString()).call(t,3,"0"))},EffectBeautyMode=function(e){return e[e.EFFECT_WHITE_MODE=0]="EFFECT_WHITE_MODE",e[e.EFFECT_SMOOTH_MODE=1]="EFFECT_SMOOTH_MODE",e[e.EFFECT_SHARPEN_MODE=2]="EFFECT_SHARPEN_MODE",e}(EffectBeautyMode||{}),BackgroundMode=function(e){return e.BACKGROUND_BLUR="blur",e.BACKGROUND_IMAGE="image-url",e.BACKGROUND_COLOR="color",e.BACKGROUND_VIDEO="video-url",e}(BackgroundMode||{}),BackgroundAIModelType=function(e){return e.PERFORMANCE="fast",e.QUALITY="accurate",e}(BackgroundAIModelType||{}),BackgroundAIBackend=function(e){return e.CPU="cpu",e.GPU="gpu",e}(BackgroundAIBackend||{});const cdn="https://sf-web-ar.bytepluscdn.com/obj/web-ar-resources-sg/ies/webar/1.0.0.191/87f23f8/3.6.1-rc.0/package/dist/index.js",auth_server="https://cv-tob.byteintl.com/api/v2/webardeliver/verify";var _Class,DEFAULT_SDK_URL=cdn,DEFAULT_AUTH_URL=auth_server,TIME_OUT_MESSAGE="Load WebAR SDK timeout",INIT_FAILED_CODE=100,DEFAULT_FRAMERATE=15;function _callSuper(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?_Reflect$construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}var __defProp=_Object$defineProperty,__getOwnPropDesc=_Object$getOwnPropertyDescriptor,__decorateClass=function(e,t,r,n){for(var o,a=n>1?void 0:n?__getOwnPropDesc(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(a=(n?o(t,r,a):o(a))||a);return n&&a&&__defProp(t,r,a),a},logger=new Logger("RTCBeautyExtension",1);function getBrowser(){var e="none";return null!==window.navigator.userAgent.match("Firefox")?e="mozilla":null!==window.navigator.userAgent.match("Chrome")?(e="chrome-stable",null!==window.navigator.userAgent.match("Electron")&&(e="electron")):(null!==window.navigator.userAgent.match("Safari")||null!==window.navigator.userAgent.match("AppleWebKit"))&&(e="safari"),e}var _RTCBeautyExtension2=(_Class=function(){function e(){var t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(_classCallCheck(this,e),_defineProperty(r=_callSuper(this,e),"name","RTCBeautyExtension"),_defineProperty(r,"version","4.66.20"),_defineProperty(r,"_enable",!1),_defineProperty(r,"_session",void 0),_defineProperty(r,"canvas",void 0),_defineProperty(r,"_enableBeauty",!1),_defineProperty(r,"_enableBackground",!1),_defineProperty(r,"_fps",DEFAULT_FRAMERATE),_defineProperty(r,"_backgroundBackend",BackgroundAIBackend.CPU),_defineProperty(r,"_backgroundAIModelType",BackgroundAIModelType.QUALITY),_defineProperty(r,"_backgroundMode",BackgroundMode.BACKGROUND_BLUR),_defineProperty(r,"_backgroundUrl",""),_defineProperty(r,"_backgroundVideoUrl",""),_defineProperty(r,"_backgroundColor",void 0),_defineProperty(r,"_beautyDefaultValue",{skinSmoothingSharpness:.5,whitenAmount:.5,skinSmoothingAmount:.5}),_defineProperty(r,"_radius",20),_defineProperty(r,"_preTrack",null),_RTCBeautyExtension2._sdkUrl=n.sdkUrl||DEFAULT_SDK_URL,_RTCBeautyExtension2._sdkAuthServer=n.sdkAuthServer||DEFAULT_AUTH_URL,_RTCBeautyExtension2._authFileUrl=n.authFileUrl||"",n.aiBackend===BackgroundAIBackend.GPU)&&("undefined"!=typeof WebGL2RenderingContext&&("undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(16,16).getContext("webgl2")&&(r._backgroundBackend=BackgroundAIBackend.GPU):r._backgroundBackend=BackgroundAIBackend.GPU));return r._backgroundAIModelType=null!==(t=n.aiModelType)&&void 0!==t?t:BackgroundAIModelType.QUALITY,r.on("stop",(function(){r._preTrack&&(r._preTrack=null)})),r}return _inherits(e,PreProcessingExtension),_createClass(e,[{key:"initWebArSDK",value:(f=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==_RTCBeautyExtension2.WebARMainSDK){e.next=3;break}return e.next=3,_RTCBeautyExtension2.loadWebARSDK();case 3:_RTCBeautyExtension2.WebARMainSDK&&!this._session&&(this.canvas=document.createElement("canvas"),this._session=_RTCBeautyExtension2.WebARMainSDK.createSession({canvas:this.canvas,authorization:{file:_RTCBeautyExtension2._authFileUrl||"",serviceEndpoint:_RTCBeautyExtension2._sdkAuthServer},__videoPlayerSettings:{shouldAttachVideoElementToDOM:"safari"===getBrowser()}}),this._session.virtualBackgroundController.blurSettings.radius=this._radius,this._session.virtualBackgroundController.updatePreferredPortraitMattingInferenceBackend(this._backgroundBackend),this._session.virtualBackgroundController.updatePortraitMattingModelType(this._backgroundAIModelType),this._session.pipelineDriver="worker","safari"===getBrowser()&&this._session.events.addEventListener("frameProcessingWillBegin",(function(e){t._setCanvasSize(e.width,e.height)})));case 4:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"init",value:(p=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,a,i,s;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(r=this.monitor)||void 0===r||r.report("rtc_invoke_status",{sdk_api_name:"RTCBeautyExtension.init.params",message:_JSON$stringify({hasAuthFile:!!_RTCBeautyExtension2._authFileUrl,aiBackend:this._backgroundBackend,aiModelType:this._backgroundAIModelType}),error_code:0}),e.next=3,this.initWebArSDK();case 3:return e.next=5,null===(n=this._session)||void 0===n?void 0:n.clearEffect();case 5:i=null==t?void 0:t.videoCaptureConfig,this._fps=i?"number"==typeof(null==i?void 0:i.frameRate)?(null==i?void 0:i.frameRate)||DEFAULT_FRAMERATE:(null==i||null===(o=i.frameRate)||void 0===o?void 0:o.ideal)||DEFAULT_FRAMERATE:DEFAULT_FRAMERATE,null===(a=this.logger)||void 0===a||a.print("init fps",this._fps),this._session&&(this._session.frameRateControl={type:"preferred",frameRate:this._fps}),"safari"===getBrowser()&&(s=this.canvas)&&(s.style.width="1px",s.style.height="1px",s.style.position="fixed",s.style.top="0",s.style.left="0",s.style.opacity="0",s.style.pointerEvents="none",s.style.zIndex="-9999",document.body.appendChild(s));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"checkCompatibility",value:($=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="",e.prev=1,e.next=4,this.initWebArSDK();case 4:return e.abrupt("return",{isCompatible:!0,reasons:[],message:t});case 7:return e.prev=7,e.t0=e.catch(1),t=(null===e.t0||void 0===e.t0?void 0:e.t0.toString())||(null===e.t0||void 0===e.t0?void 0:e.t0.stack)||"",e.abrupt("return",{isCompatible:!1,reasons:[INIT_FAILED_CODE],message:t});case 11:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(){return $.apply(this,arguments)})},{key:"effect",value:(u=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n,o,a,i,s;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r||t.mediaTrack,(this._enableBeauty||this._enableBackground)&&this.canvas){e.next=3;break}return e.abrupt("return",n);case 3:if("video"!==t.mediaType||t.streamIndex!==StreamIndex.STREAM_INDEX_MAIN){e.next=12;break}if(o=n.getSettings(),a=o.width,i=o.height,a&&i&&"safari"!==getBrowser()&&this._setCanvasSize(a,i),this._preTrack===n){e.next=11;break}return e.next=9,null===(s=this._session)||void 0===s?void 0:s.switchVideoSource({type:"video-stream",stream:new MediaStream([n])});case 9:this._preTrack=n,this.maybeRestartSession();case 11:return e.abrupt("return",this.canvas.captureStream(this._fps).getVideoTracks()[0]);case 12:return e.abrupt("return",n);case 13:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"enable",value:function(){return this.enableBeauty()}},{key:"enableBeauty",value:(c=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!this._enableBeauty&&!this._enableBackground,this._enableBeauty=!0,_forEachInstanceProperty(t=_Object$keys(this._beautyDefaultValue)).call(t,(function(e){n._session&&(n._session.faceBeautyController.settings[e]=n._beautyDefaultValue[e])})),this.maybeRestartSession(),this._preTrack&&!r){e.next=6;break}return e.abrupt("return",new _Promise((function(e,t){n.emit("reset-video-effect",e,t)})));case 6:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"disable",value:function(){return this.disableBeauty()}},{key:"disableBeauty",value:(l=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this._enableBeauty&&!this._enableBackground,this._enableBeauty=!1,this.maybeStopSession(),_forEachInstanceProperty(t=_Object$keys(this._beautyDefaultValue)).call(t,(function(e){n._session&&(n._session.faceBeautyController.settings[e]=0)})),this._preTrack&&!r){e.next=6;break}return e.abrupt("return",new _Promise((function(e,t){n.emit("reset-video-effect",e,t)})));case 6:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"enableVirtualBackground",value:(s=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!this._enableBeauty&&!this._enableBackground,this._enableBackground=!0,e.next=4,this._updateVirtualBackground();case 4:if(this.maybeRestartSession(),this._preTrack&&!t){e.next=7;break}return e.abrupt("return",new _Promise((function(e,t){r.emit("reset-video-effect",e,t)})));case 7:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"disableVirtualBackground",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!this._enableBeauty&&this._enableBackground,this._enableBackground=!1,null===(t=this._session)||void 0===t||t.virtualBackgroundController.updateVirtualBackground(null),this.maybeStopSession(),this._preTrack&&!r){e.next=6;break}return e.abrupt("return",new _Promise((function(e,t){n.emit("reset-video-effect",e,t)})));case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"setBeautyIntensity",value:function(e,t){switch(t=Math.min(1,Math.max(0,t)),e){case EffectBeautyMode.EFFECT_SHARPEN_MODE:this._beautyDefaultValue.skinSmoothingSharpness=t,this._session&&(this._session.faceBeautyController.settings.skinSmoothingSharpness=t);break;case EffectBeautyMode.EFFECT_WHITE_MODE:this._beautyDefaultValue.whitenAmount=t,this._session&&(this._session.faceBeautyController.settings.whitenAmount=t);break;case EffectBeautyMode.EFFECT_SMOOTH_MODE:this._beautyDefaultValue.skinSmoothingAmount=t,this._session&&(this._session.faceBeautyController.settings.skinSmoothingAmount=t)}}},{key:"setBackgroundMode",value:function(e){this._backgroundMode=e,this._enableBackground&&this._updateVirtualBackground()}},{key:"getBackgroundImage",value:function(){return this._backgroundUrl}},{key:"loadBackgroundImage",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._session){e.next=2;break}return e.abrupt("return",_Promise.reject(new Error("init extension first")));case 2:if(this._backgroundUrl=t,!this._enableBackground){e.next=6;break}return e.next=6,this._updateVirtualBackground();case 6:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setBackgroundBlurRadius",value:function(e){"number"==typeof e&&e>=0&&(this._radius=e,this._session&&(this._session.virtualBackgroundController.blurSettings.radius=e))}},{key:"setBackgroundColor",value:function(e){var t,r=[];if(/^#[0-9A-Fa-f]{8}$/.test(e))r=[_parseInt$1(e.substring(1,3),16),_parseInt$1(e.substring(3,5),16),_parseInt$1(e.substring(5,7),16),_parseInt$1(e.substring(7,9),16)/255];else if(/^(rgba|RGBA)/.test(e)){var n;r=_mapInstanceProperty(n=_sliceInstanceProperty(e).call(e,5,e.length-1).split(",")).call(n,(function(e){return Number(e)}))}return!!(4===r.length&&_everyInstanceProperty(t=[r[0],r[1],r[2]]).call(t,(function(e){return e>=0&&e<=255}))&&r[3]>=0&&r[3]<=1)&&(this._backgroundColor={r:r[0]/255,g:r[1]/255,b:r[2]/255,a:Number(r[3].toFixed(3))},this._enableBackground&&this._updateVirtualBackground(),!0)}},{key:"loadBackgroundVideo",value:(o=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._session){e.next=2;break}return e.abrupt("return",_Promise.reject(new Error("init extension first")));case 2:if(this._backgroundVideoUrl=t,!this._enableBackground){e.next=6;break}return e.next=6,this._updateVirtualBackground();case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getBackgroundVideo",value:function(){return this._backgroundVideoUrl}},{key:"setAIModelType",value:function(e){var t;this._backgroundAIModelType=e,null===(t=this._session)||void 0===t||t.virtualBackgroundController.updatePortraitMattingModelType(e)}},{key:"applyConstraints",value:function(e,t){var r=t.width,n=t.height;this.canvas&&e===StreamIndex.STREAM_INDEX_MAIN&&"number"==typeof r&&"number"==typeof n&&(this.canvas.width=r,this.canvas.style.width="".concat(r,"px"),this.canvas.height=n,this.canvas.style.height="".concat(n,"px"))}},{key:"isSupported",value:(n=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkCompatibility();case 2:return t=e.sent,e.abrupt("return",t.isCompatible);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"isOpen",value:function(){return this._enable}},{key:"destroy",value:function(){var e;null===(e=this._session)||void 0===e||e.dispose()}},{key:"_setCanvasSize",value:function(e,t){!this.canvas||this.canvas.width===e&&this.canvas.height===t||(this.canvas.width=e,this.canvas.style.width="".concat(e,"px"),this.canvas.height=t,this.canvas.style.height="".concat(t,"px"))}},{key:"_updateVirtualBackground",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r={type:this._backgroundMode},this._backgroundMode!==BackgroundMode.BACKGROUND_IMAGE){e.next=9;break}if(!this._backgroundUrl){e.next=6;break}r.url=this._backgroundUrl,e.next=7;break;case 6:case 22:return e.abrupt("return",!1);case 7:case 15:e.next=23;break;case 9:if(this._backgroundMode!==BackgroundMode.BACKGROUND_COLOR){e.next=17;break}if(!this._backgroundColor){e.next=14;break}r=_objectSpread2(_objectSpread2({},r),this._backgroundColor),e.next=15;break;case 14:return e.abrupt("return");case 17:if(this._backgroundMode!==BackgroundMode.BACKGROUND_VIDEO){e.next=23;break}if(!this._backgroundVideoUrl){e.next=22;break}r.url=this._backgroundVideoUrl,e.next=23;break;case 23:return e.next=25,null===(t=this._session)||void 0===t?void 0:t.virtualBackgroundController.updateVirtualBackground(r);case 25:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"maybeRestartSession",value:function(){var e,t=this;this._session&&((this._enableBeauty||this._enableBackground)&&!this._session.isStarted&&this._preTrack&&(null===(e=this.logger)||void 0===e||e.info("ar","session start"),this._session.start().catch((function(e){var r;null===(r=t.monitor)||void 0===r||r.report("rtc_error",{error_code:-1,message:e.name})}))))}},{key:"maybeStopSession",value:function(){var e,t=this;this._session&&(this._enableBeauty||this._enableBackground||!this._session.isStarted||(null===(e=this.logger)||void 0===e||e.info("ar","session stop"),this._session.stop().catch((function(e){var r;null===(r=t.monitor)||void 0===r||r.report("rtc_error",{error_code:-1,message:e.name})}))))}}],[{key:"loadWebARSDK",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",import(/* webpackIgnore: true */ _RTCBeautyExtension2._sdkUrl).then((function(e){var t=e.ARSDK;_RTCBeautyExtension2.WebARMainSDK=t})).catch((function(e){throw logger.error("load ar sdk error",e),new Error(TIME_OUT_MESSAGE)})));case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]);var t,r,n,o,a,i,s,l,c,u,$,p,f}(),_defineProperty(_Class,"WebARMainSDK",void 0),_defineProperty(_Class,"_sdkUrl",void 0),_defineProperty(_Class,"_sdkAuthServer",DEFAULT_AUTH_URL),_defineProperty(_Class,"_authFileUrl",""),_Class),RTCBeautyExtension=_RTCBeautyExtension2;__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"init",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"checkCompatibility",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"enable",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"enableBeauty",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"disable",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"disableBeauty",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"enableVirtualBackground",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"disableVirtualBackground",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setBeautyIntensity",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setBackgroundMode",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"getBackgroundImage",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"loadBackgroundImage",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setBackgroundBlurRadius",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setBackgroundColor",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"loadBackgroundVideo",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"getBackgroundVideo",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setAIModelType",1);export{BackgroundAIBackend,BackgroundAIModelType,BackgroundMode,EffectBeautyMode,RTCBeautyExtension as default};
8
+ _regeneratorRuntime=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=_Object$defineProperty$1||function(e,t,r){e[t]=r.value},a="function"==typeof _Symbol?_Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,r){return _Object$defineProperty$1(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var a=t&&t.prototype instanceof h?t:h,i=_Object$create$1(a.prototype),s=new R(n||[]);return o(i,"_invoke",{value:T(e,r,s)}),i}function $(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="suspendedYield",d="executing",_="completed",y={};function h(){}function g(){}function b(){}var m={};c(m,i,(function(){return this}));var S=_Object$getPrototypeOf&&_Object$getPrototypeOf(_Object$getPrototypeOf(C([])));S&&S!==r&&n.call(S,i)&&(m=S);var E=b.prototype=h.prototype=_Object$create$1(m);function O(e){var t;_forEachInstanceProperty$1(t=["next","throw","return"]).call(t,(function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,t){function r(o,a,i,s){var l=$(e[o],e,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==_typeof(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function T(t,r,n){var o=p;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===_){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var l=I(s,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=$(t,r,n);if("normal"===c.type){if(o=n.done?_:f,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=_,n.method="throw",n.arg=c.arg)}}}function I(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=$(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(e){var t,r={tryLoc:e[0]};1 in e&&(r.catchLoc=e[1]),2 in e&&(r.finallyLoc=e[2],r.afterLoc=e[3]),_pushInstanceProperty(t=this.tryEntries).call(t,r)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],_forEachInstanceProperty$1(e).call(e,P,this),this.reset(!0)}function C(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(_typeof(t)+" is not iterable")}return g.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return _Object$setPrototypeOf?_Object$setPrototypeOf(e,b):(e.__proto__=b,c(e,l,"GeneratorFunction")),e.prototype=_Object$create$1(E),e},t.awrap=function(e){return{__await:e}},O(v.prototype),c(v.prototype,s,(function(){return this})),t.AsyncIterator=v,t.async=function(e,r,n,o,a){void 0===a&&(a=_Promise$1);var i=new v(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},O(E),c(E,l,"Generator"),c(E,i,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)_pushInstanceProperty(r).call(r,n);return _reverseInstanceProperty(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=C,R.prototype={constructor:R,reset:function(t){var r;if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,_forEachInstanceProperty$1(r=this.tryEntries).call(r,w),!t)for(var o in this)"t"===o.charAt(0)&&n.call(this,o)&&!isNaN(+_sliceInstanceProperty$1(o).call(o,1))&&(this[o]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),w(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;w(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void r(e)}s.done?t(l):_Promise$1.resolve(l).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new _Promise$1((function(n,o){var a=e.apply(t,r);function i(e){asyncGeneratorStep(a,n,o,i,s,"next",e)}function s(e){asyncGeneratorStep(a,n,o,i,s,"throw",e)}i(void 0)}))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),_Object$defineProperty$1(e,toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),_Object$defineProperty$1(e,"prototype",{writable:!1}),e}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(_Reflect$construct$1(Boolean,[],(function(){})))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}var $$G=_export,bind$i=functionBind;$$G({target:"Function",proto:!0,forced:Function.bind!==bind$i},{bind:bind$i});var getBuiltInPrototypeMethod$c=getBuiltInPrototypeMethod$i,bind$h=getBuiltInPrototypeMethod$c("Function","bind"),isPrototypeOf$d=objectIsPrototypeOf,method$a=bind$h,FunctionPrototype=Function.prototype,bind$g=function(e){var t=e.bind;return e===FunctionPrototype||isPrototypeOf$d(FunctionPrototype,e)&&t===FunctionPrototype.bind?method$a:t},parent$15=bind$g,bind$f=parent$15,parent$14=bind$f,bind$e=parent$14,parent$13=bind$e,bind$d=parent$13,bind$c=bind$d,_bindInstanceProperty$1=getDefaultExportFromCjs(bind$c);function _getPrototypeOf(e){var t;return(_getPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty$1(t=_Object$getPrototypeOf).call(t):function(e){return e.__proto__||_Object$getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){var r;return(_setPrototypeOf=_Object$setPrototypeOf?_bindInstanceProperty$1(r=_Object$setPrototypeOf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=_Object$create$1(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),_Object$defineProperty$1(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}var defineProperty$3=defineProperty$5,_Object$defineProperty=getDefaultExportFromCjs(defineProperty$3),getOwnPropertyDescriptor5=getOwnPropertyDescriptor$3,_Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor5),toIntegerOrInfinity$2=toIntegerOrInfinity$6,toString$6=toString$d,requireObjectCoercible$4=requireObjectCoercible$9,$RangeError$1=RangeError,stringRepeat=function(e){var t=toString$6(requireObjectCoercible$4(this)),r="",n=toIntegerOrInfinity$2(e);if(n<0||n===1/0)throw new $RangeError$1("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},uncurryThis$9=functionUncurryThis,toLength=toLength$2,toString$5=toString$d,$repeat=stringRepeat,requireObjectCoercible$3=requireObjectCoercible$9,repeat2=uncurryThis$9($repeat),stringSlice=uncurryThis$9("".slice),ceil=Math.ceil,createMethod$2=function(e){return function(t,r,n){var o,a,i=toString$5(requireObjectCoercible$3(t)),s=toLength(r),l=i.length,c=void 0===n?" ":toString$5(n);return s<=l||""===c?i:((a=repeat2(c,ceil((o=s-l)/c.length))).length>o&&(a=stringSlice(a,0,o)),e?i+a:a+i)}},stringPad={start:createMethod$2(!1),end:createMethod$2(!0)},uncurryThis$8=functionUncurryThis,fails$8=fails$x,padStart$7=stringPad.start,$RangeError=RangeError,$isFinite=isFinite,abs=Math.abs,DatePrototype=Date.prototype,nativeDateToISOString=DatePrototype.toISOString,thisTimeValue$1=uncurryThis$8(DatePrototype.getTime),getUTCDate=uncurryThis$8(DatePrototype.getUTCDate),getUTCFullYear=uncurryThis$8(DatePrototype.getUTCFullYear),getUTCHours=uncurryThis$8(DatePrototype.getUTCHours),getUTCMilliseconds=uncurryThis$8(DatePrototype.getUTCMilliseconds),getUTCMinutes=uncurryThis$8(DatePrototype.getUTCMinutes),getUTCMonth=uncurryThis$8(DatePrototype.getUTCMonth),getUTCSeconds=uncurryThis$8(DatePrototype.getUTCSeconds),dateToIsoString=fails$8((function(){return"0385-07-25T07:06:39.999Z"!==nativeDateToISOString.call(new Date(-50000000000001))}))||!fails$8((function(){nativeDateToISOString.call(new Date(NaN))}))?function(){if(!$isFinite(thisTimeValue$1(this)))throw new $RangeError("Invalid time value");var e=this,t=getUTCFullYear(e),r=getUTCMilliseconds(e),n=t<0?"-":t>9999?"+":"";return n+padStart$7(abs(t),n?6:4,0)+"-"+padStart$7(getUTCMonth(e)+1,2,0)+"-"+padStart$7(getUTCDate(e),2,0)+"T"+padStart$7(getUTCHours(e),2,0)+":"+padStart$7(getUTCMinutes(e),2,0)+":"+padStart$7(getUTCSeconds(e),2,0)+"."+padStart$7(r,3,0)+"Z"}:nativeDateToISOString,$$F=_export,call$6=functionCall,toObject$6=toObject$f,toPrimitive=toPrimitive$8,toISOString2=dateToIsoString,classof$4=classofRaw$2,fails$7=fails$x,FORCED$3=fails$7((function(){return null!==new Date(NaN).toJSON()||1!==call$6(Date.prototype.toJSON,{toISOString:function(){return 1}})}));$$F({target:"Date",proto:!0,forced:FORCED$3},{toJSON:function(e){var t=toObject$6(this),r=toPrimitive(t,"number");return"number"!=typeof r||isFinite(r)?"toISOString"in t||"Date"!==classof$4(t)?t.toISOString():call$6(toISOString2,t):null}});var path$9=path$q,apply$1=functionApply;path$9.JSON||(path$9.JSON={stringify:JSON.stringify});var stringify$6=function(e,t,r){return apply$1(path$9.JSON.stringify,null,arguments)},parent$12=stringify$6,stringify$5=parent$12,parent$11=stringify$5,stringify$4=parent$11,parent$10=stringify$4,stringify$3=parent$10,stringify$2=stringify$3,stringify$1=stringify$2,_JSON$stringify=getDefaultExportFromCjs(stringify$1),forEach$1=forEach$2,_forEachInstanceProperty=getDefaultExportFromCjs(forEach$1),keys$7=keys$8,_Object$keys=getDefaultExportFromCjs(keys$7),promise=promise$1,_Promise=getDefaultExportFromCjs(promise),whitespaces$2="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis$7=functionUncurryThis,requireObjectCoercible$2=requireObjectCoercible$9,toString$4=toString$d,whitespaces$1=whitespaces$2,replace=uncurryThis$7("".replace),ltrim=RegExp("^["+whitespaces$1+"]+"),rtrim=RegExp("(^|[^"+whitespaces$1+"])["+whitespaces$1+"]+$"),createMethod$1=function(e){return function(t){var r=toString$4(requireObjectCoercible$2(t));return 1&e&&(r=replace(r,ltrim,"")),2&e&&(r=replace(r,rtrim,"$1")),r}},stringTrim={start:createMethod$1(1),end:createMethod$1(2),trim:createMethod$1(3)},globalThis$5=globalThis_1,fails$6=fails$x,uncurryThis$6=functionUncurryThis,toString$3=toString$d,trim=stringTrim.trim,whitespaces=whitespaces$2,$parseInt$1=globalThis$5.parseInt,Symbol$1=globalThis$5.Symbol,ITERATOR=Symbol$1&&Symbol$1.iterator,hex=/^[+-]?0x/i,exec=uncurryThis$6(hex.exec),FORCED$2=8!==$parseInt$1(whitespaces+"08")||22!==$parseInt$1(whitespaces+"0x16")||ITERATOR&&!fails$6((function(){$parseInt$1(Object(ITERATOR))})),numberParseInt=FORCED$2?function(e,t){var r=trim(toString$3(e));return $parseInt$1(r,t>>>0||(exec(hex,r)?16:10))}:$parseInt$1,$$E=_export,$parseInt=numberParseInt;$$E({global:!0,forced:parseInt!==numberParseInt},{parseInt:numberParseInt});var path$8=path$q,_parseInt$6=path$8.parseInt,parent$$=_parseInt$6,_parseInt$5=parent$$,parent$_=_parseInt$5,_parseInt$4=parent$_,parent$Z=_parseInt$4,_parseInt$3=parent$Z,_parseInt$2=_parseInt$3,_parseInt=_parseInt$2,_parseInt$1=getDefaultExportFromCjs(_parseInt),$$D=_export,$map=arrayIteration.map,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("map");$$D({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{map:function(e){return $map(this,e,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$b=getBuiltInPrototypeMethod$i,map$c=getBuiltInPrototypeMethod$b("Array","map"),isPrototypeOf$c=objectIsPrototypeOf,method$9=map$c,ArrayPrototype$9=Array.prototype,map$b=function(e){var t=e.map;return e===ArrayPrototype$9||isPrototypeOf$c(ArrayPrototype$9,e)&&t===ArrayPrototype$9.map?method$9:t},parent$Y=map$b,map$a=parent$Y,parent$X=map$a,map$9=parent$X,parent$W=map$9,map$8=parent$W,map$7=map$8,map$6=map$7,_mapInstanceProperty=getDefaultExportFromCjs(map$6),slice2=slice$1,_sliceInstanceProperty=getDefaultExportFromCjs(slice2),$$C=_export,$every=arrayIteration.every,arrayMethodIsStrict$2=arrayMethodIsStrict$4,STRICT_METHOD=arrayMethodIsStrict$2("every");$$C({target:"Array",proto:!0,forced:!STRICT_METHOD},{every:function(e){return $every(this,e,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$a=getBuiltInPrototypeMethod$i,every$6=getBuiltInPrototypeMethod$a("Array","every"),isPrototypeOf$b=objectIsPrototypeOf,method$8=every$6,ArrayPrototype$8=Array.prototype,every$5=function(e){var t=e.every;return e===ArrayPrototype$8||isPrototypeOf$b(ArrayPrototype$8,e)&&t===ArrayPrototype$8.every?method$8:t},parent$V=every$5,every$4=parent$V,parent$U=every$4,every$3=parent$U,parent$T=every$3,every$2=parent$T,every$1=every$2,every2=every$1,_everyInstanceProperty=getDefaultExportFromCjs(every2),getBuiltInPrototypeMethod$9=getBuiltInPrototypeMethod$i,concat$7=getBuiltInPrototypeMethod$9("Array","concat"),isPrototypeOf$a=objectIsPrototypeOf,method$7=concat$7,ArrayPrototype$7=Array.prototype,concat$6=function(e){var t=e.concat;return e===ArrayPrototype$7||isPrototypeOf$a(ArrayPrototype$7,e)&&t===ArrayPrototype$7.concat?method$7:t},parent$S=concat$6,concat$5=parent$S,parent$R=concat$5,concat$4=parent$R,parent$Q=concat$4,concat$3=parent$Q,concat$2=concat$3,concat$1=concat$2,_concatInstanceProperty=getDefaultExportFromCjs(concat$1),create$1=create$3,_Object$create=getDefaultExportFromCjs(create$1),getOwnPropertySymbols2=getOwnPropertySymbols$1,_Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols2),eventemitter3={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,a||e,i),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}_Object$create&&(n.prototype=_Object$create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?_sliceInstanceProperty(n).call(n,1):n);return _Object$getOwnPropertySymbols?_concatInstanceProperty(o).call(o,_Object$getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,a=n.length,i=new Array(a);o<a;o++)i[o]=n[o].fn;return i},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,a,i){var s=r?r+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],$=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),$){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,o),!0;case 5:return u.fn.call(u.context,t,n,o,a),!0;case 6:return u.fn.call(u.context,t,n,o,a,i),!0}for(c=1,l=new Array($-1);c<$;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var p,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),$){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,o);break;default:if(!l)for(p=1,l=new Array($-1);p<$;p++)l[p-1]=arguments[p];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||i(this,a);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||n&&s[l].context!==n)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&i(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(eventemitter3);var eventemitter3Exports=eventemitter3.exports;function _callSuper$3(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?_Reflect$construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}var ExtensionBase=function(){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _defineProperty(r=_callSuper$3(this,e,_concatInstanceProperty(t=[]).call(t,o)),"monitor",void 0),_defineProperty(r,"logger",void 0),r}return _inherits(e,eventemitter3Exports.EventEmitter),_createClass(e,[{key:"isSupported",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"_reportName",get:function(){return"plugin<".concat(this.name,">")}}]);var t}(),getIteratorMethod$5=getIteratorMethod$8,getIteratorMethod_1=getIteratorMethod$5,parent$P=getIteratorMethod_1,getIteratorMethod$4=parent$P,parent$O=getIteratorMethod$4,getIteratorMethod$3=parent$O,parent$N=getIteratorMethod$3,getIteratorMethod$2=parent$N,getIteratorMethod$1=getIteratorMethod$2,_getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$1),$$B=_export,isArray$6=isArray$d;$$B({target:"Array",stat:!0},{isArray:isArray$6});var path$7=path$q,isArray$5=path$7.Array.isArray,parent$M=isArray$5,isArray$4=parent$M,parent$L=isArray$4,isArray$3=parent$L,parent$K=isArray$3,isArray$2=parent$K,isArray$1=isArray$2,_Array$isArray=getDefaultExportFromCjs(isArray$1),anObject$4=anObject$g,iteratorClose=iteratorClose$2,callWithSafeIterationClosing$1=function(e,t,r,n){try{return n?t(anObject$4(r)[0],r[1]):t(r)}catch(t){iteratorClose(e,"throw",t)}},bind$b=functionBindContext,call$5=functionCall,toObject$5=toObject$f,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod=isArrayIteratorMethod$2,isConstructor3=isConstructor$4,lengthOfArrayLike$4=lengthOfArrayLike$b,createProperty$1=createProperty$5,getIterator=getIterator$2,getIteratorMethod=getIteratorMethod$8,$Array=Array,arrayFrom=function(e){var t=toObject$5(e),r=isConstructor3(this),n=arguments.length,o=n>1?arguments[1]:void 0,a=void 0!==o;a&&(o=bind$b(o,n>2?arguments[2]:void 0));var i,s,l,c,u,$,p=getIteratorMethod(t),f=0;if(!p||this===$Array&&isArrayIteratorMethod(p))for(i=lengthOfArrayLike$4(t),s=r?new this(i):$Array(i);i>f;f++)$=a?o(t[f],f):t[f],createProperty$1(s,f,$);else for(s=r?new this:[],u=(c=getIterator(t,p)).next;!(l=call$5(u,c)).done;f++)$=a?callWithSafeIterationClosing(c,o,[l.value,f],!0):l.value,createProperty$1(s,f,$);return s.length=f,s},$$A=_export,from$5=arrayFrom,checkCorrectnessOfIteration=checkCorrectnessOfIteration$2,INCORRECT_ITERATION=!checkCorrectnessOfIteration((function(e){Array.from(e)}));$$A({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$5});var path$6=path$q,from$4=path$6.Array.from,parent$J=from$4,from$3=parent$J,parent$I=from$3,from$2=parent$I,parent$H=from$2,from$1=parent$H,from2=from$1,_Array$from=getDefaultExportFromCjs(from2);function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _unsupportedIterableToArray(e,t){if(e){var r;if("string"==typeof e)return _arrayLikeToArray(e,t);var n=_sliceInstanceProperty$1(r={}.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_Array$from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}var internalMetadata={exports:{}},fails$5=fails$x,arrayBufferNonExtensible=fails$5((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fails$4=fails$x,isObject$3=isObject$k,classof$3=classofRaw$2,ARRAY_BUFFER_NON_EXTENSIBLE=arrayBufferNonExtensible,$isExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES=fails$4((function(){$isExtensible(1)})),objectIsExtensible=FAILS_ON_PRIMITIVES||ARRAY_BUFFER_NON_EXTENSIBLE?function(e){return!!isObject$3(e)&&((!ARRAY_BUFFER_NON_EXTENSIBLE||"ArrayBuffer"!==classof$3(e))&&(!$isExtensible||$isExtensible(e)))}:$isExtensible,fails$3=fails$x,freezing=!fails$3((function(){return Object.isExtensible(Object.preventExtensions({}))})),$$z=_export,uncurryThis$5=functionUncurryThis,hiddenKeys=hiddenKeys$6,isObject$2=isObject$k,hasOwn$3=hasOwnProperty_1,defineProperty$2=objectDefineProperty.f,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertyNamesExternalModule=objectGetOwnPropertyNamesExternal,isExtensible2=objectIsExtensible,uid=uid$4,FREEZING=freezing,REQUIRED=!1,METADATA=uid("meta"),id=0,setMetadata=function(e){defineProperty$2(e,METADATA,{value:{objectID:"O"+id++,weakData:{}}})},fastKey$1=function(e,t){if(!isObject$2(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!hasOwn$3(e,METADATA)){if(!isExtensible2(e))return"F";if(!t)return"E";setMetadata(e)}return e[METADATA].objectID},getWeakData=function(e,t){if(!hasOwn$3(e,METADATA)){if(!isExtensible2(e))return!0;if(!t)return!1;setMetadata(e)}return e[METADATA].weakData},onFreeze=function(e){return FREEZING&&REQUIRED&&isExtensible2(e)&&!hasOwn$3(e,METADATA)&&setMetadata(e),e},enable=function(){meta.enable=function(){},REQUIRED=!0;var e=getOwnPropertyNamesModule.f,t=uncurryThis$5([].splice),r={};r[METADATA]=1,e(r).length&&(getOwnPropertyNamesModule.f=function(r){for(var n=e(r),o=0,a=n.length;o<a;o++)if(n[o]===METADATA){t(n,o,1);break}return n},$$z({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:getOwnPropertyNamesExternalModule.f}))},meta=internalMetadata.exports={enable:enable,fastKey:fastKey$1,getWeakData:getWeakData,onFreeze:onFreeze};hiddenKeys[METADATA]=!0;var internalMetadataExports=internalMetadata.exports,$$y=_export,globalThis$4=globalThis_1,InternalMetadataModule=internalMetadataExports,fails$2=fails$x,createNonEnumerableProperty=createNonEnumerableProperty$8,iterate$f=iterate$l,anInstance$1=anInstance$3,isCallable$3=isCallable$n,isObject$1=isObject$k,isNullOrUndefined$1=isNullOrUndefined$6,setToStringTag=setToStringTag$8,defineProperty$1=objectDefineProperty.f,forEach2=arrayIteration.forEach,DESCRIPTORS$2=descriptors,InternalStateModule$1=internalState,setInternalState$1=InternalStateModule$1.set,internalStateGetterFor$1=InternalStateModule$1.getterFor,collection$1=function(e,t,r){var n,o=-1!==e.indexOf("Map"),a=-1!==e.indexOf("Weak"),i=o?"set":"add",s=globalThis$4[e],l=s&&s.prototype,c={};if(DESCRIPTORS$2&&isCallable$3(s)&&(a||l.forEach&&!fails$2((function(){(new s).entries().next()})))){var u=(n=t((function(t,r){setInternalState$1(anInstance$1(t,u),{type:e,collection:new s}),isNullOrUndefined$1(r)||iterate$f(r,t[i],{that:t,AS_ENTRIES:o})}))).prototype,$=internalStateGetterFor$1(e);forEach2(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"===e||"set"===e;!(e in l)||a&&"clear"===e||createNonEnumerableProperty(u,e,(function(r,n){var o=$(this).collection;if(!t&&a&&!isObject$1(r))return"get"===e&&void 0;var i=o[e](0===r?0:r,n);return t?this:i}))})),a||defineProperty$1(u,"size",{configurable:!0,get:function(){return $(this).collection.size}})}else n=r.getConstructor(t,e,o,i),InternalMetadataModule.enable();return setToStringTag(n,e,!1,!0),c[e]=n,$$y({global:!0,forced:!0},c),a||r.setStrong(n,e,o),n},defineBuiltIn=defineBuiltIn$6,defineBuiltIns$1=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:defineBuiltIn(e,n,t[n],r);return e},create4=objectCreate,defineBuiltInAccessor=defineBuiltInAccessor$3,defineBuiltIns=defineBuiltIns$1,bind$a=functionBindContext,anInstance=anInstance$3,isNullOrUndefined=isNullOrUndefined$6,iterate$e=iterate$l,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$3,setSpecies=setSpecies$2,DESCRIPTORS$1=descriptors,fastKey=internalMetadataExports.fastKey,InternalStateModule=internalState,setInternalState=InternalStateModule.set,internalStateGetterFor=InternalStateModule.getterFor,collectionStrong$1={getConstructor:function(e,t,r,n){var o=e((function(e,o){anInstance(e,a),setInternalState(e,{type:t,index:create4(null),first:null,last:null,size:0}),DESCRIPTORS$1||(e.size=0),isNullOrUndefined(o)||iterate$e(o,e[n],{that:e,AS_ENTRIES:r})})),a=o.prototype,i=internalStateGetterFor(t),s=function(e,t,r){var n,o,a=i(e),s=l(e,t);return s?s.value=r:(a.last=s={index:o=fastKey(t,!0),key:t,value:r,previous:n=a.last,next:null,removed:!1},a.first||(a.first=s),n&&(n.next=s),DESCRIPTORS$1?a.size++:e.size++,"F"!==o&&(a.index[o]=s)),e},l=function(e,t){var r,n=i(e),o=fastKey(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===t)return r};return defineBuiltIns(a,{clear:function(){for(var e=i(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=create4(null),DESCRIPTORS$1?e.size=0:this.size=0},delete:function(e){var t=this,r=i(t),n=l(t,e);if(n){var o=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=o),o&&(o.previous=a),r.first===n&&(r.first=o),r.last===n&&(r.last=a),DESCRIPTORS$1?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=i(this),n=bind$a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),defineBuiltIns(a,r?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),DESCRIPTORS$1&&defineBuiltInAccessor(a,"size",{configurable:!0,get:function(){return i(this).size}}),o},setStrong:function(e,t,r){var n=t+" Iterator",o=internalStateGetterFor(t),a=internalStateGetterFor(n);defineIterator(e,t,(function(e,t){setInternalState(this,{type:n,target:e,state:o(e),kind:t,last:null})}),(function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?createIterResultObject("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=null,createIterResultObject(void 0,!0))}),r?"entries":"values",!r,!0),setSpecies(t)}},collection=collection$1,collectionStrong=collectionStrong$1;collection("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),collectionStrong);var caller$1=function(e,t){return 1===t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},getBuiltIn=getBuiltIn$g,caller=caller$1,Map$5=getBuiltIn("Map"),mapHelpers={Map:Map$5,set:caller("set",2),get:caller("get",1),has:caller("has",1),remove:caller("delete",1),proto:Map$5.prototype},$$x=_export,uncurryThis$4=functionUncurryThis,aCallable$6=aCallable$j,requireObjectCoercible$1=requireObjectCoercible$9,iterate$d=iterate$l,MapHelpers$9=mapHelpers,IS_PURE=isPure,Map$4=MapHelpers$9.Map,has$4=MapHelpers$9.has,get$4=MapHelpers$9.get,set$8=MapHelpers$9.set,push2=uncurryThis$4([].push);$$x({target:"Map",stat:!0,forced:IS_PURE},{groupBy:function(e,t){requireObjectCoercible$1(e),aCallable$6(t);var r=new Map$4,n=0;return iterate$d(e,(function(e){var o=t(e,n++);has$4(r,o)?push2(get$4(r,o),e):set$8(r,o,[e])})),r}});var path$5=path$q,map$5=path$5.Map,parent$G=map$5,map$4=parent$G,parent$F=map$4,map$3=parent$F,bind$9=functionBindContext,anObject$3=anObject$g,toObject$4=toObject$f,iterate$c=iterate$l,collectionFrom=function(e,t,r){return function(n){var o=toObject$4(n),a=arguments.length,i=a>1?arguments[1]:void 0,s=void 0!==i,l=s?bind$9(i,a>2?arguments[2]:void 0):void 0,c=new e,u=0;return iterate$c(o,(function(e){var n=s?l(e,u++):e;r?t(c,anObject$3(n)[0],n[1]):t(c,n)})),c}},$$w=_export,MapHelpers$8=mapHelpers,createCollectionFrom=collectionFrom;$$w({target:"Map",stat:!0,forced:!0},{from:createCollectionFrom(MapHelpers$8.Map,MapHelpers$8.set,!0)});var anObject$2=anObject$g,collectionOf=function(e,t,r){return function(){for(var n=new e,o=arguments.length,a=0;a<o;a++){var i=arguments[a];r?t(n,anObject$2(i)[0],i[1]):t(n,i)}return n}},$$v=_export,MapHelpers$7=mapHelpers,createCollectionOf=collectionOf;$$v({target:"Map",stat:!0,forced:!0},{of:createCollectionOf(MapHelpers$7.Map,MapHelpers$7.set,!0)});var $$u=_export,call$4=functionCall,iterate$b=iterate$l,isCallable$2=isCallable$n,aCallable$5=aCallable$j,Map$3=mapHelpers.Map;$$u({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(isCallable$2(this)?this:Map$3);aCallable$5(t);var n=aCallable$5(r.set);return iterate$b(e,(function(e){call$4(n,r,t(e),e)})),r}});var tryToString$1=tryToString$7,$TypeError$6=TypeError,aMap$g=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw new $TypeError$6(tryToString$1(e)+" is not a map")},$$t=_export,aMap$f=aMap$g,remove=mapHelpers.remove;$$t({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=aMap$f(this),r=!0,n=0,o=arguments.length;n<o;n++)e=remove(t,arguments[n]),r=r&&e;return!!r}});var $$s=_export,aMap$e=aMap$g,MapHelpers$6=mapHelpers,get$3=MapHelpers$6.get,has$3=MapHelpers$6.has,set$7=MapHelpers$6.set;$$s({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,o=aMap$e(this);return has$3(o,e)?(r=get$3(o,e),"update"in t&&(r=t.update(r,e,o),set$7(o,e,r)),r):(n=t.insert(e,o),set$7(o,e,n),n)}});var call$3=functionCall,iterateSimple$1=function(e,t,r){for(var n,o,a=r?e:e.iterator,i=e.next;!(n=call$3(i,a)).done;)if(void 0!==(o=t(n.value)))return o},iterateSimple=iterateSimple$1,mapIterate=function(e,t,r){return r?iterateSimple(e.entries(),(function(e){return t(e[1],e[0])}),!0):e.forEach(t)},$$r=_export,bind$8=functionBindContext,aMap$d=aMap$g,iterate$a=mapIterate;$$r({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=aMap$d(this),r=bind$8(e,arguments.length>1?arguments[1]:void 0);return!1!==iterate$a(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var $$q=_export,bind$7=functionBindContext,aMap$c=aMap$g,MapHelpers$5=mapHelpers,iterate$9=mapIterate,Map$2=MapHelpers$5.Map,set$6=MapHelpers$5.set;$$q({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=aMap$c(this),r=bind$7(e,arguments.length>1?arguments[1]:void 0),n=new Map$2;return iterate$9(t,(function(e,o){r(e,o,t)&&set$6(n,o,e)})),n}});var $$p=_export,bind$6=functionBindContext,aMap$b=aMap$g,iterate$8=mapIterate;$$p({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=aMap$b(this),r=bind$6(e,arguments.length>1?arguments[1]:void 0),n=iterate$8(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var $$o=_export,bind$5=functionBindContext,aMap$a=aMap$g,iterate$7=mapIterate;$$o({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=aMap$a(this),r=bind$5(e,arguments.length>1?arguments[1]:void 0),n=iterate$7(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var sameValueZero$1=function(e,t){return e===t||e!=e&&t!=t},$$n=_export,sameValueZero=sameValueZero$1,aMap$9=aMap$g,iterate$6=mapIterate;$$n({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iterate$6(aMap$9(this),(function(t){if(sameValueZero(t,e))return!0}),!0)}});var $$m=_export,aMap$8=aMap$g,MapHelpers$4=mapHelpers,get$2=MapHelpers$4.get,has$2=MapHelpers$4.has,set$5=MapHelpers$4.set;$$m({target:"Map",proto:!0,real:!0,forced:!0},{getOrInsert:function(e,t){return has$2(aMap$8(this),e)?get$2(this,e):(set$5(this,e,t),t)}});var $$l=_export,aCallable$4=aCallable$j,aMap$7=aMap$g,MapHelpers$3=mapHelpers,get$1=MapHelpers$3.get,has$1=MapHelpers$3.has,set$4=MapHelpers$3.set;$$l({target:"Map",proto:!0,real:!0,forced:!0},{getOrInsertComputed:function(e,t){if(aMap$7(this),aCallable$4(t),has$1(this,e))return get$1(this,e);0===e&&1/e==-1/0&&(e=0);var r=t(e);return set$4(this,e,r),r}});var $$k=_export,aMap$6=aMap$g,iterate$5=mapIterate;$$k({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=iterate$5(aMap$6(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var $$j=_export,bind$4=functionBindContext,aMap$5=aMap$g,MapHelpers$2=mapHelpers,iterate$4=mapIterate,Map$1=MapHelpers$2.Map,set$3=MapHelpers$2.set;$$j({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=aMap$5(this),r=bind$4(e,arguments.length>1?arguments[1]:void 0),n=new Map$1;return iterate$4(t,(function(e,o){set$3(n,r(e,o,t),e)})),n}});var $$i=_export,bind$3=functionBindContext,aMap$4=aMap$g,MapHelpers$1=mapHelpers,iterate$3=mapIterate,Map=MapHelpers$1.Map,set$2=MapHelpers$1.set;$$i({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=aMap$4(this),r=bind$3(e,arguments.length>1?arguments[1]:void 0),n=new Map;return iterate$3(t,(function(e,o){set$2(n,o,r(e,o,t))})),n}});var $$h=_export,aMap$3=aMap$g,iterate$2=iterate$l,set$1=mapHelpers.set;$$h({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=aMap$3(this),r=arguments.length,n=0;n<r;)iterate$2(arguments[n++],(function(e,r){set$1(t,e,r)}),{AS_ENTRIES:!0});return t}});var $$g=_export,aCallable$3=aCallable$j,aMap$2=aMap$g,iterate$1=mapIterate,$TypeError$5=TypeError;$$g({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=aMap$2(this),r=arguments.length<2,n=r?void 0:arguments[1];if(aCallable$3(e),iterate$1(t,(function(o,a){r?(r=!1,n=o):n=e(n,o,a,t)})),r)throw new $TypeError$5("Reduce of empty map with no initial value");return n}});var $$f=_export,bind$2=functionBindContext,aMap$1=aMap$g,iterate=mapIterate;$$f({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=aMap$1(this),r=bind$2(e,arguments.length>1?arguments[1]:void 0);return!0===iterate(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var $$e=_export,aCallable$2=aCallable$j,aMap=aMap$g,MapHelpers=mapHelpers,$TypeError$4=TypeError,get=MapHelpers.get,has=MapHelpers.has,set=MapHelpers.set;$$e({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=aMap(this),n=arguments.length;aCallable$2(t);var o=has(r,e);if(!o&&n<3)throw new $TypeError$4("Updating absent value");var a=o?get(r,e):aCallable$2(n>2?arguments[2]:void 0)(e,r);return set(r,e,t(a,e,r)),r}});var call$2=functionCall,aCallable$1=aCallable$j,isCallable$1=isCallable$n,anObject$1=anObject$g,$TypeError$3=TypeError,mapUpsert=function(e,t){var r,n=anObject$1(this),o=aCallable$1(n.get),a=aCallable$1(n.has),i=aCallable$1(n.set),s=arguments.length>2?arguments[2]:void 0;if(!isCallable$1(t)&&!isCallable$1(s))throw new $TypeError$3("At least one callback required");return call$2(a,n,e)?(r=call$2(o,n,e),isCallable$1(t)&&(r=t(r),call$2(i,n,e,r))):isCallable$1(s)&&(r=s(),call$2(i,n,e,r)),r},$$d=_export,upsert$1=mapUpsert;$$d({target:"Map",proto:!0,real:!0,forced:!0},{upsert:upsert$1});var $$c=_export,upsert2=mapUpsert;$$c({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:upsert2});var parent$E=map$3,map$2=parent$E,map$1=map$2,map2=map$1,_Map=getDefaultExportFromCjs(map2),RTCExtensionType=function(e){return e[e.CAPTURE=0]="CAPTURE",e[e.PRE_PROCESSING=1]="PRE_PROCESSING",e[e.ENCODE=2]="ENCODE",e[e.TRANSFER=3]="TRANSFER",e[e.POST_PROCESSING=4]="POST_PROCESSING",e[e.DECODE=5]="DECODE",e[e.RENDERING=6]="RENDERING",e}(RTCExtensionType||{}),StreamIndex=function(e){return e[e.STREAM_INDEX_MAIN=0]="STREAM_INDEX_MAIN",e[e.STREAM_INDEX_SCREEN=1]="STREAM_INDEX_SCREEN",e}(StreamIndex||{});function _callSuper$2(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?_Reflect$construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}var PreProcessingExtension=function(){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _defineProperty(r=_callSuper$2(this,e,_concatInstanceProperty(t=[]).call(t,o)),"type",RTCExtensionType.PRE_PROCESSING),r}return _inherits(e,ExtensionBase),_createClass(e)}();function reportExtensionApiCall(e,t,r){var n=r.value;r.value=function(){for(var e,r=this.monitor,o=this.name,a=_concatInstanceProperty(e="".concat(o,".")).call(e,t),i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];null==r||r.report("rtc_sdk_api_call",{sdk_api_name:a,message:_JSON$stringify(s),error_code:0});var c=n.apply(this,s);return"function"==typeof(null==c?void 0:c.then)?c.then((function(e){return null==r||r.report("rtc_sdk_callback",{sdk_callback_name:a,error_code:0,message:_JSON$stringify(e||{})}),e})).catch((function(e){throw null==r||r.report("rtc_sdk_callback",{sdk_callback_name:a,error_code:e.code||-1,message:e.message||""}),e})):(null==r||r.report("rtc_sdk_callback",{sdk_callback_name:a,error_code:0,message:c||""}),c)}}var getBuiltInPrototypeMethod$8=getBuiltInPrototypeMethod$i,values$6=getBuiltInPrototypeMethod$8("Array","values"),parent$D=values$6,values$5=parent$D,classof$2=classof$e,hasOwn$2=hasOwnProperty_1,isPrototypeOf$9=objectIsPrototypeOf,method$6=values$5,ArrayPrototype$6=Array.prototype,DOMIterables$1={DOMTokenList:!0,NodeList:!0},values$4=function(e){var t=e.values;return e===ArrayPrototype$6||isPrototypeOf$9(ArrayPrototype$6,e)&&t===ArrayPrototype$6.values||hasOwn$2(DOMIterables$1,classof$2(e))?method$6:t},parent$C=values$4,values$3=parent$C,parent$B=values$3,values$2=parent$B,values$1=values$2,values=values$1,_valuesInstanceProperty=getDefaultExportFromCjs(values),$$b=_export,uncurryThis$3=functionUncurryThis,$Date=Date,thisTimeValue=uncurryThis$3($Date.prototype.getTime);$$b({target:"Date",stat:!0},{now:function(){return thisTimeValue(new $Date)}});var path$4=path$q,now$5=path$4.Date.now,parent$A=now$5,now$4=parent$A,parent$z=now$4,now$3=parent$z,parent$y=now$3,now$2=parent$y,now$1=now$2,now2=now$1,_Date$now=getDefaultExportFromCjs(now2),globalThis$3=globalThis_1,apply=functionApply,isCallable=isCallable$n,ENVIRONMENT=environment,USER_AGENT=environmentUserAgent,arraySlice=arraySlice$5,validateArgumentsLength=validateArgumentsLength$2,Function$1=globalThis$3.Function,WRAP=/MSIE .\./.test(USER_AGENT)||"BUN"===ENVIRONMENT&&function(){var e=globalThis$3.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}(),schedulersFix$2=function(e,t){var r=t?2:1;return WRAP?function(n,o){var a=validateArgumentsLength(arguments.length,1)>r,i=isCallable(n)?n:Function$1(n),s=a?arraySlice(arguments,r):[],l=a?function(){apply(i,this,s)}:i;return t?e(l,o):e(l)}:e},$$a=_export,globalThis$2=globalThis_1,schedulersFix$1=schedulersFix$2,setInterval$5=schedulersFix$1(globalThis$2.setInterval,!0);$$a({global:!0,bind:!0,forced:globalThis$2.setInterval!==setInterval$5},{setInterval:setInterval$5});var $$9=_export,globalThis$1=globalThis_1,schedulersFix=schedulersFix$2,setTimeout$6=schedulersFix(globalThis$1.setTimeout,!0);$$9({global:!0,bind:!0,forced:globalThis$1.setTimeout!==setTimeout$6},{setTimeout:setTimeout$6});var path$3=path$q,setTimeout$5=path$3.setTimeout,parent$x=setTimeout$5,setTimeout$4=parent$x,parent$w=setTimeout$4,setTimeout$3=parent$w,setTimeout$2=setTimeout$3,setTimeout$1=setTimeout$2,_setTimeout=getDefaultExportFromCjs(setTimeout$1),getBuiltInPrototypeMethod$7=getBuiltInPrototypeMethod$i,keys$6=getBuiltInPrototypeMethod$7("Array","keys"),parent$v=keys$6,keys$5=parent$v,classof$1=classof$e,hasOwn$1=hasOwnProperty_1,isPrototypeOf$8=objectIsPrototypeOf,method$5=keys$5,ArrayPrototype$5=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},keys$4=function(e){var t=e.keys;return e===ArrayPrototype$5||isPrototypeOf$8(ArrayPrototype$5,e)&&t===ArrayPrototype$5.keys||hasOwn$1(DOMIterables,classof$1(e))?method$5:t},parent$u=keys$4,keys$3=parent$u,parent$t=keys$3,keys$2=parent$t,keys$1=keys$2,keys3=keys$1,_keysInstanceProperty=getDefaultExportFromCjs(keys3),$$8=_export,$includes=arrayIncludes.includes,fails$1=fails$x,BROKEN_ON_SPARSE=fails$1((function(){return!Array(1).includes()}));$$8({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$6=getBuiltInPrototypeMethod$i,includes$7=getBuiltInPrototypeMethod$6("Array","includes"),isObject=isObject$k,classof=classofRaw$2,wellKnownSymbol$1=wellKnownSymbol$o,MATCH$2=wellKnownSymbol$1("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$2])?!!t:"RegExp"===classof(e))},isRegExp=isRegexp,$TypeError$2=TypeError,notARegexp=function(e){if(isRegExp(e))throw new $TypeError$2("The method doesn't accept regular expressions");return e},wellKnownSymbol=wellKnownSymbol$o,MATCH$1=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[MATCH$1]=!1,"/./"[e](t)}catch(e){}}return!1},$$7=_export,uncurryThis$2=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$9,toString$2=toString$d,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=uncurryThis$2("".indexOf);$$7({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString$2(requireObjectCoercible(this)),toString$2(notARegExp(e)),arguments.length>1?arguments[1]:void 0)}});var getRandomValues,getBuiltInPrototypeMethod$5=getBuiltInPrototypeMethod$i,includes$6=getBuiltInPrototypeMethod$5("String","includes"),isPrototypeOf$7=objectIsPrototypeOf,arrayMethod=includes$7,stringMethod=includes$6,ArrayPrototype$4=Array.prototype,StringPrototype$1=String.prototype,includes$5=function(e){var t=e.includes;return e===ArrayPrototype$4||isPrototypeOf$7(ArrayPrototype$4,e)&&t===ArrayPrototype$4.includes?arrayMethod:"string"==typeof e||e===StringPrototype$1||isPrototypeOf$7(StringPrototype$1,e)&&t===StringPrototype$1.includes?stringMethod:t},parent$s=includes$5,includes$4=parent$s,parent$r=includes$4,includes$3=parent$r,parent$q=includes$3,includes$2=parent$q,includes$1=includes$2,_includesInstanceProperty$1=getDefaultExportFromCjs(includes$1),includes4=includes$1,_includesInstanceProperty=getDefaultExportFromCjs(includes4),bind$1=bind$c,_bindInstanceProperty=getDefaultExportFromCjs(bind$1),rnds8=new Uint8Array(16);function rng(){var e,t;if(!getRandomValues&&!(getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&_bindInstanceProperty(e=crypto.getRandomValues).call(e,crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&_bindInstanceProperty(t=msCrypto.getRandomValues).call(t,msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}var REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(e){return"string"==typeof e&&REGEX.test(e)}for(var byteToHex=[],i=0;i<256;++i)byteToHex.push((i+256).toString(16).substr(1));function stringify2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase();if(!validate(r))throw TypeError("Stringified UUID is invalid");return r}function v4(e,t,r){var n=(e=e||{}).random||(e.rng||rng)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return stringify2(n)}var isSSR=function(){return"undefined"==typeof window},genUuid=function(){return v4()};function mediaTrackStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({contentHint:e.contentHint,enabled:e.enabled,id:e.id,kind:e.kind,label:e.label,muted:e.muted,readyState:e.readyState})}function mediaStreamStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({id:e.id,active:e.active})}function mediaSenderStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({track:mediaTrackStringify(e.track)})}function mediaReceiverStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({track:mediaTrackStringify(e.track)})}function mediaTransceiverStringify(e){return null==e?"undefined | null":"string"==typeof e?e:_JSON$stringify({currentDirection:e.currentDirection,direction:e.direction,mid:e.mid,stopped:e.stopped,receiver:mediaReceiverStringify(e.receiver),sender:mediaSenderStringify(e.sender)})}var DB_NAME$1="@byted/ve-rtc",STORE_NAME="@byted/ve-rtc",STORE_CACHED_SIZE_KEY="@byted/ve-rtc-cache-size",IDB=function(){return _createClass((function e(){_classCallCheck(this,e),_defineProperty(this,"storeKey",void 0),_defineProperty(this,"logLevel",void 0),_defineProperty(this,"LogfileSize",void 0),_defineProperty(this,"db",void 0),_defineProperty(this,"logId",void 0),_defineProperty(this,"cacheLog",void 0),_defineProperty(this,"cachedSize",void 0),_defineProperty(this,"preCacheTime",void 0),_defineProperty(this,"timer",void 0),_defineProperty(this,"_getSize",(function(e){return new Blob(e).size/1048576})),this.storeKey="",this.logId=1,this.cacheLog="",this.logLevel="none",this.LogfileSize=100,this._createStore()}),[{key:"_createStore",value:function(){var e=this;if(!isSSR()&&window.indexedDB){var t=indexedDB.open(DB_NAME$1);t.onupgradeneeded=function(){t.result.createObjectStore(STORE_NAME);try{localStorage.removeItem(STORE_CACHED_SIZE_KEY)}catch(e){}},t.onerror=function(e){},t.onsuccess=function(){e.db=t.result,e._getCachedSize()}}}},{key:"_getCachedSize",value:function(){var e=this;try{var t=localStorage.getItem(STORE_CACHED_SIZE_KEY);if(t)this.cachedSize=Number(t);else _valuesInstanceProperty(this).call(this).then((function(t){e.cachedSize=e._getSize(t),e._setCachedSize()}))}catch(e){}}},{key:"_setCachedSize",value:function(){try{localStorage.setItem(STORE_CACHED_SIZE_KEY,"".concat(this.cachedSize))}catch(e){}}},{key:"_getStore",value:function(e){if(this.db)return this.db.transaction(STORE_NAME,e).objectStore(STORE_NAME)}},{key:"set",value:function(e){var t=this;return new _Promise((function(r,n){if("none"===t.logLevel)return r();var o;if(e&&t.preCacheTime&&t.preCacheTime-_Date$now()<1e3)return t.cacheLog+=_concatInstanceProperty(o="\n\n".concat(t.logId,": ")).call(o,e),t.logId++,t.timer||(t.timer=_setTimeout((function(){t.set("")}),1e3-(t.preCacheTime-_Date$now()))),r();clearTimeout(t.timer),t.timer=null;var a=t._getStore("readwrite");if(!a)return n("get store fail");t.cachedSize&&t.cachedSize>t.LogfileSize&&t.keyEarliest().then((function(e){t.get(e).then((function(r){t.del(e).then((function(){t.cachedSize=t.cachedSize-t._getSize(["".concat(r)]),t._setCachedSize()}))}))}));var i=a.get(t.storeKey);i.onsuccess=function(){try{var o,s,l,c,u,$=_concatInstanceProperty(o="".concat(i.result||"")).call(o,t.cacheLog),p=e?_concatInstanceProperty(s=_concatInstanceProperty(l="".concat($?"\n\n":"")).call(l,t.logId,": ")).call(s,e):"";a.put(_concatInstanceProperty(c="".concat($)).call(c,p),t.storeKey),e&&t.logId++,t.cacheLog="",t.cachedSize=(t.cachedSize||0)+t._getSize([_concatInstanceProperty(u="".concat(t.cacheLog)).call(u,p)]),t._setCachedSize(),t.preCacheTime=_Date$now(),r()}catch(r){var f;if(!e)return n(r);t.cacheLog+=_concatInstanceProperty(f="\n\n".concat(t.logId,": ")).call(f,e),t.logId++,n(r)}},i.onerror=function(r){var o;if(!e)return n(r);t.cacheLog+=_concatInstanceProperty(o="\n\n".concat(t.logId,": ")).call(o,e),t.logId++,n(r)}}))}},{key:"get",value:function(e){var t=this;return new _Promise((function(r,n){var o=t._getStore("readonly");if(!o)return n();var a=o.get(e);a.onsuccess=function(){r(a.result)},a.onerror=function(e){n(e)}}))}},{key:"del",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.storeKey;return new _Promise((function(r,n){var o=e._getStore("readwrite");if(!o)return n();var a=o.delete(t);a.onsuccess=function(){return r(a.result)},a.onerror=function(e){return n(e)}}))}},{key:"keyEarliest",value:function(){return _keysInstanceProperty(this).call(this).then((function(e){var t,r=_Date$now();return _forEachInstanceProperty(e).call(e,(function(e){if(e&&e.length){var n=e.split("-")[0];Number(n)<r&&(r=Number(n),t=e)}})),t}))}},{key:"keys",value:function(){var e=this;return new _Promise((function(t,r){var n=e._getStore("readonly");if(!n)return r();if(n.getAllKeys){var o=n.getAllKeys();return o.onsuccess=function(){t(o.result)},void(o.onerror=function(){r()})}var a=[];n.openCursor().onsuccess=function(){this.result&&(a.push(this.result.key),this.result.continue())},n.transaction.oncomplete=function(){return t(a)}}))}},{key:"values",value:function(){var e=this;return new _Promise((function(t,r){var n=e._getStore("readonly");if(!n)return r();if(n.getAll){var o=n.getAll();return o.onsuccess=function(){t(o.result)},void(o.onerror=function(){r()})}var a=[];n.openCursor().onsuccess=function(){this.result&&(a.push(this.result.value),this.result.continue())},n.transaction.oncomplete=function(){return t(a)}}))}},{key:"download",value:function(e){e=e||this.storeKey,this.get(e).then((function(t){var r=document.createElement("a");r.download="".concat(e,".txt"),r.href="data:text/paint;utf-8,".concat(t||""),r.click()}))}}])}(),iDB=new IDB,userAgent=environmentUserAgent,stringPadWebkitBug=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent),$$6=_export,$padStart=stringPad.start,WEBKIT_BUG=stringPadWebkitBug;$$6({target:"String",proto:!0,forced:WEBKIT_BUG},{padStart:function(e){return $padStart(this,e,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$4=getBuiltInPrototypeMethod$i,padStart$6=getBuiltInPrototypeMethod$4("String","padStart"),isPrototypeOf$6=objectIsPrototypeOf,method$4=padStart$6,StringPrototype=String.prototype,padStart$5=function(e){var t=e.padStart;return"string"==typeof e||e===StringPrototype||isPrototypeOf$6(StringPrototype,e)&&t===StringPrototype.padStart?method$4:t},parent$p=padStart$5,padStart$4=parent$p,parent$o=padStart$4,padStart$3=parent$o,parent$n=padStart$3,padStart$2=parent$n,padStart$1=padStart$2,padStart2=padStart$1,_padStartInstanceProperty=getDefaultExportFromCjs(padStart2);function _arrayWithoutHoles(e){if(_Array$isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if(void 0!==_Symbol&&null!=_getIteratorMethod(e)||null!=e["@@iterator"])return _Array$from(e)}function _nonIterableSpread(){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 _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}var tryToString=tryToString$7,$TypeError$1=TypeError,deletePropertyOrThrow$1=function(e,t){if(!delete e[t])throw new $TypeError$1("Cannot delete property "+tryToString(t)+" of "+tryToString(e))},$$5=_export,toObject$3=toObject$f,toAbsoluteIndex=toAbsoluteIndex$3,toIntegerOrInfinity$1=toIntegerOrInfinity$6,lengthOfArrayLike$3=lengthOfArrayLike$b,setArrayLength=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$4,arraySpeciesCreate$1=arraySpeciesCreate$4,createProperty=createProperty$5,deletePropertyOrThrow=deletePropertyOrThrow$1,arrayMethodHasSpeciesSupport=arrayMethodHasSpeciesSupport$5,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("splice"),max=Math.max,min=Math.min;$$5({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{splice:function(e,t){var r,n,o,a,i,s,l=toObject$3(this),c=lengthOfArrayLike$3(l),u=toAbsoluteIndex(e,c),$=arguments.length;for(0===$?r=n=0:1===$?(r=0,n=c-u):(r=$-2,n=min(max(toIntegerOrInfinity$1(t),0),c-u)),doesNotExceedSafeInteger$1(c+r-n),o=arraySpeciesCreate$1(l,n),a=0;a<n;a++)(i=u+a)in l&&createProperty(o,a,l[i]);if(o.length=n,r<n){for(a=u;a<c-n;a++)s=a+r,(i=a+n)in l?l[s]=l[i]:deletePropertyOrThrow(l,s);for(a=c;a>c-n+r;a--)deletePropertyOrThrow(l,a-1)}else if(r>n)for(a=c-n;a>u;a--)s=a+r-1,(i=a+n-1)in l?l[s]=l[i]:deletePropertyOrThrow(l,s);for(a=0;a<r;a++)l[a+u]=arguments[a+2];return setArrayLength(l,c-n+r),o}});var getBuiltInPrototypeMethod$3=getBuiltInPrototypeMethod$i,splice$6=getBuiltInPrototypeMethod$3("Array","splice"),isPrototypeOf$5=objectIsPrototypeOf,method$3=splice$6,ArrayPrototype$3=Array.prototype,splice$5=function(e){var t=e.splice;return e===ArrayPrototype$3||isPrototypeOf$5(ArrayPrototype$3,e)&&t===ArrayPrototype$3.splice?method$3:t},parent$m=splice$5,splice$4=parent$m,parent$l=splice$4,splice$3=parent$l,parent$k=splice$3,splice$2=parent$k,splice$1=splice$2,splice2=splice$1,_spliceInstanceProperty=getDefaultExportFromCjs(splice2),$$4=_export;$$4({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var path$2=path$q,isNan$5=path$2.Number.isNaN,parent$j=isNan$5,isNan$4=parent$j,parent$i=isNan$4,isNan$3=parent$i,parent$h=isNan$3,isNan$2=parent$h,isNan$1=isNan$2,isNan=isNan$1,_Number$isNaN=getDefaultExportFromCjs(isNan),$$3=_export,uncurryThis$1=functionUncurryThisClause,$indexOf=arrayIncludes.indexOf,arrayMethodIsStrict$1=arrayMethodIsStrict$4,nativeIndexOf=uncurryThis$1([].indexOf),NEGATIVE_ZERO=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$1=NEGATIVE_ZERO||!arrayMethodIsStrict$1("indexOf");$$3({target:"Array",proto:!0,forced:FORCED$1},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO?nativeIndexOf(this,e,t)||0:$indexOf(this,e,t)}});var getBuiltInPrototypeMethod$2=getBuiltInPrototypeMethod$i,indexOf$6=getBuiltInPrototypeMethod$2("Array","indexOf"),isPrototypeOf$4=objectIsPrototypeOf,method$2=indexOf$6,ArrayPrototype$2=Array.prototype,indexOf$5=function(e){var t=e.indexOf;return e===ArrayPrototype$2||isPrototypeOf$4(ArrayPrototype$2,e)&&t===ArrayPrototype$2.indexOf?method$2:t},parent$g=indexOf$5,indexOf$4=parent$g,parent$f=indexOf$4,indexOf$3=parent$f,parent$e=indexOf$3,indexOf$2=parent$e,indexOf$1=indexOf$2,indexOf2=indexOf$1,_indexOfInstanceProperty=getDefaultExportFromCjs(indexOf2),EventEmitter=function(){return _createClass((function e(){_classCallCheck(this,e),_defineProperty(this,"_all",{})}),[{key:"on",value:function(e,t){var r=this._all[e];r?r.push(t):this._all[e]=[t]}},{key:"once",value:function(e,t){var r=this,n=function(){t.apply(void 0,arguments),r.off(e,n)};this.on(e,n)}},{key:"off",value:function(e,t){var r=this._all[e];null==r||_spliceInstanceProperty(r).call(r,_indexOfInstanceProperty(r).call(r,t)>>>0,1)}},{key:"emit",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var a=this._all[e];null==a||_forEachInstanceProperty(t=_sliceInstanceProperty(a).call(a)).call(t,(function(e){return e.apply(void 0,n)}))}},{key:"safeEmit",value:function(e){try{for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return this.emit.apply(this,_concatInstanceProperty(t=[e]).call(t,n))}catch(e){console.error(e)}}},{key:"destroy",value:function(){this._all={}}}])}();function _callSuper$1(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?_Reflect$construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}var configNumberKeys=["UPLOAD_CONSOLE_LENGTH_CUT","UPLOAD_REPORT_LIMIT"];function needToNumber(e){return _includesInstanceProperty(configNumberKeys).call(configNumberKeys,e)}var Config$1=function(){function e(){var t,r;_classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _defineProperty(r=_callSuper$1(this,e,_concatInstanceProperty(t=[]).call(t,o)),"config",{UPLOAD_CONSOLE_ON:!1,UPLOAD_CONSOLE_LENGTH_CUT:200,UPLOAD_REPORT_LIMIT:45e4,ENABLE_REPORT_IDB_BUFFER:!1}),r}return _inherits(e,EventEmitter),_createClass(e,[{key:"setParameter",value:function(e,t){if(needToNumber(e))try{var r=Number(t);if(_Number$isNaN(r))return;this.config[e]=r}catch(r){var n;return void console.warn(_concatInstanceProperty(n="Cannot convert core lib parameter ".concat(e,":")).call(n,t," into number"))}else this.config[e]=t;this.emit(e,this.config[e])}},{key:"getParameter",value:function(e){return this.config[e]}},{key:"getKeys",value:function(){return _Object$keys(this.config)}}])}(),CoreConfig=new Config$1,DESCRIPTORS=descriptors,uncurryThis=functionUncurryThis,call$1=functionCall,fails=fails$x,objectKeys=objectKeys$3,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$2=toObject$f,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty5=Object.defineProperty,concat2=uncurryThis([].concat),objectAssign=!$assign||fails((function(){if(DESCRIPTORS&&1!==$assign({b:1},$assign(defineProperty5({},"a",{enumerable:!0,get:function(){defineProperty5(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==$assign({},e)[r]||objectKeys($assign({},t)).join("")!==n}))?function(e,t){for(var r=toObject$2(e),n=arguments.length,o=1,a=getOwnPropertySymbolsModule.f,i=propertyIsEnumerableModule.f;n>o;)for(var s,l=IndexedObject$1(arguments[o++]),c=a?concat2(objectKeys(l),a(l)):objectKeys(l),u=c.length,$=0;u>$;)s=c[$++],DESCRIPTORS&&!call$1(i,l,s)||(r[s]=l[s]);return r}:$assign,$$2=_export,assign$7=objectAssign;$$2({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign$7},{assign:assign$7});var path$1=path$q,assign$6=path$1.Object.assign,parent$d=assign$6,assign$5=parent$d,parent$c=assign$5,assign$4=parent$c,parent$b=assign$4,assign$3=parent$b,assign$2=assign$3,assign$1=assign$2,_Object$assign=getDefaultExportFromCjs(assign$1),aCallable=aCallable$j,toObject$1=toObject$f,IndexedObject=indexedObject,lengthOfArrayLike$2=lengthOfArrayLike$b,$TypeError=TypeError,REDUCE_EMPTY="Reduce of empty array with no initial value",createMethod=function(e){return function(t,r,n,o){var a=toObject$1(t),i=IndexedObject(a),s=lengthOfArrayLike$2(a);if(aCallable(r),0===s&&n<2)throw new $TypeError(REDUCE_EMPTY);var l=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(l in i){o=i[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw new $TypeError(REDUCE_EMPTY)}for(;e?l>=0:s>l;l+=c)l in i&&(o=r(o,i[l],l,a));return o}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$$1=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$4,CHROME_VERSION=environmentV8Version,IS_NODE=environmentIsNode,CHROME_BUG=!IS_NODE&&environmentV8Version>79&&environmentV8Version<83,FORCED=CHROME_BUG||!arrayMethodIsStrict("reduce");$$1({target:"Array",proto:!0,forced:FORCED},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,t>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod$1=getBuiltInPrototypeMethod$i,reduce$6=getBuiltInPrototypeMethod$1("Array","reduce"),isPrototypeOf$3=objectIsPrototypeOf,method$1=reduce$6,ArrayPrototype$1=Array.prototype,reduce$5=function(e){var t=e.reduce;return e===ArrayPrototype$1||isPrototypeOf$3(ArrayPrototype$1,e)&&t===ArrayPrototype$1.reduce?method$1:t},parent$a=reduce$5,reduce$4=parent$a,parent$9=reduce$4,reduce$3=parent$9,parent$8=reduce$3,reduce$2=parent$8,reduce$1=reduce$2,reduce3=reduce$1,_reduceInstanceProperty=getDefaultExportFromCjs(reduce3),isArray2=isArray$d,lengthOfArrayLike$1=lengthOfArrayLike$b,doesNotExceedSafeInteger=doesNotExceedSafeInteger$4,bind2=functionBindContext,flattenIntoArray$1=function(e,t,r,n,o,a,i,s){for(var l,c,u=o,$=0,p=!!i&&bind2(i,s);$<n;)$ in r&&(l=p?p(r[$],$,t):r[$],a>0&&isArray2(l)?(c=lengthOfArrayLike$1(l),u=flattenIntoArray$1(e,t,l,c,u,a-1)-1):(doesNotExceedSafeInteger(u+1),e[u]=l),u++),$++;return u},flattenIntoArray_1=flattenIntoArray$1,$=_export,flattenIntoArray=flattenIntoArray_1,toObject=toObject$f,lengthOfArrayLike=lengthOfArrayLike$b,toIntegerOrInfinity=toIntegerOrInfinity$6,arraySpeciesCreate=arraySpeciesCreate$4;$({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=toObject(this),r=lengthOfArrayLike(t),n=arraySpeciesCreate(t,0);return n.length=flattenIntoArray(n,t,t,r,0,void 0===e?1:toIntegerOrInfinity(e)),n}});var getBuiltInPrototypeMethod=getBuiltInPrototypeMethod$i,flat$6=getBuiltInPrototypeMethod("Array","flat"),isPrototypeOf$2=objectIsPrototypeOf,method=flat$6,ArrayPrototype=Array.prototype,flat$5=function(e){var t=e.flat;return e===ArrayPrototype||isPrototypeOf$2(ArrayPrototype,e)&&t===ArrayPrototype.flat?method:t},parent$7=flat$5,flat$4=parent$7,parent$6=flat$4,flat$3=parent$6,parent$5=flat$3,flat$2=parent$5,flat$1=flat$2,flat2=flat$1,_flatInstanceProperty=getDefaultExportFromCjs(flat2),common={};!function(e){var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=_sliceInstanceProperty(Array.prototype).call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==_typeof(n))throw new TypeError(n+"must be non-object");for(var o in n)r(n,o)&&(e[o]=n[o])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,o){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),o);else for(var a=0;a<n;a++)e[o+a]=t[r+a]},flattenChunks:function(e){var t,r,n,o,a,i;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(i=new Uint8Array(n),o=0,t=0,r=e.length;t<r;t++)a=e[t],i.set(a,o),o+=a.length;return i}},o={arraySet:function(e,t,r,n,o){for(var a=0;a<n;a++)e[o+a]=t[r+a]},flattenChunks:function(e){return _concatInstanceProperty([]).apply([],e)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(t)}(common);var deflate$4={},deflate$3={},trees$1={},utils$6=common,Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(e){for(var t=e.length;--t>=0;)e[t]=0}var STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],DIST_CODE_LEN=512,static_ltree=new Array(2*(L_CODES$1+2));zero$1(static_ltree);var static_dtree=new Array(2*D_CODES$1);zero$1(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);var _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);var base_length=new Array(LENGTH_CODES$1);zero$1(base_length);var static_l_desc,static_d_desc,static_bl_desc,base_dist=new Array(D_CODES$1);function StaticTreeDesc(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function TreeDesc(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function d_code(e){return e<256?_dist_code[e]:_dist_code[256+(e>>>7)]}function put_short(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function send_bits(e,t,r){e.bi_valid>Buf_size-r?(e.bi_buf|=t<<e.bi_valid&65535,put_short(e,e.bi_buf),e.bi_buf=t>>Buf_size-e.bi_valid,e.bi_valid+=r-Buf_size):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function send_code(e,t,r){send_bits(e,r[2*t],r[2*t+1])}function bi_reverse(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function bi_flush(e){16===e.bi_valid?(put_short(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function gen_bitlen(e,t){var r,n,o,a,i,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,$=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,d=t.stat_desc.max_length,_=0;for(a=0;a<=MAX_BITS$1;a++)e.bl_count[a]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<HEAP_SIZE$1;r++)(a=l[2*l[2*(n=e.heap[r])+1]+1]+1)>d&&(a=d,_++),l[2*n+1]=a,n>c||(e.bl_count[a]++,i=0,n>=f&&(i=p[n-f]),s=l[2*n],e.opt_len+=s*(a+i),$&&(e.static_len+=s*(u[2*n+1]+i)));if(0!==_){do{for(a=d-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[d]--,_-=2}while(_>0);for(a=d;0!==a;a--)for(n=e.bl_count[a];0!==n;)(o=e.heap[--r])>c||(l[2*o+1]!==a&&(e.opt_len+=(a-l[2*o+1])*l[2*o],l[2*o+1]=a),n--)}}function gen_codes(e,t,r){var n,o,a=new Array(MAX_BITS$1+1),i=0;for(n=1;n<=MAX_BITS$1;n++)a[n]=i=i+r[n-1]<<1;for(o=0;o<=t;o++){var s=e[2*o+1];0!==s&&(e[2*o]=bi_reverse(a[s]++,s))}}function tr_static_init(){var e,t,r,n,o,a=new Array(MAX_BITS$1+1);for(r=0,n=0;n<LENGTH_CODES$1-1;n++)for(base_length[n]=r,e=0;e<1<<extra_lbits[n];e++)_length_code[r++]=n;for(_length_code[r-1]=n,o=0,n=0;n<16;n++)for(base_dist[n]=o,e=0;e<1<<extra_dbits[n];e++)_dist_code[o++]=n;for(o>>=7;n<D_CODES$1;n++)for(base_dist[n]=o<<7,e=0;e<1<<extra_dbits[n]-7;e++)_dist_code[256+o++]=n;for(t=0;t<=MAX_BITS$1;t++)a[t]=0;for(e=0;e<=143;)static_ltree[2*e+1]=8,e++,a[8]++;for(;e<=255;)static_ltree[2*e+1]=9,e++,a[9]++;for(;e<=279;)static_ltree[2*e+1]=7,e++,a[7]++;for(;e<=287;)static_ltree[2*e+1]=8,e++,a[8]++;for(gen_codes(static_ltree,L_CODES$1+1,a),e=0;e<D_CODES$1;e++)static_dtree[2*e+1]=5,static_dtree[2*e]=bi_reverse(e,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)}function init_block(e){var t;for(t=0;t<L_CODES$1;t++)e.dyn_ltree[2*t]=0;for(t=0;t<D_CODES$1;t++)e.dyn_dtree[2*t]=0;for(t=0;t<BL_CODES$1;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*END_BLOCK]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function bi_windup(e){e.bi_valid>8?put_short(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function copy_block(e,t,r,n){bi_windup(e),n&&(put_short(e,r),put_short(e,~r)),utils$6.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function smaller(e,t,r,n){var o=2*t,a=2*r;return e[o]<e[a]||e[o]===e[a]&&n[t]<=n[r]}function pqdownheap(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&smaller(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!smaller(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function compress_block(e,t,r){var n,o,a,i,s=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],o=e.pending_buf[e.l_buf+s],s++,0===n?send_code(e,o,t):(send_code(e,(a=_length_code[o])+LITERALS$1+1,t),0!==(i=extra_lbits[a])&&send_bits(e,o-=base_length[a],i),send_code(e,a=d_code(--n),r),0!==(i=extra_dbits[a])&&send_bits(e,n-=base_dist[a],i))}while(s<e.last_lit);send_code(e,END_BLOCK,t)}function build_tree(e,t){var r,n,o,a=t.dyn_tree,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=HEAP_SIZE$1,r=0;r<l;r++)0!==a[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(o=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[o]=0,e.opt_len--,s&&(e.static_len-=i[2*o+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)pqdownheap(e,a,r);o=l;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pqdownheap(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*o]=a[2*r]+a[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=o,e.heap[1]=o++,pqdownheap(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],gen_bitlen(e,t),gen_codes(a,c,e.bl_count)}function scan_tree(e,t,r){var n,o,a=-1,i=t[1],s=0,l=7,c=4;for(0===i&&(l=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=i,i=t[2*(n+1)+1],++s<l&&o===i||(s<c?e.bl_tree[2*o]+=s:0!==o?(o!==a&&e.bl_tree[2*o]++,e.bl_tree[2*REP_3_6]++):s<=10?e.bl_tree[2*REPZ_3_10]++:e.bl_tree[2*REPZ_11_138]++,s=0,a=o,0===i?(l=138,c=3):o===i?(l=6,c=3):(l=7,c=4))}function send_tree(e,t,r){var n,o,a=-1,i=t[1],s=0,l=7,c=4;for(0===i&&(l=138,c=3),n=0;n<=r;n++)if(o=i,i=t[2*(n+1)+1],!(++s<l&&o===i)){if(s<c)do{send_code(e,o,e.bl_tree)}while(0!=--s);else 0!==o?(o!==a&&(send_code(e,o,e.bl_tree),s--),send_code(e,REP_3_6,e.bl_tree),send_bits(e,s-3,2)):s<=10?(send_code(e,REPZ_3_10,e.bl_tree),send_bits(e,s-3,3)):(send_code(e,REPZ_11_138,e.bl_tree),send_bits(e,s-11,7));s=0,a=o,0===i?(l=138,c=3):o===i?(l=6,c=3):(l=7,c=4)}}function build_bl_tree(e){var t;for(scan_tree(e,e.dyn_ltree,e.l_desc.max_code),scan_tree(e,e.dyn_dtree,e.d_desc.max_code),build_tree(e,e.bl_desc),t=BL_CODES$1-1;t>=3&&0===e.bl_tree[2*bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function send_all_trees(e,t,r,n){var o;for(send_bits(e,t-257,5),send_bits(e,r-1,5),send_bits(e,n-4,4),o=0;o<n;o++)send_bits(e,e.bl_tree[2*bl_order[o]+1],3);send_tree(e,e.dyn_ltree,t-1),send_tree(e,e.dyn_dtree,r-1)}function detect_data_type(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return Z_BINARY;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return Z_TEXT;for(t=32;t<LITERALS$1;t++)if(0!==e.dyn_ltree[2*t])return Z_TEXT;return Z_BINARY}zero$1(base_dist);var static_init_done=!1;function _tr_init(e){static_init_done||(tr_static_init(),static_init_done=!0),e.l_desc=new TreeDesc(e.dyn_ltree,static_l_desc),e.d_desc=new TreeDesc(e.dyn_dtree,static_d_desc),e.bl_desc=new TreeDesc(e.bl_tree,static_bl_desc),e.bi_buf=0,e.bi_valid=0,init_block(e)}function _tr_stored_block(e,t,r,n){send_bits(e,(STORED_BLOCK<<1)+(n?1:0),3),copy_block(e,t,r,!0)}function _tr_align(e){send_bits(e,STATIC_TREES<<1,3),send_code(e,END_BLOCK,static_ltree),bi_flush(e)}function _tr_flush_block(e,t,r,n){var o,a,i=0;e.level>0?(e.strm.data_type===Z_UNKNOWN$1&&(e.strm.data_type=detect_data_type(e)),build_tree(e,e.l_desc),build_tree(e,e.d_desc),i=build_bl_tree(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==t?_tr_stored_block(e,t,r,n):e.strategy===Z_FIXED$1||a===o?(send_bits(e,(STATIC_TREES<<1)+(n?1:0),3),compress_block(e,static_ltree,static_dtree)):(send_bits(e,(DYN_TREES<<1)+(n?1:0),3),send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,i+1),compress_block(e,e.dyn_ltree,e.dyn_dtree)),init_block(e),n&&bi_windup(e)}function _tr_tally(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(_length_code[r]+LITERALS$1+1)]++,e.dyn_dtree[2*d_code(t)]++),e.last_lit===e.lit_bufsize-1}function adler32$2(e,t,r,n){for(var o=65535&e,a=e>>>16&65535,i=0;0!==r;){r-=i=r>2e3?2e3:r;do{a=a+(o=o+t[n++]|0)|0}while(--i);o%=65521,a%=65521}return o|a<<16}trees$1._tr_init=_tr_init,trees$1._tr_stored_block=_tr_stored_block,trees$1._tr_flush_block=_tr_flush_block,trees$1._tr_tally=_tr_tally,trees$1._tr_align=_tr_align;var adler32_1=adler32$2;function makeTable(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}var crcTable=makeTable();function crc32$2(e,t,r,n){var o=crcTable,a=n+r;e^=-1;for(var i=n;i<a;i++)e=e>>>8^o[255&(e^t[i])];return~e}var configuration_table,crc32_1=crc32$2,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},utils$5=common,trees=trees$1,adler32$1=adler32_1,crc32$1=crc32_1,msg$2=messages,Z_NO_FLUSH$1=0,Z_PARTIAL_FLUSH=1,Z_FULL_FLUSH=3,Z_FINISH$2=4,Z_BLOCK$1=5,Z_OK$2=0,Z_STREAM_END$2=1,Z_STREAM_ERROR$1=-2,Z_DATA_ERROR$1=-3,Z_BUF_ERROR$1=-5,Z_DEFAULT_COMPRESSION$1=-1,Z_FILTERED=1,Z_HUFFMAN_ONLY=2,Z_RLE=3,Z_FIXED=4,Z_DEFAULT_STRATEGY$1=0,Z_UNKNOWN=2,Z_DEFLATED$2=8,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3;function err(e,t){return e.msg=msg$2[t],t}function rank(e){return(e<<1)-(e>4?9:0)}function zero(e){for(var t=e.length;--t>=0;)e[t]=0}function flush_pending(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(utils$5.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function flush_block_only(e,t){trees._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,flush_pending(e.strm)}function put_byte(e,t){e.pending_buf[e.pending++]=t}function putShortMSB(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function read_buf(e,t,r,n){var o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,utils$5.arraySet(t,e.input,e.next_in,o,r),1===e.state.wrap?e.adler=adler32$1(e.adler,t,o,r):2===e.state.wrap&&(e.adler=crc32$1(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function longest_match(e,t){var r,n,o=e.max_chain_length,a=e.strstart,i=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-MIN_LOOKAHEAD?e.strstart-(e.w_size-MIN_LOOKAHEAD):0,c=e.window,u=e.w_mask,$=e.prev,p=e.strstart+MAX_MATCH,f=c[a+i-1],d=c[a+i];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+i]===d&&c[r+i-1]===f&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do{}while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&a<p);if(n=MAX_MATCH-(p-a),a=p-MAX_MATCH,n>i){if(e.match_start=t,i=n,n>=s)break;f=c[a+i-1],d=c[a+i]}}}while((t=$[t&u])>l&&0!=--o);return i<=e.lookahead?i:e.lookahead}function fill_window(e){var t,r,n,o,a,i=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=i+(i-MIN_LOOKAHEAD)){utils$5.arraySet(e.window,e.window,i,i,0),e.match_start-=i,e.strstart-=i,e.block_start-=i,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=i?n-i:0}while(--r);t=r=i;do{n=e.prev[--t],e.prev[t]=n>=i?n-i:0}while(--r);o+=i}if(0===e.strm.avail_in)break;if(r=read_buf(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=MIN_MATCH)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+MIN_MATCH-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<MIN_MATCH)););}while(e.lookahead<MIN_LOOKAHEAD&&0!==e.strm.avail_in)}function deflate_stored(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(fill_window(e),0===e.lookahead&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE;if(e.strstart-e.block_start>=e.w_size-MIN_LOOKAHEAD&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):(e.strstart>e.block_start&&(flush_block_only(e,!1),e.strm.avail_out),BS_NEED_MORE)}function deflate_fast(e,t){for(var r,n;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(0===e.lookahead)break}if(r=0,e.lookahead>=MIN_MATCH&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,r)),e.match_length>=MIN_MATCH)if(n=trees._tr_tally(e,e.strstart-e.match_start,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=MIN_MATCH){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=trees._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}return e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),0===e.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_slow(e,t){for(var r,n,o;;){if(e.lookahead<MIN_LOOKAHEAD){if(fill_window(e),e.lookahead<MIN_LOOKAHEAD&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(0===e.lookahead)break}if(r=0,e.lookahead>=MIN_MATCH&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=MIN_MATCH-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-MIN_LOOKAHEAD&&(e.match_length=longest_match(e,r),e.match_length<=5&&(e.strategy===Z_FILTERED||e.match_length===MIN_MATCH&&e.strstart-e.match_start>4096)&&(e.match_length=MIN_MATCH-1)),e.prev_length>=MIN_MATCH&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-MIN_MATCH,n=trees._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-MIN_MATCH),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+MIN_MATCH-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=MIN_MATCH-1,e.strstart++,n&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}else if(e.match_available){if((n=trees._tr_tally(e,0,e.window[e.strstart-1]))&&flush_block_only(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return BS_NEED_MORE}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=trees._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<MIN_MATCH-1?e.strstart:MIN_MATCH-1,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),0===e.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_rle(e,t){for(var r,n,o,a,i=e.window;;){if(e.lookahead<=MAX_MATCH){if(fill_window(e),e.lookahead<=MAX_MATCH&&t===Z_NO_FLUSH$1)return BS_NEED_MORE;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=MIN_MATCH&&e.strstart>0&&(n=i[o=e.strstart-1])===i[++o]&&n===i[++o]&&n===i[++o]){a=e.strstart+MAX_MATCH;do{}while(n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&n===i[++o]&&o<a);e.match_length=MAX_MATCH-(a-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=MIN_MATCH?(r=trees._tr_tally(e,1,e.match_length-MIN_MATCH),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=trees._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),0===e.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_huff(e,t){for(var r;;){if(0===e.lookahead&&(fill_window(e),0===e.lookahead)){if(t===Z_NO_FLUSH$1)return BS_NEED_MORE;break}if(e.match_length=0,r=trees._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(flush_block_only(e,!1),0===e.strm.avail_out))return BS_NEED_MORE}return e.insert=0,t===Z_FINISH$2?(flush_block_only(e,!0),0===e.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):e.last_lit&&(flush_block_only(e,!1),0===e.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function Config(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}function lm_init(e){e.window_size=2*e.w_size,zero(e.head),e.max_lazy_match=configuration_table[e.level].max_lazy,e.good_match=configuration_table[e.level].good_length,e.nice_match=configuration_table[e.level].nice_length,e.max_chain_length=configuration_table[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=MIN_MATCH-1,e.match_available=0,e.ins_h=0}function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new utils$5.Buf16(2*HEAP_SIZE),this.dyn_dtree=new utils$5.Buf16(2*(2*D_CODES+1)),this.bl_tree=new utils$5.Buf16(2*(2*BL_CODES+1)),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new utils$5.Buf16(MAX_BITS+1),this.heap=new utils$5.Buf16(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new utils$5.Buf16(2*L_CODES+1),zero(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function deflateResetKeep(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=Z_UNKNOWN,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?INIT_STATE:BUSY_STATE,e.adler=2===t.wrap?0:1,t.last_flush=Z_NO_FLUSH$1,trees._tr_init(t),Z_OK$2):err(e,Z_STREAM_ERROR$1)}function deflateReset(e){var t=deflateResetKeep(e);return t===Z_OK$2&&lm_init(e.state),t}function deflateSetHeader(e,t){return e&&e.state?2!==e.state.wrap?Z_STREAM_ERROR$1:(e.state.gzhead=t,Z_OK$2):Z_STREAM_ERROR$1}function deflateInit2(e,t,r,n,o,a){if(!e)return Z_STREAM_ERROR$1;var i=1;if(t===Z_DEFAULT_COMPRESSION$1&&(t=6),n<0?(i=0,n=-n):n>15&&(i=2,n-=16),o<1||o>MAX_MEM_LEVEL||r!==Z_DEFLATED$2||n<8||n>15||t<0||t>9||a<0||a>Z_FIXED)return err(e,Z_STREAM_ERROR$1);8===n&&(n=9);var s=new DeflateState;return e.state=s,s.strm=e,s.wrap=i,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+MIN_MATCH-1)/MIN_MATCH),s.window=new utils$5.Buf8(2*s.w_size),s.head=new utils$5.Buf16(s.hash_size),s.prev=new utils$5.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new utils$5.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,deflateReset(e)}function deflateInit(e,t){return deflateInit2(e,t,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1)}function deflate$2(e,t){var r,n,o,a;if(!e||!e.state||t>Z_BLOCK$1||t<0)return e?err(e,Z_STREAM_ERROR$1):Z_STREAM_ERROR$1;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||n.status===FINISH_STATE&&t!==Z_FINISH$2)return err(e,0===e.avail_out?Z_BUF_ERROR$1:Z_STREAM_ERROR$1);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===INIT_STATE)if(2===n.wrap)e.adler=0,put_byte(n,31),put_byte(n,139),put_byte(n,8),n.gzhead?(put_byte(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),put_byte(n,255&n.gzhead.time),put_byte(n,n.gzhead.time>>8&255),put_byte(n,n.gzhead.time>>16&255),put_byte(n,n.gzhead.time>>24&255),put_byte(n,9===n.level?2:n.strategy>=Z_HUFFMAN_ONLY||n.level<2?4:0),put_byte(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(put_byte(n,255&n.gzhead.extra.length),put_byte(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=EXTRA_STATE):(put_byte(n,0),put_byte(n,0),put_byte(n,0),put_byte(n,0),put_byte(n,0),put_byte(n,9===n.level?2:n.strategy>=Z_HUFFMAN_ONLY||n.level<2?4:0),put_byte(n,OS_CODE),n.status=BUSY_STATE);else{var i=Z_DEFLATED$2+(n.w_bits-8<<4)<<8;i|=(n.strategy>=Z_HUFFMAN_ONLY||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(i|=PRESET_DICT),i+=31-i%31,n.status=BUSY_STATE,putShortMSB(n,i),0!==n.strstart&&(putShortMSB(n,e.adler>>>16),putShortMSB(n,65535&e.adler)),e.adler=1}if(n.status===EXTRA_STATE)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),flush_pending(e),o=n.pending,n.pending!==n.pending_buf_size));)put_byte(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=NAME_STATE)}else n.status=NAME_STATE;if(n.status===NAME_STATE)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),flush_pending(e),o=n.pending,n.pending===n.pending_buf_size)){a=1;break}a=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,put_byte(n,a)}while(0!==a);n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),0===a&&(n.gzindex=0,n.status=COMMENT_STATE)}else n.status=COMMENT_STATE;if(n.status===COMMENT_STATE)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),flush_pending(e),o=n.pending,n.pending===n.pending_buf_size)){a=1;break}a=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,put_byte(n,a)}while(0!==a);n.gzhead.hcrc&&n.pending>o&&(e.adler=crc32$1(e.adler,n.pending_buf,n.pending-o,o)),0===a&&(n.status=HCRC_STATE)}else n.status=HCRC_STATE;if(n.status===HCRC_STATE&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&flush_pending(e),n.pending+2<=n.pending_buf_size&&(put_byte(n,255&e.adler),put_byte(n,e.adler>>8&255),e.adler=0,n.status=BUSY_STATE)):n.status=BUSY_STATE),0!==n.pending){if(flush_pending(e),0===e.avail_out)return n.last_flush=-1,Z_OK$2}else if(0===e.avail_in&&rank(t)<=rank(r)&&t!==Z_FINISH$2)return err(e,Z_BUF_ERROR$1);if(n.status===FINISH_STATE&&0!==e.avail_in)return err(e,Z_BUF_ERROR$1);if(0!==e.avail_in||0!==n.lookahead||t!==Z_NO_FLUSH$1&&n.status!==FINISH_STATE){var s=n.strategy===Z_HUFFMAN_ONLY?deflate_huff(n,t):n.strategy===Z_RLE?deflate_rle(n,t):configuration_table[n.level].func(n,t);if(s!==BS_FINISH_STARTED&&s!==BS_FINISH_DONE||(n.status=FINISH_STATE),s===BS_NEED_MORE||s===BS_FINISH_STARTED)return 0===e.avail_out&&(n.last_flush=-1),Z_OK$2;if(s===BS_BLOCK_DONE&&(t===Z_PARTIAL_FLUSH?trees._tr_align(n):t!==Z_BLOCK$1&&(trees._tr_stored_block(n,0,0,!1),t===Z_FULL_FLUSH&&(zero(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),flush_pending(e),0===e.avail_out))return n.last_flush=-1,Z_OK$2}return t!==Z_FINISH$2?Z_OK$2:n.wrap<=0?Z_STREAM_END$2:(2===n.wrap?(put_byte(n,255&e.adler),put_byte(n,e.adler>>8&255),put_byte(n,e.adler>>16&255),put_byte(n,e.adler>>24&255),put_byte(n,255&e.total_in),put_byte(n,e.total_in>>8&255),put_byte(n,e.total_in>>16&255),put_byte(n,e.total_in>>24&255)):(putShortMSB(n,e.adler>>>16),putShortMSB(n,65535&e.adler)),flush_pending(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?Z_OK$2:Z_STREAM_END$2)}function deflateEnd(e){var t;return e&&e.state?(t=e.state.status)!==INIT_STATE&&t!==EXTRA_STATE&&t!==NAME_STATE&&t!==COMMENT_STATE&&t!==HCRC_STATE&&t!==BUSY_STATE&&t!==FINISH_STATE?err(e,Z_STREAM_ERROR$1):(e.state=null,t===BUSY_STATE?err(e,Z_DATA_ERROR$1):Z_OK$2):Z_STREAM_ERROR$1}function deflateSetDictionary(e,t){var r,n,o,a,i,s,l,c,u=t.length;if(!e||!e.state)return Z_STREAM_ERROR$1;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==INIT_STATE||r.lookahead)return Z_STREAM_ERROR$1;for(1===a&&(e.adler=adler32$1(e.adler,t,u,0)),r.wrap=0,u>=r.w_size&&(0===a&&(zero(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new utils$5.Buf8(r.w_size),utils$5.arraySet(c,t,u-r.w_size,r.w_size,0),t=c,u=r.w_size),i=e.avail_in,s=e.next_in,l=e.input,e.avail_in=u,e.next_in=0,e.input=t,fill_window(r);r.lookahead>=MIN_MATCH;){n=r.strstart,o=r.lookahead-(MIN_MATCH-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+MIN_MATCH-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=MIN_MATCH-1,fill_window(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=MIN_MATCH-1,r.match_available=0,e.next_in=s,e.input=l,e.avail_in=i,r.wrap=a,Z_OK$2}configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],deflate$3.deflateInit=deflateInit,deflate$3.deflateInit2=deflateInit2,deflate$3.deflateReset=deflateReset,deflate$3.deflateResetKeep=deflateResetKeep,deflate$3.deflateSetHeader=deflateSetHeader,deflate$3.deflate=deflate$2,deflate$3.deflateEnd=deflateEnd,deflate$3.deflateSetDictionary=deflateSetDictionary,deflate$3.deflateInfo="pako deflate (from Nodeca project)";var strings$2={},utils$4=common,STR_APPLY_OK=!0,STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,[0])}catch(e){STR_APPLY_OK=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){STR_APPLY_UIA_OK=!1}for(var _utf8len=new utils$4.Buf8(256),q=0;q<256;q++)_utf8len[q]=q>=252?6:q>=248?5:q>=240?4:q>=224?3:q>=192?2:1;function buf2binstring(e,t){if(t<65534&&(e.subarray&&STR_APPLY_UIA_OK||!e.subarray&&STR_APPLY_OK))return String.fromCharCode.apply(null,utils$4.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}function ZStream$2(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}_utf8len[254]=_utf8len[254]=1,strings$2.string2buf=function(e){var t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<i&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new utils$4.Buf8(s),a=0,o=0;a<s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<i&&56320==(64512&(n=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},strings$2.buf2binstring=function(e){return buf2binstring(e,e.length)},strings$2.binstring2buf=function(e){for(var t=new utils$4.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},strings$2.buf2string=function(e,t){var r,n,o,a,i=t||e.length,s=new Array(2*i);for(n=0,r=0;r<i;)if((o=e[r++])<128)s[n++]=o;else if((a=_utf8len[o])>4)s[n++]=65533,r+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&r<i;)o=o<<6|63&e[r++],a--;a>1?s[n++]=65533:o<65536?s[n++]=o:(o-=65536,s[n++]=55296|o>>10&1023,s[n++]=56320|1023&o)}return buf2binstring(s,n)},strings$2.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+_utf8len[e[r]]>t?r:t};var zstream=ZStream$2,zlib_deflate=deflate$3,utils$3=common,strings$1=strings$2,msg$1=messages,ZStream$1=zstream,toString$1=Object.prototype.toString,Z_NO_FLUSH=0,Z_FINISH$1=4,Z_OK$1=0,Z_STREAM_END$1=1,Z_SYNC_FLUSH=2,Z_DEFAULT_COMPRESSION=-1,Z_DEFAULT_STRATEGY=0,Z_DEFLATED$1=8;function Deflate(e){if(!(this instanceof Deflate))return new Deflate(e);this.options=utils$3.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZStream$1,this.strm.avail_out=0;var r=zlib_deflate.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Z_OK$1)throw new Error(msg$1[r]);if(t.header&&zlib_deflate.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"==typeof t.dictionary?strings$1.string2buf(t.dictionary):"[object ArrayBuffer]"===toString$1.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=zlib_deflate.deflateSetDictionary(this.strm,n))!==Z_OK$1)throw new Error(msg$1[r]);this._dict_set=!0}}function deflate$1(e,t){var r=new Deflate(t);if(r.push(e,!0),r.err)throw r.msg||msg$1[r.err];return r.result}function deflateRaw(e,t){return(t=t||{}).raw=!0,deflate$1(e,t)}function gzip(e,t){return(t=t||{}).gzip=!0,deflate$1(e,t)}Deflate.prototype.push=function(e,t){var r,n,o=this.strm,a=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?Z_FINISH$1:Z_NO_FLUSH,"string"==typeof e?o.input=strings$1.string2buf(e):"[object ArrayBuffer]"===toString$1.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new utils$3.Buf8(a),o.next_out=0,o.avail_out=a),(r=zlib_deflate.deflate(o,n))!==Z_STREAM_END$1&&r!==Z_OK$1)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||n!==Z_FINISH$1&&n!==Z_SYNC_FLUSH)||("string"===this.options.to?this.onData(strings$1.buf2binstring(utils$3.shrinkBuf(o.output,o.next_out))):this.onData(utils$3.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&r!==Z_STREAM_END$1);return n===Z_FINISH$1?(r=zlib_deflate.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Z_OK$1):n!==Z_SYNC_FLUSH||(this.onEnd(Z_OK$1),o.avail_out=0,!0)},Deflate.prototype.onData=function(e){this.chunks.push(e)},Deflate.prototype.onEnd=function(e){e===Z_OK$1&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=utils$3.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},deflate$4.Deflate=Deflate,deflate$4.deflate=deflate$1,deflate$4.deflateRaw=deflateRaw,deflate$4.gzip=gzip;var inflate$4={},anObject=anObject$g,regexpFlags=function(){var e=anObject(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},call=functionCall,hasOwn2=hasOwnProperty_1,isPrototypeOf$1=objectIsPrototypeOf,regExpFlags=regexpFlags,RegExpPrototype$1=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$1||hasOwn2(e,"flags")||!isPrototypeOf$1(RegExpPrototype$1,e)?t:call(regExpFlags,e)},getRegExpFlags=regexpGetFlags,flags$6=getRegExpFlags,isPrototypeOf=objectIsPrototypeOf,flags$5=flags$6,RegExpPrototype=RegExp.prototype,flags_1=function(e){return e===RegExpPrototype||isPrototypeOf(RegExpPrototype,e)?flags$5(e):e.flags},parent$4=flags_1,flags$4=parent$4,parent$3=flags$4,flags$3=parent$3,parent$2=flags$3,flags$2=parent$2,flags$1=flags$2,flags=flags$1,_flagsInstanceProperty=getDefaultExportFromCjs(flags),inflate$3={},BAD$1=30,TYPE$1=12,inffast=function(e,t){var r,n,o,a,i,s,l,c,u,$,p,f,d,_,y,h,g,b,m,S,E,O,v,T,I;r=e.state,n=e.next_in,T=e.input,o=n+(e.avail_in-5),a=e.next_out,I=e.output,i=a-(t-e.avail_out),s=a+(e.avail_out-257),l=r.dmax,c=r.wsize,u=r.whave,$=r.wnext,p=r.window,f=r.hold,d=r.bits,_=r.lencode,y=r.distcode,h=(1<<r.lenbits)-1,g=(1<<r.distbits)-1;e:do{d<15&&(f+=T[n++]<<d,d+=8,f+=T[n++]<<d,d+=8),b=_[f&h];t:for(;;){if(f>>>=m=b>>>24,d-=m,0===(m=b>>>16&255))I[a++]=65535&b;else{if(!(16&m)){if(64&m){if(32&m){r.mode=TYPE$1;break e}e.msg="invalid literal/length code",r.mode=BAD$1;break e}b=_[(65535&b)+(f&(1<<m)-1)];continue t}for(S=65535&b,(m&=15)&&(d<m&&(f+=T[n++]<<d,d+=8),S+=f&(1<<m)-1,f>>>=m,d-=m),d<15&&(f+=T[n++]<<d,d+=8,f+=T[n++]<<d,d+=8),b=y[f&g];;){if(f>>>=m=b>>>24,d-=m,16&(m=b>>>16&255)){if(E=65535&b,d<(m&=15)&&(f+=T[n++]<<d,(d+=8)<m&&(f+=T[n++]<<d,d+=8)),(E+=f&(1<<m)-1)>l){e.msg="invalid distance too far back",r.mode=BAD$1;break e}if(f>>>=m,d-=m,E>(m=a-i)){if((m=E-m)>u&&r.sane){e.msg="invalid distance too far back",r.mode=BAD$1;break e}if(O=0,v=p,0===$){if(O+=c-m,m<S){S-=m;do{I[a++]=p[O++]}while(--m);O=a-E,v=I}}else if($<m){if(O+=c+$-m,(m-=$)<S){S-=m;do{I[a++]=p[O++]}while(--m);if(O=0,$<S){S-=m=$;do{I[a++]=p[O++]}while(--m);O=a-E,v=I}}}else if(O+=$-m,m<S){S-=m;do{I[a++]=p[O++]}while(--m);O=a-E,v=I}for(;S>2;)I[a++]=v[O++],I[a++]=v[O++],I[a++]=v[O++],S-=3;S&&(I[a++]=v[O++],S>1&&(I[a++]=v[O++]))}else{O=a-E;do{I[a++]=I[O++],I[a++]=I[O++],I[a++]=I[O++],S-=3}while(S>2);S&&(I[a++]=I[O++],S>1&&(I[a++]=I[O++]))}break}if(64&m){e.msg="invalid distance code",r.mode=BAD$1;break e}b=y[(65535&b)+(f&(1<<m)-1)]}}break}}while(n<o&&a<s);n-=S=d>>3,f&=(1<<(d-=S<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=a<s?s-a+257:257-(a-s),r.hold=f,r.bits=d},utils$2=common,MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lext=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],dbase=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],dext=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],inftrees=function(e,t,r,n,o,a,i,s){var l,c,u,$,p,f,d,_,y,h=s.bits,g=0,b=0,m=0,S=0,E=0,O=0,v=0,T=0,I=0,P=0,w=null,R=0,C=new utils$2.Buf16(MAXBITS+1),A=new utils$2.Buf16(MAXBITS+1),D=null,N=0;for(g=0;g<=MAXBITS;g++)C[g]=0;for(b=0;b<n;b++)C[t[r+b]]++;for(E=h,S=MAXBITS;S>=1&&0===C[S];S--);if(E>S&&(E=S),0===S)return o[a++]=20971520,o[a++]=20971520,s.bits=1,0;for(m=1;m<S&&0===C[m];m++);for(E<m&&(E=m),T=1,g=1;g<=MAXBITS;g++)if(T<<=1,(T-=C[g])<0)return-1;if(T>0&&(e===CODES$1||1!==S))return-1;for(A[1]=0,g=1;g<MAXBITS;g++)A[g+1]=A[g]+C[g];for(b=0;b<n;b++)0!==t[r+b]&&(i[A[t[r+b]]++]=b);if(e===CODES$1?(w=D=i,f=19):e===LENS$1?(w=lbase,R-=257,D=lext,N-=257,f=256):(w=dbase,D=dext,f=-1),P=0,b=0,g=m,p=a,O=E,v=0,u=-1,$=(I=1<<E)-1,e===LENS$1&&I>ENOUGH_LENS$1||e===DISTS$1&&I>ENOUGH_DISTS$1)return 1;for(;;){d=g-v,i[b]<f?(_=0,y=i[b]):i[b]>f?(_=D[N+i[b]],y=w[R+i[b]]):(_=96,y=0),l=1<<g-v,m=c=1<<O;do{o[p+(P>>v)+(c-=l)]=d<<24|_<<16|y}while(0!==c);for(l=1<<g-1;P&l;)l>>=1;if(0!==l?(P&=l-1,P+=l):P=0,b++,0==--C[g]){if(g===S)break;g=t[r+i[b]]}if(g>E&&(P&$)!==u){for(0===v&&(v=E),p+=m,T=1<<(O=g-v);O+v<S&&!((T-=C[O+v])<=0);)O++,T<<=1;if(I+=1<<O,e===LENS$1&&I>ENOUGH_LENS$1||e===DISTS$1&&I>ENOUGH_DISTS$1)return 1;o[u=P&$]=E<<24|O<<16|p-a}}return 0!==P&&(o[p+P]=g-v<<24|64<<16),s.bits=E,0},utils$1=common,adler32=adler32_1,crc32=crc32_1,inflate_fast2=inffast,inflate_table2=inftrees,CODES=0,LENS=1,DISTS=2,Z_FINISH=4,Z_BLOCK=5,Z_TREES=6,Z_OK=0,Z_STREAM_END=1,Z_NEED_DICT=2,Z_STREAM_ERROR=-2,Z_DATA_ERROR=-3,Z_MEM_ERROR=-4,Z_BUF_ERROR=-5,Z_DEFLATED=8,HEAD=1,FLAGS=2,TIME=3,OS=4,EXLEN=5,EXTRA=6,NAME=7,COMMENT=8,HCRC=9,DICTID=10,DICT=11,TYPE=12,TYPEDO=13,STORED=14,COPY_=15,COPY=16,TABLE=17,LENLENS=18,CODELENS=19,LEN_=20,LEN=21,LENEXT=22,DIST=23,DISTEXT=24,MATCH=25,LIT=26,CHECK=27,LENGTH=28,DONE=29,BAD=30,MEM=31,SYNC=32,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS;function zswap32(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new utils$1.Buf16(320),this.work=new utils$1.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new utils$1.Buf32(ENOUGH_LENS),t.distcode=t.distdyn=new utils$1.Buf32(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK):Z_STREAM_ERROR}function inflateReset(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)):Z_STREAM_ERROR}function inflateReset2(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,inflateReset(e))):Z_STREAM_ERROR}function inflateInit2(e,t){var r,n;return e?(n=new InflateState,e.state=n,n.window=null,(r=inflateReset2(e,t))!==Z_OK&&(e.state=null),r):Z_STREAM_ERROR}function inflateInit(e){return inflateInit2(e,DEF_WBITS)}var lenfix,distfix,virgin=!0;function fixedtables(e){if(virgin){var t;for(lenfix=new utils$1.Buf32(512),distfix=new utils$1.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inflate_table2(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inflate_table2(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5}function updatewindow(e,t,r,n){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new utils$1.Buf8(a.wsize)),n>=a.wsize?(utils$1.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>n&&(o=n),utils$1.arraySet(a.window,t,r-n,o,a.wnext),(n-=o)?(utils$1.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}function inflate$2(e,t){var r,n,o,a,i,s,l,c,u,$,p,f,d,_,y,h,g,b,m,S,E,O,v,T,I=0,P=new utils$1.Buf8(4),w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Z_STREAM_ERROR;(r=e.state).mode===TYPE&&(r.mode=TYPEDO),i=e.next_out,o=e.output,l=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,c=r.hold,u=r.bits,$=s,p=l,O=Z_OK;e:for(;;)switch(r.mode){case HEAD:if(0===r.wrap){r.mode=TYPEDO;break}for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(2&r.wrap&&35615===c){r.check=0,P[0]=255&c,P[1]=c>>>8&255,r.check=crc32(r.check,P,2,0),c=0,u=0,r.mode=FLAGS;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=BAD;break}if((15&c)!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(u-=4,E=8+(15&(c>>>=4)),0===r.wbits)r.wbits=E;else if(E>r.wbits){e.msg="invalid window size",r.mode=BAD;break}r.dmax=1<<E,e.adler=r.check=1,r.mode=512&c?DICTID:TYPE,c=0,u=0;break;case FLAGS:for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(r.flags=c,(255&_flagsInstanceProperty(r))!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(57344&_flagsInstanceProperty(r)){e.msg="unknown header flags set",r.mode=BAD;break}r.head&&(r.head.text=c>>8&1),512&_flagsInstanceProperty(r)&&(P[0]=255&c,P[1]=c>>>8&255,r.check=crc32(r.check,P,2,0)),c=0,u=0,r.mode=TIME;case TIME:for(;u<32;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.head&&(r.head.time=c),512&_flagsInstanceProperty(r)&&(P[0]=255&c,P[1]=c>>>8&255,P[2]=c>>>16&255,P[3]=c>>>24&255,r.check=crc32(r.check,P,4,0)),c=0,u=0,r.mode=OS;case OS:for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&_flagsInstanceProperty(r)&&(P[0]=255&c,P[1]=c>>>8&255,r.check=crc32(r.check,P,2,0)),c=0,u=0,r.mode=EXLEN;case EXLEN:if(1024&_flagsInstanceProperty(r)){for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.length=c,r.head&&(r.head.extra_len=c),512&_flagsInstanceProperty(r)&&(P[0]=255&c,P[1]=c>>>8&255,r.check=crc32(r.check,P,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(1024&_flagsInstanceProperty(r)&&((f=r.length)>s&&(f=s),f&&(r.head&&(E=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),utils$1.arraySet(r.head.extra,n,a,f,E)),512&_flagsInstanceProperty(r)&&(r.check=crc32(r.check,n,f,a)),s-=f,a+=f,r.length-=f),r.length))break e;r.length=0,r.mode=NAME;case NAME:if(2048&_flagsInstanceProperty(r)){if(0===s)break e;f=0;do{E=n[a+f++],r.head&&E&&r.length<65536&&(r.head.name+=String.fromCharCode(E))}while(E&&f<s);if(512&_flagsInstanceProperty(r)&&(r.check=crc32(r.check,n,f,a)),s-=f,a+=f,E)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=COMMENT;case COMMENT:if(4096&_flagsInstanceProperty(r)){if(0===s)break e;f=0;do{E=n[a+f++],r.head&&E&&r.length<65536&&(r.head.comment+=String.fromCharCode(E))}while(E&&f<s);if(512&_flagsInstanceProperty(r)&&(r.check=crc32(r.check,n,f,a)),s-=f,a+=f,E)break e}else r.head&&(r.head.comment=null);r.mode=HCRC;case HCRC:if(512&_flagsInstanceProperty(r)){for(;u<16;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(c!==(65535&r.check)){e.msg="header crc mismatch",r.mode=BAD;break}c=0,u=0}r.head&&(r.head.hcrc=_flagsInstanceProperty(r)>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=TYPE;break;case DICTID:for(;u<32;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}e.adler=r.check=zswap32(c),c=0,u=0,r.mode=DICT;case DICT:if(0===r.havedict)return e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,Z_NEED_DICT;e.adler=r.check=1,r.mode=TYPE;case TYPE:if(t===Z_BLOCK||t===Z_TREES)break e;case TYPEDO:if(r.last){c>>>=7&u,u-=7&u,r.mode=CHECK;break}for(;u<3;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}switch(r.last=1&c,u-=1,3&(c>>>=1)){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,t===Z_TREES){c>>>=2,u-=2;break e}break;case 2:r.mode=TABLE;break;case 3:e.msg="invalid block type",r.mode=BAD}c>>>=2,u-=2;break;case STORED:for(c>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=65535&c,c=0,u=0,r.mode=COPY_,t===Z_TREES)break e;case COPY_:r.mode=COPY;case COPY:if(f=r.length){if(f>s&&(f=s),f>l&&(f=l),0===f)break e;utils$1.arraySet(o,n,a,f,i),s-=f,a+=f,l-=f,i+=f,r.length-=f;break}r.mode=TYPE;break;case TABLE:for(;u<14;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(r.nlen=257+(31&c),c>>>=5,u-=5,r.ndist=1+(31&c),c>>>=5,u-=5,r.ncode=4+(15&c),c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have<r.ncode;){for(;u<3;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.lens[w[r.have++]]=7&c,c>>>=3,u-=3}for(;r.have<19;)r.lens[w[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,v={bits:r.lenbits},O=inflate_table2(CODES,r.lens,0,19,r.lencode,0,r.work,v),r.lenbits=v.bits,O){e.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have<r.nlen+r.ndist;){for(;h=(I=r.lencode[c&(1<<r.lenbits)-1])>>>16&255,g=65535&I,!((y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(g<16)c>>>=y,u-=y,r.lens[r.have++]=g;else{if(16===g){for(T=y+2;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(c>>>=y,u-=y,0===r.have){e.msg="invalid bit length repeat",r.mode=BAD;break}E=r.lens[r.have-1],f=3+(3&c),c>>>=2,u-=2}else if(17===g){for(T=y+3;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}u-=y,E=0,f=3+(7&(c>>>=y)),c>>>=3,u-=3}else{for(T=y+7;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}u-=y,E=0,f=11+(127&(c>>>=y)),c>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=BAD;break}for(;f--;)r.lens[r.have++]=E}}if(r.mode===BAD)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,v={bits:r.lenbits},O=inflate_table2(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,v),r.lenbits=v.bits,O){e.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,v={bits:r.distbits},O=inflate_table2(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,v),r.distbits=v.bits,O){e.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,t===Z_TREES)break e;case LEN_:r.mode=LEN;case LEN:if(s>=6&&l>=258){e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,inflate_fast2(e,p),i=e.next_out,o=e.output,l=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,c=r.hold,u=r.bits,r.mode===TYPE&&(r.back=-1);break}for(r.back=0;h=(I=r.lencode[c&(1<<r.lenbits)-1])>>>16&255,g=65535&I,!((y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(h&&!(240&h)){for(b=y,m=h,S=g;h=(I=r.lencode[S+((c&(1<<b+m)-1)>>b)])>>>16&255,g=65535&I,!(b+(y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}c>>>=b,u-=b,r.back+=b}if(c>>>=y,u-=y,r.back+=y,r.length=g,0===h){r.mode=LIT;break}if(32&h){r.back=-1,r.mode=TYPE;break}if(64&h){e.msg="invalid literal/length code",r.mode=BAD;break}r.extra=15&h,r.mode=LENEXT;case LENEXT:if(r.extra){for(T=r.extra;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;h=(I=r.distcode[c&(1<<r.distbits)-1])>>>16&255,g=65535&I,!((y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(!(240&h)){for(b=y,m=h,S=g;h=(I=r.distcode[S+((c&(1<<b+m)-1)>>b)])>>>16&255,g=65535&I,!(b+(y=I>>>24)<=u);){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}c>>>=b,u-=b,r.back+=b}if(c>>>=y,u-=y,r.back+=y,64&h){e.msg="invalid distance code",r.mode=BAD;break}r.offset=g,r.extra=15&h,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(T=r.extra;u<T;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(0===l)break e;if(f=p-l,r.offset>f){if((f=r.offset-f)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=BAD;break}f>r.wnext?(f-=r.wnext,d=r.wsize-f):d=r.wnext-f,f>r.length&&(f=r.length),_=r.window}else _=o,d=i-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{o[i++]=_[d++]}while(--f);0===r.length&&(r.mode=LEN);break;case LIT:if(0===l)break e;o[i++]=r.length,l--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;u<32;){if(0===s)break e;s--,c|=n[a++]<<u,u+=8}if(p-=l,e.total_out+=p,r.total+=p,p&&(e.adler=r.check=_flagsInstanceProperty(r)?crc32(r.check,o,p,i-p):adler32(r.check,o,p,i-p)),p=l,(_flagsInstanceProperty(r)?c:zswap32(c))!==r.check){e.msg="incorrect data check",r.mode=BAD;break}c=0,u=0}r.mode=LENGTH;case LENGTH:if(r.wrap&&_flagsInstanceProperty(r)){for(;u<32;){if(0===s)break e;s--,c+=n[a++]<<u,u+=8}if(c!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=BAD;break}c=0,u=0}r.mode=DONE;case DONE:O=Z_STREAM_END;break e;case BAD:O=Z_DATA_ERROR;break e;case MEM:return Z_MEM_ERROR;default:return Z_STREAM_ERROR}return e.next_out=i,e.avail_out=l,e.next_in=a,e.avail_in=s,r.hold=c,r.bits=u,(r.wsize||p!==e.avail_out&&r.mode<BAD&&(r.mode<CHECK||t!==Z_FINISH))&&updatewindow(e,e.output,e.next_out,p-e.avail_out),$-=e.avail_in,p-=e.avail_out,e.total_in+=$,e.total_out+=p,r.total+=p,r.wrap&&p&&(e.adler=r.check=_flagsInstanceProperty(r)?crc32(r.check,o,p,e.next_out-p):adler32(r.check,o,p,e.next_out-p)),e.data_type=r.bits+(r.last?64:0)+(r.mode===TYPE?128:0)+(r.mode===LEN_||r.mode===COPY_?256:0),(0===$&&0===p||t===Z_FINISH)&&O===Z_OK&&(O=Z_BUF_ERROR),O}function inflateEnd(e){if(!e||!e.state)return Z_STREAM_ERROR;var t=e.state;return t.window&&(t.window=null),e.state=null,Z_OK}function inflateGetHeader(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,Z_OK):Z_STREAM_ERROR}function inflateSetDictionary(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&r.mode!==DICT?Z_STREAM_ERROR:r.mode===DICT&&adler32(1,t,n,0)!==r.check?Z_DATA_ERROR:updatewindow(e,t,n,n)?(r.mode=MEM,Z_MEM_ERROR):(r.havedict=1,Z_OK):Z_STREAM_ERROR}inflate$3.inflateReset=inflateReset,inflate$3.inflateReset2=inflateReset2,inflate$3.inflateResetKeep=inflateResetKeep,inflate$3.inflateInit=inflateInit,inflate$3.inflateInit2=inflateInit2,inflate$3.inflate=inflate$2,inflate$3.inflateEnd=inflateEnd,inflate$3.inflateGetHeader=inflateGetHeader,inflate$3.inflateSetDictionary=inflateSetDictionary,inflate$3.inflateInfo="pako inflate (from Nodeca project)";var constants$1={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function GZheader$1(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader$1,zlib_inflate=inflate$3,utils=common,strings=strings$2,c=constants$1,msg=messages,ZStream=zstream,GZheader=gzheader,toString2=Object.prototype.toString;function Inflate(e){if(!(this instanceof Inflate))return new Inflate(e);this.options=utils.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZStream,this.strm.avail_out=0;var r=zlib_inflate.inflateInit2(this.strm,t.windowBits);if(r!==c.Z_OK)throw new Error(msg[r]);if(this.header=new GZheader,zlib_inflate.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=strings.string2buf(t.dictionary):"[object ArrayBuffer]"===toString2.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=zlib_inflate.inflateSetDictionary(this.strm,t.dictionary))!==c.Z_OK))throw new Error(msg[r])}function inflate$1(e,t){var r=new Inflate(t);if(r.push(e,!0),r.err)throw r.msg||msg[r.err];return r.result}function inflateRaw(e,t){return(t=t||{}).raw=!0,inflate$1(e,t)}Inflate.prototype.push=function(e,t){var r,n,o,a,i,s=this.strm,l=this.options.chunkSize,u=this.options.dictionary,$=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?c.Z_FINISH:c.Z_NO_FLUSH,"string"==typeof e?s.input=strings.binstring2buf(e):"[object ArrayBuffer]"===toString2.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new utils.Buf8(l),s.next_out=0,s.avail_out=l),(r=zlib_inflate.inflate(s,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&u&&(r=zlib_inflate.inflateSetDictionary(this.strm,u)),r===c.Z_BUF_ERROR&&!0===$&&(r=c.Z_OK,$=!1),r!==c.Z_STREAM_END&&r!==c.Z_OK)return this.onEnd(r),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&r!==c.Z_STREAM_END&&(0!==s.avail_in||n!==c.Z_FINISH&&n!==c.Z_SYNC_FLUSH)||("string"===this.options.to?(o=strings.utf8border(s.output,s.next_out),a=s.next_out-o,i=strings.buf2string(s.output,o),s.next_out=a,s.avail_out=l-a,a&&utils.arraySet(s.output,s.output,o,a,0),this.onData(i)):this.onData(utils.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&($=!0)}while((s.avail_in>0||0===s.avail_out)&&r!==c.Z_STREAM_END);return r===c.Z_STREAM_END&&(n=c.Z_FINISH),n===c.Z_FINISH?(r=zlib_inflate.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===c.Z_OK):n!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),s.avail_out=0,!0)},Inflate.prototype.onData=function(e){this.chunks.push(e)},Inflate.prototype.onEnd=function(e){e===c.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=utils.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},inflate$4.Inflate=Inflate,inflate$4.inflate=inflate$1,inflate$4.inflateRaw=inflateRaw,inflate$4.ungzip=inflate$1;var assign2=common.assign,deflate=deflate$4,inflate=inflate$4,constants=constants$1,pako={};assign2(pako,deflate,inflate,constants);var pako_1=pako,pako$1=getDefaultExportFromCjs(pako_1),path=path$q,setInterval$4=path.setInterval,parent$1=setInterval$4,setInterval$3=parent$1,parent=setInterval$3,setInterval$2=parent,setInterval$1=setInterval$2,setInterval=setInterval$1,_setInterval=getDefaultExportFromCjs(setInterval),lockId=1,PromiseLock=function(){return _createClass((function e(t){_classCallCheck(this,e),_defineProperty(this,"lockingPromise",_Promise.resolve()),_defineProperty(this,"locks",0),_defineProperty(this,"name",""),_defineProperty(this,"lockId",void 0),this.lockId=lockId++,t&&(this.name=t)}),[{key:"isLocked",get:function(){return this.locks>0}},{key:"lock",value:function(){var e,t=this;this.locks+=1;var r=new _Promise((function(r){e=function(){t.locks-=1,r()}})),n=this.lockingPromise.then((function(){return e}));return this.lockingPromise=this.lockingPromise.then((function(){return r})),n}}])}(),DB_NAME="__rtc_umd_name__",indexedDB$1=function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},IndexedDBInterface=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,"storeName",void 0),_defineProperty(this,"pendingList",[]),this.storeName=t,!isSSR()&&indexedDB$1()&&this._checkAndCreateStore(t)}return _createClass(e,[{key:"_checkAndCreateStore",value:(s=_asyncToGenerator(_regeneratorRuntime().mark((function t(r,n){var o,a,i=this;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e._promiseLock.lock();case 2:if(o=t.sent,!indexedDB$1().databases){t.next=6;break}return t.next=6,new _Promise((function(e){var t=function(){return indexedDB$1().databases().finally(e)};a=_setInterval(t,100),t()})).finally((function(){return clearInterval(a)}));case 6:return t.abrupt("return",new _Promise((function(t){e.db&&(e.db.close(),delete e.db);var a=n?indexedDB$1().open(DB_NAME,n):indexedDB$1().open(DB_NAME);a.onupgradeneeded=function(){a.result.createObjectStore(r)},a.onerror=function(){console.error("IndexedDBInterface error",a.error)},a.onsuccess=function(){var n=a.result;e.db=n;try{var s;e.db.transaction(i.storeName,"readonly"),_forEachInstanceProperty(s=i.pendingList).call(s,function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,a;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.txMode,n=t.pendResolve,o=t.pendReject,e.prev=1,e.next=4,i._getStore(r);case 4:a=e.sent,n(a),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),o();case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()),t()}catch(e){t(i._checkAndCreateStore(r,n.version+1))}finally{o()}}})));case 7:case"end":return t.stop()}}),t)}))),function(e,t){return s.apply(this,arguments)})},{key:"_getStore",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function t(r){var n,o=this;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e._promiseLock.lock();case 2:return n=t.sent,t.abrupt("return",new _Promise((function(t,a){if(!e.db)return o.pendingList.push({txMode:r,pendResolve:t,pendReject:a}),void n();try{t(e.db.transaction(o.storeName,r).objectStore(o.storeName))}catch(e){return void o.pendingList.push({txMode:r,pendResolve:t,pendReject:a})}finally{n()}})));case 4:case"end":return t.stop()}}),t)}))),function(e){return i.apply(this,arguments)})},{key:"put2String",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n=_JSON$stringify(t)}catch(e){n=t}return e.next=3,this.put(n,r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"get4String",value:(o=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.get(t);case 2:r=e.sent;try{n=JSON.parse(r)}catch(e){n=r}return e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"put",value:(n=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getStore("readwrite");case 2:return n=e.sent,e.abrupt("return",new _Promise((function(e,o){var a=n.put(t,r);a.onsuccess=function(){e()},a.onerror=function(e){o(e)}})));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"get",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getStore("readonly");case 2:return r=e.sent,e.abrupt("return",new _Promise((function(e,n){var o=r.get(t);o.onsuccess=function(){e(o.result)},o.onerror=function(e){n(e)}})));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"del",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getStore("readwrite");case 2:return r=e.sent,e.abrupt("return",new _Promise((function(e,n){var o=r.delete(t);o.onsuccess=function(){e()},o.onerror=function(e){n(e)}})));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]);var t,r,n,o,a,i,s}();function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(_includesInstanceProperty$1(t).call(t,n))continue;r[n]=e[n]}return r}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=_objectWithoutPropertiesLoose(e,t);if(_Object$getOwnPropertySymbols$1){var a=_Object$getOwnPropertySymbols$1(e);for(n=0;n<a.length;n++)r=a[n],_includesInstanceProperty$1(t).call(t,r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}_defineProperty(IndexedDBInterface,"db",void 0),_defineProperty(IndexedDBInterface,"state","init"),_defineProperty(IndexedDBInterface,"_promiseLock",new PromiseLock("iDB"));var _excluded=["message"];function isOutBufferItem(e){return void 0!==e.report_id}var _navigator,_context$2,_window$localStorage$1,LongStringReportor=function(){return _createClass((function e(){_classCallCheck(this,e),_defineProperty(this,"name","LongStringReportor"),_defineProperty(this,"inBuffer",[]),_defineProperty(this,"outBuffer",[])}),[{key:"push",value:function(e){var t;e.message&&this.inBuffer.push(_objectSpread2(_objectSpread2({},e),{},{message:{id:_sliceInstanceProperty(t=genUuid()).call(t,0,3),index:0,end:!0,msg:e.message}}))}},{key:"splice",value:function(e){for(var t=[],r=0;this.outBuffer.length;){var n=_JSON$stringify(this.outBuffer[0]).length;if(!(n<e))break;e-=n,r+=n,t.push(this.outBuffer.shift())}for(;this.inBuffer[0]&&e>0;){var o=this.inBuffer[0],a=o.message,i=_objectSpread2(_objectSpread2({},_objectWithoutProperties(o,_excluded)),{},{message:_objectSpread2(_objectSpread2({},a),{},{msg:""})}),s=_JSON$stringify(i).length,l=e-s,c=_objectSpread2({},i);if(l>a.msg.length)c.message.msg=a.msg,this.inBuffer.shift();else{if(!(l>=10))break;var u,$,p=_sliceInstanceProperty(u=a.msg).call(u,0,l);c.message.msg=p,c.message.end=!1,this.inBuffer[0].message.msg=_sliceInstanceProperty($=a.msg).call($,l),this.inBuffer[0].message.index++}var f=_JSON$stringify(c.message),d=f.length;e-=d+s,r+=d+s,t.push(_objectSpread2(_objectSpread2({},c),{},{message:f}))}return{payload:t,payloadSize:r}}},{key:"unshift",value:function(e){this.outBuffer=_concatInstanceProperty(e).call(e,this.outBuffer)}},{key:"get",value:function(){var e,t;return _concatInstanceProperty(e=[]).call(e,_toConsumableArray(this.outBuffer),_toConsumableArray(_mapInstanceProperty(t=this.inBuffer).call(t,(function(e){return _objectSpread2(_objectSpread2({},e),{},{message:_JSON$stringify(e.message)})}))))}},{key:"set",value:function(e){var t=this,r=[],n=[];_forEachInstanceProperty(e).call(e,(function(e){isOutBufferItem(e)?t.outBuffer.push(e):(e.message||(e.message=""),t.inBuffer.push(_objectSpread2(_objectSpread2({},e),{},{message:JSON.parse(e.message)})))})),this.outBuffer=_concatInstanceProperty(r).call(r,this.outBuffer),this.inBuffer=_concatInstanceProperty(n).call(n,this.inBuffer)}},{key:"isEmpty",value:function(){return 0===this.inBuffer.length&&0===this.outBuffer.length}}])}(),longStringReportor=new LongStringReportor,HARDCODE_UPLOAD_MAX_LIMIT=5e5,HARDCODE_UPLOAD_MIN_LIMIT=5e4,DEFAULT_UPLOAD_LIMIT=5e5,HTTP_REQUEST_TIMEOUT=1e4,REPORT_INTERVAL=2e3,defaultCommonStats={product_line:"rtc",report_version:"5",os:"web",user_agent:isSSR()?"":null===(_navigator=navigator)||void 0===_navigator?void 0:_navigator.userAgent,platform:"web",product:"webrtc",app_state:"active"},REPORT_DB_BUFFER_STORE="LogReportor",DEBUG$1="undefined"!=typeof window&&(_includesInstanceProperty(_context$2=window.location.search).call(_context$2,"_rtc_debug_")||(null===(_window$localStorage$1=window.localStorage)||void 0===_window$localStorage$1?void 0:_window$localStorage$1.getItem("_rtc_debug_"))),ReportorDBBuffer=function(){return _createClass((function e(t){_classCallCheck(this,e),_defineProperty(this,"_buffer",void 0),this._buffer=new IndexedDBInterface(t)}),[{key:"set",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._buffer.put2String(t,r);case 2:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"get",value:(e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],e.prev=1,e.next=4,this._buffer.get4String(t);case 4:n=e.sent,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(1);case 9:return e.abrupt("return",null!==(r=n)&&void 0!==r?r:[]);case 10:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(t){return e.apply(this,arguments)})}]);var e,t}(),Reportor=function(){return _createClass((function e(){var t=this;_classCallCheck(this,e),_defineProperty(this,"reportCommon",defaultCommonStats),_defineProperty(this,"reportIds",new _Map),_defineProperty(this,"dataBuffer",[]),_defineProperty(this,"reportorList",[]),_defineProperty(this,"dbBuffer",void 0),_defineProperty(this,"posting",!1),_defineProperty(this,"sucSendTimer",void 0),_defineProperty(this,"preSucTime",0),_defineProperty(this,"errSendTimer",void 0),_defineProperty(this,"errSendDelay",100),_defineProperty(this,"_logServerUrl",void 0),_defineProperty(this,"_retryCount",0),_defineProperty(this,"_reportLimit",DEFAULT_UPLOAD_LIMIT),_defineProperty(this,"_disableTimeout",!1),isSSR()||(window.addEventListener("beforeunload",(function(){clearTimeout(t.errSendTimer),clearTimeout(t.sucSendTimer),t.send(void 0,!0)})),document.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState?t.setCommonStats({app_state:"active"}):"hidden"===document.visibilityState&&t.setCommonStats({app_state:"background"})})),DEBUG$1&&(window.__rtc_debug_reportor__=this)),CoreConfig.on("UPLOAD_REPORT_LIMIT",(function(e){t.setReportLimit(e)})),CoreConfig.on("ENABLE_REPORT_IDB_BUFFER",(function(e){e&&t.enableIndexedDBBuffer()})),_setTimeout((function(){t.reportorList.push(consoleReportor),t.reportorList.push(longStringReportor)}))}),[{key:"setUrl",value:function(e){this._logServerUrl=e}},{key:"setCommonStats",value:function(e){this.reportCommon=_Object$assign(this.reportCommon,e)}},{key:"getCommonStats",value:function(){return this.reportCommon}},{key:"setReportLimit",value:function(e){this._reportLimit=Math.max(e,HARDCODE_UPLOAD_MIN_LIMIT),this._reportLimit=Math.min(e,HARDCODE_UPLOAD_MAX_LIMIT)}},{key:"getReportId",value:function(e){var t;e=null!==(t=e)&&void 0!==t?t:"__global__",this.reportIds.has(e)||this.reportIds.set(e,0);var r=this.reportIds.get(e);return void 0===r&&(reportGlobalError("no reportId in reportId map with engine-session-id ".concat(e),0,{}),r=0),this.reportIds.set(e,r+1),r}},{key:"push",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])this.send(e);else{var t,r=null!==(t=e.engine_session_id)&&void 0!==t?t:"__global__";this.reportIds.has(r)||this.reportIds.set(r,0),this.dataBuffer.push(e),!this.posting&&!this.errSendTimer&&_Date$now()-this.preSucTime>2e3&&(clearTimeout(this.sucSendTimer),this.send())}}},{key:"enableIndexedDBBuffer",value:function(){var e,t=this;this.dbBuffer||(this.dbBuffer=new ReportorDBBuffer("ReportorDBBuffer"),this.dbBuffer.get(REPORT_DB_BUFFER_STORE).then((function(e){_forEachInstanceProperty(e).call(e,(function(e){t.push(e)}))})),_forEachInstanceProperty(e=this.reportorList).call(e,(function(e){var r;null===(r=t.dbBuffer)||void 0===r||r.get(e.name).then((function(t){e.set(t)}))})))}},{key:"backup",value:function(){var e=this;try{var t,r;null===(t=this.dbBuffer)||void 0===t||t.set(_toConsumableArray(this.dataBuffer),REPORT_DB_BUFFER_STORE),_forEachInstanceProperty(r=this.reportorList).call(r,(function(t){var r;null===(r=e.dbBuffer)||void 0===r||r.set(_toConsumableArray(t.get()),t.name)}))}catch(e){reportGlobalError("Error when save log into IDB",-1,e)}}},{key:"unshift",value:function(e){var t,r;this.dataBuffer=_concatInstanceProperty(t=e[0]).call(t,this.dataBuffer),_forEachInstanceProperty(r=this.reportorList).call(r,(function(t,r){var n;t.unshift(null!==(n=e[r+1])&&void 0!==n?n:[])}))}},{key:"_splice",value:function(){var e,t,r=this,n=findSizeIndex$1(this.dataBuffer,this._reportLimit);0===n&&this.dataBuffer.length>0&&(this._reportLimit=_JSON$stringify(this.dataBuffer[0]).length+10,n=1,reportGlobalError("update report limit to ".concat(this._reportLimit),0,null));var o=_spliceInstanceProperty(e=this.dataBuffer).call(e,0,n),a=_JSON$stringify(o).length,i=[o],s=this._reportLimit-a;return _forEachInstanceProperty(t=this.reportorList).call(t,(function(e){var t=_spliceInstanceProperty(e).call(e,s),n=t.payload,o=t.payloadSize;_forEachInstanceProperty(n).call(n,(function(e){var t,n,o;void 0===e.report_id&&(e.report_id=r.getReportId(e.engine_session_id),!isSSR()&&window.__onRTCReport&&(null===(t=(n=window).__onRTCReport)||void 0===t||t.call(n,null!==(o=e.engine_session_id)&&void 0!==o?o:"global",e,r.getCommonStats())))})),i.push(n),s-=o})),i}},{key:"send",value:(e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n,o,a,i,s,l,c,u,$,p;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.backup(),o=_reduceInstanceProperty(n=this.reportorList).call(n,(function(e,t){return e&&t.isEmpty()}),!0),(t||this.dataBuffer.length||!o)&&this._logServerUrl){e.next=4;break}return e.abrupt("return");case 4:if(t||(this.posting=!0),a=[],t||(a=this._splice()),i=DEBUG$1,s={data:t||_flatInstanceProperty(a).call(a),header:_objectSpread2(_objectSpread2({},this.reportCommon),{},{http_retry_count:this._retryCount}),from:"web",os:"web",version:"1"},l={method:"POST",body:i?_JSON$stringify(s):pako$1.gzip(_JSON$stringify(s))},!this._disableTimeout)try{c=new AbortController,l.signal=c.signal,_setTimeout((function(){c.abort()}),HTTP_REQUEST_TIMEOUT)}catch(e){console.warn("AbortController is not supported"),this._disableTimeout=!0}return i||(l.headers={"Content-Encoding":"gzip","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}),p=null,e.prev=13,e.next=16,fetch(this._logServerUrl,l);case 16:if(200!==(u=e.sent).status&&304!==u.status){e.next=23;break}return e.t0=JSON,e.next=21,u.text();case 21:e.t1=e.sent,p=e.t0.parse.call(e.t0,e.t1);case 23:e.next=28;break;case 25:e.prev=25,e.t2=e.catch(13),$=e.t2;case 28:t||(this.posting=!1),p&&0===p.StatusCode?t||r||this.sucSend():(_setTimeout((function(){var e,t,r,n;reportGlobalError(_concatInstanceProperty(e="reportor post error, resJSON:".concat(null===(t=p)||void 0===t?void 0:t.toString()," err:")).call(e,$),null!==(r=null===(n=u)||void 0===n?void 0:n.status)&&void 0!==r?r:-1,$)}),0),t?this.send(t):(this.unshift(a),r?this.send():this.errSend()));case 30:case"end":return e.stop()}}),e,this,[[13,25]])}))),function(t,r){return e.apply(this,arguments)})},{key:"_getDataBufferTotalSize",value:function(){var e;return _reduceInstanceProperty(e=this.dataBuffer).call(e,(function(e,t){return e+_JSON$stringify(t).length}),0)}},{key:"sucSend",value:function(){var e=this;this.errSendDelay=100,this._retryCount=0,this.preSucTime=_Date$now();var t=this._getDataBufferTotalSize()>2*DEFAULT_UPLOAD_LIMIT?REPORT_INTERVAL/2:REPORT_INTERVAL;this.sucSendTimer=_setTimeout((function(){return e.send()}),t)}},{key:"errSend",value:function(){var e=this;this.errSendTimer=_setTimeout((function(){e.send(),delete e.errSendTimer}),this.errSendDelay),this.errSendDelay*=2,this._retryCount++}}]);var e}();function findSizeIndex$1(e,t){for(var r=0,n=0;n<e.length;n++)if((r+=_JSON$stringify(e[n]).length)>t)return n;return e.length}var commonReportor=new Reportor,Monitor=function(){return _createClass((function e(t){_classCallCheck(this,e),_defineProperty(this,"modifyIds",{pre_connection:!1}),this.id=t}),[{key:"report",value:function(e,t,r){var n,o,a,i=_objectSpread2(_objectSpread2(_objectSpread2({event_key:e,rtc_timestamp:_Date$now()},this.modifyIds),t),{},{report_id:commonReportor.getReportId(this.modifyIds.engine_session_id)});("object"===_typeof(r)&&_Object$keys(r).length>0&&(i.common_extra_info=_JSON$stringify(r)),_forEachInstanceProperty(n=_Object$keys(i)).call(n,(function(e){void 0!==i[e]&&""!==i[e]||delete i[e]})),!isSSR()&&window.__onRTCReport)&&(null===(o=(a=window).__onRTCReport)||void 0===o||o.call(a,this.modifyIds.engine_session_id,i,commonReportor.getCommonStats()));"UT"!=={}.VITE_TEST&&commonReportor.push(i)}},{key:"reportLog",value:function(e){var t=_objectSpread2(_objectSpread2({event_key:"rtc_invoke_status",sdk_api_name:"console_log",rtc_timestamp:_Date$now()},this.modifyIds),{},{message:e});consoleReportor.push(t)}},{key:"reportLongString",value:function(e,t){var r=_objectSpread2(_objectSpread2({event_key:"rtc_invoke_status",sdk_api_name:"sdk_long_string_".concat(e),rtc_timestamp:_Date$now()},this.modifyIds),{},{message:t});longStringReportor.push(r)}},{key:"set",value:function(e){this.modifyIds=_Object$assign(this.modifyIds,e)}},{key:"destroy",value:function(){}}])}(),RESET_DURATION=36e5,MessageReportor=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,"_preTime",_Date$now()),_defineProperty(this,"_one2oneNum",0),_defineProperty(this,"_one2manyNum",0),_defineProperty(this,"_one2oneMsgCache",new _Map),_defineProperty(this,"_one2manyMsgCache",new _Map),_defineProperty(this,"roomId",""),_defineProperty(this,"userId",""),_defineProperty(this,"rtsSessionId",""),_defineProperty(this,"logger",void 0),_defineProperty(this,"serverUrl","server"),this.id=t,this.logger=new Logger("MessageReportor",1)}return _createClass(e,[{key:"needReport",value:function(t){return!!e.config&&(_Date$now()-this._preTime>=RESET_DURATION&&(this._preTime=_Date$now(),this._one2oneNum=0,this._one2manyNum=0),"one2one"===t&&this._one2oneNum<e.config.max_one2one_fpt_per_hour&&Math.random()<=e.config.one2one_fpt_ratio/100||"one2many"===t&&this._one2manyNum<e.config.max_one2many_fpt_per_hour&&Math.random()<=e.config.one2many_fpt_ratio/100)}},{key:"cacheP2PMsg",value:function(t){var r;this._one2oneMsgCache.set(t.msg_id,_objectSpread2({config_version:(null===(r=e.config)||void 0===r?void 0:r.version)||""},t))}},{key:"updateP2PMsg",value:function(e,t){var r=this._one2oneMsgCache.get(e);r&&this._one2oneMsgCache.set(e,_objectSpread2(_objectSpread2({},r),t))}},{key:"cacheCustomMsg",value:function(t){var r;this._one2manyMsgCache.set(t.msg_id,_objectSpread2({config_version:(null===(r=e.config)||void 0===r?void 0:r.version)||""},t))}},{key:"updateOne2ManyMsg",value:function(e,t){var r=this._one2manyMsgCache.get(e);r&&this._one2manyMsgCache.set(e,_objectSpread2(_objectSpread2({},r),t))}},{key:"reportP2PMsg",value:function(e){var t,r=this._one2oneMsgCache.get(e);r&&(this.logger.info("reportP2PMsg",r.type,_JSON$stringify(r)),null===(t=getMonitor(this.id))||void 0===t||t.report("rts_message",r))}},{key:"reportOne2ManyMsg",value:function(e){var t,r=this._one2manyMsgCache.get(e);r&&(this.logger.info("reportOne2ManyMsg",r.type,_JSON$stringify(r)),null===(t=getMonitor(this.id))||void 0===t||t.report("rts_message",r))}},{key:"reportMsgRecv",value:function(t){var r,n;t.config_version=(null===(r=e.config)||void 0===r?void 0:r.version)||"",this.logger.info("reportMsgRecv",t.type,_JSON$stringify(t)),null===(n=getMonitor(this.id))||void 0===n||n.report("rts_message",t)}},{key:"destroy",value:function(){this._one2manyNum=0,this._one2oneNum=0,this._one2manyMsgCache.clear(),this._one2oneMsgCache.clear(),this._preTime=_Date$now(),this.roomId="",this.userId="",this.rtsSessionId=""}}])}();_defineProperty(MessageReportor,"config",void 0);var globalMonitor=new Monitor("global"),reportGlobalError=function(e,t,r){globalMonitor.report("rtc_error",{message:e,error_code:t},r)};function reportGlobalLog(e){globalMonitor.reportLog(e)}var _context$1,monitorMap=new _Map,getMonitor=function(e){return monitorMap.get(e)},ENABLE_CONSOLE_UPLOAD="undefined"!=typeof window&&_includesInstanceProperty(_context$1=window.location.search).call(_context$1,"_rtc_upload_console_"),ConsoleReportor=function(){return _createClass((function e(){var t=this;_classCallCheck(this,e),_defineProperty(this,"name","ConsoleReportor"),_defineProperty(this,"_uuid","".concat(Math.floor(899*Math.random())+100)),_defineProperty(this,"_consoleReportId",0),_defineProperty(this,"_engineReportIdMap",new _Map),_defineProperty(this,"_enabled","NULL"),_defineProperty(this,"_consoleCutLength",CoreConfig.getParameter("UPLOAD_CONSOLE_LENGTH_CUT")),_defineProperty(this,"buffer",[]),ENABLE_CONSOLE_UPLOAD&&_setTimeout((function(){t.switchOn()}),0),CoreConfig.on("UPLOAD_CONSOLE_ON",(function(e){e?t.switchOn():t.turnOff()})),CoreConfig.on("UPLOAD_CONSOLE_LENGTH_CUT",(function(e){t._consoleCutLength=e}))}),[{key:"enabled",get:function(){return"OFF"!==this._enabled}},{key:"switchOn",value:function(){"NULL"===this._enabled&&(console.log("[LoggerReportor.constructor] console upload switch ON"),this._enabled="ON")}},{key:"turnOff",value:function(){"NULL"===this._enabled&&(console.log("[LoggerReportor.constructor] console upload switch OFF"),this._enabled="OFF",this.buffer=[])}},{key:"getEngineConsoleId",value:function(e){var t,r=null!==(t=this._engineReportIdMap.get(e))&&void 0!==t?t:0;return this._engineReportIdMap.set(e,r+1),r}},{key:"report",value:function(e,t,r,n,o,a,i,s,l){var c,u,$,p,f,d,_,y,h,g,b,m=this;if("OFF"!==this._enabled){var S=getMonitor(t),E=this._consoleReportId++,O=this.getEngineConsoleId(t),v=shallowJson(l,this._consoleCutLength),T=_toConsumableArray(l),I="".concat(s).replace(/%o|%s/gi,(function(){return shallowJson([T.shift()],m._consoleCutLength)})),P=_concatInstanceProperty(c=_concatInstanceProperty(u=_concatInstanceProperty($=_concatInstanceProperty(p=_concatInstanceProperty(f=_concatInstanceProperty(d=_concatInstanceProperty(_=_concatInstanceProperty(y=_concatInstanceProperty(h=_concatInstanceProperty(g=_concatInstanceProperty(b="[".concat(this._uuid,"-")).call(b,E,"][")).call(g,t,"-")).call(h,O,"]-")).call(y,r,"-")).call(_,e,"[")).call(d,n,"]")).call(f,o,"[")).call(p,a,".")).call($,i,"] ")).call(u,I," ")).call(c,v);S?S.reportLog(P):reportGlobalLog(P)}}},{key:"push",value:function(e){"OFF"!==this._enabled&&this.buffer.push(e)}},{key:"splice",value:function(e){var t;if("ON"!==this._enabled)return{payload:[],payloadSize:0};var r=findSizeIndex(this.buffer,e),n=r.index,o=r.size;return{payload:_spliceInstanceProperty(t=this.buffer).call(t,0,n),payloadSize:o}}},{key:"unshift",value:function(e){this.buffer=_concatInstanceProperty(e).call(e,this.buffer)}},{key:"get",value:function(){return this.buffer}},{key:"set",value:function(e){this.buffer=_concatInstanceProperty(e).call(e,this.buffer)}},{key:"isEmpty",value:function(){return"OFF"===this._enabled||0===this.buffer.length}}])}();function shallowJson(e,t){return _mapInstanceProperty(e).call(e,(function(e){var r="";try{if("string"==typeof e)return e;if(void 0===e)return"undefined";if(null===e)return"null";if(e instanceof MediaStreamTrack)return mediaTrackStringify(e);if(e instanceof MediaStream)return mediaStreamStringify(e);if(e instanceof RTCRtpSender)return mediaSenderStringify(e);if(e instanceof RTCRtpReceiver)return mediaReceiverStringify(e);if(e instanceof RTCRtpTransceiver)return mediaTransceiverStringify(e);r=_JSON$stringify(e)}catch(t){r=e.toString()}return r&&r.length>=t&&(r=_sliceInstanceProperty(r).call(r,0,t)),r})).join(", ")}function findSizeIndex(e,t){for(var r=0,n=0;n<e.length;n++){var o=_JSON$stringify(e[n]).length;if((r+=o)>t)return{index:n,size:r-o}}return{index:e.length,size:r}}var _context,_window$localStorage,consoleReportor=new ConsoleReportor,HEAD_TEXT="[VERTC]",baseColor="#0050b3",colorMap=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"DEBUG","rgba(0, 0, 0, 0)")," INFO","rgba(93, 173, 226, 0)")," WARN","rgba(255, 119, 0, 0.3)"),"ERROR","rgba(255, 0, 0, 0.3)")," SUCC","rgba(0, 119, 0, 0.3)"),DEBUG="undefined"!=typeof window&&(_includesInstanceProperty(_context=window.location.search).call(_context,"_rtc_debug_")||(null===(_window$localStorage=window.localStorage)||void 0===_window$localStorage?void 0:_window$localStorage.getItem("_rtc_debug_"))),Logger=function(){return _createClass((function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"global";_classCallCheck(this,e),_defineProperty(this,"indent",void 0),_defineProperty(this,"module",void 0),_defineProperty(this,"_engineId",void 0),this.module=t,this.indent=r,this._engineId=n}),[{key:"_print",value:function(e,t){for(var r,n,o,a,i,s,l,c,u=arguments.length,$=new Array(u>2?u-2:0),p=2;p<u;p++)$[p-2]=arguments[p];var f=$.shift();try{var d,_,y,h,g,b=_concatInstanceProperty(d=[]).call(d,$),m="".concat(f).replace(/%o/gi,(function(){var e=b.shift();return _JSON$stringify(e)}));iDB.set(_concatInstanceProperty(_=_concatInstanceProperty(y=_concatInstanceProperty(h=_concatInstanceProperty(g="".concat(HEAD_TEXT,"[")).call(g,this.module,".")).call(h,t,"] ")).call(y,m," ")).call(_,_mapInstanceProperty(b).call(b,(function(e){return _JSON$stringify(e)})).join(", ")))}catch(e){}for(var S="",E=0;E<this.indent;E++)S+=" ";var O=getTimestamp();consoleReportor.report(HEAD_TEXT,this._engineId,O,e,S,this.module,t,f,$),DEBUG&&(r=console).log.apply(r,_concatInstanceProperty(n=[_concatInstanceProperty(o=_concatInstanceProperty(a=_concatInstanceProperty(i=_concatInstanceProperty(s=_concatInstanceProperty(l=_concatInstanceProperty(c="%c".concat(O,"-")).call(c,HEAD_TEXT,"%c[")).call(l,e,"]%c")).call(s,S,"[")).call(i,this.module,".")).call(a,t,"] ")).call(o,f),"color:".concat(baseColor,";"),"background-color:".concat(colorMap[e],";"),"color:".concat(baseColor,";")]).call(n,$))}},{key:"print",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=[" INFO",e]).call(t,n))}},{key:"debug",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=["DEBUG",e]).call(t,n))}},{key:"info",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=[" INFO",e]).call(t,n))}},{key:"warn",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=[" WARN",e]).call(t,n))}},{key:"error",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=["ERROR",e]).call(t,n))}},{key:"success",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this._print.apply(this,_concatInstanceProperty(t=[" SUCC",e]).call(t,n))}}])}(),getTimestamp=function(){var e,t,r=new Date;return _concatInstanceProperty(e="".concat(r.toTimeString().split(" ")[0],":")).call(e,_padStartInstanceProperty(t=r.getMilliseconds().toString()).call(t,3,"0"))},EffectBeautyMode=function(e){return e[e.EFFECT_WHITE_MODE=0]="EFFECT_WHITE_MODE",e[e.EFFECT_SMOOTH_MODE=1]="EFFECT_SMOOTH_MODE",e[e.EFFECT_SHARPEN_MODE=2]="EFFECT_SHARPEN_MODE",e}(EffectBeautyMode||{}),BackgroundMode=function(e){return e.BACKGROUND_BLUR="blur",e.BACKGROUND_IMAGE="image-url",e.BACKGROUND_COLOR="color",e.BACKGROUND_VIDEO="video-url",e}(BackgroundMode||{}),BackgroundAIModelType=function(e){return e.PERFORMANCE="fast",e.QUALITY="accurate",e}(BackgroundAIModelType||{}),BackgroundAIBackend=function(e){return e.CPU="cpu",e.GPU="gpu",e}(BackgroundAIBackend||{});const cdn="https://sf-web-ar.bytepluscdn.com/obj/web-ar-resources-sg/ies/webar/1.0.0.191/87f23f8/3.6.1-rc.0/package/dist/index.js",auth_server="https://cv-tob.byteintl.com/api/v2/webardeliver/verify";var _Class,DEFAULT_SDK_URL=cdn,DEFAULT_AUTH_URL=auth_server,TIME_OUT_MESSAGE="Load WebAR SDK timeout",INIT_FAILED_CODE=100,DEFAULT_FRAMERATE=15;function _callSuper(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?_Reflect$construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}var __defProp=_Object$defineProperty,__getOwnPropDesc=_Object$getOwnPropertyDescriptor,__decorateClass=function(e,t,r,n){for(var o,a=n>1?void 0:n?__getOwnPropDesc(t,r):t,i=e.length-1;i>=0;i--)(o=e[i])&&(a=(n?o(t,r,a):o(a))||a);return n&&a&&__defProp(t,r,a),a},logger=new Logger("RTCBeautyExtension",1);function getBrowser(){var e="none";return null!==window.navigator.userAgent.match("Firefox")?e="mozilla":null!==window.navigator.userAgent.match("Chrome")?(e="chrome-stable",null!==window.navigator.userAgent.match("Electron")&&(e="electron")):(null!==window.navigator.userAgent.match("Safari")||null!==window.navigator.userAgent.match("AppleWebKit"))&&(e="safari"),e}var _RTCBeautyExtension2=(_Class=function(){function e(){var t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(_classCallCheck(this,e),_defineProperty(r=_callSuper(this,e),"name","RTCBeautyExtension"),_defineProperty(r,"version","4.66.21"),_defineProperty(r,"_enable",!1),_defineProperty(r,"_session",void 0),_defineProperty(r,"canvas",void 0),_defineProperty(r,"_enableBeauty",!1),_defineProperty(r,"_enableBackground",!1),_defineProperty(r,"_fps",DEFAULT_FRAMERATE),_defineProperty(r,"_backgroundBackend",BackgroundAIBackend.CPU),_defineProperty(r,"_backgroundAIModelType",BackgroundAIModelType.QUALITY),_defineProperty(r,"_backgroundMode",BackgroundMode.BACKGROUND_BLUR),_defineProperty(r,"_backgroundUrl",""),_defineProperty(r,"_backgroundVideoUrl",""),_defineProperty(r,"_backgroundColor",void 0),_defineProperty(r,"_beautyDefaultValue",{skinSmoothingSharpness:.5,whitenAmount:.5,skinSmoothingAmount:.5}),_defineProperty(r,"_radius",20),_defineProperty(r,"_preTrack",null),_RTCBeautyExtension2._sdkUrl=n.sdkUrl||DEFAULT_SDK_URL,_RTCBeautyExtension2._sdkAuthServer=n.sdkAuthServer||DEFAULT_AUTH_URL,_RTCBeautyExtension2._authFileUrl=n.authFileUrl||"",n.aiBackend===BackgroundAIBackend.GPU)&&("undefined"!=typeof WebGL2RenderingContext&&("undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(16,16).getContext("webgl2")&&(r._backgroundBackend=BackgroundAIBackend.GPU):r._backgroundBackend=BackgroundAIBackend.GPU));return r._backgroundAIModelType=null!==(t=n.aiModelType)&&void 0!==t?t:BackgroundAIModelType.QUALITY,r.on("stop",(function(){r._preTrack&&(r._preTrack=null)})),r}return _inherits(e,PreProcessingExtension),_createClass(e,[{key:"initWebArSDK",value:(f=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==_RTCBeautyExtension2.WebARMainSDK){e.next=3;break}return e.next=3,_RTCBeautyExtension2.loadWebARSDK();case 3:_RTCBeautyExtension2.WebARMainSDK&&!this._session&&(this.canvas=document.createElement("canvas"),this._session=_RTCBeautyExtension2.WebARMainSDK.createSession({canvas:this.canvas,authorization:{file:_RTCBeautyExtension2._authFileUrl||"",serviceEndpoint:_RTCBeautyExtension2._sdkAuthServer},__videoPlayerSettings:{shouldAttachVideoElementToDOM:"safari"===getBrowser()}}),this._session.virtualBackgroundController.blurSettings.radius=this._radius,this._session.virtualBackgroundController.updatePreferredPortraitMattingInferenceBackend(this._backgroundBackend),this._session.virtualBackgroundController.updatePortraitMattingModelType(this._backgroundAIModelType),this._session.pipelineDriver="worker","safari"===getBrowser()&&this._session.events.addEventListener("frameProcessingWillBegin",(function(e){t._setCanvasSize(e.width,e.height)})));case 4:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"init",value:(p=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var r,n,o,a,i,s;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null===(r=this.monitor)||void 0===r||r.report("rtc_invoke_status",{sdk_api_name:"RTCBeautyExtension.init.params",message:_JSON$stringify({hasAuthFile:!!_RTCBeautyExtension2._authFileUrl,aiBackend:this._backgroundBackend,aiModelType:this._backgroundAIModelType}),error_code:0}),e.next=3,this.initWebArSDK();case 3:return e.next=5,null===(n=this._session)||void 0===n?void 0:n.clearEffect();case 5:i=null==t?void 0:t.videoCaptureConfig,this._fps=i?"number"==typeof(null==i?void 0:i.frameRate)?(null==i?void 0:i.frameRate)||DEFAULT_FRAMERATE:(null==i||null===(o=i.frameRate)||void 0===o?void 0:o.ideal)||DEFAULT_FRAMERATE:DEFAULT_FRAMERATE,null===(a=this.logger)||void 0===a||a.print("init fps",this._fps),this._session&&(this._session.frameRateControl={type:"preferred",frameRate:this._fps}),"safari"===getBrowser()&&(s=this.canvas)&&(s.style.width="1px",s.style.height="1px",s.style.position="fixed",s.style.top="0",s.style.left="0",s.style.opacity="0",s.style.pointerEvents="none",s.style.zIndex="-9999",document.body.appendChild(s));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"checkCompatibility",value:($=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="",e.prev=1,e.next=4,this.initWebArSDK();case 4:return e.abrupt("return",{isCompatible:!0,reasons:[],message:t});case 7:return e.prev=7,e.t0=e.catch(1),t=(null===e.t0||void 0===e.t0?void 0:e.t0.toString())||(null===e.t0||void 0===e.t0?void 0:e.t0.stack)||"",e.abrupt("return",{isCompatible:!1,reasons:[INIT_FAILED_CODE],message:t});case 11:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(){return $.apply(this,arguments)})},{key:"effect",value:(u=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,r){var n,o,a,i,s;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r||t.mediaTrack,(this._enableBeauty||this._enableBackground)&&this.canvas){e.next=3;break}return e.abrupt("return",n);case 3:if("video"!==t.mediaType||t.streamIndex!==StreamIndex.STREAM_INDEX_MAIN){e.next=12;break}if(o=n.getSettings(),a=o.width,i=o.height,a&&i&&"safari"!==getBrowser()&&this._setCanvasSize(a,i),this._preTrack===n){e.next=11;break}return e.next=9,null===(s=this._session)||void 0===s?void 0:s.switchVideoSource({type:"video-stream",stream:new MediaStream([n])});case 9:this._preTrack=n,this.maybeRestartSession();case 11:return e.abrupt("return",this.canvas.captureStream(this._fps).getVideoTracks()[0]);case 12:return e.abrupt("return",n);case 13:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"enable",value:function(){return this.enableBeauty()}},{key:"enableBeauty",value:(c=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!this._enableBeauty&&!this._enableBackground,this._enableBeauty=!0,_forEachInstanceProperty(t=_Object$keys(this._beautyDefaultValue)).call(t,(function(e){n._session&&(n._session.faceBeautyController.settings[e]=n._beautyDefaultValue[e])})),this.maybeRestartSession(),this._preTrack&&!r){e.next=6;break}return e.abrupt("return",new _Promise((function(e,t){n.emit("reset-video-effect",e,t)})));case 6:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"disable",value:function(){return this.disableBeauty()}},{key:"disableBeauty",value:(l=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this._enableBeauty&&!this._enableBackground,this._enableBeauty=!1,this.maybeStopSession(),_forEachInstanceProperty(t=_Object$keys(this._beautyDefaultValue)).call(t,(function(e){n._session&&(n._session.faceBeautyController.settings[e]=0)})),this._preTrack&&!r){e.next=6;break}return e.abrupt("return",new _Promise((function(e,t){n.emit("reset-video-effect",e,t)})));case 6:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"enableVirtualBackground",value:(s=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!this._enableBeauty&&!this._enableBackground,this._enableBackground=!0,e.next=4,this._updateVirtualBackground();case 4:if(this.maybeRestartSession(),this._preTrack&&!t){e.next=7;break}return e.abrupt("return",new _Promise((function(e,t){r.emit("reset-video-effect",e,t)})));case 7:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"disableVirtualBackground",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r,n=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!this._enableBeauty&&this._enableBackground,this._enableBackground=!1,null===(t=this._session)||void 0===t||t.virtualBackgroundController.updateVirtualBackground(null),this.maybeStopSession(),this._preTrack&&!r){e.next=6;break}return e.abrupt("return",new _Promise((function(e,t){n.emit("reset-video-effect",e,t)})));case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"setBeautyIntensity",value:function(e,t){switch(t=Math.min(1,Math.max(0,t)),e){case EffectBeautyMode.EFFECT_SHARPEN_MODE:this._beautyDefaultValue.skinSmoothingSharpness=t,this._session&&(this._session.faceBeautyController.settings.skinSmoothingSharpness=t);break;case EffectBeautyMode.EFFECT_WHITE_MODE:this._beautyDefaultValue.whitenAmount=t,this._session&&(this._session.faceBeautyController.settings.whitenAmount=t);break;case EffectBeautyMode.EFFECT_SMOOTH_MODE:this._beautyDefaultValue.skinSmoothingAmount=t,this._session&&(this._session.faceBeautyController.settings.skinSmoothingAmount=t)}}},{key:"setBackgroundMode",value:function(e){this._backgroundMode=e,this._enableBackground&&this._updateVirtualBackground()}},{key:"getBackgroundImage",value:function(){return this._backgroundUrl}},{key:"loadBackgroundImage",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._session){e.next=2;break}return e.abrupt("return",_Promise.reject(new Error("init extension first")));case 2:if(this._backgroundUrl=t,!this._enableBackground){e.next=6;break}return e.next=6,this._updateVirtualBackground();case 6:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setBackgroundBlurRadius",value:function(e){"number"==typeof e&&e>=0&&(this._radius=e,this._session&&(this._session.virtualBackgroundController.blurSettings.radius=e))}},{key:"setBackgroundColor",value:function(e){var t,r=[];if(/^#[0-9A-Fa-f]{8}$/.test(e))r=[_parseInt$1(e.substring(1,3),16),_parseInt$1(e.substring(3,5),16),_parseInt$1(e.substring(5,7),16),_parseInt$1(e.substring(7,9),16)/255];else if(/^(rgba|RGBA)/.test(e)){var n;r=_mapInstanceProperty(n=_sliceInstanceProperty(e).call(e,5,e.length-1).split(",")).call(n,(function(e){return Number(e)}))}return!!(4===r.length&&_everyInstanceProperty(t=[r[0],r[1],r[2]]).call(t,(function(e){return e>=0&&e<=255}))&&r[3]>=0&&r[3]<=1)&&(this._backgroundColor={r:r[0]/255,g:r[1]/255,b:r[2]/255,a:Number(r[3].toFixed(3))},this._enableBackground&&this._updateVirtualBackground(),!0)}},{key:"loadBackgroundVideo",value:(o=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._session){e.next=2;break}return e.abrupt("return",_Promise.reject(new Error("init extension first")));case 2:if(this._backgroundVideoUrl=t,!this._enableBackground){e.next=6;break}return e.next=6,this._updateVirtualBackground();case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getBackgroundVideo",value:function(){return this._backgroundVideoUrl}},{key:"setAIModelType",value:function(e){var t;this._backgroundAIModelType=e,null===(t=this._session)||void 0===t||t.virtualBackgroundController.updatePortraitMattingModelType(e)}},{key:"applyConstraints",value:function(e,t){var r=t.width,n=t.height;this.canvas&&e===StreamIndex.STREAM_INDEX_MAIN&&"number"==typeof r&&"number"==typeof n&&(this.canvas.width=r,this.canvas.style.width="".concat(r,"px"),this.canvas.height=n,this.canvas.style.height="".concat(n,"px"))}},{key:"isSupported",value:(n=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkCompatibility();case 2:return t=e.sent,e.abrupt("return",t.isCompatible);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"isOpen",value:function(){return this._enable}},{key:"destroy",value:function(){var e;null===(e=this._session)||void 0===e||e.dispose()}},{key:"_setCanvasSize",value:function(e,t){!this.canvas||this.canvas.width===e&&this.canvas.height===t||(this.canvas.width=e,this.canvas.style.width="".concat(e,"px"),this.canvas.height=t,this.canvas.style.height="".concat(t,"px"))}},{key:"_updateVirtualBackground",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r={type:this._backgroundMode},this._backgroundMode!==BackgroundMode.BACKGROUND_IMAGE){e.next=9;break}if(!this._backgroundUrl){e.next=6;break}r.url=this._backgroundUrl,e.next=7;break;case 6:case 22:return e.abrupt("return",!1);case 7:case 15:e.next=23;break;case 9:if(this._backgroundMode!==BackgroundMode.BACKGROUND_COLOR){e.next=17;break}if(!this._backgroundColor){e.next=14;break}r=_objectSpread2(_objectSpread2({},r),this._backgroundColor),e.next=15;break;case 14:return e.abrupt("return");case 17:if(this._backgroundMode!==BackgroundMode.BACKGROUND_VIDEO){e.next=23;break}if(!this._backgroundVideoUrl){e.next=22;break}r.url=this._backgroundVideoUrl,e.next=23;break;case 23:return e.next=25,null===(t=this._session)||void 0===t?void 0:t.virtualBackgroundController.updateVirtualBackground(r);case 25:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"maybeRestartSession",value:function(){var e,t=this;this._session&&((this._enableBeauty||this._enableBackground)&&!this._session.isStarted&&this._preTrack&&(null===(e=this.logger)||void 0===e||e.info("ar","session start"),this._session.start().catch((function(e){var r;null===(r=t.monitor)||void 0===r||r.report("rtc_error",{error_code:-1,message:e.name})}))))}},{key:"maybeStopSession",value:function(){var e,t=this;this._session&&(this._enableBeauty||this._enableBackground||!this._session.isStarted||(null===(e=this.logger)||void 0===e||e.info("ar","session stop"),this._session.stop().catch((function(e){var r;null===(r=t.monitor)||void 0===r||r.report("rtc_error",{error_code:-1,message:e.name})}))))}}],[{key:"loadWebARSDK",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",import(/* webpackIgnore: true */ _RTCBeautyExtension2._sdkUrl).then((function(e){var t=e.ARSDK;_RTCBeautyExtension2.WebARMainSDK=t})).catch((function(e){throw logger.error("load ar sdk error",e),new Error(TIME_OUT_MESSAGE)})));case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]);var t,r,n,o,a,i,s,l,c,u,$,p,f}(),_defineProperty(_Class,"WebARMainSDK",void 0),_defineProperty(_Class,"_sdkUrl",void 0),_defineProperty(_Class,"_sdkAuthServer",DEFAULT_AUTH_URL),_defineProperty(_Class,"_authFileUrl",""),_Class),RTCBeautyExtension=_RTCBeautyExtension2;__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"init",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"checkCompatibility",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"enable",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"enableBeauty",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"disable",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"disableBeauty",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"enableVirtualBackground",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"disableVirtualBackground",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setBeautyIntensity",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setBackgroundMode",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"getBackgroundImage",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"loadBackgroundImage",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setBackgroundBlurRadius",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setBackgroundColor",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"loadBackgroundVideo",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"getBackgroundVideo",1),__decorateClass([reportExtensionApiCall],RTCBeautyExtension.prototype,"setAIModelType",1);export{BackgroundAIBackend,BackgroundAIModelType,BackgroundMode,EffectBeautyMode,RTCBeautyExtension as default};