text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("fs")):"function"==typeof define&&define.amd?define(["exports","fs"],e):e((t=t||self).apmSdk={},t.fs)}(this,function(t,n){"use strict";function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var s=(e.prototype.registryService=function(t){var e=t.name;this.registeredService.has(e)||this.registeredService.set(e,t)},e.prototype.unregistryService=function(t){},e.prototype.getService=function(t,e,n){void 0===n&&(n="[DEFAULT_CATEGORY]");var r=this.servicesIdentifierMap.get(n);if(null==r)r=new Map,this.servicesIdentifierMap.set(n,r);else if(null!=(i=r.get(t)))return i;var o=this.registeredService.get(t);if(null==o)return null;var i=o.serviceFactory(e);return r.set(t,i),i},new e);function e(){this.servicesIdentifierMap=new Map,this.registeredService=new Map}var l=(a.prototype.registerApiProvider=function(t,n,e){this[t]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n(t)},null!=e&&function t(e,n){if(!(n instanceof Object))return n;switch(n.constructor){case Date:return new Date(n.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return n}for(var r in n)n.hasOwnProperty(r)&&(e[r]=t(e[r],n[r]));return e}(this[t],e)},a.prototype.registerInternalService=function(t){s.registryService(t)},a.prototype.getService=function(t,e,n){return s.getService(t,e,n)},new a);function a(){}var c=(u.prototype.get=function(){return null==this.instance&&(this.instance=this.factory()),this.instance},u);function u(t){this.factory=t}var f=(p.prototype.name=function(){return this.name_},p.prototype.configInstance=function(t){return this._config=t,this},p.prototype.config=function(){if(null==this._config)throw new Error("AGCInstance not configurated. call agconnect.instance().configInstance() to configure the agconnect.");return this._config},p.prototype.getService=function(t){return this.repo_.getService(t,this,this.name_)},p),h=new c(function(){return new f(l)});function p(t,e){this._config=null,this.repo_=t,this.name_=e||"[DEFAULT_CATEGORY]"}l.registerApiProvider("instance",function(){return h.get()});var N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(t,e){return t(e={exports:{}},e.exports),e.exports}function Bt(t){try{return!!t()}catch(t){return!0}}function v(t){return E?S.createElement(t):{}}function Gt(t,e){if(!zt(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!zt(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!zt(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!zt(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}function Wt(t){return"Symbol(".concat(void 0===t?"":t,")_",(++T+P).toString(36))}function g(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}var Kt=d(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),y={}.hasOwnProperty,qt=function(t,e){return y.call(t,e)},Yt=!Bt(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),m=d(function(t){var e=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=e)}),zt=(m.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),_=function(t){if(!zt(t))throw TypeError(t+" is not an object!");return t},S=Kt.document,E=zt(S)&&zt(S.createElement),I=!Yt&&!Bt(function(){return 7!=Object.defineProperty(v("div"),"a",{get:function(){return 7}}).a}),w=Object.defineProperty,Jt={f:Yt?Object.defineProperty:function(t,e,n){if(_(t),e=Gt(e,!0),_(n),I)try{return w(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},Xt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Qt=Yt?function(t,e,n){return Jt.f(t,e,Xt(1,n))}:function(t,e,n){return t[e]=n,t},T=0,P=Math.random(),A=d(function(t){var e="__core-js_shared__",n=Kt[e]||(Kt[e]={});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:m.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),b=A("native-function-to-string",Function.toString),R=d(function(t){var i=Wt("src"),e="toString",s=(""+b).split(e);m.inspectSource=function(t){return b.call(t)},(t.exports=function(t,e,n,r){var o="function"==typeof n;o&&(qt(n,"name")||Qt(n,"name",e)),t[e]!==n&&(o&&(qt(n,i)||Qt(n,i,t[e]?""+t[e]:s.join(String(e)))),t===Kt?t[e]=n:r?t[e]?t[e]=n:Qt(t,e,n):(delete t[e],Qt(t,e,n)))})(Function.prototype,e,function(){return"function"==typeof this&&this[i]||b.call(this)})}),Zt=function(r,o,t){if(g(r),void 0===o)return r;switch(t){case 1:return function(t){return r.call(o,t)};case 2:return function(t,e){return r.call(o,t,e)};case 3:return function(t,e,n){return r.call(o,t,e,n)}}return function(){return r.apply(o,arguments)}},O="prototype",C=function(t,e,n){var r,o,i,s,a=t&C.F,c=t&C.G,u=t&C.S,f=t&C.P,l=t&C.B,h=c?Kt:u?Kt[e]||(Kt[e]={}):(Kt[e]||{})[O],p=c?m:m[e]||(m[e]={}),d=p[O]||(p[O]={});for(r in c&&(n=e),n)i=((o=!a&&h&&void 0!==h[r])?h:n)[r],s=l&&o?Zt(i,Kt):f&&"function"==typeof i?Zt(Function.call,i):i,h&&R(h,r,i,t&C.U),p[r]!=i&&Qt(p,r,s),f&&d[r]!=i&&(d[r]=i)};Kt.core=m,C.F=1,C.G=2,C.S=4,C.P=8,C.B=16,C.W=32,C.U=64,C.R=128;function $(t,e,n){t&&!qt(t=n?t:t.prototype,z)&&Y(t,z,{configurable:!0,value:e})}function x(t){var e=m.Symbol||(m.Symbol=Kt.Symbol||{});"_"==t.charAt(0)||t in e||X(e,t,{value:J.f(t)})}function M(t){return Q.call(t).slice(8,-1)}function U(t){if(null==t)throw TypeError("Can't call method on  "+t);return t}function L(t){return Z(U(t))}function te(t){return isNaN(t=+t)?0:(0<t?et:tt)(t)}function ee(t,e){return(t=te(t))<0?rt(t+e,0):ot(t,e)}function ne(a){return function(t,e,n){var r,o=L(t),i=se(o.length),s=ee(n,i);if(a&&e!=e){for(;s<i;)if((r=o[s++])!=r)return!0}else for(;s<i;s++)if((a||s in o)&&o[s]===e)return a||s||0;return!a&&-1}}function D(t){return it[t]||(it[t]=Wt(t))}function j(t,e){var n,r=L(t),o=0,i=[];for(n in r)n!=at&&qt(r,n)&&i.push(n);for(;e.length>o;)qt(r,n=e[o++])&&(~st(i,n)||i.push(n));return i}function re(t){return Object(U(t))}function F(){}function V(t){var e=Dt[t]=ae(Ot[Nt]);return e._k=t,e}function H(t,e){_(t);for(var n,r=function(t){var e=ut(t),n=ft.f;if(n)for(var r,o=n(t),i=lt.f,s=0;o.length>s;)i.call(t,r=o[s++])&&e.push(r);return e}(e=L(e)),o=0,i=r.length;o<i;)he(t,n=r[o++],e[n]);return t}function B(t){var e=Ut.call(this,t=Gt(t,!0));return!(this===Ft&&qt(Dt,t)&&!qt(jt,t))&&(!(e||!qt(this,t)||!qt(Dt,t)||qt(this,xt)&&this[xt][t])||e)}function G(t,e){if(t=L(t),e=Gt(e,!0),t!==Ft||!qt(Dt,e)||qt(jt,e)){var n=At(t,e);return!n||!qt(Dt,e)||qt(t,xt)&&t[xt][e]||(n.enumerable=!0),n}}function W(t){for(var e,n=Rt(L(t)),r=[],o=0;n.length>o;)qt(Dt,e=n[o++])||e==xt||e==Pt||r.push(e);return r}function K(t){for(var e,n=t===Ft,r=Rt(n?jt:L(t)),o=[],i=0;r.length>i;)!qt(Dt,e=r[i++])||n&&!qt(Ft,e)||o.push(Dt[e]);return o}var oe=C,q=d(function(t){function n(t){e(t,r,{value:{i:"O"+ ++o,w:{}}})}var r=Wt("meta"),e=Jt.f,o=0,i=Object.isExtensible||function(){return!0},s=!Bt(function(){return i(Object.preventExtensions({}))}),a=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!zt(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!qt(t,r)){if(!i(t))return"F";if(!e)return"E";n(t)}return t[r].i},getWeak:function(t,e){if(!qt(t,r)){if(!i(t))return!0;if(!e)return!1;n(t)}return t[r].w},onFreeze:function(t){return s&&a.NEED&&i(t)&&!qt(t,r)&&n(t),t}}}),ie=(q.KEY,q.NEED,q.fastKey,q.getWeak,q.onFreeze,d(function(t){var e=A("wks"),n=Kt.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:Wt)("Symbol."+t))}).store=e})),Y=Jt.f,z=ie("toStringTag"),J={f:ie},X=Jt.f,Q={}.toString,Z=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==M(t)?t.split(""):Object(t)},tt=Math.ceil,et=Math.floor,nt=Math.min,se=function(t){return 0<t?nt(te(t),9007199254740991):0},rt=Math.max,ot=Math.min,it=A("keys"),st=ne(!1),at=D("IE_PROTO"),ct="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ut=Object.keys||function(t){return j(t,ct)},ft={f:Object.getOwnPropertySymbols},lt={f:{}.propertyIsEnumerable},ht=Array.isArray||function(t){return"Array"==M(t)},pt=Yt?Object.defineProperties:function(t,e){_(t);for(var n,r=ut(e),o=r.length,i=0;i<o;)Jt.f(t,n=r[i++],e[n]);return t},dt=Kt.document,vt=dt&&dt.documentElement,gt=D("IE_PROTO"),yt="prototype",mt=function(){var t,e=v("iframe"),n=ct.length;for(e.style.display="none",vt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),mt=t.F;n--;)delete mt[yt][ct[n]];return mt()},ae=Object.create||function(t,e){var n;return null!==t?(F[yt]=_(t),n=new F,F[yt]=null,n[gt]=t):n=mt(),void 0===e?n:pt(n,e)},St=ct.concat("length","prototype"),ce={f:Object.getOwnPropertyNames||function(t){return j(t,St)}},Et=ce.f,It={}.toString,wt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],_t={f:function(t){return wt&&"[object Window]"==It.call(t)?function(t){try{return Et(t)}catch(t){return wt.slice()}}(t):Et(L(t))}},Tt=Object.getOwnPropertyDescriptor,ue={f:Yt?Tt:function(t,e){if(t=L(t),e=Gt(e,!0),I)try{return Tt(t,e)}catch(t){}if(qt(t,e))return Xt(!lt.f.call(t,e),t[e])}},Pt=q.KEY,At=ue.f,bt=Jt.f,Rt=_t.f,Ot=Kt.Symbol,Ct=Kt.JSON,kt=Ct&&Ct.stringify,Nt="prototype",xt=ie("_hidden"),Mt=ie("toPrimitive"),Ut={}.propertyIsEnumerable,Lt=A("symbol-registry"),Dt=A("symbols"),jt=A("op-symbols"),Ft=Object[Nt],Vt="function"==typeof Ot&&!!ft.f,$t=Kt.QObject,Ht=!$t||!$t[Nt]||!$t[Nt].findChild,fe=Yt&&Bt(function(){return 7!=ae(bt({},"a",{get:function(){return bt(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=At(Ft,e);r&&delete Ft[e],bt(t,e,n),r&&t!==Ft&&bt(Ft,e,r)}:bt,le=Vt&&"symbol"==typeof Ot.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Ot},he=function(t,e,n){return t===Ft&&he(jt,e,n),_(t),e=Gt(e,!0),_(n),qt(Dt,e)?(n.enumerable?(qt(t,xt)&&t[xt][e]&&(t[xt][e]=!1),n=ae(n,{enumerable:Xt(0,!1)})):(qt(t,xt)||bt(t,xt,Xt(1,{})),t[xt][e]=!0),fe(t,e,n)):bt(t,e,n)};Vt||(R((Ot=function(t){if(this instanceof Ot)throw TypeError("Symbol is not a constructor!");var e=Wt(0<arguments.length?t:void 0),n=function(t){this===Ft&&n.call(jt,t),qt(this,xt)&&qt(this[xt],e)&&(this[xt][e]=!1),fe(this,e,Xt(1,t))};return Yt&&Ht&&fe(Ft,e,{configurable:!0,set:n}),V(e)})[Nt],"toString",function(){return this._k}),ue.f=G,Jt.f=he,ce.f=_t.f=W,lt.f=B,ft.f=K,Yt&&R(Ft,"propertyIsEnumerable",B,!0),J.f=function(t){return V(ie(t))}),oe(oe.G+oe.W+oe.F*!Vt,{Symbol:Ot});for(var pe="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),de=0;pe.length>de;)ie(pe[de++]);for(var ve=ut(ie.store),ge=0;ve.length>ge;)x(ve[ge++]);oe(oe.S+oe.F*!Vt,"Symbol",{for:function(t){return qt(Lt,t+="")?Lt[t]:Lt[t]=Ot(t)},keyFor:function(t){if(!le(t))throw TypeError(t+" is not a symbol!");for(var e in Lt)if(Lt[e]===t)return e},useSetter:function(){Ht=!0},useSimple:function(){Ht=!1}}),oe(oe.S+oe.F*!Vt,"Object",{create:function(t,e){return void 0===e?ae(t):H(ae(t),e)},defineProperty:he,defineProperties:H,getOwnPropertyDescriptor:G,getOwnPropertyNames:W,getOwnPropertySymbols:K});var ye=Bt(function(){ft.f(1)});oe(oe.S+oe.F*ye,"Object",{getOwnPropertySymbols:function(t){return ft.f(re(t))}}),Ct&&oe(oe.S+oe.F*(!Vt||Bt(function(){var t=Ot();return"[null]"!=kt([t])||"{}"!=kt({a:t})||"{}"!=kt(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;o<arguments.length;)r.push(arguments[o++]);if(n=e=r[1],(zt(e)||void 0!==t)&&!le(t))return ht(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!le(e))return e}),r[1]=e,kt.apply(Ct,r)}}),Ot[Nt][Mt]||Qt(Ot[Nt],Mt,Ot[Nt].valueOf),$(Ot,"Symbol"),$(Math,"Math",!0),$(Kt.JSON,"JSON",!0),oe(oe.S,"Object",{create:ae}),oe(oe.S+oe.F*!Yt,"Object",{defineProperty:Jt.f}),oe(oe.S+oe.F*!Yt,"Object",{defineProperties:pt});function me(t,e){var n=(m.Object||{})[t]||Object[t],r={};r[t]=e(n),oe(oe.S+oe.F*Bt(function(){n(1)}),"Object",r)}var Se=ue.f;me("getOwnPropertyDescriptor",function(){return function(t,e){return Se(L(t),e)}});var Ee=D("IE_PROTO"),Ie=Object.prototype,we=Object.getPrototypeOf||function(t){return t=re(t),qt(t,Ee)?t[Ee]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ie:null};me("getPrototypeOf",function(){return function(t){return we(re(t))}}),me("keys",function(){return function(t){return ut(re(t))}}),me("getOwnPropertyNames",function(){return _t.f});var _e=q.onFreeze;me("freeze",function(e){return function(t){return e&&zt(t)?e(_e(t)):t}});var Te=q.onFreeze;me("seal",function(e){return function(t){return e&&zt(t)?e(Te(t)):t}});var Pe=q.onFreeze;me("preventExtensions",function(e){return function(t){return e&&zt(t)?e(Pe(t)):t}}),me("isFrozen",function(e){return function(t){return!zt(t)||!!e&&e(t)}}),me("isSealed",function(e){return function(t){return!zt(t)||!!e&&e(t)}}),me("isExtensible",function(e){return function(t){return!!zt(t)&&(!e||e(t))}});var Ae=Object.assign,be=!Ae||Bt(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=Ae({},t)[n]||Object.keys(Ae({},e)).join("")!=r})?function(t,e){for(var n=re(t),r=arguments.length,o=1,i=ft.f,s=lt.f;o<r;)for(var a,c=Z(arguments[o++]),u=i?ut(c).concat(i(c)):ut(c),f=u.length,l=0;l<f;)a=u[l++],Yt&&!s.call(c,a)||(n[a]=c[a]);return n}:Ae;oe(oe.S+oe.F,"Object",{assign:be});var Re=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};oe(oe.S,"Object",{is:Re});function Oe(t,e){if(_(t),!zt(e)&&null!==e)throw TypeError(e+": can't set as prototype!")}var Ce={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=Zt(Function.call,ue.f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return Oe(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:Oe};oe(oe.S,"Object",{setPrototypeOf:Ce.set});function ke(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ne))?n:xe?M(e):"Object"==(r=M(e))&&"function"==typeof e.callee?"Arguments":r}var Ne=ie("toStringTag"),xe="Arguments"==M(function(){return arguments}()),Me={};Me[ie("toStringTag")]="z",Me+""!="[object z]"&&R(Object.prototype,"toString",function(){return"[object "+ke(this)+"]"},!0);function Ue(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}var Le=[].slice,De={},je=Function.bind||function(e){var n=g(this),r=Le.call(arguments,1),o=function(){var t=r.concat(Le.call(arguments));return this instanceof o?function(t,e,n){if(!(e in De)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";De[e]=Function("F,a","return new F("+r.join(",")+")")}return De[e](t,n)}(n,t.length,t):Ue(n,t,e)};return zt(n.prototype)&&(o.prototype=n.prototype),o};oe(oe.P,"Function",{bind:je});var Fe=Jt.f,Ve=Function.prototype,$e=/^\s*function ([^ (]*)/;"name"in Ve||Yt&&Fe(Ve,"name",{configurable:!0,get:function(){try{return(""+this).match($e)[1]}catch(t){return""}}});var He=ie("hasInstance"),Be=Function.prototype;He in Be||Jt.f(Be,He,{value:function(t){if("function"!=typeof this||!zt(t))return!1;if(!zt(this.prototype))return t instanceof this;for(;t=we(t);)if(this.prototype===t)return!0;return!1}});function Ge(t,e,n){var r={},o=Bt(function(){return We[t]()||"​"!="​"[t]()}),i=r[t]=o?e(ze):We[t];n&&(r[n]=i),oe(oe.P+oe.F*o,"String",r)}var We="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff",Ke="["+We+"]",qe=RegExp("^"+Ke+Ke+"*"),Ye=RegExp(Ke+Ke+"*$"),ze=Ge.trim=function(t,e){return t=String(U(t)),1&e&&(t=t.replace(qe,"")),2&e&&(t=t.replace(Ye,"")),t},Je=Ge,Xe=Kt.parseInt,Qe=Je.trim,Ze=/^[-+]?0[xX]/,tn=8!==Xe(We+"08")||22!==Xe(We+"0x16")?function(t,e){var n=Qe(String(t),3);return Xe(n,e>>>0||(Ze.test(n)?16:10))}:Xe;oe(oe.G+oe.F*(parseInt!=tn),{parseInt:tn});var en=Kt.parseFloat,nn=Je.trim,rn=1/en(We+"-0")!=-1/0?function(t){var e=nn(String(t),3),n=en(e);return 0===n&&"-"==e.charAt(0)?-0:n}:en;oe(oe.G+oe.F*(parseFloat!=rn),{parseFloat:rn});function on(t,e,n){var r,o=e.constructor;return o!==n&&"function"==typeof o&&(r=o.prototype)!==n.prototype&&zt(r)&&an&&an(t,r),t}function sn(t){var e=Gt(t,!1);if("string"==typeof e&&2<e.length){var n,r,o,i=(e=yn?e.trim():ln(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var s,a=e.slice(2),c=0,u=a.length;c<u;c++)if((s=a.charCodeAt(c))<48||o<s)return NaN;return parseInt(a,r)}}return+e}var an=Ce.set,cn=ce.f,un=ue.f,fn=Jt.f,ln=Je.trim,hn="Number",pn=Kt[hn],dn=pn,vn=pn.prototype,gn=M(ae(vn))==hn,yn="trim"in String.prototype;if(!pn(" 0o1")||!pn("0b1")||pn("+0x1")){pn=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof pn&&(gn?Bt(function(){vn.valueOf.call(n)}):M(n)!=hn)?on(new dn(sn(e)),n,pn):sn(e)};for(var mn,Sn=Yt?cn(dn):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),En=0;Sn.length>En;En++)qt(dn,mn=Sn[En])&&!qt(pn,mn)&&fn(pn,mn,un(dn,mn));(pn.prototype=vn).constructor=pn,R(Kt,hn,pn)}function In(t,e){if("number"!=typeof t&&"Number"!=M(t))throw TypeError(e);return+t}function wn(t){var e=String(U(this)),n="",r=te(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;0<r;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}function _n(t,e){for(var n=-1,r=e;++n<6;)r+=t*Rn[n],Rn[n]=r%1e7,r=bn(r/1e7)}function Tn(t){for(var e=6,n=0;0<=--e;)n+=Rn[e],Rn[e]=bn(n/t),n=n%t*1e7}function Pn(){for(var t,e=6,n="";0<=--e;){""===n&&0!==e&&0===Rn[e]||(t=String(Rn[e]),n=""===n?t:n+wn.call("0",7-t.length)+t)}return n}var An=1..toFixed,bn=Math.floor,Rn=[0,0,0,0,0,0],On="Number.toFixed: incorrect invocation!",Cn=function(t,e,n){return 0===e?n:e%2==1?Cn(t,e-1,n*t):Cn(t*t,e/2,n)};oe(oe.P+oe.F*(!!An&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!Bt(function(){An.call({})})),"Number",{toFixed:function(t){var e,n,r,o,i=In(this,On),s=te(t),a="",c="0";if(s<0||20<s)throw RangeError(On);if(i!=i)return"NaN";if(i<=-1e21||1e21<=i)return String(i);if(i<0&&(a="-",i=-i),1e-21<i)if(n=(e=function(t){for(var e=0,n=t;4096<=n;)e+=12,n/=4096;for(;2<=n;)e+=1,n/=2;return e}(i*Cn(2,69,1))-69)<0?i*Cn(2,-e,1):i/Cn(2,e,1),n*=4503599627370496,0<(e=52-e)){for(_n(0,n),r=s;7<=r;)_n(1e7,0),r-=7;for(_n(Cn(10,r,1),0),r=e-1;23<=r;)Tn(1<<23),r-=23;Tn(1<<r),_n(1,1),Tn(2),c=Pn()}else _n(0,n),_n(1<<-e,0),c=Pn()+wn.call("0",s);return c=0<s?a+((o=c.length)<=s?"0."+wn.call("0",s-o)+c:c.slice(0,o-s)+"."+c.slice(o-s)):a+c}});var kn=1..toPrecision;oe(oe.P+oe.F*(Bt(function(){return"1"!==kn.call(1,void 0)})||!Bt(function(){kn.call({})})),"Number",{toPrecision:function(t){var e=In(this,"Number#toPrecision: incorrect invocation!");return void 0===t?kn.call(e):kn.call(e,t)}}),oe(oe.S,"Number",{EPSILON:Math.pow(2,-52)});var Nn=Kt.isFinite;oe(oe.S,"Number",{isFinite:function(t){return"number"==typeof t&&Nn(t)}});function xn(t){return!zt(t)&&isFinite(t)&&Mn(t)===t}var Mn=Math.floor;oe(oe.S,"Number",{isInteger:xn}),oe(oe.S,"Number",{isNaN:function(t){return t!=t}});var Un=Math.abs;oe(oe.S,"Number",{isSafeInteger:function(t){return xn(t)&&Un(t)<=9007199254740991}}),oe(oe.S,"Number",{MAX_SAFE_INTEGER:9007199254740991}),oe(oe.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991}),oe(oe.S+oe.F*(Number.parseFloat!=rn),"Number",{parseFloat:rn}),oe(oe.S+oe.F*(Number.parseInt!=tn),"Number",{parseInt:tn});var Ln=Math.log1p||function(t){return-1e-8<(t=+t)&&t<1e-8?t-t*t/2:Math.log(1+t)},Dn=Math.sqrt,jn=Math.acosh;oe(oe.S+oe.F*!(jn&&710==Math.floor(jn(Number.MAX_VALUE))&&jn(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:94906265.62425156<t?Math.log(t)+Math.LN2:Ln(t-1+Dn(t-1)*Dn(t+1))}});var Fn=Math.asinh;oe(oe.S+oe.F*!(Fn&&0<1/Fn(0)),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}});var Vn=Math.atanh;oe(oe.S+oe.F*!(Vn&&1/Vn(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}});var $n=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1};oe(oe.S,"Math",{cbrt:function(t){return $n(t=+t)*Math.pow(Math.abs(t),1/3)}}),oe(oe.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}});var Hn=Math.exp;oe(oe.S,"Math",{cosh:function(t){return(Hn(t=+t)+Hn(-t))/2}});var Bn=Math.expm1,Gn=!Bn||22025.465794806718<Bn(10)||Bn(10)<22025.465794806718||-2e-17!=Bn(-2e-17)?function(t){return 0==(t=+t)?t:-1e-6<t&&t<1e-6?t+t*t/2:Math.exp(t)-1}:Bn;oe(oe.S+oe.F*(Gn!=Math.expm1),"Math",{expm1:Gn});var Wn=Math.pow,Kn=Wn(2,-52),qn=Wn(2,-23),Yn=Wn(2,127)*(2-qn),zn=Wn(2,-126),Jn=Math.fround||function(t){var e,n,r=Math.abs(t),o=$n(t);return r<zn?o*(r/zn/qn+1/Kn-1/Kn)*zn*qn:Yn<(n=(e=(1+qn/Kn)*r)-(e-r))||n!=n?o*(1/0):o*n};oe(oe.S,"Math",{fround:Jn});var Xn=Math.abs;oe(oe.S,"Math",{hypot:function(t,e){for(var n,r,o=0,i=0,s=arguments.length,a=0;i<s;)a<(n=Xn(arguments[i++]))?(o=o*(r=a/n)*r+1,a=n):o+=0<n?(r=n/a)*r:n;return a===1/0?1/0:a*Math.sqrt(o)}});var Qn=Math.imul;oe(oe.S+oe.F*Bt(function(){return-5!=Qn(4294967295,5)||2!=Qn.length}),"Math",{imul:function(t,e){var n=65535,r=+t,o=+e,i=n&r,s=n&o;return 0|i*s+((n&r>>>16)*s+i*(n&o>>>16)<<16>>>0)}}),oe(oe.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}}),oe(oe.S,"Math",{log1p:Ln}),oe(oe.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}}),oe(oe.S,"Math",{sign:$n});var Zn=Math.exp;oe(oe.S+oe.F*Bt(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(Gn(t)-Gn(-t))/2:(Zn(t-1)-Zn(-t-1))*(Math.E/2)}});var tr=Math.exp;oe(oe.S,"Math",{tanh:function(t){var e=Gn(t=+t),n=Gn(-t);return e==1/0?1:n==1/0?-1:(e-n)/(tr(t)+tr(-t))}}),oe(oe.S,"Math",{trunc:function(t){return(0<t?Math.floor:Math.ceil)(t)}});var er=String.fromCharCode,nr=String.fromCodePoint;oe(oe.S+oe.F*(!!nr&&1!=nr.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,o=0;o<r;){if(e=+arguments[o++],ee(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?er(e):er(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}}),oe(oe.S,"String",{raw:function(t){for(var e=L(t.raw),n=se(e.length),r=arguments.length,o=[],i=0;i<n;)o.push(String(e[i++])),i<r&&o.push(String(arguments[i]));return o.join("")}}),Je("trim",function(t){return function(){return t(this,3)}});function rr(a){return function(t,e){var n,r,o=String(U(t)),i=te(e),s=o.length;return i<0||s<=i?a?"":void 0:(n=o.charCodeAt(i))<55296||56319<n||i+1===s||(r=o.charCodeAt(i+1))<56320||57343<r?a?o.charAt(i):n:a?o.slice(i,i+2):r-56320+(n-55296<<10)+65536}}var or={},ir={};Qt(ir,ie("iterator"),function(){return this});function sr(t,e,n){t.prototype=ae(ir,{next:Xt(1,n)}),$(t,e+" Iterator")}function ar(){return this}function cr(t,e,n,r,o,i,s){function a(t){if(!fr&&t in d)return d[t];switch(t){case"keys":case lr:return function(){return new n(this,t)}}return function(){return new n(this,t)}}sr(n,e,r);var c,u,f,l=e+" Iterator",h=o==lr,p=!1,d=t.prototype,v=d[ur]||d["@@iterator"]||o&&d[o],g=v||a(o),y=o?h?a("entries"):g:void 0,m="Array"==e&&d.entries||v;if(m&&(f=we(m.call(new t)))!==Object.prototype&&f.next&&($(f,l,!0),"function"!=typeof f[ur]&&Qt(f,ur,ar)),h&&v&&v.name!==lr&&(p=!0,g=function(){return v.call(this)}),!fr&&!p&&d[ur]||Qt(d,ur,g),or[e]=g,or[l]=ar,o)if(c={values:h?g:a(lr),keys:i?g:a("keys"),entries:y},s)for(u in c)u in d||R(d,u,c[u]);else oe(oe.P+oe.F*(fr||p),e,c);return c}var ur=ie("iterator"),fr=!([].keys&&"next"in[].keys()),lr="values",hr=rr(!0);cr(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=hr(e,n),this._i+=t.length,{value:t,done:!1})});var pr=rr(!1);oe(oe.P,"String",{codePointAt:function(t){return pr(this,t)}});function dr(t){var e;return zt(t)&&(void 0!==(e=t[yr])?!!e:"RegExp"==M(t))}function vr(t,e,n){if(dr(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(U(t))}function gr(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[mr]=!1,!"/./"[e](n)}catch(t){}}return!0}var yr=ie("match"),mr=ie("match"),Sr="endsWith",Er=""[Sr];oe(oe.P+oe.F*gr(Sr),"String",{endsWith:function(t,e){var n=vr(this,t,Sr),r=1<arguments.length?e:void 0,o=se(n.length),i=void 0===r?o:Math.min(se(r),o),s=String(t);return Er?Er.call(n,s,i):n.slice(i-s.length,i)===s}});var Ir="includes";oe(oe.P+oe.F*gr(Ir),"String",{includes:function(t,e){return!!~vr(this,t,Ir).indexOf(t,1<arguments.length?e:void 0)}}),oe(oe.P,"String",{repeat:wn});var wr="startsWith",_r=""[wr];oe(oe.P+oe.F*gr(wr),"String",{startsWith:function(t,e){var n=vr(this,t,wr),r=se(Math.min(1<arguments.length?e:void 0,n.length)),o=String(t);return _r?_r.call(n,o,r):n.slice(r,r+o.length)===o}});function Tr(t,e,n,r){var o=String(U(t)),i="<"+e;return""!==n&&(i+=" "+n+'="'+String(r).replace(Ar,"&quot;")+'"'),i+">"+o+"</"+e+">"}function Pr(e,t){var n={};n[e]=t(Tr),oe(oe.P+oe.F*Bt(function(){var t=""[e]('"');return t!==t.toLowerCase()||3<t.split('"').length}),"String",n)}var Ar=/"/g;Pr("anchor",function(e){return function(t){return e(this,"a","name",t)}}),Pr("big",function(t){return function(){return t(this,"big","","")}}),Pr("blink",function(t){return function(){return t(this,"blink","","")}}),Pr("bold",function(t){return function(){return t(this,"b","","")}}),Pr("fixed",function(t){return function(){return t(this,"tt","","")}}),Pr("fontcolor",function(e){return function(t){return e(this,"font","color",t)}}),Pr("fontsize",function(e){return function(t){return e(this,"font","size",t)}}),Pr("italics",function(t){return function(){return t(this,"i","","")}}),Pr("link",function(e){return function(t){return e(this,"a","href",t)}}),Pr("small",function(t){return function(){return t(this,"small","","")}}),Pr("strike",function(t){return function(){return t(this,"strike","","")}}),Pr("sub",function(t){return function(){return t(this,"sub","","")}}),Pr("sup",function(t){return function(){return t(this,"sup","","")}}),oe(oe.S,"Date",{now:function(){return(new Date).getTime()}}),oe(oe.P+oe.F*Bt(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(){var t=re(this),e=Gt(t);return"number"!=typeof e||isFinite(e)?t.toISOString():null}});function br(t){return 9<t?t:"0"+t}var Rr=Date.prototype.getTime,Or=Date.prototype.toISOString,Cr=Bt(function(){return"0385-07-25T07:06:39.999Z"!=Or.call(new Date(-5e13-1))})||!Bt(function(){Or.call(new Date(NaN))})?function(){if(!isFinite(Rr.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":9999<e?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+br(t.getUTCMonth()+1)+"-"+br(t.getUTCDate())+"T"+br(t.getUTCHours())+":"+br(t.getUTCMinutes())+":"+br(t.getUTCSeconds())+"."+(99<n?n:"0"+br(n))+"Z"}:Or;oe(oe.P+oe.F*(Date.prototype.toISOString!==Cr),"Date",{toISOString:Cr});var kr=Date.prototype,Nr="Invalid Date",xr="toString",Mr=kr[xr],Ur=kr.getTime;new Date(NaN)+""!=Nr&&R(kr,xr,function(){var t=Ur.call(this);return t==t?Mr.call(this):Nr});var Lr=ie("toPrimitive"),Dr=Date.prototype;Lr in Dr||Qt(Dr,Lr,function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return Gt(_(this),"number"!=t)}),oe(oe.S,"Array",{isArray:ht});function jr(e,t,n,r){try{return r?t(_(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&_(o.call(e)),t}}function Fr(t){return void 0!==t&&(or.Array===t||Hr[$r]===t)}function Vr(t,e,n){e in t?Jt.f(t,e,Xt(0,n)):t[e]=n}var $r=ie("iterator"),Hr=Array.prototype,Br=ie("iterator"),Gr=m.getIteratorMethod=function(t){if(null!=t)return t[Br]||t["@@iterator"]||or[ke(t)]},Wr=ie("iterator"),Kr=!1;try{var qr=[7][Wr]();qr.return=function(){Kr=!0},Array.from(qr,function(){throw 2})}catch(s){}function Yr(t,e){if(!e&&!Kr)return!1;var n=!1;try{var r=[7],o=r[Wr]();o.next=function(){return{done:n=!0}},r[Wr]=function(){return o},t(r)}catch(t){}return n}oe(oe.S+oe.F*!Yr(function(t){Array.from(t)}),"Array",{from:function(t,e,n){var r,o,i,s,a=re(t),c="function"==typeof this?this:Array,u=arguments.length,f=1<u?e:void 0,l=void 0!==f,h=0,p=Gr(a);if(l&&(f=Zt(f,2<u?n:void 0,2)),null==p||c==Array&&Fr(p))for(o=new c(r=se(a.length));h<r;h++)Vr(o,h,l?f(a[h],h):a[h]);else for(s=p.call(a),o=new c;!(i=s.next()).done;h++)Vr(o,h,l?jr(s,f,[i.value,h],!0):i.value);return o.length=h,o}}),oe(oe.S+oe.F*Bt(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);t<e;)Vr(n,t,arguments[t++]);return n.length=e,n}});function zr(t,e){return!!t&&Bt(function(){e?t.call(null,function(){},1):t.call(null)})}var Jr=[].join;oe(oe.P+oe.F*(Z!=Object||!zr(Jr)),"Array",{join:function(t){return Jr.call(L(this),void 0===t?",":t)}});var Xr=[].slice;oe(oe.P+oe.F*Bt(function(){vt&&Xr.call(vt)}),"Array",{slice:function(t,e){var n=se(this.length),r=M(this);if(e=void 0===e?n:e,"Array"==r)return Xr.call(this,t,e);for(var o=ee(t,n),i=ee(e,n),s=se(i-o),a=new Array(s),c=0;c<s;c++)a[c]="String"==r?this.charAt(o+c):this[o+c];return a}});var Qr=[].sort,Zr=[1,2,3];oe(oe.P+oe.F*(Bt(function(){Zr.sort(void 0)})||!Bt(function(){Zr.sort(null)})||!zr(Qr)),"Array",{sort:function(t){return void 0===t?Qr.call(re(this)):Qr.call(re(this),g(t))}});function to(t,e){return ht(n=t)&&("function"!=typeof(r=n.constructor)||r!==Array&&!ht(r.prototype)||(r=void 0),zt(r)&&null===(r=r[no])&&(r=void 0)),new(void 0===r?Array:r)(e);var n,r}function eo(l,t){var h=1==l,p=2==l,d=3==l,v=4==l,g=6==l,y=5==l||g,m=t||to;return function(t,e,n){for(var r,o,i=re(t),s=Z(i),a=Zt(e,n,3),c=se(s.length),u=0,f=h?m(t,c):p?m(t,0):void 0;u<c;u++)if((y||u in s)&&(o=a(r=s[u],u,i),l))if(h)f[u]=o;else if(o)switch(l){case 3:return!0;case 5:return r;case 6:return u;case 2:f.push(r)}else if(v)return!1;return g?-1:d||v?v:f}}var no=ie("species"),ro=eo(0),oo=zr([].forEach,!0);oe(oe.P+oe.F*!oo,"Array",{forEach:function(t,e){return ro(this,t,e)}});var io=eo(1);oe(oe.P+oe.F*!zr([].map,!0),"Array",{map:function(t,e){return io(this,t,e)}});var so=eo(2);oe(oe.P+oe.F*!zr([].filter,!0),"Array",{filter:function(t,e){return so(this,t,e)}});var ao=eo(3);oe(oe.P+oe.F*!zr([].some,!0),"Array",{some:function(t,e){return ao(this,t,e)}});var co=eo(4);oe(oe.P+oe.F*!zr([].every,!0),"Array",{every:function(t,e){return co(this,t,e)}});function uo(t,e,n,r,o){g(e);var i=re(t),s=Z(i),a=se(i.length),c=o?a-1:0,u=o?-1:1;if(n<2)for(;;){if(c in s){r=s[c],c+=u;break}if(c+=u,o?c<0:a<=c)throw TypeError("Reduce of empty array with no initial value")}for(;o?0<=c:c<a;c+=u)c in s&&(r=e(r,s[c],c,i));return r}oe(oe.P+oe.F*!zr([].reduce,!0),"Array",{reduce:function(t,e){return uo(this,t,arguments.length,e,!1)}}),oe(oe.P+oe.F*!zr([].reduceRight,!0),"Array",{reduceRight:function(t,e){return uo(this,t,arguments.length,e,!0)}});var fo=ne(!1),lo=[].indexOf,ho=!!lo&&1/[1].indexOf(1,-0)<0;oe(oe.P+oe.F*(ho||!zr(lo)),"Array",{indexOf:function(t,e){return ho?lo.apply(this,arguments)||0:fo(this,t,e)}});var po=[].lastIndexOf,vo=!!po&&1/[1].lastIndexOf(1,-0)<0;oe(oe.P+oe.F*(vo||!zr(po)),"Array",{lastIndexOf:function(t,e){if(vo)return po.apply(this,arguments)||0;var n=L(this),r=se(n.length),o=r-1;for(1<arguments.length&&(o=Math.min(o,te(e))),o<0&&(o=r+o);0<=o;o--)if(o in n&&n[o]===t)return o||0;return-1}});var go=[].copyWithin||function(t,e,n){var r=re(this),o=se(r.length),i=ee(t,o),s=ee(e,o),a=2<arguments.length?n:void 0,c=Math.min((void 0===a?o:ee(a,o))-s,o-i),u=1;for(s<i&&i<s+c&&(u=-1,s+=c-1,i+=c-1);0<c--;)s in r?r[i]=r[s]:delete r[i],i+=u,s+=u;return r},yo=ie("unscopables"),mo=Array.prototype;null==mo[yo]&&Qt(mo,yo,{});function So(t){mo[yo][t]=!0}oe(oe.P,"Array",{copyWithin:go}),So("copyWithin");function Eo(t,e,n){for(var r=re(this),o=se(r.length),i=arguments.length,s=ee(1<i?e:void 0,o),a=2<i?n:void 0,c=void 0===a?o:ee(a,o);s<c;)r[s++]=t;return r}oe(oe.P,"Array",{fill:Eo}),So("fill");var Io=eo(5),wo="find",_o=!0;wo in[]&&Array(1)[wo](function(){_o=!1}),oe(oe.P+oe.F*_o,"Array",{find:function(t,e){return Io(this,t,1<arguments.length?e:void 0)}}),So(wo);var To=eo(6),Po="findIndex",Ao=!0;Po in[]&&Array(1)[Po](function(){Ao=!1}),oe(oe.P+oe.F*Ao,"Array",{findIndex:function(t,e){return To(this,t,1<arguments.length?e:void 0)}}),So(Po);function bo(t){var e=Kt[t];Yt&&e&&!e[Ro]&&Jt.f(e,Ro,{configurable:!0,get:function(){return this}})}var Ro=ie("species");bo("Array");function Oo(t,e){return{value:e,done:!!t}}var Co=cr(Array,"Array",function(t,e){this._t=L(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,Oo(1)):Oo(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");or.Arguments=or.Array,So("keys"),So("values"),So("entries");function ko(){var t=_(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}var No=Jt.f,xo=ce.f,Mo=Kt.RegExp,Uo=Mo,Lo=Mo.prototype,Do=/a/g,jo=/a/g,Fo=new Mo(Do)!==Do;if(Yt&&(!Fo||Bt(function(){return jo[ie("match")]=!1,Mo(Do)!=Do||Mo(jo)==jo||"/a/i"!=Mo(Do,"i")}))){Mo=function(t,e){var n=this instanceof Mo,r=dr(t),o=void 0===e;return!n&&r&&t.constructor===Mo&&o?t:on(Fo?new Uo(r&&!o?t.source:t,e):Uo((r=t instanceof Mo)?t.source:t,r&&o?ko.call(t):e),n?this:Lo,Mo)};for(var Vo=xo(Uo),$o=0;Vo.length>$o;)!function(e){e in Mo||No(Mo,e,{configurable:!0,get:function(){return Uo[e]},set:function(t){Uo[e]=t}})}(Vo[$o++]);(Lo.constructor=Mo).prototype=Lo,R(Kt,"RegExp",Mo)}bo("RegExp");var Ho,Bo,Go=RegExp.prototype.exec,Wo=String.prototype.replace,Ko=Go,qo="lastIndex",Yo=(Ho=/a/,Bo=/b*/g,Go.call(Ho,"a"),Go.call(Bo,"a"),0!==Ho[qo]||0!==Bo[qo]),zo=void 0!==/()??/.exec("")[1];(Yo||zo)&&(Ko=function(t){var e,n,r,o,i=this;return zo&&(n=new RegExp("^"+i.source+"$(?!\\s)",ko.call(i))),Yo&&(e=i[qo]),r=Go.call(i,t),Yo&&r&&(i[qo]=i.global?r.index+r[0].length:e),zo&&r&&1<r.length&&Wo.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r});var Jo=Ko;oe({target:"RegExp",proto:!0,forced:Jo!==/./.exec},{exec:Jo}),Yt&&"g"!=/./g.flags&&Jt.f(RegExp.prototype,"flags",{configurable:!0,get:ko});function Xo(t){R(RegExp.prototype,Qo,t,!0)}var Qo="toString",Zo=/./[Qo];Bt(function(){return"/a/b"!=Zo.call({source:"a",flags:"b"})})?Xo(function(){var t=_(this);return"/".concat(t.source,"/","flags"in t?t.flags:!Yt&&t instanceof RegExp?ko.call(t):void 0)}):Zo.name!=Qo&&Xo(function(){return Zo.call(this)});function ti(t,e,n){return e+(n?ri(t,e).length:1)}function ei(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==ke(t))throw new TypeError("RegExp#exec called on incompatible receiver");return oi.call(t,e)}function ni(n,t,e){var i,r,o,s,a=ie(n),c=!Bt(function(){var t={};return t[a]=function(){return 7},7!=""[n](t)}),u=c?!Bt(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[ii]=function(){return e}),e[a](""),!t}):void 0;c&&u&&("replace"!==n||si)&&("split"!==n||ai)||(i=/./[a],o=(r=e(U,a,""[n],function(t,e,n,r,o){return e.exec===Jo?c&&!o?{done:!0,value:i.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],s=r[1],R(String.prototype,n,o),Qt(RegExp.prototype,a,2==t?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)}))}var ri=rr(!0),oi=RegExp.prototype.exec,ii=ie("species"),si=!Bt(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),ai=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();ni("match",1,function(r,o,u,f){return[function(t){var e=r(this),n=null==t?void 0:t[o];return void 0!==n?n.call(t,e):new RegExp(t)[o](String(e))},function(t){var e=f(u,t,this);if(e.done)return e.value;var n=_(t),r=String(this);if(!n.global)return ei(n,r);for(var o,i=n.unicode,s=[],a=n.lastIndex=0;null!==(o=ei(n,r));){var c=String(o[0]);""===(s[a]=c)&&(n.lastIndex=ti(r,se(n.lastIndex),i)),a++}return 0===a?null:s}]});var ci=Math.max,ui=Math.min,fi=Math.floor,li=/\$([$&`']|\d\d?|<[^>]*>)/g,hi=/\$([$&`']|\d\d?)/g;ni("replace",2,function(o,i,I,w){return[function(t,e){var n=o(this),r=null==t?void 0:t[i];return void 0!==r?r.call(t,n,e):I.call(String(n),t,e)},function(t,e){var n=w(I,t,this,e);if(n.done)return n.value;var r=_(t),o=String(this),i="function"==typeof e;i||(e=String(e));var s,a=r.global;a&&(s=r.unicode,r.lastIndex=0);for(var c=[];;){var u=ei(r,o);if(null===u)break;if(c.push(u),!a)break;""===String(u[0])&&(r.lastIndex=ti(o,se(r.lastIndex),s))}for(var f,l="",h=0,p=0;p<c.length;p++){u=c[p];for(var d=String(u[0]),v=ci(ui(te(u.index),o.length),0),g=[],y=1;y<u.length;y++)g.push(void 0===(f=u[y])?f:String(f));var m,S=u.groups,E=i?(m=[d].concat(g,v,o),void 0!==S&&m.push(S),String(e.apply(void 0,m))):function(i,s,a,c,u,t){var f=a+i.length,l=c.length,e=hi;void 0!==u&&(u=re(u),e=li);return I.call(t,e,function(t,e){var n;switch(e.charAt(0)){case"$":return"$";case"&":return i;case"`":return s.slice(0,a);case"'":return s.slice(f);case"<":n=u[e.slice(1,-1)];break;default:var r=+e;if(0==r)return t;if(l<r){var o=fi(r/10);return 0===o?t:o<=l?void 0===c[o-1]?e.charAt(1):c[o-1]+e.charAt(1):t}n=c[r-1]}return void 0===n?"":n})}(d,o,v,g,S,e);h<=v&&(l+=o.slice(h,v)+E,h=v+d.length)}return l+o.slice(h)}]}),ni("search",1,function(r,o,s,a){return[function(t){var e=r(this),n=null==t?void 0:t[o];return void 0!==n?n.call(t,e):new RegExp(t)[o](String(e))},function(t){var e=a(s,t,this);if(e.done)return e.value;var n=_(t),r=String(this),o=n.lastIndex;Re(o,0)||(n.lastIndex=0);var i=ei(n,r);return Re(n.lastIndex,o)||(n.lastIndex=o),null===i?-1:i.index}]});function pi(t,e){var n,r=_(t).constructor;return void 0===r||null==(n=_(r)[di])?e:g(n)}var di=ie("species"),vi=Math.min,gi=[].push,yi="split",mi="length",Si="lastIndex",Ei=4294967295,Ii=!Bt(function(){RegExp(Ei,"y")});ni("split",2,function(o,i,g,y){var m="c"=="abbc"[yi](/(b)*/)[1]||4!="test"[yi](/(?:)/,-1)[mi]||2!="ab"[yi](/(?:ab)*/)[mi]||4!="."[yi](/(.?)(.?)/)[mi]||1<"."[yi](/()()/)[mi]||""[yi](/.?/)[mi]?function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!dr(t))return g.call(n,t,e);for(var r,o,i,s=[],a=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),c=0,u=void 0===e?Ei:e>>>0,f=new RegExp(t.source,a+"g");(r=Jo.call(f,n))&&!(c<(o=f[Si])&&(s.push(n.slice(c,r.index)),1<r[mi]&&r.index<n[mi]&&gi.apply(s,r.slice(1)),i=r[0][mi],c=o,s[mi]>=u));)f[Si]===r.index&&f[Si]++;return c===n[mi]?!i&&f.test("")||s.push(""):s.push(n.slice(c)),s[mi]>u?s.slice(0,u):s}:"0"[yi](void 0,0)[mi]?function(t,e){return void 0===t&&0===e?[]:g.call(this,t,e)}:g;return[function(t,e){var n=o(this),r=null==t?void 0:t[i];return void 0!==r?r.call(t,n,e):m.call(String(n),t,e)},function(t,e){var n=y(m,t,this,e,m!==g);if(n.done)return n.value;var r=_(t),o=String(this),i=pi(r,RegExp),s=r.unicode,a=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(Ii?"y":"g"),c=new i(Ii?r:"^(?:"+r.source+")",a),u=void 0===e?Ei:e>>>0;if(0==u)return[];if(0===o.length)return null===ei(c,o)?[o]:[];for(var f=0,l=0,h=[];l<o.length;){c.lastIndex=Ii?l:0;var p,d=ei(c,Ii?o:o.slice(l));if(null===d||(p=vi(se(c.lastIndex+(Ii?0:l)),o.length))===f)l=ti(o,l,s);else{if(h.push(o.slice(f,l)),h.length===u)return h;for(var v=1;v<=d.length-1;v++)if(h.push(d[v]),h.length===u)return h;l=f=p}}return h.push(o.slice(f)),h}]});function wi(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}function _i(){var t,e=+this;Ui.hasOwnProperty(e)&&(t=Ui[e],delete Ui[e],t())}function Ti(t){_i.call(t.data)}var Pi,Ai,bi,Ri=d(function(t){var h={},p={},e=t.exports=function(t,e,n,r,o){var i,s,a,c,u=o?function(){return t}:Gr(t),f=Zt(n,r,e?2:1),l=0;if("function"!=typeof u)throw TypeError(t+" is not iterable!");if(Fr(u)){for(i=se(t.length);l<i;l++)if((c=e?f(_(s=t[l])[0],s[1]):f(t[l]))===h||c===p)return c}else for(a=u.call(t);!(s=a.next()).done;)if((c=jr(a,f,s.value,e))===h||c===p)return c};e.BREAK=h,e.RETURN=p}),Oi=Kt.process,Ci=Kt.setImmediate,ki=Kt.clearImmediate,Ni=Kt.MessageChannel,xi=Kt.Dispatch,Mi=0,Ui={},Li="onreadystatechange";Ci&&ki||(Ci=function(t){for(var e=[],n=1;n<arguments.length;)e.push(arguments[n++]);return Ui[++Mi]=function(){Ue("function"==typeof t?t:Function(t),e)},Pi(Mi),Mi},ki=function(t){delete Ui[t]},"process"==M(Oi)?Pi=function(t){Oi.nextTick(Zt(_i,t,1))}:xi&&xi.now?Pi=function(t){xi.now(Zt(_i,t,1))}:Ni?(bi=(Ai=new Ni).port2,Ai.port1.onmessage=Ti,Pi=Zt(bi.postMessage,bi,1)):Kt.addEventListener&&"function"==typeof postMessage&&!Kt.importScripts?(Pi=function(t){Kt.postMessage(t+"","*")},Kt.addEventListener("message",Ti,!1)):Pi=Li in v("script")?function(t){vt.appendChild(v("script"))[Li]=function(){vt.removeChild(this),_i.call(t)}}:function(t){setTimeout(Zt(_i,t,1),0)});function Di(){function t(){var t,e;for(Bi&&(t=$i.domain)&&t.exit();n;){e=n.fn,n=n.next;try{e()}catch(t){throw n?o():r=void 0,t}}r=void 0,t&&t.enter()}var n,r,e,o,i,s;return o=Bi?function(){$i.nextTick(t)}:!Vi||Kt.navigator&&Kt.navigator.standalone?Hi&&Hi.resolve?(e=Hi.resolve(void 0),function(){e.then(t)}):function(){Fi.call(Kt,t)}:(i=!0,s=document.createTextNode(""),new Vi(t).observe(s,{characterData:!0}),function(){s.data=i=!i}),function(t){var e={fn:t,next:void 0};r&&(r.next=e),n||(n=e,o()),r=e}}var ji={set:Ci,clear:ki},Fi=ji.set,Vi=Kt.MutationObserver||Kt.WebKitMutationObserver,$i=Kt.process,Hi=Kt.Promise,Bi="process"==M($i);function Gi(t){var n,r;this.promise=new t(function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e}),this.resolve=g(n),this.reject=g(r)}function Wi(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}function Ki(t,e){if(_(t),zt(e)&&e.constructor===t)return e;var n=ns.f(t);return(0,n.resolve)(e),n.promise}function qi(t,e,n){for(var r in e)R(t,r,e[r],n);return t}function Yi(){}function zi(t){var e;return!(!zt(t)||"function"!=typeof(e=t.then))&&e}function Ji(f,e){var n;f._n||(f._n=!0,n=f._c,ss(function(){for(var c=f._v,u=1==f._s,t=0;n.length>t;)!function(t){var e,n,r,o=u?t.ok:t.fail,i=t.resolve,s=t.reject,a=t.domain;try{o?(u||(2==f._h&&ms(f),f._h=1),!0===o?e=c:(a&&a.enter(),e=o(c),a&&(a.exit(),r=!0)),e===t.promise?s(cs("Promise-chain cycle")):(n=zi(e))?n.call(e,i,s):i(e)):s(c)}catch(t){a&&!r&&a.exit(),s(t)}}(n[t++]);f._c=[],f._n=!1,e&&!f._h&&gs(f)}))}function Xi(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Ji(e,!0))}var Qi,Zi,ts,es,ns={f:function(t){return new Gi(t)}},rs=Kt.navigator,os=rs&&rs.userAgent||"",is=ji.set,ss=Di(),as="Promise",cs=Kt.TypeError,us=Kt.process,fs=us&&us.versions,ls=fs&&fs.v8||"",hs=Kt[as],ps="process"==ke(us),ds=Zi=ns.f,vs=!!function(){try{var t=hs.resolve(1),e=(t.constructor={})[ie("species")]=function(t){t(Yi,Yi)};return(ps||"function"==typeof PromiseRejectionEvent)&&t.then(Yi)instanceof e&&0!==ls.indexOf("6.6")&&-1===os.indexOf("Chrome/66")}catch(t){}}(),gs=function(i){is.call(Kt,function(){var t,e,n,r=i._v,o=ys(i);if(o&&(t=Wi(function(){ps?us.emit("unhandledRejection",r,i):(e=Kt.onunhandledrejection)?e({promise:i,reason:r}):(n=Kt.console)&&n.error&&n.error("Unhandled promise rejection",r)}),i._h=ps||ys(i)?2:1),i._a=void 0,o&&t.e)throw t.v})},ys=function(t){return 1!==t._h&&0===(t._a||t._c).length},ms=function(e){is.call(Kt,function(){var t;ps?us.emit("rejectionHandled",e):(t=Kt.onrejectionhandled)&&t({promise:e,reason:e._v})})},Ss=function(t){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw cs("Promise can't be resolved itself");(n=zi(t))?ss(function(){var e={_w:r,_d:!1};try{n.call(t,Zt(Ss,e,1),Zt(Xi,e,1))}catch(t){Xi.call(e,t)}}):(r._v=t,r._s=1,Ji(r,!1))}catch(t){Xi.call({_w:r,_d:!1},t)}}};vs||(hs=function(t){wi(this,hs,as,"_h"),g(t),Qi.call(this);try{t(Zt(Ss,this,1),Zt(Xi,this,1))}catch(t){Xi.call(this,t)}},(Qi=function(){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=qi(hs.prototype,{then:function(t,e){var n=ds(pi(this,hs));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=ps?us.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&Ji(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),ts=function(){var t=new Qi;this.promise=t,this.resolve=Zt(Ss,t,1),this.reject=Zt(Xi,t,1)},ns.f=ds=function(t){return t===hs||t===es?new ts:Zi(t)}),oe(oe.G+oe.W+oe.F*!vs,{Promise:hs}),$(hs,as),bo(as),es=m[as],oe(oe.S+oe.F*!vs,as,{reject:function(t){var e=ds(this);return(0,e.reject)(t),e.promise}}),oe(oe.S+oe.F*!vs,as,{resolve:function(t){return Ki(this,t)}}),oe(oe.S+oe.F*!(vs&&Yr(function(t){hs.all(t).catch(Yi)})),as,{all:function(t){var s=this,e=ds(s),a=e.resolve,c=e.reject,n=Wi(function(){var r=[],o=0,i=1;Ri(t,!1,function(t){var e=o++,n=!1;r.push(void 0),i++,s.resolve(t).then(function(t){n||(n=!0,r[e]=t,--i||a(r))},c)}),--i||a(r)});return n.e&&c(n.v),e.promise},race:function(t){var e=this,n=ds(e),r=n.reject,o=Wi(function(){Ri(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}});function Es(t,e){if(!zt(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}function Is(t,e){var n,r=As(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n}function ws(r,t,e,n,o,i){function s(t){var n=v[t];R(v,t,"delete"==t?function(t){return!(i&&!zt(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!zt(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return i&&!zt(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})}var a,c,u,f,l,h=Kt[r],p=h,d=o?"set":"add",v=p&&p.prototype,g={};return"function"==typeof p&&(i||v.forEach&&!Bt(function(){(new p).entries().next()}))?(c=(a=new p)[d](i?{}:-0,1)!=a,u=Bt(function(){a.has(1)}),f=Yr(function(t){new p(t)}),l=!i&&Bt(function(){for(var t=new p,e=5;e--;)t[d](e,e);return!t.has(-0)}),f||(((p=t(function(t,e){wi(t,p,r);var n=on(new h,t,p);return null!=e&&Ri(e,o,n[d],n),n})).prototype=v).constructor=p),(u||l)&&(s("delete"),s("has"),o&&s("get")),(l||c)&&s(d),i&&v.clear&&delete v.clear):(p=n.getConstructor(t,r,o,d),qi(p.prototype,e),q.NEED=!0),$(p,r),g[r]=p,oe(oe.G+oe.W+oe.F*(p!=h),g),i||n.setStrong(p,r,o),p}function _s(t){return t._l||(t._l=new Us)}function Ts(t,e){return Ns(t.a,function(t){return t[0]===e})}var Ps=Jt.f,As=q.fastKey,bs=Yt?"_s":"size",Rs={getConstructor:function(t,i,n,r){var o=t(function(t,e){wi(t,o,i,"_i"),t._t=i,t._i=ae(null),t._f=void 0,t._l=void 0,t[bs]=0,null!=e&&Ri(e,n,t[r],t)});return qi(o.prototype,{clear:function(){for(var t=Es(this,i),e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[bs]=0},delete:function(t){var e,n,r=Es(this,i),o=Is(r,t);return o&&(e=o.n,n=o.p,delete r._i[o.i],o.r=!0,n&&(n.n=e),e&&(e.p=n),r._f==o&&(r._f=e),r._l==o&&(r._l=n),r[bs]--),!!o},forEach:function(t,e){Es(this,i);for(var n,r=Zt(t,1<arguments.length?e:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!Is(Es(this,i),t)}}),Yt&&Ps(o.prototype,"size",{get:function(){return Es(this,i)[bs]}}),o},def:function(t,e,n){var r,o,i=Is(t,e);return i?i.v=n:(t._l=i={i:o=As(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[bs]++,"F"!==o&&(t._i[o]=i)),t},getEntry:Is,setStrong:function(t,n,e){cr(t,n,function(t,e){this._t=Es(t,n),this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?Oo(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,Oo(1))},e?"entries":"values",!e,!0),bo(n)}},Os=ws("Map",function(e){return function(t){return e(this,0<arguments.length?t:void 0)}},{get:function(t){var e=Rs.getEntry(Es(this,"Map"),t);return e&&e.v},set:function(t,e){return Rs.def(Es(this,"Map"),0===t?0:t,e)}},Rs,!0),Cs=ws("Set",function(e){return function(t){return e(this,0<arguments.length?t:void 0)}},{add:function(t){return Rs.def(Es(this,"Set"),t=0===t?0:t,t)}},Rs),ks=q.getWeak,Ns=eo(5),xs=eo(6),Ms=0,Us=function(){this.a=[]};Us.prototype={get:function(t){var e=Ts(this,t);if(e)return e[1]},has:function(t){return!!Ts(this,t)},set:function(t,e){var n=Ts(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(e){var t=xs(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}};var Ls={getConstructor:function(t,n,r,o){var i=t(function(t,e){wi(t,i,n,"_i"),t._t=n,t._i=Ms++,t._l=void 0,null!=e&&Ri(e,r,t[o],t)});return qi(i.prototype,{delete:function(t){if(!zt(t))return!1;var e=ks(t);return!0===e?_s(Es(this,n)).delete(t):e&&qt(e,this._i)&&delete e[this._i]},has:function(t){if(!zt(t))return!1;var e=ks(t);return!0===e?_s(Es(this,n)).has(t):e&&qt(e,this._i)}}),i},def:function(t,e,n){var r=ks(_(e),!0);return!0===r?_s(t).set(e,n):r[t._i]=n,t},ufstore:_s},Ds=d(function(t){function e(e){return function(t){return e(this,0<arguments.length?t:void 0)}}var i,n=eo(0),r=!Kt.ActiveXObject&&"ActiveXObject"in Kt,o="WeakMap",s=q.getWeak,a=Object.isExtensible,c=Ls.ufstore,u={get:function(t){if(zt(t)){var e=s(t);return!0===e?c(Es(this,o)).get(t):e?e[this._i]:void 0}},set:function(t,e){return Ls.def(Es(this,o),t,e)}},f=t.exports=ws(o,e,u,Ls,!0,!0);r&&(i=Ls.getConstructor(e,o),be(i.prototype,u),q.NEED=!0,n(["delete","has","get","set"],function(r){var t=f.prototype,o=t[r];R(t,r,function(t,e){if(!zt(t)||a(t))return o.call(this,t,e);this._f||(this._f=new i);var n=this._f[r](t,e);return"set"==r?this:n})}))}),js="WeakSet";ws(js,function(e){return function(t){return e(this,0<arguments.length?t:void 0)}},{add:function(t){return Ls.def(Es(this,js),t,!0)}},Ls,!1,!0);for(var Fs,Vs=Wt("typed_array"),$s=Wt("view"),Hs=!(!Kt.ArrayBuffer||!Kt.DataView),Bs=Hs,Gs=0,Ws="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");Gs<9;)(Fs=Kt[Ws[Gs++]])?(Qt(Fs.prototype,Vs,!0),Qt(Fs.prototype,$s,!0)):Bs=!1;function Ks(t){if(void 0===t)return 0;var e=te(t),n=se(e);if(e!==n)throw RangeError("Wrong length!");return n}var qs={ABV:Hs,CONSTR:Bs,TYPED:Vs,VIEW:$s},Ys=d(function(t,e){var n=ce.f,r=Jt.f,o="ArrayBuffer",i="DataView",s="prototype",l="Wrong index!",a=Kt[o],c=Kt[i],u=Kt.Math,h=Kt.RangeError,p=Kt.Infinity,f=a,d=u.abs,v=u.pow,g=u.floor,y=u.log,m=u.LN2,S="byteLength",E="byteOffset",I=Yt?"_b":"buffer",w=Yt?"_l":S,_=Yt?"_o":E;function T(t,e,n){var r,o,i,s=new Array(n),a=8*n-e-1,c=(1<<a)-1,u=c>>1,f=23===e?v(2,-24)-v(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=d(t))!=t||t===p?(o=t!=t?1:0,r=c):(r=g(y(t)/m),t*(i=v(2,-r))<1&&(r--,i*=2),2<=(t+=1<=r+u?f/i:f*v(2,1-u))*i&&(r++,i/=2),c<=r+u?(o=0,r=c):1<=r+u?(o=(t*i-1)*v(2,e),r+=u):(o=t*v(2,u-1)*v(2,e),r=0));8<=e;s[l++]=255&o,o/=256,e-=8);for(r=r<<e|o,a+=e;0<a;s[l++]=255&r,r/=256,a-=8);return s[--l]|=128*h,s}function P(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,s=i>>1,a=o-7,c=n-1,u=t[c--],f=127&u;for(u>>=7;0<a;f=256*f+t[c],c--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=e;0<a;r=256*r+t[c],c--,a-=8);if(0===f)f=1-s;else{if(f===i)return r?NaN:u?-p:p;r+=v(2,e),f-=s}return(u?-1:1)*r*v(2,f-e)}function A(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function b(t){return[255&t]}function R(t){return[255&t,t>>8&255]}function O(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function C(t){return T(t,52,8)}function k(t){return T(t,23,4)}function N(t,e,n){r(t[s],e,{get:function(){return this[n]}})}function x(t,e,n,r){var o=Ks(+n);if(o+e>t[w])throw h(l);var i=t[I]._b,s=o+t[_],a=i.slice(s,s+e);return r?a:a.reverse()}function M(t,e,n,r,o,i){var s=Ks(+n);if(s+e>t[w])throw h(l);for(var a=t[I]._b,c=s+t[_],u=r(+o),f=0;f<e;f++)a[c+f]=u[i?f:e-f-1]}if(qs.ABV){if(!Bt(function(){a(1)})||!Bt(function(){new a(-1)})||Bt(function(){return new a,new a(1.5),new a(NaN),a.name!=o})){for(var U,L=(a=function(t){return wi(this,a),new f(Ks(t))})[s]=f[s],D=n(f),j=0;D.length>j;)(U=D[j++])in a||Qt(a,U,f[U]);L.constructor=a}var F=new c(new a(2)),V=c[s].setInt8;F.setInt8(0,2147483648),F.setInt8(1,2147483649),!F.getInt8(0)&&F.getInt8(1)||qi(c[s],{setInt8:function(t,e){V.call(this,t,e<<24>>24)},setUint8:function(t,e){V.call(this,t,e<<24>>24)}},!0)}else a=function(t){wi(this,a,o);var e=Ks(t);this._b=Eo.call(new Array(e),0),this[w]=e},c=function(t,e,n){wi(this,c,i),wi(t,a,i);var r=t[w],o=te(e);if(o<0||r<o)throw h("Wrong offset!");if(r<o+(n=void 0===n?r-o:se(n)))throw h("Wrong length!");this[I]=t,this[_]=o,this[w]=n},Yt&&(N(a,S,"_l"),N(c,"buffer","_b"),N(c,S,"_l"),N(c,E,"_o")),qi(c[s],{getInt8:function(t){return x(this,1,t)[0]<<24>>24},getUint8:function(t){return x(this,1,t)[0]},getInt16:function(t,e){var n=x(this,2,t,e);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t,e){var n=x(this,2,t,e);return n[1]<<8|n[0]},getInt32:function(t,e){return A(x(this,4,t,e))},getUint32:function(t,e){return A(x(this,4,t,e))>>>0},getFloat32:function(t,e){return P(x(this,4,t,e),23,4)},getFloat64:function(t,e){return P(x(this,8,t,e),52,8)},setInt8:function(t,e){M(this,1,t,b,e)},setUint8:function(t,e){M(this,1,t,b,e)},setInt16:function(t,e,n){M(this,2,t,R,e,n)},setUint16:function(t,e,n){M(this,2,t,R,e,n)},setInt32:function(t,e,n){M(this,4,t,O,e,n)},setUint32:function(t,e,n){M(this,4,t,O,e,n)},setFloat32:function(t,e,n){M(this,4,t,k,e,n)},setFloat64:function(t,e,n){M(this,8,t,C,e,n)}});$(a,o),$(c,i),Qt(c[s],qs.VIEW,!0),e[o]=a,e[i]=c}),zs=Kt.ArrayBuffer,Js=Ys.ArrayBuffer,Xs=Ys.DataView,Qs=qs.ABV&&zs.isView,Zs=Js.prototype.slice,ta=qs.VIEW,ea="ArrayBuffer";oe(oe.G+oe.W+oe.F*(zs!==Js),{ArrayBuffer:Js}),oe(oe.S+oe.F*!qs.CONSTR,ea,{isView:function(t){return Qs&&Qs(t)||zt(t)&&ta in t}}),oe(oe.P+oe.U+oe.F*Bt(function(){return!new Js(2).slice(1,void 0).byteLength}),ea,{slice:function(t,e){if(void 0!==Zs&&void 0===e)return Zs.call(_(this),t);for(var n=_(this).byteLength,r=ee(t,n),o=ee(void 0===e?n:e,n),i=new(pi(this,Js))(se(o-r)),s=new Xs(this),a=new Xs(i),c=0;r<o;)a.setUint8(c++,s.getUint8(r++));return i}}),bo(ea),oe(oe.G+oe.W+oe.F*!qs.ABV,{DataView:Ys.DataView});var na=d(function(t){var y,m,S,E,d,I,n,w,e,r,_,T,i,o,s,P,A,v,g,b,R,O,C,a,c,u,f,l,h,k,N,x,p,M,U,L,D,j,F,V,$,H,B,G,W,K,q,Y,z,J,X,Q,Z,tt,et,nt,rt,ot,it,st,at,ct,ut,ft,lt,ht,pt,dt,vt,gt,yt,mt,St,Et,It,wt,_t,Tt,Pt,At,bt,Rt,Ot,Ct,kt,Nt,xt,Mt,Ut,Lt,Dt,jt,Ft,Vt,$t,Ht;Yt?(y=Kt,m=Bt,S=oe,E=qs,d=Zt,I=wi,n=Xt,w=Qt,e=qi,r=te,_=se,T=Ks,i=ee,o=Gt,s=qt,P=ke,A=zt,v=re,g=Fr,b=ae,R=we,O=ce.f,C=Gr,a=Wt,c=ie,u=eo,f=ne,l=pi,h=Co,k=or,N=Yr,x=bo,p=Eo,M=go,L=ue,D=(U=Jt).f,j=L.f,F=y.RangeError,V=y.TypeError,$=y.Uint8Array,B="Shared"+(H="ArrayBuffer"),G="BYTES_PER_ELEMENT",W="prototype",K=Array[W],q=Ys.ArrayBuffer,Y=Ys.DataView,z=u(0),J=u(2),X=u(3),Q=u(4),Z=u(5),tt=u(6),et=f(!0),nt=f(!1),rt=h.values,ot=h.keys,it=h.entries,st=K.lastIndexOf,at=K.reduce,ct=K.reduceRight,ut=K.join,ft=K.sort,lt=K.slice,ht=K.toString,pt=K.toLocaleString,dt=c("iterator"),vt=c("toStringTag"),gt=a("typed_constructor"),yt=a("def_constructor"),mt=E.CONSTR,St=E.TYPED,Et=E.VIEW,It="Wrong length!",wt=u(1,function(t,e){return bt(l(t,t[yt]),e)}),_t=m(function(){return 1===new $(new Uint16Array([1]).buffer)[0]}),Tt=!!$&&!!$[W].set&&m(function(){new $(1).set({})}),Pt=function(t,e){var n=r(t);if(n<0||n%e)throw F("Wrong offset!");return n},At=function(t){if(A(t)&&St in t)return t;throw V(t+" is not a typed array!")},bt=function(t,e){if(!(A(t)&&gt in t))throw V("It is not a typed array constructor!");return new t(e)},Rt=function(t,e){return Ot(l(t,t[yt]),e)},Ot=function(t,e){for(var n=0,r=e.length,o=bt(t,r);n<r;)o[n]=e[n++];return o},Ct=function(t,e,n){D(t,e,{get:function(){return this._d[n]}})},kt=function(t,e,n){var r,o,i,s,a,c,u=v(t),f=arguments.length,l=1<f?e:void 0,h=void 0!==l,p=C(u);if(null!=p&&!g(p)){for(c=p.call(u),i=[],r=0;!(a=c.next()).done;r++)i.push(a.value);u=i}for(h&&2<f&&(l=d(l,n,2)),r=0,o=_(u.length),s=bt(this,o);r<o;r++)s[r]=h?l(u[r],r):u[r];return s},Nt=function(){for(var t=0,e=arguments.length,n=bt(this,e);t<e;)n[t]=arguments[t++];return n},xt=!!$&&m(function(){pt.call(new $(1))}),Mt=function(){return pt.apply(xt?lt.call(At(this)):At(this),arguments)},Ut={copyWithin:function(t,e,n){return M.call(At(this),t,e,2<arguments.length?n:void 0)},every:function(t,e){return Q(At(this),t,1<arguments.length?e:void 0)},fill:function(t){return p.apply(At(this),arguments)},filter:function(t,e){return Rt(this,J(At(this),t,1<arguments.length?e:void 0))},find:function(t,e){return Z(At(this),t,1<arguments.length?e:void 0)},findIndex:function(t,e){return tt(At(this),t,1<arguments.length?e:void 0)},forEach:function(t,e){z(At(this),t,1<arguments.length?e:void 0)},indexOf:function(t,e){return nt(At(this),t,1<arguments.length?e:void 0)},includes:function(t,e){return et(At(this),t,1<arguments.length?e:void 0)},join:function(t){return ut.apply(At(this),arguments)},lastIndexOf:function(t){return st.apply(At(this),arguments)},map:function(t,e){return wt(At(this),t,1<arguments.length?e:void 0)},reduce:function(t){return at.apply(At(this),arguments)},reduceRight:function(t){return ct.apply(At(this),arguments)},reverse:function(){for(var t,e=this,n=At(e).length,r=Math.floor(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e},some:function(t,e){return X(At(this),t,1<arguments.length?e:void 0)},sort:function(t){return ft.call(At(this),t)},subarray:function(t,e){var n=At(this),r=n.length,o=i(t,r);return new(l(n,n[yt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,_((void 0===e?r:i(e,r))-o))}},Lt=function(t,e){return Rt(this,lt.call(At(this),t,e))},Dt=function(t,e){At(this);var n=Pt(e,1),r=this.length,o=v(t),i=_(o.length),s=0;if(r<i+n)throw F(It);for(;s<i;)this[n+s]=o[s++]},jt={entries:function(){return it.call(At(this))},keys:function(){return ot.call(At(this))},values:function(){return rt.call(At(this))}},Ft=function(t,e){return A(t)&&t[St]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Vt=function(t,e){return Ft(t,e=o(e,!0))?n(2,t[e]):j(t,e)},$t=function(t,e,n){return!(Ft(t,e=o(e,!0))&&A(n)&&s(n,"value"))||s(n,"get")||s(n,"set")||n.configurable||s(n,"writable")&&!n.writable||s(n,"enumerable")&&!n.enumerable?D(t,e,n):(t[e]=n.value,t)},mt||(L.f=Vt,U.f=$t),S(S.S+S.F*!mt,"Object",{getOwnPropertyDescriptor:Vt,defineProperty:$t}),m(function(){ht.call({})})&&(ht=pt=function(){return ut.call(this)}),Ht=e({},Ut),e(Ht,jt),w(Ht,dt,jt.values),e(Ht,{slice:Lt,set:Dt,constructor:function(){},toString:ht,toLocaleString:Mt}),Ct(Ht,"buffer","b"),Ct(Ht,"byteOffset","o"),Ct(Ht,"byteLength","l"),Ct(Ht,"length","e"),D(Ht,vt,{get:function(){return this[St]}}),t.exports=function(t,l,e,i){function h(t,o){D(t,o,{get:function(){return t=o,(e=this._d).v[n](t*l+e.o,_t);var t,e},set:function(t){return e=o,n=t,r=this._d,i&&(n=(n=Math.round(n))<0?0:255<n?255:255&n),void r.v[s](e*l+r.o,n,_t);var e,n,r},enumerable:!0})}var p=t+((i=!!i)?"Clamped":"")+"Array",n="get"+t,s="set"+t,d=y[p],a=d||{},r=d&&R(d),o=!d||!E.ABV,c={},u=d&&d[W];o?(d=e(function(t,e,n,r){I(t,d,p,"_d");var o,i,s,a,c=0,u=0;if(A(e)){if(!(e instanceof q||(a=P(e))==H||a==B))return St in e?Ot(d,e):kt.call(d,e);o=e,u=Pt(n,l);var f=e.byteLength;if(void 0===r){if(f%l)throw F(It);if((i=f-u)<0)throw F(It)}else if(f<(i=_(r)*l)+u)throw F(It);s=i/l}else s=T(e),o=new q(i=s*l);for(w(t,"_d",{b:o,o:u,l:i,e:s,v:new Y(o)});c<s;)h(t,c++)}),u=d[W]=b(Ht),w(u,"constructor",d)):m(function(){d(1)})&&m(function(){new d(-1)})&&N(function(t){new d,new d(null),new d(1.5),new d(t)},!0)||(d=e(function(t,e,n,r){var o;return I(t,d,p),A(e)?e instanceof q||(o=P(e))==H||o==B?void 0!==r?new a(e,Pt(n,l),r):void 0!==n?new a(e,Pt(n,l)):new a(e):St in e?Ot(d,e):kt.call(d,e):new a(T(e))}),z(r!==Function.prototype?O(a).concat(O(r)):O(a),function(t){t in d||w(d,t,a[t])}),(d[W]=u).constructor=d);var f=u[dt],v=!!f&&("values"==f.name||null==f.name),g=jt.values;w(d,gt,!0),w(u,St,p),w(u,Et,!0),w(u,yt,d),(i?new d(1)[vt]==p:vt in u)||D(u,vt,{get:function(){return p}}),c[p]=d,S(S.G+S.W+S.F*(d!=a),c),S(S.S,p,{BYTES_PER_ELEMENT:l}),S(S.S+S.F*m(function(){a.of.call(d,1)}),p,{from:kt,of:Nt}),G in u||w(u,G,l),S(S.P,p,Ut),x(p),S(S.P+S.F*Tt,p,{set:Dt}),S(S.P+S.F*!v,p,jt),u.toString!=ht&&(u.toString=ht),S(S.P+S.F*m(function(){new d(1).slice()}),p,{slice:Lt}),S(S.P+S.F*(m(function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()})||!m(function(){u.toLocaleString.call([1,2])})),p,{toLocaleString:Mt}),k[p]=v?f:g,v||w(u,dt,g)}):t.exports=function(){}});na("Int8",1,function(r){return function(t,e,n){return r(this,t,e,n)}}),na("Uint8",1,function(r){return function(t,e,n){return r(this,t,e,n)}}),na("Uint8",1,function(r){return function(t,e,n){return r(this,t,e,n)}},!0),na("Int16",2,function(r){return function(t,e,n){return r(this,t,e,n)}}),na("Uint16",2,function(r){return function(t,e,n){return r(this,t,e,n)}}),na("Int32",4,function(r){return function(t,e,n){return r(this,t,e,n)}}),na("Uint32",4,function(r){return function(t,e,n){return r(this,t,e,n)}}),na("Float32",4,function(r){return function(t,e,n){return r(this,t,e,n)}}),na("Float64",8,function(r){return function(t,e,n){return r(this,t,e,n)}});var ra=(Kt.Reflect||{}).apply,oa=Function.apply;oe(oe.S+oe.F*!Bt(function(){ra(function(){})}),"Reflect",{apply:function(t,e,n){var r=g(t),o=_(n);return ra?ra(r,e,o):oa.call(r,e,o)}});var ia=(Kt.Reflect||{}).construct,sa=Bt(function(){function t(){}return!(ia(function(){},[],t)instanceof t)}),aa=!Bt(function(){ia(function(){})});oe(oe.S+oe.F*(sa||aa),"Reflect",{construct:function(t,e,n){g(t),_(e);var r=arguments.length<3?t:g(n);if(aa&&!sa)return ia(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var o=[null];return o.push.apply(o,e),new(je.apply(t,o))}var i=r.prototype,s=ae(zt(i)?i:Object.prototype),a=Function.apply.call(t,s,e);return zt(a)?a:s}}),oe(oe.S+oe.F*Bt(function(){Reflect.defineProperty(Jt.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){_(t),e=Gt(e,!0),_(n);try{return Jt.f(t,e,n),!0}catch(t){return!1}}});var ca=ue.f;oe(oe.S,"Reflect",{deleteProperty:function(t,e){var n=ca(_(t),e);return!(n&&!n.configurable)&&delete t[e]}});function ua(t){this._t=_(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)}sr(ua,"Object",function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),oe(oe.S,"Reflect",{enumerate:function(t){return new ua(t)}}),oe(oe.S,"Reflect",{get:function t(e,n){var r,o,i=arguments.length<3?e:arguments[2];return _(e)===i?e[n]:(r=ue.f(e,n))?qt(r,"value")?r.value:void 0!==r.get?r.get.call(i):void 0:zt(o=we(e))?t(o,n,i):void 0}}),oe(oe.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return ue.f(_(t),e)}}),oe(oe.S,"Reflect",{getPrototypeOf:function(t){return we(_(t))}}),oe(oe.S,"Reflect",{has:function(t,e){return e in t}});var fa=Object.isExtensible;oe(oe.S,"Reflect",{isExtensible:function(t){return _(t),!fa||fa(t)}});var la=Kt.Reflect,ha=la&&la.ownKeys||function(t){var e=ce.f(_(t)),n=ft.f;return n?e.concat(n(t)):e};oe(oe.S,"Reflect",{ownKeys:ha});var pa=Object.preventExtensions;oe(oe.S,"Reflect",{preventExtensions:function(t){_(t);try{return pa&&pa(t),!0}catch(t){return!1}}}),oe(oe.S,"Reflect",{set:function t(e,n,r){var o,i,s=arguments.length<4?e:arguments[3],a=ue.f(_(e),n);if(!a){if(zt(i=we(e)))return t(i,n,r,s);a=Xt(0)}if(qt(a,"value")){if(!1===a.writable||!zt(s))return!1;if(o=ue.f(s,n)){if(o.get||o.set||!1===o.writable)return!1;o.value=r,Jt.f(s,n,o)}else Jt.f(s,n,Xt(0,r));return!0}return void 0!==a.set&&(a.set.call(s,r),!0)}}),Ce&&oe(oe.S,"Reflect",{setPrototypeOf:function(t,e){Ce.check(t,e);try{return Ce.set(t,e),!0}catch(t){return!1}}});var da=ne(!0);oe(oe.P,"Array",{includes:function(t,e){return da(this,t,1<arguments.length?e:void 0)}}),So("includes");var va=ie("isConcatSpreadable");var ga=function t(e,n,r,o,i,s,a,c){for(var u,f,l=i,h=0,p=!!a&&Zt(a,c,3);h<o;){if(h in r){if(u=p?p(r[h],h,n):r[h],f=!1,zt(u)&&(f=void 0!==(f=u[va])?!!f:ht(u)),f&&0<s)l=t(e,n,u,se(u.length),l,s-1)-1;else{if(9007199254740991<=l)throw TypeError();e[l]=u}l++}h++}return l};oe(oe.P,"Array",{flatMap:function(t,e){var n,r,o=re(this);return g(t),n=se(o.length),r=to(o,0),ga(r,o,o,n,0,1,t,e),r}}),So("flatMap"),oe(oe.P,"Array",{flatten:function(t){var e=t,n=re(this),r=se(n.length),o=to(n,0);return ga(o,n,n,r,0,void 0===e?1:te(e)),o}}),So("flatten");var ya=rr(!0);oe(oe.P,"String",{at:function(t){return ya(this,t)}});function ma(t,e,n,r){var o=String(U(t)),i=o.length,s=void 0===n?" ":String(n),a=se(e);if(a<=i||""==s)return o;var c=a-i,u=wn.call(s,Math.ceil(c/s.length));return u.length>c&&(u=u.slice(0,c)),r?u+o:o+u}var Sa=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(os);oe(oe.P+oe.F*Sa,"String",{padStart:function(t,e){return ma(this,t,1<arguments.length?e:void 0,!0)}});var Ea=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(os);oe(oe.P+oe.F*Ea,"String",{padEnd:function(t,e){return ma(this,t,1<arguments.length?e:void 0,!1)}}),Je("trimLeft",function(t){return function(){return t(this,1)}},"trimStart"),Je("trimRight",function(t){return function(){return t(this,2)}},"trimEnd");function Ia(t,e){this._r=t,this._s=e}var wa=RegExp.prototype;sr(Ia,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),oe(oe.P,"String",{matchAll:function(t){if(U(this),!dr(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in wa?String(t.flags):ko.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=se(t.lastIndex),new Ia(r,e)}}),x("asyncIterator"),x("observable"),oe(oe.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=L(t),o=ue.f,i=ha(r),s={},a=0;i.length>a;)void 0!==(n=o(r,e=i[a++]))&&Vr(s,e,n);return s}});function _a(a){return function(t){for(var e,n=L(t),r=ut(n),o=r.length,i=0,s=[];i<o;)e=r[i++],Yt&&!Ta.call(n,e)||s.push(a?[e,n[e]]:n[e]);return s}}var Ta=lt.f,Pa=_a(!1);oe(oe.S,"Object",{values:function(t){return Pa(t)}});var Aa=_a(!0);oe(oe.S,"Object",{entries:function(t){return Aa(t)}});var ba=!Bt(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete Kt[t]});Yt&&oe(oe.P+ba,"Object",{__defineGetter__:function(t,e){Jt.f(re(this),t,{get:g(e),enumerable:!0,configurable:!0})}}),Yt&&oe(oe.P+ba,"Object",{__defineSetter__:function(t,e){Jt.f(re(this),t,{set:g(e),enumerable:!0,configurable:!0})}});var Ra=ue.f;Yt&&oe(oe.P+ba,"Object",{__lookupGetter__:function(t){var e,n=re(this),r=Gt(t,!0);do{if(e=Ra(n,r))return e.get}while(n=we(n))}});var Oa=ue.f;Yt&&oe(oe.P+ba,"Object",{__lookupSetter__:function(t){var e,n=re(this),r=Gt(t,!0);do{if(e=Oa(n,r))return e.set}while(n=we(n))}});function Ca(t,e){var n=[];return Ri(t,!1,n.push,n,e),n}function ka(t){return function(){if(ke(this)!=t)throw TypeError(t+"#toJSON isn't generic");return Ca(this)}}oe(oe.P+oe.R,"Map",{toJSON:ka("Map")}),oe(oe.P+oe.R,"Set",{toJSON:ka("Set")});function Na(t){oe(oe.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}Na("Map"),Na("Set"),Na("WeakMap"),Na("WeakSet");function xa(t){oe(oe.S,t,{from:function(t,e,n){var r,o,i,s,a=e;return g(this),(r=void 0!==a)&&g(a),null==t?new this:(o=[],r?(i=0,s=Zt(a,n,2),Ri(t,!1,function(t){o.push(s(t,i++))})):Ri(t,!1,o.push,o),new this(o))}})}xa("Map"),xa("Set"),xa("WeakMap"),xa("WeakSet"),oe(oe.G,{global:Kt}),oe(oe.S,"System",{global:Kt}),oe(oe.S,"Error",{isError:function(t){return"Error"===M(t)}}),oe(oe.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}}),oe(oe.S,"Math",{DEG_PER_RAD:Math.PI/180});var Ma=180/Math.PI;oe(oe.S,"Math",{degrees:function(t){return t*Ma}});var Ua=Math.scale||function(t,e,n,r,o){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||o!=o?NaN:t===1/0||t===-1/0?t:(t-e)*(o-r)/(n-e)+r};oe(oe.S,"Math",{fscale:function(t,e,n,r,o){return Jn(Ua(t,e,n,r,o))}}),oe(oe.S,"Math",{iaddh:function(t,e,n,r){var o=t>>>0,i=n>>>0;return(e>>>0)+(r>>>0)+((o&i|(o|i)&~(o+i>>>0))>>>31)|0}}),oe(oe.S,"Math",{isubh:function(t,e,n,r){var o=t>>>0,i=n>>>0;return(e>>>0)-(r>>>0)-((~o&i|~(o^i)&o-i>>>0)>>>31)|0}}),oe(oe.S,"Math",{imulh:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r,s=n>>16,a=r>>16,c=(s*i>>>0)+(o*i>>>16);return s*a+(c>>16)+((o*a>>>0)+(65535&c)>>16)}}),oe(oe.S,"Math",{RAD_PER_DEG:180/Math.PI});var La=Math.PI/180;oe(oe.S,"Math",{radians:function(t){return t*La}}),oe(oe.S,"Math",{scale:Ua}),oe(oe.S,"Math",{umulh:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r,s=n>>>16,a=r>>>16,c=(s*i>>>0)+(o*i>>>16);return s*a+(c>>>16)+((o*a>>>0)+(65535&c)>>>16)}}),oe(oe.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:0<t}}),oe(oe.P+oe.R,"Promise",{finally:function(e){var n=pi(this,m.Promise||Kt.Promise),t="function"==typeof e;return this.then(t?function(t){return Ki(n,e()).then(function(){return t})}:e,t?function(t){return Ki(n,e()).then(function(){throw t})}:e)}}),oe(oe.S,"Promise",{try:function(t){var e=ns.f(this),n=Wi(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}});function Da(t,e,n){var r=Fa.get(t);if(!r){if(!n)return;Fa.set(t,r=new Os)}var o=r.get(e);if(!o){if(!n)return;r.set(e,o=new Os)}return o}var ja=A("metadata"),Fa=ja.store||(ja.store=new Ds),Va={store:Fa,map:Da,has:function(t,e,n){var r=Da(e,n,!1);return void 0!==r&&r.has(t)},get:function(t,e,n){var r=Da(e,n,!1);return void 0===r?void 0:r.get(t)},set:function(t,e,n,r){Da(n,r,!0).set(t,e)},keys:function(t,e){var n=Da(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){oe(oe.S,"Reflect",t)}},$a=Va.key,Ha=Va.set;Va.exp({defineMetadata:function(t,e,n,r){Ha(t,e,_(n),$a(r))}});var Ba=Va.key,Ga=Va.map,Wa=Va.store;Va.exp({deleteMetadata:function(t,e,n){var r=arguments.length<3?void 0:Ba(n),o=Ga(_(e),r,!1);if(void 0===o||!o.delete(t))return!1;if(o.size)return!0;var i=Wa.get(e);return i.delete(r),!!i.size||Wa.delete(e)}});var Ka=Va.has,qa=Va.get,Ya=Va.key,za=function(t,e,n){if(Ka(t,e,n))return qa(t,e,n);var r=we(e);return null!==r?za(t,r,n):void 0};Va.exp({getMetadata:function(t,e,n){return za(t,_(e),arguments.length<3?void 0:Ya(n))}});var Ja=Va.keys,Xa=Va.key,Qa=function(t,e){var n=Ja(t,e),r=we(t);if(null===r)return n;var o=Qa(r,e);return o.length?n.length?Ca(new Cs(n.concat(o))):o:n};Va.exp({getMetadataKeys:function(t,e){return Qa(_(t),arguments.length<2?void 0:Xa(e))}});var Za=Va.get,tc=Va.key;Va.exp({getOwnMetadata:function(t,e,n){return Za(t,_(e),arguments.length<3?void 0:tc(n))}});var ec=Va.keys,nc=Va.key;Va.exp({getOwnMetadataKeys:function(t,e){return ec(_(t),arguments.length<2?void 0:nc(e))}});var rc=Va.has,oc=Va.key,ic=function(t,e,n){if(rc(t,e,n))return!0;var r=we(e);return null!==r&&ic(t,r,n)};Va.exp({hasMetadata:function(t,e,n){return ic(t,_(e),arguments.length<3?void 0:oc(n))}});var sc=Va.has,ac=Va.key;Va.exp({hasOwnMetadata:function(t,e,n){return sc(t,_(e),arguments.length<3?void 0:ac(n))}});var cc=Va.key,uc=Va.set;Va.exp({metadata:function(n,r){return function(t,e){uc(n,r,(void 0!==e?_:g)(t),cc(e))}}});var fc=Di(),lc=Kt.process,hc="process"==M(lc);oe(oe.G,{asap:function(t){var e=hc&&lc.domain;fc(e?e.bind(t):t)}});function pc(t){return null==t?void 0:g(t)}function dc(t){var e=t._c;e&&(t._c=void 0,e())}function vc(t){return void 0===t._o}function gc(t){vc(t)||(t._o=void 0,dc(t))}function yc(e,t){_(e),this._c=void 0,this._o=e,e=new Ic(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:g(n),this._c=n)}catch(t){return void e.error(t)}vc(this)&&dc(this)}var mc=Di(),Sc=ie("observable"),Ec=Ri.RETURN;yc.prototype=qi({},{unsubscribe:function(){gc(this)}});var Ic=function(t){this._s=t};Ic.prototype=qi({},{next:function(t){var e=this._s;if(!vc(e)){var n=e._o;try{var r=pc(n.next);if(r)return r.call(n,t)}catch(t){try{gc(e)}finally{throw t}}}},error:function(t){var e=this._s;if(vc(e))throw t;var n=e._o;e._o=void 0;try{var r=pc(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{dc(e)}finally{throw t}}return dc(e),t},complete:function(t){var e=this._s;if(!vc(e)){var n=e._o;e._o=void 0;try{var r=pc(n.complete);t=r?r.call(n,t):void 0}catch(t){try{dc(e)}finally{throw t}}return dc(e),t}}});var wc=function(t){wi(this,wc,"Observable","_f")._f=g(t)};qi(wc.prototype,{subscribe:function(t){return new yc(t,this._f)},forEach:function(r){var o=this;return new(m.Promise||Kt.Promise)(function(t,e){g(r);var n=o.subscribe({next:function(t){try{return r(t)}catch(t){e(t),n.unsubscribe()}},error:e,complete:t})})}}),qi(wc,{from:function(t){var e="function"==typeof this?this:wc,n=pc(_(t)[Sc]);if(n){var r=_(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return mc(function(){if(!n){try{if(Ri(t,!1,function(t){if(e.next(t),n)return Ec})===Ec)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,r=new Array(e);t<e;)r[t]=arguments[t++];return new("function"==typeof this?this:wc)(function(e){var n=!1;return mc(function(){if(!n){for(var t=0;t<r.length;++t)if(e.next(r[t]),n)return;e.complete()}}),function(){n=!0}})}}),Qt(wc.prototype,Sc,function(){return this}),oe(oe.G,{Observable:wc}),bo("Observable");function _c(o){return function(t,e){var n=2<arguments.length,r=n&&Tc.call(arguments,2);return o(n?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,e)}}var Tc=[].slice,Pc=/MSIE .\./.test(os);oe(oe.G+oe.B+oe.F*Pc,{setTimeout:_c(Kt.setTimeout),setInterval:_c(Kt.setInterval)}),oe(oe.G+oe.B,{setImmediate:ji.set,clearImmediate:ji.clear});for(var Ac=ie("iterator"),bc=ie("toStringTag"),Rc=or.Array,Oc={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Cc=ut(Oc),kc=0;kc<Cc.length;kc++){var Nc,xc=Cc[kc],Mc=Oc[xc],Uc=Kt[xc],Lc=Uc&&Uc.prototype;if(Lc&&(Lc[Ac]||Qt(Lc,Ac,Rc),Lc[bc]||Qt(Lc,bc,xc),or[xc]=Rc,Mc))for(Nc in Co)Lc[Nc]||R(Lc,Nc,Co[Nc],!0)}d(function(t){function i(t,e,n,r){var i,s,a,c,o=e&&e.prototype instanceof h?e:h,u=Object.create(o.prototype),f=new p(r||[]);return u._invoke=(i=t,s=n,a=f,c=g,function(t,e){if(c===m)throw new Error("Generator is already running");if(c===S){if("throw"===t)throw e;return d()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){var r=function t(e,n){var r=e.iterator[n.method];if(r===v){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=v,t(e,n),"throw"===n.method))return E;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,E;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=v),n.delegate=null,E):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,E)}(n,a);if(r){if(r===E)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===g)throw c=S,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=m;var o=l(i,s,a);if("normal"===o.type){if(c=a.done?S:y,o.arg===E)continue;return{value:o.arg,done:a.done}}"throw"===o.type&&(c=S,a.method="throw",a.arg=o.arg)}}),u}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function h(){}function n(){}function e(){}function r(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function s(a){function c(t,e,n,r){var o=l(a[t],a,e);if("throw"!==o.type){var i=o.arg,s=i.value;return s&&"object"==typeof s&&P.call(s,"__await")?Promise.resolve(s.__await).then(function(t){c("next",t,n,r)},function(t){c("throw",t,n,r)}):Promise.resolve(s).then(function(t){i.value=t,n(i)},r)}r(o.arg)}var e;"object"==typeof u.process&&u.process.domain&&(c=u.process.domain.bind(c)),this._invoke=function(n,r){function t(){return new Promise(function(t,e){c(n,r,t,e)})}return e=e?e.then(t,t):t()}}function o(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function a(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function p(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(o,this),this.reset(!0)}function c(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(P.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=v,t.done=!0,t};return r.next=r}}return{next:d}}function d(){return{value:v,done:!0}}var u,v,g,y,m,S,E,f,I,w,_,T,P,A,b,R,O,C;u="object"==typeof N?N:"object"==typeof window?window:"object"==typeof self?self:N,T=Object.prototype,P=T.hasOwnProperty,A="function"==typeof Symbol?Symbol:{},b=A.iterator||"@@iterator",R=A.asyncIterator||"@@asyncIterator",O=A.toStringTag||"@@toStringTag",(C=u.regeneratorRuntime)?t.exports=C:((C=u.regeneratorRuntime=t.exports).wrap=i,g="suspendedStart",y="suspendedYield",m="executing",S="completed",E={},(f={})[b]=function(){return this},(w=(I=Object.getPrototypeOf)&&I(I(c([]))))&&w!==T&&P.call(w,b)&&(f=w),_=e.prototype=h.prototype=Object.create(f),(n.prototype=_.constructor=e).constructor=n,e[O]=n.displayName="GeneratorFunction",C.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===n||"GeneratorFunction"===(e.displayName||e.name))},C.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,e):(t.__proto__=e,O in t||(t[O]="GeneratorFunction")),t.prototype=Object.create(_),t},C.awrap=function(t){return{__await:t}},r(s.prototype),s.prototype[R]=function(){return this},C.AsyncIterator=s,C.async=function(t,e,n,r){var o=new s(i(t,e,n,r));return C.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},r(_),_[O]="Generator",_[b]=function(){return this},_.toString=function(){return"[object Generator]"},C.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},C.values=c,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(a),!t)for(var e in this)"t"===e.charAt(0)&&P.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=v)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return i.type="throw",i.arg=n,r.next=t,e&&(r.method="next",r.arg=v),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var s=P.call(o,"catchLoc"),a=P.call(o,"finallyLoc");if(s&&a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&P.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,E):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),E},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),a(n),E}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r,o=n.completion;return"throw"===o.type&&(r=o.arg,a(n)),r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:c(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=v),E}})});var Dc,jc,Fc,Vc=(Dc=/[\\^$*+?.()|[\]{}]/g,Fc=(jc="\\$&")===Object(jc)?function(t){return jc[t]}:jc,function(t){return String(t).replace(Dc,Fc)});oe(oe.S,"RegExp",{escape:function(t){return Vc(t)}});m.RegExp.escape;if(N._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");N._babelPolyfill=!0;function $c(t,e,n){t[e]||Object.defineProperty(t,e,{writable:!0,configurable:!0,value:n})}$c(String.prototype,"padLeft","".padStart),$c(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&$c(Array,t,Function.call.bind([][t]))});function Hc(n,r){return function(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];return n.apply(r,t)}}var Bc=Object.prototype.toString;function Gc(t){return"[object Array]"===Bc.call(t)}function Wc(t){return void 0===t}function Kc(t){return null!==t&&"object"==typeof t}function qc(t){return"[object Function]"===Bc.call(t)}function Yc(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),Gc(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var zc={isArray:Gc,isArrayBuffer:function(t){return"[object ArrayBuffer]"===Bc.call(t)},isBuffer:function(t){return null!==t&&!Wc(t)&&null!==t.constructor&&!Wc(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){var e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer;return e},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:Kc,isUndefined:Wc,isDate:function(t){return"[object Date]"===Bc.call(t)},isFile:function(t){return"[object File]"===Bc.call(t)},isBlob:function(t){return"[object Blob]"===Bc.call(t)},isFunction:qc,isStream:function(t){return Kc(t)&&qc(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:Yc,merge:function n(){var r={};function t(t,e){"object"==typeof r[e]&&"object"==typeof t?r[e]=n(r[e],t):r[e]=t}for(var e=0,o=arguments.length;e<o;e++)Yc(arguments[e],t);return r},deepMerge:function n(){var r={};function t(t,e){"object"==typeof r[e]&&"object"==typeof t?r[e]=n(r[e],t):r[e]="object"==typeof t?n({},t):t}for(var e=0,o=arguments.length;e<o;e++)Yc(arguments[e],t);return r},extend:function(n,t,r){return Yc(t,function(t,e){n[e]=r&&"function"==typeof t?Hc(t,r):t}),n},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}};function Jc(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xc(t,e,n){if(!e)return t;var r,o,i=n?n(e):zc.isURLSearchParams(e)?e.toString():(r=[],zc.forEach(e,function(t,e){null!=t&&(zc.isArray(t)?e+="[]":t=[t],zc.forEach(t,function(t){zc.isDate(t)?t=t.toISOString():zc.isObject(t)&&(t=JSON.stringify(t)),r.push(Jc(e)+"="+Jc(t))}))}),r.join("&"));return i&&(-1!==(o=t.indexOf("#"))&&(t=t.slice(0,o)),t+=(-1===t.indexOf("?")?"?":"&")+i),t}function Qc(){this.handlers=[]}Qc.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},Qc.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},Qc.prototype.forEach=function(e){zc.forEach(this.handlers,function(t){null!==t&&e(t)})};function Zc(e,n,t){return zc.forEach(t,function(t){e=t(e,n)}),e}function tu(t){return!(!t||!t.__CANCEL__)}function eu(n,r){zc.forEach(n,function(t,e){e!==r&&e.toUpperCase()===r.toUpperCase()&&(n[r]=t,delete n[e])})}function nu(t,e,n,r,o){var i,s,a,c,u,f=new Error(t);return s=e,a=n,c=r,u=o,(i=f).config=s,a&&(i.code=a),i.request=c,i.response=u,i.isAxiosError=!0,i.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},i}var ru,ou,iu,su=Qc,au=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],cu=zc.isStandardBrowserEnv()?(ou=/(msie|trident)/i.test(navigator.userAgent),iu=document.createElement("a"),ru=uu(window.location.href),function(t){var e=zc.isString(t)?uu(t):t;return e.protocol===ru.protocol&&e.host===ru.host}):function(){return!0};function uu(t){var e=t;return ou&&(iu.setAttribute("href",e),e=iu.href),iu.setAttribute("href",e),{href:iu.href,protocol:iu.protocol?iu.protocol.replace(/:$/,""):"",host:iu.host,search:iu.search?iu.search.replace(/^\?/,""):"",hash:iu.hash?iu.hash.replace(/^#/,""):"",hostname:iu.hostname,port:iu.port,pathname:"/"===iu.pathname.charAt(0)?iu.pathname:"/"+iu.pathname}}function fu(d){return new Promise(function(l,h){var n=d.data,r=d.headers;zc.isFormData(n)&&delete r["Content-Type"];var t,e,p=new XMLHttpRequest;d.auth&&(t=d.auth.username||"",e=d.auth.password||"",r.Authorization="Basic "+btoa(t+":"+e));var o,i,s,a,c,u,f=(o=d.baseURL,i=d.url,o&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(i)?(s=o,(a=i)?s.replace(/\/+$/,"")+"/"+a.replace(/^\/+/,""):s):i);if(p.open(d.method.toUpperCase(),Xc(f,d.params,d.paramsSerializer),!0),p.timeout=d.timeout,p.onreadystatechange=function(){var t,e,n,r,o,i,s,a,c,u,f;p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&(t="getAllResponseHeaders"in p?(e=p.getAllResponseHeaders(),i={},e&&zc.forEach(e.split("\n"),function(t){if(o=t.indexOf(":"),n=zc.trim(t.substr(0,o)).toLowerCase(),r=zc.trim(t.substr(o+1)),n){if(i[n]&&0<=au.indexOf(n))return;i[n]="set-cookie"===n?(i[n]?i[n]:[]).concat([r]):i[n]?i[n]+", "+r:r}}),i):null,s={data:d.responseType&&"text"!==d.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:t,config:d,request:p},a=l,c=h,!(f=(u=s).config.validateStatus)||f(u.status)?a(u):c(nu("Request failed with status code "+u.status,u.config,null,u.request,u)),p=null)},p.onabort=function(){p&&(h(nu("Request aborted",d,"ECONNABORTED",p)),p=null)},p.onerror=function(){h(nu("Network Error",d,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+d.timeout+"ms exceeded";d.timeoutErrorMessage&&(t=d.timeoutErrorMessage),h(nu(t,d,"ECONNABORTED",p)),p=null},zc.isStandardBrowserEnv()&&(c=lu,(u=(d.withCredentials||cu(f))&&d.xsrfCookieName?c.read(d.xsrfCookieName):void 0)&&(r[d.xsrfHeaderName]=u)),"setRequestHeader"in p&&zc.forEach(r,function(t,e){void 0===n&&"content-type"===e.toLowerCase()?delete r[e]:p.setRequestHeader(e,t)}),zc.isUndefined(d.withCredentials)||(p.withCredentials=!!d.withCredentials),d.responseType)try{p.responseType=d.responseType}catch(t){if("json"!==d.responseType)throw t}"function"==typeof d.onDownloadProgress&&p.addEventListener("progress",d.onDownloadProgress),"function"==typeof d.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",d.onUploadProgress),d.cancelToken&&d.cancelToken.promise.then(function(t){p&&(p.abort(),h(t),p=null)}),void 0===n&&(n=null),p.send(n)})}var lu=zc.isStandardBrowserEnv()?{write:function(t,e,n,r,o,i){var s=[];s.push(t+"="+encodeURIComponent(e)),zc.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),zc.isString(r)&&s.push("path="+r),zc.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},hu={"Content-Type":"application/x-www-form-urlencoded"};function pu(t,e){!zc.isUndefined(t)&&zc.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var du,vu={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(du=fu),du),transformRequest:[function(t,e){return eu(e,"Accept"),eu(e,"Content-Type"),zc.isFormData(t)||zc.isArrayBuffer(t)||zc.isBuffer(t)||zc.isStream(t)||zc.isFile(t)||zc.isBlob(t)?t:zc.isArrayBufferView(t)?t.buffer:zc.isURLSearchParams(t)?(pu(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):zc.isObject(t)?(pu(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return 200<=t&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};zc.forEach(["delete","get","head"],function(t){vu.headers[t]={}}),zc.forEach(["post","put","patch"],function(t){vu.headers[t]=zc.merge(hu)});var gu=vu;function yu(t){t.cancelToken&&t.cancelToken.throwIfRequested()}function mu(e){return yu(e),e.headers=e.headers||{},e.data=Zc(e.data,e.headers,e.transformRequest),e.headers=zc.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),zc.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||gu.adapter)(e).then(function(t){return yu(e),t.data=Zc(t.data,t.headers,e.transformResponse),t},function(t){return tu(t)||(yu(e),t&&t.response&&(t.response.data=Zc(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}function Su(e,n){n=n||{};var r={},t=["url","method","params","data"],o=["headers","auth","proxy"],i=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];zc.forEach(t,function(t){void 0!==n[t]&&(r[t]=n[t])}),zc.forEach(o,function(t){zc.isObject(n[t])?r[t]=zc.deepMerge(e[t],n[t]):void 0!==n[t]?r[t]=n[t]:zc.isObject(e[t])?r[t]=zc.deepMerge(e[t]):void 0!==e[t]&&(r[t]=e[t])}),zc.forEach(i,function(t){void 0!==n[t]?r[t]=n[t]:void 0!==e[t]&&(r[t]=e[t])});var s=t.concat(o).concat(i),a=Object.keys(n).filter(function(t){return-1===s.indexOf(t)});return zc.forEach(a,function(t){void 0!==n[t]?r[t]=n[t]:void 0!==e[t]&&(r[t]=e[t])}),r}function Eu(t){this.defaults=t,this.interceptors={request:new su,response:new su}}Eu.prototype.request=function(t,e){"string"==typeof t?(t=e||{}).url=arguments[0]:t=t||{},(t=Su(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=[mu,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){n.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){n.push(t.fulfilled,t.rejected)});n.length;)r=r.then(n.shift(),n.shift());return r},Eu.prototype.getUri=function(t){return t=Su(this.defaults,t),Xc(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},zc.forEach(["delete","get","head","options"],function(n){Eu.prototype[n]=function(t,e){return this.request(zc.merge(e||{},{method:n,url:t}))}}),zc.forEach(["post","put","patch"],function(r){Eu.prototype[r]=function(t,e,n){return this.request(zc.merge(n||{},{method:r,url:t,data:e}))}});var Iu=Eu;function wu(t){this.message=t}wu.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},wu.prototype.__CANCEL__=!0;var _u=wu;function Tu(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new _u(t),e(n.reason))})}Tu.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Tu.source=function(){var e;return{token:new Tu(function(t){e=t}),cancel:e}};var Pu=Tu;function Au(t){var e=new Iu(t),n=Hc(Iu.prototype.request,e);return zc.extend(n,Iu.prototype,e),zc.extend(n,e),n}var bu=Au(gu);bu.Axios=Iu,bu.create=function(t){return Au(Su(bu.defaults,t))},bu.Cancel=_u,bu.CancelToken=Pu,bu.isCancel=tu,bu.all=function(t){return Promise.all(t)},bu.spread=function(e){return function(t){return e.apply(null,t)}};var Ru=bu;Ru.default=bu;var Ou,Cu,ku,Nu,xu=Ru;(Cu=Ou=Ou||{})[Cu.BROWSER=0]="BROWSER",Cu[Cu.NODE_JS=1]="NODE_JS",Cu[Cu.WX_MICROPROGRAM=2]="WX_MICROPROGRAM",Cu[Cu.QUICK_APP=3]="QUICK_APP",Cu[Cu.REACT_NATIVE=4]="REACT_NATIVE",Cu[Cu.UNKNOWN=5]="UNKNOWN",(Nu=ku=ku||{})[Nu.POST=0]="POST",Nu[Nu.GET=1]="GET",Nu[Nu.PUT=2]="PUT",Nu[Nu.DELETE=3]="DELETE";var Mu,Uu,Lu=(Du.prototype.post=function(t,e,n){return this.sendRequest(ku.POST,t,e,n)},Du.prototype.get=function(t,e,n){return this.sendRequest(ku.GET,t,e,n)},Du.prototype.delete=function(t,e,n){return this.sendRequest(ku.DELETE,t,e,n)},Du.prototype.put=function(t,e,n){return this.sendRequest(ku.PUT,t,e,n)},Du.prototype.checkParam=function(t){return!(!t||t.match(/\s/g)||!t.match(/^(ht)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?/))},Du.prototype.sendRequest=function(c,u,f,l){return i=this,a=function(){return n=this,r=function(t){if(!this.checkParam(u))return[2,Promise.reject("URL IS ERROR!")];switch(c){case ku.PUT:return[2,xu.put(u,f,{headers:l})];case ku.POST:return[2,xu.post(u,f,{headers:l})];case ku.GET:return[2,xu.get(u,{params:f,headers:l})];case ku.DELETE:return[2,xu.delete(u,{params:f,headers:l})];default:return[2,Promise.reject("invalid method type")]}},a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(n,a)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}var n,r,o,i,s,a,e},s=void 0,new(s=Promise)(function(t,e){function n(t){try{o(a.next(t))}catch(t){e(t)}}function r(t){try{o(a.throw(t))}catch(t){e(t)}}function o(e){e.done?t(e.value):new s(function(t){t(e.value)}).then(n,r)}o((a=a.apply(i,[])).next())});var i,s,a},Du);function Du(){xu.defaults.timeout=3e3}l.registerInternalService({name:"AGCNetworkService",serviceFactory:function(t){switch("object"==typeof self&&self.self===self?Ou.BROWSER:"object"==typeof navigator&&"ReactNative"===navigator.product?Ou.REACT_NATIVE:"[object process]"===Object.prototype.toString.call(global.process)?Ou.NODE_JS:global&&"fastapp"in global?Ou.QUICK_APP:self.navigator.userAgent.toLowerCase().match(/MicroMessenger/i)?Ou.WX_MICROPROGRAM:Ou.UNKNOWN){case Ou.BROWSER:case Ou.REACT_NATIVE:case Ou.QUICK_APP:case Ou.WX_MICROPROGRAM:default:return new Lu}}}),(Uu=Mu=Mu||{}).BROWSER="Browser",Uu.NODE_JS="Node",Uu.WX_MICROPROGRAM="Wx",Uu.REACT_NATIVE="ReactNative",Uu.QUICK_APP="QuickApp",Uu.UNKNOWN="Unknown";var ju=(tf.setEncryptImp=function(t){this.encryptImpl=t},tf.decrypt=function(t){return null!=this.encryptImpl&&null!=this.encryptImpl&&null!=t&&null!=t?this.encryptImpl.decrypt(t):t},tf.encrypt=function(t){return null!=this.encryptImpl&&null!=this.encryptImpl&&null!=t&&null!=t?this.encryptImpl.encrypt(t):t},tf),Fu=(Zu.getInstance=function(){return null==this.instance&&(this.instance=new Zu),this.instance},Zu.prototype.get=function(t){return Promise.resolve(this.storage[t])},Zu.prototype.remove=function(t){return delete this.storage[t],Promise.resolve()},Zu.prototype.set=function(t,e){return this.storage[t]=e,Promise.resolve()},Zu.prototype.setCryptImp=function(t){ju.setEncryptImp(t)},Zu.instance=new Zu,Zu),Vu=(Qu.getInstance=function(){return null==this.instance&&(this.instance=new Qu),this.instance},Qu.prototype.initIndexedDb=function(o){var i=this;return window.indexedDB?new Promise(function(e,n){var t=window.indexedDB.open(i.DB_NAME,i.VERSION),r=i;t.onupgradeneeded=function(t){var e=t.target.result;try{e.objectStoreNames.contains(r.OBJECT_STORE_NAME)||e.createObjectStore(r.OBJECT_STORE_NAME,{keyPath:r.KEY_PATH})}catch(t){n(t)}},t.onsuccess=function(t){try{e(t.target.result.transaction([r.OBJECT_STORE_NAME],o).objectStore(r.OBJECT_STORE_NAME))}catch(t){n(t)}},t.onerror=function(t){n(new Error(t.target.error))}}):Promise.reject("Your browser doesn't support a stable version of IndexedDB.")},Qu.prototype.get=function(o){return o?this.initIndexedDb("readonly").then(function(t){return new Promise(function(e,n){try{var r=t.get(o);r.onsuccess=function(){var t=r.result;e(null!=t&&"value"in t?ju.decrypt(t.value):t)},r.onerror=function(t){n(t.target.error)}}catch(t){n(t)}})}).catch(function(t){return Promise.reject(t)}):Promise.reject(new Error("key is null"))},Qu.prototype.set=function(t,e){if(!t||!e)return Promise.reject(new Error("key or value is null"));var n={},r={};n[this.KEY_PATH]=t,r.value=ju.encrypt(e);var o=Object.assign(r,n);return this.initIndexedDb("readwrite").then(function(n){try{var r=n.get(t);return r.onsuccess=function(){var t=r.result,e=null!=t&&"value"in t?n.put(o):n.add(o);e.onsuccess=function(){return Promise.resolve()},e.onerror=function(t){return Promise.reject(t.target.error)}},r.onerror=function(t){return console.log("---get value from db error."),Promise.reject("get value from db error.")},Promise.resolve()}catch(t){return console.log("---set value to db error."+t),Promise.reject("set value to db error."+t)}}).catch(function(t){return Promise.reject("init db error."+t)})},Qu.prototype.remove=function(n){return n?this.initIndexedDb("readwrite").then(function(t){try{var e=t.delete(n);return e.onsuccess=function(){return Promise.resolve()},e.onerror=function(t){return Promise.reject(t.target.error)},Promise.resolve()}catch(t){return Promise.reject(t)}}).catch(function(t){return Promise.reject(t)}):Promise.reject(new Error("key is null"))},Qu.prototype.setCryptImp=function(t){ju.setEncryptImp(t)},Qu.instance=new Qu,Qu),$u=(Xu.getInstance=function(){return null==this.instance&&(this.instance=new Xu),this.instance},Xu.prototype.get=function(t){if(!t)return Promise.reject(new Error("key is null"));try{var e=sessionStorage.getItem(t);return Promise.resolve(""===e?null:ju.decrypt(e))}catch(t){return Promise.reject(t)}},Xu.prototype.set=function(t,e){if(!t||!e)return Promise.reject(new Error("key or value is null"));try{return sessionStorage.setItem(t,ju.encrypt(e)),Promise.resolve()}catch(t){return Promise.reject(t)}},Xu.prototype.remove=function(t){if(!t)return Promise.reject(new Error("key is null"));try{return sessionStorage.removeItem(t),Promise.resolve()}catch(t){return Promise.reject(t)}},Xu.prototype.setCryptImp=function(t){ju.setEncryptImp(t)},Xu.instance=new Xu,Xu),Hu=(Ju.getInstance=function(){return null==this.instance&&(this.instance=new Ju),this.instance},Ju.prototype.get=function(t){if(!t)return Promise.reject(new Error("key is null"));try{var e=n.readFileSync(t,"utf-8");return Promise.resolve(""===e?null:ju.decrypt(e))}catch(t){return Promise.reject(t)}},Ju.prototype.set=function(t,e){if(!t||!e)return Promise.reject(new Error("key or value is null"));try{return n.writeFileSync(t,ju.encrypt(e),"utf-8"),Promise.resolve()}catch(t){return Promise.reject(t)}},Ju.prototype.remove=function(t){if(!t)return Promise.reject(new Error("key is null"));try{return n.unlinkSync(t),Promise.resolve()}catch(t){return Promise.reject(t)}},Ju.prototype.setCryptImp=function(t){ju.setEncryptImp(t)},Ju.instance=new Ju,Ju),Bu=(zu.prototype.getStorage=function(t){if(null==t||null==t)return this.createMemoryStorage();switch(t){case 0:return this.createPersistentStorage();case 1:return this.createTemporaryStorage();case 2:default:return this.createMemoryStorage()}},zu.prototype.createPersistentStorage=function(){return this.env.persist()},zu.prototype.createTemporaryStorage=function(){return this.env.temp()},zu.prototype.createMemoryStorage=function(){return this.env.memory()},zu.getEnvConfig=function(){var t={};return t[Mu.BROWSER]=Gu,t[Mu.NODE_JS]=Wu,t[Mu.WX_MICROPROGRAM]=Ku,t[Mu.REACT_NATIVE]=qu,t[Mu.QUICK_APP]=Yu,t[Mu.UNKNOWN]=Gu,t["object"==typeof self&&self.self===self?Mu.BROWSER:"object"==typeof navigator&&"ReactNative"===navigator.product?Mu.REACT_NATIVE:"[object process]"===Object.prototype.toString.call(global.process)?Mu.NODE_JS:global&&"fastapp"in global?Mu.QUICK_APP:self.navigator.userAgent.toLowerCase().match(/MicroMessenger/i)?Mu.WX_MICROPROGRAM:Mu.UNKNOWN]},zu),Gu={persist:function(){return Vu.getInstance()},temp:function(){return $u.getInstance()},memory:function(){return Fu.getInstance()}},Wu={persist:function(){return Hu.getInstance()},temp:function(){return $u.getInstance()},memory:function(){return Fu.getInstance()}},Ku={persist:function(){return $u.getInstance()},temp:function(){return $u.getInstance()},memory:function(){return Fu.getInstance()}},qu={persist:function(){return $u.getInstance()},temp:function(){return $u.getInstance()},memory:function(){return Fu.getInstance()}},Yu={persist:function(){return $u.getInstance()},temp:function(){return $u.getInstance()},memory:function(){return Fu.getInstance()}};function zu(t){this.env=t}function Ju(){}function Xu(){}function Qu(){this.DB_NAME="agcLocalStorageDb",this.OBJECT_STORE_NAME="agc",this.KEY_PATH="agcStorage",this.VERSION=1}function Zu(){this.storage={}}function tf(){}function ef(n,r){var o,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(n,a)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}l.registerInternalService({name:"AGCStorageService",serviceFactory:function(t){return new Bu(Bu.getEnvConfig())}});var nf=(rf.prototype.getAaid=function(){return i=this,c=function(){var e,n,r,o,i;return ef(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e="agcAaid:"+l.instance().config().client.api_key,null==(n=l.instance().getService("AGCStorageService"))?(console.log("Get AGC stroage Service failed."),[2,Promise.reject("Get AGC stroage Service failed.")]):[4,(r=n.getStorage(rf.persistence)).get(e)];case 1:return null!=(o=t.sent())&&null!=o||(o=this.getRandomString(),r.set(e,o)),[2,Promise.resolve(o)];case 2:return i=t.sent(),[2,Promise.reject(i)];case 3:return[2]}})},a=s=void 0,new(a=Promise)(function(t,e){function n(t){try{o(c.next(t))}catch(t){e(t)}}function r(t){try{o(c.throw(t))}catch(t){e(t)}}function o(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(n,r)}o((c=c.apply(i,s||[])).next())});var i,s,a,c},rf.prototype.getRandomString=function(){var t="0123456789abcdef",e=t.length;return"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/x/g,function(){return t.charAt(Math.floor(Math.random()*e))})},rf.persistence=0,rf.INSTANCE=new rf,rf);function rf(){}var of=(sf.prototype.getAaid=function(){return nf.INSTANCE.getAaid()},sf.prototype.setPersistence=function(t){nf.persistence=t},sf);function sf(){}l.registerInternalService({name:"ClientInfoService",serviceFactory:function(t){return new of}});var af=function(t,e){return(af=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function cf(t,e){function n(){this.constructor=t}af(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function uf(i,s,a,c){return new(a=a||Promise)(function(t,e){function n(t){try{o(c.next(t))}catch(t){e(t)}}function r(t){try{o(c.throw(t))}catch(t){e(t)}}function o(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(n,r)}o((c=c.apply(i,s||[])).next())})}function ff(n,r){var o,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(n,a)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var lf,hf,pf,df,vf,gf,yf=(Gf.prototype.getProviderInfo=function(){return this.providerInfo},Gf.prototype.setProviderInfo=function(t){this.providerInfo=t},Gf.prototype.updateProvider=function(t){var e=t.get("ProviderInfo");null!=e&&this.deleteProvider(e),null==this.providerInfo&&(this.providerInfo=new Array),this.providerInfo.push(t)},Gf.prototype.deleteProvider=function(t){var e,n=this.findProvider(t);if(null!=this.providerInfo&&null!=n)for(e=0;e<this.providerInfo.length;e++)n===this.providerInfo[e]&&this.providerInfo.splice(e,1)},Gf.prototype.findProvider=function(t){var e=null;if(null!=t&&null!=this.providerInfo)for(var n=0,n=0;n<this.providerInfo.length;n++){var r=this.providerInfo[n];if(t==r.get("provider")){e=r;break}}return e},Gf),mf=(Bf.prototype.getState=function(){return this.state},Bf.prototype.getToken=function(){return this.tokenString},Bf),Sf=(Hf.getMsgByCode=function(t){switch(t){case Hf.INVALID_EMAIL:return"email can not be null or empty";case Hf.PASSWORD_IS_EMPTY:return"password can not be null or empty";case Hf.EMAIL_VERIFICATION_IS_EMPTY:return"verify code can not be null or empty";case Hf.INVALID_PHONE:return"countrycode and phone can not be null or empty";case Hf.PHONE_VERIFICATION_IS_EMPTY:return"verify code can not be null or empty"}return""},Hf.NULL_TOKEN=1,Hf.NOT_SIGN_IN=2,Hf.USER_LINKED=3,Hf.USER_UNLINKED=4,Hf.ALREADY_SIGN_IN_USER=5,Hf.EMAIL_VERIFICATION_IS_EMPTY=6,Hf.PHONE_VERIFICATION_IS_EMPTY=7,Hf.INVALID_EMAIL=203817223,Hf.INVALID_PHONE=203817224,Hf.GET_UID_ERROR=203817728,Hf.UID_PRODUCTID_NOT_MATCH=203817729,Hf.GET_USER_INFO_ERROR=203817730,Hf.AUTH_METHOD_NOT_SUPPORT=203817732,Hf.PRODUCT_STATUS_ERROR=203817744,Hf.PASSWORD_VERIFICATION_CODE_OVER_LIMIT=203817811,Hf.INVALID_TOKEN=203817984,Hf.INVALID_ACCESS_TOKEN=203817985,Hf.INVALID_REFRESH_TOKEN=203817986,Hf.TOKEN_AND_PRODUCTID_NOT_MATCH=203817987,Hf.AUTH_METHOD_IS_DISABLED=203817988,Hf.FAIL_TO_GET_THIRD_USER_INFO=203817989,Hf.FAIL_TO_GET_THIRD_USER_UNION_ID=203817990,Hf.ACCESS_TOKEN_OVER_LIMIT=203817991,Hf.FAIL_TO_USER_LINK=203817992,Hf.FAIL_TO_USER_UNLINK=203817993,Hf.ANONYMOUS_SIGNIN_OVER_LIMIT=203818019,Hf.INVALID_APPID=203818020,Hf.INVALID_APPSECRET=203818021,Hf.GET_QQ_USERINFO_ERROR=203818023,Hf.QQINFO_RESPONSE_IS_NULL=203818024,Hf.GET_QQ_UID_ERROR=203818025,Hf.PASSWORD_VERIFY_CODE_ERROR=203818032,Hf.GOOGLE_RESPONSE_NOT_EQUAL_APPID=203818033,Hf.SIGNIN_USER_STATUS_ERROR=203818036,Hf.SIGNIN_USER_PASSWORD_ERROR=203818037,Hf.PROVIDER_USER_HAVE_BEEN_LINKED=203818038,Hf.PROVIDER_HAVE_LINKED_ONE_USER=203818039,Hf.FAIL_GET_PROVIDER_USER=203818040,Hf.CANNOT_UNLINK_ONE_PROVIDER_USER=203818041,Hf.VERIFY_CODE_INTERVAL_LIMIT=203818048,Hf.VERIFY_CODE_EMPTY=203818049,Hf.VERIFY_CODE_LANGUAGE_EMPTY=203818050,Hf.VERIFY_CODE_RECEIVER_EMPTY=203818051,Hf.VERIFY_CODE_ACTION_ERROR=203818052,Hf.VERIFY_CODE_TIME_LIMIT=203818053,Hf.ACCOUNT_PASSWORD_SAME=203818064,Hf.PASSWORD_STRENGTH_LOW=203818065,Hf.UPDATE_PASSWORD_ERROR=203818066,Hf.PASSWORD_SAME_AS_BEFORE=203818067,Hf.PASSWORD_IS_EMPTY=203818068,Hf.PASSWORD_TOO_LONG=203818071,Hf.SENSITIVE_OPERATION_TIMEOUT=203818081,Hf.ACCOUNT_HAVE_BEEN_REGISTERED=203818082,Hf.UPDATE_ACCOUNT_ERROR=203818084,Hf.USER_NOT_REGISTERED=203818087,Hf.VERIFY_CODE_ERROR=203818129,Hf.USER_HAVE_BEEN_REGISTERED=203818130,Hf.REGISTER_ACCOUNT_IS_EMPTY=203818132,Hf.VERIFY_CODE_FORMAT_ERROR=203818134,Hf.VERIFY_CODE_AND_PASSWORD_BOTH_NULL=203818135,Hf.SEND_EMAIL_FAIL=203818240,Hf.SEND_MESSAGE_FAIL=203818241,Hf.CONFIG_LOCK_TIME_ERROR=203818261,Hf),Ef=($f.prototype.getSdkServiceName=function(){return this.sdkServiceName},$f.prototype.setSdkServiceName=function(t){this.sdkServiceName=t},$f.prototype.getSdkVersion=function(){return this.sdkVersion},$f.prototype.setSdkVersion=function(t){this.sdkVersion=t},$f.prototype.getSdkPlatform=function(){return this.sdkPlatform},$f.prototype.setSdkPlatform=function(t){this.sdkPlatform=t},$f.prototype.getSdkPlatformVersion=function(){return this.sdkPlatformVersion},$f.prototype.setSdkPlatformVersion=function(t){this.sdkPlatformVersion=t},$f.prototype.getPackageName=function(){return this.packageName},$f.prototype.setPackageName=function(t){this.packageName=t},$f.prototype.getAppVersion=function(){return this.appVersion},$f.prototype.setAppVersion=function(t){this.appVersion=t},$f.prototype.getHeaderProductId=function(){return this.headerProductId},$f.prototype.setHeaderProductId=function(t){this.headerProductId=t},$f.prototype.getHeaderAppId=function(){return this.headerAppId},$f.prototype.setHeaderAppId=function(t){this.headerAppId=t},$f.prototype.getHeaderAaId=function(){return this.headerAaId},$f.prototype.setHeaderAaId=function(t){this.headerAaId=t},$f.prototype.getHeaderClientId=function(){return this.headerClientId},$f.prototype.setHeaderClientId=function(t){this.headerClientId=t},$f.prototype.getAuthorization=function(){return this.authorization},$f.prototype.setAuthorization=function(t){this.authorization=t},$f.prototype.getAccessToken=function(){return this.accessToken},$f.prototype.setAccessToken=function(t){this.accessToken=t},$f.prototype.getAgcgwUrl=function(){return this.agcgwUrl},$f.prototype.setAgcgwUrl=function(t){this.agcgwUrl=t},$f.prototype.getAgcgwBackUrl=function(){return this.agcgwBackUrl},$f.prototype.setAgcgwBackUrl=function(t){this.agcgwBackUrl=t},$f.prototype.addHttpToUrl=function(t){return t&&!t.startsWith("https://")?"https://"+t:t},$f),If=(cf(Vf,vf=Ef),Vf.SERVER_URL="/agc/apigw/oauth2/third/v1",Vf),wf=(cf(Ff,df=If),Ff.prototype.getBody=function(){return{refreshToken:this.refreshToken}},Ff.prototype.getHeader=function(){return{client_id:this.getHeaderClientId(),app_id:this.getHeaderAppId()}},Ff.prototype.getUrl=function(){return this.getAgcgwUrl()+this.URL+"?productId="+this.getHeaderProductId()},Ff),_f=(jf.prototype.getCode=function(){return this.code},jf.prototype.setCode=function(t){this.code=t},jf.prototype.getMsg=function(){return this.msg},jf.prototype.setMsg=function(t){this.msg=t},jf),Tf=(Df.prototype.isSuccess=function(){return null!=this.ret&&0==this.ret.getCode()},Df.prototype.getRet=function(){return this.ret},Df.prototype.setRet=function(t){this.ret=t},Df.prototype.constructResponse=function(t){},Df),Pf=(Lf.prototype.getToken=function(){return this.token},Lf.prototype.setToken=function(t){this.token=t},Lf.prototype.getValidPeriod=function(){return this.validPeriod},Lf.prototype.setValidPeriod=function(t){this.validPeriod=t},Lf),Af=(cf(Uf,pf=Tf),Uf.prototype.constructResponse=function(t){this.accessToken.setToken(t.data.accessToken.token),this.accessToken.setValidPeriod(t.data.accessToken.validPeriod),this.ret.setMsg(t.data.ret.msg),this.ret.setCode(t.data.ret.code)},Uf),bf=(Mf.prototype.constructFromJson=function(t){this.expiration=t.expiration,this.issuedAt=t.issuedAt,this.tokenString=t.tokenString,this.notBefore=t.notBefore},Mf.prototype.isValid=function(){var t=(new Date).getTime(),e=(new Date).getTime()+1e3*parseInt(this.expiration)-Mf.TWO_MINUTES_EARLY;return null!=this.tokenString&&t<=e},Mf.TWO_MINUTES_EARLY=12e4,Mf),Rf=(cf(xf,hf=Ef),xf.prototype.getBody=function(){return{grant_type:"client_credentials",client_id:this.getHeaderClientId(),client_secret:this.getClientSecret()}},xf.prototype.getHeader=function(){return{app_id:this.getHeaderAppId()}},xf.prototype.getUrl=function(){return this.REQUEST_URL},xf.prototype.getClientSecret=function(){return this.clientSecret},xf),Of=(Nf.getInstance=function(){return Nf.instance||(Nf.instance=new Nf),Nf.instance},Nf.prototype.getStorage=function(){var t=l.instance().getService("AGCStorageService");if(null!=t)return t.getStorage(Gh.getUserInfoPersistence());console.log("Get AGC stroage Service failed.")},Nf),Cf=(kf.prototype.getToken=function(){return uf(this,void 0,void 0,function(){var e,n,r,o=this;return ff(this,function(t){switch(t.label){case 0:return""==(e=this.getCredentialStoreKey())?[2,Promise.reject("get config info error.")]:null==(n=Of.getInstance().getStorage())?[2,Promise.reject("get agcStorage failed.")]:[4,n.get(e).then(function(t){null!=t&&null!=t&&o.info.constructFromJson(JSON.parse(t))})];case 1:return t.sent(),null!=this.info&&this.info.isValid()?(r=this.info,[2,Promise.resolve(r)]):[3,2];case 2:return[4,this.requestToken().then(function(t){o.info=t,null!=n&&n.set(e,JSON.stringify(o.info))},function(t){null!=n&&n.remove(e)})];case 3:return t.sent(),[2,Promise.resolve(this.info)]}})})},kf.prototype.getCredentialStoreKey=function(){try{return"agcClientToken:"+l.instance().config().client.api_key}catch(t){return console.log(t),""}},kf.prototype.requestToken=function(){return uf(this,void 0,void 0,function(){var e,n;return ff(this,function(t){switch(t.label){case 0:return null==(e=l.instance().getService("AGCNetworkService"))?[2,Promise.reject("get agcNetwork service failed.")]:(n=new Rf,[4,e.post(n.getAgcgwUrl()+n.getUrl(),n.getBody(),n.getHeader()).then(function(t){if(t.data.ret&&0!=t.data.ret.code)return Promise.reject(new Error("Response error. Msg is : "+t.data.ret.msg+"; code is : "+t.data.ret.code));var e=new bf;return e.tokenString=t.data.access_token,e.expiration=t.data.expires_in,Promise.resolve(e)}).catch(function(t){return console.log("get token response err: "+t),Promise.reject(t)})]);case 1:return[2,t.sent()]}})})},kf);function kf(){this.info=new bf}function Nf(){}function xf(){var t=hf.call(this)||this;t.REQUEST_URL="/agc/apigw/oauth2/v1/token",t.clientSecret="",hf.prototype.setSdkServiceName.call(t,"agconnect-credential");try{t.clientSecret=l.instance().config().client.client_secret}catch(t){throw console.log(t),t}return t}function Mf(){this.expiration="0",this.tokenString="",this.issuedAt="0",this.notBefore="0"}function Uf(){var t=null!==pf&&pf.apply(this,arguments)||this;return t.accessToken=new Pf,t.productId="",t.uid="",t}function Lf(){this.token="",this.validPeriod=0}function Df(){this.ret=new _f}function jf(t,e){void 0===t&&(t=0),void 0===e&&(e=""),this.code=t,this.msg=e}function Ff(t){var e=df.call(this)||this;return e.URL=If.SERVER_URL+"/user-auth/refresh-token",e.refreshToken=t,e}function Vf(){return null!==vf&&vf.apply(this,arguments)||this}function $f(){var t;this.packageName="",this.headerProductId="",this.headerAppId="",this.headerClientId="",this.agcgwUrl="",this.agcgwBackUrl="",this.sdkServiceName="agconnect-credential",this.sdkVersion="1.0",this.sdkPlatform="JS-SDK",this.sdkPlatformVersion="1.0",this.accessToken="",this.authorization="",this.appVersion="",this.headerAaId="";try{t=l.instance().config()}catch(t){return void console.log(t)}this.packageName=t.client.package_name,this.headerProductId=t.client.product_id,this.headerClientId=t.client.client_id,this.headerAppId=t.client.app_id,this.agcgwUrl=this.addHttpToUrl(t.agcgw.url),this.agcgwBackUrl=this.addHttpToUrl(t.agcgw.backurl)}function Hf(t,e){this.code=e,this.errMsg=t}function Bf(t,e,n,r){this.state=void 0,this.expiration=t,this.issuedAt=e,this.notBefore=n,this.tokenString=r}function Gf(){this.providerInfo=[]}(gf=lf=lf||{})[gf.POST=0]="POST",gf[gf.GET=1]="GET";function Wf(){this.password="",this.verifyCode=""}var Kf,qf,Yf,zf,Jf,Xf,Qf,Zf,tl,el,nl,rl,ol,il,sl,al,cl,ul,fl,ll,hl,pl,dl,vl,gl,yl=(Dh.post=function(t,e){return this.sendRequest(t,lf.POST,e)},Dh.get=function(t,e){return this.sendRequest(t,lf.GET,e)},Dh.sendRequest=function(o,i,s){return uf(this,void 0,void 0,function(){var e,n,r;return ff(this,function(t){switch(t.label){case 0:return[4,(new Cf).getToken().then(function(t){e=t.tokenString})];case 1:return t.sent(),null==e||""==e?[2,Promise.reject("Get clientToken failed.")]:((n=o.getHeader()).Authorization="Bearer "+e,null==(r=l.instance().getService("AGCNetworkService"))?[2,Promise.reject("Get agcNetwork service failed.")]:i!=lf.POST?[3,3]:[4,r.post(o.getUrl(),o.getBody(),n).then(function(t){0==t.data.ret.code&&s.constructResponse(t),s.setRet(new _f(t.data.ret.code,t.data.ret.msg))}).catch(function(t){return Promise.reject(t)})]);case 2:return t.sent(),[3,5];case 3:return[4,r.get(o.getUrl(),o.getBody(),n).then(function(t){s.constructResponse(t)}).catch(function(t){return Promise.reject(t)})];case 4:t.sent(),t.label=5;case 5:return[2,new Promise(function(t,e){t()})]}})})},Dh),ml=(Lh.prototype.constructeSecureTokenService=function(t,e){this.accessToken=t.getToken(),this.accessTokenValidPeriod=t.getValidPeriod(),this.refreshToken=e.getToken(),this.validTime=(new Date).getTime()+1e3*t.getValidPeriod()},Lh.prototype.getAccessToken=function(){return this.accessToken},Lh.prototype.getRefreshToken=function(){return this.refreshToken},Lh.prototype.isValidAccessToken=function(){return null!=this.accessToken&&0<this.remainToRefreshTime()},Lh.prototype.remainToRefreshTime=function(){return this.validTime-(new Date).getTime()},Lh.prototype.fetchAccessToken=function(o){return uf(this,void 0,void 0,function(){var e,n,r;return ff(this,function(t){switch(t.label){case 0:return!o&&this.isValidAccessToken()?[2,Promise.resolve(new mf(this.accessTokenValidPeriod.toLocaleString(),"0","0",this.accessToken))]:this.accessToken&&this.refreshToken?(e=new wf(this.refreshToken),n=new Af,[4,yl.post(e,n).catch(function(){throw new Error("request for refreshToken failed!")})]):[2,Promise.reject(new Sf("Token is null.",Sf.NULL_TOKEN))];case 1:return t.sent(),0!=n.getRet().getCode()?[2,Promise.reject(new Sf(n.getRet().getMsg(),n.getRet().getCode()))]:(null==(r=n.accessToken)||r.getToken()==this.accessToken&&r.getValidPeriod()==this.accessTokenValidPeriod||(this.accessToken=r.getToken(),this.accessTokenValidPeriod=r.getValidPeriod(),this.validTime=(new Date).getTime()+1e3*this.accessTokenValidPeriod,Tl.getStoredUser().then(function(t){Tl.updateStoredUser(t)})),[2,Promise.resolve(new mf(this.accessTokenValidPeriod.toLocaleString(),"0","0",this.accessToken))])}})})},Lh),Sl=(cf(Uh,dl=Ef),Uh.prototype.getBody=function(){},Uh.prototype.getHeader=function(){return{client_id:this.getHeaderClientId(),access_token:this.getAccessToken()}},Uh.prototype.getUrl=function(){return this.getAgcgwUrl()+this.URL+"?productId="+this.getHeaderProductId()},Uh),El=(cf(Mh,pl=Tf),Mh.prototype.constructResponse=function(t){console.log(t),this.displayName=t.data.displayName,this.photoUrl=t.data.photoUrl,this.emailVerified=t.data.emailVerified,this.passwordSetted=t.data.passwordSetted,this.email=t.data.email,this.phone=t.data.phone,this.userExtra=new Il,this.userExtra.createTime=t.data.userMetaData.createTime,this.userExtra.lastSignInTime=t.data.userMetaData.lastSignInTime,this.ret.setMsg(t.data.ret.msg),this.ret.setCode(t.data.ret.code)},Mh),Il=(xh.prototype.getCreateTime=function(){return this.createTime},xh.prototype.getLastSignInTime=function(){return this.lastSignInTime},xh),wl=(Nh.prototype.getToken=function(){return this.token},Nh.prototype.getExpirePeriod=function(){return this.expirePeriod},Nh),_l=(kh.prototype.constructFromJson=function(t){this.anonymous=t.anonymous,this.uid=t.uid,this.displayName=t.displayName,this.photoUrl=t.photoUrl,this.email=t.email,this.phone=t.phone,this.providerId=t.providerId,this.emailVerified=t.emailVerified,this.passwordSetted=t.passwordSetted,this.providerService.providerInfo=t.providerService.providerInfo,this.tokenService.accessToken=t.tokenService.accessToken,this.tokenService.accessTokenValidPeriod=t.tokenService.accessTokenValidPeriod,this.tokenService.refreshToken=t.tokenService.refreshToken,this.tokenService.validTime=t.tokenService.validTime},kh.prototype.isAnonymous=function(){return this.anonymous},kh.prototype.getUid=function(){return this.uid},kh.prototype.getEmail=function(){return this.email},kh.prototype.getPhone=function(){return this.phone},kh.prototype.getDisplayName=function(){return this.displayName},kh.prototype.getPhotoUrl=function(){return this.photoUrl},kh.prototype.getProviderId=function(){return this.providerId},kh.prototype.getProviderInfo=function(){return this.providerService.getProviderInfo()},kh.prototype.getUserExtra=function(){return uf(this,void 0,void 0,function(){var e,n,r,o,i;return ff(this,function(t){switch(t.label){case 0:return e=new Gh,n=null,r="",[4,e.getCurrentUser().then(function(t){r=t.getAccessToken()})];case 1:return t.sent(),""==r?[3,3]:(o=new Sl,i=new El,o.setAccessToken(r),[4,yl.get(o,i).then(function(t){console.log("getUserExtra success.")}).catch(function(t){console.log("getUserExtra fail."+t)})]);case 2:t.sent(),this.displayName=i.displayName,this.photoUrl=i.photoUrl,this.emailVerified=i.emailVerified,this.passwordSetted=i.passwordSetted,this.email=i.email,this.phone=i.phone,this.displayName=i.displayName,n=i.userExtra,Tl.updateStoredUser(this),t.label=3;case 3:return[2,Promise.resolve(n)]}})})},kh.prototype.getAccessToken=function(){return this.tokenService.getAccessToken()},kh.prototype.getRefreshToken=function(){return this.tokenService.getRefreshToken()},kh.prototype.buildUser=function(t){this.anonymous=!1,this.displayName=t.getUserInfo().getDisplayName(),this.email=t.getUserInfo().getEmail(),this.emailVerified=t.getUserInfo().getEmailVerified(),this.passwordSetted=t.getUserInfo().getPasswordSetted(),this.phone=t.getUserInfo().getPhone(),this.photoUrl=t.getUserInfo().getPhotoUrl(),this.providerId=t.getUserInfo().getProvider().toString(),this.uid=t.getUserInfo().getUid(),this.tokenService.constructeSecureTokenService(t.getAccessToken(),t.getRefreshToken())},kh.prototype.getToken=function(t){return this.tokenService.fetchAccessToken(t).then(function(t){return Promise.resolve(new wl(t.tokenString,parseInt(t.expiration)))}).catch(function(t){return Promise.reject(t)})},kh),Tl=(Ch.constructUserKey=function(){if(null==Ch.USER_KEY){var t=void 0;try{t=l.instance().config()}catch(t){return void console.log(t)}Ch.USER_KEY="agcCurrentUser:"+t.client.api_key}},Ch.loadStoredUser=function(){return uf(this,void 0,void 0,function(){var e;return ff(this,function(t){switch(t.label){case 0:return Ch.constructUserKey(),null==(e=Of.getInstance().getStorage())?[2,Promise.reject("get agcStorage failed.")]:[4,e.get(Ch.USER_KEY).then(function(t){null!=t&&null!=t&&(Ch.INSTANCE.user=new _l,Ch.INSTANCE.user.constructFromJson(JSON.parse(t)))}).catch(function(t){console.log("----loadStoredUser error "+t)})];case 1:return t.sent(),[2,Promise.resolve()]}})})},Ch.getStoredUser=function(){return uf(this,void 0,void 0,function(){return ff(this,function(t){switch(t.label){case 0:return null!=Ch.INSTANCE.user?[3,2]:[4,this.loadStoredUser().then(function(t){})];case 1:t.sent(),t.label=2;case 2:return[2,Promise.resolve(Ch.INSTANCE.user)]}})})},Ch.updateStoredUser=function(t){Ch.INSTANCE.user=t,Ch.saveCurrentUser()},Ch.saveCurrentUser=function(){Ch.constructUserKey();var t=Of.getInstance().getStorage();null!=t&&(null==Ch.INSTANCE.user?t.remove(Ch.USER_KEY):t.set(Ch.USER_KEY,JSON.stringify(Ch.INSTANCE.user)))},Ch.INSTANCE=new Ch,Ch),Pl=(cf(Oh,hl=If),Oh.prototype.getBody=function(){return{provider:0,token:this.token,extraData:""}},Oh.prototype.getHeader=function(){return{client_id:this.getHeaderClientId()}},Oh.prototype.getUrl=function(){return this.getAgcgwUrl()+this.URL+"?productId="+this.getHeaderProductId()},Oh),Al=(cf(Rh,ll=Tf),Rh.prototype.constructResponse=function(t){this.uid=t.data.uid,this.accessToken.setToken(t.data.accessToken.token),this.accessToken.setValidPeriod(t.data.accessToken.validPeriod),this.refreshToken.setToken(t.data.refreshToken.token),this.refreshToken.setValidPeriod(t.data.refreshToken.validPeriod),this.ret.setMsg(t.data.ret.msg),this.ret.setCode(t.data.ret.code)},Rh.prototype.getUid=function(){return this.uid},Rh.prototype.getAccessToken=function(){return this.accessToken},Rh.prototype.getRefreshToken=function(){return this.refreshToken},Rh),bl=(bh.prototype.getUser=function(){return this.user},bh),Rl=(cf(Ah,fl=Ef),Ah.prototype.getBody=function(){return{refreshToken:this.refreshToken,accessToken:this.bodyAccessToken}},Ah.prototype.getHeader=function(){return{client_id:this.getHeaderClientId(),app_id:this.getHeaderAppId()}},Ah.prototype.getUrl=function(){return this.getAgcgwUrl()+this.URL+"?productId="+this.getHeaderProductId()},Ah),Ol=(cf(Ph,ul=Tf),Ph),Cl=(cf(Th,cl=Ef),Th.prototype.getBody=function(){return""},Th.prototype.getHeader=function(){return{app_id:this.getHeaderAppId(),access_token:this.getAccessToken(),client_id:this.getHeaderClientId()}},Th.prototype.getUrl=function(){return this.getAgcgwUrl()+this.URL+"?productId="+this.getHeaderProductId()},Th),kl=(cf(_h,al=If),_h.prototype.getProvider=function(){return this.provider},_h.prototype.setProvider=function(t){this.provider=t},_h.prototype.getPhone=function(){return this.phone},_h.prototype.setPhone=function(t){this.phone=t},_h.prototype.getEmail=function(){return this.email},_h.prototype.setEmail=function(t){this.email=t},_h.prototype.getVerifyCode=function(){return this.verifyCode},_h.prototype.setVerifyCode=function(t){this.verifyCode=t},_h.prototype.getPassword=function(){return this.password},_h.prototype.setPassword=function(t){this.password=t},_h.prototype.getBody=function(){return{phone:this.phone,provider:this.provider,email:this.email,password:this.password,verifyCode:this.verifyCode}},_h.prototype.getHeader=function(){return{client_id:this.getHeaderClientId()}},_h.prototype.getUrl=function(){return this.getAgcgwUrl()+this.URL+"?productId="+this.getHeaderProductId()},_h),Nl=(wh.prototype.getUid=function(){return this.uid},wh.prototype.setUid=function(t){this.uid=t},wh.prototype.getDisplayName=function(){return this.displayName},wh.prototype.setDisplayName=function(t){this.displayName=t},wh.prototype.getPhotoUrl=function(){return this.photoUrl},wh.prototype.setPhotoUrl=function(t){this.photoUrl=t},wh.prototype.getPhone=function(){return this.phone},wh.prototype.setPhone=function(t){this.phone=t},wh.prototype.getEmail=function(){return this.email},wh.prototype.setEmail=function(t){this.email=t},wh.prototype.getProvider=function(){return this.provider},wh.prototype.setProvider=function(t){this.provider=t},wh.prototype.getOpenId=function(){return this.openId},wh.prototype.setOpenId=function(t){this.openId=t},wh.prototype.getEmailVerified=function(){return this.emailVerified},wh.prototype.setEmailVerified=function(t){this.emailVerified=t},wh.prototype.getPasswordSetted=function(){return this.passwordSetted},wh.prototype.setPasswordSetted=function(t){this.passwordSetted=t},wh),xl=(cf(Ih,sl=Tf),Ih.prototype.constructResponse=function(t){this.accessToken.setToken(t.data.accessToken.token),this.accessToken.setValidPeriod(t.data.accessToken.validPeriod),this.refreshToken.setToken(t.data.refreshToken.token),this.refreshToken.setValidPeriod(t.data.refreshToken.validPeriod),this.ret.setMsg(t.data.ret.msg),this.ret.setCode(t.data.ret.code),this.userInfo.setUid(t.data.userInfo.uid),this.userInfo.setEmail(t.data.userInfo.email),this.userInfo.setPhone(t.data.userInfo.phone),this.userInfo.setProvider(t.data.userInfo.provider),this.userInfo.setEmailVerified(t.data.userInfo.emailVerified),this.userInfo.setPasswordSetted(t.data.userInfo.passwordSetted),this.userInfo.setDisplayName(t.data.userInfo.displayName),this.userInfo.setOpenId(t.data.userInfo.openId),this.userInfo.setPhotoUrl(t.data.userInfo.phoneUrl)},Ih.prototype.getAccessToken=function(){return this.accessToken},Ih.prototype.setAccessToken=function(t){this.accessToken=t},Ih.prototype.getRefreshToken=function(){return this.refreshToken},Ih.prototype.setRefreshToken=function(t){this.refreshToken=t},Ih.prototype.getUserInfo=function(){return this.userInfo},Ih.prototype.getProviders=function(){return this.providers},Ih),Ml=(cf(Eh,il=If),Eh.prototype.getProvider=function(){return this.provider},Eh.prototype.getToken=function(){return this.token},Eh.prototype.getExtraData=function(){return this.extraData},Eh.prototype.setExtraData=function(t){this.extraData=t},Eh.prototype.isAutoCreateUser=function(){return this.autoCreateUser},Eh.prototype.setAutoCreateUser=function(t){this.autoCreateUser=t},Eh.prototype.setProvider=function(t){this.provider=t},Eh.prototype.setToken=function(t){this.token=t},Eh.prototype.getBody=function(){return{provider:this.provider,token:this.token,extraData:this.extraData,autoCreateUser:this.autoCreateUser}},Eh.prototype.getHeader=function(){return{client_id:this.getHeaderClientId()}},Eh.prototype.getUrl=function(){return this.getAgcgwUrl()+this.URL+"?productId="+this.getHeaderProductId()},Eh),Ul=(Sh.prototype.getProvider=function(){return-1},Sh),Ll=(mh.prototype.getProvider=function(){return-1},mh),Dl=(cf(yh,ol=Tf),yh.prototype.constructResponse=function(t){this.accessToken.setToken(t.data.accessToken.token),this.accessToken.setValidPeriod(t.data.accessToken.validPeriod),this.refreshToken.setToken(t.data.refreshToken.token),this.refreshToken.setValidPeriod(t.data.refreshToken.validPeriod),this.ret.setMsg(t.data.ret.msg),this.ret.setCode(t.data.ret.code),this.userInfo.setUid(t.data.userInfo.uid),this.userInfo.setEmail(t.data.userInfo.email),this.userInfo.setPhone(t.data.userInfo.phone),this.userInfo.setProvider(t.data.userInfo.provider),this.userInfo.setEmailVerified(t.data.userInfo.emailVerified),this.userInfo.setPasswordSetted(t.data.userInfo.passwordSetted),this.userInfo.setDisplayName(t.data.userInfo.displayName),this.userInfo.setOpenId(t.data.userInfo.openId),this.userInfo.setPhotoUrl(t.data.userInfo.phoneUrl)},yh.prototype.getAccessToken=function(){return this.accessToken},yh.prototype.getRefreshToken=function(){return this.refreshToken},yh.prototype.getUserInfo=function(){return this.userInfo},yh.prototype.getProviders=function(){return this.providers},yh),jl=(gh.combinatePhone=function(t,e){return null==t||t.startsWith("+")||(t="+"+t),t+"-"+e},gh),Fl=(cf(vh,rl=Wf),vh.prototype.getPhone=function(){return jl.combinatePhone(this.countryCode,this.phoneNumber)},vh.prototype.verifyPhoneUser=function(t){return""==this.phoneNumber?Sf.INVALID_EMAIL:""==this.password&&t?Sf.PASSWORD_IS_EMPTY:""==this.verifyCode?Sf.EMAIL_VERIFICATION_IS_EMPTY:0},vh),Vl=(cf(dh,nl=Wf),dh.prototype.verifyEmailUser=function(t){return""==this.email?Sf.INVALID_EMAIL:""==this.password&&t?Sf.PASSWORD_IS_EMPTY:""==this.verifyCode?Sf.EMAIL_VERIFICATION_IS_EMPTY:0},dh),$l=(cf(ph,el=Ll),ph.prototype.getProvider=function(){return 12},ph.prototype.prepareUserAuthRequest=function(t){t.setProvider(12),t.setToken(this.email),t.setExtraData(this.generateExtraData())},ph.prototype.prepareUserLinkRequest=function(t){t.setProvider(12),t.setToken(this.email),t.setExtraData(this.generateExtraData())},ph.prototype.generateExtraData=function(){return JSON.stringify({password:this.password,verifyCode:this.verifyCode})},ph),Hl=(hh.prototype.getAction=function(){return this.action},hh.prototype.getLang=function(){return this.lang},hh.prototype.getSendInterval=function(){return this.sendInterval},hh.prototype.setAction=function(t){this.action=t},hh.prototype.setLang=function(t){this.lang=t},hh.prototype.setSendInterval=function(t){this.sendInterval=t},hh),Bl=(lh.prototype.getShortestInterval=function(){return this.shortestInterval},lh.prototype.getValidityPeriod=function(){return this.validityPeriod},lh),Gl=(cf(fh,tl=If),fh.prototype.getPhone=function(){return this.phone},fh.prototype.setPhone=function(t){this.phone=t},fh.prototype.getEmail=function(){return this.email},fh.prototype.setEmail=function(t){this.email=t},fh.prototype.getAction=function(){return this.action},fh.prototype.setAction=function(t){this.action=t},fh.prototype.getLang=function(){return this.lang},fh.prototype.setLang=function(t){this.lang=t},fh.prototype.getSendInterval=function(){return this.sendInterval},fh.prototype.setSendInterval=function(t){this.sendInterval=t},fh.prototype.getBody=function(){return{phone:this.phone,email:this.email,lang:this.lang,action:this.action,sendInterval:this.sendInterval}},fh.prototype.getHeader=function(){return{client_id:this.getHeaderClientId()}},fh.prototype.getUrl=function(){return this.getAgcgwUrl()+this.URL+"?productId="+this.getHeaderProductId()},fh),Wl=(cf(uh,Zf=Tf),uh.prototype.constructResponse=function(t){this.shortestInterval=t.data.shortestInterval,this.validityPeriod=t.data.validityPeriod,this.ret.setMsg(t.data.ret.msg),this.ret.setCode(t.data.ret.code)},uh.prototype.getShortestInterval=function(){return this.shortestInterval},uh.prototype.setShortestInterval=function(t){this.shortestInterval=t},uh.prototype.getValidityPeriod=function(){return this.validityPeriod},uh.prototype.setValidityPeriod=function(t){this.validityPeriod=t},uh),Kl=(ch.requestEmailVerifyCode=function(t,e){var n=this.buildRequest(t,"",e);return this.requestVerifyCode(n)},ch.requestPhoneVerifyCode=function(t,e,n){var r=jl.combinatePhone(t,e),o=this.buildRequest("",r,n);return this.requestVerifyCode(o)},ch.requestVerifyCode=function(n){return uf(this,void 0,void 0,function(){var e;return ff(this,function(t){switch(t.label){case 0:return e=new Wl,[4,yl.post(n,e).catch(function(){throw new Error("request for verify code fail!")})];case 1:if(t.sent(),0!=e.getRet().getCode())throw new Error(e.getRet().getMsg());return[2,Promise.resolve(new Bl(e.getShortestInterval(),e.getValidityPeriod()))]}})})},ch.buildRequest=function(t,e,n){if(null==n)throw new Error("invalid verifyCodeSettings.");var r=new Gl;return r.setEmail(t),r.setPhone(e),r.setAction(n.getAction()),r.setLang(n.getLang()),r.setSendInterval(n.getSendInterval()),r},ch),ql=(ah.credentialWithPassword=function(t,e){return new $l(t,e,"")},ah.credentialWithVerifyCode=function(t,e,n){return new $l(t,e,n)},ah.requestVerifyCode=function(t,e,n,r){return Kl.requestEmailVerifyCode(t,new Hl(e,n,r))},ah),Yl=(cf(sh,Qf=Ll),sh.prototype.getProvider=function(){return 11},sh.prototype.prepareUserAuthRequest=function(t){t.setProvider(11),t.setToken(this.getPhone()),t.setExtraData(this.generateExtraData())},sh.prototype.prepareUserLinkRequest=function(t){t.setProvider(11),t.setToken(this.getPhone()),t.setExtraData(this.generateExtraData())},sh.prototype.generateExtraData=function(){return JSON.stringify({password:this.password,verifyCode:this.verifyCode})},sh.prototype.getPhone=function(){return jl.combinatePhone(this.countryCode,this.phoneNumber)},sh),zl=(ih.credentialWithPassword=function(t,e,n){return new Yl(t,e,n,"")},ih.credentialWithVerifyCode=function(t,e,n,r){return new Yl(t,e,n,r)},ih.requestVerifyCode=function(t,e,n,r,o){return Kl.requestPhoneVerifyCode(t,e,new Hl(n,r,o))},ih),Jl=(cf(oh,Xf=Ul),oh.prototype.getProvider=function(){return 4},oh.prototype.prepareUserAuthRequest=function(t){t.setProvider(4),t.setToken(this.token),t.setExtraData(this.openId)},oh.prototype.prepareUserLinkRequest=function(t){t.setProvider(4),t.setToken(this.token),t.setExtraData(this.openId)},oh),Xl=(rh.credentialWithToken=function(t,e,n){return void 0===n&&(n=!0),new Jl(t,e,n)},rh),Ql=(cf(nh,Jf=Ul),nh.prototype.getProvider=function(){return 6},nh.prototype.prepareUserAuthRequest=function(t){t.setProvider(6),t.setToken(this.token),t.setExtraData(this.openId)},nh.prototype.prepareUserLinkRequest=function(t){t.setProvider(6),t.setToken(this.token),t.setExtraData(this.openId)},nh),Zl=(eh.credentialWithToken=function(t,e,n){return void 0===n&&(n=!0),new Ql(t,e,n)},eh),th=new c(function(){return new Gh});function eh(){}function nh(t,e,n){void 0===n&&(n=!0);var r=Jf.call(this)||this;return r.token=t,r.openId=e,r.autoCreateUser=n,r}function rh(){}function oh(t,e,n){var r=Xf.call(this)||this;return r.token=t,r.openId=e,r.autoCreateUser=n,r}function ih(){}function sh(t,e,n,r){var o=Qf.call(this)||this;return o.countryCode=t,o.phoneNumber=e,o.password=n,o.verifyCode=r,o}function ah(){}function ch(){}function uh(){var t=null!==Zf&&Zf.apply(this,arguments)||this;return t.shortestInterval="",t.validityPeriod="",t}function fh(){var t=null!==tl&&tl.apply(this,arguments)||this;return t.URL=If.SERVER_URL+"/verify-code",t.phone="",t.email="",t.action=-1,t.lang="",t.sendInterval=-1,t}function lh(t,e){this.shortestInterval=t,this.validityPeriod=e}function hh(t,e,n){this.action=t,this.lang=e,this.sendInterval=n}function ph(t,e,n){var r=el.call(this)||this;return r.email=t,r.password=e,r.verifyCode=n,r}function dh(t,e,n){var r=nl.call(this)||this;return r.email=t,r.password=e,r.verifyCode=n,r}function vh(t,e,n,r){var o=rl.call(this)||this;return o.countryCode=t,o.phoneNumber=e,o.password=n,o.verifyCode=r,o}function gh(){}function yh(){var t=null!==ol&&ol.apply(this,arguments)||this;return t.accessToken=new Pf,t.refreshToken=new Pf,t.userInfo=new Nl,t.providers=[],t}function mh(){this.password="",this.verifyCode=""}function Sh(){this.autoCreateUser=!0}function Eh(){var t=null!==il&&il.apply(this,arguments)||this;return t.URL=If.SERVER_URL+"/user-signin",t.provider=-1,t.token="",t.extraData="",t.autoCreateUser=-1,t.verifyCode="",t}function Ih(){var t=null!==sl&&sl.apply(this,arguments)||this;return t.accessToken=new Pf,t.refreshToken=new Pf,t.userInfo=new Nl,t.providers=[],t}function wh(){this.uid="",this.displayName="",this.photoUrl="",this.phone="",this.email="",this.provider=-1,this.openId="",this.emailVerified=-1,this.passwordSetted=-1}function _h(t,e,n,r){var o=al.call(this)||this;return o.URL=If.SERVER_URL+"/user-register",o.provider=-1,o.email=t,o.phone=e,o.password=n,o.verifyCode=r,o}function Th(){var t=null!==cl&&cl.apply(this,arguments)||this;return t.URL=If.SERVER_URL+"/user-delete",t}function Ph(){return null!==ul&&ul.apply(this,arguments)||this}function Ah(t,e){var n=fl.call(this)||this;return n.URL=If.SERVER_URL+"/user-signout",n.bodyAccessToken=t,n.refreshToken=e,n}function bh(t){this.user=t}function Rh(){var t=ll.call(this)||this;return t.accessToken=new Pf,t.refreshToken=new Pf,t.uid="",t}function Oh(t,e,n){var r=hl.call(this)||this;return r.URL=If.SERVER_URL+"/user-signin-anonymous",r.provider=t,r.token=e,r.extraData=n,r}function Ch(){this.user=null}function kh(){this.anonymous=!1,this.uid="",this.displayName="",this.photoUrl="",this.email="",this.phone="",this.providerId="",this.emailVerified=-1,this.passwordSetted=-1,this.providerService=new yf,this.tokenService=new ml}function Nh(t,e){this.token=t,this.expirePeriod=e}function xh(){this.createTime="",this.lastSignInTime=""}function Mh(){var t=pl.call(this)||this;return t.displayName="",t.photoUrl="",t.emailVerified=0,t.passwordSetted=0,t.email="",t.phone="",t.userExtra=null,t}function Uh(){var t=null!==dl&&dl.apply(this,arguments)||this;return t.URL=If.SERVER_URL+"/user-profile",t}function Lh(){this.accessToken="",this.accessTokenValidPeriod=-1,this.refreshToken="",this.validTime=-1}function Dh(){}(gl=Kf=Kf||{})[gl.persistenceStorage=0]="persistenceStorage",gl[gl.temporaryStorage=1]="temporaryStorage",gl[gl.memoryStorage=2]="memoryStorage",(vl=qf=qf||{})[vl.ACTION_REGISTER_LOGIN=1001]="ACTION_REGISTER_LOGIN",vl[vl.ACTION_RESET_PASSWORD=1002]="ACTION_RESET_PASSWORD",zf={PhoneUser:Fl,EmailUser:Vl,EmailAuthProvider:ql,PhoneAuthProvider:zl,WeixinAuthProvider:Xl,QQAuthProvider:Zl,Persistence:Kf,Action:qf},(Yf=l).registerApiProvider("auth",function(){return th.get()},zf),Yf.registerInternalService({name:"CredentialsService",serviceFactory:function(t){return new Cf}});var jh,Fh,Vh,$h,Hh,Bh,Gh=(Kh.prototype.createEmailUser=function(s){return uf(this,void 0,void 0,function(){var e,n,r,o,i;return ff(this,function(t){switch(t.label){case 0:return[4,this.getCurrentUser().then(function(t){if(null!=t&&!t.isAnonymous())throw new Error("already sign in a user")})];case 1:if(t.sent(),null==s||null==s)throw new Error("emailUser undefined");if(0!=(e=s.verifyEmailUser(!1)))throw n=Sf.getMsgByCode(e),new Error(n);return(r=new kl(s.email,"",s.password,s.verifyCode)).setProvider(12),o=new xl,[4,yl.post(r,o).catch(function(t){throw new Error("request for create user failed!")})];case 2:if(t.sent(),0!=o.getRet().getCode())throw new Error(o.getRet().getMsg());return(i=new _l).buildUser(o),Tl.updateStoredUser(i),[2,Promise.resolve(new bl(i))]}})})},Kh.prototype.createPhoneUser=function(s){return uf(this,void 0,void 0,function(){var e,n,r,o,i;return ff(this,function(t){switch(t.label){case 0:return[4,this.getCurrentUser().then(function(t){if(null!=t&&!t.isAnonymous())throw new Error("already sign in a user")})];case 1:if(t.sent(),null==s)throw new Error("phoneUser null");if(0!=(e=s.verifyPhoneUser(!1)))throw n=Sf.getMsgByCode(e),new Error(n);return(r=new kl("",s.getPhone(),s.password,s.verifyCode)).setProvider(11),o=new xl,[4,yl.post(r,o).catch(function(){throw new Error("request for create user failed!")})];case 2:if(t.sent(),0!=o.getRet().getCode())throw new Error(o.getRet().getMsg());return(i=new _l).buildUser(o),Tl.updateStoredUser(i),[2,Promise.resolve(new bl(i))]}})})},Kh.prototype.signIn=function(o){return uf(this,void 0,void 0,function(){var r=this;return ff(this,function(t){switch(t.label){case 0:if(null==o)throw new Error("credential null");return[4,this.getCurrentUser().then(function(t){if(null!=t&&!t.isAnonymous())throw new Error("already sign in a user")})];case 1:return t.sent(),[2,new Promise(function(e,n){r.getUserWithCredential(o).then(function(t){e(t)}).catch(function(t){n(t)})})]}})})},Kh.prototype.getUserWithCredential=function(o){return uf(this,void 0,void 0,function(){var e,n,r;return ff(this,function(t){switch(t.label){case 0:if(e=new Ml,o instanceof Ul)o.prepareUserAuthRequest(e),e.setAutoCreateUser(o.autoCreateUser?1:0);else{if(!(o instanceof Ll))throw new Error("credential type error");o.prepareUserAuthRequest(e)}return n=new Dl,[4,yl.post(e,n).catch(function(t){throw new Error(t)})];case 1:if(t.sent(),0!=n.getRet().getCode())throw new Error(n.getRet().getMsg());return(r=new _l).buildUser(n),Tl.updateStoredUser(r),[2,Promise.resolve(new bl(r))]}})})},Kh.prototype.deleteUser=function(){return this.getCurrentUser().then(function(t){var e,n,r;null!=t&&(e=t,n=new Cl,r=new Ol,n.setAccessToken(e.getAccessToken()),yl.post(n,r).then(function(t){console.log("deleteUser success.")}).catch(function(t){console.log("deleteUser fail."+t)}),Tl.updateStoredUser(null))}),Promise.resolve()},Kh.prototype.signOut=function(){return this.getCurrentUser().then(function(t){var e,n,r;null!=t&&(n=new Rl((e=t).getAccessToken(),e.getRefreshToken()),r=new Ol,yl.post(n,r).then(function(t){console.log("signOut success.")}).catch(function(t){console.log("signOut fail."+t)}),Tl.updateStoredUser(null))}),Promise.resolve()},Kh.prototype.getCurrentUser=function(){return uf(this,void 0,void 0,function(){var e;return ff(this,function(t){switch(t.label){case 0:return[4,Tl.getStoredUser().then(function(t){e=t}).catch(function(t){console.log("getCurrentUser catch"+t)})];case 1:return t.sent(),[2,Promise.resolve(e)]}})})},Kh.prototype.signInAnonymously=function(){var n=this;return this.getCurrentUser().then(function(t){if(null==t)return n.getUserWithAnonymously();if(t.isAnonymous()){var e=new bl(t);return Promise.resolve(e)}return Promise.reject(Error("already sign in a user"))}).catch(function(t){return Promise.reject("get current user failed. "+t)})},Kh.prototype.getUserWithAnonymously=function(){return uf(this,void 0,void 0,function(){var e,n,r,o,i;return ff(this,function(t){switch(t.label){case 0:return null==(e=l.instance().getService("ClientInfoService"))?[2,Promise.reject("Get clientInfoUtil service failed.")]:(n="",[4,e.getAaid().then(function(t){n=t})]);case 1:return t.sent(),n?(r=new Pl(0,n,""),o=new Al,[4,yl.post(r,o).catch(function(t){throw new Error(t)})]):[2,Promise.reject("The aaid is null.")];case 2:if(t.sent(),0!=o.getRet().getCode())throw new Error(o.getRet().getMsg());return(i=new _l).uid=o.getUid(),i.providerId=(0).toString(),i.tokenService.constructeSecureTokenService(o.getAccessToken(),o.getRefreshToken()),i.anonymous=!0,Tl.updateStoredUser(i),[2,Promise.resolve(new bl(i))]}})})},Kh.prototype.setUserInfoPersistence=function(t){Kh.persistence=t},Kh.getUserInfoPersistence=function(){return Kh.persistence},Kh.prototype.setCryptImp=function(t){if(!t.decrypt||!t.encrypt)return console.log("the crypt is not exist necessary methods."),!1;var e=Of.getInstance().getStorage();return null==e||null==e?(console.log("Get AGC storage Service failed."),!1):(e.setCryptImp(t),!0)},Kh.persistence=Kf.memoryStorage,Kh),Wh=new c(function(){return new Gh});function Kh(){}function qh(t){return new Cf}(Bh=jh=jh||{})[Bh.persistenceStorage=0]="persistenceStorage",Bh[Bh.temporaryStorage=1]="temporaryStorage",Bh[Bh.memoryStorage=2]="memoryStorage",(Hh=Fh=Fh||{})[Hh.ACTION_REGISTER_LOGIN=1001]="ACTION_REGISTER_LOGIN",Hh[Hh.ACTION_RESET_PASSWORD=1002]="ACTION_RESET_PASSWORD",$h={PhoneUser:Fl,EmailUser:Vl,EmailAuthProvider:ql,PhoneAuthProvider:zl,WeixinAuthProvider:Xl,QQAuthProvider:Zl,Persistence:jh,Action:Fh},(Vh=l).registerApiProvider("auth",function(){return Wh.get()},$h),Vh.registerInternalService({name:"CredentialsService",serviceFactory:qh});var Yh={CREATEPAYMENTINFO:"$CreatePaymentInfo",ADDPRODUCT2CART:"$AddProduct2Cart",ADDPRODUCT2WISHLIST:"$AddProduct2WishList",STARTAPP:"$StartApp",STARTCHECKOUT:"$StartCheckout",VIEWCAMPAIGN:"$ViewCampaign",VIEWCHECKOUTSTEP:"$ViewCheckoutStep",WINVIRTUALCOIN:"$WinVirtualCoin",COMPLETEPURCHASE:"$CompletePurchase",OBTAINLEADS:"$ObtainLeads",JOINUSERGROUP:"$JoinUserGroup",COMPLETELEVEL:"$CompleteLevel",STARTLEVEL:"$StartLevel",UPGRADELEVEL:"$UpgradeLevel",SIGNIN:"$SignIn",SUBMITSCORE:"$SubmitScore",CREATEORDER:"$CreateOrder",REFUNDORDER:"$RefundOrder",DELPRODUCTFROMCART:"$DelProductFromCart",SEARCH:"$Search",VIEWCONTENT:"$ViewContent",UPDATECHECKOUTOPTION:"$UpdateCheckoutOption",SHARECONTENT:"$ShareContent",REGISTERACCOUNT:"$RegisterAccount",CONSUMEVIRTUALCOIN:"$ConsumeVirtualCoin",STARTTUTORIAL:"$StartTutorial",COMPLETETUTORIAL:"$CompleteTutorial",OBTAINACHIEVEMENT:"$ObtainAchievement",VIEWPRODUCT:"$ViewProduct",VIEWPRODUCTLIST:"$ViewProductList",VIEWSEARCHRESULT:"$ViewSearchResult",UPDATEMEMBERSHIPLEVEL:"$UpdateMembershipLevel",FILTRATEPRODUCT:"$FiltrateProduct",VIEWCATEGORY:"$ViewCategory",UPDATEORDER:"$UpdateOrder",CANCELORDER:"$CancelOrder",COMPLETEORDER:"$CompleteOrder",CANCELCHECKOUT:"$CancelCheckout",OBTAINVOUCHER:"$ObtainVoucher",CONTACTCUSTOMSERVICE:"$ContactCustomService",DISPLAYINAPPMESSAGE:"$DisplayInAppMessage",DISMISSINAPPMESSAGE:"$DismissInAppMessage",CLICKINAPPMESSAGE:"$ClickInAppMessage"},zh={FIRST_OPEN:"$AppFirstOpen",ENTER_SCREEN:"$EnterScreen",EXIT_SCREEN:"$ExitScreen",HA_NOTIFICATION_DISPLAY:"$HA_NOTIFICATION_DISPLAY",DisplayNotificaiton:"$DisplayNotificaiton",HA_NOTIFICATION_CLICK:"$HA_NOTIFICATION_CLICK",ClickNotification:"$ClickNotification",HA_NOTIFICATION_CLEAR:"$HA_NOTIFICATION_CLEAR",ClearNotification:"$ClearNotification",HA_APP_INSTALL:"$HA_APP_INSTALL",InstallApp:"$InstallApp",HA_APP_START:"$HA_APP_START",LaunchApp:"$LaunchApp",HA_APP_UPDATE:"$HA_APP_UPDATE",UpdateApp:"$UpdateApp",HA_FIRST_OPEN:"$HA_FIRST_OPEN",AppFirstOpen:"$AppFirstOpen",HA_SCREEN_ENTER:"$HA_SCREEN_ENTER",EnterScreen:"$EnterScreen",HA_SCREEN_EXIT:"$HA_SCREEN_EXIT",ExitScreen:"$ExitScreen",HA_CLEAR_DATA:"$HA_CLEAR_DATA",ClearData:"$ClearData",HA_CLEAR_CACHE:"$HA_CLEAR_CACHE",ClearCache:"$ClearCache",HA_APP_UNINSTALL:"$HA_APP_UNINSTALL",UninstallApp:"$UninstallApp",InAppPurchase:"$InAppPurchase",RequestAd:"$RequestAd",DisplayAd:"$DisplayAd",ClickAd:"$ClickAd",ObtainAdAward:"$ObtainAdAward"},Jh={STORENAME:"$StoreName",BRAND:"$Brand",CATEGORY:"$Category",PRODUCTID:"$ProductId",PRODUCTNAME:"$ProductName",PRODUCTFEATURE:"$ProductFeature",PRICE:"$Price",QUANTITY:"$Quantity",REVENUE:"$Revenue",CURRNAME:"$CurrName",PLACEID:"$PlaceId",DESTINATION:"$Destination",ENDDATE:"$EndDate",BOOKINGDAYS:"$BookingDays",PASSENGERSNUMBER:"$PassengersNumber",BOOKINGROOMS:"$BookingRooms",ORIGINATINGPLACE:"$OriginatingPlace",BEGINDATE:"$BeginDate",TRANSACTIONID:"$TransactionId",CLASS:"$Class",CLICKID:"$ClickId",PROMOTIONNAME:"$PromotionName",CONTENT:"$Content",EXTENDPARAM:"$ExtendParam",MATERIALNAME:"$MaterialName",MATERIALSLOT:"$MaterialSlot",MEDIUM:"$Medium",SOURCE:"$Source",KEYWORDS:"$Keywords",OPTION:"$Option",STEP:"$Step",VIRTUALCURRNAME:"$VirtualCurrName",VOUCHER:"$Voucher",PLACE:"$Place",SHIPPING:"$Shipping",TAXFEE:"$TaxFee",USERGROUPID:"$UserGroupId",LEVELNAME:"$LevelName",RESULT:"$Result",ROLENAME:"$RoleName",LEVELID:"$LevelId",CHANNEL:"$Channel",SCORE:"$Score",SEARCHKEYWORDS:"$SearchKeywords",CONTENTTYPE:"$ContentType",ACHIEVEMENTID:"$AchievementId",FLIGHTNO:"$FlightNo",POSITIONID:"$PositionId",PRODUCTLIST:"$ProductList",ACOUNTTYPE:"$AcountType",OCCURREDTIME:"$OccurredTime",EVTRESULT:"$EvtResult",PREVLEVEL:"$PrevLevel",CURRVLEVEL:"$CurrvLevel",VOUCHERS:"$Vouchers",MATERIALSLOTTYPE:"$MaterialSlotType",LISTID:"$ListId",FILTERS:"$Filters",SORTS:"$Sorts",ORDERID:"$OrderId",PAYTYPE:"$PayType",REASON:"$Reason",EXPIREDATE:"$ExpireDate",VOUCHERTYPE:"$VoucherType",SERVICETYPE:"$ServiceType",DETAILS:"$Details",COMMENTTYPE:"$CommentType",REGISTMETHOD:"$RegistMethod",VIEWCATEGORY:"$ViewCategory",UPDATEORDER:"$UpdateOrder",CANCELORDER:"$CancelOrder",COMPLETEORDER:"$CompleteOrder",CANCELCHECKOUT:"$CancelCheckout",OBTAINVOUCHER:"$ObtainVoucher",CONTACTCUSTOMSERVICE:"$ContactCustomService",DISPLAYINAPPMESSAGE:"$DisplayInAppMessage",DISMISSINAPPMESSAGE:"$DismissInAppMessage",CLICKINAPPMESSAGE:"$ClickInAppMessage"};function Xh(t,e){return t(e={exports:{}},e.exports),e.exports}function Qh(t){return"Symbol(".concat(void 0===t?"":t,")_",(++cp+up).toString(36))}function Zh(t){return"object"==typeof t?null!==t:"function"==typeof t}function tp(t){if(!Zh(t))throw TypeError(t+" is not an object!");return t}function ep(t){try{return!!t()}catch(t){return!0}}function np(t){return pp?hp.createElement(t):{}}function rp(t,e){if(!Zh(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!Zh(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!Zh(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!Zh(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}function op(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}var ip=Xh(function(t){var e=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=e)}),sp=(ip.version,Xh(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),ap=Xh(function(t){var n=sp["__core-js_shared__"]||(sp["__core-js_shared__"]={});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:ip.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),cp=0,up=Math.random(),fp=Xh(function(t){var e=ap("wks"),n=sp.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:Qh)("Symbol."+t))}).store=e}),lp=!ep(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),hp=sp.document,pp=Zh(hp)&&Zh(hp.createElement),dp=!lp&&!ep(function(){return 7!=Object.defineProperty(np("div"),"a",{get:function(){return 7}}).a}),vp=Object.defineProperty,gp={f:lp?Object.defineProperty:function(t,e,n){if(tp(t),e=rp(e,!0),tp(n),dp)try{return vp(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},yp=lp?function(t,e,n){return gp.f(t,e,op(1,n))}:function(t,e,n){return t[e]=n,t},mp=fp("unscopables"),Sp=Array.prototype;null==Sp[mp]&&yp(Sp,mp,{});function Ep(t){Sp[mp][t]=!0}function Ip(t,e){return{value:e,done:!!t}}function wp(t){return Op.call(t).slice(8,-1)}function _p(t){if(null==t)throw TypeError("Can't call method on  "+t);return t}function Tp(t){return Cp(_p(t))}function Pp(t,e){return kp.call(t,e)}function Ap(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}function bp(r,o,t){if(Ap(r),void 0===o)return r;switch(t){case 1:return function(t){return r.call(o,t)};case 2:return function(t,e){return r.call(o,t,e)};case 3:return function(t,e,n){return r.call(o,t,e,n)}}return function(){return r.apply(o,arguments)}}var Rp={},Op={}.toString,Cp=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==wp(t)?t.split(""):Object(t)},kp={}.hasOwnProperty,Np=ap("native-function-to-string",Function.toString),xp=Xh(function(t){var i=Qh("src"),s=(""+Np).split("toString");ip.inspectSource=function(t){return Np.call(t)},(t.exports=function(t,e,n,r){var o="function"==typeof n;o&&(Pp(n,"name")||yp(n,"name",e)),t[e]!==n&&(o&&(Pp(n,i)||yp(n,i,t[e]?""+t[e]:s.join(String(e)))),t===sp?t[e]=n:r?t[e]?t[e]=n:yp(t,e,n):(delete t[e],yp(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[i]||Np.call(this)})}),Mp=function(t,e,n){var r,o,i,s,a=t&Mp.F,c=t&Mp.G,u=t&Mp.S,f=t&Mp.P,l=t&Mp.B,h=c?sp:u?sp[e]||(sp[e]={}):(sp[e]||{}).prototype,p=c?ip:ip[e]||(ip[e]={}),d=p.prototype||(p.prototype={});for(r in c&&(n=e),n)i=((o=!a&&h&&void 0!==h[r])?h:n)[r],s=l&&o?bp(i,sp):f&&"function"==typeof i?bp(Function.call,i):i,h&&xp(h,r,i,t&Mp.U),p[r]!=i&&yp(p,r,s),f&&d[r]!=i&&(d[r]=i)};sp.core=ip,Mp.F=1,Mp.G=2,Mp.S=4,Mp.P=8,Mp.B=16,Mp.W=32,Mp.U=64,Mp.R=128;function Up(t){return isNaN(t=+t)?0:(0<t?Gp:Bp)(t)}function Lp(t){return 0<t?Wp(Up(t),9007199254740991):0}function Dp(u){return function(t,e,n){var r,o,i,s=Tp(t),a=Lp(s.length),c=(i=a,(o=Up(o=n))<0?Kp(o+i,0):qp(o,i));if(u&&e!=e){for(;c<a;)if((r=s[c++])!=r)return!0}else for(;c<a;c++)if((u||c in s)&&s[c]===e)return u||c||0;return!u&&-1}}function jp(t){return Yp[t]||(Yp[t]=Qh(t))}function Fp(t,e){var n,r=Tp(t),o=0,i=[];for(n in r)n!=Jp&&Pp(r,n)&&i.push(n);for(;e.length>o;)Pp(r,n=e[o++])&&(~zp(i,n)||i.push(n));return i}function Vp(){}function $p(t,e,n){t&&!Pp(t=n?t:t.prototype,sd)&&id(t,sd,{configurable:!0,value:e})}var Hp=Mp,Bp=Math.ceil,Gp=Math.floor,Wp=Math.min,Kp=Math.max,qp=Math.min,Yp=ap("keys"),zp=Dp(!1),Jp=jp("IE_PROTO"),Xp="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Qp=Object.keys||function(t){return Fp(t,Xp)},Zp=lp?Object.defineProperties:function(t,e){tp(t);for(var n,r=Qp(e),o=r.length,i=0;i<o;)gp.f(t,n=r[i++],e[n]);return t},td=sp.document,ed=td&&td.documentElement,nd=jp("IE_PROTO"),rd=function(){var t,e=np("iframe"),n=Xp.length;for(e.style.display="none",ed.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),rd=t.F;n--;)delete rd.prototype[Xp[n]];return rd()},od=Object.create||function(t,e){var n;return null!==t?(Vp.prototype=tp(t),n=new Vp,Vp.prototype=null,n[nd]=t):n=rd(),void 0===e?n:Zp(n,e)},id=gp.f,sd=fp("toStringTag"),ad={};yp(ad,fp("iterator"),function(){return this});function cd(t){return Object(_p(t))}function ud(){return this}function fd(t,e,n,r,o,i,s){var a,c,u;function f(t){if(!vd&&t in y)return y[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}}c=e,u=r,(a=n).prototype=od(ad,{next:op(1,u)}),$p(a,c+" Iterator");var l,h,p,d=e+" Iterator",v="values"==o,g=!1,y=t.prototype,m=y[dd]||y["@@iterator"]||o&&y[o],S=m||f(o),E=o?v?f("entries"):S:void 0,I="Array"==e&&y.entries||m;if(I&&(p=pd(I.call(new t)))!==Object.prototype&&p.next&&($p(p,d,!0),"function"!=typeof p[dd]&&yp(p,dd,ud)),v&&m&&"values"!==m.name&&(g=!0,S=function(){return m.call(this)}),!vd&&!g&&y[dd]||yp(y,dd,S),Rp[e]=S,Rp[d]=ud,o)if(l={values:v?S:f("values"),keys:i?S:f("keys"),entries:E},s)for(h in l)h in y||xp(y,h,l[h]);else Hp(Hp.P+Hp.F*(vd||g),e,l);return l}var ld=jp("IE_PROTO"),hd=Object.prototype,pd=Object.getPrototypeOf||function(t){return t=cd(t),Pp(t,ld)?t[ld]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?hd:null},dd=fp("iterator"),vd=!([].keys&&"next"in[].keys()),gd=fd(Array,"Array",function(t,e){this._t=Tp(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,Ip(1)):Ip(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");Rp.Arguments=Rp.Array,Ep("keys"),Ep("values"),Ep("entries");for(var yd=fp("iterator"),md=fp("toStringTag"),Sd=Rp.Array,Ed={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Id=Qp(Ed),wd=0;wd<Id.length;wd++){var _d,Td=Id[wd],Pd=Ed[Td],Ad=sp[Td],bd=Ad&&Ad.prototype;if(bd&&(bd[yd]||yp(bd,yd,Sd),bd[md]||yp(bd,md,Td),Rp[Td]=Sd,Pd))for(_d in gd)bd[_d]||xp(bd,_d,gd[_d],!0)}function Rd(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Od))?n:Cd?wp(e):"Object"==(r=wp(e))&&"function"==typeof e.callee?"Arguments":r}var Od=fp("toStringTag"),Cd="Arguments"==wp(function(){return arguments}()),kd={};kd[fp("toStringTag")]="z",kd+""!="[object z]"&&xp(Object.prototype,"toString",function(){return"[object "+Rd(this)+"]"},!0);function Nd(a){return function(t,e){var n,r,o=String(_p(t)),i=Up(e),s=o.length;return i<0||s<=i?a?"":void 0:(n=o.charCodeAt(i))<55296||56319<n||i+1===s||(r=o.charCodeAt(i+1))<56320||57343<r?a?o.charAt(i):n:a?o.slice(i,i+2):r-56320+(n-55296<<10)+65536}}var xd=Nd(!0);fd(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=xd(e,n),this._i+=t.length,{value:t,done:!1})});function Md(t,e,n){for(var r in e)xp(t,r,e[r],n);return t}function Ud(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}function Ld(t){var e=sp[t];lp&&e&&!e[Bd]&&gp.f(e,Bd,{configurable:!0,get:function(){return this}})}function Dd(t,e){var n,r=qd(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n}var jd=fp("iterator"),Fd=Array.prototype,Vd=fp("iterator"),$d=ip.getIteratorMethod=function(t){if(null!=t)return t[Vd]||t["@@iterator"]||Rp[Rd(t)]},Hd=Xh(function(t){var h={},p={},e=t.exports=function(t,e,n,r,o){var i,s,a,c,u=o?function(){return t}:$d(t),f=bp(n,r,e?2:1),l=0;if("function"!=typeof u)throw TypeError(t+" is not iterable!");if(void 0===u||Rp.Array!==u&&Fd[jd]!==u){for(a=u.call(t);!(s=a.next()).done;)if((c=function(t,e,n,r){try{return r?e(tp(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&tp(o.call(t)),e}}(a,f,s.value,e))===h||c===p)return c}else for(i=Lp(t.length);l<i;l++)if((c=e?f(tp(s=t[l])[0],s[1]):f(t[l]))===h||c===p)return c};e.BREAK=h,e.RETURN=p}),Bd=fp("species"),Gd=Xh(function(t){function n(t){e(t,r,{value:{i:"O"+ ++o,w:{}}})}var r=Qh("meta"),e=gp.f,o=0,i=Object.isExtensible||function(){return!0},s=!ep(function(){return i(Object.preventExtensions({}))}),a=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!Zh(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Pp(t,r)){if(!i(t))return"F";if(!e)return"E";n(t)}return t[r].i},getWeak:function(t,e){if(!Pp(t,r)){if(!i(t))return!0;if(!e)return!1;n(t)}return t[r].w},onFreeze:function(t){return s&&a.NEED&&i(t)&&!Pp(t,r)&&n(t),t}}}),Wd=(Gd.KEY,Gd.NEED,Gd.fastKey,Gd.getWeak,Gd.onFreeze,function(t,e){if(!Zh(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}),Kd=gp.f,qd=Gd.fastKey,Yd=lp?"_s":"size",zd={getConstructor:function(t,i,n,r){var o=t(function(t,e){Ud(t,o,i,"_i"),t._t=i,t._i=od(null),t._f=void 0,t._l=void 0,t[Yd]=0,null!=e&&Hd(e,n,t[r],t)});return Md(o.prototype,{clear:function(){for(var t=Wd(this,i),e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[Yd]=0},delete:function(t){var e,n,r=Wd(this,i),o=Dd(r,t);return o&&(e=o.n,n=o.p,delete r._i[o.i],o.r=!0,n&&(n.n=e),e&&(e.p=n),r._f==o&&(r._f=e),r._l==o&&(r._l=n),r[Yd]--),!!o},forEach:function(t){Wd(this,i);for(var e,n=bp(t,1<arguments.length?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!Dd(Wd(this,i),t)}}),lp&&Kd(o.prototype,"size",{get:function(){return Wd(this,i)[Yd]}}),o},def:function(t,e,n){var r,o,i=Dd(t,e);return i?i.v=n:(t._l=i={i:o=qd(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[Yd]++,"F"!==o&&(t._i[o]=i)),t},getEntry:Dd,setStrong:function(t,n,e){fd(t,n,function(t,e){this._t=Wd(t,n),this._k=e,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?Ip(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,Ip(1))},e?"entries":"values",!e,!0),Ld(n)}},Jd=fp("iterator"),Xd=!1;try{var Qd=[7][Jd]();Qd.return=function(){Xd=!0},Array.from(Qd,function(){throw 2})}catch(t){}function Zd(t,e){if(!e&&!Xd)return!1;var n=!1;try{var r=[7],o=r[Jd]();o.next=function(){return{done:n=!0}},r[Jd]=function(){return o},t(r)}catch(t){}return n}function tv(t,e){if(tp(t),!Zh(e)&&null!==e)throw TypeError(e+": can't set as prototype!")}function ev(t,e,n){var r,o=e.constructor;return o!==n&&"function"==typeof o&&(r=o.prototype)!==n.prototype&&Zh(r)&&Ev&&Ev(t,r),t}function nv(t,e,n){var r={},o=ep(function(){return _v[t]()||"​"!="​"[t]()}),i=r[t]=o?e(bv):_v[t];n&&(r[n]=i),Hp(Hp.P+Hp.F*o,"String",r)}function rv(t){var e=rp(t,!1);if("string"==typeof e&&2<e.length){var n,r,o,i=(e=Lv?e.trim():kv(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var s,a=e.slice(2),c=0,u=a.length;c<u;c++)if((s=a.charCodeAt(c))<48||o<s)return NaN;return parseInt(a,r)}}return+e}var ov,iv,sv,av,cv,uv,fv,lv,hv,pv,dv,vv,gv,yv={f:{}.propertyIsEnumerable},mv=Object.getOwnPropertyDescriptor,Sv={f:lp?mv:function(t,e){if(t=Tp(t),e=rp(e,!0),dp)try{return mv(t,e)}catch(t){}if(Pp(t,e))return op(!yv.f.call(t,e),t[e])}},Ev=Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=bp(Function.call,Sv.f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return tv(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),Iv=(ov="Map",iv=function(t){return function(){return t(this,0<arguments.length?arguments[0]:void 0)}},sv={get:function(t){var e=zd.getEntry(Wd(this,"Map"),t);return e&&e.v},set:function(t,e){return zd.def(Wd(this,"Map"),0===t?0:t,e)}},av=zd,pv=sp.Map,vv=(dv=pv)&&dv.prototype,gv={},"function"==typeof dv&&vv.forEach&&!ep(function(){(new dv).entries().next()})?(uv=(cv=new dv).set(-0,1)!=cv,fv=ep(function(){cv.has(1)}),lv=Zd(function(t){new dv(t)}),hv=ep(function(){for(var t=new dv,e=5;e--;)t.set(e,e);return!t.has(-0)}),lv||(((dv=iv(function(t,e){Ud(t,dv,ov);var n=ev(new pv,t,dv);return null!=e&&Hd(e,!0,n.set,n),n})).prototype=vv).constructor=dv),(fv||hv)&&(Dv("delete"),Dv("has"),Dv("get")),(hv||uv)&&Dv("set")):(dv=av.getConstructor(iv,ov,!0,"set"),Md(dv.prototype,sv),Gd.NEED=!0),$p(dv,ov),gv.Map=dv,Hp(Hp.G+Hp.W+Hp.F*(dv!=pv),gv),av.setStrong(dv,ov,!0),Xp.concat("length","prototype")),wv={f:Object.getOwnPropertyNames||function(t){return Fp(t,Iv)}},_v="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff",Tv="["+_v+"]",Pv=RegExp("^"+Tv+Tv+"*"),Av=RegExp(Tv+Tv+"*$"),bv=nv.trim=function(t,e){return t=String(_p(t)),1&e&&(t=t.replace(Pv,"")),2&e&&(t=t.replace(Av,"")),t},Rv=wv.f,Ov=Sv.f,Cv=gp.f,kv=nv.trim,Nv=sp.Number,xv=Nv,Mv=Nv.prototype,Uv="Number"==wp(od(Mv)),Lv="trim"in String.prototype;function Dv(t){var n=vv[t];xp(vv,t,"delete"==t||"has"==t?function(t){return n.call(this,0===t?0:t)}:"get"==t?function(t){return n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})}if(!Nv(" 0o1")||!Nv("0b1")||Nv("+0x1")){Nv=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof Nv&&(Uv?ep(function(){Mv.valueOf.call(n)}):"Number"!=wp(n))?ev(new xv(rv(e)),n,Nv):rv(e)};for(var jv,Fv=lp?Rv(xv):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),Vv=0;Fv.length>Vv;Vv++)Pp(xv,jv=Fv[Vv])&&!Pp(Nv,jv)&&Cv(Nv,jv,Ov(xv,jv));(Nv.prototype=Mv).constructor=Nv,xp(sp,"Number",Nv)}var $v=Math.floor;Hp(Hp.S,"Number",{isInteger:function(t){return!Zh(t)&&isFinite(t)&&$v(t)===t}});function Hv(t,e){var n,r=tp(t).constructor;return void 0===r||null==(n=tp(r)[zv])?e:Ap(n)}function Bv(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}function Gv(){var t,e=+this;ng.hasOwnProperty(e)&&(t=ng[e],delete ng[e],t())}function Wv(t){Gv.call(t.data)}var Kv,qv,Yv,zv=fp("species"),Jv=sp.process,Xv=sp.setImmediate,Qv=sp.clearImmediate,Zv=sp.MessageChannel,tg=sp.Dispatch,eg=0,ng={};Xv&&Qv||(Xv=function(t){for(var e=[],n=1;n<arguments.length;)e.push(arguments[n++]);return ng[++eg]=function(){Bv("function"==typeof t?t:Function(t),e)},Kv(eg),eg},Qv=function(t){delete ng[t]},"process"==wp(Jv)?Kv=function(t){Jv.nextTick(bp(Gv,t,1))}:tg&&tg.now?Kv=function(t){tg.now(bp(Gv,t,1))}:Zv?(Yv=(qv=new Zv).port2,qv.port1.onmessage=Wv,Kv=bp(Yv.postMessage,Yv,1)):sp.addEventListener&&"function"==typeof postMessage&&!sp.importScripts?(Kv=function(t){sp.postMessage(t+"","*")},sp.addEventListener("message",Wv,!1)):Kv="onreadystatechange"in np("script")?function(t){ed.appendChild(np("script")).onreadystatechange=function(){ed.removeChild(this),Gv.call(t)}}:function(t){setTimeout(bp(Gv,t,1),0)});var rg={set:Xv,clear:Qv},og=rg.set,ig=sp.MutationObserver||sp.WebKitMutationObserver,sg=sp.process,ag=sp.Promise,cg="process"==wp(sg);function ug(t){var n,r;this.promise=new t(function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e}),this.resolve=Ap(n),this.reject=Ap(r)}function fg(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}function lg(){}function hg(t){var e;return!(!Zh(t)||"function"!=typeof(e=t.then))&&e}function pg(f,e){var n;f._n||(f._n=!0,n=f._c,Og(function(){for(var c=f._v,u=1==f._s,t=0;n.length>t;)!function(t){var e,n,r,o=u?t.ok:t.fail,i=t.resolve,s=t.reject,a=t.domain;try{o?(u||(2==f._h&&Vg(f),f._h=1),!0===o?e=c:(a&&a.enter(),e=o(c),a&&(a.exit(),r=!0)),e===t.promise?s(Cg("Promise-chain cycle")):(n=hg(e))?n.call(e,i,s):i(e)):s(c)}catch(t){a&&!r&&a.exit(),s(t)}}(n[t++]);f._c=[],f._n=!1,e&&!f._h&&jg(f)}))}function dg(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),pg(e,!0))}var vg,gg,yg,mg,Sg,Eg,Ig,wg,_g,Tg,Pg={f:function(t){return new ug(t)}},Ag=sp.navigator,bg=Ag&&Ag.userAgent||"",Rg=rg.set,Og=(wg=cg?function(){sg.nextTick(Hg)}:!ig||sp.navigator&&sp.navigator.standalone?ag&&ag.resolve?(Ig=ag.resolve(void 0),function(){Ig.then(Hg)}):function(){og.call(sp,Hg)}:(_g=!0,Tg=document.createTextNode(""),new ig(Hg).observe(Tg,{characterData:!0}),function(){Tg.data=_g=!_g}),function(t){var e={fn:t,next:void 0};Eg&&(Eg.next=e),Sg||(Sg=e,wg()),Eg=e}),Cg=sp.TypeError,kg=sp.process,Ng=kg&&kg.versions,xg=Ng&&Ng.v8||"",Mg=sp.Promise,Ug="process"==Rd(kg),Lg=gg=Pg.f,Dg=!!function(){try{var t=Mg.resolve(1),e=(t.constructor={})[fp("species")]=function(t){t(lg,lg)};return(Ug||"function"==typeof PromiseRejectionEvent)&&t.then(lg)instanceof e&&0!==xg.indexOf("6.6")&&-1===bg.indexOf("Chrome/66")}catch(t){}}(),jg=function(i){Rg.call(sp,function(){var t,e,n,r=i._v,o=Fg(i);if(o&&(t=fg(function(){Ug?kg.emit("unhandledRejection",r,i):(e=sp.onunhandledrejection)?e({promise:i,reason:r}):(n=sp.console)&&n.error&&n.error("Unhandled promise rejection",r)}),i._h=Ug||Fg(i)?2:1),i._a=void 0,o&&t.e)throw t.v})},Fg=function(t){return 1!==t._h&&0===(t._a||t._c).length},Vg=function(e){Rg.call(sp,function(){var t;Ug?kg.emit("rejectionHandled",e):(t=sp.onrejectionhandled)&&t({promise:e,reason:e._v})})},$g=function(t){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw Cg("Promise can't be resolved itself");(n=hg(t))?Og(function(){var e={_w:r,_d:!1};try{n.call(t,bp($g,e,1),bp(dg,e,1))}catch(t){dg.call(e,t)}}):(r._v=t,r._s=1,pg(r,!1))}catch(t){dg.call({_w:r,_d:!1},t)}}};function Hg(){var t,e;for(cg&&(t=sg.domain)&&t.exit();Sg;){e=Sg.fn,Sg=Sg.next;try{e()}catch(t){throw Sg?wg():Eg=void 0,t}}Eg=void 0,t&&t.enter()}Dg||(Mg=function(t){Ud(this,Mg,"Promise","_h"),Ap(t),vg.call(this);try{t(bp($g,this,1),bp(dg,this,1))}catch(t){dg.call(this,t)}},(vg=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=Md(Mg.prototype,{then:function(t,e){var n=Lg(Hv(this,Mg));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Ug?kg.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&pg(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),yg=function(){var t=new vg;this.promise=t,this.resolve=bp($g,t,1),this.reject=bp(dg,t,1)},Pg.f=Lg=function(t){return t===Mg||t===mg?new yg:gg(t)}),Hp(Hp.G+Hp.W+Hp.F*!Dg,{Promise:Mg}),$p(Mg,"Promise"),Ld("Promise"),mg=ip.Promise,Hp(Hp.S+Hp.F*!Dg,"Promise",{reject:function(t){var e=Lg(this);return(0,e.reject)(t),e.promise}}),Hp(Hp.S+Hp.F*!Dg,"Promise",{resolve:function(t){return function(t,e){if(tp(t),Zh(e)&&e.constructor===t)return e;var n=Pg.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),Hp(Hp.S+Hp.F*!(Dg&&Zd(function(t){Mg.all(t).catch(lg)})),"Promise",{all:function(t){var s=this,e=Lg(s),a=e.resolve,c=e.reject,n=fg(function(){var r=[],o=0,i=1;Hd(t,!1,function(t){var e=o++,n=!1;r.push(void 0),i++,s.resolve(t).then(function(t){n||(n=!0,r[e]=t,--i||a(r))},c)}),--i||a(r)});return n.e&&c(n.v),e.promise},race:function(t){var e=this,n=Lg(e),r=n.reject,o=fg(function(){Hd(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}});function Bg(t,e){return Kg(n=t)&&("function"!=typeof(r=n.constructor)||r!==Array&&!Kg(r.prototype)||(r=void 0),Zh(r)&&null===(r=r[qg])&&(r=void 0)),new(void 0===r?Array:r)(e);var n,r}function Gg(l,t){var h=1==l,p=2==l,d=3==l,v=4==l,g=6==l,y=5==l||g,m=t||Bg;return function(t,e,n){for(var r,o,i=cd(t),s=Cp(i),a=bp(e,n,3),c=Lp(s.length),u=0,f=h?m(t,c):p?m(t,0):void 0;u<c;u++)if((y||u in s)&&(o=a(r=s[u],u,i),l))if(h)f[u]=o;else if(o)switch(l){case 3:return!0;case 5:return r;case 6:return u;case 2:f.push(r)}else if(v)return!1;return g?-1:d||v?v:f}}function Wg(t,e){return!!t&&ep(function(){e?t.call(null,function(){},1):t.call(null)})}var Kg=Array.isArray||function(t){return"Array"==wp(t)},qg=fp("species"),Yg=Gg(3);Hp(Hp.P+Hp.F*!Wg([].some,!0),"Array",{some:function(t){return Yg(this,t,arguments[1])}});var zg={f:Object.getOwnPropertySymbols},Jg=Object.assign,Xg=!Jg||ep(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=Jg({},t)[n]||Object.keys(Jg({},e)).join("")!=r})?function(t,e){for(var n=cd(t),r=arguments.length,o=1,i=zg.f,s=yv.f;o<r;)for(var a,c=Cp(arguments[o++]),u=i?Qp(c).concat(i(c)):Qp(c),f=u.length,l=0;l<f;)a=u[l++],lp&&!s.call(c,a)||(n[a]=c[a]);return n}:Jg;Hp(Hp.S+Hp.F,"Object",{assign:Xg});var Qg=Gg(0),Zg=Wg([].forEach,!0);Hp(Hp.P+Hp.F*!Zg,"Array",{forEach:function(t){return Qg(this,t,arguments[1])}});var ty=function(t,e){return(ty=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function ey(t,e){function n(){this.constructor=t}ty(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function ny(i,s,a,c){return new(a=a||Promise)(function(t,e){function n(t){try{o(c.next(t))}catch(t){e(t)}}function r(t){try{o(c.throw(t))}catch(t){e(t)}}function o(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(n,r)}o((c=c.apply(i,s||[])).next())})}function ry(n,r){var o,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!((s=0<(s=a.trys).length&&s[s.length-1])||6!==e[0]&&2!==e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=r.call(n,a)}catch(t){e=[6,t],i=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function oy(t,e,n){return e+(n?ly(t,e).length:1)}function iy(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Rd(t))throw new TypeError("RegExp#exec called on incompatible receiver");return hy.call(t,e)}function sy(){var t=tp(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}var ay,cy,uy=(Sy.prototype.register=function(t){this.attributesCollectors.push(t)},Sy.prototype.collectAll=function(){return ny(this,void 0,void 0,function(){var r,e=this;return ry(this,function(t){return r={},this.attributesCollectors.forEach(function(n){return ny(e,void 0,void 0,function(){var e;return ry(this,function(t){switch(t.label){case 0:return[4,n.doCollect()];case 1:return e=t.sent(),Object.assign(r,e),[2]}})})}),[2,r]})})},Sy.prototype.collect=function(r){return ny(this,void 0,void 0,function(){var e,n;return ry(this,function(t){switch(t.label){case 0:return e={},n={},this.attributesCollectors.some(function(t,e){return t.key===r&&(n=t,!0)}),n.doCollect?[4,n.doCollect()]:[3,2];case 1:e=t.sent(),t.label=2;case 2:return[2,e]}})})},Sy.prototype.syncCollect=function(n){var t={},r={};return this.attributesCollectors.some(function(t,e){return t.key===n&&(r=t,!0)}),r.doCollect&&(t=r.doCollect()),t},new Sy),fy=(my.prototype.setHiLog=function(t){this.hiLog=t},my.prototype.setHiAutoReport=function(t){this.hiAutoReport=t},my.prototype.setHiSendData=function(t){this.hiSendData=t},my.prototype.setHiClientProperty=function(t){this.hiClientProperty=t},my.prototype.setHiStorage=function(t){this.hiStorage=t},new my),ly=Nd(!0),hy=RegExp.prototype.exec,py=RegExp.prototype.exec,dy=String.prototype.replace,vy=py,gy=(ay=/a/,cy=/b*/g,py.call(ay,"a"),py.call(cy,"a"),0!==ay.lastIndex||0!==cy.lastIndex),yy=void 0!==/()??/.exec("")[1];function my(){this.hiLog={},this.hiAutoReport={},this.hiSendData={},this.hiClientProperty={},this.hiStorage={}}function Sy(){this.attributesCollectors=[]}(gy||yy)&&(vy=function(t){var e,n,r,o;return yy&&(n=new RegExp("^"+this.source+"$(?!\\s)",sy.call(this))),gy&&(e=this.lastIndex),r=py.call(this,t),gy&&r&&(this.lastIndex=this.global?r.index+r[0].length:e),yy&&r&&1<r.length&&dy.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r});var Ey=vy;Hp({target:"RegExp",proto:!0,forced:Ey!==/./.exec},{exec:Ey});function Iy(n,t,e){var i,r,o,s,a=fp(n),c=!ep(function(){var t={};return t[a]=function(){return 7},7!=""[n](t)}),u=c?!ep(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===n&&(e.constructor={},e.constructor[Ay]=function(){return e}),e[a](""),!t}):void 0;c&&u&&("replace"!==n||by)&&("split"!==n||Ry)||(i=/./[a],o=(r=e(_p,a,""[n],function(t,e,n,r,o){return e.exec===Ey?c&&!o?{done:!0,value:i.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}))[0],s=r[1],xp(String.prototype,n,o),yp(RegExp.prototype,a,2==t?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)}))}var wy,_y,Ty,Py,Ay=fp("species"),by=!ep(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),Ry=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}(),Oy=Math.max,Cy=Math.min,ky=Math.floor,Ny=/\$([$&`']|\d\d?|<[^>]*>)/g,xy=/\$([$&`']|\d\d?)/g;Iy("replace",2,function(o,i,I,w){return[function(t,e){var n=o(this),r=null==t?void 0:t[i];return void 0!==r?r.call(t,n,e):I.call(String(n),t,e)},function(t,e){var n=w(I,t,this,e);if(n.done)return n.value;var r=tp(t),o=String(this),i="function"==typeof e;i||(e=String(e));var s,a=r.global;a&&(s=r.unicode,r.lastIndex=0);for(var c=[];;){var u=iy(r,o);if(null===u)break;if(c.push(u),!a)break;""===String(u[0])&&(r.lastIndex=oy(o,Lp(r.lastIndex),s))}for(var f,l="",h=0,p=0;p<c.length;p++){u=c[p];for(var d=String(u[0]),v=Oy(Cy(Up(u.index),o.length),0),g=[],y=1;y<u.length;y++)g.push(void 0===(f=u[y])?f:String(f));var m,S=u.groups,E=i?(m=[d].concat(g,v,o),void 0!==S&&m.push(S),String(e.apply(void 0,m))):function(i,s,a,c,u,t){var f=a+i.length,l=c.length,e=xy;return void 0!==u&&(u=cd(u),e=Ny),I.call(t,e,function(t,e){var n;switch(e.charAt(0)){case"$":return"$";case"&":return i;case"`":return s.slice(0,a);case"'":return s.slice(f);case"<":n=u[e.slice(1,-1)];break;default:var r=+e;if(0==r)return t;if(l<r){var o=ky(r/10);return 0!==o&&o<=l?void 0===c[o-1]?e.charAt(1):c[o-1]+e.charAt(1):t}n=c[r-1]}return void 0===n?"":n})}(d,o,v,g,S,e);h<=v&&(l+=o.slice(h,v)+E,h=v+d.length)}return l+o.slice(h)}]}),wy="keys",_y=function(){return function(t){return Qp(cd(t))}},Ty=(ip.Object||{})[wy]||Object[wy],(Py={})[wy]=_y(),Hp(Hp.S+Hp.F*ep(function(){Ty(1)}),"Object",Py);function My(t){var e;return Zh(t)&&(void 0!==(e=t[em])?!!e:"RegExp"==wp(t))}var Uy="CE-001",Ly="Cannot find agcgw/url from agconnect-service.json.",Dy="PE-002",jy="Length of $1 exceeds the limit. Max Length is $2.",Fy="PE-003",Vy="$1 missed.",$y="PE-004",Hy="$1 is reserved.",By="PE-005",Gy="Too many $1 parameters. Max number of parameters is $2.",Wy="PE-006",Ky="$1 is invalid.",qy="PE-007",Yy="The size exceeds the limit, the maximum size is $1.",zy="IE-006",Jy="The Analytics Kit is disabled.",Xy="SE-002",Qy="Failed to obtain AAID from hms core sdk.",Zy="OpennessSDK",tm=(fm.prototype.info=function(t,e,n,r){var o=Zy+" => "+t+"|"+e+"|"+n;console.info(o)},fm.prototype.warn=function(t,e,n,r){r&&(r.$1&&(n=n.replace("$1",r.$1)),r.$2&&(n=n.replace("$2",r.$2)));var o=Zy+" => "+t+"|"+e+"|"+n;console.warn(o)},fm.prototype.error=function(t,e,n,r){var o=Zy+" => "+t+"|"+e+"|"+n;console.error(o)},new fm),em=fp("match"),nm=gp.f,rm=wv.f,om=sp.RegExp,im=om,sm=om.prototype,am=/a/g,cm=/a/g,um=new om(am)!==am;function fm(){}if(lp&&(!um||ep(function(){return cm[fp("match")]=!1,om(am)!=am||om(cm)==cm||"/a/i"!=om(am,"i")}))){om=function(t,e){var n=this instanceof om,r=My(t),o=void 0===e;return!n&&r&&t.constructor===om&&o?t:ev(um?new im(r&&!o?t.source:t,e):im((r=t instanceof om)?t.source:t,r&&o?sy.call(t):e),n?this:sm,om)};for(var lm=rm(im),hm=0;lm.length>hm;)!function(e){e in om||nm(om,e,{configurable:!0,get:function(){return im[e]},set:function(t){im[e]=t}})}(lm[hm++]);(sm.constructor=om).prototype=sm,xp(sp,"RegExp",om)}Ld("RegExp");var pm,dm,vm=(mm.prototype.checkString=function(t,e,n,r){return n?!(n.length>r&&(tm.warn(t,Dy,jy,{$1:e,$2:r}),1)):(tm.warn(t,Fy,Vy,{$1:e}),!1)},mm.prototype.checkPattern=function(t,e,n,r){return!!new RegExp(r).test(n)||(tm.warn(t,Wy,Ky,{$1:e}),!1)},mm.prototype.checkReserve=function(t,e,n,r){for(var o in r)if(n===r[o])return tm.warn(t,$y,Hy,{$1:e}),!1;return!0},mm.prototype.checkLength=function(t,e,n,r){return!(r<n&&(tm.warn(t,By,Gy,{$1:e,$2:r}),1))},mm.prototype.checkSwitchIsOpen=function(t,e){return!!e||(tm.warn(t,zy,Jy),!1)},mm.prototype.checkExceedMaxSize=function(t,e,n,r){return!(r<n&&(tm.warn(t,qy,Yy,{$1:e}),1))},new mm),gm="events_common",ym="_openness_config_tag";function mm(){}(dm=pm=pm||{})[dm.BEACON=1]="BEACON",dm[dm.AJAX=2]="AJAX",dm[dm.IMG=3]="IMG";var Sm="Analytics",Em="aaid",Im="token",wm={_emui_ver:"_emui_ver",_model:"_model",_package_name:"_package_name",_app_ver:"_app_ver",_lib_ver:"_lib_ver",_channel:"_channel",_lib_name:"_lib_name",_sys_language:"_sys_language",_manufacturer:"_manufacturer",_os:"_os",_os_ver:"_os_ver",_screen_height:"_screen_height",_screen_width:"_screen_width"},_m=(Cm.prototype.init=function(){this.exteralConfig={};var t=uy.syncCollect("serverConfig");this.serveConfig=t;var e=this.serveConfig.analyticsUrl;e?fy.hiSendData.setUrl(e):tm.error(this.tag,Uy,Ly);var n=uy.syncCollect("deviceConfig");this.clientConfig=n},Cm.prototype.getConfigs=function(){return Object.assign({},this.serveConfig,this.clientConfig,this.exteralConfig)},Cm.prototype.setReportType=function(t){this.reportType=t},Cm.prototype.getConfig=function(t){var e=this.getConfigs()[t];return"clientId"!==t||e?e:(fy.hiLog.error(Sm,Xy,Qy),"")},Cm.prototype.addConfig=function(t,e){this.exteralConfig[t]=e},Cm.prototype.setUserProfile=function(t,e){vm.checkString(Sm,"user name",t,256)&&vm.checkReserve(Sm,"User Profile",t,wm)&&vm.checkPattern(Sm,"user name",t,"^[a-zA-Z][A-Za-z0-9_]*$")&&vm.checkString(Sm,"user value",e,256)&&vm.checkLength(Sm,"User Profile",Object.keys(this.userProfiles).length+1,25)&&(this.userProfiles[t]=e)},Cm.prototype.setCurrentScreen=function(t){this.currentScreenName=t},Cm.prototype.setPageEntryTime=function(t){this.pageEntryTime=t},Cm.prototype.getPageEntryTime=function(){return this.pageEntryTime},Cm.prototype.getReportType=function(){return this.reportType},Cm.prototype.generateClientKey=function(t){return("HW_"+t+"_"+this.getConfig("appId")).replace(/\./g,"_")},new Cm),Tm=(Om.prototype.init=function(){this.autoReportService=fy.hiAutoReport,this.hiStorage=fy.hiStorage},Om.prototype.dealFirstOpenEvent=function(t,e,n){var r;this.autoReportService=fy.hiAutoReport,this.hiStorage=fy.hiStorage,this.autoReportService.isKeyExist(t)?(r=this.autoReportService.getClientValue(t),_m.addConfig("clientId",r)):this.autoReportService.dealFirstOpenEvent(t,e,n)},Om.prototype.computeLoadTime=function(){},Om.prototype.stateChanged=function(){},new Om),Pm=(Rm.prototype.setEventType=function(t){this.eventType=t},Rm.prototype.getEventType=function(){return this.eventType},Rm.prototype.setEventID=function(t){this.eventID=t},Rm.prototype.setEventContent=function(t){this.eventContent=t},Rm.prototype.setEventRecordTime=function(t){this.eventRecordTime=t},Rm.prototype.setSessionValue=function(t){this.sessionValue=t},Rm.prototype.setSessionFlag=function(t){this.sessionFlag=t},Rm.prototype.getOneEventRecord=function(){return{eventtime:this.eventRecordTime,event:this.eventID,type:this.eventType,event_session_name:this.sessionValue,first_session_event:this.sessionFlag,properties:this.eventContent}},new Rm),Am=(bm.prototype.setHeadAppId=function(t){this.headAppId=t},bm.prototype.setTimestamp=function(t){this.timestamp=t},bm.prototype.setServiceTag=function(t){this.serviceTag=t},bm.prototype.setServiceId=function(t){this.serviceId=t},bm.prototype.setReqID=function(t){this.reqID=t},bm.prototype.setProductId=function(t){this.productId=t},bm.prototype.getEventHead=function(){return{protocol_version:"1",serviceid:this.serviceId,appid:this.headAppId,timestamp:this.timestamp,servicetag:this.serviceTag,requestid:this.reqID,productid:this.productId}},new bm);function bm(){this.headAppId="",this.timestamp=0,this.serviceTag=ym,this.serviceId="hmshioperqrt",this.reqID="",this.productId=""}function Rm(){this.eventType="",this.eventID="",this.eventContent={},this.eventRecordTime=0,this.sessionValue="",this.sessionFlag=""}function Om(){this.autoReportService={},this.hiStorage={},this.pageEntryTime=0}function Cm(){this.tag="GlobalSetting",this.clientConfig={},this.serveConfig={},this.exteralConfig={},this.userProfiles={},this.currentScreenName="",this.reportType=-1,this.pageEntryTime=0}lp&&"g"!=/./g.flags&&gp.f(RegExp.prototype,"flags",{configurable:!0,get:sy});function km(t){xp(RegExp.prototype,"toString",t,!0)}var Nm=/./.toString;ep(function(){return"/a/b"!=Nm.call({source:"a",flags:"b"})})?km(function(){var t=tp(this);return"/".concat(t.source,"/","flags"in t?t.flags:!lp&&t instanceof RegExp?sy.call(t):void 0)}):"toString"!=Nm.name&&km(function(){return Nm.call(this)});var xm=Date.prototype,Mm=xm.toString,Um=xm.getTime;new Date(NaN)+""!="Invalid Date"&&xp(xm,"toString",function(){var t=Um.call(this);return t==t?Mm.call(this):"Invalid Date"});var Lm,Dm,jm=(Xm.prototype.create=function(){var t=Math.floor(Math.random()*(Math.pow(2,12)-1+1))+0,e=Math.floor(Math.random()*(Math.pow(2,32)-1+1))+0,n=Math.floor(Math.random()*(Math.pow(2,16)-1+1))+0,r=Math.floor(Math.random()*(Math.pow(2,6)-1+1))+0,o=Math.floor(Math.random()*(Math.pow(2,8)-1+1))+0,i=(0|Math.random()*(1<<30))+(0|Math.random()*(1<<18))*(1<<30);function s(t,e,n){n=n||"0";for(var r=e-(t=String(t)).length;0<r;r>>>=1,n+=n)1&r&&(t=n+t);return t}return""+s(e.toString(16),8)+s(n.toString(16),4)+s((16384|t).toString(16),4)+s((128|r).toString(16),2)+s(o.toString(16),2)+s(i.toString(16),12)},new Xm),Fm=(Jm.prototype.init=function(){this.sessionService=fy.hiStorage,this.commonUserService=fy.hiClientProperty,this.sessionService.setSessionDuration(this.sessionDuration)},Jm.prototype.generateSessionId=function(){this.sessionId=_m.generateClientKey("hid"),this.sessionService.setSessionId(this.sessionId)},Jm.prototype.getSessionId=function(){return this.sessionId},Jm.prototype.getUserId=function(){return this.userId},Jm.prototype.setUserId=function(t){vm.checkString(Sm,"userId",t,256)||(t=""),t&&this.userId&&t!==this.userId?_m.addConfig("isSessionRefresh",!0):_m.addConfig("isSessionRefresh",!1),this.userId=t||""},Jm.prototype.setSessionDuration=function(t){return this.sessionService.setSessionDuration(t)},Jm.prototype.getUserInfo=function(){return{aaid:_m.getConfig("clientId"),androidid:"",pushtoken:"",userid:this.userId,properties:this.commonUserService&&this.commonUserService.generateUserCommonProperty(),events_global_properties:_m.userProfiles}},new Jm),Vm=(zm.prototype.clearCacheData=function(){this.eventRecords=[]},zm.prototype.addEvent=function(t,e,n,r,o){Pm.setEventContent(e),Pm.setEventID(t),Pm.setEventRecordTime(r),Pm.setEventType(n),Pm.setSessionFlag(String(!this.isInit)),Pm.setSessionValue(fy.hiStorage.getSessionValue(o));var i=Pm.getOneEventRecord();this.eventRecords.push(i),this.isInit||(this.isInit=!0)},zm.prototype.generateHttpHead=function(t){void 0===t&&(t={});var e,n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e=t[r],n[r]=e);return n["App-Id"]=_m.getConfig("appId"),n["x-hasdk-productid"]=_m.getConfig("productId"),n["x-hasdk-resourceid"]=_m.getConfig("resourceId"),n["App-Ver"]="1.0",n["Device-Type"]="web",n.servicetag=ym,n["Package-Name"]=_m.getConfig("packageName"),n["Request-Id"]=this.reqId,n["Sdk-Name"]="hianalytics",n["x-hasdk-clientid"]=_m.getConfig("clientId"),n["x-hasdk-realtime"]="false",n["x-hasdk-token"]=_m.getConfig("sdkToken"),n},zm.prototype.generateEventUploadData=function(){Am.setHeadAppId(_m.getConfig("appId")),Am.setProductId(_m.getConfig("productId")),Am.setTimestamp((new Date).getTime()),Am.setReqID(this.reqId);var t=Am.getEventHead(),e={};e.events=this.eventRecords;var n=Fm.getUserInfo();return e[gm]=n,Object.assign(n.properties,{_package_name:_m.getConfig("packageName")}),e[gm]=n,this.eventUploadData.header=t,this.eventUploadData.event=e,this.eventUploadData},zm),$m=(Ym.prototype.onEvent=function(t,e,n,r,o,i){var s=this;if(void 0===o&&(o=!1),void 0===i&&(i={}),this.upLoadService.addEvent(t,e,n,r,!1),!this.timer||o)if(o){var a={mode:_m.getReportType(),url:_m.getConfig("analyticsUrl"),async:!o},c=this.upLoadService.generateEventUploadData(),u=this.upLoadService.generateHttpHead(i);if(!_m.getConfig("clientId")||!_m.getConfig("sdkToken"))return;fy.hiSendData.onEvent(c,u,a),fy.hiStorage.handleSessionId(),this.upLoadService.clearCacheData();for(var f=(new Date).getTime()+1e3;(new Date).getTime()<f;);}else this.timer=setTimeout(function(){var t={mode:_m.getReportType(),url:_m.getConfig("analyticsUrl"),async:!o},e=s.upLoadService.generateEventUploadData(),n=s.upLoadService.generateHttpHead(i);_m.getConfig("clientId")&&_m.getConfig("sdkToken")&&(fy.hiSendData.onEvent(e,n,t),s.upLoadService.clearCacheData(),s.timer=void 0,fy.hiStorage.handleSessionId())},5e3)},Ym.prototype.debounce=function(n,r){var o;return function(){var t=this,e=arguments;clearTimeout(o),o=setTimeout(function(){n.apply(t,e)},r)}},new Ym),Hm=(qm.prototype.init=function(t){},qm.prototype.setAnalyticsEnabled=function(t){this.reportFlag=t},qm.prototype.onEvent=function(t,e,n,r,o,i){void 0===e&&(e={}),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i={});var s={};if(vm.checkString(Sm,"eventId",t,256)&&(r||vm.checkReserve(Sm,"eventId",t,zh))){var a=!1,c=Yh;for(var u in c)if(t===c[u]){a=!0;break}if(a||r||vm.checkPattern(Sm,"eventId",t,"^[a-zA-Z_][A-Za-z0-9_]*$")){var f,l,h=Jh;for(var u in e){var p=!1;if(vm.checkString(Sm,"params key",u,256)){for(var d in h)if(u===h[d]){p=!0;break}if(p||r||vm.checkPattern(Sm,"params key",u,"^[a-zA-Z_][A-Za-z0-9_]*$")){if(!vm.checkLength(Sm,"Event",Object.keys(s).length+1,2048))break;s[u]=e[u]}}}vm.checkExceedMaxSize(Sm,"200KB",JSON.stringify(s).length,204800)&&vm.checkSwitchIsOpen(Sm,this.reportFlag)&&(f=(new Date).getTime(),fy.hiStorage.getSessionValue()||(l=jm.create()+"_"+(new Date).getTime(),fy.hiStorage.handleSessionId(void 0,l)),_m.getConfig("isSessionRefresh")&&(l=jm.create()+"_"+(new Date).getTime(),fy.hiStorage.handleSessionId(void 0,l)),$m.onEvent(t,s,"oper",f,n,i))}}},new qm),Bm=(Km.prototype.addListener=function(t){this.eventListeners.push(t)},Km.prototype.init=function(){this.eventListeners.forEach(function(t){t.init()})},new Km),Gm=(Wm.prototype.init=function(t,e){t&&t.forEach(function(t){uy.register(t)}),e&&e.forEach(function(t){Bm.addListener(t)}),Bm.init()},new Wm);function Wm(){}function Km(){this.eventListeners=[]}function qm(){this.reportFlag=!0,this.isReportPageEntry=!1}function Ym(){this.upLoadService=new Vm}function zm(){this.sessionFlag="",this.eventUploadData={},this.eventRecords=[],this.reqId="",this.isInit=!1,this.reqId=jm.create()}function Jm(){this.sessionService={},this.commonUserService={},this.sessionId="",this.userId="",this.clientId="",this.sessionDuration=18e5}function Xm(){}(Dm=Lm=Lm||{}).BROWSER="Browser",Dm.NODE_JS="Node",Dm.WX_MICROPROGRAM="Wx",Dm.REACT_NATIVE="ReactNative",Dm.QUICK_APP="QuickApp",Dm.UNKNOWN="Unknown";var Qm=(dS.setEncryptImp=function(t){this.encryptImpl=t},dS.decrypt=function(t){return null!=this.encryptImpl&&null!=this.encryptImpl&&null!=t&&null!=t?this.encryptImpl.decrypt(t):t},dS.encrypt=function(t){return null!=this.encryptImpl&&null!=this.encryptImpl&&null!=t&&null!=t?this.encryptImpl.encrypt(t):t},dS),Zm=(pS.getInstance=function(){return null==this.instance&&(this.instance=new pS),this.instance},pS.prototype.get=function(t){return Promise.resolve(this.storage[t])},pS.prototype.remove=function(t){return delete this.storage[t],Promise.resolve()},pS.prototype.set=function(t,e){return this.storage[t]=e,Promise.resolve()},pS.prototype.setCryptImp=function(t){Qm.setEncryptImp(t)},pS.instance=new pS,pS),tS=(hS.getInstance=function(){return null==this.instance&&(this.instance=new hS),this.instance},hS.prototype.initIndexedDb=function(o){var i=this;return window.indexedDB?new Promise(function(e,n){var t=window.indexedDB.open(i.DB_NAME,i.VERSION),r=i;t.onupgradeneeded=function(t){var e=t.target.result;try{e.objectStoreNames.contains(r.OBJECT_STORE_NAME)||e.createObjectStore(r.OBJECT_STORE_NAME,{keyPath:r.KEY_PATH})}catch(t){n(t)}},t.onsuccess=function(t){try{e(t.target.result.transaction([r.OBJECT_STORE_NAME],o).objectStore(r.OBJECT_STORE_NAME))}catch(t){n(t)}},t.onerror=function(t){n(new Error(t.target.error))}}):Promise.reject("Your browser doesn't support a stable version of IndexedDB.")},hS.prototype.get=function(o){return o?this.initIndexedDb("readonly").then(function(t){return new Promise(function(e,n){try{var r=t.get(o);r.onsuccess=function(){var t=r.result;e(null!=t&&"value"in t?Qm.decrypt(t.value):t)},r.onerror=function(t){n(t.target.error)}}catch(t){n(t)}})}).catch(function(t){return Promise.reject(t)}):Promise.reject(new Error("key is null"))},hS.prototype.set=function(t,e){if(!t||!e)return Promise.reject(new Error("key or value is null"));var n={},r={};n[this.KEY_PATH]=t,r.value=Qm.encrypt(e);var o=Object.assign(r,n);return this.initIndexedDb("readwrite").then(function(n){try{var r=n.get(t);return r.onsuccess=function(){var t=r.result,e=null!=t&&"value"in t?n.put(o):n.add(o);e.onsuccess=function(){return Promise.resolve()},e.onerror=function(t){return Promise.reject(t.target.error)}},r.onerror=function(t){return console.log("---get value from db error."),Promise.reject("get value from db error.")},Promise.resolve()}catch(t){return console.log("---set value to db error."+t),Promise.reject("set value to db error."+t)}}).catch(function(t){return Promise.reject("init db error."+t)})},hS.prototype.remove=function(n){return n?this.initIndexedDb("readwrite").then(function(t){try{var e=t.delete(n);return e.onsuccess=function(){return Promise.resolve()},e.onerror=function(t){return Promise.reject(t.target.error)},Promise.resolve()}catch(t){return Promise.reject(t)}}).catch(function(t){return Promise.reject(t)}):Promise.reject(new Error("key is null"))},hS.prototype.setCryptImp=function(t){Qm.setEncryptImp(t)},hS.instance=new hS,hS),eS=(lS.getInstance=function(){return null==this.instance&&(this.instance=new lS),this.instance},lS.prototype.get=function(t){if(!t)return Promise.reject(new Error("key is null"));try{var e=sessionStorage.getItem(t);return Promise.resolve(""===e?null:Qm.decrypt(e))}catch(t){return Promise.reject(t)}},lS.prototype.set=function(t,e){if(!t||!e)return Promise.reject(new Error("key or value is null"));try{return sessionStorage.setItem(t,Qm.encrypt(e)),Promise.resolve()}catch(t){return Promise.reject(t)}},lS.prototype.remove=function(t){if(!t)return Promise.reject(new Error("key is null"));try{return sessionStorage.removeItem(t),Promise.resolve()}catch(t){return Promise.reject(t)}},lS.prototype.setCryptImp=function(t){Qm.setEncryptImp(t)},lS.instance=new lS,lS),nS=(fS.getInstance=function(){return null==this.instance&&(this.instance=new fS),this.instance},fS.prototype.get=function(t){if(!t)return Promise.reject(new Error("key is null"));try{var e=n.readFileSync(t,"utf-8");return Promise.resolve(""===e?null:Qm.decrypt(e))}catch(t){return Promise.reject(t)}},fS.prototype.set=function(t,e){if(!t||!e)return Promise.reject(new Error("key or value is null"));try{return n.writeFileSync(t,Qm.encrypt(e),"utf-8"),Promise.resolve()}catch(t){return Promise.reject(t)}},fS.prototype.remove=function(t){if(!t)return Promise.reject(new Error("key is null"));try{return n.unlinkSync(t),Promise.resolve()}catch(t){return Promise.reject(t)}},fS.prototype.setCryptImp=function(t){Qm.setEncryptImp(t)},fS.instance=new fS,fS),rS=(uS.prototype.getStorage=function(t){if(null==t||null==t)return this.createMemoryStorage();switch(t){case 0:return this.createPersistentStorage();case 1:return this.createTemporaryStorage();case 2:default:return this.createMemoryStorage()}},uS.prototype.createPersistentStorage=function(){return this.env.persist()},uS.prototype.createTemporaryStorage=function(){return this.env.temp()},uS.prototype.createMemoryStorage=function(){return this.env.memory()},uS.getEnvConfig=function(){var t={};return t[Lm.BROWSER]=oS,t[Lm.NODE_JS]=iS,t[Lm.WX_MICROPROGRAM]=sS,t[Lm.REACT_NATIVE]=aS,t[Lm.QUICK_APP]=cS,t[Lm.UNKNOWN]=oS,t["object"==typeof self&&self.self===self?Lm.BROWSER:"object"==typeof navigator&&"ReactNative"===navigator.product?Lm.REACT_NATIVE:"[object process]"===Object.prototype.toString.call(global.process)?Lm.NODE_JS:global&&"fastapp"in global?Lm.QUICK_APP:self.navigator.userAgent.toLowerCase().match(/MicroMessenger/i)?Lm.WX_MICROPROGRAM:Lm.UNKNOWN]},uS),oS={persist:function(){return tS.getInstance()},temp:function(){return eS.getInstance()},memory:function(){return Zm.getInstance()}},iS={persist:function(){return nS.getInstance()},temp:function(){return eS.getInstance()},memory:function(){return Zm.getInstance()}},sS={persist:function(){return eS.getInstance()},temp:function(){return eS.getInstance()},memory:function(){return Zm.getInstance()}},aS={persist:function(){return eS.getInstance()},temp:function(){return eS.getInstance()},memory:function(){return Zm.getInstance()}},cS={persist:function(){return eS.getInstance()},temp:function(){return eS.getInstance()},memory:function(){return Zm.getInstance()}};function uS(t){this.env=t}function fS(){}function lS(){}function hS(){this.DB_NAME="agcLocalStorageDb",this.OBJECT_STORE_NAME="agc",this.KEY_PATH="agcStorage",this.VERSION=1}function pS(){this.storage={}}function dS(){}l.registerInternalService({name:"AGCStorageService",serviceFactory:function(t){return new rS(rS.getEnvConfig())}});var vS=(mS.prototype.getAaid=function(){var e=this;try{var n="agcAaid:"+l.instance().config().client.client_id,t=l.instance().getService("AGCStorageService");if(null==t)return console.log("Get AGC stroage Service failed."),Promise.reject("Get AGC stroage Service failed.");var r=t.getStorage(mS.persistence);return r.get(n).then(function(t){return null!=t&&null!=t||(t=e.getRandomString(),r.set(n,t)),t})}catch(t){return Promise.reject(t)}},mS.prototype.getRandomString=function(){var t="0123456789abcdef",e=t.length;return"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/x/g,function(){return t.charAt(Math.floor(Math.random()*e))})},mS.persistence=0,mS.INSTANCE=new mS,mS),gS=(yS.prototype.getAaid=function(){return vS.INSTANCE.getAaid()},yS.prototype.setPersistence=function(t){vS.persistence=t},yS);function yS(){}function mS(){}l.registerInternalService({name:"ClientInfoService",serviceFactory:function(t){return new gS}});var SS=(PS.prototype.doCollect=function(){return ny(this,void 0,void 0,function(){var e,n,r,o;return ry(this,function(t){switch(t.label){case 0:if(this.cache)return[3,6];this.cache={},t.label=1;case 1:return t.trys.push([1,5,,6]),null==(e=l.instance().getService("ClientInfoService"))?[3,3]:(n=this.cache,r=this.key,[4,e.getAaid()]);case 2:return n[r]=t.sent(),[3,4];case 3:console.log("clientInfoUtil is null"),t.label=4;case 4:return[3,6];case 5:return o=t.sent(),console.log(o),[3,6];case 6:return[2,this.cache]}})})},new PS),ES=(TS.prototype.doCollect=function(){return this.cache||(this.cache=fy.hiClientProperty.generateUserCommonProperty()),this.cache},new TS),IS=Math.min,wS=[].push,_S=!ep(function(){RegExp(4294967295,"y")});function TS(){this.key="deviceConfig",this.cache=null}function PS(){this.key=Em,this.cache=null}Iy("split",2,function(o,i,g,y){var m="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!My(t))return g.call(n,t,e);for(var r,o,i,s=[],a=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),c=0,u=void 0===e?4294967295:e>>>0,f=new RegExp(t.source,a+"g");(r=Ey.call(f,n))&&!((o=f.lastIndex)>c&&(s.push(n.slice(c,r.index)),1<r.length&&r.index<n.length&&wS.apply(s,r.slice(1)),i=r[0].length,c=o,s.length>=u));)f.lastIndex===r.index&&f.lastIndex++;return c===n.length?!i&&f.test("")||s.push(""):s.push(n.slice(c)),s.length>u?s.slice(0,u):s}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:g.call(this,t,e)}:g;return[function(t,e){var n=o(this),r=null==t?void 0:t[i];return void 0!==r?r.call(t,n,e):m.call(String(n),t,e)},function(t,e){var n=y(m,t,this,e,m!==g);if(n.done)return n.value;var r=tp(t),o=String(this),i=Hv(r,RegExp),s=r.unicode,a=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(_S?"y":"g"),c=new i(_S?r:"^(?:"+r.source+")",a),u=void 0===e?4294967295:e>>>0;if(0==u)return[];if(0===o.length)return null===iy(c,o)?[o]:[];for(var f=0,l=0,h=[];l<o.length;){c.lastIndex=_S?l:0;var p,d=iy(c,_S?o:o.slice(l));if(null===d||(p=IS(Lp(c.lastIndex+(_S?0:l)),o.length))===f)l=oy(o,l,s);else{if(h.push(o.slice(f,l)),h.length===u)return h;for(var v=1;v<=d.length-1;v++)if(h.push(d[v]),h.length===u)return h;l=f=p}}return h.push(o.slice(f)),h}]});var AS=(LS.prototype.doCollect=function(){var t,e;return this.cache||(e=(t=l.instance().config()).service.analytics.collector_url,this.cache={productId:t.client.product_id,appId:t.client.app_id,packageName:t.client.app_id,resourceId:t.service.analytics.resource_id,analyticsUrl:"https://"+e.split(",")[0]+"/webv3"}),this.cache},new LS),bS=(US.prototype.doCollect=function(){return ny(this,void 0,void 0,function(){var e,n;return ry(this,function(t){switch(t.label){case 0:return this.cache?[3,2]:(this.cache={},null===(e=l.instance().getService("CredentialsService"))?[3,2]:[4,e.getToken()]);case 1:n=t.sent(),this.cache[this.key]=n.tokenString,t.label=2;case 2:return[2,this.cache]}})})},new US),RS=(MS.prototype.init=function(){Tm.init(),Hm.init(Tm)},MS.prototype.onEvent=function(){},new MS),OS=(xS.prototype.setAnalyticsEnabled=function(t){Hm.setAnalyticsEnabled(t)},xS.prototype.setUserId=function(t){Fm.setUserId(t)},xS.prototype.setUserProfile=function(t,e){_m.setUserProfile(t,e)},xS.prototype.setSessionDuration=function(t){Number.isInteger(t)&&Fm.setSessionDuration(t)},xS.prototype.onEvent=function(t,e){Hm.onEvent(t,e,!1,!1,!1,{"ha-sdk-service":this.serviceTag})},xS),CS=[].slice,kS={},NS=Function.bind||function(e){var n=Ap(this),r=CS.call(arguments,1),o=function(){var t=r.concat(CS.call(arguments));return this instanceof o?function(t,e,n){if(!(e in kS)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";kS[e]=Function("F,a","return new F("+r.join(",")+")")}return kS[e](t,n)}(n,t.length,t):Bv(n,t,e)};return Zh(n.prototype)&&(o.prototype=n.prototype),o};function xS(t,e){this.tag=t,this.serviceTag=e,Gm.init([ES,AS,SS,bS],[RS]),_m.init(),Fm.init(),Fm.generateSessionId();var n=uy.collect(Em),r=uy.collect(Im);Promise.all([n,r]).then(function(t){_m.addConfig("clientId",t[0][Em]);var e=_m.generateClientKey("ha");Tm.dealFirstOpenEvent(e,t[0][Em],Hm),_m.addConfig("sdkToken",t[1][Im])}).catch(function(){console.log("failed to get info")})}function MS(){}function US(){this.key=Im,this.cache=null}function LS(){this.key="serverConfig",this.cache=null}Hp(Hp.P,"Function",{bind:NS});var DS=Dp(!1),jS=[].indexOf,FS=!!jS&&1/[1].indexOf(1,-0)<0;Hp(Hp.P+Hp.F*(FS||!Wg(jS)),"Array",{indexOf:function(t){return FS?jS.apply(this,arguments)||0:DS(this,t,arguments[1])}}),Iy("match",1,function(r,o,u,f){return[function(t){var e=r(this),n=null==t?void 0:t[o];return void 0!==n?n.call(t,e):new RegExp(t)[o](String(e))},function(t){var e=f(u,t,this);if(e.done)return e.value;var n=tp(t),r=String(this);if(!n.global)return iy(n,r);for(var o,i=n.unicode,s=[],a=n.lastIndex=0;null!==(o=iy(n,r));){var c=String(o[0]);""===(s[a]=c)&&(n.lastIndex=oy(r,Lp(n.lastIndex),i)),a++}return 0===a?null:s}]});var VS,$S,HS=(XS.prototype.saveClientValue=function(t,e,n,r,o,i){var s=new Date;n&&s.setTime(s.getTime()+n),document.cookie=t+"="+encodeURIComponent(e)+(n?";expires="+s.toUTCString():"")+";path="+(r||"/")+(o?";domain="+o:"")+(i?";secure":"")},XS.prototype.getClientValue=function(t){var e=new RegExp("(^|;)[ ]*"+t+"=([^;]*)").exec(document.cookie);return e?decodeURIComponent(e[2]):""},XS.prototype.getReferrer=function(){return document&&document.referrer},XS.prototype.getHref=function(){return window&&window.location.href},XS.prototype.getHost=function(){return window&&window.location.host},XS.prototype.getDefaultTitle=function(){return document&&document.title},XS.prototype.getUAType=function(){var t=navigator.userAgent;return t.match(/AppleWebKit.*Mobile.*/)?-1!==t.indexOf(" wv")?2:1:0},XS),BS=(ey(JS,$S=HS),JS.prototype.initAutoEvents=function(t){this.attachEventListener(window,"DOMContentLoaded",t.reportPageEntryEvent.bind(t)),this.attachEventListener(window,"beforeunload",t.reportPageExitEvent.bind(t)),this.attachEventListener(window,"load",t.computeLoadTime.bind(t)),this.attachEventListener(document,"visibilitychange",t.stateChanged.bind(t))},JS.prototype.isKeyExist=function(t){return!!this.getClientValue(t)},JS.prototype.dealFirstOpenEvent=function(t,e,n){e&&this.saveClientValue(t,e,31536e6,"/")},JS.prototype.attachEventListener=function(t,e,n){var r=this;t.attachEvent?t.attachEvent("on"+e,function(){n.apply(r)}):t.addEventListener(e,function(){n.apply(r)},!1)},new JS),GS=(zS.prototype.onEvent=function(t,e,n){var r=n&&n.mode;this.url=n&&n.url,r&&this.sendFun[r]?this.sendFun[r].call(this,t,e,n):this.smartSend(t,e,n)},zS.prototype.smartSend=function(t,e,n){"undefined"!=typeof fetch?this.sendByBeacon(t,e):window.XMLHttpRequest?this.sendByAjax(t,e,n):this.sendByImg(t,e,n)},zS.prototype.sendByBeacon=function(t,e){var n;"undefined"!=typeof fetch&&(n=new Headers(e),fetch(this.url,{method:"POST",body:JSON.stringify(t),headers:n}))},zS.prototype.sendByAjax=function(t,e,n){if(void 0===e&&(e={}),window.XMLHttpRequest&&this.url){var r=new XMLHttpRequest;if(n&&"get"===String(n.method).toLocaleLowerCase()){for(var o in r.open("GET",this.url+"?"+t,!0),e)r.setRequestHeader(o,e[o]);r.send()}else{var i=n&&n.async;for(var o in r.open("POST",this.url,i),e)r.setRequestHeader(o,e[o]);r.send(JSON.stringify(t))}}},zS.prototype.sendByImg=function(t,e,n){},zS.prototype.setUrl=function(t){this.url=t},new zS),WS=(YS.prototype.getBrowserInfo=function(){var t,e={},n=navigator.userAgent.toLowerCase();return(t=n.match(/edge\/([\d.]+)/))?e.edge=t[1]:(t=n.match(/rv:([\d.]+)\) like gecko/))||(t=n.match(/msie ([\d.]+)/))?e.ie=t[1]:(t=n.match(/firefox\/([\d.]+)/))?e.firefox=t[1]:(t=n.match(/chrome\/([\d.]+)/))?e.chrome=t[1]:(t=n.match(/opera.([\d.]+)/))?e.opera=t[1]:(t=n.match(/version\/([\d.]+).*safari/))&&(e.safari=t[1]),e.chrome?{broswer:"Chrome",version:e.chrome}:e.opera?{broswer:"Opera",version:e.opera}:e.safari?{broswer:"Safari",version:e.safari}:e.edge?{broswer:"Edge",version:e.edge}:e.ie?{broswer:"IE",version:e.ie}:e.firefox?{broswer:"Firefox",version:e.firefox}:{broswer:"",version:"0"}},YS.prototype.generateUserCommonProperty=function(){var t=navigator.language.split("-").join("_").toLocaleUpperCase();return{_model:"",_lib_ver:"5.0.3.300",_lib_name:"hianalytics",_sys_language:t,_os:"",_os_ver:"",_screen_height:window&&window.screen.height||0,_screen_width:window&&window.screen.width||0,_browser:this.getBrowserInfo().broswer,_browser_version:this.getBrowserInfo().version,_browser_language:t,_package_name:""}},new YS),KS=(ey(qS,VS=HS),qS.prototype.getSessionValue=function(t){return t?this.sessionValue:this.getClientValue(this.sessionId)},qS.prototype.setSessionDuration=function(t){Number.isInteger(t)&&(this.sessionDuration=t)},qS.prototype.setSessionId=function(t){this.sessionId=t},qS.prototype.handleSessionId=function(t,e){t&&(this.sessionId=t),e&&(this.sessionValue=e),this.getSessionValue()?this.sessionValue=e||this.getSessionValue():this.sessionValue=jm.create()+"_"+(new Date).getTime(),this.saveClientValue(this.sessionId,this.sessionValue,this.sessionDuration,"/")},new qS);function qS(){var t=VS.call(this)||this;return t.sessionDuration=18e5,t.sessionValue="",t.sessionId="",t}function YS(){}function zS(){this.url="",this.sendFun={},this.sendFun[pm.AJAX]=this.sendByAjax,this.sendFun[pm.BEACON]=this.sendByBeacon,this.sendFun[pm.IMG]=this.sendByImg}function JS(){return $S.call(this)||this}function XS(){}fy.setHiSendData(GS),fy.setHiLog(tm),fy.setHiAutoReport(BS),fy.setHiStorage(KS),fy.setHiClientProperty(WS);var QS=(eE.prototype.getInstance=function(t,e){if(this.connectors.has(t))return this.connectors.get(t);var n=new OS(t,e);return this.connectors.set(t,n),n},eE),ZS=new c(function(){return new QS}),tE={EventName:Yh,ParamName:Jh};function eE(){this.connectors=new Map}l.registerApiProvider("analyticsConnector",function(){return ZS.get()},tE);function nE(t){return t&&"number"==typeof t?Math.ceil(t):0===t||t?t:-1}function rE(t){return Array.isArray(t)?t.map(function(t){return(Array.isArray(t)?rE:nE)(t)}):t}function oE(t,e,n){var r="",o=e,i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];t&&(o=Math.round(Math.random()*(n-e))+e);for(var s=0;s<o;s++){r+=i[Math.round(Math.random()*(i.length-1))]}return r}function iE(t,e){return new RegExp(e).test(t),RegExp.$1}function sE(t,e){return e?t-e:null}function aE(t,e){var n=t.map(function(t){return[e?e+t.startTime:t.timestamp,t.url,t.startTime,t.initiatorType,t.name,t.duration,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.secureConnectionStart,t.requestStart,t.responseStart,t.responseEnd,t.transferSize||0,t.encodedBodySize||0,t.decodedBodySize||0]});return rE(n)}function cE(t,e,n){var r,o,i,s,a,c,u,f=2===(i=1,"function"!=typeof(r=t).getEntriesByType||(o=r.getEntriesByType("navigation"))&&o.length&&(i=2),i),l=t.getEntriesByType("navigation")[0],h=t.getEntriesByType("paint"),p=t.timing,d=[p.responseEnd,f&&h&&h[0]?h[0].startTime:p.responseStart-p.navigationStart,f&&h&&h[1]?h[1].startTime:p.responseStart-p.navigationStart,f?l.domInteractive:p.domContentLoadedEventStart-p.fetchStart,(s=e.apmSdk.i)&&s.delay?nE(s.delay.v):null,f?l.domContentLoadedEventEnd:p.domContentLoadedEventEnd-p.responseEnd,f?l.loadEventStart-l.domContentLoadedEventEnd:p.loadEventStart-p.domContentLoadedEventEnd,f?l.loadEventEnd-l.responseEnd:p.loadEventEnd-p.responseEnd,function(t,e,n){for(var r=t.innerHeight,o=[],i=e.getElementsByTagName("img"),s=0;s<i.length;s++){hE(i[s])<r&&o.push(i[s])}var a=n.getEntriesByType("resource").filter(function(t){return"img"===t.initiatorType}).filter(function(t){return o.map(function(t){return t.src}).includes(t.name)}),c=Math.max.apply(Math,k(a.map(function(t){return t.responseEnd}))),u=n.getEntriesByType("navigation")[0].domInteractive;return u<c?c:u}(e,n,t),f?l.loadEventEnd:p.loadEventEnd-p.navigationStart],v=[p.fetchStart,f?l.domainLookupEnd-l.domainLookupStart:p.domainLookupEnd-p.domainLookupStart,f?l.connectEnd-l.connectStart:p.domainLookupEnd-p.domainLookupStart,f?sE(l.connectEnd,l.secureConnectionStart):sE(p.connectEnd,p.secureConnectionStart),f?l.responseEnd-l.requestStart:p.responseEnd-p.requestStart,f?l.requestStart-l.connectEnd+l.connectStart-l.domainLookupEnd+l.domainLookupStart-l.fetchStart:p.requestStart-p.connectEnd+p.connectStart-p.domainLookupEnd+p.domainLookupStart-p.fetchStart,f?l.responseStart-l.fetchStart:p.responseStart-p.fetchStart,f?l.responseEnd-l.responseStart:p.responseEnd-p.responseStart,f?l.transferSize:null],g=e.apmSdk.e,y=e.navigator,m=e.location,S=y.appName,E=y.appCodeName,I=(a=y.appVersion,/opera/i.test(a)||/OPR/i.test(a)?(c=iE(a,"OPR/(\\d+\\.+\\d+)"),"Opera/".concat(c)):/compatible/i.test(a)&&/MSIE/i.test(a)?(c=iE(a,"MSIE (\\d+\\.+\\d+)"),"IE/".concat(c)):/Edge/i.test(a)?(c=iE(a,"Edge/(\\d+\\.+\\d+)"),"Edge/".concat(c)):/Firefox/i.test(a)?(c=iE(a,"Firefox/(\\d+\\.+\\d+)"),"Firefox/".concat(c)):/Safari/i.test(a)&&!/Chrome/i.test(a)?(c=iE(a,"Safari/(\\d+\\.+\\d+)"),"Safari/".concat(c)):/Chrome/i.test(a)&&/Safari/i.test(a)?(c=iE(a,"Chrome/(\\d+\\.+\\d+)"),"Chrome/".concat(c)):window.ActiveXObject||"ActiveXObject"in window?"IE/".concat(c=11):void 0),w=y.platform,_=y.cookieEnabled,T=y.userAgent,P=m.href,A=m.protocol,b=m.hostname,R="serviceWorker"in y,O=y.connection.effectiveType,C=n.visibilityState;return u={website:d,network:v,resources:[],error:g,browser:[S,E,I,w,_,T,P,A,b,R,O,C],agent_version:"1.0.0",agent_type:"web"},Object.entries(u).forEach(function(t){u[t[0]]=rE(t[1])}),u}function uE(r,t,e,n){var o,i,s,a,c,u=r.perfMetrics;u&&"function"==typeof u.onFirstInputDelay?u.onFirstInputDelay(function(t,e){var n={delay:{n:"first input delay",v:t},stay:{n:"stay no input",v:e.timeStamp}};r.apmSdk.i=n}):console.warn("first input delay not include."),wE(r,e),i=t,s=n,a=(o=r).addEventListener,c=o.apmSdk.e,pE(a,c,o),dE(o,i,s,a);var f=r.performance;r.APM={},r.APM.createTrace=function(t){if("string"!=typeof t)throw Error("TraceName must be string.");if(!EE.test(t))throw Error("TraceName can contain only cn or en or number or _");if(40<t.length)throw Error("TraceName length must less or equal than 40.");return new IE(t,f,r)},r.agconnect=l,r.APM.enable=function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];if("boolean"!=typeof t)throw new Error("param type must be boolean.");r.apmSdk.g=t}}var fE,lE,hE=function t(e){var n=e.offsetTop;return e.offsetParent&&(n+=t(e.offsetParent)),n},pE=function(t,i,n){var s=n.location;t("error",function(t){var e=t.target;e!==n&&i[0].push([s.href,(new Date).getTime(),e.src||e.href])},!0),t("unhandledrejection",function(t){i[1].push([s.href,(new Date).getTime(),String(t.reason)])}),n.onerror=function(t,e,n,r,o){i[2].push([s.href,(new Date).getTime(),e,o&&o.stack?o.stack:t,n,r])}},dE=function(m,S,E,t){t("load",function(){var t,e,n,r,o,i=m.agconnect;i&&(e=(t=i.instance().config().client).cp_id,n=t.product_id,r=t.client_id,o=t.app_id,m.apmSdk.p=[e,n,r,o]),setTimeout(function(){var t=m.performance,e=m.apmSdk,n=e.u,r=e.x,o=e.p,i=m.location.href,s=t.getEntriesByType("resource");s.forEach(function(t){t.url=i,t.timestamp=(new Date).getTime()});var a,c,u,f,l,h,p,d,v,g=aE(s,t.timing.fetchStart),y=_E(m,S);y.resources=g,y.visitKey=n,y.traces=Object.assign([],r),y.platform=o,localStorage.setItem("cpt",(new Date).getTime()),TE(y,m),c=S,u=E,f=(a=m).apmSdk,l=f.r,h=f.u,p=f.x,d=f.p,v=a.location,new PerformanceObserver(function(t){var e=localStorage.getItem("cpt"),n=(new Date).getTime();e&&144e5<n-e&&(a.apmSdk.u="visit#".concat(oE(!1,10))),localStorage.setItem("cpt",(new Date).getTime()),t.getEntriesByType("resource").forEach(function(t){var e,n;t.timestamp=(new Date).getTime(),t.url=v.href,l.push(t),l.length>=u&&(e=aE(l),(n=_E(a,c)).visitKey=h,n.website=null,n.network=null,n.resources=e,n.traces=p,n.platform=d,TE(n,a))})}).observe({entryTypes:["resource"]})},2e3)}),t("beforeunload",function(){var t=m.apmSdk,e=t.r,n=t.u,r=t.x,o=t.p,i=_E(m,S),s=aE(e);i.resources=s,i.website=null,i.network=null,i.visitKey=n,i.traces=r,i.platform=o,localStorage.removeItem("cpt"),TE(i,m)})},vE="TRACE",gE="TRACE-START",yE="TRACE-STOP",mE="TRACE-MEASURE",SE=1,EE=/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/,IE=function(){function r(t,e,n){if(!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),"string"!=typeof t)throw Error("Trace name must be string.");this.performance=e,this.randomId=Math.floor(1e6*Math.random()),this.name="".concat(vE,"-").concat(t),this.traceStartMark="".concat(gE,"-").concat(this.randomId,"-").concat(t),this.traceStopMark="".concat(yE,"-").concat(this.randomId,"-").concat(t),this.traceMeasure="".concat(mE,"-").concat(this.randomId,"-").concat(t),this.w=n,this.status=SE,this.metrics=[],this.attributes=[],this.duration=null,this.startTime=null,this.traceArr=[this.startTime,this.name,this.randomId,this.duration,this.attributes,this.metrics]}var t,e,n;return t=r,(e=[{key:"start",value:function(){this.status===SE&&(this.status=2,this.performance.mark(this.traceStartMark),this.startTime=(new Date).getTime())}},{key:"stop",value:function(){2===this.status&&(this.status=3,this.performance.mark(this.traceStopMark),this.performance.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculate())}},{key:"calculate",value:function(){var t=this.performance.getEntriesByName(this.traceMeasure);t&&t.length&&(this.duration=t[0].duration),this.traceArr[0]=this.startTime,this.traceArr[3]=nE(this.duration),this.w.apmSdk.x.push(this.traceArr)}},{key:"setMetric",value:function(e,t){if("string"!=typeof e)throw Error("Trace metric key must be string.");if(40<e.length)throw Error("Trace metric key length must less or equal than 40.");if("number"!=typeof t)throw Error("Trace metric value must be number.");if(100<String(t).length)throw Error("Trace metric value length must less or equal than 100.");if(!EE.test(e))throw Error("Trace metric key can contain only cn or en or number or _");var n,r=this.metrics.map(function(t){return Object.keys(t)[0]});return r.some(function(t){return t===e})?(n=r.indexOf(e),this.metrics[n][e]=nE(t)):this.metrics.push(i({},e,nE(t))),this}},{key:"getMetric",value:function(e){if("string"!=typeof e)throw Error("Trace metric key must be string.");var t=this.metrics.find(function(t){return Object.keys(t)[0]===e});return t?t[e]:void 0}},{key:"getMetrics",value:function(){return this.metrics}},{key:"setAttribute",value:function(e,t){if("string"!=typeof e)throw Error("Trace attribute key must be string.");if(40<e.length)throw Error("Trace attribute key length must less or equal than 40.");if("string"!=typeof t)throw Error("Trace attribute value must be string.");if(100<t.length)throw Error("Trace attribute value length must less or equal than 100.");if(this.attributes.length&&4<this.attributes.length)throw Error("Length of attribute in trace must less or equal than 5.");if(!EE.test(e))throw Error("Trace attribute key can contain only cn or en or number or _");var n,r=this.attributes.map(function(t){return Object.keys(t)[0]});return r.some(function(t){return t===e})?(n=r.indexOf(e),this.attributes[n][e]=t):this.attributes.push(i({},e,t)),this}},{key:"getAttribute",value:function(e){if("string"!=typeof e)throw Error("Trace attribute key must be string.");var t=this.attributes.find(function(t){return Object.keys(t)[0]===e});return t?t[e]:void 0}},{key:"getAttributes",value:function(){return this.attributes}}])&&o(t.prototype,e),n&&o(t,n),r}(),wE=function(t,e){t.apmSdk.t=e,t.apmSdk.a=[],t.apmSdk.i={},t.apmSdk.u="visit#".concat(oE(!1,10)),t.apmSdk.e=[[],[],[]],t.apmSdk.r=[],t.apmSdk.x=[],t.apmSdk.p=[],t.apmSdk.h={},t.apmSdk.g=!0,new PerformanceObserver(function(t){t.getEntriesByType("resource").forEach(function(e){"script"===e.initiatorType&&k(document.scripts).find(function(t){return t.src===e.name}).setAttribute("crossorigin","anonymous")})}).observe({entryTypes:["resource"]})},_E=function(t,e){if(!t||!t.performance)return[];var n=t.performance;return cE(n,t,e)},TE=function(t,o){var e,n,r,i,s;o.apmSdk.g?(s=t,new Promise(function(t){window.agconnect.analyticsConnector().getInstance("apms","com.huawei.agconnect.apms").onEvent("event",s),t()}).then(function(){var t=o.apmSdk,e=t.r,n=t.e,r=t.x;n[e.length=0].length=0,n[1].length=0,n[2].length=0,r.length=0}).catch(function(t){console.error(t)})):(n=(e=o.apmSdk).r,r=e.e,i=e.x,r[n.length=0].length=0,r[1].length=0,r[2].length=0,i.length=0)};function PE(a,c){var n,r,o,e=[],u={passive:!0,capture:!0},t=new Date,f="pointerup",l="pointercancel";function h(t,e){n||(n=e,r=t,o=new Date,p(c),i())}function i(){0<=r&&r<o-t&&(e.forEach(function(t){t(r,n)}),e=[])}function s(t){var e,n,r;function o(){h(n,r),s()}function i(){s()}function s(){c(f,o,u),c(l,i,u)}t.cancelable&&(e=(1e12<t.timeStamp?new Date:performance.now())-t.timeStamp,"pointerdown"==t.type?(n=e,r=t,a(f,o,u),a(l,i,u)):h(e,t))}function p(e){["click","mousedown","keydown","touchstart","pointerdown"].forEach(function(t){e(t,s,u)})}p(a),self.perfMetrics=self.perfMetrics||{},self.perfMetrics.onFirstInputDelay=function(t){e.push(t),i()}}fE=window,lE=document,fE&&fE.performance?1<Object.keys(fE.apmSdk).length&&fE.apmSdk.t||(PE(fE.addEventListener,fE.removeEventListener),uE(fE,lE,1,20)):console.error("Browser does not support Performance API, apmSdk unitialization failure."),t.m=function(){},Object.defineProperty(t,"__esModule",{value:!0})});
  