@datarangers/sdk-javascript 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n,i,r=function(t){return t&&t.Math===Math&&t},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s=function(t){try{return!!t()}catch(t){return!0}},a=!s(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),c=!s(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),u=Function.prototype.call,h=c?u.bind(u):function(){return u.apply(u,arguments)},l={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,d={f:f&&!l.call({1:2},1)?function(t){var e=f(this,t);return!!e&&e.enumerable}:l},p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g=Function.prototype,v=g.call,m=c&&g.bind.bind(v,v),y=c?m:function(t){return function(){return v.apply(t,arguments)}},b=y({}.toString),_=y("".slice),w=function(t){return _(b(t),8,-1)},E=Object,S=y("".split),T=s(function(){return!E("z").propertyIsEnumerable(0)})?function(t){return"String"===w(t)?S(t,""):E(t)}:E,A=function(t){return null==t},k=TypeError,x=function(t){if(A(t))throw new k("Can't call method on "+t);return t},O=function(t){return T(x(t))},D="object"==typeof document&&document.all,I=void 0===D&&void 0!==D?function(t){return"function"==typeof t||t===D}:function(t){return"function"==typeof t},R=function(t){return"object"==typeof t?null!==t:I(t)},M=function(t,e){return arguments.length<2?(n=o[t],I(n)?n:void 0):o[t]&&o[t][e];var n},C=y({}.isPrototypeOf),B=o.navigator,P=B&&B.userAgent,L=P?String(P):"",G=o.process,N=o.Deno,U=G&&G.versions||N&&N.version,F=U&&U.v8;F&&(i=(n=F.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&L&&(!(n=L.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=L.match(/Chrome\/(\d+)/))&&(i=+n[1]);var j=i,z=o.String,q=!!Object.getOwnPropertySymbols&&!s(function(){var t=Symbol("symbol detection");return!z(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&j&&j<41}),V=q&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,K=V?function(t){return"symbol"==typeof t}:function(t){var e=M("Symbol");return I(e)&&C(e.prototype,H(t))},W=String,J=function(t){try{return W(t)}catch(t){return"Object"}},X=TypeError,$=function(t){if(I(t))return t;throw new X(J(t)+" is not a function")},Y=function(t,e){var n=t[e];return A(n)?void 0:$(n)},Z=TypeError,Q=Object.defineProperty,tt=function(t,e){try{Q(o,t,{value:e,configurable:!0,writable:!0})}catch(n){o[t]=e}return e},et=e(function(t){var e="__core-js_shared__",n=t.exports=o[e]||tt(e,{});(n.versions||(n.versions=[])).push({version:"3.50.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),nt=Object.create||Object,it=function(t,e){return et[t]||(et[t]=e||nt(null))},rt=Object,ot=function(t){return rt(x(t))},st=y({}.hasOwnProperty),at=Object.hasOwn||function(t,e){return st(ot(t),e)},ct=0,ut=Math.random(),ht=y(1.1.toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ht(++ct+ut,36)},ft=o.Symbol,dt=it("wks"),pt=V?ft.for||ft:ft&&ft.withoutSetter||lt,gt=function(t){return at(dt,t)||(dt[t]=q&&at(ft,t)?ft[t]:pt("Symbol."+t)),dt[t]},vt=TypeError,mt=gt("toPrimitive"),yt=function(t,e){if(!R(t)||K(t))return t;var n,i=Y(t,mt);if(i){if(void 0===e&&(e="default"),n=h(i,t,e),!R(n)||K(n))return n;throw new vt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,i;if("string"===e&&I(n=t.toString)&&!R(i=h(n,t)))return i;if(I(n=t.valueOf)&&!R(i=h(n,t)))return i;if("string"!==e&&I(n=t.toString)&&!R(i=h(n,t)))return i;throw new Z("Can't convert object to primitive value")}(t,e)},bt=function(t){var e=yt(t,"string");return K(e)?e:e+""},_t=o.document,wt=R(_t)&&R(_t.createElement),Et=function(t){return wt?_t.createElement(t):{}},St=!a&&!s(function(){return 7!==Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a}),Tt=Object.getOwnPropertyDescriptor,At={f:a?Tt:function(t,e){if(t=O(t),e=bt(e),St)try{return Tt(t,e)}catch(t){}if(at(t,e))return p(!h(d.f,t,e),t[e])}},kt=a&&s(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),xt=String,Ot=TypeError,Dt=function(t){if(R(t))return t;throw new Ot(xt(t)+" is not an object")},It=TypeError,Rt=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Ct="enumerable",Bt="configurable",Pt="writable",Lt={f:a?kt?function(t,e,n){if(Dt(t),e=bt(e),Dt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Pt in n&&!n[Pt]){var i=Mt(t,e);i&&i[Pt]&&(t[e]=n.value,n={configurable:Bt in n?n[Bt]:i[Bt],enumerable:Ct in n?n[Ct]:i[Ct],writable:!1})}return Rt(t,e,n)}:Rt:function(t,e,n){if(Dt(t),e=bt(e),Dt(n),St)try{return Rt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new It("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Gt=a?function(t,e,n){return Lt.f(t,e,p(1,n))}:function(t,e,n){return t[e]=n,t},Nt=Function.prototype,Ut=a&&Object.getOwnPropertyDescriptor,Ft=at(Nt,"name"),jt={EXISTS:Ft,PROPER:Ft&&"something"===function(){}.name,CONFIGURABLE:Ft&&(!a||a&&Ut(Nt,"name").configurable)},zt=y(Function.toString);I(et.inspectSource)||(et.inspectSource=function(t){return zt(t)});var qt,Vt,Ht,Kt=et.inspectSource,Wt=o.WeakMap,Jt=I(Wt)&&/native code/.test(String(Wt)),Xt=it("keys"),$t=function(t){return Xt[t]||(Xt[t]=lt(t))},Yt={},Zt="Object already initialized",Qt=o.TypeError,te=o.WeakMap;if(Jt||et.state){var ee=et.state||(et.state=new te);ee.get=ee.get,ee.has=ee.has,ee.set=ee.set,qt=function(t,e){if(ee.has(t))throw new Qt(Zt);return e.facade=t,ee.set(t,e),e},Vt=function(t){return ee.get(t)||{}},Ht=function(t){return ee.has(t)}}else{var ne=$t("state");Yt[ne]=!0,qt=function(t,e){if(at(t,ne))throw new Qt(Zt);return e.facade=t,Gt(t,ne,e),e},Vt=function(t){return at(t,ne)?t[ne]:{}},Ht=function(t){return at(t,ne)}}var ie={set:qt,get:Vt,has:Ht,enforce:function(t){return Ht(t)?Vt(t):qt(t,{})},getterFor:function(t){return function(e){var n;if(!R(e)||(n=Vt(e)).type!==t)throw new Qt("Incompatible receiver, "+t+" required");return n}}},re=e(function(t){var e=jt.CONFIGURABLE,n=ie.enforce,i=ie.get,r=String,o=Object.defineProperty,c=y("".slice),u=y("".replace),h=y([].join),l=a&&!s(function(){return 8!==o(function(){},"length",{value:8}).length}),f=String(String).split("String"),d=t.exports=function(t,i,s){"Symbol("===c(r(i),0,7)&&(i="["+u(r(i),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),s&&s.getter&&(i="get "+i),s&&s.setter&&(i="set "+i),(!at(t,"name")||e&&t.name!==i)&&(a?o(t,"name",{value:i,configurable:!0}):t.name=i),l&&s&&at(s,"arity")&&t.length!==s.arity&&o(t,"length",{value:s.arity});try{s&&at(s,"constructor")&&s.constructor?a&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=n(t);return at(d,"source")||(d.source=h(f,"string"==typeof i?i:"")),t};Function.prototype.toString=d(function(){return I(this)&&i(this).source||Kt(this)},"toString")}),oe=function(t,e,n,i){i||(i={});var r=i.enumerable,o=void 0!==i.name?i.name:e;if(I(n)&&re(n,o,i),i.global)r?t[e]=n:tt(e,n);else{try{i.unsafe?t[e]&&(r=!0):delete t[e]}catch(t){}r?t[e]=n:Lt.f(t,e,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t},se=Math.ceil,ae=Math.floor,ce=Math.trunc||function(t){var e=+t;return(e>0?ae:se)(e)},ue=function(t){var e=+t;return e!=e||0===e?0:ce(e)},he=Math.max,le=Math.min,fe=function(t,e){var n=ue(t);return n<0?he(n+e,0):le(n,e)},de=Math.min,pe=function(t){var e=ue(t);return e>0?de(e,9007199254740991):0},ge=function(t){return pe(t.length)},ve=function(t){return function(e,n,i){var r=O(e),o=ge(r);if(0===o)return!t&&-1;var s,a=fe(i,o);if(t&&n!=n){for(;o>a;)if((s=r[a++])!=s)return!0}else for(;o>a;a++)if((t||a in r)&&r[a]===n)return t||a||0;return!t&&-1}},me={includes:ve(!0),indexOf:ve(!1)},ye=me.indexOf,be=y([].push),_e=function(t,e){var n,i=O(t),r=0,o=[];for(n in i)!at(Yt,n)&&at(i,n)&&be(o,n);for(;e.length>r;)at(i,n=e[r++])&&(~ye(o,n)||be(o,n));return o},we=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ee=we.concat("length","prototype"),Se={f:Object.getOwnPropertyNames||function(t){return _e(t,Ee)}},Te={f:Object.getOwnPropertySymbols},Ae=y([].concat),ke=M("Reflect","ownKeys")||function(t){var e=Se.f(Dt(t)),n=Te.f;return n?Ae(e,n(t)):e},xe=function(t,e,n){for(var i=ke(e),r=Lt.f,o=At.f,s=0;s<i.length;s++){var a=i[s];at(t,a)||n&&at(n,a)||r(t,a,o(e,a))}},Oe=/#|\.prototype\./,De=function(t,e){var n=Re[Ie(t)];return n===Ce||n!==Me&&(I(e)?s(e):!!e)},Ie=De.normalize=function(t){return String(t).replace(Oe,".").toLowerCase()},Re=De.data={},Me=De.NATIVE="N",Ce=De.POLYFILL="P",Be=De,Pe=At.f,Le=function(t,e){var n,i,r,s,a,c=t.target,u=t.global,h=t.stat;if(n=u?o:h?o[c]||tt(c,{}):o[c]&&o[c].prototype)for(i in e){if(s=e[i],r=t.dontCallGetSet?(a=Pe(n,i))&&a.value:n[i],!Be(u?i:c+(h?".":"#")+i,t.forced)&&void 0!==r){if(typeof s==typeof r)continue;xe(s,r)}(t.sham||r&&r.sham)&&Gt(s,"sham",!0),oe(n,i,s,t)}},Ge=function(t){if("Function"===w(t))return y(t)},Ne=Ge(Ge.bind),Ue=function(t,e){return $(t),void 0===e?t:c?Ne(t,e):function(){return t.apply(e,arguments)}},Fe=Array.isArray||function(t){return"Array"===w(t)},je={};je[gt("toStringTag")]="z";var ze="[object z]"===String(je),qe=gt("toStringTag"),Ve=Object,He="Arguments"===w(function(){return arguments}()),Ke=ze?w:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Ve(t),qe))?n:He?w(e):"Object"===(i=w(e))&&I(e.callee)?"Arguments":i},We=function(){},Je=M("Reflect","construct"),Xe=/^\s*(?:class|function)\b/,$e=y(Xe.exec),Ye=!Xe.test(We),Ze=function(t){if(!I(t))return!1;try{return Je(We,[],t),!0}catch(t){return!1}},Qe=function(t){if(!I(t))return!1;switch(Ke(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ye||!!$e(Xe,Kt(t))}catch(t){return!0}};Qe.sham=!0;var tn=!Je||s(function(){var t;return Ze(Ze.call)||!Ze(Object)||!Ze(function(){t=!0})||t})?Qe:Ze,en=gt("species"),nn=Array,rn=function(t,e){return new(function(t){var e;return Fe(t)&&(e=t.constructor,(tn(e)&&(e===nn||Fe(e.prototype))||R(e)&&null===(e=e[en]))&&(e=void 0)),void 0===e?nn:e}(t))(0===e?0:e)},on=function(t,e,n){a?Lt.f(t,e,p(0,n)):t[e]=n},sn=function(t){var e=1===t,n=2===t,i=3===t,r=4===t,o=6===t,s=7===t,a=5===t||o;return function(c,u,h){for(var l,f,d=ot(c),p=T(d),g=ge(p),v=Ue(u,h),m=0,y=0,b=e?rn(c,g):n||s?rn(c,0):void 0;g>m;m++)if((a||m in p)&&(f=v(l=p[m],m,d),t))if(e)on(b,m,f);else if(f)switch(t){case 3:return!0;case 5:return l;case 6:return m;case 2:on(b,y++,l)}else switch(t){case 4:return!1;case 7:on(b,y++,l)}return o?-1:i||r?r:b}},an={forEach:sn(0),map:sn(1),filter:sn(2),some:sn(3),every:sn(4),find:sn(5),findIndex:sn(6),filterReject:sn(7)},cn=function(t,e){var n=[][t];return!!n&&s(function(){n.call(null,e||function(){return 1},1)})},un=an.forEach,hn=cn("forEach")?[].forEach:function(t){return un(this,t,arguments.length>1?arguments[1]:void 0)};Le({target:"Array",proto:!0,forced:[].forEach!==hn},{forEach:hn});var ln=me.indexOf,fn=Ge([].indexOf),dn=!!fn&&1/fn([1],1,-0)<0,pn=dn||!cn("indexOf");Le({target:"Array",proto:!0,forced:pn},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return dn?fn(this,t,e)||0:ln(this,t,e)}}),Le({target:"Array",stat:!0},{isArray:Fe});var gn,vn=Object.keys||function(t){return _e(t,we)},mn=a&&!kt?Object.defineProperties:function(t,e){Dt(t);for(var n,i=O(e),r=vn(e),o=r.length,s=0;o>s;)Lt.f(t,n=r[s++],i[n]);return t},yn={f:mn},bn=M("document","documentElement"),_n="prototype",wn="script",En=$t("IE_PROTO"),Sn=function(){},Tn=function(t){return"<"+wn+">"+t+"</"+wn+">"},An=function(t){t.write(Tn("")),t.close();var e=t.parentWindow.Object;return t=null,e},kn=function(){try{gn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;kn="undefined"!=typeof document?document.domain&&gn?An(gn):(e=Et("iframe"),n="java"+wn+":",e.style.display="none",bn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Tn("document.F=Object")),t.close(),t.F):An(gn);for(var i=we.length;i--;)delete kn[_n][we[i]];return kn()};Yt[En]=!0;var xn=Object.create||function(t,e){var n;return null!==t?(Sn[_n]=Dt(t),n=new Sn,Sn[_n]=null,n[En]=t):n=kn(),void 0===e?n:yn.f(n,e)},On=Lt.f,Dn=gt("unscopables"),In=Array.prototype;void 0===In[Dn]&&On(In,Dn,{configurable:!0,value:xn(null)});var Rn,Mn,Cn,Bn=function(t){In[Dn][t]=!0},Pn=Object.create?Object.create(null):{},Ln=!s(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Gn=$t("IE_PROTO"),Nn=Object,Un=Nn.prototype,Fn=Ln?Nn.getPrototypeOf:function(t){var e=ot(t);if(at(e,Gn))return e[Gn];var n=e.constructor;return I(n)&&e instanceof n?n.prototype:e instanceof Nn?Un:null},jn=gt("iterator"),zn=!1;[].keys&&("next"in(Cn=[].keys())?(Mn=Fn(Fn(Cn)))!==Object.prototype&&(Rn=Mn):zn=!0);var qn=!R(Rn)||s(function(){var t={};return Rn[jn].call(t)!==t});qn&&(Rn={}),I(Rn[jn])||oe(Rn,jn,function(){return this});var Vn={IteratorPrototype:Rn,BUGGY_SAFARI_ITERATORS:zn},Hn=Lt.f,Kn=gt("toStringTag"),Wn=function(t,e,n){t&&!n&&(t=t.prototype),t&&!at(t,Kn)&&Hn(t,Kn,{configurable:!0,value:e})},Jn=Vn.IteratorPrototype,Xn=function(){return this},$n=function(t,e,n,i){var r=e+" Iterator";return t.prototype=xn(Jn,{next:p(+!i,n)}),Wn(t,r,!1),Pn[r]=Xn,t},Yn=function(t,e,n){try{return y($(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}},Zn=String,Qn=TypeError,ti=function(t){if(function(t){return R(t)||null===t}(t))return t;throw new Qn("Can't set "+Zn(t)+" as a prototype")},ei=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Yn(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return x(n),ti(i),R(n)?(e?t(n,i):n.__proto__=i,n):n}}():void 0),ni=jt.PROPER,ii=jt.CONFIGURABLE,ri=Vn.IteratorPrototype,oi=Vn.BUGGY_SAFARI_ITERATORS,si=gt("iterator"),ai="keys",ci="values",ui="entries",hi=function(){return this},li=function(t,e,n,i,r,o,s){$n(n,e,i);var a,c,u,l=function(t){if(t===r&&v)return v;if(!oi&&t&&t in p)return p[t];switch(t){case ai:case ci:case ui:return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",d=!1,p=t.prototype,g=p[si]||p["@@iterator"]||r&&p[r],v=!oi&&g||l(r),m="Array"===e&&p.entries||g;if(m&&(a=Fn(m.call(new t)))!==Object.prototype&&a.next&&(Fn(a)!==ri&&(ei?ei(a,ri):I(a[si])||oe(a,si,hi)),Wn(a,f,!0)),ni&&r===ci&&g&&g.name!==ci&&(ii?Gt(p,"name",ci):(d=!0,v=function(){return h(g,this)})),r)if(c={values:l(ci),keys:o?v:l(ai),entries:l(ui)},s)for(u in c)(oi||d||!(u in p))&&oe(p,u,c[u]);else Le({target:e,proto:!0,forced:oi||d},c);return p[si]!==v&&oe(p,si,v,{name:r}),Pn[e]=v,c},fi=function(t,e){return{value:t,done:e}},di=Lt.f,pi="Array Iterator",gi=ie.set,vi=ie.getterFor(pi),mi=li(Array,"Array",function(t,e){gi(this,{type:pi,target:O(t),index:0,kind:e})},function(){var t=vi(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,fi(void 0,!0);switch(t.kind){case"keys":return fi(n,!1);case"values":return fi(e[n],!1)}return fi([n,e[n]],!1)},"values"),yi=Pn.Arguments=Pn.Array;if(Bn("keys"),Bn("values"),Bn("entries"),a&&"values"!==yi.name)try{di(yi,"name",{value:"values"})}catch(t){}var bi=y([].join),_i=T!==Object||!cn("join",",");Le({target:"Array",proto:!0,forced:_i},{join:function(t){return bi(O(this),void 0===t?",":t)}});var wi=TypeError,Ei="Reduce of empty array with no initial value",Si=function(t){return function(e,n,i,r){var o=ot(e),s=T(o),a=ge(o);if($(n),0===a&&i<2)throw new wi(Ei);var c=t?a-1:0,u=t?-1:1;if(i<2)for(;;){if(c in s){r=s[c],c+=u;break}if(c+=u,t?c<0:a<=c)throw new wi(Ei)}for(;t?c>=0:a>c;c+=u)c in s&&(r=n(r,s[c],c,o));return r}},Ti={left:Si(!1),right:Si(!0)},Ai=function(t){return L.slice(0,t.length)===t},ki=Ai("Bun/")?"BUN":Ai("Cloudflare-Workers")?"CLOUDFLARE":Ai("Deno/")?"DENO":Ai("Node.js/")?"NODE":o.Bun&&"string"==typeof Bun.version?"BUN":o.Deno&&"object"==typeof Deno.version?"DENO":"process"===w(o.process)?"NODE":o.window&&o.document?"BROWSER":"REST",xi="NODE"===ki,Oi=Ti.left,Di=!xi&&j>79&&j<83||!cn("reduce");Le({target:"Array",proto:!0,forced:Di},{reduce:function(t){var e=arguments.length;return Oi(this,t,e,e>1?arguments[1]:void 0)}});var Ii=y([].reverse),Ri=[1,2];Le({target:"Array",proto:!0,forced:String(Ri)===String(Ri.reverse())},{reverse:function(){return Fe(this)&&(this.length=this.length),Ii(this)}});var Mi=TypeError,Ci=Object.getOwnPropertyDescriptor,Bi=a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}()?function(t,e){if(Fe(t)&&!Ci(t,"length").writable)throw new Mi("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Pi=gt("species"),Li=function(t){return j>=51||!s(function(){var e=[];return(e.constructor={})[Pi]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Gi=y([].slice),Ni=Li("slice"),Ui=gt("species"),Fi=Array,ji=Math.max;Le({target:"Array",proto:!0,forced:!Ni},{slice:function(t,e){var n,i,r,o=O(this),s=ge(o),a=fe(t,s),c=fe(void 0===e?s:e,s);if(Fe(o)&&(n=o.constructor,(tn(n)&&(n===Fi||Fe(n.prototype))||R(n)&&null===(n=n[Ui]))&&(n=void 0),n===Fi||void 0===n))return Gi(o,a,c);for(i=new(void 0===n?Fi:n)(ji(c-a,0)),r=0;a<c;a++,r++)a in o&&on(i,r,o[a]);return Bi(i,r),i}});var zi="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,qi=function(t,e,n){return n.get&&re(n.get,e,{getter:!0}),n.set&&re(n.set,e,{setter:!0}),Lt.f(t,e,n)},Vi=function(t,e,n){for(var i in e)oe(t,i,e[i],n);return t},Hi=TypeError,Ki=function(t,e){if(C(e,t))return t;throw new Hi("Incorrect invocation")},Wi=RangeError,Ji=function(t){if(void 0===t)return 0;var e=ue(t),n=pe(e);if(e!==n)throw new Wi("Wrong length or index");return n},Xi=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1},$i=4503599627370496,Yi=Math.abs,Zi=function(t,e,n,i){var r=+t,o=Yi(r),s=Xi(r);if(o<i)return s*function(t){return t+$i-$i}(o/i/e)*i*e;var a=(1+e/2220446049250313e-31)*o,c=a-(a-o);return c>n||c!=c?s*(1/0):s*c},Qi=Math.fround||function(t){return Zi(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)},tr=Array,er=Math.abs,nr=Math.pow,ir=Math.floor,rr=Math.log,or=Math.LN2,sr=function(t,e,n){var i,r,o,s=tr(n),a=8*n-e-1,c=(1<<a)-1,u=c>>1,h=23===e?nr(2,-24)-nr(2,-77):0,l=t<0||0===t&&1/t<0?1:0,f=0;for((t=er(t))!=t||t===1/0?(r=t!=t?1:0,i=c):(i=ir(rr(t)/or),t*(o=nr(2,-i))<1&&(i--,o*=2),(t+=i+u>=1?h/o:h*nr(2,1-u))*o>=2&&(i++,o/=2),i+u>=c?(r=0,i=c):i+u>=1?(r=(t*o-1)*nr(2,e),i+=u):(r=t*nr(2,u-1)*nr(2,e),i=0));e>=8;)s[f++]=255&r,r/=256,e-=8;for(i=i<<e|r,a+=e;a>0;)s[f++]=255&i,i/=256,a-=8;return s[f-1]|=128*l,s},ar=function(t,e){var n,i=t.length,r=8*i-e-1,o=(1<<r)-1,s=o>>1,a=r-7,c=i-1,u=t[c--],h=127&u;for(u>>=7;a>0;)h=256*h+t[c--],a-=8;for(n=h&(1<<-a)-1,h>>=-a,a+=e;a>0;)n=256*n+t[c--],a-=8;if(0===h)h=1-s;else{if(h===o)return n?NaN:u?-1/0:1/0;n+=nr(2,e),h-=s}return(u?-1:1)*n*nr(2,h-e)},cr=[].fill||function(t){for(var e=ot(this),n=ge(e),i=arguments.length,r=fe(i>1?arguments[1]:void 0,n),o=i>2?arguments[2]:void 0,s=void 0===o?n:fe(o,n);s>r;)e[r++]=t;return e},ur=function(t,e,n){var i,r;return ei&&I(i=e.constructor)&&i!==n&&R(r=i.prototype)&&r!==n.prototype&&ei(t,r),t},hr=jt.PROPER,lr=jt.CONFIGURABLE,fr="ArrayBuffer",dr="DataView",pr="prototype",gr="Wrong index",vr=ie.getterFor(fr),mr=ie.getterFor(dr),yr=ie.set,br=o[fr],_r=br,wr=_r&&_r[pr],Er=o[dr],Sr=Er&&Er[pr],Tr=Object.prototype,Ar=o.Array,kr=o.RangeError,xr=y(cr),Or=y([].reverse),Dr=sr,Ir=ar,Rr=function(t){return[255&t]},Mr=function(t){return[255&t,t>>8&255]},Cr=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},Br=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},Pr=function(t){return Dr(Qi(t),23,4)},Lr=function(t){return Dr(t,52,8)},Gr=function(t,e,n){qi(t[pr],e,{configurable:!0,get:function(){return n(this)[e]}})},Nr=function(t,e,n,i){var r=mr(t),o=Ji(n),s=!!i;if(o+e>r.byteLength)throw new kr(gr);var a=r.bytes,c=o+r.byteOffset,u=Gi(a,c,c+e);return s?u:Or(u)},Ur=function(t,e,n,i,r,o){var s=mr(t),a=Ji(n),c=i(+r),u=!!o;if(a+e>s.byteLength)throw new kr(gr);for(var h=s.bytes,l=a+s.byteOffset,f=0;f<e;f++)h[l+f]=c[u?f:e-f-1]};if(zi){var Fr=hr&&br.name!==fr;s(function(){br(1)})&&s(function(){new br(-1)})&&!s(function(){return new br,new br(1.5),new br(NaN),1!==br.length||Fr&&!lr})?Fr&&lr&&Gt(br,"name",fr):((_r=function(t){return Ki(this,wr),ur(new br(Ji(t)),this,_r)})[pr]=wr,wr.constructor=_r,xe(_r,br)),ei&&Fn(Sr)!==Tr&&ei(Sr,Tr);var jr=new Er(new _r(2)),zr=y(Sr.setInt8);jr.setInt8(0,2147483648),jr.setInt8(1,2147483649),!jr.getInt8(0)&&jr.getInt8(1)||Vi(Sr,{setInt8:function(t,e){zr(this,t,e<<24>>24)},setUint8:function(t,e){zr(this,t,e<<24>>24)}},{unsafe:!0})}else wr=(_r=function(t){Ki(this,wr);var e=Ji(t);yr(this,{type:fr,bytes:xr(Ar(e),0),byteLength:e}),a||(this.byteLength=e,this.detached=!1)})[pr],Sr=(Er=function(t,e,n){Ki(this,Sr),Ki(t,wr);var i=vr(t),r=i.byteLength,o=ue(e);if(o<0||o>r)throw new kr("Wrong offset");if(o+(n=void 0===n?r-o:Ji(n))>r)throw new kr("Wrong length");yr(this,{type:dr,buffer:t,byteLength:n,byteOffset:o,bytes:i.bytes}),a||(this.buffer=t,this.byteLength=n,this.byteOffset=o)})[pr],a&&(Gr(_r,"byteLength",vr),Gr(Er,"buffer",mr),Gr(Er,"byteLength",mr),Gr(Er,"byteOffset",mr)),Vi(Sr,{getInt8:function(t){return Nr(this,1,t)[0]<<24>>24},getUint8:function(t){return Nr(this,1,t)[0]},getInt16:function(t){var e=Nr(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Nr(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return Br(Nr(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return Br(Nr(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return Ir(Nr(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return Ir(Nr(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){Ur(this,1,t,Rr,e)},setUint8:function(t,e){Ur(this,1,t,Rr,e)},setInt16:function(t,e){Ur(this,2,t,Mr,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){Ur(this,2,t,Mr,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){Ur(this,4,t,Cr,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){Ur(this,4,t,Cr,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){Ur(this,4,t,Pr,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){Ur(this,8,t,Lr,e,arguments.length>2&&arguments[2])}});Wn(_r,fr),Wn(Er,dr);var qr={ArrayBuffer:_r,DataView:Er},Vr=qr.ArrayBuffer,Hr=qr.DataView,Kr=Hr.prototype,Wr=Ge(Vr.prototype.slice),Jr=Ge(Kr.getUint8),Xr=Ge(Kr.setUint8),$r=s(function(){return!new Vr(2).slice(1,void 0).byteLength});Le({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:$r},{slice:function(t,e){if(Wr&&void 0===e)return Wr(Dt(this),t);for(var n=Dt(this).byteLength,i=fe(t,n),r=fe(void 0===e?n:e,n),o=new Vr(pe(r-i)),s=new Hr(this),a=new Hr(o),c=0;i<r;)Xr(a,c++,Jr(s,i++));return o}});var Yr=Date,Zr=y(Yr.prototype.getTime);Le({target:"Date",stat:!0},{now:function(){return Zr(new Yr)}});var Qr=Date.prototype,to="Invalid Date",eo="toString",no=y(Qr[eo]),io=y(Qr.getTime);String(new Date(NaN))!==to&&oe(Qr,eo,function(){var t=io(this);return t==t?no(this):to});var ro=jt.EXISTS,oo=Function.prototype,so=y(oo.toString),ao=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,co=y(ao.exec);a&&!ro&&qi(oo,"name",{configurable:!0,get:function(){try{return co(ao,so(this))[1]}catch(t){return""}}});var uo=Se.f,ho="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],lo={f:function(t){return ho&&"Window"===w(t)?function(t){try{return uo(t)}catch(t){return Gi(ho)}}(t):uo(O(t))}},fo=s(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),po=Object.isExtensible,go=s(function(){po(1)})||fo?function(t){return!!R(t)&&((!fo||"ArrayBuffer"!==w(t))&&(!po||po(t)))}:po,vo=!s(function(){return Object.isExtensible(Object.preventExtensions({}))}),mo=e(function(t){var e=Lt.f,n=!1,i=lt("meta"),r=0,o=function(t){e(t,i,{value:{objectID:"O"+r++,weakData:{}}})},s=t.exports={enable:function(){s.enable=function(){},n=!0;var t=Se.f,e=y([].splice),r={};r[i]=1,t(r).length&&(Se.f=function(n){for(var r=t(n),o=0,s=r.length;o<s;o++)if(r[o]===i){e(r,o,1);break}return r},Le({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:lo.f}))},fastKey:function(t,e){if(!R(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!at(t,i)){if(!go(t))return"F";if(!e)return"E";o(t)}return t[i].objectID},getWeakData:function(t,e){if(!at(t,i)){if(!go(t))return!0;if(!e)return!1;o(t)}return t[i].weakData},onFreeze:function(t){return vo&&n&&go(t)&&!at(t,i)&&o(t),t}};Yt[i]=!0});mo.enable,mo.fastKey,mo.getWeakData,mo.onFreeze;var yo=gt("iterator"),bo=Array.prototype,_o=function(t){return void 0!==t&&(Pn.Array===t||bo[yo]===t)},wo=gt("iterator"),Eo=Array.prototype,So=function(t){if(!A(t))return Y(t,wo)||Y(t,"@@iterator")||("Arguments"===w(t)?Eo[wo]:void 0)},To=TypeError,Ao=function(t,e){var n=arguments.length<2?So(t):e;if(I(n))return Dt(h(n,t));throw new To(J(t)+" is not iterable")},ko=function(t,e,n){var i,r;Dt(t);try{if(!(i=Y(t,"return"))){if("throw"===e)throw n;return n}i=h(i,t)}catch(t){r=!0,i=t}if("throw"===e)throw n;if(r)throw i;return Dt(i),n},xo=TypeError,Oo=function(t,e){this.stopped=t,this.result=e},Do=Oo.prototype,Io=function(t,e,n){var i,r,o,s,a,c,u,l=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),g=!(!n||!n.INTERRUPTED),v=Ue(e,l),m=function(t){var e=i;return i=void 0,e&&ko(e,"normal"),new Oo(!0,t)},y=function(t){return f?(Dt(t),g?v(t[0],t[1],m):v(t[0],t[1])):g?v(t,m):v(t)};if(d)i=t.iterator;else if(p)i=t;else{if(!(r=So(t)))throw new xo(J(t)+" is not iterable");if(_o(r)){for(o=0,s=ge(t);s>o;o++)if((a=y(t[o]))&&C(Do,a))return a;return new Oo(!1)}i=Ao(t,r)}for(c=d?t.next:i.next;!(u=h(c,i)).done;){var b=u.value;try{a=y(b)}catch(t){if(!i)throw t;ko(i,"throw",t)}if("object"==typeof a&&a&&C(Do,a))return a}return new Oo(!1)},Ro=gt("iterator"),Mo=!1;try{var Co=0,Bo={next:function(){return{done:!!Co++}},return:function(){Mo=!0}};Bo[Ro]=function(){return this},Array.from(Bo,function(){throw 2})}catch(t){}var Po=function(t,e){try{if(!e&&!Mo)return!1}catch(t){return!1}var n=!1;try{var i={};i[Ro]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n},Lo=function(t,e,n){var i=-1!==t.indexOf("Map"),r=-1!==t.indexOf("Weak"),a=i?"set":"add",c=o[t],u=c&&c.prototype,h=c,l={},f=function(t){var e=y(u[t]);oe(u,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(r&&!R(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return r&&!R(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(r&&!R(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(Be(t,!I(c)||!(r||u.forEach&&!s(function(){(new c).entries().next()}))))h=n.getConstructor(e,t,i,a),mo.enable();else if(Be(t,!0)){var d=new h,p=d[a](r?{}:-0,1)!==d,g=s(function(){d.has(1)}),v=Po(function(t){new c(t)}),m=!r&&s(function(){for(var t=new c,e=5;e--;)t[a](e,e);return!t.has(-0)});v||((h=e(function(t,e){Ki(t,u);var n=ur(new c,t,h);return A(e)||Io(e,n[a],{that:n,AS_ENTRIES:i}),n})).prototype=u,u.constructor=h),(g||m)&&(f("delete"),f("has"),i&&f("get")),(m||p)&&f(a),r&&u.clear&&delete u.clear}return l[t]=h,Le({global:!0,constructor:!0,forced:h!==c},l),Wn(h,t),r||n.setStrong(h,t,i),h},Go=gt("species"),No=function(t){var e=M(t);a&&e&&!e[Go]&&qi(e,Go,{configurable:!0,get:function(){return this}})},Uo=mo.fastKey,Fo=ie.set,jo=ie.getterFor,zo={getConstructor:function(t,e,n,i){var r=t(function(t,r){Ki(t,o),Fo(t,{type:e,index:xn(null),first:null,last:null,size:0}),a||(t.size=0),A(r)||Io(r,t[i],{that:t,AS_ENTRIES:n})}),o=r.prototype,s=jo(e),c=function(t,e,n){var i,r,o=s(t),c=u(t,e);return c?c.value=n:(o.last=c={index:r=Uo(e,!0),key:e,value:n,previous:i=o.last,next:null,removed:!1},o.first||(o.first=c),i&&(i.next=c),a?o.size++:t.size++,"F"!==r&&(o.index[r]=c)),t},u=function(t,e){var n,i=s(t),r=Uo(e);if("F"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key===e)return n};return Vi(o,{clear:function(){for(var t=s(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=xn(null),a?t.size=0:this.size=0},delete:function(t){var e=this,n=s(e),i=u(e,t);if(i){var r=i.next,o=i.previous;delete n.index[i.index],i.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first===i&&(n.first=r),n.last===i&&(n.last=o),a?n.size--:e.size--}return!!i},forEach:function(t){for(var e,n=s(this),i=Ue(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(i(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),Vi(o,n?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return c(this,0===t?0:t,e)}}:{add:function(t){return c(this,t=0===t?0:t,t)}}),a&&qi(o,"size",{configurable:!0,get:function(){return s(this).size}}),r},setStrong:function(t,e,n){var i=e+" Iterator",r=jo(e),o=jo(i);li(t,e,function(t,e){Fo(this,{type:i,target:t,state:r(t),kind:e,last:null})},function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?fi("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=null,fi(void 0,!0))},n?"entries":"values",!n,!0),No(e)}};Lo("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},zo);var qo=Object.assign,Vo=Object.defineProperty,Ho=y([].concat),Ko=!qo||s(function(){if(a&&1!==qo({b:1},qo(Vo({},"a",{enumerable:!0,get:function(){Vo(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!==qo({},t)[n]||vn(qo({},e)).join("")!==i})?function(t,e){for(var n=ot(t),i=arguments.length,r=1,o=Te.f,s=d.f;i>r;)for(var c,u=T(arguments[r++]),l=o?Ho(vn(u),o(u)):vn(u),f=l.length,p=0;f>p;)c=l[p++],a&&!h(s,u,c)||(n[c]=u[c]);return n}:qo;Le({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ko},{assign:Ko});var Wo=ze?{}.toString:function(){return"[object "+Ke(this)+"]"};ze||oe(Object.prototype,"toString",Wo,{unsafe:!0});var Jo,Xo,$o,Yo,Zo=o,Qo=TypeError,ts=function(t){if(tn(t))return t;throw new Qo(J(t)+" is not a constructor")},es=gt("species"),ns=function(t,e){var n,i=Dt(t).constructor;return void 0===i||A(n=Dt(i)[es])?e:ts(n)},is=Function.prototype,rs=is.apply,os=is.call,ss="object"==typeof Reflect&&Reflect.apply||(c?os.bind(rs):function(){return os.apply(rs,arguments)}),as=TypeError,cs=function(t,e){if(t<e)throw new as("Not enough arguments");return t},us=/ipad|iphone|ipod/i.test(L)&&/applewebkit/i.test(L),hs=o.setImmediate,ls=o.clearImmediate,fs=o.process,ds=o.Dispatch,ps=o.Function,gs=o.MessageChannel,vs=o.String,ms=0,ys={},bs="onreadystatechange";s(function(){Jo=o.location});var _s=function(t){if(at(ys,t)){var e=ys[t];delete ys[t],e()}},ws=function(t){return function(){_s(t)}},Es=function(t){_s(t.data)},Ss=function(t){o.postMessage(vs(t),Jo.protocol+"//"+Jo.host)};hs&&ls||(hs=function(t){cs(arguments.length,1);var e=I(t)?t:ps(t),n=Gi(arguments,1);return ys[++ms]=function(){ss(e,void 0,n)},Xo(ms),ms},ls=function(t){delete ys[t]},xi?Xo=function(t){fs.nextTick(ws(t))}:ds&&ds.now?Xo=function(t){ds.now(ws(t))}:gs&&!us?(Yo=($o=new gs).port2,$o.port1.onmessage=Es,Xo=Ue(Yo.postMessage,Yo)):o.addEventListener&&I(o.postMessage)&&!o.importScripts&&Jo&&"file:"!==Jo.protocol&&!s(Ss)?(Xo=Ss,o.addEventListener("message",Es,!1)):Xo=bs in Et("script")?function(t){bn.appendChild(Et("script"))[bs]=function(){bn.removeChild(this),_s(t)}}:function(t){setTimeout(ws(t),0)});var Ts={set:hs,clear:ls},As=Object.getOwnPropertyDescriptor,ks=function(t){if(!a)return o[t];var e=As(o,t);return e&&e.value},xs=function(){this.head=null,this.tail=null};xs.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Os,Ds,Is,Rs,Ms,Cs=xs,Bs=/ipad|iphone|ipod/i.test(L)&&"undefined"!=typeof Pebble,Ps=/web0s(?!.*chrome)/i.test(L),Ls=Ts.set,Gs=o.MutationObserver||o.WebKitMutationObserver,Ns=o.document,Us=o.process,Fs=o.Promise,js=ks("queueMicrotask");if(!js){var zs=new Cs,qs=function(){var t,e;for(xi&&(t=Us.domain)&&t.exit();e=zs.get();)try{e()}catch(t){throw zs.head&&Os(),t}t&&t.enter()};us||xi||Ps||!Gs||!Ns?!Bs&&Fs&&Fs.resolve?((Rs=Fs.resolve(void 0)).constructor=Fs,Ms=Ue(Rs.then,Rs),Os=function(){Ms(qs)}):xi?Os=function(){Us.nextTick(qs)}:(Ls=Ue(Ls,o),Os=function(){Ls(qs)}):(Ds=!0,Is=Ns.createTextNode(""),new Gs(qs).observe(Is,{characterData:!0}),Os=function(){Is.data=Ds=!Ds}),js=function(t){zs.head||Os(),zs.add(t)}}var Vs=js,Hs=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ks=o.Promise;Ks&&Ks.prototype;var Ws,Js,Xs,$s,Ys=gt("species"),Zs=!1,Qs=I(o.PromiseRejectionEvent),ta=Be("Promise",function(){var t=Kt(Ks),e=t!==String(Ks);if(!e&&66===j)return!0;if(!j||j<51||!/native code/.test(t)){var n=new Ks(function(t){t(1)}),i=function(t){t(function(){},function(){})};if((n.constructor={})[Ys]=i,!(Zs=n.then(function(){})instanceof i))return!0}return!(e||"BROWSER"!==ki&&"DENO"!==ki||Qs)}),ea={CONSTRUCTOR:ta,REJECTION_EVENT:Qs,SUBCLASSING:Zs},na=TypeError,ia=function(t){var e,n;this.promise=new t(function(t,i){if(void 0!==e||void 0!==n)throw new na("Bad Promise constructor");e=t,n=i}),this.resolve=$(e),this.reject=$(n)},ra={f:function(t){return new ia(t)}},oa=Ts.set,sa="Promise",aa=ea.CONSTRUCTOR,ca=ea.REJECTION_EVENT,ua=ea.SUBCLASSING,ha=ie.getterFor(sa),la=ie.set,fa=Ks&&Ks.prototype,da=Ks,pa=fa,ga=o.TypeError,va=o.document,ma=o.process,ya=ra.f,ba=ya,_a=!!(va&&va.createEvent&&o.dispatchEvent),wa="unhandledrejection",Ea=function(t){var e;return!(!R(t)||!I(e=t.then))&&e},Sa=function(t,e){var n,i,r,o=e.value,s=1===e.state,a=s?t.ok:t.fail,c=t.resolve,u=t.reject,l=t.domain;try{a?(s||(2===e.rejection&&Oa(e),e.rejection=1),!0===a?n=o:(l&&l.enter(),n=a(o),l&&(l.exit(),r=!0)),n===t.promise?u(new ga("Promise-chain cycle")):(i=Ea(n))?h(i,n,c,u):c(n)):u(o)}catch(t){l&&!r&&l.exit(),u(t)}},Ta=function(t,e){t.notified||(t.notified=!0,Vs(function(){for(var n,i=t.reactions;n=i.get();)Sa(n,t);t.notified=!1,e&&!t.rejection&&ka(t)}))},Aa=function(t,e,n){var i,r;_a?((i=va.createEvent("Event")).promise=e,i.reason=n,i.initEvent(t,!1,!0),o.dispatchEvent(i)):i={promise:e,reason:n},!ca&&(r=o["on"+t])?r(i):t===wa&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},ka=function(t){h(oa,o,function(){var e,n=t.facade,i=t.value;if(xa(t)&&(e=Hs(function(){xi?ma.emit("unhandledRejection",i,n):Aa(wa,n,i)}),t.rejection=xi||xa(t)?2:1,e.error))throw e.value})},xa=function(t){return 1!==t.rejection&&!t.parent},Oa=function(t){h(oa,o,function(){var e=t.facade;xi?ma.emit("rejectionHandled",e):Aa("rejectionhandled",e,t.value)})},Da=function(t,e,n){return function(i){t(e,i,n)}},Ia=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Ta(t,!0))},Ra=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new ga("Promise can't be resolved itself");var i=Ea(e);i?Vs(function(){var n={done:!1};try{h(i,e,Da(Ra,n,t),Da(Ia,n,t))}catch(e){Ia(n,e,t)}}):(t.value=e,t.state=1,Ta(t,!1))}catch(e){Ia({done:!1},e,t)}}};if(aa&&(pa=(da=function(t){Ki(this,pa),$(t),h(Ws,this);var e=ha(this);try{t(Da(Ra,e),Da(Ia,e))}catch(t){Ia(e,t)}}).prototype,(Ws=function(t){la(this,{type:sa,done:!1,notified:!1,parent:!1,reactions:new Cs,rejection:!1,state:0,value:null})}).prototype=oe(pa,"then",function(t,e){var n=ha(this),i=ya(ns(this,da));return n.parent=!0,i.ok=!I(t)||t,i.fail=I(e)&&e,i.domain=xi?ma.domain:void 0,0===n.state?n.reactions.add(i):Vs(function(){Sa(i,n)}),i.promise}),Js=function(){var t=new Ws,e=ha(t);this.promise=t,this.resolve=Da(Ra,e),this.reject=Da(Ia,e)},ra.f=ya=function(t){return t===da||t===Xs?new Js(t):ba(t)},I(Ks)&&fa!==Object.prototype)){$s=fa.then,ua||oe(fa,"then",function(t,e){var n=this;return new da(function(t,e){h($s,n,t,e)}).then(t,e)},{unsafe:!0});try{delete fa.constructor}catch(t){}ei&&ei(fa,pa)}Le({global:!0,constructor:!0,wrap:!0,forced:aa},{Promise:da}),Xs=Zo.Promise,Wn(da,sa,!1),No(sa);var Ma=ea.CONSTRUCTOR||!Po(function(t){Ks.all(t).then(void 0,function(){})});Le({target:"Promise",stat:!0,forced:Ma},{all:function(t){var e=this,n=ra.f(e),i=n.resolve,r=n.reject,o=Hs(function(){var n=$(e.resolve),o=[],s=0,a=1;Io(t,function(t){var c=s++,u=!1;a++,h(n,e,t).then(function(t){u||(u=!0,o[c]=t,--a||i(o))},r)}),--a||i(o)});return o.error&&r(o.value),n.promise}});var Ca=ea.CONSTRUCTOR,Ba=Ks&&Ks.prototype;if(Le({target:"Promise",proto:!0,forced:Ca,real:!0},{catch:function(t){return this.then(void 0,t)}}),I(Ks)){var Pa=M("Promise").prototype.catch;Ba.catch!==Pa&&oe(Ba,"catch",Pa,{unsafe:!0})}Le({target:"Promise",stat:!0,forced:Ma},{race:function(t){var e=this,n=ra.f(e),i=n.reject,r=Hs(function(){var r=$(e.resolve);Io(t,function(t){h(r,e,t).then(n.resolve,i)})});return r.error&&i(r.value),n.promise}}),Le({target:"Promise",stat:!0,forced:ea.CONSTRUCTOR},{reject:function(t){var e=ra.f(this);return(0,e.reject)(t),e.promise}});var La=ea.CONSTRUCTOR;M("Promise"),Le({target:"Promise",stat:!0,forced:La},{resolve:function(t){return function(t,e){if(Dt(t),R(e)&&e.constructor===t)return e;var n=ra.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Ga=String,Na=function(t){if("Symbol"===Ke(t))throw new TypeError("Cannot convert a Symbol value to a string");return Ga(t)},Ua=function(){var t=Dt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Fa=o.RegExp,ja=s(function(){var t=Fa("a","y");return t.lastIndex=2,null!==t.exec("abcd")}),za=ja||s(function(){return!Fa("a","y").sticky}),qa={BROKEN_CARET:ja||s(function(){var t=Fa("^r","gy");return t.lastIndex=2,null!==t.exec("str")}),MISSED_STICKY:za,UNSUPPORTED_Y:ja},Va=o.RegExp,Ha=s(function(){var t=Va(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}),Ka=o.RegExp,Wa=s(function(){var t=Ka("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}),Ja=ie.get,Xa=it("native-string-replace",String.prototype.replace),$a=RegExp.prototype.exec,Ya=$a,Za=y("".charAt),Qa=y("".indexOf),tc=y("".replace),ec=y("".slice),nc=function(){var t=/a/,e=/b*/g;return h($a,t,"a"),h($a,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),ic=qa.BROKEN_CARET,rc=void 0!==/()??/.exec("")[1],oc=function(t,e){for(var n=t.groups=xn(null),i=0;i<e.length;i++){var r=e[i];n[r[0]]=t[r[1]]}};(nc||rc||ic||Ha||Wa)&&(Ya=function(t){var e,n,i,r=this,o=Ja(r),s=Na(t),a=o.raw;if(a)return a.lastIndex=r.lastIndex,e=h(Ya,a,s),r.lastIndex=a.lastIndex,e&&o.groups&&oc(e,o.groups),e;var c=o.groups,u=ic&&r.sticky,l=h(Ua,r),f=r.source,d=0,p=s;if(u){l=tc(l,"y",""),-1===Qa(l,"g")&&(l+="g"),p=ec(s,r.lastIndex);var g=r.lastIndex>0&&Za(s,r.lastIndex-1);r.lastIndex>0&&(!r.multiline||r.multiline&&"\n"!==g&&"\r"!==g&&"\u2028"!==g&&"\u2029"!==g)&&(f="(?: (?:"+f+"))",p=" "+p,d++),n=new RegExp("^(?:"+f+")",l)}rc&&(n=new RegExp("^"+f+"$(?!\\s)",l)),nc&&(i=r.lastIndex);var v=h($a,u?n:r,p);return u?v?(v.input=s,v[0]=ec(v[0],d),v.index=r.lastIndex,r.lastIndex+=v[0].length):r.lastIndex=0:nc&&v&&(r.lastIndex=r.global?v.index+v[0].length:i),rc&&v&&v.length>1&&h(Xa,v[0],n,function(){for(var t=1;t<arguments.length-2;t++)void 0===arguments[t]&&(v[t]=void 0)}),v&&c&&oc(v,c),v});var sc=Ya;Le({target:"RegExp",proto:!0,forced:/./.exec!==sc},{exec:sc});var ac=y("".charAt),cc=y("".charCodeAt),uc=y("".slice),hc=function(t){return function(e,n){var i,r,o=Na(x(e)),s=ue(n),a=o.length;return s<0||s>=a?t?"":void 0:(i=cc(o,s))<55296||i>56319||s+1===a||(r=cc(o,s+1))<56320||r>57343?t?ac(o,s):i:t?uc(o,s,s+2):r-56320+(i-55296<<10)+65536}},lc={codeAt:hc(!1),charAt:hc(!0)},fc=lc.charAt,dc="String Iterator",pc=ie.set,gc=ie.getterFor(dc);li(String,"String",function(t){pc(this,{type:dc,string:Na(t),index:0})},function(){var t,e=gc(this),n=e.string,i=e.index;return i>=n.length?fi(void 0,!0):(t=fc(n,i),e.index+=t.length,fi(t,!1))});var vc=gt("species"),mc=RegExp.prototype,yc=function(t,e,n,i){var r=gt(t),o=!s(function(){var e={};return e[r]=function(){return 7},7!==""[t](e)}),a=o&&!s(function(){var e=!1,n=/a/;if("split"===t){var i={};i[vc]=function(){return n},(n={constructor:i,flags:""})[r]=/./[r]}return n.exec=function(){return e=!0,null},n[r](""),!e});if(!o||!a||n){var c=/./[r],u=e(r,""[t],function(t,e,n,i,r){var s=e.exec;return s===sc||s===mc.exec?o&&!r?{done:!0,value:h(c,e,n,i)}:{done:!0,value:h(t,n,e,i)}:{done:!1}});oe(String.prototype,t,u[0]),oe(mc,r,u[1])}i&&Gt(mc[r],"sham",!0)},bc=lc.charAt,_c=function(t,e,n){return e+(n&&bc(t,e).length||1)},wc=o.RegExp,Ec=!s(function(){var t=!0;try{wc(".","d")}catch(e){t=!1}var e={},n="",i=t?"dgimsy":"gimsy",r=function(t,i){Object.defineProperty(e,t,{get:function(){return n+=i,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(o.hasIndices="d"),o)r(s,o[s]);return Object.getOwnPropertyDescriptor(wc.prototype,"flags").get.call(e)!==i||n!==i}),Sc=Ec,Tc=RegExp.prototype,Ac=Sc?function(t){return t.flags}:function(t){return Sc||!C(Tc,t)||at(t,"flags")?t.flags:h(Ua,t)},kc=TypeError,xc=function(t,e){var n=t.exec;if(I(n)){var i=h(n,t,e);return null!==i&&Dt(i),i}if("RegExp"===w(t))return h(sc,t,e);throw new kc("RegExp#exec called on incompatible receiver")},Oc=qa.UNSUPPORTED_Y,Dc=Math.min,Ic=y([].push),Rc=y("".slice),Mc=y("".indexOf),Cc=!s(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]}),Bc="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;yc("split",function(t,e,n){var i="0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:h(e,this,t,n)}:e;return[function(e,n){var r=x(this),o=R(e)?Y(e,t):void 0;return o?h(o,e,r,n):h(i,Na(r),e,n)},function(t,r){var o=Dt(this),s=Na(t);if(!Bc){var a=n(i,o,s,r,i!==e);if(a.done)return a.value}var c=ns(o,RegExp),u=Na(Ac(o)),h=!!~Mc(u,"u")||!!~Mc(u,"v");Oc?~Mc(u,"g")||(u+="g"):~Mc(u,"y")||(u+="y");var l=new c(Oc?"^(?:"+o.source+")":o,u),f=void 0===r?4294967295:r>>>0;if(0===f)return[];if(0===s.length)return null===xc(l,s)?[s]:[];for(var d=0,p=0,g=[];p<s.length;){l.lastIndex=Oc?0:p;var v,m=xc(l,Oc?Rc(s,p):s);if(null===m||(v=Dc(pe(l.lastIndex+(Oc?p:0)),s.length))===d)p=_c(s,p,h);else{if(Ic(g,Rc(s,d,p)),g.length===f)return g;for(var y=1;y<=m.length-1;y++)if(Ic(g,m[y]),g.length===f)return g;p=d=v}}return Ic(g,Rc(s,d)),g}]},Bc||!Cc,Oc);var Pc,Lc="\t\n\v\f\r                 \u2028\u2029\ufeff",Gc=y("".replace),Nc=RegExp("^["+Lc+"]+"),Uc=RegExp("(^|[^"+Lc+"])["+Lc+"]+$"),Fc=function(t){return function(e){var n=Na(x(e));return 1&t&&(n=Gc(n,Nc,"")),2&t&&(n=Gc(n,Uc,"$1")),n}},jc={start:Fc(1),end:Fc(2),trim:Fc(3)},zc=jt.PROPER,qc=jc.trim;Le({target:"String",proto:!0,forced:(Pc="trim",s(function(){return!!Lc[Pc]()||"​…᠎"!=="​…᠎"[Pc]()||zc&&Lc[Pc].name!==Pc}))},{trim:function(){return qc(this)}});var Vc,Hc,Kc,Wc=ie.enforce,Jc=ie.get,Xc=o.Int8Array,$c=Xc&&Xc.prototype,Yc=o.Uint8ClampedArray,Zc=Yc&&Yc.prototype,Qc=Xc&&Fn(Xc),tu=$c&&Fn($c),eu=Object.prototype,nu=o.TypeError,iu=gt("toStringTag"),ru=lt("TYPED_ARRAY_TAG"),ou="TypedArrayConstructor",su=zi&&!!ei&&"Opera"!==Ke(o.opera),au=!1,cu={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},uu={BigInt64Array:8,BigUint64Array:8},hu=function(t){var e=Fn(t);if(R(e)){var n=Jc(e);return n&&at(n,ou)?n[ou]:hu(e)}},lu=function(t){if(!R(t))return!1;var e=Ke(t);return at(cu,e)||at(uu,e)};for(Vc in cu)(Kc=(Hc=o[Vc])&&Hc.prototype)?Wc(Kc)[ou]=Hc:su=!1;for(Vc in uu)(Kc=(Hc=o[Vc])&&Hc.prototype)&&(Wc(Kc)[ou]=Hc);if((!su||!I(Qc)||Qc===Function.prototype)&&(Qc=function(){throw new nu("Incorrect invocation")},su))for(Vc in cu)o[Vc]&&ei(o[Vc],Qc);if((!su||!tu||tu===eu)&&(tu=Qc.prototype,su))for(Vc in cu)o[Vc]&&ei(o[Vc].prototype,tu);if(su&&Fn(Zc)!==tu&&ei(Zc,tu),a&&!at(tu,iu))for(Vc in au=!0,qi(tu,iu,{configurable:!0,get:function(){return R(this)?this[ru]:void 0}}),cu)o[Vc]&&Gt(o[Vc].prototype,ru,Vc);var fu={NATIVE_ARRAY_BUFFER_VIEWS:su,TYPED_ARRAY_TAG:au&&ru,aTypedArray:function(t){if(lu(t))return t;throw new nu("Target is not a typed array")},aTypedArrayConstructor:function(t){if(I(t)&&(!ei||C(Qc,t)))return t;throw new nu(J(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,i){if(a){if(n)for(var r in cu){var s=o[r];if(s&&at(s.prototype,t))try{delete s.prototype[t]}catch(n){try{s.prototype[t]=e}catch(t){}}}tu[t]&&!n||oe(tu,t,n?e:su&&$c[t]||e,i)}},exportTypedArrayStaticMethod:function(t,e,n){var i,r;if(a){if(ei){if(n)for(i in cu)if((r=o[i])&&at(r,t))try{delete r[t]}catch(t){}if(Qc[t]&&!n)return;try{return oe(Qc,t,n?e:su&&Qc[t]||e)}catch(t){}}for(i in cu)!(r=o[i])||r[t]&&!n||oe(r,t,e)}},getTypedArrayConstructor:hu,isView:function(t){if(!R(t))return!1;var e=Ke(t);return"DataView"===e||at(cu,e)||at(uu,e)},isTypedArray:lu,TypedArray:Qc,TypedArrayPrototype:tu},du=fu.NATIVE_ARRAY_BUFFER_VIEWS,pu=o.ArrayBuffer,gu=o.Int8Array,vu=!du||!s(function(){gu(1)})||!s(function(){new gu(-1)})||!Po(function(t){new gu,new gu(null),new gu(1.5),new gu(t)},!0)||s(function(){return 1!==new gu(new pu(2),1,void 0).length}),mu=Math.floor,yu=Number.isInteger||function(t){return!R(t)&&isFinite(t)&&mu(t)===t},bu=RangeError,_u=RangeError,wu=function(t,e){var n=function(t){var e=ue(t);if(e<0)throw new bu("The argument can't be less than 0");return e}(t);if(n%e)throw new _u("Wrong offset");return n},Eu=Math.floor,Su=TypeError,Tu=function(t){var e=yt(t,"number");if("number"==typeof e)throw new Su("Can't convert number to bigint");return BigInt(e)},Au=fu.aTypedArrayConstructor,ku=function(t){var e=ts(this),n=arguments.length,i=n>1?arguments[1]:void 0,r=void 0!==i;r&&$(i);var o,s,a,c,u,l,f,d,p,g=ot(t),v=So(g);if(v&&!_o(v))for(d=(f=Ao(g,v)).next,g=[];!(l=h(d,f)).done;)g.push(l.value);for(r&&n>2&&(i=Ue(i,arguments[2])),s=ge(g),a=new(Au(e))(s),c="BigInt64Array"===(p=Ke(a))||"BigUint64Array"===p,o=0;s>o;o++)u=r?i(g[o],o):g[o],a[o]=c?Tu(u):+u;return a},xu=function(t,e,n){for(var i=0,r=arguments.length>2?n:ge(e),o=new t(r);r>i;)o[i]=e[i++];return o},Ou=e(function(t){var e=Se.f,n=an.forEach,i=ie.get,r=ie.set,s=ie.enforce,c=Lt.f,u=At.f,l=o.RangeError,f=qr.ArrayBuffer,d=f.prototype,g=qr.DataView,v=fu.NATIVE_ARRAY_BUFFER_VIEWS,m=fu.TYPED_ARRAY_TAG,y=fu.TypedArray,b=fu.TypedArrayPrototype,_=fu.isTypedArray,w="BYTES_PER_ELEMENT",E="Wrong length",S=function(t,e){qi(t,e,{configurable:!0,get:function(){return i(this)[e]}})},T=function(t){var e;return C(d,t)||"ArrayBuffer"===(e=Ke(t))||"SharedArrayBuffer"===e},A=function(t,e){return _(t)&&!K(e)&&e in t&&yu(+e)&&e>=0},k=function(t,e){return e=bt(e),A(t,e)?p(2,t[e]):u(t,e)},x=function(t,e,n){return e=bt(e),!(A(t,e)&&R(n)&&at(n,"value"))||at(n,"get")||at(n,"set")||n.configurable||at(n,"writable")&&!n.writable||at(n,"enumerable")&&!n.enumerable?c(t,e,n):(t[e]=n.value,t)};a?(v||(At.f=k,Lt.f=x,S(b,"buffer"),S(b,"byteOffset"),S(b,"byteLength"),S(b,"length")),Le({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:k,defineProperty:x}),t.exports=function(t,a,u){var d=t.match(/\d+/)[0]/8,p=t+(u?"Clamped":"")+"Array",S="get"+t,A="set"+t,k=o[p],x=k,O=x&&x.prototype,D={},I=function(t,e,n){var r=i(t);r.view[A](e*d+r.byteOffset,u?function(t){var e=+t;if(e!=e||e<=0)return 0;if(e>=255)return 255;var n=Eu(e);return n+.5<e?n+1:e<n+.5||n%2==0?n:n+1}(n):n,!0)},M=function(t,e){c(t,e,{get:function(){return function(t,e){var n=i(t);return n.view[S](e*d+n.byteOffset,!0)}(this,e)},set:function(t){return I(this,e,t)},enumerable:!0})};v?vu&&(x=a(function(t,e,n,i){return Ki(t,O),ur(R(e)?T(e)?void 0!==i?new k(e,wu(n,d),i):void 0!==n?new k(e,wu(n,d)):new k(e):_(e)?xu(x,e):h(ku,x,e):new k(Ji(e)),t,x)}),ei&&ei(x,y),n(e(k),function(t){t in x||Gt(x,t,k[t])}),x.prototype=O):(x=a(function(t,e,n,i){Ki(t,O);var o,s,a,c=0,u=0;if(R(e)){if(!T(e))return _(e)?xu(x,e):h(ku,x,e);o=e,u=wu(n,d);var p=e.byteLength;if(void 0===i){if(p%d)throw new l(E);if((s=p-u)<0)throw new l(E)}else if((s=Ji(i)*d)+u>p)throw new l(E);a=s/d}else a=Ji(e),o=new f(s=a*d);for(r(t,{buffer:o,byteOffset:u,byteLength:s,length:a,view:new g(o)});c<a;)M(t,c++)}),ei&&ei(x,y),O=x.prototype=xn(b)),O.constructor!==x&&Gt(O,"constructor",x),s(O).TypedArrayConstructor=x,m&&Gt(O,m,p);var C=x!==k;D[p]=x,Le({global:!0,constructor:!0,forced:C,sham:!v},D),w in x||Gt(x,w,d),w in O||Gt(O,w,d),No(p)}):t.exports=function(){}});Ou("Uint8",function(t){return function(e,n,i){return t(this,e,n,i)}});var Du=TypeError,Iu=function(t,e){if(!delete t[e])throw new Du("Cannot delete property "+J(e)+" of "+J(t))},Ru=Math.min,Mu=y([].copyWithin||function(t,e){var n=ot(this),i=ge(n),r=fe(t,i),o=fe(e,i),s=arguments.length>2?arguments[2]:void 0,a=Ru((void 0===s?i:fe(s,i))-o,i-r),c=1;for(o<r&&r<o+a&&(c=-1,o+=a-1,r+=a-1);a-- >0;)o in n?n[r]=n[o]:Iu(n,r),r+=c,o+=c;return n}),Cu=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("copyWithin",function(t,e){return Mu(Cu(this),t,e,arguments.length>2?arguments[2]:void 0)});var Bu=an.every,Pu=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("every",function(t){return Bu(Pu(this),t,arguments.length>1?arguments[1]:void 0)});var Lu=fu.aTypedArray,Gu=fu.exportTypedArrayMethod,Nu=y("".slice);Gu("fill",function(t){var e=arguments.length;Lu(this);var n="Big"===Nu(Ke(this),0,3)?Tu(t):+t;return h(cr,this,n,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)},s(function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t}));var Uu=fu.getTypedArrayConstructor,Fu=function(t,e){return xu(Uu(t),e)},ju=an.filter,zu=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("filter",function(t){var e=ju(zu(this),t,arguments.length>1?arguments[1]:void 0);return Fu(this,e)});var qu=an.find,Vu=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("find",function(t){return qu(Vu(this),t,arguments.length>1?arguments[1]:void 0)});var Hu=an.findIndex,Ku=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("findIndex",function(t){return Hu(Ku(this),t,arguments.length>1?arguments[1]:void 0)});var Wu=an.forEach,Ju=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("forEach",function(t){Wu(Ju(this),t,arguments.length>1?arguments[1]:void 0)});var Xu=me.includes,$u=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("includes",function(t){return Xu($u(this),t,arguments.length>1?arguments[1]:void 0)});var Yu=me.indexOf,Zu=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("indexOf",function(t){return Yu(Zu(this),t,arguments.length>1?arguments[1]:void 0)});var Qu=gt("iterator"),th=o.Uint8Array,eh=y(mi.values),nh=y(mi.keys),ih=y(mi.entries),rh=fu.aTypedArray,oh=fu.exportTypedArrayMethod,sh=th&&th.prototype,ah=!s(function(){sh[Qu].call([1])}),ch=!!sh&&sh.values&&sh[Qu]===sh.values&&"values"===sh.values.name,uh=function(){return eh(rh(this))};oh("entries",function(){return ih(rh(this))},ah),oh("keys",function(){return nh(rh(this))},ah),oh("values",uh,ah||!ch,{name:"values"}),oh(Qu,uh,ah||!ch,{name:"values"});var hh=fu.aTypedArray,lh=fu.exportTypedArrayMethod,fh=y([].join);lh("join",function(t){return fh(hh(this),t)});var dh=Math.min,ph=[].lastIndexOf,gh=!!ph&&1/[1].lastIndexOf(1,-0)<0,vh=cn("lastIndexOf"),mh=gh||!vh?function(t){if(gh)return ss(ph,this,arguments)||0;var e=O(this),n=ge(e);if(0===n)return-1;var i=n-1;for(arguments.length>1&&(i=dh(i,ue(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in e&&e[i]===t)return i||0;return-1}:ph,yh=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("lastIndexOf",function(t){var e=arguments.length;return ss(mh,yh(this),e>1?[t,arguments[1]]:[t])});var bh=an.map,_h=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("map",function(t){var e=bh(_h(this),t,arguments.length>1?arguments[1]:void 0);return Fu(this,e)});var wh=Ti.left,Eh=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("reduce",function(t){var e=arguments.length;return wh(Eh(this),t,e,e>1?arguments[1]:void 0)});var Sh=Ti.right,Th=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("reduceRight",function(t){var e=arguments.length;return Sh(Th(this),t,e,e>1?arguments[1]:void 0)});var Ah=fu.aTypedArray,kh=fu.exportTypedArrayMethod,xh=Math.floor;kh("reverse",function(){for(var t,e=this,n=Ah(e).length,i=xh(n/2),r=0;r<i;)t=e[r],e[r++]=e[--n],e[n]=t;return e});var Oh=o.RangeError,Dh=o.Int8Array,Ih=Dh&&Dh.prototype,Rh=Ih&&Ih.set,Mh=fu.aTypedArray,Ch=fu.exportTypedArrayMethod,Bh=!s(function(){var t=new Uint8ClampedArray(2);return h(Rh,t,{length:1,0:3},1),3!==t[1]}),Ph=Bh&&fu.NATIVE_ARRAY_BUFFER_VIEWS&&s(function(){var t=new Dh(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]});Ch("set",function(t){Mh(this);var e=wu(arguments.length>1?arguments[1]:void 0,1),n=ot(t);if(Bh)return h(Rh,this,n,e);var i=this.length,r=ge(n),o=0;if(r+e>i)throw new Oh("Wrong length");for(;o<r;)this[e+o]=n[o++]},!Bh||Ph);var Lh=fu.aTypedArray,Gh=fu.getTypedArrayConstructor;(0,fu.exportTypedArrayMethod)("slice",function(t,e){for(var n=Gi(Lh(this),t,e),i=Gh(this),r=0,o=n.length,s=new i(o);o>r;)s[r]=n[r++];return s},s(function(){new Int8Array(1).slice()}));var Nh=an.some,Uh=fu.aTypedArray;(0,fu.exportTypedArrayMethod)("some",function(t){return Nh(Uh(this),t,arguments.length>1?arguments[1]:void 0)});var Fh=Math.floor,jh=function(t,e){var n=t.length;if(n<8)for(var i,r,o=1;o<n;){for(r=o,i=t[o];r&&e(t[r-1],i)>0;)t[r]=t[--r];r!==o++&&(t[r]=i)}else for(var s=Fh(n/2),a=jh(Gi(t,0,s),e),c=jh(Gi(t,s),e),u=a.length,h=c.length,l=0,f=0;l<u||f<h;)t[l+f]=l<u&&f<h?e(a[l],c[f])<=0?a[l++]:c[f++]:l<u?a[l++]:c[f++];return t},zh=jh,qh=L.match(/firefox\/(\d+)/i),Vh=!!qh&&+qh[1],Hh=/MSIE|Trident/.test(L),Kh=L.match(/AppleWebKit\/(\d+)\./),Wh=!!Kh&&+Kh[1],Jh=fu.aTypedArray,Xh=fu.exportTypedArrayMethod,$h=o.Uint16Array,Yh=$h&&Ge($h.prototype.sort),Zh=!(!Yh||s(function(){Yh(new $h(2),null)})&&s(function(){Yh(new $h(2),{})})),Qh=!!Yh&&!s(function(){if(j)return j<74;if(Vh)return Vh<67;if(Hh)return!0;if(Wh)return Wh<602;var t,e,n=new $h(516),i=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,i[t]=t-2*e+3;for(Yh(n,function(t,e){return(t/4|0)-(e/4|0)}),t=0;t<516;t++)if(n[t]!==i[t])return!0});Xh("sort",function(t){return void 0!==t&&$(t),Qh?Yh(this,t):zh(Jh(this),function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!=n?e!=e?0:-1:e!=e?1:0===e&&0===n?1/e>0?1/n>0?0:1:1/n>0?-1:0:e>n?1:e<n?-1:0}}(t))},!Qh||Zh);var tl=fu.aTypedArray,el=fu.getTypedArrayConstructor;(0,fu.exportTypedArrayMethod)("subarray",function(t,e){var n=tl(this),i=n.length,r=fe(t,i);return new(el(n))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,pe((void 0===e?i:fe(e,i))-r))});var nl=o.Int8Array,il=fu.aTypedArray,rl=fu.exportTypedArrayMethod,ol=[].toLocaleString,sl=!!nl&&s(function(){ol.call(new nl(1))});rl("toLocaleString",function(){return ss(ol,sl?Gi(il(this)):il(this),Gi(arguments))},s(function(){return[1,2].toLocaleString()!==new nl([1,2]).toLocaleString()})||!s(function(){nl.prototype.toLocaleString.call([1,2])}));var al=fu.exportTypedArrayMethod,cl=o.Uint8Array,ul=cl&&cl.prototype||{},hl=[].toString,ll=y([].join);s(function(){hl.call({})})&&(hl=function(){return ll(this)});var fl=ul.toString!==hl;al("toString",hl,fl);var dl=Map.prototype,pl={Map:Map,set:y(dl.set),get:y(dl.get),has:y(dl.has),remove:y(dl.delete),proto:dl},gl=pl.has,vl=function(t){return gl(t),t},ml=pl.remove;Le({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=vl(this),n=!0,i=0,r=arguments.length;i<r;i++)t=ml(e,arguments[i]),n=n&&t;return!!n}});var yl=function(t,e,n){for(var i,r,o=n?t:t.iterator,s=t.next;!(i=h(s,o)).done;)if(void 0!==(r=e(i.value)))return r},bl=pl.Map,_l=pl.proto,wl=y(_l.forEach),El=y(_l.entries),Sl=El(new bl).next,Tl=function(t,e,n){return n?yl({iterator:El(t),next:Sl},function(t){return e(t[1],t[0])}):wl(t,e)};Le({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=vl(this),n=Ue(t,arguments.length>1?arguments[1]:void 0);return!1!==Tl(e,function(t,i){if(!n(t,i,e))return!1},!0)}});var Al=pl.Map,kl=pl.set;Le({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=vl(this),n=Ue(t,arguments.length>1?arguments[1]:void 0),i=new Al;return Tl(e,function(t,r){n(t,r,e)&&kl(i,r,t)}),i}}),Le({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=vl(this),n=Ue(t,arguments.length>1?arguments[1]:void 0),i=Tl(e,function(t,i){if(n(t,i,e))return{value:t}},!0);return i&&i.value}}),Le({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=vl(this),n=Ue(t,arguments.length>1?arguments[1]:void 0),i=Tl(e,function(t,i){if(n(t,i,e))return{key:i}},!0);return i&&i.key}});Le({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===Tl(vl(this),function(e){if((n=e)===(i=t)||n!=n&&i!=i)return!0;var n,i},!0)}}),Le({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=Tl(vl(this),function(e,n){if(e===t)return{key:n}},!0);return e&&e.key}});var xl=pl.Map,Ol=pl.set;Le({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=vl(this),n=Ue(t,arguments.length>1?arguments[1]:void 0),i=new xl;return Tl(e,function(t,r){Ol(i,n(t,r,e),t)}),i}});var Dl=pl.Map,Il=pl.set;Le({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=vl(this),n=Ue(t,arguments.length>1?arguments[1]:void 0),i=new Dl;return Tl(e,function(t,r){Il(i,r,n(t,r,e))}),i}});var Rl=pl.set;Le({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=vl(this),n=arguments.length,i=0;i<n;)Io(arguments[i++],function(t,n){Rl(e,t,n)},{AS_ENTRIES:!0});return e}});var Ml=TypeError;Le({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=vl(this),n=arguments.length<2,i=n?void 0:arguments[1];if($(t),Tl(e,function(r,o){n?(n=!1,i=r):i=t(i,r,o,e)}),n)throw new Ml("Reduce of empty map with no initial value");return i}}),Le({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=vl(this),n=Ue(t,arguments.length>1?arguments[1]:void 0);return!0===Tl(e,function(t,i){if(n(t,i,e))return!0},!0)}});var Cl=TypeError,Bl=pl.get,Pl=pl.has,Ll=pl.set;Le({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var n=vl(this),i=arguments.length;$(e);var r=Pl(n,t);if(!r&&i<3)throw new Cl("Updating absent value");var o=r?Bl(n,t):$(i>2?arguments[2]:void 0)(t,n);return Ll(n,t,e(o,t,n)),n}});var Gl={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Nl=Et("span").classList,Ul=Nl&&Nl.constructor&&Nl.constructor.prototype,Fl=Ul===Object.prototype?void 0:Ul,jl=function(t){if(t&&t.forEach!==hn)try{Gt(t,"forEach",hn)}catch(e){t.forEach=hn}};for(var zl in Gl)Gl[zl]&&jl(o[zl]&&o[zl].prototype);jl(Fl);var ql=gt("iterator"),Vl=mi.values,Hl=function(t,e){if(t){if(t[ql]!==Vl)try{Gt(t,ql,Vl)}catch(e){t[ql]=Vl}if(Wn(t,e,!0),Gl[e])for(var n in mi)if(t[n]!==mi[n])try{Gt(t,n,mi[n])}catch(e){t[n]=mi[n]}}};for(var Kl in Gl)Hl(o[Kl]&&o[Kl].prototype,Kl);Hl(Fl,"DOMTokenList");var Wl=o.Function,Jl=/MSIE .\./.test(L)||"BUN"===ki&&function(){var t=o.Bun.version.split(".");return t.length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2])}(),Xl=function(t,e){var n=e?2:1;return Jl?function(i,r){var o=cs(arguments.length,1)>n,s=I(i)?i:Wl(i),a=o?Gi(arguments,n):[],c=o?function(){ss(s,this,a)}:s;return e?t(c,r):t(c)}:t},$l=Xl(o.setInterval,!0);Le({global:!0,bind:!0,forced:o.setInterval!==$l},{setInterval:$l});var Yl=Xl(o.setTimeout,!0);function Zl(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n;if("undefined"!=typeof Symbol&&void 0!==(n=t[Symbol.toPrimitive])){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Le({global:!0,bind:!0,forced:o.setTimeout!==Yl},{setTimeout:Yl});var Ql=TypeError,tf=function(t){if(t>9007199254740991)throw new Ql("Maximum allowed index exceeded");return t},ef=gt("isConcatSpreadable"),nf=j>=51||!s(function(){var t=[];return t[ef]=!1,t.concat()[0]!==t}),rf=function(t){if(!R(t))return!1;var e=t[ef];return void 0!==e?!!e:Fe(t)},of=!nf||!Li("concat");Le({target:"Array",proto:!0,arity:1,forced:of},{concat:function(t){var e,n,i,r,o,s=ot(this),a=rn(s,0),c=0;for(e=-1,i=arguments.length;e<i;e++)if(rf(o=-1===e?s:arguments[e]))for(r=ge(o),tf(c+r),n=0;n<r;n++,c++)n in o&&on(a,c,o[n]);else tf(c+1),on(a,c++,o);return Bi(a,c),a}});var sf=Li("splice"),af=Math.max,cf=Math.min;Le({target:"Array",proto:!0,forced:!sf},{splice:function(t,e){var n,i,r,o,s,a,c=ot(this),u=ge(c),h=fe(t,u),l=arguments.length;for(0===l?n=i=0:1===l?(n=0,i=u-h):(n=l-2,i=cf(af(ue(e),0),u-h)),tf(u+n-i),r=rn(c,i),o=0;o<i;o++)(s=h+o)in c&&on(r,o,c[s]);if(Bi(r,i),n<i){for(o=h;o<u-i;o++)a=o+n,(s=o+i)in c?c[a]=c[s]:Iu(c,a);for(o=u;o>u-i+n;o--)Iu(c,o-1)}else if(n>i)for(o=u-i;o>h;o--)a=o+n-1,(s=o+i-1)in c?c[a]=c[s]:Iu(c,a);for(o=0;o<n;o++)c[o+h]=arguments[o+2];return Bi(c,u-i+n),r}});var uf=function(){function t(){Zl(this,"_hooks",void 0),Zl(this,"_cache",void 0),Zl(this,"_hooksCache",void 0),this._hooks={},this._cache=[],this._hooksCache={}}var e=t.prototype;return e.on=function(t,e){t&&e&&"function"==typeof e&&(this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e))},e.once=function(t,e){var n=this;if(t&&e&&"function"==typeof e){var i=function(r){e(r),n.off(t,i)};this.on(t,i)}},e.off=function(t,e){if(t&&this._hooks[t]&&this._hooks[t].length)if(e){var n=this._hooks[t].indexOf(e);-1!==n&&this._hooks[t].splice(n,1)}else this._hooks[t]=[]},e.emit=function(t,e,n){if(n){if(!t)return;-1!==this._cache.indexOf(n)?this._emit(t,e):(this._hooksCache.hasOwnProperty(n)||(this._hooksCache[n]={}),this._hooksCache[n].hasOwnProperty(t)||(this._hooksCache[n][t]=[]),this._hooksCache[n][t].push(e))}else this._emit(t,e)},e._emit=function(t,e){t&&this._hooks[t]&&this._hooks[t].length&&[].concat(this._hooks[t]).forEach(function(t){try{t(e)}catch(t){}})},e.set=function(t){t&&-1===this._cache.indexOf(t)&&this._cache.push(t)},t}(),hf=an.map,lf=Li("map");Le({target:"Array",proto:!0,forced:!lf},{map:function(t){return hf(this,t,arguments.length>1?arguments[1]:void 0)}});var ff=y(1.1.valueOf),df=Se.f,pf=At.f,gf=Lt.f,vf=jc.trim,mf="Number",yf=o[mf];Zo[mf];var bf=yf.prototype,_f=o.TypeError,wf=y("".slice),Ef=y("".charCodeAt),Sf=function(t){var e,n,i,r,o,s,a,c,u=yt(t,"number");if(K(u))throw new _f("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=vf(u),43===(e=Ef(u,0))||45===e){if(88===(n=Ef(u,2))||120===n)return NaN}else if(48===e){switch(Ef(u,1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+u}for(s=(o=wf(u,2)).length,a=0;a<s;a++)if((c=Ef(o,a))<48||c>r)return NaN;return parseInt(o,i)}return+u},Tf=Be(mf,!yf(" 0o1")||!yf("0b1")||yf("+0x1")),Af=function(t){var e,n=arguments.length<1?0:yf(function(t){var e=yt(t,"number");return"bigint"==typeof e?e:Sf(e)}(t));return C(bf,e=this)&&s(function(){ff(e)})?ur(Object(n),this,Af):n};Af.prototype=bf,Tf&&(bf.constructor=Af),Le({global:!0,constructor:!0,wrap:!0,forced:Tf},{Number:Af});Tf&&function(t,e){for(var n,i=a?df(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;i.length>r;r++)at(e,n=i[r])&&!at(t,n)&&gf(t,n,pf(e,n))}(Zo[mf],yf);var kf=s(function(){vn(1)});Le({target:"Object",stat:!0,forced:kf},{keys:function(t){return vn(ot(t))}});var xf=jc.trim,Of=o.parseInt,Df=o.Symbol,If=Df&&Df.iterator,Rf=/^[+-]?0x/i,Mf=y(Rf.exec),Cf=8!==Of(Lc+"08")||22!==Of(Lc+"0x16")||If&&!s(function(){Of(Object(If))})?function(t,e){var n=xf(Na(t));return Of(n,e>>>0||(Mf(Rf,n)?16:10))}:Of;Le({global:!0,forced:parseInt!==Cf},{parseInt:Cf});var Bf=jt.PROPER,Pf="toString",Lf=RegExp.prototype,Gf=Lf[Pf],Nf=s(function(){return"/a/b"!==Gf.call({source:"a",flags:"b"})}),Uf=Bf&&Gf.name!==Pf;(Nf||Uf)&&oe(Lf,Pf,function(){var t=Dt(this);return"/"+Na(t.source)+"/"+Na(Ac(t))},{unsafe:!0});var Ff=y("".indexOf);yc("match",function(t,e,n){return[function(e){var n=x(this),i=R(e)?Y(e,t):void 0;if(i)return h(i,e,n);var r=Na(n);return new RegExp(e)[t](r)},function(t){var i=Dt(this),r=Na(t),o=n(e,i,r);if(o.done)return o.value;var s=Na(Ac(i));if(!~Ff(s,"g"))return xc(i,r);var a=!!~Ff(s,"u")||!!~Ff(s,"v");i.lastIndex=0;for(var c,u=[],h=0;null!==(c=xc(i,r));){var l=Na(c[0]);u[h]=l,""===l&&(i.lastIndex=_c(r,pe(i.lastIndex),a)),h++}return 0===h?null:u}]});var jf=Math.floor,zf=y("".charAt),qf=y("".replace),Vf=y("".slice),Hf=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Kf=/\$([$&'`]|\d{1,2})/g,Wf=function(t,e,n,i,r,o){var s=n+t.length,a=i.length,c=Kf;return void 0!==r&&(r=ot(r),c=Hf),qf(o,c,function(o,c){var u;switch(zf(c,0)){case"$":return"$";case"&":return t;case"`":return Vf(e,0,n);case"'":return Vf(e,s);case"<":u=r[Vf(c,1,-1)];break;default:var h=+c;if(0===h)return o;if(h>a){var l=jf(h/10);return 0===l?o:l<=a?void 0===i[l-1]?zf(c,1):i[l-1]+zf(c,1):o}u=i[h-1]}return void 0===u?"":u})},Jf=gt("replace"),Xf=Math.max,$f=Math.min,Yf=y([].concat),Zf=y([].push),Qf=y("".indexOf),td=y("".slice),ed=function(t){return void 0===t?t:String(t)},nd="$0"==="a".replace(/./,"$0"),id=!!/./[Jf]&&""===/./[Jf]("a","$0");yc("replace",function(t,e,n){var i=id?"$":"$0";return[function(t,n){var i=x(this),r=R(t)?Y(t,Jf):void 0;return r?h(r,t,i,n):h(e,Na(i),t,n)},function(t,r){var o=Dt(this),s=Na(t),a=I(r);a||(r=Na(r));var c=Na(Ac(o));if("string"==typeof r&&!~Qf(r,i)&&!~Qf(r,"$<")&&!~Qf(c,"y")){var u=n(e,o,s,r);if(u.done)return u.value}var h,l=!!~Qf(c,"g");l&&(h=!!~Qf(c,"u")||!!~Qf(c,"v"),o.lastIndex=0);for(var f,d=[];null!==(f=xc(o,s))&&(Zf(d,f),l);){""===Na(f[0])&&(o.lastIndex=_c(s,pe(o.lastIndex),h))}for(var p="",g=0,v=0;v<d.length;v++){for(var m,y=Na((f=d[v])[0]),b=Xf($f(ue(f.index),s.length),0),_=[],w=1;w<f.length;w++)Zf(_,ed(f[w]));var E=f.groups;if(a){var S=Yf([y],_,b,s);void 0!==E&&Zf(S,E),m=Na(ss(r,void 0,S))}else m=Wf(y,s,b,_,E,r);b>=g&&(p+=td(s,g,b)+m,g=b+y.length)}return p+td(s,g)}]},!!s(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!nd||id);var rd=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};yc("search",function(t,e,n){return[function(e){var n=x(this),i=R(e)?Y(e,t):void 0;if(i)return h(i,e,n);var r=Na(n);return new RegExp(e)[t](r)},function(t){var i=Dt(this),r=Na(t),o=n(e,i,r);if(o.done)return o.value;var s=i.lastIndex;rd(s,0)||(i.lastIndex=0);var a=xc(i,r);return rd(i.lastIndex,s)||(i.lastIndex=s),null===a?-1:a.index}]});var od,sd=function(t){return null!=t&&"[object Object]"==Object.prototype.toString.call(t)},ad=function(t){return Array.isArray(t)},cd=(od=+Date.now()+Number((""+Math.random()).slice(2,8)),function(){return od+=1}),ud=function(t){return function(t,e,n){if("string"==typeof t&&"number"==typeof e&&"number"==typeof n){var i,r=[];n=n<=25?n:n%25;var o=String.fromCharCode(n+97);i=t.split(o);for(var s=0;s<i.length;s++){var a=parseInt(i[s],n);a=1*a^e;var c=String.fromCharCode(a);r.push(c)}return r.join("")}}(t,64,25)},hd=function(t){!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)?window.addEventListener("pagehide",t,!1):window.addEventListener("beforeunload",t,!1)},ld=function(){var t=0;return["hidden","msHidden","webkitHidden"].forEach(function(e){void 0!==document[e]&&(t=1)}),t},fd=function(t){var e=document.createElement("a");return e.href=t,e},dd=function(t){var e={};try{var n=fd(t).search;(n=n.slice(1)).split("&").forEach(function(t){var n,i,r=t.split("=");r.length&&(n=r[0],i=r[1]);try{e[n]=decodeURIComponent(void 0===i?"":i)}catch(t){e[n]=i}})}catch(t){}return e},pd=function(t){for(var e=0,n=0,i=(t+="").length,r=0;r<i;r++)((e=31*e+t.charCodeAt(n++))>0x7fffffffffff||e<-0x800000000000)&&(e&=0xffffffffffff);return e<0&&(e+=0x7ffffffffffff),e};var gd=function(t){var e,n,i=[],r=t.length;r%2!=0&&(n=r+1,t=(e=t).length>=n?e:new Array(n-e.length+1).join("0")+e),r=t.length;for(var o=0;o<r;o+=2)i.push(parseInt(t.substr(o,2),16));return i},vd=function(){var t=window.navigator.appName,e=window.navigator.userAgent;return-1!==t.indexOf("Microsoft Internet Explorer")&&(-1!==e.indexOf("MSIE 8.0")||-1!==e.indexOf("MSIE 7.0")||-1!==e.indexOf("MSIE 9.0"))},md=jc.trim,yd=y("".charAt),bd=o.parseFloat,_d=o.Symbol,wd=_d&&_d.iterator,Ed=1/bd(Lc+"-0")!=-1/0||wd&&!s(function(){bd(Object(wd))})?function(t){var e=md(Na(t)),n=bd(e);return 0===n&&"-"===yd(e,0)?-0:n}:bd;Le({global:!0,forced:parseFloat!==Ed},{parseFloat:Ed});var Sd=gt("match"),Td=function(t){var e;return R(t)&&(void 0!==(e=t[Sd])?!!e:"RegExp"===w(t))},Ad=Lt.f,kd=function(t,e,n){n in t||Ad(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})},xd=Se.f,Od=ie.enforce,Dd=gt("match"),Id=o.RegExp,Rd=Id.prototype,Md=o.SyntaxError,Cd=y(Rd.exec),Bd=y("".charAt),Pd=y("".replace),Ld=y("".indexOf),Gd=y("".slice),Nd=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ud=/a/g,Fd=/a/g,jd=new Id(Ud)!==Ud,zd=qa.MISSED_STICKY,qd=qa.UNSUPPORTED_Y,Vd=a&&(!jd||zd||Ha||Wa||s(function(){return Fd[Dd]=!1,Id(Ud)!==Ud||Id(Fd)===Fd||"/a/i"!==String(Id(Ud,"i"))}));if(Be("RegExp",Vd)){for(var Hd=function(t,e){var n,i,r,o,s,a,c=C(Rd,this),u=Td(t),h=void 0===e,l=[],f=t;if(!c&&u&&h&&t.constructor===Hd)return t;if((u||C(Rd,t))&&(t=t.source,h&&(e=Ac(f))),t=void 0===t?"":Na(t),e=void 0===e?"":Na(e),f=t,Ha&&"dotAll"in Ud&&(i=!!e&&Ld(e,"s")>-1)&&(e=Pd(e,/s/g,"")),n=e,zd&&"sticky"in Ud&&(r=!!e&&Ld(e,"y")>-1)&&qd&&(e=Pd(e,/y/g,"")),Wa&&(o=function(t){for(var e,n=t.length,i=0,r="",o=[],s=xn(null),a=!1,c=!1,u=0,h="";i<n;i++){if("\\"===(e=Bd(t,i))){if(e+=Bd(t,++i),!c&&"\\"===Bd(e,1)){r+="\\x5c";continue}}else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:r+=e,Cd(Nd,Gd(t,i+1))?(i+=2,c=!0,u++):"?"!==Bd(t,i+1)&&u++;continue;case">"===e&&c:if(""===h||at(s,h))throw new Md("Invalid capture group name");s[h]=!0,o[o.length]=[h,u],c=!1,h="";continue}c?h+=e:r+=e}for(var l=0;l<o.length;l++)for(var f="\\k<"+o[l][0]+">",d="\\"+o[l][1];Ld(r,f)>-1;)r=Pd(r,f,d);return[r,o]}(t),t=o[0],l=o[1]),s=ur(Id(t,e),c?this:Rd,Hd),(i||r||l.length)&&(a=Od(s),i&&(a.dotAll=!0,a.raw=Hd(function(t){for(var e,n=t.length,i=0,r="",o=!1;i<n;i++)"\\"!==(e=Bd(t,i))?o||"."!==e?("["===e?o=!0:"]"===e&&(o=!1),r+=e):r+="[\\s\\S]":r+=e+Bd(t,++i);return r}(t),n)),r&&(a.sticky=!0),l.length&&(a.groups=l)),t!==f)try{Gt(s,"source",""===f?"(?:)":f)}catch(t){}return s},Kd=xd(Id),Wd=0;Kd.length>Wd;)kd(Hd,Id,Kd[Wd++]);Rd.constructor=Hd,Hd.prototype=Rd,oe(o,"RegExp",Hd,{constructor:!0})}No("RegExp");var Jd=e(function(t,e){var n;n=function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(i){function r(){}function o(e,n,o){if("undefined"!=typeof document){"number"==typeof(o=t({path:"/"},r.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(t){}n=i.write?i.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var c in o)o[c]&&(a+="; "+c,!0!==o[c]&&(a+="="+o[c].split(";")[0]));return document.cookie=e+"="+n+a}}function s(t,n){if("undefined"!=typeof document){for(var r={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),c=a.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(a[0]);if(c=(i.read||i)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(r[u]=c,t===u)break}catch(t){}}return t?r[t]:r}}return r.set=o,r.get=function(t){return s(t,!1)},r.getJSON=function(t){return s(t,!0)},r.remove=function(e,n){o(e,"",t(n,{expires:-1}))},r.defaults={},r.withConverter=n,r}(function(){})},t.exports=n()}),Xd=function(){function t(){Zl(this,"cache",void 0),this.cache={}}var e=t.prototype;return e.setItem=function(t,e){this.cache[t]=e},e.getItem=function(t){return this.cache[t]},e.removeItem=function(t){this.cache[t]=void 0},t}(),$d=function(){function t(){Zl(this,"support",void 0),this.support=this.isSupportLS()}var e=t.prototype;return e.isSupportLS=function(){try{return localStorage.setItem("_applogtest-test-key","hi"),localStorage.getItem("_applogtest-test-key"),localStorage.removeItem("_applogtest-test-key"),!0}catch(t){return!1}},e.getItem=function(t){try{var e=localStorage.getItem(t),n=e;try{e&&"string"==typeof e&&(n=JSON.parse(e))}catch(t){}return n||{}}catch(t){}return{}},e.setItem=function(t,e){try{var n="string"==typeof e?e:JSON.stringify(e);localStorage.setItem(t,n)}catch(t){}},e.removeItem=function(t){try{localStorage.removeItem(t)}catch(t){}},t}(),Yd=function(){function t(){Zl(this,"support",void 0),this.support=this.isSupportSession()}var e=t.prototype;return e.isSupportSession=function(){try{return sessionStorage.setItem("_applogtest-test-key","hi"),sessionStorage.getItem("_applogtest-test-key"),sessionStorage.removeItem("_applogtest-test-key"),!0}catch(t){return!1}},e.getItem=function(t){try{var e=sessionStorage.getItem(t),n=e;try{e&&"string"==typeof e&&(n=JSON.parse(e))}catch(t){}return n||{}}catch(t){}return{}},e.setItem=function(t,e){try{var n="string"==typeof e?e:JSON.stringify(e);sessionStorage.setItem(t,n)}catch(t){}},e.removeItem=function(t){try{sessionStorage.removeItem(t)}catch(t){}},t}(),Zd=function(){function t(){Zl(this,"local",void 0),Zl(this,"session",void 0),Zl(this,"cache",void 0),Zl(this,"defaultExpireTime",void 0),this.defaultExpireTime=6048e5,this.local=new $d,this.session=new Yd,this.cache=new Xd}var e=t.prototype;return e.getLocalItem=function(t){return this.local.getItem(t)},e.setLocalItem=function(t,e){this.local.setItem(t,e)},e.removeLocalItem=function(t){this.local.removeItem(t)},e.getSessionItem=function(t){return this.session.getItem(t)},e.setSessionItem=function(t,e){this.session.setItem(t,e)},e.removeSessionItem=function(t){this.session.removeItem(t)},e.getCacheItem=function(t){return this.cache.getItem(t)},e.setCacheItem=function(t,e){this.cache.setItem(t,e)},e.removeCacheItem=function(t){this.cache.removeItem(t)},e.getCookie=function(t,e){try{return Jd.get(t)}catch(t){return""}},e.setCookie=function(t,e,n,i){void 0===n&&(n=this.defaultExpireTime);try{var r=i||document.domain,o=+new Date+n;Jd.set(t,e,{expires:new Date(o),path:"/",domain:r})}catch(t){}},e.removeCookie=function(t,e){try{Jd.remove(t,{path:"/",domain:e||""})}catch(t){}},t}(),Qd=function(){function t(t,e,n){Zl(this,"appid",void 0),Zl(this,"domain",void 0),Zl(this,"userAgent",void 0),Zl(this,"appVersion",void 0),Zl(this,"utm",void 0),Zl(this,"cookie_expire",void 0),this.appid=t,this.domain=e,this.userAgent=window.navigator.userAgent,this.appVersion=window.navigator.appVersion,this.cookie_expire=n}var e=t.prototype;return e.init=function(){var t=window.navigator.userAgent,e=window.navigator.language,n=document.referrer,i=n?fd(n).hostname:"",r=dd(window.location.href),o=/Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion)?"wap":"web";this.utm=function(t,e,n,i){var r=new Zd,o=t?"_tea_utm_cache_"+t:"_tea_utm_cache",s=t?"_$utm_from_url_"+t:"_$utm_from_url",a={},c=["tr_shareuser","tr_admaster","tr_param1","tr_param2","tr_param3","tr_param4","$utm_from_url"],u={ad_id:Number(e.ad_id)||void 0,campaign_id:Number(e.campaign_id)||void 0,creative_id:Number(e.creative_id)||void 0,utm_source:e.utm_source,utm_medium:e.utm_medium,utm_campaign:e.utm_campaign,utm_term:e.utm_term,utm_content:e.utm_content,tr_shareuser:e.tr_shareuser,tr_admaster:e.tr_admaster,tr_param1:e.tr_param1,tr_param2:e.tr_param2,tr_param3:e.tr_param3,tr_param4:e.tr_param4};try{var h=!1;for(var l in u)u[l]&&(-1!==c.indexOf(l)?(a.hasOwnProperty("tracer_data")||(a.tracer_data={}),a.tracer_data[l]=u[l]):a[l]=u[l],h=!0);if(h)r.setSessionItem(s,"1"),r.setCookie(o,JSON.stringify(a),i,n);else{var f=r.getCookie(o,n);f&&(a=JSON.parse(f))}r.getSessionItem(s)&&(a.hasOwnProperty("tracer_data")||(a.tracer_data={}),a.tracer_data.$utm_from_url=1)}catch(t){return u}return a}(this.appid,r,this.domain,this.cookie_expire);var s=this.browser(),a=this.os();return{browser:s.browser,browser_version:s.browser_version,platform:o,os_name:a.os_name,os_version:a.os_version,userAgent:t,screen_width:window.screen&&window.screen.width,screen_height:window.screen&&window.screen.height,device_model:this.getDeviceModel(a.os_name),language:e,referrer:n,referrer_host:i,utm:this.utm,latest_data:this.last(n,i)}},e.last=function(t,e){var n="",i="",r="",o=location.hostname,s=!1;if(t&&e&&o!==e){n=t,i=e,s=!0;var a=dd(t);a.keyword&&(r=a.keyword)}return{$latest_referrer:n,$latest_referrer_host:i,$latest_search_keyword:r,isLast:s}},e.browser=function(){var t,e,n="",i=""+parseFloat(this.appVersion),r=this.userAgent;return-1!==r.indexOf("Edge")||-1!==r.indexOf("Edg")?(n="Microsoft Edge",-1!==r.indexOf("Edge")?(t=r.indexOf("Edge"),i=r.substring(t+5)):(t=r.indexOf("Edg"),i=r.substring(t+4))):-1!==(t=r.indexOf("MSIE"))?(n="Microsoft Internet Explorer",i=r.substring(t+5)):-1!==(t=r.indexOf("Lark"))?(n="Lark",i=r.substring(t+5,t+11)):-1!==(t=r.indexOf("MetaSr"))?(n="sougoubrowser",i=r.substring(t+7,t+10)):-1!==r.indexOf("MQQBrowser")||-1!==r.indexOf("QQBrowser")?(n="qqbrowser",-1!==r.indexOf("MQQBrowser")?(t=r.indexOf("MQQBrowser"),i=r.substring(t+11,t+15)):-1!==r.indexOf("QQBrowser")&&(t=r.indexOf("QQBrowser"),i=r.substring(t+10,t+17))):-1!==r.indexOf("Chrome")?-1!==(t=r.indexOf("MicroMessenger"))?(n="weixin",i=r.substring(t+15,t+20)):-1!==(t=r.indexOf("360"))?(n="360browser",i=r.substring(r.indexOf("Chrome")+7)):-1!==r.indexOf("baidubrowser")||-1!==r.indexOf("BIDUBrowser")?(-1!==r.indexOf("baidubrowser")?(t=r.indexOf("baidubrowser"),i=r.substring(t+13,t+16)):-1!==r.indexOf("BIDUBrowser")&&(t=r.indexOf("BIDUBrowser"),i=r.substring(t+12,t+15)),n="baidubrowser"):-1!==(t=r.indexOf("xiaomi"))?-1!==r.indexOf("openlanguagexiaomi")?(n="openlanguage xiaomi",i=r.substring(t+7,t+13)):(n="xiaomi",i=r.substring(t-7,t-1)):-1!==(t=r.indexOf("TTWebView"))?(n="TTWebView",i=r.substring(t+10,t+23)):(-1!==(t=r.indexOf("Chrome"))||-1!==(t=r.indexOf("Chrome")))&&(n="Chrome",i=r.substring(t+7)):-1!==r.indexOf("Safari")?-1!==(t=r.indexOf("QQ"))?(n="qqbrowser",i=r.substring(t+10,t+16)):-1!==(t=r.indexOf("Safari"))&&(n="Safari",i=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(i=r.substring(t+8))):-1!==(t=r.indexOf("Firefox"))?(n="Firefox",i=r.substring(t+8)):-1!==(t=r.indexOf("MicroMessenger"))?(n="weixin",i=r.substring(t+15,t+20)):-1!==(t=r.indexOf("QQ"))?(n="qqbrowser",i=r.substring(t+3,t+8)):-1!==(t=r.indexOf("Opera"))&&(n="Opera",i=r.substring(t+6),-1!==(t=r.indexOf("Version"))&&(i=r.substring(t+8))),-1!==(e=i.indexOf(";"))&&(i=i.substring(0,e)),-1!==(e=i.indexOf(" "))&&(i=i.substring(0,e)),-1!==(e=i.indexOf(")"))&&(i=i.substring(0,e)),{browser:n,browser_version:i}},e.os=function(){for(var t="",e="",n=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0|Windows NT 10.1)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Android",r:/Android/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/}],i=0;i<n.length;i++){var r=n[i];if(r.r.test(this.userAgent)){"Mac OS X"===(t=r.s)&&this.isNewIpad()&&(t="iOS");break}}var o=function(t,e){var n=t.exec(e);return n&&n[1]?n[1]:""},s=function(t,e){var n=RegExp("(?:^|[^A-Z0-9-_]|[^A-Z0-9-]_|sprd-)(?:"+t+")","i").exec(e);return n?n.slice(1)[0]:""};/Windows/.test(t)&&(e=o(/Windows (.*)/,t),t="windows");switch(t){case"Mac OS X":e=s("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent),t="mac";break;case"Android":e=function(t){var e=o(/Android ([\.\_\d]+)/,t);return e||(e=o(/Android\/([\.\_\d]+)/,t)),e}(this.userAgent),t="android";break;case"iOS":e=this.isNewIpad()?s("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent):(e=/OS (\d+)_(\d+)_?(\d+)?/.exec(this.appVersion))?e[1]+"."+e[2]+"."+(0|e[3]):"",t="ios"}return{os_name:t,os_version:e}},e.getDeviceModel=function(t){var e="";try{if("android"===t)navigator.userAgent.split(";").forEach(function(t){t.indexOf("Build/")>-1&&(e=t.slice(0,t.indexOf("Build/")))});else if("ios"===t||"mac"===t||"windows"===t)if(this.isNewIpad())e="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),i=n.indexOf(";");e=n.slice(0,i)}}catch(t){return e.trim()}return e.trim()},e.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},t}(),tp={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az24z1mz1jz1az1cz18z1nz1nz1jz1mz1ez4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},ep="0.1.7",np={cn:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},ip=function(){function t(t,e){Zl(this,"regStr",void 0),Zl(this,"eventNameWhiteList",void 0),Zl(this,"paramsNameWhiteList",void 0),Zl(this,"collector",void 0),Zl(this,"config",void 0),this.collector=t,this.config=e,this.eventNameWhiteList=["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","_be_active","$bav2b_slide"],this.paramsNameWhiteList=["$inactive","$inline","$target_uuid_list","$source_uuid","$is_spider","$source_id","$is_first_time","$user_unique_id_type","_staging_flag","$exposure_type","$direction","$offsetY","$offsetX"],this.regStr=new RegExp("^[a-zA-Z0-9][a-z0-9A-Z_.-]{1,255}$")}var e=t.prototype;return e.checkVerify=function(t){var e=this;if(!t||!t.length)return!1;var n=t[0];if(!n)return!1;var i=n.events,r=n.header;if(!i||!i.length)return!1;var o=!0;return i.forEach(function(t){e.checkEventName(t.event)||(o=!1,t.checkEvent="事件名不能以 $ or __开头"),e.checkEventParams(t.params)||(o=!1,t.checkParams="属性名不能以 $ or __开头")}),this.checkEventParams(r)||(o=!1),o},e.checkEventName=function(t){return!!t&&this.calculate(t,"event")},e.checkEventParams=function(t){var e=t;"string"==typeof t&&(e=JSON.parse(e));var n=!0;if(!Object.keys(e).length)return n;for(var i in e){if(!this.calculate(i,"params")){n=!1;break}if("string"==typeof e[i]&&e[i].length>1024){console.warn("params: "+i+" can not over 1024 byte, please check;"),n=!1;break}}return n},e.calculate=function(t,e){return-1!==("event"===e?this.eventNameWhiteList:"params"===e?this.paramsNameWhiteList:[]).indexOf(t)||(!new RegExp("^\\$").test(t)&&!new RegExp("^__").test(t)||(console.warn(e+" name: "+t+" can not start with $ or __, pleace check;"),!1))},t}(),rp=function(t){return t.Init="init",t.Config="config",t.Start="start",t.Ready="ready",t.TokenComplete="token-complete",t.TokenStorage="token-storage",t.TokenFetch="token-fetch",t.TokenError="token-error",t.ConfigUuid="config-uuid",t.ConfigWebId="config-webid",t.ConfigDomain="config-domain",t.CustomWebId="custom-webid",t.AnonymousId="anonymous-id",t.TokenChange="token-change",t.TokenReset="token-reset",t.ConfigTransform="config-transform",t.EnvTransform="env-transform",t.SessionReset="session-reset",t.SessionResetTime="session-reset-time",t.Event="event",t.Events="events",t.EventNow="event-now",t.CleanEvents="clean-events",t.BeconEvent="becon-event",t.SubmitBefore="submit-before",t.SubmitScuess="submit-scuess",t.SubmitSuccess="submit-success",t.SubmitAfter="submit-after",t.SubmitError="submit-error",t.SubmitVerifyH="submit-verify-h5",t.Stay="stay",t.ResetStay="reset-stay",t.StayReady="stay-ready",t.SetStay="set-stay",t.RouteChange="route-change",t.RouteReady="route-ready",t.Ab="ab",t.AbVar="ab-var",t.AbAllVars="ab-all-vars",t.AbConfig="ab-config",t.AbExternalVersion="ab-external-version",t.AbVersionChangeOn="ab-version-change-on",t.AbVersionChangeOff="ab-version-change-off",t.AbOpenLayer="ab-open-layer",t.AbCloseLayer="ab-close-layer",t.AbReady="ab-ready",t.AbComplete="ab-complete",t.AbTimeout="ab-timeout",t.Profile="profile",t.ProfileSet="profile-set",t.ProfileSetOnce="profile-set-once",t.ProfileUnset="profile-unset",t.ProfileIncrement="profile-increment",t.ProfileAppend="profile-append",t.ProfileClear="profile-clear",t.TrackDuration="track-duration",t.TrackDurationStart="track-duration-start",t.TrackDurationEnd="track-duration-end",t.TrackDurationPause="track-duration-pause",t.TrackDurationResume="tracl-duration-resume",t.Autotrack="autotrack",t.AutotrackReady="autotrack-ready",t.CustomHeader="custom-request-header",t.TracerReady="tracer-ready",t}(rp||{}),op=function(t){return t.DEBUGGER_MESSAGE="debugger-message",t.DEBUGGER_MESSAGE_SDK="debugger-message-sdk",t.DEBUGGER_MESSAGE_FETCH="debugger-message-fetch",t.DEBUGGER_MESSAGE_FETCH_RESULT="debugger-message-fetch-result",t.DEBUGGER_MESSAGE_EVENT="debugger-message-event",t.DEVTOOL_WEB_READY="devtool-web-ready",t}({}),sp=void 0,ap=(new Date).getTimezoneOffset(),cp=parseInt(""+-ap/60,10),up=60*ap,hp=function(){function t(t,e){Zl(this,"collect",void 0),Zl(this,"envInfo",void 0),Zl(this,"evtParams",void 0),Zl(this,"filter",void 0),Zl(this,"reportErrorCallback",void 0),Zl(this,"initConfig",void 0),Zl(this,"sessionStorage",void 0),Zl(this,"localStorage",void 0),Zl(this,"storage",void 0),Zl(this,"configKey",void 0),Zl(this,"domain",void 0),Zl(this,"ab_version",void 0),Zl(this,"ab_cache",void 0),Zl(this,"is_first_time",!0),Zl(this,"isLast",void 0),Zl(this,"configPersist",!1),Zl(this,"eventCheck",void 0),Zl(this,"enableClientTransport",!1),this.initConfig=e,this.collect=t;var n=new Qd(e.app_id,e.cookie_domain||"",e.cookie_expire||7776e6).init();this.eventCheck=new ip(t,e);var i="__tea_cache_first_"+e.app_id;this.configKey="__tea_cache_config_"+e.app_id,this.storage=new Zd,e.configPersist&&(this.configPersist=!0,this.storage=1===e.configPersist?this.sessionStorage:this.localStorage);var r=this.storage.getLocalItem(i);r&&1==r?this.is_first_time=!1:(this.is_first_time=!0,this.storage.setLocalItem(i,"1")),this.envInfo={user:{user_unique_id:sp,user_type:sp,user_id:sp,user_is_auth:sp,user_is_login:sp,device_id:sp,web_id:sp,ip_addr_id:sp,user_unique_id_type:sp,anonymous_id:sp},header:{app_id:sp,app_name:sp,app_install_id:sp,install_id:sp,app_package:sp,app_channel:sp,app_version:sp,ab_version:sp,os_name:n.os_name,os_version:n.os_version,device_model:n.device_model,ab_client:sp,traffic_type:sp,client_ip:sp,device_brand:sp,os_api:sp,access:sp,language:n.language,region:sp,app_language:sp,app_region:sp,creative_id:n.utm.creative_id,ad_id:n.utm.ad_id,campaign_id:n.utm.campaign_id,log_type:sp,rnd:sp,platform:n.platform,sdk_version:ep,sdk_lib:"js",province:sp,city:sp,timezone:cp,tz_offset:up,tz_name:sp,sim_region:sp,carrier:sp,resolution:n.screen_width+"x"+n.screen_height,browser:n.browser,browser_version:n.browser_version,referrer:n.referrer,referrer_host:n.referrer_host,width:n.screen_width,height:n.screen_height,screen_width:n.screen_width,screen_height:n.screen_height,utm_term:n.utm.utm_term,utm_content:n.utm.utm_content,utm_source:n.utm.utm_source,utm_medium:n.utm.utm_medium,utm_campaign:n.utm.utm_campaign,tracer_data:JSON.stringify(n.utm.tracer_data),custom:{},wechat_unionid:sp,wechat_openid:sp}},this.ab_version="",this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(n),this.initDomain(),this.initABData(),this.setEnableClientTransport(!!this.initConfig.transport)}var e=t.prototype;return e.initDomain=function(){var t=this.initConfig.channel_domain;if(t)this.domain=t;else{var e=this.initConfig.channel;this.domain=ud(tp[e])}},e.setDomain=function(t){this.domain=t},e.getDomain=function(){return this.domain},e.initABData=function(){var t="__tea_sdk_ab_version_"+this.initConfig.app_id,e=null;if(this.initConfig.ab_cross){var n=this.storage.getCookie(t,this.initConfig.ab_cookie_domain);e=n?JSON.parse(n):null}else e=this.storage.getLocalItem(t);this.setAbCache(e)},e.setAbCache=function(t){this.ab_cache=t},e.getAbCache=function(){return this.ab_cache},e.clearAbCache=function(){this.ab_cache={},this.ab_version=""},e.setAbVersion=function(t){this.ab_version=t},e.getAbVersion=function(){return this.ab_version},e.setEnableClientTransport=function(t){this.enableClientTransport=t},e.getEnableClientTransport=function(){return this.enableClientTransport},e.getUrl=function(t){var e="";switch(t){case"event":e="/list";break;case"webid":e="/webid";break;case"tobid":e="/tobid";break;case"profile":e="/profile/list"}var n="";return this.initConfig.caller&&(n="?sdk_version=0.1.7&sdk_name=web&app_id="+this.initConfig.app_id+"&caller="+this.initConfig.caller),this.initConfig.enable_encryption&&"event"===t&&"sm"!==this.initConfig.encryption_type&&(n=this.initConfig.caller?n+"&encryption=1":n+"?encryption=1"),this.initConfig.report_url?""+this.initConfig.report_url+n:""+this.getDomain()+e+n},e.setCustom=function(t){if(t&&t.latest_data&&t.latest_data.isLast)for(var e in delete t.latest_data.isLast,this.isLast=!0,t.latest_data)this.envInfo.header.custom[e]=t.latest_data[e]},e.set=function(t){var e=this;Object.keys(t).forEach(function(n){void 0!==t[n]&&null!==t[n]||e.delete(n);try{e.eventCheck.calculate(n,"config")}catch(t){}if("traffic_type"===n&&e.isLast&&(e.envInfo.header.custom.$latest_traffic_source_type=t[n]),"evtParams"===n)e.evtParams=Object.assign({},e.evtParams||{},t.evtParams||{});else if("_staging_flag"===n)e.evtParams=Object.assign({},e.evtParams||{},{_staging_flag:t._staging_flag});else if("reportErrorCallback"===n&&"function"==typeof t[n])e.reportErrorCallback=t[n];else{var i="",r="";if(n.indexOf(".")>-1){var o=n.split(".");i=o[0],r=o[1]}i?"user"===i||"header"===i?e.envInfo[i][r]=t[n]:e.envInfo.header.custom[r]=t[n]:Object.hasOwnProperty.call(e.envInfo.user,n)?["user_type","ip_addr_id"].indexOf(n)>-1?e.envInfo.user[n]=t[n]?Number(t[n]):t[n]:["user_id","web_id","user_unique_id","user_unique_id_type","anonymous_id"].indexOf(n)>-1?e.envInfo.user[n]=t[n]?String(t[n]):t[n]:["user_is_auth","user_is_login"].indexOf(n)>-1?e.envInfo.user[n]=Boolean(t[n]):"device_id"===n&&(e.envInfo.user[n]=t[n]):Object.hasOwnProperty.call(e.envInfo.header,n)?e.envInfo.header[n]=t[n]:e.envInfo.header.custom[n]=t[n]}})},e.get=function(t){try{return t?"evtParams"===t?this.evtParams:"reportErrorCallback"===t?this[t]:Object.hasOwnProperty.call(this.envInfo.user,t)?this.envInfo.user[t]:Object.hasOwnProperty.call(this.envInfo.header,t)?this.envInfo.header[t]:JSON.parse(JSON.stringify(this.envInfo[t])):JSON.parse(JSON.stringify(this.envInfo))}catch(t){console.log("get config stringify error "),this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}},e.getItem=function(t){return this.initConfig&&1===this.initConfig.configPersist?this.storage.getSessionItem(t):this.storage.getLocalItem(t)},e.setItem=function(t,e){this.initConfig&&1===this.initConfig.configPersist?this.storage.setSessionItem(t,e):this.storage.setLocalItem(t,e)},e.setStore=function(t){try{if(!this.configPersist)return;var e=this.getItem(this.configKey)||{};if(e&&Object.keys(t).length){var n=Object.assign(t,e);this.setItem(this.configKey,n)}}catch(t){this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}},e.getStore=function(){try{if(!this.configPersist)return null;var t=this.getItem(this.configKey)||{};return t&&Object.keys(t).length?t:null}catch(t){return this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),null}},e.delete=function(t){try{if(!this.configPersist)return;var e=this.getItem(this.configKey)||{};e&&Object.hasOwnProperty.call(e,t)&&(delete e[t],this.setItem(this.configKey,e))}catch(t){this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}},t}(),lp=function(){function t(t,e){Zl(this,"isLog",void 0),Zl(this,"name",void 0),this.isLog=e||!1,this.name=t||""}var e=t.prototype;return e.info=function(t){this.isLog&&console.log("%c %s","color: yellow; background-color: black;","[instance: "+this.name+"] "+t)},e.warn=function(t){this.isLog&&console.warn("%c %s","color: yellow; background-color: black;","[instance: "+this.name+"] "+t)},e.error=function(t){this.isLog&&console.error("[instance: "+this.name+"] "+t)},e.throw=function(t){throw this.error(this.name),new Error(t)},t}(),fp=function(){function t(t,e){this.native=t.enable_native||t["evitaN".split("").reverse().join("")],this.os=e.get("os_name")}var e=t.prototype;return e.bridgeInject=function(){try{return!!this.native&&(AppLogBridge?(console.log("AppLogBridge is injected"),!0):(console.log("AppLogBridge is not inject"),!1))}catch(t){return console.log("AppLogBridge is not inject"),!1}},e.bridgeReady=function(){var t=this;return new Promise(function(e,n){try{t.bridgeInject()?AppLogBridge.hasStarted(function(t){console.log("AppLogBridge is started? : "+t),t?e(!0):n(!1)}):n(!1)}catch(t){console.log("AppLogBridge, error:"+JSON.stringify(t.stack)),n(!1)}})},e.setNativeAppId=function(t){try{AppLogBridge.setNativeAppId(JSON.stringify(t)),console.log("change bridge appid, event report with appid: "+t)}catch(t){console.error("setNativeAppId error")}},e.setConfig=function(t){var e=this;try{Object.keys(t).forEach(function(n){"user_unique_id"===n?e.setUserUniqueId(t[n]):t[n]?e.addHeaderInfo(n,t[n]):e.removeHeaderInfo(n)})}catch(t){console.error("setConfig error")}},e.setUserUniqueId=function(t){try{AppLogBridge.setUserUniqueId(t)}catch(t){console.error("setUserUniqueId error")}},e.addHeaderInfo=function(t,e){try{AppLogBridge.addHeaderInfo(t,e)}catch(t){console.error("addHeaderInfo error")}},e.setHeaderInfo=function(t){try{AppLogBridge.setHeaderInfo(JSON.stringify(t))}catch(t){console.error("setHeaderInfo error")}},e.removeHeaderInfo=function(t){try{AppLogBridge.removeHeaderInfo(t)}catch(t){console.error("removeHeaderInfo error")}},e.reportPv=function(t){this.onEventV3("predefine_pageview",t)},e.onEventV3=function(t,e){try{AppLogBridge.onEventV3(t,e)}catch(t){console.error("onEventV3 error")}},e.profileSet=function(t){try{AppLogBridge.profileSet(t)}catch(t){console.error("profileSet error")}},e.profileSetOnce=function(t){try{AppLogBridge.profileSetOnce(t)}catch(t){console.error("profileSetOnce error")}},e.profileIncrement=function(t){try{AppLogBridge.profileIncrement(t)}catch(t){console.error("profileIncrement error")}},e.profileUnset=function(t){try{AppLogBridge.profileUnset(t)}catch(t){console.error("profileUnset error")}},e.profileAppend=function(t){try{AppLogBridge.profileAppend(t)}catch(t){console.error("profileAppend error")}},e.setExternalAbVersion=function(t){try{AppLogBridge.setExternalAbVersion(t)}catch(t){console.error("setExternalAbVersion error")}},e.getVar=function(t,e,n){try{"android"===this.os?n(AppLogBridge.getABTestConfigValueForKey(t,e)):AppLogBridge.getABTestConfigValueForKey(t,e,function(t){n(t)})}catch(t){console.error("getVar error"),n(e)}},e.getAllVars=function(t){try{"android"===this.os?t(AppLogBridge.getAllAbTestConfigs()):AppLogBridge.getAllAbTestConfigs(function(e){t(e)})}catch(e){console.error("getAllVars error"),t(null)}},e.getAbSdkVersion=function(t){try{"android"===this.os?t(AppLogBridge.getAbSdkVersion()):AppLogBridge.getAbSdkVersion(function(e){t(e)})}catch(e){console.error("getAbSdkVersion error"),t("")}},t}(),dp=an.filter,pp=Li("filter");Le({target:"Array",proto:!0,forced:!pp},{filter:function(t){return dp(this,t,arguments.length>1?arguments[1]:void 0)}});var gp=function(){function t(){Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"configManager",void 0),Zl(this,"eventKey",void 0),Zl(this,"beconKey",void 0),Zl(this,"abKey",void 0),Zl(this,"storgae",void 0),Zl(this,"reportTimeout",void 0),Zl(this,"maxReport",void 0),Zl(this,"reportTime",void 0),Zl(this,"timeout",void 0),Zl(this,"eventLimit",50),Zl(this,"reportUrl",void 0),Zl(this,"eventCache",[]),Zl(this,"beconEventCache",[]),Zl(this,"eventCheck",void 0),Zl(this,"refer_key",void 0),Zl(this,"enable_ttwebid",void 0)}var e=t.prototype;return e.apply=function(t,e){var n=this;this.collect=t,this.config=e,this.configManager=t.configManager,this.storgae=new Zd,this.eventCheck=new ip(t,e),this.maxReport=e.max_report||20,this.reportTime=e.reportTime||30,this.timeout=e.timeout||1e5,this.enable_ttwebid=e.enable_ttwebid,this.reportUrl=this.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+this.configManager.get("app_id"),this.beconKey="__tea_cache_events_becon_"+this.configManager.get("app_id"),this.abKey="__tea_sdk_ab_version_"+this.configManager.get("app_id"),this.refer_key="__tea_cache_refer_"+this.configManager.get("app_id"),this.collect.on(rp.Ready,function(){n.reportAll(!1)}),this.collect.on(rp.ConfigDomain,function(){n.reportUrl=n.configManager.getUrl("event")}),this.collect.on(rp.Event,function(t){n.event(t)}),this.collect.on(rp.BeconEvent,function(t){n.beconEvent(t)}),this.collect.on(rp.CleanEvents,function(){n.reportAll(!1)}),this.linster()},e.linster=function(){var t=this;window.addEventListener("unload",function(){t.reportAll(!0)},!1),hd(function(){t.reportAll(!0)}),document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&t.reportAll(!0)},!1)},e.reportAll=function(t){this.report(t),this.reportBecon()},e.event=function(t){var e=this;try{var n=this.storgae.getCacheItem(this.eventKey)||[],i=[].concat(t,n);if(this.storgae.setCacheItem(this.eventKey,i),this.reportTimeout&&clearTimeout(this.reportTimeout),i.length>=this.maxReport)this.report(!1);else{var r=this.reportTime;this.reportTimeout=setTimeout(function(){e.report(!1),e.reportTimeout=null},r)}}catch(t){this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}},e.beconEvent=function(t){var e=this.storgae.getCacheItem(this.beconKey)||[],n=[].concat(t,e);this.storgae.setCacheItem(this.beconKey,n),this.collect.destroy||this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.storgae.removeCacheItem(this.beconKey),this.send(this.split(this.merge(n)),!0))},e.reportBecon=function(){var t=this.storgae.getCacheItem(this.beconKey)||[];t&&t.length&&(this.storgae.removeCacheItem(this.beconKey),this.send(this.split(this.merge(t)),!0))},e.report=function(t){if(!this.collect.destroy&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var e=this.storgae.getCacheItem(this.eventKey)||[];e.length&&(this.storgae.removeCacheItem(this.eventKey),this.sliceEvent(e,t))}},e.sliceEvent=function(t,e){if(t.length>this.eventLimit)for(var n=0;n<t.length;n+=this.eventLimit){var i;i=t.slice(n,n+this.eventLimit);var r=this.split(this.merge(i));this.send(r,e)}else{var o=this.split(this.merge(t));this.send(o,e)}},e.handleRefer=function(){var t="";try{if(this.config.spa||this.config.autotrack){var e=this.storgae.getLocalItem(this.refer_key)||{};t=e.routeChange?e.refer_key:this.configManager.get("referrer")}else t=this.configManager.get("referrer")}catch(e){t=document.referrer}return t},e.merge=function(t,e){var n=this,i=this.configManager.get(),r=i.header,o=i.user;r.referrer=this.handleRefer(),r.custom=JSON.stringify(r.custom);var s=this.configManager.get("evtParams"),a=this.configManager.get("user_unique_id_type"),c=t.map(function(t){try{if(Object.keys(s).length&&!e&&(t.params=Object.assign({},t.params,s)),n.collect.dynamicParamsFilter){var i=n.collect.dynamicParamsFilter();Object.keys(i).length&&(t.params=Object.assign({},t.params,i))}a&&(t.params.$user_unique_id_type=a);var r=n.configManager.getAbCache(),c=n.configManager.getAbVersion();return c&&r&&(n.config.disable_ab_reset||r.uuid===o.user_unique_id)&&(t.ab_sdk_version=c),t.session_id=n.collect.sessionManager.getSessionId(),t.params=JSON.stringify(t.params),t}catch(e){return n.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message}),t}}),u=[];if(!Object.keys(o).length)return console.warn("user info error,cant report"),u;this.config.enable_anonymousid&&delete o.web_id;var h=JSON.parse(JSON.stringify({events:c,user:o,header:r}));return h.local_time=Math.floor(Date.now()/1e3),h.verbose=1,h.user_unique_type=this.config.enable_ttwebid?this.config.user_unique_type:void 0,u.push(h),u},e.split=function(t){return t=t.map(function(t){var e=[];return e.push(t),e})},e.send=function(t,e){var n=this;t.length&&t.forEach(function(t){try{var i=JSON.parse(JSON.stringify(t));n.config.filter&&((i=n.config.filter(i))||console.warn("filter must return data !!")),n.collect.eventFilter&&i&&((i=n.collect.eventFilter(i))||console.warn("filterEvent api must return data !!"));var r=i||t,o=JSON.parse(JSON.stringify(r));if(n.eventCheck.checkVerify(o),!r.length)return;n.collect.emit(rp.SubmitBefore,r);var s=n.collect.cryptoData(r);n.collect.requestManager.useRequest({url:n.reportUrl,data:s,success:function(t,e,i,r,s){t&&0!==t.e?(n.collect.emit(rp.SubmitError,{type:"f_data",eventData:e,errorCode:t.e,response:t,startTime:r,endTime:Date.now(),status:s}),n.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_EVENT,info:"埋点上报失败",time:Date.now(),data:o,code:t.e,failType:"数据异常失败",status:"fail"})):(n.collect.emit(rp.SubmitSuccess,{eventData:e,res:t,response:t,startTime:r,endTime:Date.now(),status:s}),n.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:o,code:200,status:"success"}))},fail:function(t,e,i,r){n.configManager.get("reportErrorCallback")(t,e),n.collect.emit(rp.SubmitError,{type:"f_net",eventData:t,errorCode:e,startTime:i,errorMessage:r,endTime:Date.now()}),n.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_EVENT,info:"埋点上报网络异常",time:Date.now(),data:o,code:e,failType:"网络异常失败",status:"fail"})},timeout:n.timeout,useBeacon:e,encryption:n.config.enable_encryption,encryption_header:n.config.encryption_header,withCredentials:n.enable_ttwebid}),n.collect.emit(rp.SubmitVerifyH,r),n.collect.emit(rp.SubmitAfter,r)}catch(t){console.warn("something error, "+JSON.stringify(t.stack)),n.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}})},t}(),vp=function(t){return t?(t^16*Math.random()>>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,vp)},mp=function(){return vp().replace(/-/g,"").slice(0,19)},yp=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},bp=function(){function t(){Zl(this,"sessionKey",void 0),Zl(this,"storage",void 0),Zl(this,"sessionExp",void 0),Zl(this,"expireTime",void 0),Zl(this,"disableSession",void 0),Zl(this,"collect",void 0)}var e=t.prototype;return e.apply=function(t,e){var n=this;this.collect=t,this.storage=new Zd,this.sessionKey="__tea_session_id_"+e.app_id,this.expireTime=e.expireTime||18e5,this.disableSession=e.disable_session,this.disableSession||(this.setSessionId(),this.collect.on(rp.SessionReset,function(){n.resetSessionId()}),this.collect.on(rp.SessionResetTime,function(){n.updateSessionIdTime()}))},e.updateSessionIdTime=function(){var t=this.storage.getSessionItem(this.sessionKey);if(t&&t.sessionId){var e=t.timestamp;Date.now()-e>this.expireTime?t={sessionId:yp(),timestamp:Date.now()}:t.timestamp=Date.now(),this.storage.setSessionItem(this.sessionKey,t),this.resetExpTime()}},e.setSessionId=function(){var t=this,e=this.storage.getSessionItem(this.sessionKey);e&&e.sessionId?e.timestamp=Date.now():e={sessionId:yp(),timestamp:Date.now()},this.storage.setSessionItem(this.sessionKey,e),this.sessionExp=setInterval(function(){t.checkEXp()},this.expireTime)},e.getSessionId=function(){var t=this.storage.getSessionItem(this.sessionKey);return this.disableSession?"":t&&t.sessionId?t.sessionId:""},e.resetExpTime=function(){var t=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval(function(){t.checkEXp()},this.expireTime))},e.resetSessionId=function(){var t={sessionId:yp(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,t)},e.checkEXp=function(){var t=this.storage.getSessionItem(this.sessionKey);t&&t.sessionId&&(Date.now()-t.timestamp+30>=this.expireTime&&(t={sessionId:yp(),timestamp:Date.now()},this.storage.setSessionItem(this.sessionKey,t)))},t}(),_p=function(){function t(){Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"storage",void 0),Zl(this,"configManager",void 0),Zl(this,"cacheToken",{}),Zl(this,"tokenKey",void 0),Zl(this,"tokenReady",void 0),Zl(this,"tokenType",void 0),Zl(this,"enableCookie",!1),Zl(this,"expiresTime",void 0),Zl(this,"cookieDomain",void 0),Zl(this,"enableTTwebid",!1),Zl(this,"enableCustomWebid",!1),Zl(this,"enableAnonymousid",!1),Zl(this,"timeout",void 0)}var e=t.prototype;return e.apply=function(t,e){var n=this;this.collect=t,this.config=e,this.configManager=this.collect.configManager,this.storage=new Zd,this.tokenKey="__tea_cache_tokens_"+e.app_id,this.enableAnonymousid=e.enable_anonymousid,this.enableTTwebid=e.enable_ttwebid,this.enableCustomWebid=e.enable_custom_webid,this.collect.on(rp.AnonymousId,function(t){n.setAnonymousId(t)}),this.collect.on(rp.ConfigUuid,function(t){n.setUuid(t)}),this.collect.on(rp.ConfigWebId,function(t){n.setWebId(t)}),this.timeout=e.timeout||3e5,this.enableCookie=e.cross_subdomain,this.expiresTime=e.cookie_expire||6048e5,this.cookieDomain=e.cookie_domain||"",this.checkStorage()},e.checkStorage=function(){var t=this;if(this.enableCookie){var e=this.storage.getCookie(this.tokenKey,this.cookieDomain);this.cacheToken=e&&"string"==typeof e?JSON.parse(e):{}}else this.cacheToken=this.storage.getLocalItem(this.tokenKey)||{};this.tokenType=this.cacheToken&&this.cacheToken._type_?this.cacheToken._type_:"default","custom"!==this.tokenType||this.enableCustomWebid||this.enableAnonymousid?this.enableAnonymousid?this.completeAnonymous(this.cacheToken):this.enableCustomWebid?this.collect.on(rp.CustomWebId,function(){t.tokenReady=!0,t.collect.emit(rp.TokenComplete)}):this.checkEnv()||(this.enableTTwebid?this.completeTtWid(this.cacheToken):this.check()):this.remoteWebid()},e.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.config.disable_webid?this.complete({web_id:mp(),user_unique_id:this.configManager.get("user_unique_id")||mp()}):this.remoteWebid()},e.checkEnv=function(){var t=window.navigator.userAgent;if(-1!==t.indexOf("miniProgram")||-1!==t.indexOf("MiniProgram")){var e=dd(window.location.href);return!(!e||!e.Web_ID)&&(this.complete({web_id:""+e.Web_ID,user_unique_id:this.configManager.get("user_unique_id")||""+e.Web_ID}),!0)}return!1},e.remoteWebid=function(){var t=this,e=this.configManager.getUrl("webid"),n={app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""};this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 发起WEBID请求",logType:"fetch",level:"info",time:Date.now(),data:n});var i=this.collect.cryptoData(n);this.collect.requestManager.useRequest({url:e,data:i,success:function(e){var n;if(e&&0===e.e)n=e.web_id,t.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"WEBID请求成功",logType:"fetch",level:"info",time:Date.now(),data:e});else{var i=t.getLocalId();n=i,t.collect.configManager.set({localWebId:i}),t.collect.emit(rp.TokenError),t.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"WEBID请求返回值异常",logType:"fetch",level:"warn",time:Date.now(),data:e}),t.collect.logger.warn("appid: "+t.config.app_id+" get webid error, use local webid~")}t.complete({web_id:t.configManager.get("web_id")||n,user_unique_id:t.configManager.get("user_unique_id")||n})},fail:function(){var e=t.getLocalId();t.complete({web_id:t.configManager.get("web_id")||e,user_unique_id:t.configManager.get("user_unique_id")||e}),t.collect.configManager.set({localWebId:e}),t.collect.emit(rp.TokenError),t.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"WEBID请求网络异常",logType:"fetch",level:"error",time:Date.now(),data:null}),t.collect.logger.warn("appid: "+t.config.app_id+", get webid error, use local webid~")},timeout:this.timeout,encryption:this.config.enable_encryption,encryption_header:this.config.encryption_header})},e.getLocalId=function(){for(var t=mp(),e=0;0===t.indexOf("0")||0===t.indexOf("9");){if(e>=10){t=t.replace(/^(0|9)/,"");break}t=mp(),e++}return t},e.complete=function(t){var e=t.web_id,n=t.user_unique_id;if(!e&&!n)return this.collect.emit(rp.TokenError),void console.warn("token error");t.timestamp=Date.now(),this.collect.configManager.set({web_id:e,user_unique_id:n}),this.setStorage(t),this.tokenReady=!0,this.collect.emit(rp.TokenComplete)},e.completeAnonymous=function(t){var e=t.anonymous_id||yp(),n=t.user_unique_id||this.configManager.get("user_unique_id");this.collect.configManager.set({anonymous_id:e,user_unique_id:n||e}),t.anonymous_id=e,t.user_unique_id=n||e,this.setStorage(t),this.tokenReady=!0,this.collect.emit(rp.TokenComplete)},e.completeTtWid=function(t){var e=t.user_unique_id||"",n=this.configManager.get("user_unique_id");this.configManager.set({user_unique_id:n||e}),this.setStorage(t),this.tokenReady=!0,this.collect.emit(rp.TokenComplete)},e.setUuid=function(t){if(t&&-1===["null","undefined","Null","None"].indexOf(t)){var e=String(t),n=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(e===n&&e===i)return;this.configManager.set({user_unique_id:e}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=e,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken),this.collect.emit(rp.TokenChange,{type:"uuid",id:t}),this.collect.emit(rp.SessionReset)}else this.clearUuid()},e.clearUuid=function(){if(!this.config.enable_ttwebid){var t=this.enableAnonymousid?this.configManager.get("anonymous_id"):this.configManager.get("web_id");this.configManager.get("user_unique_id")!==t&&(this.configManager.set({user_unique_id:t}),this.cacheToken.user_unique_id=t,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken),this.collect.emit(rp.TokenReset))}},e.setAnonymousId=function(t){if(t&&this.enableAnonymousid){var e=this.configManager.get("anonymous_id"),n=this.configManager.get("user_unique_id");e!==t&&(e!==n&&n||(this.configManager.set({user_unique_id:t}),this.cacheToken.user_unique_id=t,this.collect.emit(rp.TokenChange,{type:"uuid",id:t})),this.configManager.set({anonymous_id:t}),this.cacheToken.anonymous_id=t,this.collect.emit(rp.TokenChange,{type:"anonymous_id",id:t}),this.setStorage(this.cacheToken))}},e.setWebId=function(t){if(t&&!this.config.enable_ttwebid&&!this.enableAnonymousid){var e=this.configManager.get("web_id"),n=this.configManager.get("user_unique_id");n&&n!==e||(this.configManager.set({user_unique_id:t}),this.cacheToken.user_unique_id=t,this.collect.emit(rp.TokenChange,{type:"uuid",id:t})),e!==t&&(this.configManager.set({web_id:t}),this.cacheToken.web_id=t,this.collect.emit(rp.TokenChange,{type:"webid",id:t})),this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)}},e.setStorage=function(t){t._type_=this.enableCustomWebid?"custom":"default",delete t["diss".split("").reverse().join("")],this.enableCookie||this.enableTTwebid?this.storage.setCookie(this.tokenKey,t,this.expiresTime,this.cookieDomain):this.storage.setLocalItem(this.tokenKey,t),this.cacheToken=t},e.getReady=function(){return this.tokenReady},e.getTobId=function(){var t=this;this.configManager.getUrl("tobid");var e={app_id:this.config.app_id,user_unique_id:this.configManager.get("user_unique_id"),user_unique_id_type:this.configManager.get("user_unique_id_type")};this.enableAnonymousid?e.anonymous_id=this.configManager.get("anonymous_id"):e.web_id=this.configManager.get("web_id");var n=this.collect.cryptoData(e);return new Promise(function(e){t.collect.requestManager.useRequest({url:t.configManager.getUrl("tobid"),data:n,success:function(n){n&&0===n.e?(e(n.tobid),t.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"GetToken请求成功",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"})):(e(""),t.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"GetToken请求失败",logType:"fetch",level:"error",time:Date.now(),data:n,infoType:"sdk"}))},fail:function(){e(""),t.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"GetToken请求失败",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"})},timeout:t.timeout,encryption:t.config.enable_encryption,encryption_header:t.config.encryption_header,withCredentials:t.enableTTwebid})})},t}(),wp=function(){function t(t,e){var n=this;Zl(this,"collector",void 0),Zl(this,"config",void 0),Zl(this,"errorCode",void 0),Zl(this,"errorMessage",void 0),Zl(this,"requestType",void 0),Zl(this,"supportBeacon",void 0),Zl(this,"customHeader",void 0),this.collector=t,this.config=e,this.requestType=e.request_type||"xhr",this.supportBeacon=!(!window.navigator||!window.navigator.sendBeacon),this.errorCode={NO_URL:4001,IMG_ON:4e3,IMG_CATCH:4002,BEACON_FALSE:4003,XHR_ERROR:5002,TIMEOUT:5005,FETCH_ERROR:5006},this.errorMessage={BEACON_FALSE:"xhr sendbeacon error",XHR_ERROR:"xhr request error",BEACON:"xhr sendbeacon error",TIMEOUT:"xhr request timeout",FETCH_ERROR:"fetch network error",FETCH_RESPONSE_ERROR:"fetch response error"},this.customHeader=e.custom_request_header||{},this.collector.on(rp.CustomHeader,function(t){n.setRequestHeader(t)})}var e=t.prototype;return e.setRequestHeader=function(t){this.customHeader=Object.assign(this.customHeader,t)},e.useFetch=function(t){var e=this,n=t.url,i=t.data,r=t.method,o=t.success,s=t.fail,a=t.status,c=t.timeout,u=t.useBeacon,h=t.encryption,l=t.encryption_header;if(t.withCredentials,window.fetch&&"undefined"!=typeof Request){var f={method:r||"POST"};if(u){if(!("keepalive"in Request.prototype))return void this.useSendBeacon(t);var d=this.collector.configManager.get("browser"),p=this.collector.configManager.get("browser_version");if(p=p.split("."),"Chrome"===d&&p.length&&p[0]&&Number(p[0])<82)return void this.useSendBeacon(t);f.keepalive=!0}var g=h&&!vd()?i:JSON.stringify(i),v={"Content-Type":"application/json; charset=utf-8"};h&&l&&(v["Content-Type"]="application/octet-stream;tt-data="+l),f.body=g,f.headers=v;var m=null;m="undefined"!=typeof AbortController?new AbortController:{signal:null,abort:function(){}};var y=setTimeout(function(){m.abort()},c);if(Object.keys(this.customHeader).length)for(var b in this.customHeader)v[b]=this.customHeader[b];f.signal=m.signal;var _=Date.now();try{fetch(n,f).then(function(t){return t.ok||s&&s(i,t.status,_,t.statusText||e.errorMessage.FETCH_RESPONSE_ERROR),t.json()}).then(function(t){clearTimeout(y),o&&o(t,i,a,_,200)}).catch(function(t){clearTimeout(y),s&&s(i,e.errorCode.FETCH_ERROR,_,t.message||e.errorMessage.FETCH_ERROR)})}catch(e){this.useXhr(t),this.collector.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK useFetch 发送请求发生了一些问题",level:"error",time:Date.now(),data:e.message||"SDK useFetch has some errors",infoType:"sdk"})}}else u?this.useSendBeacon(t):this.useXhr(t),console.log("your browser not support fetch, use normal request")},e.useSendBeacon=function(t){if(this.supportBeacon){var e=t.url,n=t.data,i=t.status,r=t.success,o=t.fail,s=t.encryption,a=t.encryption_header,c=Date.now(),u=JSON.stringify(n);if(s&&a&&!vd()){if("undefined"==typeof Blob)return void this.useXhr(t);u=new Blob([n],{type:"application/octet-stream;tt-data="+a})}window.navigator.sendBeacon(e,u)?r&&r({e:0},n,i,c,200):o&&o(n,this.errorCode.BEACON_FALSE,c,this.errorMessage.BEACON_FALSE)}else this.useXhr(t)},e.useXhr=function(t){var e=this,n=t.url,i=t.data,r=t.method,o=t.success,s=t.fail,a=t.timeout;t.withCredentials;var c=t.encryption,u=t.encryption_header,h=t.status;try{var l=new XMLHttpRequest;l.open(r||"POST",n,!0);var f=Date.now();if(c&&u?l.setRequestHeader("Content-Type","application/octet-stream;tt-data="+u):l.setRequestHeader("Content-Type","application/json; charset=utf-8"),Object.keys(this.customHeader).length)for(var d in this.customHeader)l.setRequestHeader(d,this.customHeader[d]);a&&(l.timeout=a,l.ontimeout=function(){s&&s(i,e.errorCode.TIMEOUT,f,e.errorMessage.TIMEOUT)}),l.onload=function(){if(o){var t=null;if(l.responseText){try{t=JSON.parse(l.responseText)}catch(e){t={}}o(t,i,h,f,l.status)}else s&&s(i,e.errorCode.XHR_ERROR,f,e.errorMessage.XHR_ERROR)}},l.onerror=function(){s&&s(i,e.errorCode.XHR_ERROR,f,e.errorMessage.XHR_ERROR),l.abort()},c&&!vd()?l.send(i):l.send(JSON.stringify(i))}catch(t){this.collector.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK useXhr 发送请求发生了一些问题",level:"error",time:Date.now(),data:t.message,infoType:"sdk"})}},e.useRequest=function(t){var e=t.useBeacon;this.config.transport&&this.collector.configManager.getEnableClientTransport()?this.useCustomRequest(t):"fetch"!==this.requestType?e?this.useSendBeacon(t):this.useXhr(t):this.useFetch(t)},e.useCustomRequest=function(t){var e=this.config.transport,n=t.url,i=t.data,r=t.success,o=t.fail;if(e)try{e.post({url:n,data:JSON.stringify(i),success:function(t){r&&r(t,i)},fail:function(t){o&&o(t,i)}})}catch(e){this.collector.configManager.setEnableClientTransport(!1),this.useRequest(t)}},t}(),Ep=me.includes,Sp=s(function(){return!Array(1).includes()}),Tp=s(function(){return[,1].includes(void 0,1)});Le({target:"Array",proto:!0,forced:Sp||Tp},{includes:function(t){return Ep(this,t,arguments.length>1?arguments[1]:void 0)}}),Bn("includes"),Lo("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},zo);var Ap=TypeError,kp=gt("match"),xp=y("".indexOf);Le({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[kp]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~xp(Na(x(this)),Na(function(t){if(Td(t))throw new Ap("The method doesn't accept regular expressions");return t}(t)),arguments.length>1?arguments[1]:void 0)}});var Op=Set.prototype,Dp={Set:Set,add:y(Op.add),has:y(Op.has),remove:y(Op.delete),proto:Op},Ip=Dp.has,Rp=function(t){return Ip(t),t},Mp=Dp.add;Le({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=Rp(this),e=0,n=arguments.length;e<n;e++)Mp(t,arguments[e]);return t}});var Cp=Dp.remove;Le({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=Rp(this),n=!0,i=0,r=arguments.length;i<r;i++)t=Cp(e,arguments[i]),n=n&&t;return!!n}});var Bp=gt("iterator"),Pp=M("Set"),Lp=function(t){return function(t){return R(t)&&"number"==typeof t.size&&I(t.has)&&I(t.keys)}(t)?t:function(t){return void 0!==t[Bp]||void 0!==t["@@iterator"]||"Arguments"===w(t)}(t)?new Pp(t):t},Gp=Dp.Set,Np=Dp.proto,Up=y(Np.forEach),Fp=y(Np.keys),jp=Fp(new Gp).next,zp=function(t,e,n){return n?yl({iterator:Fp(t),next:jp},e):Up(t,e)},qp=Dp.Set,Vp=Dp.add,Hp=function(t){var e=new qp;return zp(t,function(t){Vp(e,t)}),e},Kp=Yn(Dp.proto,"size","get")||function(t){return t.size},Wp="Invalid size",Jp=RangeError,Xp=TypeError,$p=Math.max,Yp=function(t,e){this.set=t,this.size=$p(e,0),this.has=$(t.has),this.keys=$(t.keys)};Yp.prototype={getIterator:function(){return{iterator:t=Dt(h(this.keys,this.set)),next:t.next,done:!1};var t},includes:function(t){return h(this.has,this.set,t)}};var Zp=function(t){Dt(t);var e=+t.size;if(e!=e)throw new Xp(Wp);var n=ue(e);if(n<0)throw new Jp(Wp);return new Yp(t,n)},Qp=Dp.has,tg=Dp.remove,eg=function(t){var e=Rp(this),n=Zp(t),i=Hp(e);return Kp(i)<=n.size?zp(i,function(t){n.includes(t)&&tg(i,t)}):yl(n.getIterator(),function(t){Qp(i,t)&&tg(i,t)}),i};Le({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return h(eg,this,Lp(t))}}),Le({target:"Set",proto:!0,real:!0,forced:!0},{every:function(t){var e=Rp(this),n=Ue(t,arguments.length>1?arguments[1]:void 0);return!1!==zp(e,function(t){if(!n(t,t,e))return!1},!0)}});var ng=Dp.Set,ig=Dp.add;Le({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=Rp(this),n=Ue(t,arguments.length>1?arguments[1]:void 0),i=new ng;return zp(e,function(t){n(t,t,e)&&ig(i,t)}),i}}),Le({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=Rp(this),n=Ue(t,arguments.length>1?arguments[1]:void 0),i=zp(e,function(t){if(n(t,t,e))return{value:t}},!0);return i&&i.value}});var rg=Dp.Set,og=Dp.add,sg=Dp.has,ag=function(t){var e=Rp(this),n=Zp(t),i=new rg;return Kp(e)>n.size?yl(n.getIterator(),function(t){sg(e,t)&&og(i,t)}):zp(e,function(t){n.includes(t)&&og(i,t)}),i};Le({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return h(ag,this,Lp(t))}});var cg=Dp.has,ug=function(t){var e=Rp(this),n=Zp(t);if(Kp(e)<=n.size)return!1!==zp(e,function(t){if(n.includes(t))return!1},!0);var i=n.getIterator();return!1!==yl(i,function(t){if(cg(e,t))return ko(i.iterator,"normal",!1)})};Le({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return h(ug,this,Lp(t))}});var hg=function(t){var e=Rp(this),n=Zp(t);return!(Kp(e)>n.size)&&!1!==zp(e,function(t){if(!n.includes(t))return!1},!0)};Le({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return h(hg,this,Lp(t))}});var lg=Dp.has,fg=function(t){var e=Rp(this),n=Zp(t);if(Kp(e)<n.size)return!1;var i=n.getIterator();return!1!==yl(i,function(t){if(!lg(e,t))return ko(i.iterator,"normal",!1)})};Le({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return h(fg,this,Lp(t))}});var dg=y([].join),pg=y([].push);Le({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=Rp(this),n=void 0===t?",":Na(t),i=[];return zp(e,function(t){pg(i,t)}),dg(i,n)}});var gg=Dp.Set,vg=Dp.add;Le({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=Rp(this),n=Ue(t,arguments.length>1?arguments[1]:void 0),i=new gg;return zp(e,function(t){vg(i,n(t,t,e))}),i}});var mg=TypeError;Le({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=Rp(this),n=arguments.length<2,i=n?void 0:arguments[1];if($(t),zp(e,function(r){n?(n=!1,i=r):i=t(i,r,r,e)}),n)throw new mg("Reduce of empty set with no initial value");return i}}),Le({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=Rp(this),n=Ue(t,arguments.length>1?arguments[1]:void 0);return!0===zp(e,function(t){if(n(t,t,e))return!0},!0)}});var yg=Dp.add,bg=Dp.has,_g=Dp.remove,wg=function(t){var e=Rp(this),n=Zp(t).getIterator(),i=Hp(e);return yl(n,function(t){bg(e,t)?_g(i,t):yg(i,t)}),i};Le({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return h(wg,this,Lp(t))}});var Eg=Dp.add,Sg=function(t){var e=Rp(this),n=Zp(t).getIterator(),i=Hp(e);return yl(n,function(t){Eg(i,t)}),i};Le({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return h(Sg,this,Lp(t))}});var Tg=Function,Ag=y([].concat),kg=y([].join),xg={},Og=c?Tg.bind:function(t){var e=$(this),n=e.prototype,i=Gi(arguments,1),r=function(){var n=Ag(i,Gi(arguments));return this instanceof r?function(t,e,n){if(!at(xg,e)){for(var i=[],r=0;r<e;r++)i[r]="a["+r+"]";xg[e]=Tg("C,a","return new C("+kg(i,",")+")")}return xg[e](t,n)}(e,n.length,n):e.apply(t,n)};return R(n)&&(r.prototype=n),r};Le({target:"Function",proto:!0,forced:Function.bind!==Og},{bind:Og});var Dg=function(){function t(t){var e=this;Zl(this,"element",void 0),Zl(this,"isDragging",void 0),Zl(this,"animationFrameId",void 0),Zl(this,"lastX",void 0),Zl(this,"lastY",void 0),Zl(this,"offsetX",void 0),Zl(this,"offsetY",void 0),Zl(this,"initialX",void 0),Zl(this,"initialY",void 0),Zl(this,"clickAllowed",void 0),Zl(this,"dragThreshold",void 0),Zl(this,"enableClick",void 0),Zl(this,"onMove",function(t){if(e.isDragging){var n=t.clientX||t.touches[0].clientX,i=t.clientY||t.touches[0].clientY;if(e.clickAllowed){var r=Math.abs(n-e.initialX),o=Math.abs(i-e.initialY);(r>e.dragThreshold||o>e.dragThreshold)&&(e.clickAllowed=!1)}e.animationFrameId&&cancelAnimationFrame(e.animationFrameId),e.animationFrameId=requestAnimationFrame(function(){var n=t.touches?t.touches[0].clientX:t.clientX,i=t.touches?t.touches[0].clientY:t.clientY,r=n-e.offsetX,o=i-e.offsetY,s=window.innerWidth-e.element.offsetWidth,a=window.innerHeight-e.element.offsetHeight;r=Math.max(0,Math.min(r,s)),o=Math.max(0,Math.min(o,a)),e.element.style.transform="translate(\n "+(r-e.initialX)+"px, \n "+(o-e.initialY)+"px\n )"})}}),Zl(this,"onEnd",function(){if(e.isDragging){e.isDragging=!1;var t=new DOMMatrix(getComputedStyle(e.element).transform),n=e.initialX+t.m41,i=e.initialY+t.m42;e.element.style.left=n+"px",e.element.style.top=i+"px",e.element.style.transform="none",e.initialX=n,e.initialY=i,document.removeEventListener("mousemove",e.onMove),document.removeEventListener("mouseup",e.onEnd),document.removeEventListener("touchmove",e.onMove),document.removeEventListener("touchend",e.onEnd),setTimeout(function(){e.clickAllowed=!0},50)}}),this.element=t,this.isDragging=!1,this.enableClick=!1,this.animationFrameId=null,this.lastX=0,this.lastY=0,this.initialX=0,this.initialY=0,this.offsetX=0,this.offsetY=0,this.clickAllowed=!0,this.dragThreshold=1,this.initPosition(),this.bindEvents(),this.bindClickHandler()}var e=t.prototype;return e.initPosition=function(){var t=this.element.getBoundingClientRect();this.element.style.position="fixed",this.element.style.left=t.left+"px",this.element.style.top=t.top+"px",this.element.style.transform="translate(0, 0)"},e.bindEvents=function(){this.element.addEventListener("mousedown",this.onStart.bind(this)),this.element.addEventListener("touchstart",this.onStart.bind(this))},e.onStart=function(t){t.preventDefault(),this.initialX=t.clientX||t.touches[0].clientX,this.initialY=t.clientY||t.touches[0].clientY;var e=t.touches?t.touches[0].clientX:t.clientX,n=t.touches?t.touches[0].clientY:t.clientY,i=this.element.getBoundingClientRect();this.initialX=i.left,this.initialY=i.top,this.offsetX=e-this.initialX,this.offsetY=n-this.initialY,this.clickAllowed=!0,this.isDragging=!0,document.addEventListener("mousemove",this.onMove),document.addEventListener("mouseup",this.onEnd),document.addEventListener("touchmove",this.onMove),document.addEventListener("touchend",this.onEnd)},e.bindClickHandler=function(){var t=this;this.element.addEventListener("click",function(e){if(t.enableClick)return t.clickAllowed?void(window&&window.postMessage({type:"devtool:web:open-draw"},location.origin)):(e.stopImmediatePropagation(),void e.preventDefault())})},e.enable=function(){this.enableClick=!0,this.element.style.cursor="pointer",this.element.style.opacity="1"},t}(),Ig=function(){function t(t,e){Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"devToolReady",!1),Zl(this,"devToolOrigin","*"),Zl(this,"sendAlready",!1),Zl(this,"app_id",void 0),Zl(this,"info",void 0),Zl(this,"log",void 0),Zl(this,"event",void 0),Zl(this,"filterEvent",void 0),Zl(this,"cacheStorgae",void 0),Zl(this,"loadUrl",void 0),Zl(this,"trackEnabled",!0),Zl(this,"currentAppKey",void 0),Zl(this,"debugButton",void 0),e.disable_debug||"Microsoft Internet Explorer"!==t.configManager.get("browser")&&(this.collect=t,this.config=e,this.app_id=e.app_id,this.trackEnabled=!!e.track_enabled,this.cacheStorgae=new Zd,this.currentAppKey="__applog_load_devtool_web_"+this.app_id,this.loadUrl=e.devtool_url||"https://lf-static.applogcdn.com/obj/applog-sdk-static/log-sdk/collect/devtool/debug-web.v2.0.1.js",this.filterEvent=new Set(["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","bav2b_page","bav2b_beat","bav2b_page_statistics","bav2b_click","bav2b_page_exposure","_be_active","predefine_pageview","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append","predefine_page_alive","predefine_page_close","abtest_exposure"]),this.load())}var e=t.prototype;return e.loadScript=function(t){var e=this;try{var n=document.createElement("script");n.src=t,n.onerror=function(){console.log("load DevTool render fail")},n.onload=function(){e.enableDebugButton(),console.log("load DevTool render success")},document.getElementsByTagName("body")[0].appendChild(n)}catch(t){console.log("devTool load fail, "+t.message)}},e.parseUrl=function(){var t={};try{var e=window.location.href.split("?")[1].split("&");e.length&&e.forEach(function(e){var n=e.split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])})}catch(t){}return t},e.load=function(){try{var t=this.parseUrl();if(0==t.open_devtool_web)return void this.cacheStorgae.removeLocalItem("__applog_open_devtool_web");if(t.open_devtool_web&&t.app_id){if(parseInt(t.app_id)!==this.app_id)return}else if(!this.getStorage())return;this.loadBaseInfo(),this.loadHook(),this.setStorage(),this.addLintener(),this.loadDevTool()}catch(t){console.log("debug fail, "+t.message)}},e.getStorage=function(){var t=this.cacheStorgae.getLocalItem("__applog_open_devtool_web");return t&&parseInt(t)===this.app_id},e.setStorage=function(){this.cacheStorgae.setLocalItem("__applog_open_devtool_web",this.app_id),this.cacheStorgae.setLocalItem("__applog_devtool_web_track_enable",this.trackEnabled)},e.loadDevTool=function(){1==this.cacheStorgae.getLocalItem(this.currentAppKey)?console.warn("your appid: "+this.app_id+" has load web devtools already, maybe your page has more than two applogsdk and use one appid"):(this.loadDebuggerModule(),this.loadScript(this.loadUrl))},e.loadBaseInfo=function(){if(this.log=[],this.event=[],this.info=[{title:"基本信息",key:"base",type:1,content:[{name:"app_id",desc:"APP_ID",value:this.config.app_id},{name:"channel",desc:"CHANNEL",value:this.config.channel},{name:"domain",desc:"上报域名",value:this.collect.configManager.getDomain()},{name:"sdk_version",desc:"SDK版本",value:ep},{name:"sdk_type",desc:"SDK引入方式",value:"npm"}]},{title:"用户信息",key:"user",type:2,content:[{name:"uuid",desc:"UUID",value:this.collect.configManager.get("user").user_unique_id||""},{name:"web_id",desc:"WEB_ID",value:this.collect.configManager.get("user").web_id||""}]},{title:"公共参数信息",type:2,key:"common",content:[{name:"browser",desc:"浏览器",value:this.collect.configManager.get("browser")},{name:"browser_version",desc:"浏览器版本",value:this.collect.configManager.get("browser_version")},{name:"platform",desc:"平台",value:this.collect.configManager.get("platform")},{name:"device_model",desc:"设备型号",value:this.collect.configManager.get("device_model")},{name:"os_name",desc:"操作系统",value:this.collect.configManager.get("os_name")},{name:"os_version",desc:"操作系统版本",value:this.collect.configManager.get("os_version")},{name:"resolution",desc:"屏幕分辨率",value:this.collect.configManager.get("resolution")},{name:"referrer",desc:"来源",value:this.collect.configManager.get("referrer")},{name:"custom",desc:"自定义信息",value:JSON.stringify(this.collect.configManager.get("custom"))}]},{title:"配置信息",key:"config",type:3,content:[{name:"autotrack",desc:"全埋点",value:!!this.config.autotrack},{name:"stay",desc:"停留时长",value:!!this.config.enable_stay_duration}]},{title:"A/B配置信息",key:"ab",type:4,content:[{name:"ab",desc:"A/B实验",value:!!this.config.enable_ab_test}]}],this.config.enable_ab_test){var t=this.getInfo("ab"),e=[{name:"ab",desc:"A/B实验",value:!!this.config.enable_ab_test},{name:"vid",desc:"已曝光VID",value:this.collect.configManager.getAbVersion()},{name:"ab_domain",desc:"A/B域名",value:this.config.ab_channel_domain||ud(np[this.config.channel])},{name:"all_values",desc:"全部配置",value:this.collect.configManager.getAbCache()}];t.content=e,this.setInfo("ab",t)}if(this.config.enable_native||this.config.Native){var n={title:"客户端信息",type:3,content:[{name:"native",desc:"是否打通",value:!!this.collect.bridgeReport}]};this.setInfo("native",n)}if(ep.includes("tob")){var i=this.getInfo("user");i.content.push({name:"sid",desc:"DISS".split("").reverse().join(""),value:"点击获取"}),this.setInfo("user",i)}},e.getInfo=function(t){var e=null;return this.info.forEach(function(n){n.key===t&&(e=n)}),e},e.setInfo=function(t,e){var n=!1;this.info.forEach(function(i){i.key===t&&(n=!0,i=e)}),n||this.info.push(e)},e.getSecondInfo=function(t,e){var n=this.getInfo(t),i=null;return n.content.forEach(function(t){t.name===e&&(i=t)}),i},e.setSecondInfo=function(t,e,n){var i=this.getInfo(t),r=!1;if(i.content.forEach(function(t){t.name===e&&(t.value=n,r=!0)}),!r){var o={name:e,value:n,desc:e.toLocaleUpperCase()};i.content.push(o)}this.setInfo(t,i)},e.loadHook=function(){var t=this;this.collect.on(op.DEBUGGER_MESSAGE,function(e){switch(e.type){case op.DEBUGGER_MESSAGE_SDK:var n={time:e.time,type:e.logType||"sdk",infoType:e.infoType||"sdk",level:e.level,name:e.info,show:!0,levelShow:!0,needDesc:!!e.data};if(e.data&&(n.desc={content:JSON.stringify(e.data)}),t.updateLog(n),e.secType&&"AB"===e.secType)t.setSecondInfo("ab","vid",t.collect.configManager.getAbVersion()),t.setSecondInfo("ab","all_values",t.collect.configManager.getAbCache());else if("USER"===e.secType)t.setSecondInfo("user","user_unique_id"===e.common?"uuid":e.common,t.collect.configManager.get(e.common));else if("HEADER"===e.secType){var i=t.collect.configManager.get(e.common);t.setSecondInfo("common",e.common,"custom"===e.common?JSON.stringify(i):i)}return void t.updateInfo();case op.DEBUGGER_MESSAGE_EVENT:if(e.data&&e.data.length){var r=e.data[0],o=r.events;if(!o.length)return;o.forEach(function(n){n.checkShow=!0,n.searchShow=!0,n.focusShow=!0,n.status=e.status,n.type=t.filterEvent.has(n.event)?"sdk":"cus",n.verifyType=e.verifyType?"verify":"no",n.info="","fail"===e.status&&(n.info={message:"code: "+e.code+", msg: "+(e.msg||e.failType)})}),t.updateEvent(r)}return}})},e.addLintener=function(){var t=this;window.addEventListener("message",function(e){if(e&&e.data&&"devtool:web:ready"===e.data.type){if(t.devToolOrigin=e.origin,t.devToolReady=!0,t.sendAlready)return;t.sendData("devtool:web:init",{info:t.info,log:t.log,event:t.event,sdk_type:ep.includes("tob")?"tob":"inner",appId:t.app_id}),t.sendAlready=!0}e&&e.data&&"devtool:web:ssid"===e.data.type&&t.collect.getToken(function(e){t.setSecondInfo("user","sid",e.tobid),t.updateInfo()})})},e.sendData=function(t,e){try{var n={type:t,payload:e};window&&window.postMessage(n,this.devToolOrigin)}catch(t){}},e.updateInfo=function(){this.devToolReady&&this.sendData("devtool:web:info",this.info)},e.updateLog=function(t){this.devToolReady?this.sendData("devtool:web:log",t):this.log.push(t)},e.updateEvent=function(t){this.devToolReady?this.sendData("devtool:web:event",t):this.event.push(t)},e.loadDebuggerModule=function(){var t=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.appendChild(document.createTextNode("#debugger-applog-web {\n position: fixed;\n width: 90px;\n height: 30px;\n background: #23c243;\n border-radius: 6px;\n color: #fff;\n font-size: 12px;\n bottom: 5%;\n right: 10%;\n text-align: center;\n line-height: 30px;\n cursor: not-allowed;\n z-index:1000;\n font-weight:bold;\n opacity: 0.6;\n }")),t.appendChild(e);var n=document.createElement("div");n.innerHTML='<div id="debugger-applog-web" class="debugger-applog-web">AppLog调试</div>';var i=document.createElement("div");i.innerHTML='<div id="debugger-container" class="debugger-container"></div>',document.getElementsByTagName("body")[0].appendChild(n),document.getElementsByTagName("body")[0].appendChild(i);var r=document.getElementById("debugger-applog-web");this.debugButton=new Dg(r)},e.enableDebugButton=function(){this.debugButton&&this.debugButton.enable()},t}(),Rg=e(function(e,n){(function(){var t;function n(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function i(){return new n(null)}var r="undefined"!=typeof navigator;r&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(t,e,n,i,r,o){for(var s=32767&e,a=e>>15;--o>=0;){var c=32767&this[t],u=this[t++]>>15,h=a*c+u*s;r=((c=s*c+((32767&h)<<15)+n[i]+(1073741823&r))>>>30)+(h>>>15)+a*u+(r>>>30),n[i++]=1073741823&c}return r},t=30):r&&"Netscape"!=navigator.appName?(n.prototype.am=function(t,e,n,i,r,o){for(;--o>=0;){var s=e*this[t++]+n[i]+r;r=Math.floor(s/67108864),n[i++]=67108863&s}return r},t=26):(n.prototype.am=function(t,e,n,i,r,o){for(var s=16383&e,a=e>>14;--o>=0;){var c=16383&this[t],u=this[t++]>>14,h=a*c+u*s;r=((c=s*c+((16383&h)<<14)+n[i]+r)>>28)+(h>>14)+a*u,n[i++]=268435455&c}return r},t=28),n.prototype.DB=t,n.prototype.DM=(1<<t)-1,n.prototype.DV=1<<t;n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-t,n.prototype.F2=2*t-52;var o,s,a=new Array;for(o="0".charCodeAt(0),s=0;s<=9;++s)a[o++]=s;for(o="a".charCodeAt(0),s=10;s<36;++s)a[o++]=s;for(o="A".charCodeAt(0),s=10;s<36;++s)a[o++]=s;function c(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function u(t,e){var n=a[t.charCodeAt(e)];return null==n?-1:n}function h(t){var e=i();return e.fromInt(t),e}function l(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function f(t){this.m=t}function d(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function p(t,e){return t&e}function g(t,e){return t|e}function v(t,e){return t^e}function m(t,e){return t&~e}function y(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function b(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function _(){}function w(t){return t}function E(t){this.r2=i(),this.q3=i(),n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}f.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},f.prototype.revert=function(t){return t},f.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},f.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},f.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},d.prototype.convert=function(t){var e=i();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e},d.prototype.revert=function(t){var e=i();return t.copyTo(e),this.reduce(e),e},d.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],i=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},d.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},n.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},n.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},n.prototype.fromString=function(t,e){var i;if(16==e)i=4;else if(8==e)i=3;else if(256==e)i=8;else if(2==e)i=1;else if(32==e)i=5;else{if(4!=e)return void this.fromRadix(t,e);i=2}this.t=0,this.s=0;for(var r=t.length,o=!1,s=0;--r>=0;){var a=8==i?255&t[r]:u(t,r);a<0?"-"==t.charAt(r)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+i>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=i)>=this.DB&&(s-=this.DB))}8==i&&128&t[0]&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},n.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},n.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},n.prototype.lShiftTo=function(t,e){var n,i=t%this.DB,r=this.DB-i,o=(1<<r)-1,s=Math.floor(t/this.DB),a=this.s<<i&this.DM;for(n=this.t-1;n>=0;--n)e[n+s+1]=this[n]>>r|a,a=(this[n]&o)<<i;for(n=s-1;n>=0;--n)e[n]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},n.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var i=t%this.DB,r=this.DB-i,o=(1<<i)-1;e[0]=this[n]>>i;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<r,e[s-n]=this[s]>>i;i>0&&(e[this.t-n-1]|=(this.s&o)<<r),e.t=this.t-n,e.clamp()}},n.prototype.subTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]-t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i-=t[n],e[n++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=this.DV+i:i>0&&(e[n++]=i),e.t=n,e.clamp()},n.prototype.multiplyTo=function(t,e){var i=this.abs(),r=t.abs(),o=i.t;for(e.t=o+r.t;--o>=0;)e[o]=0;for(o=0;o<r.t;++o)e[o+i.t]=i.am(0,r[o],e,o,0,i.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)},n.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var i=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,i,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},n.prototype.divRemTo=function(t,e,r){var o=t.abs();if(!(o.t<=0)){var s=this.abs();if(s.t<o.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=i());var a=i(),c=this.s,u=t.s,h=this.DB-l(o[o.t-1]);h>0?(o.lShiftTo(h,a),s.lShiftTo(h,r)):(o.copyTo(a),s.copyTo(r));var f=a.t,d=a[f-1];if(0!=d){var p=d*(1<<this.F1)+(f>1?a[f-2]>>this.F2:0),g=this.FV/p,v=(1<<this.F1)/p,m=1<<this.F2,y=r.t,b=y-f,_=null==e?i():e;for(a.dlShiftTo(b,_),r.compareTo(_)>=0&&(r[r.t++]=1,r.subTo(_,r)),n.ONE.dlShiftTo(f,_),_.subTo(a,a);a.t<f;)a[a.t++]=0;for(;--b>=0;){var w=r[--y]==d?this.DM:Math.floor(r[y]*g+(r[y-1]+m)*v);if((r[y]+=a.am(0,w,r,b,0,f))<w)for(a.dlShiftTo(b,_),r.subTo(_,r);r[y]<--w;)r.subTo(_,r)}null!=e&&(r.drShiftTo(f,e),c!=u&&n.ZERO.subTo(e,e)),r.t=f,r.clamp(),h>0&&r.rShiftTo(h,r),c<0&&n.ZERO.subTo(r,r)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var r=i(),o=i(),s=e.convert(this),a=l(t)-1;for(s.copyTo(r);--a>=0;)if(e.sqrTo(r,o),(t&1<<a)>0)e.mulTo(o,s,r);else{var c=r;r=o,o=c}return e.revert(r)},n.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,i=(1<<e)-1,r=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(r=!0,o=c(n));s>=0;)a<e?(n=(this[s]&(1<<a)-1)<<e-a,n|=this[--s]>>(a+=this.DB-e)):(n=this[s]>>(a-=e)&i,a<=0&&(a+=this.DB,--s)),n>0&&(r=!0),r&&(o+=c(n));return r?o:"0"},n.prototype.negate=function(){var t=i();return n.ZERO.subTo(this,t),t},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+l(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(t){var e=i();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e},n.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new f(e):new d(e),this.exp(t,n)},n.ZERO=h(0),n.ONE=h(1),_.prototype.convert=w,_.prototype.revert=w,_.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},_.prototype.sqrTo=function(t,e){t.squareTo(e)},E.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=i();return t.copyTo(e),this.reduce(e),e},E.prototype.revert=function(t){return t},E.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},E.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},E.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var S,T,A,k=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],x=(1<<26)/k[k.length-1];function O(){var t;t=(new Date).getTime(),T[A++]^=255&t,T[A++]^=t>>8&255,T[A++]^=t>>16&255,T[A++]^=t>>24&255,A>=P&&(A-=P)}if(n.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},n.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=h(n),o=i(),s=i(),a="";for(this.divRemTo(r,o,s);o.signum()>0;)a=(n+s.intValue()).toString(t).substr(1)+a,o.divRemTo(r,o,s);return s.intValue().toString(t)+a},n.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),r=Math.pow(e,i),o=!1,s=0,a=0,c=0;c<t.length;++c){var h=u(t,c);h<0?"-"==t.charAt(c)&&0==this.signum()&&(o=!0):(a=e*a+h,++s>=i&&(this.dMultiply(r),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(t,e,i){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),g,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var r=new Array,o=7&t;r.length=1+(t>>3),e.nextBytes(r),o>0?r[0]&=(1<<o)-1:r[0]=0,this.fromString(r,256)}},n.prototype.bitwiseTo=function(t,e,n){var i,r,o=Math.min(t.t,this.t);for(i=0;i<o;++i)n[i]=e(this[i],t[i]);if(t.t<this.t){for(r=t.s&this.DM,i=o;i<this.t;++i)n[i]=e(this[i],r);n.t=this.t}else{for(r=this.s&this.DM,i=o;i<t.t;++i)n[i]=e(r,t[i]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},n.prototype.changeBit=function(t,e){var i=n.ONE.shiftLeft(t);return this.bitwiseTo(i,e,i),i},n.prototype.addTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]+t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i+=t[n],e[n++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[n++]=i:i<-1&&(e[n++]=this.DV+i),e.t=n,e.clamp()},n.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},n.prototype.multiplyLowerTo=function(t,e,n){var i,r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},n.prototype.multiplyUpperTo=function(t,e,n){--e;var i=n.t=this.t+t.t-e;for(n.s=0;--i>=0;)n[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)n[this.t+i-e]=this.am(e-i,t[i],n,0,0,this.t+i-e);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var i=this.t-1;i>=0;--i)n=(e*n+this[i])%t;return n},n.prototype.millerRabin=function(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var o=e.shiftRight(r);(t=t+1>>1)>k.length&&(t=k.length);for(var s=i(),a=0;a<t;++a){s.fromInt(k[Math.floor(Math.random()*k.length)]);var c=s.modPow(o,this);if(0!=c.compareTo(n.ONE)&&0!=c.compareTo(e)){for(var u=1;u++<r&&0!=c.compareTo(e);)if(0==(c=c.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=c.compareTo(e))return!1}}return!0},n.prototype.clone=function(){var t=i();return this.copyTo(t),t},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var n,i=this.DB-t*this.DB%8,r=0;if(t-- >0)for(i<this.DB&&(n=this[t]>>i)!=(this.s&this.DM)>>i&&(e[r++]=n|this.s<<this.DB-i);t>=0;)i<8?(n=(this[t]&(1<<i)-1)<<8-i,n|=this[--t]>>(i+=this.DB-8)):(n=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),128&n&&(n|=-256),0==r&&(128&this.s)!=(128&n)&&++r,(r>0||n!=this.s)&&(e[r++]=n);return e},n.prototype.equals=function(t){return 0==this.compareTo(t)},n.prototype.min=function(t){return this.compareTo(t)<0?this:t},n.prototype.max=function(t){return this.compareTo(t)>0?this:t},n.prototype.and=function(t){var e=i();return this.bitwiseTo(t,p,e),e},n.prototype.or=function(t){var e=i();return this.bitwiseTo(t,g,e),e},n.prototype.xor=function(t){var e=i();return this.bitwiseTo(t,v,e),e},n.prototype.andNot=function(t){var e=i();return this.bitwiseTo(t,m,e),e},n.prototype.not=function(){for(var t=i(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},n.prototype.shiftLeft=function(t){var e=i();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},n.prototype.shiftRight=function(t){var e=i();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},n.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+y(this[t]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=b(this[n]^e);return t},n.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},n.prototype.setBit=function(t){return this.changeBit(t,g)},n.prototype.clearBit=function(t){return this.changeBit(t,m)},n.prototype.flipBit=function(t){return this.changeBit(t,v)},n.prototype.add=function(t){var e=i();return this.addTo(t,e),e},n.prototype.subtract=function(t){var e=i();return this.subTo(t,e),e},n.prototype.multiply=function(t){var e=i();return this.multiplyTo(t,e),e},n.prototype.divide=function(t){var e=i();return this.divRemTo(t,e,null),e},n.prototype.remainder=function(t){var e=i();return this.divRemTo(t,null,e),e},n.prototype.divideAndRemainder=function(t){var e=i(),n=i();return this.divRemTo(t,e,n),new Array(e,n)},n.prototype.modPow=function(t,e){var n,r,o=t.bitLength(),s=h(1);if(o<=0)return s;n=o<18?1:o<48?3:o<144?4:o<768?5:6,r=o<8?new f(e):e.isEven()?new E(e):new d(e);var a=new Array,c=3,u=n-1,p=(1<<n)-1;if(a[1]=r.convert(this),n>1){var g=i();for(r.sqrTo(a[1],g);c<=p;)a[c]=i(),r.mulTo(g,a[c-2],a[c]),c+=2}var v,m,y=t.t-1,b=!0,_=i();for(o=l(t[y])-1;y>=0;){for(o>=u?v=t[y]>>o-u&p:(v=(t[y]&(1<<o+1)-1)<<u-o,y>0&&(v|=t[y-1]>>this.DB+o-u)),c=n;!(1&v);)v>>=1,--c;if((o-=c)<0&&(o+=this.DB,--y),b)a[v].copyTo(s),b=!1;else{for(;c>1;)r.sqrTo(s,_),r.sqrTo(_,s),c-=2;c>0?r.sqrTo(s,_):(m=s,s=_,_=m),r.mulTo(_,a[v],s)}for(;y>=0&&!(t[y]&1<<o);)r.sqrTo(s,_),m=s,s=_,_=m,--o<0&&(o=this.DB-1,--y)}return r.revert(s)},n.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var i=t.clone(),r=this.clone(),o=h(1),s=h(0),a=h(0),c=h(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;r.isEven();)r.rShiftTo(1,r),e?(a.isEven()&&c.isEven()||(a.addTo(this,a),c.subTo(t,c)),a.rShiftTo(1,a)):c.isEven()||c.subTo(t,c),c.rShiftTo(1,c);i.compareTo(r)>=0?(i.subTo(r,i),e&&o.subTo(a,o),s.subTo(c,s)):(r.subTo(i,r),e&&a.subTo(o,a),c.subTo(s,c))}return 0!=r.compareTo(n.ONE)?n.ZERO:c.compareTo(t)>=0?c.subtract(t):c.signum()<0?(c.addTo(t,c),c.signum()<0?c.add(t):c):c},n.prototype.pow=function(t){return this.exp(t,new _)},n.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var i=e;e=n,n=i}var r=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(r<o&&(o=r),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(r=e.getLowestSetBit())>0&&e.rShiftTo(r,e),(r=n.getLowestSetBit())>0&&n.rShiftTo(r,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},n.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=k[k.length-1]){for(e=0;e<k.length;++e)if(n[0]==k[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<k.length;){for(var i=k[e],r=e+1;r<k.length&&i<x;)i*=k[r++];for(i=n.modInt(i);e<r;)if(i%k[e++]==0)return!1}return n.millerRabin(t)},n.prototype.square=function(){var t=i();return this.squareTo(t),t},n.prototype.Barrett=E,null==T){var D;if(T=new Array,A=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var I=new Uint8Array(32);for(window.crypto.getRandomValues(I),D=0;D<32;++D)T[A++]=I[D]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var R=window.crypto.random(32);for(D=0;D<R.length;++D)T[A++]=255&R.charCodeAt(D)}for(;A<P;)D=Math.floor(65536*Math.random()),T[A++]=D>>>8,T[A++]=255&D;A=0,O()}function M(){if(null==S){for(O(),(S=new B).init(T),A=0;A<T.length;++A)T[A]=0;A=0}return S.next()}function C(){}function B(){this.i=0,this.j=0,this.S=new Array}C.prototype.nextBytes=function(t){var e;for(e=0;e<t.length;++e)t[e]=M()},B.prototype.init=function(t){var e,n,i;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[n],this.S[n]=i;this.i=0,this.j=0},B.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var P=256;e.exports={default:n,BigInteger:n,SecureRandom:C}}).call(t)});Rg.BigInteger,Rg.SecureRandom;const{BigInteger:Mg}=Rg;class Cg{constructor(){this.tlv=null,this.t="00",this.l="00",this.v=""}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){const t=this.v.length/2;let e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;return(128+e.length/2).toString(16)+e}getValue(){return""}}class Bg extends Cg{constructor(t){super(),this.t="02",t&&(this.v=function(t){let e=t.toString(16);if("-"!==e[0])e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{e=e.substr(1);let n=e.length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);let i="";for(let t=0;t<n;t++)i+="f";i=new Mg(i,16),e=i.xor(t).add(Mg.ONE),e=e.toString(16).replace(/^-/,"")}return e}(t))}getValue(){return this.v}}class Pg extends Cg{constructor(t){super(),this.t="30",this.asn1Array=t}getValue(){return this.v=this.asn1Array.map(t=>t.getEncodedHex()).join(""),this.v}}function Lg(t,e){return+t[e+2]<8?1:128&+t.substr(e+2,2)}function Gg(t,e){const n=Lg(t,e),i=t.substr(e+2,2*n);if(!i)return-1;return(+i[0]<8?new Mg(i,16):new Mg(i.substr(2),16)).intValue()}function Ng(t,e){return e+2*(Lg(t,e)+1)}var Ug={encodeDer(t,e){const n=new Bg(t),i=new Bg(e);return new Pg([n,i]).getEncodedHex()},decodeDer(t){const e=Ng(t,0),n=Ng(t,e),i=Gg(t,e),r=t.substr(n,2*i),o=n+r.length,s=Ng(t,o),a=Gg(t,o),c=t.substr(s,2*a);return{r:new Mg(r,16),s:new Mg(c,16)}}};const{BigInteger:Fg}=Rg,jg=new Fg("2"),zg=new Fg("3");class qg{constructor(t,e){this.x=e,this.q=t}equals(t){return t===this||this.q.equals(t.q)&&this.x.equals(t.x)}toBigInteger(){return this.x}negate(){return new qg(this.q,this.x.negate().mod(this.q))}add(t){return new qg(this.q,this.x.add(t.toBigInteger()).mod(this.q))}subtract(t){return new qg(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))}multiply(t){return new qg(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))}divide(t){return new qg(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))}square(){return new qg(this.q,this.x.square().mod(this.q))}}class Vg{constructor(t,e,n,i){this.curve=t,this.x=e,this.y=n,this.z=null==i?Fg.ONE:i,this.zinv=null}getX(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}getY(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}equals(t){if(t===this)return!0;if(this.isInfinity())return t.isInfinity();if(t.isInfinity())return this.isInfinity();if(!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(Fg.ZERO))return!1;return t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(Fg.ZERO)}isInfinity(){return null===this.x&&null===this.y||this.z.equals(Fg.ZERO)&&!this.y.toBigInteger().equals(Fg.ZERO)}negate(){return new Vg(this.curve,this.x,this.y.negate(),this.z)}add(t){if(this.isInfinity())return t;if(t.isInfinity())return this;const e=this.x.toBigInteger(),n=this.y.toBigInteger(),i=this.z,r=t.x.toBigInteger(),o=t.y.toBigInteger(),s=t.z,a=this.curve.q,c=e.multiply(s).mod(a),u=r.multiply(i).mod(a),h=c.subtract(u),l=n.multiply(s).mod(a),f=o.multiply(i).mod(a),d=l.subtract(f);if(Fg.ZERO.equals(h))return Fg.ZERO.equals(d)?this.twice():this.curve.infinity;const p=c.add(u),g=i.multiply(s).mod(a),v=h.square().mod(a),m=h.multiply(v).mod(a),y=g.multiply(d.square()).subtract(p.multiply(v)).mod(a),b=h.multiply(y).mod(a),_=d.multiply(v.multiply(c).subtract(y)).subtract(l.multiply(m)).mod(a),w=m.multiply(g).mod(a);return new Vg(this.curve,this.curve.fromBigInteger(b),this.curve.fromBigInteger(_),w)}twice(){if(this.isInfinity())return this;if(!this.y.toBigInteger().signum())return this.curve.infinity;const t=this.x.toBigInteger(),e=this.y.toBigInteger(),n=this.z,i=this.curve.q,r=this.curve.a.toBigInteger(),o=t.square().multiply(zg).add(r.multiply(n.square())).mod(i),s=e.shiftLeft(1).multiply(n).mod(i),a=e.square().mod(i),c=a.multiply(t).multiply(n).mod(i),u=s.square().mod(i),h=o.square().subtract(c.shiftLeft(3)).mod(i),l=s.multiply(h).mod(i),f=o.multiply(c.shiftLeft(2).subtract(h)).subtract(u.shiftLeft(1).multiply(a)).mod(i),d=s.multiply(u).mod(i);return new Vg(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(f),d)}multiply(t){if(this.isInfinity())return this;if(!t.signum())return this.curve.infinity;const e=t.multiply(zg),n=this.negate();let i=this;for(let r=e.bitLength()-2;r>0;r--){i=i.twice();const o=e.testBit(r);o!==t.testBit(r)&&(i=i.add(o?this:n))}return i}}var Hg={ECPointFp:Vg,ECCurveFp:class{constructor(t,e,n){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(n),this.infinity=new Vg(this,null,null)}equals(t){return t===this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)}fromBigInteger(t){return new qg(this.q,t)}decodePointHex(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:const e=this.fromBigInteger(new Fg(t.substr(2),16));let n=this.fromBigInteger(e.multiply(e.square()).add(e.multiply(this.a)).add(this.b).toBigInteger().modPow(this.q.divide(new Fg("4")).add(Fg.ONE),this.q));return n.toBigInteger().mod(jg).equals(new Fg(t.substr(0,2),16).subtract(jg))||(n=n.negate()),new Vg(this,e,n);case 4:case 6:case 7:const i=(t.length-2)/2,r=t.substr(2,i),o=t.substr(i+2,i);return new Vg(this,this.fromBigInteger(new Fg(r,16)),this.fromBigInteger(new Fg(o,16)));default:return null}}}};const{BigInteger:Kg,SecureRandom:Wg}=Rg,{ECCurveFp:Jg}=Hg,Xg=new Wg,{curve:$g,G:Yg,n:Zg}=Qg();function Qg(){const t=new Kg("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),e=new Kg("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),n=new Kg("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16),i=new Jg(t,e,n),r=i.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:i,G:r,n:new Kg("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}function tv(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t}var ev={getGlobalCurve:function(){return $g},generateEcparam:Qg,generateKeyPairHex:function(t,e,n){const i=(t?new Kg(t,e,n):new Kg(Zg.bitLength(),Xg)).mod(Zg.subtract(Kg.ONE)).add(Kg.ONE),r=tv(i.toString(16),64),o=Yg.multiply(i);return{privateKey:r,publicKey:"04"+tv(o.getX().toBigInteger().toString(16),64)+tv(o.getY().toBigInteger().toString(16),64)}},compressPublicKeyHex:function(t){if(130!==t.length)throw new Error("Invalid public key to compress");const e=(t.length-2)/2,n=t.substr(2,e);let i="03";return new Kg(t.substr(e+2,e),16).mod(new Kg("2")).equals(Kg.ZERO)&&(i="02"),i+n},utf8ToHex:function(t){const e=(t=unescape(encodeURIComponent(t))).length,n=[];for(let i=0;i<e;i++)n[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;const i=[];for(let t=0;t<e;t++){const e=n[t>>>2]>>>24-t%4*8&255;i.push((e>>>4).toString(16)),i.push((15&e).toString(16))}return i.join("")},leftPad:tv,arrayToHex:function(t){return t.map(t=>1===(t=t.toString(16)).length?"0"+t:t).join("")},arrayToUtf8:function(t){const e=[];let n=0;for(let i=0;i<2*t.length;i+=2)e[i>>>3]|=parseInt(t[n],10)<<24-i%8*4,n++;try{const n=[];for(let i=0;i<t.length;i++){const t=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(t))}return decodeURIComponent(escape(n.join("")))}catch(t){throw new Error("Malformed UTF-8 data")}},hexToArray:function(t){const e=[];let n=t.length;n%2!=0&&(t=tv(t,n+1)),n=t.length;for(let i=0;i<n;i+=2)e.push(parseInt(t.substr(i,2),16));return e},verifyPublicKey:function(t){const e=$g.decodePointHex(t);if(!e)return!1;const n=e.getX();return e.getY().square().equals(n.multiply(n.square()).add(n.multiply($g.a)).add($g.b))},comparePublicKeyHex:function(t,e){const n=$g.decodePointHex(t);if(!n)return!1;const i=$g.decodePointHex(e);return!!i&&n.equals(i)}};const nv=new Uint32Array(68),iv=new Uint32Array(64);function rv(t,e){const n=31&e;return t<<n|t>>>32-n}function ov(t,e){const n=[];for(let i=t.length-1;i>=0;i--)n[i]=255&(t[i]^e[i]);return n}function sv(t){return t^rv(t,9)^rv(t,17)}function av(t){return t^rv(t,15)^rv(t,23)}function cv(t){let e=8*t.length,n=e%512;n=n>=448?512-n%448-1:448-n-1;const i=new Array((n-7)/8),r=new Array(8);for(let t=0,e=i.length;t<e;t++)i[t]=0;for(let t=0,e=r.length;t<e;t++)r[t]=0;e=e.toString(2);for(let t=7;t>=0;t--)if(e.length>8){const n=e.length-8;r[t]=parseInt(e.substr(n),2),e=e.substr(0,n)}else e.length>0&&(r[t]=parseInt(e,2),e="");const o=new Uint8Array([...t,128,...i,...r]),s=new DataView(o.buffer,0),a=o.length/64,c=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]);for(let t=0;t<a;t++){nv.fill(0),iv.fill(0);const e=16*t;for(let t=0;t<16;t++)nv[t]=s.getUint32(4*(e+t),!1);for(let t=16;t<68;t++)nv[t]=av(nv[t-16]^nv[t-9]^rv(nv[t-3],15))^rv(nv[t-13],7)^nv[t-6];for(let t=0;t<64;t++)iv[t]=nv[t]^nv[t+4];const n=2043430169,i=2055708042;let r,o,a,u,h,l=c[0],f=c[1],d=c[2],p=c[3],g=c[4],v=c[5],m=c[6],y=c[7];for(let t=0;t<64;t++)h=t>=0&&t<=15?n:i,r=rv(rv(l,12)+g+rv(h,t),7),o=r^rv(l,12),a=(t>=0&&t<=15?l^f^d:l&f|l&d|f&d)+p+o+iv[t],u=(t>=0&&t<=15?g^v^m:g&v|~g&m)+y+r+nv[t],p=d,d=rv(f,9),f=l,l=a,y=m,m=rv(v,19),v=g,g=sv(u);c[0]^=l,c[1]^=f,c[2]^=d,c[3]^=p,c[4]^=g,c[5]^=v,c[6]^=m,c[7]^=y}const u=[];for(let t=0,e=c.length;t<e;t++){const e=c[t];u.push((4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e)}return u}const uv=new Uint8Array(64),hv=new Uint8Array(64);for(let t=0;t<64;t++)uv[t]=54,hv[t]=92;var lv={sm3:cv,hmac:function(t,e){for(e.length>64&&(e=cv(e));e.length<64;)e.push(0);const n=ov(e,uv),i=ov(e,hv),r=cv([...n,...t]);return cv([...i,...r])}};const{BigInteger:fv}=Rg,{encodeDer:dv,decodeDer:pv}=Ug,gv=lv.sm3,{G:vv,curve:mv,n:yv}=ev.generateEcparam();function bv(t,e,n="1234567812345678"){n=ev.utf8ToHex(n);const i=ev.leftPad(vv.curve.a.toBigInteger().toRadix(16),64),r=ev.leftPad(vv.curve.b.toBigInteger().toRadix(16),64),o=ev.leftPad(vv.getX().toBigInteger().toRadix(16),64),s=ev.leftPad(vv.getY().toBigInteger().toRadix(16),64);let a,c;if(128===e.length)a=e.substr(0,64),c=e.substr(64,64);else{const t=vv.curve.decodePointHex(e);a=ev.leftPad(t.getX().toBigInteger().toRadix(16),64),c=ev.leftPad(t.getY().toBigInteger().toRadix(16),64)}const u=ev.hexToArray(n+i+r+o+s+a+c),h=4*n.length;u.unshift(255&h),u.unshift(h>>8&255);const l=gv(u);return ev.arrayToHex(gv(l.concat(ev.hexToArray(t))))}function _v(t){const e=vv.multiply(new fv(t,16));return"04"+ev.leftPad(e.getX().toBigInteger().toString(16),64)+ev.leftPad(e.getY().toBigInteger().toString(16),64)}function wv(){const t=ev.generateKeyPairHex(),e=mv.decodePointHex(t.publicKey);return t.k=new fv(t.privateKey,16),t.x1=e.getX().toBigInteger(),t}var Ev={generateKeyPairHex:ev.generateKeyPairHex,compressPublicKeyHex:ev.compressPublicKeyHex,comparePublicKeyHex:ev.comparePublicKeyHex,doEncrypt:function(t,e,n=1){t="string"==typeof t?ev.hexToArray(ev.utf8ToHex(t)):Array.prototype.slice.call(t),e=ev.getGlobalCurve().decodePointHex(e);const i=ev.generateKeyPairHex(),r=new fv(i.privateKey,16);let o=i.publicKey;o.length>128&&(o=o.substr(o.length-128));const s=e.multiply(r),a=ev.hexToArray(ev.leftPad(s.getX().toBigInteger().toRadix(16),64)),c=ev.hexToArray(ev.leftPad(s.getY().toBigInteger().toRadix(16),64)),u=ev.arrayToHex(gv([].concat(a,t,c)));let h=1,l=0,f=[];const d=[].concat(a,c),p=()=>{f=gv([...d,h>>24&255,h>>16&255,h>>8&255,255&h]),h++,l=0};p();for(let e=0,n=t.length;e<n;e++)l===f.length&&p(),t[e]^=255&f[l++];const g=ev.arrayToHex(t);return 0===n?o+g+u:o+u+g},doDecrypt:function(t,e,n=1,{output:i="string"}={}){e=new fv(e,16);let r=t.substr(128,64),o=t.substr(192);0===n&&(r=t.substr(t.length-64),o=t.substr(128,t.length-128-64));const s=ev.hexToArray(o),a=ev.getGlobalCurve().decodePointHex("04"+t.substr(0,128));if(!a||!ev.verifyPublicKey("04"+t.substr(0,128)))return"array"===i?[]:"";const c=a.multiply(e),u=ev.hexToArray(ev.leftPad(c.getX().toBigInteger().toRadix(16),64)),h=ev.hexToArray(ev.leftPad(c.getY().toBigInteger().toRadix(16),64));let l=1,f=0,d=[];const p=[].concat(u,h),g=()=>{d=gv([...p,l>>24&255,l>>16&255,l>>8&255,255&l]),l++,f=0};g();for(let t=0,e=s.length;t<e;t++)f===d.length&&g(),s[t]^=255&d[f++];return ev.arrayToHex(gv([].concat(u,s,h)))===r.toLowerCase()?"array"===i?s:ev.arrayToUtf8(s):"array"===i?[]:""},doSignature:function(t,e,{pointPool:n,der:i,hash:r,publicKey:o,userId:s}={}){let a="string"==typeof t?ev.utf8ToHex(t):ev.arrayToHex(t);r&&(a=bv(a,o=o||_v(e),s));const c=new fv(e,16),u=new fv(a,16);let h=null,l=null,f=null;do{do{let t;t=n&&n.length?n.pop():wv(),h=t.k,l=u.add(t.x1).mod(yv)}while(l.equals(fv.ZERO)||l.add(h).equals(yv));f=c.add(fv.ONE).modInverse(yv).multiply(h.subtract(l.multiply(c))).mod(yv)}while(f.equals(fv.ZERO));return i?dv(l,f):ev.leftPad(l.toString(16),64)+ev.leftPad(f.toString(16),64)},doVerifySignature:function(t,e,n,{der:i,hash:r,userId:o}={}){let s,a,c="string"==typeof t?ev.utf8ToHex(t):ev.arrayToHex(t);if(r&&(c=bv(c,n,o)),i){const t=pv(e);s=t.r,a=t.s}else s=new fv(e.substring(0,64),16),a=new fv(e.substring(64),16);const u=yv.subtract(fv.ONE);if(s.compareTo(fv.ONE)<0||s.compareTo(u)>0)return!1;if(a.compareTo(fv.ONE)<0||a.compareTo(u)>0)return!1;const h=mv.decodePointHex(n);if(!h||!ev.verifyPublicKey(n))return!1;const l=new fv(c,16),f=s.add(a).mod(yv);if(f.equals(fv.ZERO))return!1;const d=vv.multiply(a).add(h.multiply(f)),p=l.add(d.getX().toBigInteger()).mod(yv);return s.equals(p)},getPublicKeyFromPrivateKey:_v,getPoint:wv,verifyPublicKey:ev.verifyPublicKey};const{sm3:Sv,hmac:Tv}=lv;function Av(t){return t.map(t=>1===(t=t.toString(16)).length?"0"+t:t).join("")}function kv(t){const e=[];let n=t.length;var i,r;n%2!=0&&(r=n+1,t=(i=t).length>=r?i:new Array(r-i.length+1).join("0")+i),n=t.length;for(let i=0;i<n;i+=2)e.push(parseInt(t.substr(i,2),16));return e}const xv=16,Ov=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Dv=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Iv(t){const e=[];for(let n=0,i=t.length;n<i;n+=2)e.push(parseInt(t.substr(n,2),16));return e}function Rv(t,e){const n=31&e;return t<<n|t>>>32-n}function Mv(t){return(255&Ov[t>>>24&255])<<24|(255&Ov[t>>>16&255])<<16|(255&Ov[t>>>8&255])<<8|255&Ov[255&t]}function Cv(t){return t^Rv(t,2)^Rv(t,10)^Rv(t,18)^Rv(t,24)}function Bv(t){return t^Rv(t,13)^Rv(t,23)}function Pv(t,e,n){const i=new Array(4),r=new Array(4);for(let e=0;e<4;e++)r[0]=255&t[4*e],r[1]=255&t[4*e+1],r[2]=255&t[4*e+2],r[3]=255&t[4*e+3],i[e]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];for(let t,e=0;e<32;e+=4)t=i[1]^i[2]^i[3]^n[e+0],i[0]^=Cv(Mv(t)),t=i[2]^i[3]^i[0]^n[e+1],i[1]^=Cv(Mv(t)),t=i[3]^i[0]^i[1]^n[e+2],i[2]^=Cv(Mv(t)),t=i[0]^i[1]^i[2]^n[e+3],i[3]^=Cv(Mv(t));for(let t=0;t<16;t+=4)e[t]=i[3-t/4]>>>24&255,e[t+1]=i[3-t/4]>>>16&255,e[t+2]=i[3-t/4]>>>8&255,e[t+3]=255&i[3-t/4]}function Lv(t,e,n,{padding:i="pkcs#7",mode:r,iv:o=[],output:s="string"}={}){if("cbc"===r&&("string"==typeof o&&(o=Iv(o)),16!==o.length))throw new Error("iv is invalid");if("string"==typeof e&&(e=Iv(e)),16!==e.length)throw new Error("key is invalid");if(t="string"==typeof t?0!==n?function(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t.codePointAt(n);if(i<=127)e.push(i);else if(i<=2047)e.push(192|i>>>6),e.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)e.push(224|i>>>12),e.push(128|i>>>6&63),e.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw e.push(i),new Error("input is not supported");n++,e.push(240|i>>>18&28),e.push(128|i>>>12&63),e.push(128|i>>>6&63),e.push(128|63&i)}}return e}(t):Iv(t):[...t],("pkcs#5"===i||"pkcs#7"===i)&&0!==n){const e=xv-t.length%xv;for(let n=0;n<e;n++)t.push(e)}const a=new Array(32);!function(t,e,n){const i=new Array(4),r=new Array(4);for(let e=0;e<4;e++)r[0]=255&t[0+4*e],r[1]=255&t[1+4*e],r[2]=255&t[2+4*e],r[3]=255&t[3+4*e],i[e]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];i[0]^=2746333894,i[1]^=1453994832,i[2]^=1736282519,i[3]^=2993693404;for(let t,n=0;n<32;n+=4)t=i[1]^i[2]^i[3]^Dv[n+0],e[n+0]=i[0]^=Bv(Mv(t)),t=i[2]^i[3]^i[0]^Dv[n+1],e[n+1]=i[1]^=Bv(Mv(t)),t=i[3]^i[0]^i[1]^Dv[n+2],e[n+2]=i[2]^=Bv(Mv(t)),t=i[0]^i[1]^i[2]^Dv[n+3],e[n+3]=i[3]^=Bv(Mv(t));if(0===n)for(let t,n=0;n<16;n++)t=e[n],e[n]=e[31-n],e[31-n]=t}(e,a,n);const c=[];let u=o,h=t.length,l=0;for(;h>=xv;){const e=t.slice(l,l+16),i=new Array(16);if("cbc"===r)for(let t=0;t<xv;t++)0!==n&&(e[t]^=u[t]);Pv(e,i,a);for(let t=0;t<xv;t++)"cbc"===r&&0===n&&(i[t]^=u[t]),c[l+t]=i[t];"cbc"===r&&(u=0!==n?i:e),h-=xv,l+=xv}if(("pkcs#5"===i||"pkcs#7"===i)&&0===n){const t=c.length,e=c[t-1];for(let n=1;n<=e;n++)if(c[t-n]!==e)throw new Error("padding is invalid");c.splice(t-e,e)}return"array"!==s?0!==n?c.map(t=>1===(t=t.toString(16)).length?"0"+t:t).join(""):function(t){const e=[];for(let n=0,i=t.length;n<i;n++)t[n]>=240&&t[n]<=247?(e.push(String.fromCodePoint(((7&t[n])<<18)+((63&t[n+1])<<12)+((63&t[n+2])<<6)+(63&t[n+3]))),n+=3):t[n]>=224&&t[n]<=239?(e.push(String.fromCodePoint(((15&t[n])<<12)+((63&t[n+1])<<6)+(63&t[n+2]))),n+=2):t[n]>=192&&t[n]<=223?(e.push(String.fromCodePoint(((31&t[n])<<6)+(63&t[n+1]))),n++):e.push(String.fromCodePoint(t[n]));return e.join("")}(c):c}var Gv={sm2:Ev,sm3:function(t,e){if(t="string"==typeof t?function(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t.codePointAt(n);if(i<=127)e.push(i);else if(i<=2047)e.push(192|i>>>6),e.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)e.push(224|i>>>12),e.push(128|i>>>6&63),e.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw e.push(i),new Error("input is not supported");n++,e.push(240|i>>>18&28),e.push(128|i>>>12&63),e.push(128|i>>>6&63),e.push(128|63&i)}}return e}(t):Array.prototype.slice.call(t),e){if("hmac"!==(e.mode||"hmac"))throw new Error("invalid mode");let n=e.key;if(!n)throw new Error("invalid key");return n="string"==typeof n?kv(n):Array.prototype.slice.call(n),Av(Tv(t,n))}return Av(Sv(t))},sm4:{encrypt:(t,e,n)=>Lv(t,e,1,n),decrypt:(t,e,n)=>Lv(t,e,0,n)}}.sm2;var Nv=["web_id","user_unique_id"],Uv=function(){function t(t){Zl(this,"name",void 0),Zl(this,"hook",void 0),Zl(this,"inited",void 0),Zl(this,"logger",void 0),Zl(this,"Types",void 0),Zl(this,"configManager",void 0),Zl(this,"appBridge",void 0),Zl(this,"eventManager",void 0),Zl(this,"tokenManager",void 0),Zl(this,"sessionManager",void 0),Zl(this,"disableAutoPageView",!1),Zl(this,"bridgeReport",!1),Zl(this,"staging",!1),Zl(this,"initConfig",void 0),Zl(this,"pluginInstances",[]),Zl(this,"sended",!1),Zl(this,"started",!1),Zl(this,"remotePlugin",void 0),Zl(this,"eventFilter",void 0),Zl(this,"destroy",!1),Zl(this,"adapters",{}),Zl(this,"sdkReady",!1),Zl(this,"debugger",void 0),Zl(this,"eventEncrypt",void 0),Zl(this,"env",void 0),Zl(this,"dynamicParamsFilter",void 0),Zl(this,"publicKey",void 0),Zl(this,"requestManager",void 0),this.name=t,this.hook=new uf,this.logger=new lp(t),this.remotePlugin=new Map,this.Types=rp}t.usePlugin=function(e,n,i){if(n){for(var r=!1,o=0,s=t.plugins.length;o<s;o++){if(t.plugins[o].name===n){t.plugins[o].plugin=e,t.plugins[o].options=i||{},r=!0;break}}r||t.plugins.push({name:n,plugin:e,options:i})}else t.plugins.push({plugin:e})};var e=t.prototype;return e.init=function(e){var n,i=this;this.inited?console.log("init can be call only one time"):e&&sd(e)?e.app_id&&("number"==typeof(n=e.app_id)&&!isNaN(n))?!e.app_key||function(t){return"string"==typeof t}(e.app_key)?(e.channel_domain||-1!==["cn","sg","va"].indexOf(e.channel)||(console.warn("channel must be `cn`, `sg`,`va` !!!"),e.channel="cn"),this.logger=new lp(this.name,e.log),this.configManager=new hp(this,e),this.appBridge=new fp(e,this.configManager),this.bridgeReport=this.appBridge.bridgeInject(),this.debugger=new Ig(this,e),this.requestManager=new wp(this,e),this.initConfig=e,this.env=e.channel_domain?"self":"public",this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行INIT",data:e,level:"info",time:Date.now()}),e.disable_auto_pv&&(this.disableAutoPageView=!0),this.bridgeReport?(this.inited=!0,this.emit(rp.Init)):(e.enable_encryption&&"sm"===e.encryption_type&&this.initCrypto(),this.configManager.set({app_id:e.app_id}),this.eventManager=new gp,this.tokenManager=new _p,this.sessionManager=new bp,Promise.all([new Promise(function(t){i.once(rp.TokenComplete,function(){t(!0)})}),new Promise(function(t){i.once(rp.Start,function(){t(!0)})})]).then(function(){try{t.plugins.reduce(function(t,e){var n=e.plugin,r=e.options,o=Object.assign(i.initConfig,r),s=new n;return s.apply(i,o),t.push(s),t},i.pluginInstances)}catch(t){console.log("load plugin error, "+t.message),i.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}i.sdkReady=!0,i.emit(rp.Ready),i.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 初始化完成",time:Date.now(),level:"info",data:i.configManager.get("user")}),i.logger.info("appid: "+e.app_id+", userInfo:"+JSON.stringify(i.configManager.get("user"))),i.logger.info("appid: "+e.app_id+", sdk is ready, version is "+ep+", you can report now !!!");try{(window.opener||window.parent).postMessage("[tea-sdk]ready","*")}catch(t){i.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}i.pageView(),i.on(rp.TokenChange,function(t){"webid"!==t.type&&"anonymous_id"!==t.type||i.pageView(),i.logger.info("appid: "+e.app_id+" token change, new userInfo:"+JSON.stringify(i.configManager.get("user"))),i.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 设置了用户信息",time:Date.now(),secType:"USER",level:"info",data:i.configManager.get("user")})}),i.on(rp.TokenReset,function(){i.logger.info("appid: "+e.app_id+" token reset, new userInfo:"+JSON.stringify(i.configManager.get("user"))),i.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 重置了用户信息",time:Date.now(),secType:"USER",level:"info",data:i.configManager.get("user")})}),i.on(rp.RouteChange,function(t){t.init||e.disable_route_report||i.pageView()})}),this.tokenManager.apply(this,e),this.eventManager.apply(this,e),this.sessionManager.apply(this,e),this.inited=!0,this.emit(rp.Init))):console.warn("app_key param is error, must be string, please check!"):console.warn("app_id param is error, must be number, please check!"):console.warn("init params error,please check")},e.config=function(t){if(this.inited)if(t&&sd(t))if(this.bridgeReport)this.appBridge.setConfig(t);else{t._staging_flag&&1===t._staging_flag&&(this.staging=!0),t.disable_auto_pv&&(this.disableAutoPageView=!0,delete t.disable_auto_pv);var e=Object.assign({},t);if(this.initConfig&&this.initConfig.configPersist){var n=this.configManager.getStore();n&&(e=Object.assign(n,t)),this.configManager.setStore(t)}var i=e;i.web_id,i.user_unique_id;var r=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(i,Nv);e.hasOwnProperty("web_id")&&this.emit(rp.ConfigWebId,e.web_id),e.hasOwnProperty("user_unique_id")&&this.emit(rp.ConfigUuid,e.user_unique_id),this.configManager.set(r),this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行CONFIG",level:"info",time:Date.now(),data:e})}else this.logger.warn("config params is error, please check");else this.logger.warn("config must be use after function init")},e.setDomain=function(t){this.configManager&&this.configManager.setDomain(t),this.emit(rp.ConfigDomain)},e.getConfig=function(t){return this.configManager.get(t)},e.send=function(){this.start()},e.start=function(){this.inited&&!this.sended&&(this.sended=!0,this.emit(rp.Start),this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行START",level:"info",time:Date.now()}),this.bridgeReport&&(this.pageView(),this.emit(rp.Ready)))},e.event=function(t,e){var n=this;try{if(this.initConfig&&this.initConfig.disable_track_event)return;var i=[];if(Array.isArray(t))t.forEach(function(t){var e=n.processEvent(t[0],t[1]||{});e&&i.push(e)});else{var r=this.processEvent(t,e);if(!r)return;i.push(r)}this.bridgeReport?i.forEach(function(t){var e=t.event,i=t.params;n.appBridge.onEventV3(e,JSON.stringify(i))}):i.length&&(this.emit(rp.Event,i),this.emit(rp.SessionResetTime))}catch(t){this.logger.warn("something error, please check"),this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}},e.beconEvent=function(t,e){if(!this.initConfig||!this.initConfig.disable_track_event)if(Array.isArray(t))console.warn("beconEvent not support batch report, please check");else{var n=[],i=this.processEvent(t,e||{});i&&(n.push(i),n.length&&(this.emit(rp.BeconEvent,n),this.emit(rp.SessionResetTime)))}},e.processEvent=function(t,e){void 0===e&&(e={});try{if(!t)return this.logger.warn("eventName is null, please check"),null;var n=t;/^event\./.test(t)&&(n=t.slice(6));var i,r=e;return"object"!=typeof r&&(r={}),r.profile?delete r.profile:r.event_index=cd(),r.local_ms?(i=r.local_ms,delete r.local_ms):i=+new Date,{event:n,params:r,local_time_ms:i,is_bav:this.initConfig&&this.initConfig.autotrack?1:0}}catch(n){return this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:n.message}),{event:t,params:e}}},e.dynamicParams=function(t){this.dynamicParamsFilter=t},e.filterEvent=function(t){this.eventFilter=t},e.on=function(t,e){this.hook.on(t,e)},e.once=function(t,e){this.hook.once(t,e)},e.off=function(t,e){this.hook.off(t,e)},e.emit=function(t,e,n){this.hook.emit(t,e,n)},e.set=function(t){this.hook.set(t)},e.pageView=function(){this.disableAutoPageView||this.predefinePageView()},e.predefinePageView=function(t){if(void 0===t&&(t={}),this.inited){var e={title:document.title||location.pathname,url:location.href,url_path:location.pathname,time:Date.now(),referrer:window.document.referrer,$is_first_time:""+(this.configManager&&this.configManager.is_first_time||!1)},n=Object.assign({},e,t);this.event("predefine_pageview",n)}else console.warn("predefinePageView should call after init")},e.clearEventCache=function(){this.emit(rp.CleanEvents)},e.setWebIDviaUnionID=function(t){if(t){var e=pd(t);this.config({web_id:""+e,wechat_unionid:t}),this.emit(rp.CustomWebId)}},e.setWebIDviaOpenID=function(t){if(t){var e=pd(t);this.config({web_id:""+e,wechat_openid:t}),this.emit(rp.CustomWebId)}},e.setAnonymousId=function(t){this.emit(rp.AnonymousId,t)},e.setNativeAppId=function(t){this.bridgeReport&&this.appBridge.setNativeAppId(t)},e.enableTransPort=function(){this.configManager.setEnableClientTransport(!0)},e.disableTransPort=function(){this.configManager.setEnableClientTransport(!1)},e.resetStayDuration=function(t,e,n){void 0===t&&(t=""),void 0===e&&(e=""),void 0===n&&(n=""),this.emit(rp.ResetStay,{url_path:t,title:e,url:n},rp.Stay)},e.resetStayParams=function(t,e,n){void 0===t&&(t=""),void 0===e&&(e=""),void 0===n&&(n=""),this.emit(rp.SetStay,{url_path:t,title:e,url:n},rp.Stay)},e.getToken=function(t,e){var n=this;if(this.inited){var i=!1,r=function(e){if(!i){i=!0;var r=n.configManager.get().user;return e&&(r.tobid=e,r["diss".split("").reverse().join("")]=e),t(Object.assign({},r))}},o=function(){n.tokenManager.getTobId().then(function(t){r(t)})};this.sdkReady?o():(e&&setTimeout(function(){r()},e),this.on(rp.Ready,function(){o()}))}else this.logger.warn("getToken must be use after function init")},e.startTrackEvent=function(t){t&&this.emit(rp.TrackDurationStart,t,rp.TrackDuration)},e.endTrackEvent=function(t,e){void 0===e&&(e={}),t&&this.emit(rp.TrackDurationEnd,{eventName:t,params:e},rp.TrackDuration)},e.pauseTrackEvent=function(t){t&&this.emit(rp.TrackDurationPause,t,rp.TrackDuration)},e.resumeTrackEvent=function(t){t&&this.emit(rp.TrackDurationResume,t,rp.TrackDuration)},e.profileSet=function(t){this.bridgeReport?this.appBridge.profileSet(JSON.stringify(t)):this.emit(rp.ProfileSet,t,rp.Profile),this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileSet",level:"info",time:Date.now(),data:t})},e.profileSetOnce=function(t){this.bridgeReport?this.appBridge.profileSetOnce(JSON.stringify(t)):this.emit(rp.ProfileSetOnce,t,rp.Profile),this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileSetOnce",level:"info",time:Date.now(),data:t})},e.profileIncrement=function(t){this.bridgeReport?this.appBridge.profileIncrement(JSON.stringify(t)):this.emit(rp.ProfileIncrement,t,rp.Profile),this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileIncrement",level:"info",time:Date.now(),data:t})},e.profileUnset=function(t){this.bridgeReport?this.appBridge.profileUnset(t):this.emit(rp.ProfileUnset,t,rp.Profile),this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileUnset",level:"info",time:Date.now(),data:t})},e.profileAppend=function(t){this.bridgeReport?this.appBridge.profileAppend(JSON.stringify(t)):this.emit(rp.ProfileAppend,t,rp.Profile),this.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileAppend",level:"info",time:Date.now(),data:t})},e.setExternalAbVersion=function(t){this.bridgeReport?this.appBridge.setExternalAbVersion(t):this.emit(rp.AbExternalVersion,"string"==typeof t&&t?(""+t).trim():null,rp.Ab)},e.getVar=function(t,e,n){this.bridgeReport?this.appBridge.getVar(t,e,n):this.emit(rp.AbVar,{name:t,defaultValue:e,callback:n},rp.Ab)},e.getAllVars=function(t){this.bridgeReport?this.appBridge.getAllVars(t):this.emit(rp.AbAllVars,t,rp.Ab)},e.getABconfig=function(t,e){this.emit(rp.AbConfig,{params:t,callback:e},rp.Ab)},e.getAbSdkVersion=function(t){if(!this.bridgeReport||!t)return this.configManager.getAbVersion()||"";this.appBridge.getAbSdkVersion(t)},e.onAbSdkVersionChange=function(t){var e=this;return this.emit(rp.AbVersionChangeOn,t,rp.Ab),function(){e.emit(rp.AbVersionChangeOff,t,rp.Ab)}},e.offAbSdkVersionChange=function(t){this.emit(rp.AbVersionChangeOff,t,rp.Ab)},e.openOverlayer=function(){this.emit(rp.AbOpenLayer,"",rp.Ab)},e.closeOverlayer=function(){this.emit(rp.AbCloseLayer,"",rp.Ab)},e.initCrypto=function(){this.publicKey=this.initConfig.crypto_publicKey||"04BA9E229380DC0E41E10839B0C52A4763D3EDFE8903F3B8E81395523381E03AA995D295BD4A4088792E4785B224F7837EB4D2C7C05973C7AE8687A35ACAE470A0",this.initConfig.encryption_header=this.initConfig.encryption_header||"gm_sm2"},e.cryptoData=function(t){try{if(!this.initConfig.enable_encryption)return t;var e;if("sm"===this.initConfig.encryption_type){var n=(o=JSON.stringify(t),s=this.publicKey,void 0===(a=1)&&(a=1),"04"+Gv.doEncrypt(o,s,a)),i=gd(n);e=new Uint8Array(i)}else e="data="+(r=JSON.stringify(t),window.btoa?window.btoa(encodeURIComponent(r)):encodeURIComponent(r));return e}catch(e){return t}var r,o,s,a},e.destoryInstance=function(){this.destroyInstance()},e.destoryInstace=function(){this.destroyInstance()},e.destroyInstance=function(){this.destroy||(this.destroy=!0,this.off(rp.TokenComplete))},t}();Zl(Uv,"plugins",[]);var Fv=gt("iterator"),jv=!s(function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),i="";return t.pathname="c%20d",e.forEach(function(t,n){e.delete("b"),i+=n+t}),n.delete("a",2),n.delete("b",void 0),!e.size&&!a||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Fv]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==i||"x"!==new URL("https://x",void 0).host}),zv=function(t,e,n,i){try{return i?e(Dt(n)[0],n[1]):e(n)}catch(e){ko(t,"throw",e)}},qv=Array,Vv=function(t){var e=tn(this),n=arguments.length,i=n>1?arguments[1]:void 0,r=void 0!==i;r&&(i=Ue(i,n>2?arguments[2]:void 0));var o,s,a,c,u,l,f=ot(t),d=So(f),p=0;if(!d||this===qv&&_o(d))for(o=ge(f),s=e?new this(o):qv(o);o>p;p++)l=r?i(f[p],p):f[p],on(s,p,l);else for(s=e?new this:[],u=(c=Ao(f,d)).next;!(a=h(u,c)).done;p++){try{tf(p)}catch(t){ko(c,"throw",t)}l=r?zv(c,i,[a.value,p],!0):a.value;try{on(s,p,l)}catch(t){ko(c,"throw",t)}}return Bi(s,p),s},Hv=2147483647,Kv=/[^\0-\u007E]/,Wv=/[.\u3002\uFF0E\uFF61]/g,Jv="Overflow: input needs wider integers to process",Xv=RangeError,$v=y(Wv.exec),Yv=Math.floor,Zv=String.fromCharCode,Qv=y("".charCodeAt),tm=y([].join),em=y([].push),nm=y("".replace),im=y("".split),rm=y("".toLowerCase),om=function(t){return t+22+75*(t<26)},sm=function(t,e,n){var i=0;for(t=n?Yv(t/700):t>>1,t+=Yv(t/e);t>455;)t=Yv(t/35),i+=36;return Yv(i+36*t/(t+38))},am=function(t){var e=[];t=function(t){for(var e=[],n=0,i=t.length;n<i;){var r=Qv(t,n++);if(r>=55296&&r<=56319&&n<i){var o=Qv(t,n++);56320==(64512&o)?em(e,((1023&r)<<10)+(1023&o)+65536):(em(e,r),n--)}else em(e,r)}return e}(t);var n,i,r=t.length,o=128,s=0,a=72;for(n=0;n<t.length;n++)(i=t[n])<128&&em(e,Zv(i));var c=e.length,u=c;for(c&&em(e,"-");u<r;){var h=Hv;for(n=0;n<t.length;n++)(i=t[n])>=o&&i<h&&(h=i);var l=u+1;if(h-o>Yv((Hv-s)/l))throw new Xv(Jv);for(s+=(h-o)*l,o=h,n=0;n<t.length;n++){if((i=t[n])<o&&++s>Hv)throw new Xv(Jv);if(i===o){for(var f=s,d=36;;){var p=d<=a?1:d>=a+26?26:d-a;if(f<p)break;var g=f-p,v=36-p;em(e,Zv(om(p+g%v))),f=Yv(g/v),d+=36}em(e,Zv(om(f))),a=sm(s,l,u===c),s=0,u++}}s++,o++}return tm(e,"")},cm=function(t){var e,n,i=[],r=im(nm(rm(t),Wv,"."),".");for(e=0;e<r.length;e++)n=r[e],em(i,$v(Kv,n)?"xn--"+am(n):n);return tm(i,".")},um=RangeError,hm=String.fromCharCode,lm=String.fromCodePoint,fm=y([].join),dm=!!lm&&1!==lm.length;Le({target:"String",stat:!0,arity:1,forced:dm},{fromCodePoint:function(t){for(var e,n=[],i=arguments.length,r=0;i>r;){if(fe(e=+arguments[r],1114111)!==e)throw new um(e+" is not a valid code point");n[r++]=e<65536?hm(e):hm(55296+((e-=65536)>>10),e%1024+56320)}return fm(n,"")}});var pm=String.fromCharCode,gm=M("String","fromCodePoint"),vm=encodeURIComponent,mm=parseInt,ym=y("".charAt),bm=y([].push),_m=y("".replace),wm=y("".slice),Em=y(/./.exec),Sm="�",Tm=/^[0-9a-f]+$/i,Am=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,km=function(t,e){var n=wm(t,e,e+2);return Em(Tm,n)?mm(n,16):NaN},xm=function(t){for(var e=0,n=128;n>0&&0!==(t&n);n>>=1)e++;return e},Om=function(t){var e=null,n=t.length;switch(n){case 1:e=t[0];break;case 2:e=(31&t[0])<<6|63&t[1];break;case 3:e=(15&t[0])<<12|(63&t[1])<<6|63&t[2];break;case 4:e=(7&t[0])<<18|(63&t[1])<<12|(63&t[2])<<6|63&t[3]}return null===e||e>1114111||e>=55296&&e<=57343||e<(n>3?65536:n>2?2048:n>1?128:0)?null:e},Dm=function(t){return 2===t.length?t:Sm},Im=function(t){for(var e=t.length,n="",i=0;i<e;){var r=ym(t,i);if("%"===r){if("%"===ym(t,i+1)||i+3>e){n+="%",i++;continue}var o=km(t,i+1);if(o!=o){n+=r,i++;continue}i+=2;var s=xm(o);if(0===s)r=pm(o);else{if(1===s||s>4){n+=Sm,i++;continue}for(var a=[o],c=1;c<s&&!(++i+3>e||"%"!==ym(t,i));){var u=km(t,i+1);if(u!=u||u>191||u<128)break;if(1===c){if(224===o&&u<160)break;if(237===o&&u>159)break;if(240===o&&u<144)break;if(244===o&&u>143)break}bm(a,u),i+=2,c++}if(a.length!==s){n+=Sm;continue}var h=Om(a);if(null===h){for(var l=0;l<s;l++)n+=Sm;i++;continue}r=gm(h)}}n+=r,i++}return n},Rm=function(t){try{return vm(t)}catch(e){return vm(_m(t,Am,Dm))}},Mm=gt("iterator"),Cm="URLSearchParams",Bm=Cm+"Iterator",Pm=ie.set,Lm=ie.getterFor(Cm),Gm=ie.getterFor(Bm),Nm=Im,Um=Rm,Fm=ks("fetch"),jm=ks("Request"),zm=ks("Headers"),qm=jm&&jm.prototype,Vm=zm&&zm.prototype,Hm=o.TypeError,Km=y("".charAt),Wm=y([].join),Jm=y([].push),Xm=y("".replace),$m=y([].shift),Ym=y([].splice),Zm=y("".split),Qm=y("".slice),ty=/\+/g,ey=function(t){return Nm(Xm(t,ty," "))},ny=/[!'()~]|%20/g,iy={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ry=function(t){return iy[t]},oy=function(t){return Xm(Um(t),ny,ry)},sy=$n(function(t,e){Pm(this,{type:Bm,target:Lm(t).entries,index:0,kind:e})},Cm,function(){var t=Gm(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,fi(void 0,!0);var i=e[n];switch(t.kind){case"keys":return fi(i.key,!1);case"values":return fi(i.value,!1)}return fi([i.key,i.value],!1)},!0),ay=function(t){this.entries=[],this.url=null,void 0!==t&&(R(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===Km(t,0)?Qm(t,1):t:Na(t)))};ay.prototype={type:Cm,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,i,r,o,s,a,c=this.entries,u=So(t);if(u)for(n=(e=Ao(t,u)).next;!(i=h(n,e)).done;){if(o=(r=Ao(Dt(i.value))).next,(s=h(o,r)).done||(a=h(o,r)).done||!h(o,r).done)throw new Hm("Expected sequence with length 2");Jm(c,{key:Na(s.value),value:Na(a.value)})}else for(var l in t)at(t,l)&&Jm(c,{key:l,value:Na(t[l])})},parseQuery:function(t){if(t)for(var e,n,i=this.entries,r=Zm(t,"&"),o=0;o<r.length;)(e=r[o++]).length&&(n=Zm(e,"="),Jm(i,{key:ey($m(n)),value:ey(Wm(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],i=0;i<e.length;)t=e[i++],Jm(n,oy(t.key)+"="+oy(t.value));return Wm(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var cy=function(){Ki(this,uy);var t=Pm(this,new ay(arguments.length>0?arguments[0]:void 0));a||(this.size=t.entries.length)},uy=cy.prototype;if(Vi(uy,{append:function(t,e){var n=Lm(this);cs(arguments.length,2),Jm(n.entries,{key:Na(t),value:Na(e)}),a||this.size++,n.updateURL()},delete:function(t){for(var e=Lm(this),n=cs(arguments.length,1),i=e.entries,r=Na(t),o=n<2?void 0:arguments[1],s=void 0===o?o:Na(o),c=0;c<i.length;){var u=i[c];u.key!==r||void 0!==s&&u.value!==s?c++:Ym(i,c,1)}a||(this.size=i.length),e.updateURL()},get:function(t){var e=Lm(this).entries;cs(arguments.length,1);for(var n=Na(t),i=0;i<e.length;i++)if(e[i].key===n)return e[i].value;return null},getAll:function(t){var e=Lm(this).entries;cs(arguments.length,1);for(var n=Na(t),i=[],r=0;r<e.length;r++)e[r].key===n&&Jm(i,e[r].value);return i},has:function(t){for(var e=Lm(this).entries,n=cs(arguments.length,1),i=Na(t),r=n<2?void 0:arguments[1],o=void 0===r?r:Na(r),s=0;s<e.length;){var a=e[s++];if(a.key===i&&(void 0===o||a.value===o))return!0}return!1},set:function(t,e){var n=Lm(this);cs(arguments.length,2);for(var i,r=n.entries,o=!1,s=Na(t),c=Na(e),u=0;u<r.length;u++)(i=r[u]).key===s&&(o?Ym(r,u--,1):(o=!0,i.value=c));o||Jm(r,{key:s,value:c}),a||(this.size=r.length),n.updateURL()},sort:function(){var t=Lm(this);zh(t.entries,function(t,e){return t.key>e.key?1:-1}),t.updateURL()},forEach:function(t){for(var e,n=Lm(this).entries,i=Ue(t,arguments.length>1?arguments[1]:void 0),r=0;r<n.length;)i((e=n[r++]).value,e.key,this)},keys:function(){return new sy(this,"keys")},values:function(){return new sy(this,"values")},entries:function(){return new sy(this,"entries")}},{enumerable:!0}),oe(uy,Mm,uy.entries,{name:"entries"}),oe(uy,"toString",function(){return Lm(this).serialize()},{enumerable:!0}),a&&qi(uy,"size",{get:function(){return Lm(this).entries.length},configurable:!0,enumerable:!0}),Wn(cy,Cm),Le({global:!0,constructor:!0,forced:!jv},{URLSearchParams:cy}),!jv&&I(zm)){var hy=y(Vm.has),ly=y(Vm.set),fy=function(t){if(R(t)){var e,n=t.body;if(Ke(n)===Cm)return e=t.headers?new zm(t.headers):new zm,hy(e,"content-type")||ly(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),xn(t,{body:p(0,Na(n)),headers:p(0,e)})}return t};if(I(Fm)&&Le({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return Fm(t,arguments.length>1?fy(arguments[1]):{})}}),I(jm)){var dy=function(t){return Ki(this,qm),new jm(t,arguments.length>1?fy(arguments[1]):{})};qm.constructor=dy,dy.prototype=qm,Le({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:dy})}}var py,gy={URLSearchParams:cy,getState:Lm},vy=lc.codeAt,my=ie.set,yy=ie.getterFor("URL"),by=gy.URLSearchParams,_y=gy.getState,wy=Im,Ey=Rm,Sy=o.URL,Ty=o.TypeError,Ay=o.parseInt,ky=Math.floor,xy=Math.pow,Oy=String.fromCharCode,Dy=y("".charAt),Iy=y(/./.exec),Ry=y([].join),My=y(1.1.toString),Cy=y([].pop),By=y([].push),Py=y("".replace),Ly=y([].shift),Gy=y("".split),Ny=y("".indexOf),Uy=y("".slice),Fy=y("".toLowerCase),jy=y([].unshift),zy="Invalid scheme",qy="Invalid host",Vy="Invalid port",Hy=/[a-z]/i,Ky=/[\d+\-.a-z]/i,Wy=/\d/,Jy=/^0x/i,Xy=/^[0-7]+$/,$y=/^\d+$/,Yy=/^[\da-f]+$/i,Zy=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,Qy=/[\0\t\n\r #/:<>?@[\\\]^|]/,tb=/^[\u0000-\u0020]+/,eb=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,nb=/[\t\n\r]/g,ib=/[^\u0000-\u007F]/,rb=function(t){return 173===t||847===t||8203===t||12644===t||65279===t||65440===t||t>=4447&&t<=4448||t>=6068&&t<=6069||t>=6155&&t<=6159||t>=8288&&t<=8292||t>=8298&&t<=8303||t>=65024&&t<=65039||t>=917760&&t<=917999},ob=function(t){return 65533===t||t>=55296&&t<=57343||t>=128&&t<=159||t>=8206&&t<=8207||t>=8232&&t<=8233||t>=8234&&t<=8238||t>=8293&&t<=8297||t>=64976&&t<=65007||!(65534&~t)||t>=57344&&t<=63743||t>=983040&&t<=1114109},sb=function(t){return t>=65281&&t<=65374?t-65248:160===t||5760===t||8239===t||8287===t||12288===t||t>=8192&&t<=8202||t<=65535&&Ny("¨¯´¸˘˙˚˛˜˝ͺ΄΅᾽᾿῀῁῍῎῏῝῞῟῭΅´῾‗‾⁇⁈⁉℀℁℅℆⩴゛゜ﱞﱟﱠﱡﱢﱣﷺﷻ︓︖﹇﹈﹉﹊﹋﹌﹕﹖﹟﹤﹥﹨﹪﹫ﹰﹲﹴﹶﹸﹺﹼﹾ ̄",Oy(t))>-1?32:t},ab=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)jy(e,t%256),t=ky(t/256);return Ry(e,".")}if("object"==typeof t){for(e="",i=function(t){for(var e=null,n=1,i=null,r=0,o=0;o<8;o++)0!==t[o]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=o),++r);return r>n?i:e}(t),n=0;n<8;n++)r&&0===t[n]||(r&&(r=!1),i===n?(e+=n?":":"::",r=!0):(e+=My(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},cb={},ub=Ko({},cb,{" ":1,'"':1,"#":1,"<":1,">":1}),hb=Ko({},ub,{"'":1}),lb=Ko({},cb,{" ":1,'"':1,"<":1,">":1,"`":1}),fb=Ko({},lb,{"#":1,"?":1,"{":1,"}":1,"^":1}),db=Ko({},fb,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pb=function(t,e){var n=vy(t,0);return n>=32&&n<127&&!at(e,t)?t:"'"===t&&at(e,t)?"%27":Ey(t)},gb={ftp:21,file:null,http:80,https:443,ws:80,wss:443},vb=function(t,e){var n;return 2===t.length&&Iy(Hy,Dy(t,0))&&(":"===(n=Dy(t,1))||!e&&"|"===n)},mb=function(t){var e;return t.length>1&&vb(Uy(t,0,2))&&(2===t.length||"/"===(e=Dy(t,2))||"\\"===e||"?"===e||"#"===e)},yb=function(t){return"."===t||"%2e"===Fy(t)},bb=function(t){return".."===(t=Fy(t))||"%2e."===t||".%2e"===t||"%2e%2e"===t},_b={},wb={},Eb={},Sb={},Tb={},Ab={},kb={},xb={},Ob={},Db={},Ib={},Rb={},Mb={},Cb={},Bb={},Pb={},Lb={},Gb={},Nb={},Ub={},Fb={},jb=function(t,e,n){var i,r,o,s=Na(t);if(e){if(r=this.parse(s))throw new Ty(r);this.searchParams=null}else{if(void 0!==n&&(i=new jb(n,!0)),r=this.parse(s,null,i))throw new Ty(r);(o=_y(new by)).bindURL(this),this.searchParams=o}};jb.prototype={type:"URL",parse:function(t,e,n){var i,r,o,s,a=this,c=e||_b,u=0,h="",l=!1,f=!1,d=!1;for(t=Na(t),e||(a.scheme="",a.username="",a.password="",a.host=null,a.port=null,a.path=[],a.query=null,a.fragment=null,a.cannotBeABaseURL=!1,t=Py(t,tb,""),t=Py(t,eb,"$1")),t=Py(t,nb,""),i=Vv(t);u<=i.length;){switch(r=i[u],c){case _b:if(!r||!Iy(Hy,r)){if(e)return zy;c=Eb;continue}h+=Fy(r),c=wb;break;case wb:if(r&&Iy(Ky,r))h+=Fy(r);else{if(":"!==r){if(e)return zy;h="",c=Eb,u=0;continue}if(e&&(a.isSpecial()!==at(gb,h)||"file"===h&&(a.includesCredentials()||null!==a.port)||"file"===a.scheme&&""===a.host))return;if(a.scheme=h,e)return void(a.isSpecial()&&gb[a.scheme]===a.port&&(a.port=null));h="","file"===a.scheme?c=Cb:a.isSpecial()&&n&&n.scheme===a.scheme?c=Sb:a.isSpecial()?c=xb:"/"===i[u+1]?(c=Tb,u++):(a.cannotBeABaseURL=!0,By(a.path,""),c=Nb)}break;case Eb:if(!n||n.cannotBeABaseURL&&"#"!==r)return zy;if(n.cannotBeABaseURL&&"#"===r){a.scheme=n.scheme,a.path=Gi(n.path),a.query=n.query,a.fragment="",a.cannotBeABaseURL=!0,c=Fb;break}c="file"===n.scheme?Cb:Ab;continue;case Sb:if("/"!==r||"/"!==i[u+1]){c=Ab;continue}c=Ob,u++;break;case Tb:if("/"===r){c=Db;break}c=Gb;continue;case Ab:if(a.scheme=n.scheme,r===py)a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,a.path=Gi(n.path),a.query=n.query;else if("/"===r||"\\"===r&&a.isSpecial())c=kb;else if("?"===r)a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,a.path=Gi(n.path),a.query="",c=Ub;else{if("#"!==r){a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,a.path=Gi(n.path),a.path.length&&a.path.length--,c=Gb;continue}a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,a.path=Gi(n.path),a.query=n.query,a.fragment="",c=Fb}break;case kb:if(!a.isSpecial()||"/"!==r&&"\\"!==r){if("/"!==r){a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,c=Gb;continue}c=Db}else c=Ob;break;case xb:if(c=Ob,"/"!==r||"/"!==i[u+1])continue;u++;break;case Ob:if("/"!==r&&"\\"!==r){c=Db;continue}break;case Db:if("@"===r){l&&(h="%40"+h),l=!0,o=Vv(h);for(var p=0;p<o.length;p++){var g=o[p];if(":"!==g||d){var v=pb(g,db);d?a.password+=v:a.username+=v}else d=!0}h=""}else if(r===py||"/"===r||"?"===r||"#"===r||"\\"===r&&a.isSpecial()){if(l&&""===h)return"Invalid authority";u-=Vv(h).length+1,h="",c=Ib}else h+=r;break;case Ib:case Rb:if(e&&"file"===a.scheme){c=Pb;continue}if(":"!==r||f){if(r===py||"/"===r||"?"===r||"#"===r||"\\"===r&&a.isSpecial()){if(a.isSpecial()&&""===h)return qy;if(e&&""===h&&(a.includesCredentials()||null!==a.port))return;if(s=a.parseHost(h))return s;if(h="",c=Lb,e)return;continue}"["===r?f=!0:"]"===r&&(f=!1),h+=r}else{if(""===h)return qy;if(e===Rb)return;if(s=a.parseHost(h))return s;h="",c=Mb}break;case Mb:if(!Iy(Wy,r)){if(r===py||"/"===r||"?"===r||"#"===r||"\\"===r&&a.isSpecial()||e){if(""!==h){var m=Ay(h,10);if(m>65535)return Vy;a.port=a.isSpecial()&&m===gb[a.scheme]?null:m,h=""}if(e)return;c=Lb;continue}return Vy}h+=r;break;case Cb:if(a.scheme="file",a.host="","/"===r||"\\"===r)c=Bb;else{if(!n||"file"!==n.scheme){c=Gb;continue}switch(r){case py:a.host=n.host,a.path=Gi(n.path),a.query=n.query;break;case"?":a.host=n.host,a.path=Gi(n.path),a.query="",c=Ub;break;case"#":a.host=n.host,a.path=Gi(n.path),a.query=n.query,a.fragment="",c=Fb;break;default:a.host=n.host,mb(Ry(Gi(i,u),""))||(a.path=Gi(n.path),a.shortenPath()),c=Gb;continue}}break;case Bb:if("/"===r||"\\"===r){c=Pb;break}n&&"file"===n.scheme&&(a.host=n.host,!mb(Ry(Gi(i,u),""))&&vb(n.path[0],!0)&&By(a.path,n.path[0])),c=Gb;continue;case Pb:if(r===py||"/"===r||"\\"===r||"?"===r||"#"===r){if(!e&&vb(h))c=Gb;else if(""===h){if(a.host="",e)return;c=Lb}else{if(s=a.parseHost(h))return s;if("localhost"===a.host&&(a.host=""),e)return;h="",c=Lb}continue}h+=r;break;case Lb:if(a.isSpecial()){if(c=Gb,"/"!==r&&"\\"!==r)continue}else if(e||"?"!==r)if(e||"#"!==r){if(r!==py&&(c=Gb,"/"!==r))continue}else a.fragment="",c=Fb;else a.query="",c=Ub;break;case Gb:if(r===py||"/"===r||"\\"===r&&a.isSpecial()||!e&&("?"===r||"#"===r)){if(bb(h)?(a.shortenPath(),"/"===r||"\\"===r&&a.isSpecial()||By(a.path,"")):yb(h)?"/"===r||"\\"===r&&a.isSpecial()||By(a.path,""):("file"===a.scheme&&!a.path.length&&vb(h)&&(null!==a.host&&""!==a.host&&(a.host=""),h=Dy(h,0)+":"),By(a.path,h)),h="","file"===a.scheme&&(r===py||"?"===r||"#"===r))for(;a.path.length>1&&""===a.path[0];)Ly(a.path);"?"===r?(a.query="",c=Ub):"#"===r&&(a.fragment="",c=Fb)}else h+=pb(r,fb);break;case Nb:"?"===r?(a.query="",c=Ub):"#"===r?(a.fragment="",c=Fb):r!==py&&(a.path[0]+=" "===r?"?"===i[u+1]||"#"===i[u+1]?"%20":" ":pb(r,cb));break;case Ub:e||"#"!==r?r!==py&&(a.query+=pb(r,a.isSpecial()?hb:ub)):(a.fragment="",c=Fb);break;case Fb:r!==py&&(a.fragment+=pb(r,lb))}u++}},parseHost:function(t){var e,n,i;if("["===Dy(t,0)){if("]"!==Dy(t,t.length-1))return qy;if(e=function(t){var e,n,i,r,o,s,a,c=[0,0,0,0,0,0,0,0],u=0,h=null,l=0,f=function(){return Dy(t,l)};if(":"===f()){if(":"!==Dy(t,1))return;l+=2,h=++u}for(;f();){if(8===u)return;if(":"!==f()){for(e=n=0;n<4&&Iy(Yy,f());)e=16*e+Ay(f(),16),l++,n++;if("."===f()){if(0===n)return;if(l-=n,u>6)return;for(i=0;f();){if(r=null,i>0){if(!("."===f()&&i<4))return;l++}if(!Iy(Wy,f()))return;for(;Iy(Wy,f());){if(o=Ay(f(),10),null===r)r=o;else{if(0===r)return;r=10*r+o}if(r>255)return;l++}c[u]=256*c[u]+r,2!==++i&&4!==i||u++}if(4!==i)return;break}if(":"===f()){if(l++,!f())return}else if(f())return;c[u++]=e}else{if(null!==h)return;l++,h=++u}}if(null!==h)for(s=u-h,u=7;0!==u&&s>0;)a=c[u],c[u--]=c[h+s-1],c[h+--s]=a;else if(8!==u)return;return c}(Uy(t,1,-1)),!e)return qy;this.host=e}else if(this.isSpecial()){if(t=function(t){if(!Iy(ib,t))return""===t?null:cm(t);var e,n,i,r=Vv(t),o="";for(e=0;e<r.length;e++){if(n=vy(r[e],0),ob(n))return null;rb(n)||(o+=(i=sb(n))===n?r[e]:Oy(i))}return""===o?null:cm(o)}(wy(t)),null===t||Iy(Zy,t))return qy;if(function(t){var e,n,i=Gy(t,".");if(""===i[i.length-1]){if(1===i.length)return!1;i.length--}return e=i[i.length-1],!!Iy($y,e)||!!Iy(Jy,e)&&(""===(n=Uy(e,2))||!!Iy(Yy,n))}(t)){if(e=function(t){var e,n,i,r,o,s,a,c=Gy(t,".");if(c.length&&""===c[c.length-1]&&c.length--,(e=c.length)>4)return null;for(n=[],i=0;i<e;i++){if(""===(r=c[i]))return null;if(o=10,r.length>1&&"0"===Dy(r,0)&&(o=Iy(Jy,r)?16:8,r=Uy(r,8===o?1:2)),""===r)s=0;else{if(!Iy(10===o?$y:8===o?Xy:Yy,r))return null;s=Ay(r,o)}By(n,s)}for(i=0;i<e;i++)if(s=n[i],i===e-1){if(s>=xy(256,5-e))return null}else if(s>255)return null;for(a=Cy(n),i=0;i<n.length;i++)a+=n[i]*xy(256,3-i);return a}(t),null===e)return qy;this.host=e}else this.host=t}else{if(Iy(Qy,t))return qy;for(e="",n=Vv(t),i=0;i<n.length;i++)e+=pb(n[i],cb);this.host=e}},cannotHaveUsernamePasswordPort:function(){return null===this.host||""===this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return at(gb,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"===this.scheme&&1===e&&vb(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,i=t.password,r=t.host,o=t.port,s=t.path,a=t.query,c=t.fragment,u=e+":";return null!==r?(u+="//",t.includesCredentials()&&(u+=n+(i?":"+i:"")+"@"),u+=ab(r),null!==o&&(u+=":"+o)):"file"===e&&(u+="//"),null===r&&!t.cannotBeABaseURL&&s.length>1&&""===s[0]&&(u+="/."),u+=t.cannotBeABaseURL?s[0]:s.length?"/"+Ry(s,"/"):"",null!==a&&(u+="?"+a),null!==c&&(u+="#"+c),u},setHref:function(t){var e=this.parse(t);if(e)throw new Ty(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"===t)try{return new zb(this.path[0]).origin}catch(t){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+ab(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(Na(t)+":",_b)},getUsername:function(){return this.username},setUsername:function(t){var e=Vv(Na(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=pb(e[n],db)}},getPassword:function(){return this.password},setPassword:function(t){var e=Vv(Na(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=pb(e[n],db)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ab(t):ab(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Ib)},getHostname:function(){var t=this.host;return null===t?"":ab(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Rb)},getPort:function(){var t=this.port;return null===t?"":Na(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""===(t=Na(t))?this.port=null:this.parse(t,Mb))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+Ry(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Lb))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""===(t=Na(t))?this.query=null:("?"===Dy(t,0)&&(t=Uy(t,1)),this.query="",this.parse(t,Ub)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!==(t=Na(t))?("#"===Dy(t,0)&&(t=Uy(t,1)),this.fragment="",this.parse(t,Fb)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var zb=function(t){var e=Ki(this,qb),n=cs(arguments.length,1)>1?arguments[1]:void 0,i=my(e,new jb(t,!1,n));a||(e.href=i.serialize(),e.origin=i.getOrigin(),e.protocol=i.getProtocol(),e.username=i.getUsername(),e.password=i.getPassword(),e.host=i.getHost(),e.hostname=i.getHostname(),e.port=i.getPort(),e.pathname=i.getPathname(),e.search=i.getSearch(),e.searchParams=i.getSearchParams(),e.hash=i.getHash())},qb=zb.prototype,Vb=function(t,e){return{get:function(){return yy(this)[t]()},set:e&&function(t){return yy(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&(qi(qb,"href",Vb("serialize","setHref")),qi(qb,"origin",Vb("getOrigin")),qi(qb,"protocol",Vb("getProtocol","setProtocol")),qi(qb,"username",Vb("getUsername","setUsername")),qi(qb,"password",Vb("getPassword","setPassword")),qi(qb,"host",Vb("getHost","setHost")),qi(qb,"hostname",Vb("getHostname","setHostname")),qi(qb,"port",Vb("getPort","setPort")),qi(qb,"pathname",Vb("getPathname","setPathname")),qi(qb,"search",Vb("getSearch","setSearch")),qi(qb,"searchParams",Vb("getSearchParams")),qi(qb,"hash",Vb("getHash","setHash"))),oe(qb,"toJSON",function(){return yy(this).serialize()},{enumerable:!0}),oe(qb,"toString",function(){return yy(this).serialize()},{enumerable:!0}),Sy){var Hb=Sy.createObjectURL,Kb=Sy.revokeObjectURL;Hb&&oe(zb,"createObjectURL",Ue(Hb,Sy)),Kb&&oe(zb,"revokeObjectURL",Ue(Kb,Sy))}Wn(zb,"URL"),Le({global:!0,constructor:!0,forced:!jv,sham:!a},{URL:zb});var Wb="__rangers_ab_style__";var Jb=function(t){return t[t.Var=0]="Var",t[t.All=1]="All",t}(Jb||{}),Xb=2592e6,$b=function(){function t(){Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"abOption",void 0),Zl(this,"fetchUrl",void 0),Zl(this,"reportUrl",void 0),Zl(this,"fetchStatus","no"),Zl(this,"refreshFetchStatus","complete"),Zl(this,"versions",[]),Zl(this,"extVersions",[]),Zl(this,"mulilinkVersions",[]),Zl(this,"enable_multilink",!1),Zl(this,"enable_ab_visual",!1),Zl(this,"editMode",!1),Zl(this,"callbacks",[]),Zl(this,"abKey",void 0),Zl(this,"cacheStorgae",void 0),Zl(this,"data",null),Zl(this,"changeListener",new Map),Zl(this,"fetch",void 0),Zl(this,"readyStatus",!1),Zl(this,"types",void 0),Zl(this,"ab_cross",void 0),Zl(this,"ab_cookie_domain",void 0),Zl(this,"exposureCache",[]),Zl(this,"exposureLimit",void 0),Zl(this,"ab_batch_time",void 0),Zl(this,"reportTimeout",void 0)}var e=t.prototype;return e.apply=function(t,e){var n=this;if(this.collect=t,this.config=e,this.config.enable_ab_test){var i=e.enable_multilink,r=e.ab_channel_domain,o=e.enable_ab_visual,s=e.ab_cross,a=e.ab_cookie_domain,c=e.disable_ab_reset,u=r||ud(np[e.channel||"cn"]);this.cacheStorgae=new Zd,this.enable_multilink=i,this.enable_ab_visual=o,this.abKey="__tea_sdk_ab_version_"+e.app_id,this.ab_cross=s,this.ab_cookie_domain=a||"",this.fetchUrl=u+"/service/2/abtest_config/",this.reportUrl=""+t.configManager.getUrl("event"),this.exposureLimit=e.exposure_limit||20,this.ab_batch_time=e.ab_batch_time||500;var h=this.collect.Types;this.types=h,this.collect.on(h.TokenChange,function(t){c||"uuid"===t.type&&n.readyStatus&&(n.clearCache(),n.fetchAB())}),this.collect.on(h.TokenReset,function(){c||n.readyStatus&&(n.clearCache(),n.fetchAB())}),this.collect.on(h.AbVar,function(t){var e=t.name,i=t.defaultValue,r=t.callback;n.getVar(e,i,r)}),this.collect.on(h.AbAllVars,function(t){n.getAllVars(t)}),this.collect.on(h.AbConfig,function(t){var e=t.params,i=t.callback;n.getABconfig(e,i)}),this.collect.on(h.AbExternalVersion,function(t){n.setExternalAbVersion(t)}),this.collect.on(h.AbOpenLayer,function(){n.openOverlayer()}),this.collect.on(h.AbCloseLayer,function(){n.closeOverlayer()}),this.collect.on(h.AbVersionChangeOn,function(t){n.changeListener.set(t,t)}),this.collect.on(h.AbVersionChangeOff,function(t){n.changeListener.get(t)&&n.changeListener.delete(t)}),this.loadMode(),(this.enable_ab_visual||this.enable_multilink)&&this.openOverlayer(this.config.multilink_timeout_ms||500),this.checkLocal(),this.ready("ab"),this.readyStatus||(this.fetchAB(),this.readyStatus=!0),this.collect.emit(h.AbReady)}},e.ready=function(t){var e=this;if(this.collect.set(t),this.collect.hook._hooksCache.hasOwnProperty(t)){var n=this.collect.hook._hooksCache[t];if(!Object.keys(n).length)return;var i=function(t){n[t].length&&n[t].forEach(function(n){e.collect.hook.emit(t,n)})};for(var r in n)i(r)}},e.loadMode=function(){},e.checkLocal=function(){var t=this.getABCache(),e=t.ab_version,n=t.ab_ext_version,i=t.ab_version_multilink,r=t.data,o=this.checkFromUrl();o?this.mulilinkVersions.push(o):this.mulilinkVersions=i||[],this.extVersions=n||[],this.versions=e||[],this.data=r;var s=this.versions.concat(this.extVersions);this.enable_multilink&&(s=s.concat(this.mulilinkVersions)),this.configVersions(s.join(","))},e.checkFromUrl=function(){var t=dd(window.location.href);return t&&t.vid?t.vid:""},e.updateVersions=function(){var t=this.extVersions.length?this.versions.concat(this.extVersions):this.versions;this.enable_multilink&&(t=t.concat(this.mulilinkVersions)),this.configVersions(t.join(",")),this.updateABCache(),this.changeListener.size>0&&this.changeListener.forEach(function(e){"function"==typeof e&&e(t)})},e.configVersions=function(t){this.collect.configManager.setAbVersion(t)},e.getVar=function(t,e,n){if(!t)throw new Error("variable must not be empty");if(void 0===e)throw new Error("variable no default value");if("function"!=typeof n)throw new Error("callback must be a function");var i={name:t,defaultValue:e,callback:n,type:Jb.Var};"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealVar(i,t):this.callbacks.push(i)},e.getRealVar=function(t,e){var n=t.name,i=t.defaultValue,r=t.callback,o=this.data;if(o){if(sd(o[n])){var s=o[n].vid;return"$ab_url"===e?this.mulilinkVersions.includes(s)||this.mulilinkVersions.push(s):this.versions.includes(s)||this.versions.push(s),this.updateVersions(),this.fechEvent(s,e,i),r(o[n].val),void this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 曝光了实验"+n,level:"info",time:Date.now(),data:o[n]})}this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 调用getVar",level:"info",time:Date.now(),data:i}),r(i)}else r(i)},e.getAllVars=function(t){if("function"!=typeof t)throw new Error("callback must be a function");var e={callback:t,type:Jb.All};"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealAllVars(e):this.callbacks.push(e)},e.getRealAllVars=function(t){(0,t.callback)(this.data?JSON.parse(JSON.stringify(this.data)):{}),this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 调用getAllVars",level:"info",time:Date.now(),data:this.data})},e.fechEvent=function(t,e,n){try{if(this.config.disable_track_event)return;if(!t)return;var i=this.collect.configManager.get(),r=i.header,o=i.user,s=this.getABCache();if(s&&s.uuid&&s.uuid!==o.user_unique_id)return;var a={event:"abtest_exposure",ab_sdk_version:""+t,params:JSON.stringify({app_id:this.config.appId,ab_url:"$ab_url"===e?n:window.location.href}),local_time_ms:Date.now()};r.custom=JSON.stringify(r.custom);var c={events:[a],user:o,header:r};"$ab_url"===e&&window.navigator.sendBeacon?window.navigator.sendBeacon(this.reportUrl,JSON.stringify([c])):this.reportExposure(c)}catch(t){this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}},e.reportExposure=function(t){var e=this;this.exposureCache.push(t),this.reportTimeout&&clearTimeout(this.reportTimeout),this.exposureCache.length>=this.exposureLimit?this.report():this.reportTimeout=setTimeout(function(){e.report(),clearTimeout(e.reportTimeout)},this.ab_batch_time)},e.report=function(){var t=this,e=this.collect.cryptoData(this.exposureCache);this.collect.requestManager.useRequest({url:this.reportUrl,data:e,timeout:1e5,useBeacon:!1,encryption:this.config.enable_encryption,encryption_header:this.config.encryption_header,zip:!0,type:"event"}),this.exposureCache.forEach(function(e){t.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:[e],code:200,status:"success"})}),this.exposureCache=[]},e.setExternalAbVersion=function(t){this.extVersions=[t],this.updateVersions()},e.getABconfig=function(t,e){var n=Object.keys(t);n&&n.length&&this.collect.configManager.set(t),this.fetchAB(e)},e.get=function(t){if(this.ab_cross){var e=this.cacheStorgae.getCookie(t,this.ab_cookie_domain);return e?JSON.parse(e):null}return this.cacheStorgae.getLocalItem(t)},e.set=function(t,e){this.ab_cross?this.cacheStorgae.setCookie(t,e,Xb,this.ab_cookie_domain):this.cacheStorgae.setLocalItem(t,e),this.collect.configManager.setAbCache(e)},e.getABCache=function(t){var e={ab_version:[],ab_ext_version:[],ab_version_multilink:[],data:null,timestamp:+new Date,uuid:""};return e=this.get(this.abKey)||e,Date.now()-e.timestamp>=Xb?(this.cacheStorgae.removeLocalItem(this.abKey),null):t?e[t]:e},e.updateABCache=function(){var t=this.getABCache();t.ab_version_multilink=this.mulilinkVersions,t.ab_ext_version=this.extVersions,t.ab_version=this.versions,t.timestamp=Date.now(),this.set(this.abKey,t)},e.setAbCache=function(t){var e=this.getABCache();e.data=this.data,e.uuid=t,e.timestamp=Date.now(),this.set(this.abKey,e)},e.clearCache=function(){this.refreshFetchStatus="ing",this.data={},this.extVersions=[],this.mulilinkVersions=[],this.versions=[],this.collect.configManager.clearAbCache()},e.openOverlayer=function(t){var e=this;if(function(){if(!document.getElementById(Wb)){var t="body { opacity: 0 !important; }",e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id=Wb,n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),e.appendChild(n)}}(),t)var n=setTimeout(function(){e.closeOverlayer(),clearTimeout(n)},t)},e.closeOverlayer=function(){var t;(t=document.getElementById(Wb))&&t.parentElement.removeChild(t)},e.fetchComplete=function(t,e){var n=this;if(t&&"[object Object]"==Object.prototype.toString.call(t)){this.data=t,this.setAbCache(e);var i=[];Object.keys(t).forEach(function(e){var n=t[e].vid;n&&i.push(n)}),this.versions=this.versions.filter(function(t){return i.includes(t)});var r=t.$ab_url,o=t.$ab_modification;if(o&&o.val&&this.enable_ab_visual){if(this.collect.destroy)return;this.getVar("$ab_modification",window.location.href,function(){n.closeOverlayer()})}else if(r&&this.enable_multilink){this.mulilinkVersions=this.mulilinkVersions.filter(function(t){return i.includes(t)});var s=r.val,a=r.vid;s&&a&&this.getVar("$ab_url",s,function(){n.editMode||(s!==window.location.href?setTimeout(function(){if(!n.collect.destroy){var t=""+s;t=-1===t.indexOf("http")?"https://"+t:t;var e=fd(t).host;try{var i=new URL(t);e!==location.host?i.searchParams.append("vid",a):window.history.replaceState("","",t),window.location.href=i.href}catch(e){window.location.href=t}}},100):n.closeOverlayer())})}this.updateVersions()}else this.closeOverlayer();this.callbacks.forEach(function(t){return n[t.type===Jb.Var?"getRealVar":"getRealAllVars"](t,"")}),this.callbacks=[]},e.fetchAB=function(t){var e=this,n=this.collect.configManager.get(),i=n.header,r=n.user;this.config.enable_anonymousid&&delete r.web_id;var o=r.user_unique_id,s={header:Object.assign({aid:this.config.app_id},r||{},i||{},{ab_sdk_version:this.collect.configManager.getAbVersion(),ab_url:window.location.href})},a=this.collect.cryptoData(s);this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 发起AB实验请求",level:"info",logType:"fetch",time:Date.now(),data:s,infoType:"sdk"}),this.collect.requestManager.useRequest({url:this.fetchUrl,data:a,success:function(n){e.fetchStatus="complete",e.refreshFetchStatus="complete";var i=n.data;"success"===n.message?(e.fetchComplete(i,o),t&&t(i)):(e.fetchComplete(null,o),t&&t(null)),e.collect.emit(e.types.AbComplete,i),e.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"AB实验请求成功",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"})},fail:function(){e.fetchStatus="complete",e.refreshFetchStatus="complete",e.fetchComplete(null,o),t&&t(null),e.collect.emit(e.types.AbTimeout),e.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"AB实验请求网络异常",level:"error",logType:"fetch",time:Date.now(),infoType:"sdk"})},timeout:this.config.ab_timeout||1e4,encryption:this.config.enable_encryption,encryption_header:this.config.encryption_header})},e.filterUrl=function(t){try{var e="";-1!==t.indexOf("&multilink=true")?e="&multilink=true[\0-ÿ]*":-1!==t.indexOf("?multilink=true")&&(e="\\?multilink=true[\0-ÿ]*");var n=new RegExp(e,"g");t=t.replace(n,"")}catch(t){}return t},t}(),Yb=function(){function t(t,e){Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"pageStartTime",void 0),Zl(this,"maxDuration",432e5),Zl(this,"sessionStartTime",void 0),Zl(this,"timerHandler",void 0),Zl(this,"url_path",void 0),Zl(this,"url",void 0),Zl(this,"title",void 0),Zl(this,"set_path",void 0),Zl(this,"set_url",void 0),Zl(this,"set_title",void 0),Zl(this,"aliveDTime",6e4),Zl(this,"aliveName",void 0),Zl(this,"disableCallback",void 0),Zl(this,"customParmas",void 0),Zl(this,"options",{aliveName:"predefine_page_alive",params:{}}),this.collect=t,this.config=e,this.pageStartTime=Date.now(),this.sessionStartTime=this.pageStartTime,this.timerHandler=null,sd(e.enable_stay_duration)&&(this.options=Object.assign(this.options,e.enable_stay_duration))}var e=t.prototype;return e.setParams=function(t,e,n){this.set_path=t,this.set_url=n,this.set_title=e},e.resetParams=function(t,e,n){this.url_path=t,this.url=n,this.title=e},e.enable=function(t,e,n){this.url_path=t||this.url_path,this.url=n||this.url,this.title=e||this.title,this.disableCallback=this.enablePageAlive(),this.options.params instanceof Function?this.customParmas=this.options.params():this.customParmas=this.options.params},e.disable=function(){this.disableCallback(),this.pageStartTime=Date.now()},e.sendEvent=function(t,e){void 0===e&&(e=!1);var n=e?this.aliveDTime:Date.now()-this.sessionStartTime;n<0||n>this.aliveDTime||Date.now()-this.pageStartTime>this.maxDuration||(this.collect.beconEvent(this.options.aliveName,Object.assign({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),duration:n,is_support_visibility_change:ld(),startTime:this.sessionStartTime,hidden:document.visibilityState,leave:t},this.customParmas)),this.sessionStartTime=Date.now(),this.resetParams(location.pathname,document.title,location.href))},e.getParams=function(t){switch(t){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.setUpTimer=function(){var t=this;return this.timerHandler&&clearInterval(this.timerHandler),setInterval(function(){Date.now()-t.sessionStartTime>t.aliveDTime&&t.sendEvent(!1,!0)},1e3)},e.visibilitychange=function(){"hidden"===document.visibilityState?this.timerHandler&&(clearInterval(this.timerHandler),this.sendEvent(!1)):"visible"===document.visibilityState&&(this.sessionStartTime=Date.now(),this.timerHandler=this.setUpTimer())},e.beforeunload=function(){document.hidden||this.sendEvent(!0)},e.enablePageAlive=function(){var t=this;this.timerHandler=this.setUpTimer();var e=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",e),window.addEventListener("pagehide",n),function(){t.beforeunload(),document.removeEventListener("visibilitychange",e),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},t}(),Zb=function(){function t(t,e){var n=this;Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"pageStartTime",void 0),Zl(this,"maxDuration",432e5),Zl(this,"sessionStartTime",void 0),Zl(this,"timerHandler",void 0),Zl(this,"url_path",void 0),Zl(this,"url",void 0),Zl(this,"title",void 0),Zl(this,"set_path",void 0),Zl(this,"set_url",void 0),Zl(this,"set_title",void 0),Zl(this,"aliveDTime",6e4),Zl(this,"aliveName",void 0),Zl(this,"options",{closeName:"predefine_page_close",params:{}}),Zl(this,"activeStartTime",void 0),Zl(this,"activeEndTime",void 0),Zl(this,"activeTimes",void 0),Zl(this,"totalTime",void 0),Zl(this,"disableCallback",void 0),Zl(this,"customParmas",void 0),Zl(this,"visibilitychange",function(){"hidden"===document.visibilityState?n.activeEndTime=Date.now():"visible"===document.visibilityState&&(n.activeEndTime&&(n.totalTime+=n.activeEndTime-n.activeStartTime,n.activeTimes+=1),n.activeEndTime=void 0,n.activeStartTime=Date.now())}),Zl(this,"beforeunload",function(){if(n.totalTime+=(n.activeEndTime||Date.now())-n.activeStartTime,n.config.autotrack){try{window.sessionStorage.setItem("_tea_cache_duration",JSON.stringify({duration:n.totalTime,page_title:document.title||location.pathname}))}catch(t){}}n.sendEventPageClose()}),this.collect=t,this.config=e,this.maxDuration=e.maxDuration||864e5,this.pageStartTime=Date.now(),sd(e.enable_stay_duration)&&(this.options=Object.assign(this.options,e.enable_stay_duration)),this.resetData()}var e=t.prototype;return e.setParams=function(t,e,n){this.set_path=t,this.set_url=n,this.set_title=e},e.resetParams=function(t,e,n){this.url_path=t,this.url=n,this.title=e},e.enable=function(t,e,n){this.url_path=t||this.url_path,this.url=n||this.url,this.title=e||this.title,this.disableCallback=this.enablePageClose()},e.disable=function(){this.disableCallback()},e.resetData=function(){this.activeStartTime=void 0===this.activeStartTime?this.pageStartTime:Date.now(),this.activeEndTime=void 0,this.activeTimes=1,this.totalTime=0,this.options.params instanceof Function?this.customParmas=this.options.params():this.customParmas=this.options.params,this.resetParams(location.pathname,document.title,location.href)},e.sendEventPageClose=function(){var t=Date.now()-this.pageStartTime;this.totalTime<0||t<0||this.totalTime>=this.maxDuration||(this.collect.beconEvent(this.options.closeName,Object.assign({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),active_times:this.activeTimes,duration:this.totalTime,total_duration:t,is_support_visibility_change:ld()},this.customParmas)),this.pageStartTime=Date.now(),this.resetData())},e.getParams=function(t){switch(t){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.enablePageClose=function(){var t=this,e=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",e),window.addEventListener("pagehide",n),function(){t.beforeunload(),document.removeEventListener("visibilitychange",e),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},t}(),Qb=function(){function t(){Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"title",void 0),Zl(this,"url",void 0),Zl(this,"url_path",void 0),Zl(this,"pageAlive",void 0),Zl(this,"pageClose",void 0)}var e=t.prototype;return e.apply=function(t,e){var n=this;if(this.collect=t,this.config=e,this.config.enable_stay_duration){this.title=document.title||location.pathname,this.url=location.href,this.url_path=location.pathname,this.pageAlive=new Yb(t,e),this.pageClose=new Zb(t,e);var i=this.collect.Types;this.collect.on(i.ResetStay,function(t){var e=t.url_path,i=t.title,r=t.url;n.resetStayDuration(e,i,r)}),this.collect.on(i.RouteChange,function(t){t.init||e.disable_route_report||n.resetStayDuration()}),this.collect.on(i.SetStay,function(t){var e=t.url_path,i=t.title,r=t.url;n.setStayParmas(e,i,r)}),this.enable(this.url_path,this.title,this.url),this.ready(i.Stay),this.collect.emit(i.StayReady)}},e.ready=function(t){var e=this;if(this.collect.set(t),this.collect.hook._hooksCache.hasOwnProperty(t)){var n=this.collect.hook._hooksCache[t];if(!Object.keys(n).length)return;var i=function(t){n[t].length&&n[t].forEach(function(n){e.collect.hook.emit(t,n)})};for(var r in n)i(r)}},e.enable=function(t,e,n){this.pageAlive.enable(t,e,n),this.pageClose.enable(t,e,n)},e.disable=function(){this.pageAlive.disable(),this.pageClose.disable()},e.setStayParmas=function(t,e,n){void 0===t&&(t=""),void 0===e&&(e=""),void 0===n&&(n=""),this.pageAlive.setParams(t,e,n),this.pageClose.setParams(t,e,n),this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行 resetStayParams",level:"info",time:Date.now(),data:{url_path:t,title:e,url:n}})},e.reset=function(t,e,n){this.disable(),this.enable(t,e,n)},e.resetStayDuration=function(t,e,n){this.reset(t,e,n),this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"SDK 执行 resetStayDuration",level:"info",time:Date.now(),data:{url_path:t,title:e,url:n}})},t}(),t_=function(){function t(){Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"cache",void 0),Zl(this,"duration",void 0),Zl(this,"reportUrl",void 0),Zl(this,"eventCheck",void 0)}var e=t.prototype;return e.apply=function(t,e){var n=this;this.collect=t,this.config=e,this.duration=6e4,this.reportUrl=t.configManager.getDomain()+"/profile/list",this.eventCheck=new ip(t,e),this.cache={},this.collect.on(rp.ProfileSet,function(t){n.setProfile(t)}),this.collect.on(rp.ProfileSetOnce,function(t){n.setOnceProfile(t)}),this.collect.on(rp.ProfileUnset,function(t){n.unsetProfile(t)}),this.collect.on(rp.ProfileIncrement,function(t){n.incrementProfile(t)}),this.collect.on(rp.ProfileAppend,function(t){n.appendProfile(t)}),this.collect.on(rp.ProfileClear,function(){n.cache={}}),this.ready(rp.Profile)},e.ready=function(t){var e=this;if(this.collect.set(t),this.collect.hook._hooksCache.hasOwnProperty(t)){var n=this.collect.hook._hooksCache[t];if(!Object.keys(n).length)return;var i=function(t){n[t].length&&n[t].forEach(function(n){e.collect.hook.emit(t,n)})};for(var r in n)i(r)}},e.report=function(t,e){var n=this;void 0===e&&(e={});try{if(this.config.disable_track_event)return;var i=[];i.push(this.collect.processEvent(t,e));var r=this.collect.eventManager.merge(i,!0),o=this.collect.cryptoData(r);this.collect.configManager.getUrl("profile");this.collect.requestManager.useRequest({url:this.reportUrl,data:o,timeout:1e5,encryption:this.config.enable_encryption,encryption_header:this.config.encryption_header,zip:!0,success:function(t,e,i,r,o){t&&0!==t.e?n.collect.emit(rp.SubmitError,{type:"f_data",eventData:e,errorCode:t.e,response:t,startTime:r,endTime:Date.now(),status:o}):n.collect.emit(rp.SubmitSuccess,{eventData:e,res:t,response:t,startTime:r,endTime:Date.now(),status:o})},fail:function(t,e,i){n.collect.emit(rp.SubmitError,{type:"f_net",eventData:t,errorCode:e,startTime:i,endTime:Date.now()})}}),this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:r,code:200,status:"success"})}catch(t){this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}},e.setProfile=function(t){var e=this.formatParams(t);e&&Object.keys(e).length&&(this.pushCache(e),this.report("__profile_set",Object.assign({},e,{profile:!0})))},e.setOnceProfile=function(t){var e=this.formatParams(t,!0);e&&Object.keys(e).length&&(this.pushCache(e),this.report("__profile_set_once",Object.assign({},e,{profile:!0})))},e.incrementProfile=function(t){t?this.report("__profile_increment",Object.assign({},t,{profile:!0})):console.warn("please check the params, must be object!!!")},e.unsetProfile=function(t){if(t){var e={};e[t]="1",this.report("__profile_unset",Object.assign({},e,{profile:!0}))}else console.warn("please check the key, must be string!!!")},e.appendProfile=function(t){if(t){var e={};for(var n in t)"string"==typeof t[n]||"Array"===Object.prototype.toString.call(t[n]).slice(8,-1)?e[n]=t[n]:console.warn("please check the value of param: "+n+", must be string or array !!!");Object.keys(e).length&&this.report("__profile_append",Object.assign({},e,{profile:!0}))}else console.warn("please check the params, must be object!!!")},e.pushCache=function(t){var e=this;Object.keys(t).forEach(function(n){e.cache[n]={val:e.clone(t[n]),timestamp:Date.now()}})},e.formatParams=function(t,e){var n=this;void 0===e&&(e=!1);try{if(!t||"[object Object]"!==Object.prototype.toString.call(t))return void console.warn("please check the params type, must be object !!!");var i={};for(var r in t)"string"==typeof t[r]||"number"==typeof t[r]||"Array"===Object.prototype.toString.call(t[r]).slice(8,-1)?i[r]=t[r]:console.warn("please check the value of params:"+r+", must be string,number,Array !!!");var o=Object.keys(i);if(!o.length)return;var s=Date.now();return o.filter(function(i){var r=n.cache[i];return e?!r:!(r&&n.compare(r.val,t[i])&&s-r.timestamp<n.duration)}).reduce(function(t,e){return t[e]=i[e],t},{})}catch(t){this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),console.log("error")}},e.compare=function(t,e){try{return JSON.stringify(t)===JSON.stringify(e)}catch(t){return this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),!1}},e.clone=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message}),t}},e.unReady=function(){console.warn("sdk is not ready, please use this api after start")},t}(),e_=function(){function t(){var t=this;Zl(this,"sessionInterval",void 0),Zl(this,"isSessionhasEvent",void 0),Zl(this,"startTime",void 0),Zl(this,"lastTime",void 0),Zl(this,"collect",void 0),Zl(this,"clearIntervalFunc",void 0),Zl(this,"setInterval",function(){t.clearIntervalFunc=function(t,e){void 0===t&&(t=function(){}),void 0===e&&(e=1e3);var n,i=Date.now()+e;return n=window.setTimeout(function r(){var o=Date.now()-i;t(),i+=e,n=window.setTimeout(r,Math.max(0,e-o))},e),function(){window.clearTimeout(n)}}(function(){t.isSessionhasEvent&&t.endCurrentSession()},t.sessionInterval)}),Zl(this,"clearInterval",function(){t.clearIntervalFunc&&t.clearIntervalFunc()})}var e=t.prototype;return e.apply=function(t,e){var n=this;if(this.collect=t,!e.disable_heartbeat){this.sessionInterval=6e4,this.startTime=0,this.lastTime=0,this.setInterval();var i=this.collect.Types;this.collect.on(i.SessionReset,function(){n.process()})}},e.endCurrentSession=function(){this.collect.event("_be_active",{start_time:this.startTime,end_time:this.lastTime,url:window.location.href,referrer:window.document.referrer,title:document.title||location.pathname}),this.isSessionhasEvent=!1,this.startTime=0},e.process=function(){this.isSessionhasEvent||(this.isSessionhasEvent=!0,this.startTime=+new Date);var t=this.lastTime||+new Date;this.lastTime=+new Date,this.lastTime-t>this.sessionInterval&&(this.clearInterval(),this.endCurrentSession(),this.setInterval())},t}(),n_=an.some,i_=cn("some");function r_(t,e){if(void 0===e&&(e="list"),!t)return!1;if(e&&"list"===e){if(["LI","TR","DL"].includes(t.nodeName))return!0;if(t.dataset&&t.dataset.hasOwnProperty("teaIdx"))return!0;if(t.hasAttribute&&t.hasAttribute("data-tea-idx"))return!0}else{if(["A","BUTTON"].includes(t.nodeName))return!0;if(t.dataset&&t.dataset.hasOwnProperty("teaContainer"))return!0;if(t.hasAttribute&&t.hasAttribute("data-tea-container"))return!0;if(t.hasAttribute&&u_(t,"ss"))return!0}return!1}Le({target:"Array",proto:!0,forced:!i_},{some:function(t){return n_(this,t,arguments.length>1?arguments[1]:void 0)}});var o_=function(t,e){return!!u_(t,e)};function s_(t){for(var e=t;e&&!r_(e,"container");){if("HTML"===e.nodeName||"BODY"===e.nodeName)return t;e=e.parentElement}return e||t}function a_(t){for(var e=t;e&&e.parentNode;){if(e.hasAttribute("data-tea-ignore"))return!0;if("HTML"===e.nodeName||"body"===e.nodeName)return!1;e=e.parentNode}return!1}var c_=function(t,e){return t.hasAttribute?t.hasAttribute(e):t.attributes?!(!t.attributes[e]||!t.attributes[e].specified):void 0},u_=function(t,e){if("string"==typeof e)return c_(t,e);if(ad(e)){for(var n=!1,i=0;i<e.length;i++){if(c_(t,e[i])){n=!0;break}}return n}},h_=function(t,e){var n={};if("string"==typeof e)c_(t,e)&&(n[e]=t.getAttribute(e));else if(ad(e))for(var i=0;i<e.length;i++){c_(t,e[i])&&(n[e[i]]=t.getAttribute(e[i]))}return n};var l_=function(){function t(t,e,n){var i=this;Zl(this,"config",void 0),Zl(this,"options",void 0),Zl(this,"beatTime",void 0),Zl(this,"statistics",void 0),Zl(this,"eventHandel",void 0),Zl(this,"collect",void 0),Zl(this,"clickEvent",function(t){(function(t,e){if(1!==t.nodeType)return!1;if(!e.svg&&function(t){if("svg"===t.tagName.toLowerCase())return!0;for(var e=t.parentElement,n=!1;e;)"svg"===e.tagName.toLowerCase()?(e=null,n=!0):e=e.parentElement;return n}(t))return!1;if(["HTML","BODY"].includes(t.tagName.toUpperCase()))return!1;var n=t;return!!("none"!==n.style.display&&(r_(n,"container")||e.track_attr&&o_(n,e.track_attr)||function(t){if(t.children.length){var e=t.children;return![].slice.call(e).some(function(t){return t.children.length>0})}return!0}(n)))})(t.target,i.options)&&i.eventHandel({eventType:"dom",eventName:"click"},t)}),Zl(this,"changeEvent",function(t){i.eventHandel({eventType:"dom",eventName:"change"},t)}),Zl(this,"submitEvent",function(t){i.eventHandel({eventType:"dom",eventName:"submit"},t)}),Zl(this,"getPageViewEvent",function(t,e){e&&"pushState"===e&&i.eventHandel({eventType:"dom",eventName:"beat"},Object.assign({beat_type:0},t)),i.eventHandel({eventType:"dom",eventName:"page_view"},t)}),Zl(this,"getPageLoadEvent",function(t){i.eventHandel({eventType:"dom",eventName:"page_statistics"},{lcp:t})}),this.config=n.getConfig().eventConfig,this.collect=e,this.options=t,this.beatTime=t.beat,this.statistics=!1}var e=t.prototype;return e.init=function(t){this.eventHandel=t;var e=this.config.mode;this.addListener(e)},e.addListener=function(t){var e=this;if("proxy-capturing"===t&&(this.config.click&&window.document.addEventListener("click",this.clickEvent,!0),this.config.change&&window.document.addEventListener("change",this.changeEvent,!0),this.config.submit&&window.document.addEventListener("submit",this.submitEvent,!0),this.config.pv&&this.collect.on("route-change",function(t){var n=t.config,i=t.name;e.getPageViewEvent(n,i)}),this.config.beat)){try{"complete"===document.readyState?this.beatEvent(this.beatTime):window.addEventListener("load",function(){e.beatEvent(e.beatTime)});var n=0,i=null;window.addEventListener("scroll",function(){clearTimeout(i),i=setTimeout(r,500),n=document.documentElement.scrollTop||document.body.scrollTop});var r=function(){(document.documentElement.scrollTop||document.body.scrollTop)==n&&e.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:1})}}catch(t){}try{var o=window.performance&&window.performance.getEntriesByType("paint");if(o&&o.length){var s=new PerformanceObserver(function(t){var n=t.getEntries(),i=n[n.length-1],r=i.renderTime||i.loadTime;e.statistics||(e.getPageLoadEvent(r),e.statistics=!0)});s.observe({entryTypes:["largest-contentful-paint"]}),setTimeout(function(){e.statistics||(e.getPageLoadEvent(o[0].startTime||0),e.statistics=!0)},2e3)}else this.getPageLoadEvent(0)}catch(t){this.getPageLoadEvent(0)}}},e.removeListener=function(){window.document.removeEventListener("click",this.clickEvent,!0),window.document.removeEventListener("change",this.changeEvent,!0),window.document.removeEventListener("submit",this.submitEvent,!0)},e.beatEvent=function(t){var e=this;try{var n;this.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:3}),this.beatTime&&(n=setInterval(function(){e.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:2})},t)),hd(function(){e.eventHandel({eventType:"dom",eventName:"beat",eventSend:"becon"},{beat_type:0}),e.beatTime&&clearInterval(n)})}catch(t){}},t}(),f_={eventConfig:{mode:"proxy-capturing",submit:!1,click:!0,change:!1,pv:!0,beat:!0,hashTag:!1,impr:!1},scoutConfig:{mode:"xpath"}},d_=function(){function t(t,e){Zl(this,"config",void 0),this.config=t,this.config.eventConfig=Object.assign(this.config.eventConfig,e)}var e=t.prototype;return e.getConfig=function(){return this.config},e.setConfig=function(t){return this.config=t},t}();function p_(t){for(var e=[];null!==t.parentElement;)e.push(t),t=t.parentElement;var n=[],i=[];return e.forEach(function(t){var e=function(t){if(null===t)return{str:"",index:0};var e=0,n=t.parentElement;if(n)for(var i=n.children,r=0;r<i.length&&i[r]!==t;r++)i[r].nodeName===t.nodeName&&e++;return{str:[t.nodeName.toLowerCase(),r_(t,"list")?"[]":""].join(""),index:e}}(t),r=e.str,o=e.index;n.unshift(r),i.unshift(o)}),{element_path:"/"+n.join("/"),positions:i}}function g_(t,e,n,i){var r={},o=function(t){if(t){var e=t.getBoundingClientRect(),n=e.width,i=e.height;return{left:e.left,top:e.top,element_width:n,element_height:i}}}(e),s=function(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=t,i=n.clientX,r=n.clientY,o=e,s=o.left,a=o.top,c=i-s>=0?i-s:0,u=r-a>=0?r-a:0;return{touch_x:Math.floor(c),touch_y:Math.floor(u)}}(t,o),a=o.element_width,c=o.element_height,u=s.touch_x,h=s.touch_y,l=p_(e),f=l.element_path,d=l.positions,p=function(t){var e=s_(t),n=[];return function t(e){var i=function(t){var e="";return 3===t.nodeType?e=t.textContent.trim():t.dataset&&t.dataset.hasOwnProperty("teaTitle")||t.hasAttribute("ata-tea-title")?e=t.getAttribute("data-tea-title"):t.hasAttribute("title")?e=t.getAttribute("title"):"INPUT"===t.nodeName&&["button","submit"].includes(t.getAttribute("type"))?e=t.getAttribute("value"):"IMG"===t.nodeName&&t.getAttribute("alt")&&(e=t.getAttribute("alt")),e.slice(0,200)}(e);if(i&&-1===n.indexOf(i)&&n.push(i),e.childNodes.length>0)for(var r=e.childNodes,o=0;o<r.length;o++)8!==r[o].nodeType&&t(r[o])}(e),n}(e),g=window.performance.timing.navigationStart,v=Date.now()-g,m=d.map(function(t){return""+t}),y=null;if(window.TEAVisualEditor&&window.TEAVisualEditor.getOriginXpath&&(y=window.TEAVisualEditor.getOriginXpath({xpath:f,positions:m})),r.element_path=y&&y.xpath||f,r.positions=y&&y.positions||m,i&&!i.text&&(r.texts=p,r.element_title=function(t){if(!t)return"";var e="";return t.textContent?e=t.textContent.trim():t.innerText&&(e=t.innerText.trim()),"input"!==t.tagName&&"INPUT"!==t.tagName||(e=t.value||""),e}(e)),r.element_id=e.getAttribute("id")||"",r.element_class_name=e.getAttribute("class")||"",r.element_type=e.nodeType,r.element_width=Math.floor(a),r.element_height=Math.floor(c),r.touch_x=u,r.touch_y=h,r.page_manual_key="",r.elememt_manual_key="",r.since_page_start_ms=v,r.page_start_ms=g,r.page_path=location.pathname,r.page_host=location.host,n.track_attr&&o_(e,n.track_attr)){var b=h_(e,n.track_attr);for(var _ in b)r[_]=b[_]}if(n.custom_attr)try{if(o_(e,n.custom_attr)){var w=h_(e,n.custom_attr),E=decodeURIComponent(w[n.custom_attr]),S=JSON.parse(E);if(Object.keys(S))for(var T in S)r[T]=S[T]}}catch(t){console.log("custom attr error")}var A=s_(e);return"A"===A.tagName&&(r.href=A.getAttribute("href")),!1!==n.src&&("IMG"!==e.tagName||e.getAttribute("src").includes("base64")||(r.src=e.getAttribute("src"))),r}var v_=function(t,e,n,i,r){return Object.assign({event:t},g_(e,n,i,r),{is_html:1,page_key:window.location.href,page_title:document.title})},m_=function(){function t(t,e){Zl(this,"eventName",void 0),Zl(this,"ignore",{text:!1}),Zl(this,"initConfig",void 0),Zl(this,"options",void 0),this.initConfig=t,this.options=e,this.eventName=e&&"tea"===e.custom?{click:"__bav_click",page:"__bav_page",beat:"__bav_beat",static:"__bav_page_statistics",exposure:"__bav_page_exposure"}:{click:"bav2b_click",page:"bav2b_page",beat:"bav2b_beat",static:"bav2b_page_statistics",exposure:"bav2b_exposure",scroll:"$bav2b_slide"},e&&!1===e.text&&(this.ignore.text=!0),e&&e.exposure&&e.exposure.eventName&&(this.eventName.exposure=e.exposure.eventName)}var e=t.prototype;return e.handleEvent=function(t,e){try{if(a_(t.target))return null;var n="bav2b_click";switch(e){case"click":return n=this.eventName.click,v_(n,t,t.target,this.options,this.ignore);case"exposure":return n=this.eventName.exposure,v_(n,t,t.target,this.options,this.ignore);case"change":return n="bav2b_change",Object.assign({},v_(n,t,t.target,this.options),function(t,e){try{if("bav2b_change"===t)return e.hasAttribute("data-tea-track")?{value:e.value}:{}}catch(t){return{}}}(n,t.target));case"submit":return v_(n="bav2b_submit",t,t.target,this.options)}}catch(t){return console.error(t),null}},e.handleViewEvent=function(t){t.event=this.eventName.page,t.page_title=document.title,t.page_total_width=window.innerWidth,t.page_total_height=window.innerHeight;try{var e=window.sessionStorage.getItem("_tea_cache_duration");if(e){var n=JSON.parse(e);t.refer_page_duration_ms=n?n.duration:""}t.scroll_width=document.documentElement.scrollLeft?document.documentElement.scrollLeft+window.innerWidth:window.innerWidth,t.scroll_height=document.documentElement.scrollTop?document.documentElement.scrollTop+window.innerHeight:window.innerHeight,t.page_start_ms=window.performance.timing.navigationStart}catch(t){console.log("page event error "+JSON.stringify(t))}return t},e.handleStatisticsEvent=function(t){var e={};e.event=this.eventName.static,e.is_html=1,e.page_key=location.href,e.refer_page_key=document.referrer||"",e.page_title=document.title,e.page_manual_key=this.initConfig.autotrack.page_manual_key||"",e.refer_page_manual_key="";try{var n=t.lcp,i=window.performance.timing,r=i.loadEventEnd-i.navigationStart;e.page_init_cost_ms=parseInt(n||(r>0?r:0)),e.page_start_ms=i.navigationStart}catch(t){console.log("page_statistics event error "+JSON.stringify(t))}return e},e.handleBeadtEvent=function(t){t.event=this.eventName.beat,t.page_key=window.location.href,t.is_html=1,t.page_title=document.title,t.page_manual_key=this.initConfig.autotrack.page_manual_key||"";try{t.page_viewport_width=window.innerWidth,t.page_viewport_height=window.innerHeight,t.page_total_width=document.documentElement.scrollWidth,t.page_total_height=document.documentElement.scrollHeight,t.scroll_width=document.documentElement.scrollLeft+window.innerWidth,t.scroll_height=document.documentElement.scrollTop+window.innerHeight,t.since_page_start_ms=Date.now()-window.performance.timing.navigationStart,t.page_start_ms=window.performance.timing.navigationStart}catch(t){console.log("beat event error "+JSON.stringify(t))}return t},e.handleExposureEvent=function(t,e){if(a_(e.target))return null;var n=v_(t.event||this.eventName.exposure,e,e.target||e,this.options,this.ignore);if(n.$exposure_type=t.exposureType,this.options.exposure.callback){var i=this.options.exposure.callback(n);return i||Object.keys(i).length?i:(console.warn("exposure callback must return data!"),n)}return n},e.handleScrollEvent=function(t,e){var n=v_(t.event||this.eventName.scroll,e,e.target||e,this.options,this.ignore);if(n=Object.assign(n,t.params),!this.options.scroll.callback||(n=this.options.scroll.callback(n))||Object.keys(n).length)return n;console.warn("scroll callback must return data!")},t}(),y_=function(){function t(t){Zl(this,"logFunc",void 0),Zl(this,"logFuncBecon",void 0),Zl(this,"collect",void 0),this.collect=t}var e=t.prototype;return e.send=function(t,e){var n=e.event;delete e.event,t&&"becon"===t.eventSend?this.collect.beconEvent(n,e):this.collect.event(n,e)},e.get=function(t,e){var n=Object.assign({headers:{"content-type":"application/json"},method:"GET"},e);fetch(t,n)},e.post=function(t,e){var n=Object.assign({headers:{"content-type":"application/json"},method:"POST"},e);fetch(t,n)},t}(),b_=function(){function t(t,e){Zl(this,"_instance",void 0),Zl(this,"_intersection",void 0),Zl(this,"config",void 0),this._instance=null,this._intersection=t,this.config=e,this._intersection&&this.init()}var e=t.prototype;return e.init=function(){var t=this;if(window.MutationObserver)try{if(this._instance=new MutationObserver(function(e){e.forEach(function(e){"attributes"===e.type&&t.attributeChangeObserve(e),"childList"===e.type&&t.modifyNodeObserve(e)})}),!document||!document.body)return void console.warn("please use sdk api init after body element");var e=!1!==this.config.autotrack.exposure.attributes;this._instance.observe(document.body,{childList:!0,attributes:e,subtree:!0,attributeOldValue:!1})}catch(t){console.log("your browser cannot support MutationObserver,so cannot report exposure event, please update")}else console.log("your browser cannot support MutationObserver,so cannot report exposure event, please update")},e.attributeChangeObserve=function(t){t.target.hasAttribute("data-exposure")?this.exposureAdd(t,"mutation"):this.exposureRemove(t)},e.modifyNodeObserve=function(t){var e=this;Array.prototype.forEach.call(t.addedNodes,function(t){1===t.nodeType&&t.hasAttribute("data-exposure")&&e.exposureAdd(t,"intersect"),e.mapChild(t,e.exposureAdd.bind(e))}),Array.prototype.forEach.call(t.removedNodes,function(t){1===t.nodeType&&t.hasAttribute("data-exposure")&&e.exposureRemove(t),e.mapChild(t,e.exposureRemove.bind(e))})},e.mapChild=function(t,e){var n=this;1===t.nodeType&&t.children.length&&Array.prototype.forEach.call(t.children,function(t){1===t.nodeType&&t.hasAttribute("data-exposure")&&e(t),n.mapChild(t,e)})},e.exposureAdd=function(t,e){try{this._intersection&&this._intersection.exposureAdd(t,e)}catch(t){console.log("intersection error",JSON.stringify(t.message))}},e.exposureRemove=function(t){try{this._intersection&&this._intersection.exposureRemove(t)}catch(t){console.log("intersection error",JSON.stringify(t.message))}},t}();Zl(b_,"_exposure_observer",null);var __=function(t){return t[t.EXPOSURE_ONCE=0]="EXPOSURE_ONCE",t[t.LIFECYCLE_SHOW_NEW=3]="LIFECYCLE_SHOW_NEW",t[t.RESUME_FORM_PAGE=6]="RESUME_FORM_PAGE",t[t.RESUME_FORM_BACK=7]="RESUME_FORM_BACK",t[t.NOT_EXPOSURE=-1]="NOT_EXPOSURE",t}(__||{}),w_=function(){function t(e,n,i){var r=this;Zl(this,"count",void 0),Zl(this,"instance",void 0),Zl(this,"observeMap",void 0),Zl(this,"ratio",void 0),Zl(this,"eventHandle",void 0),Zl(this,"timeLimit",void 0),Zl(this,"exposureType",void 0),Zl(this,"hashMap",void 0),Zl(this,"lastState",void 0),Zl(this,"backStatus",!1),Zl(this,"customType",void 0),Zl(this,"collect",void 0),this.instance=this.buildObserver(),this.collect=e,this.observeMap=t._observer_map,n.autotrack.exposure.ratio?this.ratio=n.autotrack.exposure.ratio:0===n.autotrack.exposure.ratio?this.ratio=0:this.ratio=.5,this.timeLimit=n.autotrack.exposure.stay||0,this.exposureType=__.NOT_EXPOSURE,this.eventHandle=i,this.hashMap=new Map,this.backStatus=!1,this.lastState=null,this.collect.on("re-start-sdk",function(){r.visibilitychange()}),this.addListen()}var e=t.prototype;return e.buildObserver=function(){var e=this;if(t._observer_instance)return console.log("your browser cannot support IntersectionObserver, so cannot report exposure event, please update"),null;if(window.IntersectionObserver){for(var n=[],i=0;i<=1;i+=.01)n.push(i);n.push(1);try{t._observer_instance=new IntersectionObserver(function(t){t.forEach(function(t){var n=t.target.observeId,i=e.observeMap.get(n),r=(t.target,t.isIntersecting,t.intersectionRatio);if(i.intersectionRatio=r,r<=.1&&(t.target.backStatus=!1),e.observeMap.set(n,i),r<e.ratio)return i.isIntersecting=!1,i.added=!1,i.exposured=!1,i.startTime=Date.now(),void e.observeMap.set(n,i);if(!i.added){if(i.startTime=Date.now(),i.added=!0,i.isIntersecting=!0,e.timeLimit){var o=setTimeout(function(){try{if(i.isIntersecting&&!i.exposured&&e.observeMap.get(n)){var r=e.observeMap.get(n).intersectionRatio;e.exposureEvent(t,r,n,i)}}catch(t){console.log("IntersectionObserver setTimeout error,msg: "+JSON.stringify(t))}},e.timeLimit);i.wait=o}e.observeMap.set(n,i)}Date.now()-i.startTime>=e.timeLimit&&!i.exposured&&e.exposureEvent(t,r,n,i)})},{threshold:n})}catch(t){console.log("IntersectionObserver error,msg: "+JSON.stringify(t))}return t._observer_instance}return console.log("your browser cannot support IntersectionObserver, so cannot report exposure event, please update"),null},e.exposureAdd=function(t,e){var n="mutation"===e?t.target:t,i=n.observeId,r=mp();if(i||this.observeMap.has(i)){var o=this.observeMap.get(i);if(o&&n!==o.instance)this.unobserve(n),this.observeMap.delete(i),n.observeId=r,n.visible=!1,this.observeMap.set(r,{instance:n.cloneNode(!0),isIntersecting:!1}),this.observe(n);else{if(!0===n.visible)return;this.handleBoundingExposure(n)}}else n.observeId=r,n.visible=!1,this.observeMap.set(r,{instance:n.cloneNode(!0),isIntersecting:!1}),this.observe(n)},e.exposureRemove=function(t){this.observeMap.has(t.observeId)&&(this.observeMap.delete(t.observeId),this.unobserve(t),t.observeId="",t.visible=!1)},e.exposureEvent=function(t,e,n,i){if(e>=this.ratio){if("0"===t.target.style.opacity||"hidden"===t.target.style.visibility)return;if(!0===i.exposured)return;i.startWait&&clearTimeout(i.startWait);var r=t.target.getAttribute("data-exposure-event");this.eventHandle({eventType:"dom",eventName:"exposure",event:r,exposureType:this.getExposureType(t.target)},t),t.target.visible=!0,t.target.hasExposure=!0,i.startTime=Date.now(),i.exposured=!0}else i.startTime=Date.now(),i.exposured=!1;this.observeMap.set(n,i)},e.observe=function(t){this.instance&&this.instance.observe(t)},e.unobserve=function(t){this.instance&&this.instance.unobserve(t)},e.getExposureDomToExposure=function(){var t=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),function(e){t.handleBoundingExposure(e)})},e.visibilitychange=function(){var t=this,e=null;"visible"===document.visibilityState?this.timeLimit?e=setTimeout(function(){t.getExposureDomToExposure()},this.timeLimit):this.getExposureDomToExposure():(clearTimeout(e),this.customType=void 0)},e.handleBoundingExposure=function(t){if(this.getBoundingRatio(t)>=this.ratio){t.visible=!0;var e=t.getAttribute&&t.getAttribute("data-exposure-event");this.eventHandle({eventType:"dom",eventName:"exposure",event:e,exposureType:this.customType||__.RESUME_FORM_BACK},t)}},e.getBoundingRatio=function(t){var e=t.getBoundingClientRect(),n=e.top,i=e.left,r=e.width,o=e.height,s=window.innerWidth||document.documentElement.clientWidth,a=window.innerHeight||document.documentElement.clientHeight;return n>=0&&i>=0&&n<=a&&i<=s?(r>s?s:r)*(a-n)/(r*o):0},e.getExposureType=function(t){return t.visible?!1!==t.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=__.RESUME_FORM_PAGE:this.exposureType=__.LIFECYCLE_SHOW_NEW:(t.hasExposure,!1!==t.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=__.RESUME_FORM_PAGE:this.exposureType=__.EXPOSURE_ONCE),this.exposureType},e.addListen=function(){var t=this;this.collect.on("set-exposure-type",function(e){t.customType=e});var e=this.visibilitychange.bind(this);if(function(t,e,n,i){t.addEventListener?t.addEventListener(e,n,i):t.attachEven?t.attachEven("on"+e,n):t["on"+e]=n}(document,"visibilitychange",e,!1),window.addEventListener("hashchange",function(e){var n=t.hashMap.get(e.oldURL);n&&location.href===n.prev?(t.backStatus=!0,t.exposureType=__.RESUME_FORM_PAGE):(t.backStatus=!1,t.hashMap.set(location.href,{current:e.newURL,prev:e.oldURL}))}),this.collect.bridgeReport){var n=window.history.pushState;history.pushState=function(e){"function"==typeof history.onpushstate&&history.onpushstate({state:e});for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];var s=n.call.apply(n,[history,e].concat(r));return t.lastState=e,s};var i=history.replaceState;history.replaceState=function(e){"function"==typeof history.onreplacestate&&history.onreplacestate({state:e});for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=i.call.apply(i,[history,e].concat(r));return t.lastState=e,s}}else this.collect.on("STATE_CHANGE",function(e){t.lastState=e});return window.addEventListener("popstate",function(e){var n=e.state;n&&n.current&&t.lastState&&t.lastState.back&&n.current===t.lastState.back?(t.backStatus=!0,t.exposureType=__.RESUME_FORM_PAGE):t.backStatus=!1}),function(){!function(t,e,n,i){t.addEventListener?t.removeEventListener(e,n,i):t.attachEven&&t.detachEven("on"+e,n)}(document,"visibilitychange",e,!1)}},t}();Zl(w_,"_observer_instance",null),Zl(w_,"_observer_map",new Map);var E_=function(){function t(t,e,n){Zl(this,"_observer",void 0),Zl(this,"_intersection",void 0),e.autotrack&&e.autotrack.exposure&&(this._intersection=new w_(t,e,n),this._observer=new b_(this._intersection,e),this._intersection&&this._observer?this.initObserver():console.log("your browser version cannot support exposure event, please update~"))}return t.prototype.initObserver=function(){var t=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),function(e){t._intersection.exposureAdd(e,"intersect")})},t}(),S_=function(t){return t[t.SCROLL_UP=1]="SCROLL_UP",t[t.SCROLL_DOWN=2]="SCROLL_DOWN",t[t.SCROLL_LEFT=3]="SCROLL_LEFT",t[t.SCROLL_RIGHT=4]="SCROLL_RIGHT",t[t.NOT_SCROLL=-1]="NOT_SCROLL",t}(S_||{}),T_=function(){function t(t,e){Zl(this,"eventHandle",void 0),Zl(this,"distance",30),Zl(this,"scrollType",void 0),t.autotrack&&t.autotrack.scroll&&(t.autotrack.scroll.distance&&(this.distance=t.autotrack.scroll.distance),this.eventHandle=e,this.addLinstenr(),this.mutation())}var e=t.prototype;return e.addLinstenr=function(){var t=this;Array.prototype.forEach.call(document.querySelectorAll("[data-scroll]"),function(e){t.scrollHandle(e)})},e.mutation=function(){var t=this;if(window.MutationObserver)try{var e=new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type&&t.modifyNodeObserve(e)})});if(!document||!document.body)return void console.warn("please use sdk api init after body element");e.observe(document.body,{childList:!0,attributes:!0,subtree:!0,attributeOldValue:!1})}catch(t){console.log("your browser cannot support MutationObserver")}else console.log("your browser cannot support MutationObserver")},e.modifyNodeObserve=function(t){var e=this;Array.prototype.forEach.call(t.addedNodes,function(t){1===t.nodeType&&t.hasAttribute("data-scroll")&&e.scrollHandle(t),e.mapChild(t,e.scrollHandle.bind(e))}),Array.prototype.forEach.call(t.removedNodes,function(t){1===t.nodeType&&t.hasAttribute("data-scroll")&&e.scrollHandle(t,"remove"),e.mapChild(t,e.scrollHandle.bind(e))})},e.mapChild=function(t,e){var n=this;1===t.nodeType&&t.children.length&&Array.prototype.forEach.call(t.children,function(t){1===t.nodeType&&t.hasAttribute("data-scroll")&&e(t),n.mapChild(t,e)})},e.scrollHandle=function(t,e){var n=this;try{var i=t.scrollTop,r=t.scrollLeft,o=null,s=0,a=0,c=function(e){clearTimeout(o),o=setTimeout(function(){var o=t.scrollTop,l=t.scrollLeft,f=e.target&&e.target.getAttribute("data-scroll-event")||"";1===h||2===h?o===c&&(a=c-i,Math.abs(a)>=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:f,params:{$direction:h,$offsetY:a,$offsetX:s}},e)):3!==h&&4!==h||l===u&&(s=u-r,Math.abs(s)>=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:f,params:{$direction:h,$offsetY:a,$offsetX:s}},e)),i=c,r=u},100);var c=t.scrollTop,u=t.scrollLeft,h=S_.NOT_SCROLL;c>i?h=S_.SCROLL_DOWN:c<i?h=S_.SCROLL_UP:u>r?h=S_.SCROLL_LEFT:u<r&&(h=S_.SCROLL_RIGHT)};return"remove"===e?t.removeEventListener("scroll",c,!1):t.addEventListener("scroll",c,!1),function(){t.removeEventListener("scroll",c,!1)}}catch(t){console.warn("scroll event error",JSON.stringify(t))}},t}(),A_={hashTag:!1,impr:!1},k_=function(){function t(){Zl(this,"engine",void 0),Zl(this,"Listener",void 0),Zl(this,"EventHandle",void 0),Zl(this,"Request",void 0),Zl(this,"Exposure",void 0),Zl(this,"Scroll",void 0),Zl(this,"Config",void 0),Zl(this,"options",void 0),Zl(this,"destroyed",void 0),Zl(this,"autoTrackStart",void 0),Zl(this,"collect",void 0),Zl(this,"config",void 0)}var e=t.prototype;return e.apply=function(t,e){if(this.autoTrackStart=!1,this.collect=t,this.config=e,e.autotrack&&(!e.autotrack||!e.autotrack.collect_url||e.autotrack.collect_url())){var n=t.Types;this.ready(n.Autotrack),this.collect.emit(n.AutotrackReady)}},e.ready=function(t){this.collect.set(t);var e=this.config.autotrack;e="object"==typeof e?e:{},e=Object.assign(A_,e),this.destroyed=!1,this.options=e,this.Config=new d_(f_,this.options),this.Exposure=new E_(this.collect,this.config,this.handle.bind(this)),this.Scroll=new T_(this.config,this.handle.bind(this)),this.Listener=new l_(e,this.collect,this.Config),this.EventHandle=new m_(this.config,e),this.Request=new y_(this.collect),this.autoTrackStart=!0,this.init()},e.init=function(){this.Listener.init(this.handle.bind(this))},e.handle=function(t,e){try{if(this.config.autotrack.collect_url&&!this.config.autotrack.collect_url())return}catch(t){}this.collect.sdkStop||"dom"===t.eventType&&this.handleDom(t,e)},e.handleDom=function(t,e){try{var n=t.eventName;if("click"===n||"change"===n||"submit"===n){var i=this.EventHandle.handleEvent(e,n);i&&this.Request.send({eventType:"custom"},i)}else if("page_view"===n||"page_statistics"===n){var r;(r="page_view"===n?this.EventHandle.handleViewEvent(e):this.EventHandle.handleStatisticsEvent(e))&&this.Request.send({eventType:"custom"},r)}else if("beat"===n){var o=this.EventHandle.handleBeadtEvent(e),s=t.eventSend;o&&this.Request.send({eventType:"custom",eventSend:s},o)}else if("exposure"===n){var a=this.EventHandle.handleExposureEvent(t,e);a&&this.Request.send({eventType:"custom"},a)}else if("scroll"===n){var c=this.EventHandle.handleScrollEvent(t,e);c&&this.Request.send({eventType:"custom"},c)}}catch(t){console.log("handel dom event error "+JSON.stringify(t))}},e.destroy=function(){if(!this.autoTrackStart)return console.warn("engine is undefined, make sure you have called autoTrack.start()");this.autoTrackStart=!1,this.Listener.removeListener()},t}(),x_=function(){function t(){Zl(this,"storage",void 0),Zl(this,"lastLocation",void 0),Zl(this,"autotrack",!1),Zl(this,"spa",!1),Zl(this,"fncArray",void 0),Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"cache_key",void 0),Zl(this,"cache",{}),Zl(this,"appid",void 0),Zl(this,"allowHash",!1)}var e=t.prototype;return e.apply=function(t,e){if(e.spa||e.autotrack){var n=t.Types;this.collect=t,this.config=e,this.appid=e.app_id,this.allowHash=e.allow_hash,this.fncArray=new Map,this.setKey(),this.setLocation(),this.hack(),this.init(),this.listener(),t.emit(n.RouteReady)}},e.setKey=function(){this.storage=new Zd,this.cache_key="__tea_cache_refer_"+this.appid,this.cache={refer_key:"",refer_title:document.title||location.pathname,refer_manual_key:"",routeChange:!1},this.config.autotrack&&"object"==typeof this.config.autotrack&&this.config.autotrack.page_manual_key&&(this.cache.refer_manual_key=this.config.autotrack.page_manual_key),this.storage.setLocalItem(this.cache_key,this.cache)},e.hack=function(){var t=this,e=window.history.pushState;history.pushState=function(n){"function"==typeof history.onpushstate&&history.onpushstate({state:n});for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];var s=e.call.apply(e,[history,n].concat(r));if(t.lastLocation!==location.href){var a=t.getPopStateChangeEventData();return t.setReferCache(t.lastLocation),t.lastLocation=location.href,t.sendPv(a,"pushState"),s}};var n=history.replaceState;history.replaceState=function(e){"function"==typeof history.onreplacestate&&history.onreplacestate({state:e});for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];var s=n.call.apply(n,[history,e].concat(r));if(t.lastLocation!==location.href){var a=t.getPopStateChangeEventData();return t.setReferCache(t.lastLocation),t.lastLocation=location.href,t.sendPv(a),s}}},e.setLocation=function(){"undefined"!=typeof window&&(this.lastLocation=window.location.href)},e.getLocation=function(){return this.lastLocation},e.init=function(){var t=this.getPopStateChangeEventData();this.collect.emit("route-change",{config:t,init:!0})},e.listener=function(){var t=this,e=null;window.addEventListener("hashchange",function(n){if(t.lastLocation!==window.location.href&&(clearTimeout(e),t.allowHash)){t.setReferCache(t.lastLocation),t.lastLocation=window.location.href;var i=t.getPopStateChangeEventData();t.sendPv(i)}}),window.addEventListener("popstate",function(n){t.lastLocation!==window.location.href&&(e=setTimeout(function(){t.setReferCache(t.lastLocation),t.lastLocation=window.location.href;var e=t.getPopStateChangeEventData();t.sendPv(e)},10))})},e.getPopStateChangeEventData=function(){var t=this.pageConfig();return t.is_back=0,t},e.pageConfig=function(){try{var t=this.storage.getLocalItem(this.cache_key)||{},e=!1,n=this.storage.getLocalItem("__tea_cache_first_"+this.appid);return e=!n||1!=n,{is_html:1,url:location.href,referrer:this.handleRefer(),page_key:location.href,refer_page_key:this.handleRefer(),page_title:document.title||location.pathname,page_manual_key:this.config.autotrack&&this.config.autotrack.page_manual_key||"",refer_page_manual_key:t&&t.refer_manual_key||"",refer_page_title:t&&t.refer_title||"",page_path:location.pathname,page_host:location.host,is_first_time:""+e}}catch(t){return this.collect.emit(op.DEBUGGER_MESSAGE,{type:op.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),{}}},e.sendPv=function(t,e){this.collect.emit("route-change",{config:t,init:!1})},e.handleRefer=function(){var t="";try{var e=this.storage.getLocalItem()||{};t=e.routeChange?e.refer_key:this.collect.configManager.get("referrer")}catch(e){t=document.referrer}return t},e.setReferCache=function(t){var e=this.storage.getLocalItem(this.cache_key)||{};e.refer_key=t,e.routeChange=!0,this.storage.setLocalItem(this.cache_key,e)},t}(),O_=500,D_=5005;var I_=function(){function t(){Zl(this,"collector",void 0),Zl(this,"config",void 0),Zl(this,"eventStorage",void 0),Zl(this,"domain",void 0),Zl(this,"verifyReady",!1),Zl(this,"cleanStatus",!1),Zl(this,"key",void 0),Zl(this,"heart",void 0)}var e=t.prototype;return e.apply=function(t,e){var n=this;this.collector=t,this.config=e,this.eventStorage=[],this.collector.on("submit-verify-h5",function(t){t&&t.length&&n.eventStore(t[0])}),this.checkUrl(),this.heartbeat()},e.checkUrl=function(){var t=window.location.href,e=dd(t);e._r_d_&&e._r_c_k_?(this.verifyReady=!0,this.domain=e._r_d_,this.key=e._r_c_k_,this.checkCache()):this.collector.off("submit-verify-h5")},e.checkCache=function(){this.eventStorage.length&&this.postVerify(this.eventStorage)},e.heartbeat=function(){var t=this;this.heart=setInterval(function(){var e={event:"simulator_test__",local_time_ms:Date.now()},n=t.collector.configManager.get(),i=n.header,r={events:[e],user:n.user,header:i};t.eventStore(r)},6e4)},e.eventStore=function(t){this.cleanStatus||(this.verifyReady?this.postVerify(t):this.eventStorage.push(t))},e.cleanVerify=function(){this.cleanStatus=!0,this.eventStorage=[],clearInterval(this.heart)},e.postVerify=function(t){var e=this;try{var n=JSON.parse(JSON.stringify(t));ad(t)?n.forEach(function(t){e.fetchLog(t)}):this.fetchLog(n)}catch(t){console.log("web verify post error ~")}},e.fetchLog=function(t){!function(t,e,n,i,r,o,s,a,c,u){try{var h=new XMLHttpRequest,l=a||"POST";h.open(l,""+t,!0),c&&u?h.setRequestHeader("Content-Type","application/octet-stream;tt-data="+u):h.setRequestHeader("Content-Type","application/json; charset=utf-8"),s&&h.setRequestHeader("X-MCS-AppKey",""+s),i&&(h.withCredentials=!0),n&&(h.timeout=n,h.ontimeout=function(){o&&o(e,D_)}),h.onload=function(){if(r){var t=null;if(h.responseText){try{t=JSON.parse(h.responseText)}catch(e){t={}}r(t,e)}}},h.onerror=function(){h.abort(),o&&o(e,O_)},c?h.send(e):h.send(JSON.stringify(e))}catch(t){}}(this.domain+"/simulator/h5/log?connection_key="+this.key,t,2e4,!1)},e.leave=function(){var t=this;document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&t.cleanVerify()}),hd(function(){t.cleanVerify()})},t}(),R_=function(){function t(){Zl(this,"collect",void 0),Zl(this,"config",void 0),Zl(this,"storage",void 0),Zl(this,"eventKey",void 0),Zl(this,"storageNum",void 0),Zl(this,"eventUrl",void 0),Zl(this,"retryNum",void 0),Zl(this,"retryInterval",void 0),Zl(this,"retryWaitTime",3e3),Zl(this,"retryStatus",!1),Zl(this,"retryCacheStatus",!1),Zl(this,"errorCache",void 0)}var e=t.prototype;return e.apply=function(t,e){var n=this;if(e.enable_storage&&!e.disable_storage&&(this.collect=t,this.config=e,!this.collect.destroy)){var i=t.Types;this.storage=new Zd,this.eventUrl=this.collect.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+e.app_id,this.storageNum=e.storage_num||50,this.retryNum=e.retry_num||3,this.retryInterval=1e3,t.on(i.SubmitError,function(t){"f_data"===t.type&&n.storeData(t)}),t.on(i.Ready,function(){n.checkStorage()})}},e.retryRightNow=function(t){var e=this;if(this.retryStatus)this.errorCache.push(t);else{var n=0;this.retryStatus=!0;var i=setInterval(function(){if(3===n)return e.storeData(e.errorCache),e.retryStatus=!1,void clearInterval(i);var r=t.eventData;e.fetchData(r,function(){e.retryStatus=!1,clearInterval(i),e.retryCacheStatus&&e.errorCache.splice(0,1),e.errorCache.length&&(e.retryCacheStatus=!0,e.retryRightNow(e.errorCache[0]))},function(){n++})},this.retryInterval)}},e.storeData=function(t){var e=this.storage.getLocalItem(this.eventKey),n=t.eventData;Object.keys(e).length!==this.storageNum&&(e[Date.now()]=n,this.storage.setLocalItem(this.eventKey,e))},e.checkStorage=function(){var t=this;try{if(!window.navigator.onLine)return;var e=this.storage.getLocalItem(this.eventKey);if(!e||!Object.keys(e).length)return;var n={events:[{event:"ontest",params:{app_id:this.config.app_id},local_time_ms:Date.now()}],user:{user_unique_id:this.collect.configManager.get("web_id")},header:{}};this.fetchData([n],function(){var n=JSON.parse(JSON.stringify(e)),i=function(i){t.fetchData(e[i],function(){delete n[i],t.storage.setLocalItem(t.eventKey,n)},function(){},!1)};for(var r in e)i(r)},function(){},!0)}catch(t){console.warn("error check storage")}},e.fetchData=function(t,e,n,i){this.collect.requestManager.useRequest({url:this.eventUrl,data:t,timeout:3e4,success:function(){e&&e()},fail:function(){n&&n(),console.log("network error,compensate report failk")},app_key:i&&!this.config.channel_domain?"566f58151b0ed37e":""})},t}(),M_=function(){function t(){Zl(this,"collector",void 0),Zl(this,"config",void 0),Zl(this,"TrackMap",void 0),Zl(this,"Types",void 0)}var e=t.prototype;return e.apply=function(t,e){var n=this;this.collector=t,this.config=e;var i=t.Types;t.on(i.TrackDurationStart,function(t){n.trackStart(t)}),t.on(i.TrackDurationEnd,function(t){n.trackEnd(t)}),t.on(i.TrackDurationPause,function(t){n.trackPause(t)}),t.on(i.TrackDurationResume,function(t){n.trackResume(t)}),this.Types=i,this.TrackMap=new Map,this.ready(i.TrackDuration)},e.ready=function(t){var e=this;if(this.collector.set(t),this.collector.hook._hooksCache.hasOwnProperty(t)){var n=this.collector.hook._hooksCache[t];if(!Object.keys(n).length)return;var i=function(t){n[t].length&&n[t].forEach(function(n){e.collector.hook.emit(t,n)})};for(var r in n)i(r)}},e.trackStart=function(t){this.TrackMap.set(t,{startTime:Date.now(),isPause:!1,pauseTime:0,resumeTime:0})},e.trackEnd=function(t){var e=t.eventName,n=t.params;if(this.TrackMap.has(e)){var i=this.TrackMap.get(e),r=0;r=i.isPause?i.pauseTime-i.startTime:i.resumeTime?i.pauseTime-i.startTime+(Date.now()-i.resumeTime):Date.now()-i.startTime;var o=Object.assign(n,{event_duration:r});this.collector.event(e,o),this.cleanTrack(e)}},e.trackPause=function(t){if(this.TrackMap.has(t)){var e=this.TrackMap.get(t);e.isPause||(e.isPause=!0,e.pauseTime=Date.now(),this.TrackMap.set(t,e))}},e.trackResume=function(t){if(this.TrackMap.has(t)){var e=this.TrackMap.get(t);e.isPause&&(e.isPause=!1,e.resumeTime=Date.now(),this.TrackMap.set(t,e))}},e.cleanTrack=function(t){this.TrackMap.delete(t)},t}();Uv.usePlugin($b,"ab"),Uv.usePlugin(Qb,"stay"),Uv.usePlugin(R_,"store"),Uv.usePlugin(k_,"autotrack"),Uv.usePlugin(M_,"trackDuration"),Uv.usePlugin(I_,"verify"),Uv.usePlugin(t_,"profile"),Uv.usePlugin(e_,"heartbeat"),Uv.usePlugin(x_,"route");var C_=new Uv("default"),B_=Uv;export{B_ as Collector,C_ as default};