@datarangers/sdk-javascript 0.0.2 → 0.0.3-lite
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.
- package/README.md +10 -10
- package/core/es/index.min.js +1 -1
- package/core/lib/index.min.js +1 -1
- package/es/index.min.js +1 -1
- package/lib/index.min.js +1 -1
- package/package.json +1 -1
- package/es/index-base.min.js +0 -1
- package/es/plugin/ab.js +0 -1
- package/es/plugin/autotrack.js +0 -1
- package/es/plugin/duration.js +0 -1
- package/es/plugin/route.js +0 -1
- package/es/plugin/stay.js +0 -1
- package/es/plugin/store.js +0 -1
- package/lib/index-base.min.js +0 -1
- package/lib/plugin/ab.js +0 -1
- package/lib/plugin/autotrack.js +0 -1
- package/lib/plugin/duration.js +0 -1
- package/lib/plugin/route.js +0 -1
- package/lib/plugin/stay.js +0 -1
- package/lib/plugin/store.js +0 -1
package/core/lib/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n,r,i=function(e){return e&&e.Math==Math&&e},o=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")(),a=function(e){try{return!!e()}catch(e){return!0}},s=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!a((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=Function.prototype.call,l=c?u.bind(u):function(){return u.apply(u,arguments)},f={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p={f:h&&!f.call({1:2},1)?function(e){var t=h(this,e);return!!t&&t.enumerable}:f},d=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},g=Function.prototype,v=g.bind,m=g.call,y=c&&v.bind(m,m),_=c?function(e){return e&&y(e)}:function(e){return e&&function(){return m.apply(e,arguments)}},b=_({}.toString),E=_("".slice),w=function(e){return E(b(e),8,-1)},S=o.Object,k=_("".split),T=a((function(){return!S("z").propertyIsEnumerable(0)}))?function(e){return"String"==w(e)?k(e,""):S(e)}:S,A=o.TypeError,O=function(e){if(null==e)throw A("Can't call method on "+e);return e},x=function(e){return T(O(e))},I=function(e){return"function"==typeof e},D=function(e){return"object"==typeof e?null!==e:I(e)},R=function(e){return I(e)?e:void 0},M=function(e,t){return arguments.length<2?R(o[e]):o[e]&&o[e][t]},C=_({}.isPrototypeOf),P=M("navigator","userAgent")||"",G=o.process,U=o.Deno,N=G&&G.versions||U&&U.version,B=N&&N.v8;B&&(r=(n=B.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&P&&(!(n=P.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=P.match(/Chrome\/(\d+)/))&&(r=+n[1]);var L=r,j=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&L&&L<41})),V=j&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,z=o.Object,K=V?function(e){return"symbol"==typeof e}:function(e){var t=M("Symbol");return I(t)&&C(t.prototype,z(e))},q=o.String,H=function(e){try{return q(e)}catch(e){return"Object"}},F=o.TypeError,J=function(e){if(I(e))return e;throw F(H(e)+" is not a function")},W=function(e,t){var n=e[t];return null==n?void 0:J(n)},$=o.TypeError,X=Object.defineProperty,Q=function(e,t){try{X(o,e,{value:t,configurable:!0,writable:!0})}catch(n){o[e]=t}return t},Y=o["__core-js_shared__"]||Q("__core-js_shared__",{}),Z=t((function(e){(e.exports=function(e,t){return Y[e]||(Y[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.6",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.6/LICENSE",source:"https://github.com/zloirock/core-js"})})),ee=o.Object,te=function(e){return ee(O(e))},ne=_({}.hasOwnProperty),re=Object.hasOwn||function(e,t){return ne(te(e),t)},ie=0,oe=Math.random(),ae=_(1..toString),se=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ae(++ie+oe,36)},ce=Z("wks"),ue=o.Symbol,le=ue&&ue.for,fe=V?ue:ue&&ue.withoutSetter||se,he=function(e){if(!re(ce,e)||!j&&"string"!=typeof ce[e]){var t="Symbol."+e;j&&re(ue,e)?ce[e]=ue[e]:ce[e]=V&&le?le(t):fe(t)}return ce[e]},pe=o.TypeError,de=he("toPrimitive"),ge=function(e,t){if(!D(e)||K(e))return e;var n,r=W(e,de);if(r){if(void 0===t&&(t="default"),n=l(r,e,t),!D(n)||K(n))return n;throw pe("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&I(n=e.toString)&&!D(r=l(n,e)))return r;if(I(n=e.valueOf)&&!D(r=l(n,e)))return r;if("string"!==t&&I(n=e.toString)&&!D(r=l(n,e)))return r;throw $("Can't convert object to primitive value")}(e,t)},ve=function(e){var t=ge(e,"string");return K(t)?t:t+""},me=o.document,ye=D(me)&&D(me.createElement),_e=function(e){return ye?me.createElement(e):{}},be=!s&&!a((function(){return 7!=Object.defineProperty(_e("div"),"a",{get:function(){return 7}}).a})),Ee=Object.getOwnPropertyDescriptor,we={f:s?Ee:function(e,t){if(e=x(e),t=ve(t),be)try{return Ee(e,t)}catch(e){}if(re(e,t))return d(!l(p.f,e,t),e[t])}},Se=s&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ke=o.String,Te=o.TypeError,Ae=function(e){if(D(e))return e;throw Te(ke(e)+" is not an object")},Oe=o.TypeError,xe=Object.defineProperty,Ie=Object.getOwnPropertyDescriptor,De={f:s?Se?function(e,t,n){if(Ae(e),t=ve(t),Ae(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=Ie(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return xe(e,t,n)}:xe:function(e,t,n){if(Ae(e),t=ve(t),Ae(n),be)try{return xe(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Oe("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Re=s?function(e,t,n){return De.f(e,t,d(1,n))}:function(e,t,n){return e[t]=n,e},Me=Function.prototype,Ce=s&&Object.getOwnPropertyDescriptor,Pe=re(Me,"name"),Ge={EXISTS:Pe,PROPER:Pe&&"something"===function(){}.name,CONFIGURABLE:Pe&&(!s||s&&Ce(Me,"name").configurable)},Ue=_(Function.toString);I(Y.inspectSource)||(Y.inspectSource=function(e){return Ue(e)});var Ne,Be,Le,je=Y.inspectSource,Ve=o.WeakMap,ze=I(Ve)&&/native code/.test(je(Ve)),Ke=Z("keys"),qe=function(e){return Ke[e]||(Ke[e]=se(e))},He={},Fe=o.TypeError,Je=o.WeakMap;if(ze||Y.state){var We=Y.state||(Y.state=new Je),$e=_(We.get),Xe=_(We.has),Qe=_(We.set);Ne=function(e,t){if(Xe(We,e))throw new Fe("Object already initialized");return t.facade=e,Qe(We,e,t),t},Be=function(e){return $e(We,e)||{}},Le=function(e){return Xe(We,e)}}else{var Ye=qe("state");He[Ye]=!0,Ne=function(e,t){if(re(e,Ye))throw new Fe("Object already initialized");return t.facade=e,Re(e,Ye,t),t},Be=function(e){return re(e,Ye)?e[Ye]:{}},Le=function(e){return re(e,Ye)}}var Ze={set:Ne,get:Be,has:Le,enforce:function(e){return Le(e)?Be(e):Ne(e,{})},getterFor:function(e){return function(t){var n;if(!D(t)||(n=Be(t)).type!==e)throw Fe("Incompatible receiver, "+e+" required");return n}}},et=t((function(e){var t=Ge.CONFIGURABLE,n=Ze.enforce,r=Ze.get,i=Object.defineProperty,o=s&&!a((function(){return 8!==i((function(){}),"length",{value:8}).length})),c=String(String).split("String"),u=e.exports=function(e,r,a){if("Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(r="get "+r),a&&a.setter&&(r="set "+r),(!re(e,"name")||t&&e.name!==r)&&i(e,"name",{value:r,configurable:!0}),o&&a&&re(a,"arity")&&e.length!==a.arity&&i(e,"length",{value:a.arity}),a&&re(a,"constructor")&&a.constructor){if(s)try{i(e,"prototype",{writable:!1})}catch(e){}}else e.prototype=void 0;var u=n(e);return re(u,"source")||(u.source=c.join("string"==typeof r?r:"")),e};Function.prototype.toString=u((function(){return I(this)&&r(this).source||je(this)}),"toString")})),tt=function(e,t,n,r){r||(r={});var i=r.enumerable,o=void 0!==r.name?r.name:t;return I(n)&&et(n,o,r),r.global?i?e[t]=n:Q(t,n):(r.unsafe?e[t]&&(i=!0):delete e[t],i?e[t]=n:Re(e,t,n)),e},nt=Math.ceil,rt=Math.floor,it=Math.trunc||function(e){var t=+e;return(t>0?rt:nt)(t)},ot=function(e){var t=+e;return t!=t||0===t?0:it(t)},at=Math.max,st=Math.min,ct=function(e,t){var n=ot(e);return n<0?at(n+t,0):st(n,t)},ut=Math.min,lt=function(e){return e>0?ut(ot(e),9007199254740991):0},ft=function(e){return lt(e.length)},ht=function(e){return function(t,n,r){var i,o=x(t),a=ft(o),s=ct(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},pt={includes:ht(!0),indexOf:ht(!1)},dt=pt.indexOf,gt=_([].push),vt=function(e,t){var n,r=x(e),i=0,o=[];for(n in r)!re(He,n)&&re(r,n)&>(o,n);for(;t.length>i;)re(r,n=t[i++])&&(~dt(o,n)||gt(o,n));return o},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yt=mt.concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function(e){return vt(e,yt)}},bt={f:Object.getOwnPropertySymbols},Et=_([].concat),wt=M("Reflect","ownKeys")||function(e){var t=_t.f(Ae(e)),n=bt.f;return n?Et(t,n(e)):t},St=function(e,t,n){for(var r=wt(t),i=De.f,o=we.f,a=0;a<r.length;a++){var s=r[a];re(e,s)||n&&re(n,s)||i(e,s,o(t,s))}},kt=/#|\.prototype\./,Tt=function(e,t){var n=Ot[At(e)];return n==It||n!=xt&&(I(t)?a(t):!!t)},At=Tt.normalize=function(e){return String(e).replace(kt,".").toLowerCase()},Ot=Tt.data={},xt=Tt.NATIVE="N",It=Tt.POLYFILL="P",Dt=Tt,Rt=we.f,Mt=function(e,t){var n,r,i,a,s,c=e.target,u=e.global,l=e.stat;if(n=u?o:l?o[c]||Q(c,{}):(o[c]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Rt(n,r))&&s.value:n[r],!Dt(u?r:c+(l?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;St(a,i)}(e.sham||i&&i.sham)&&Re(a,"sham",!0),tt(n,r,a,e)}},Ct=_(_.bind),Pt=function(e,t){return J(e),void 0===t?e:c?Ct(e,t):function(){return e.apply(t,arguments)}},Gt=Array.isArray||function(e){return"Array"==w(e)},Ut={};Ut[he("toStringTag")]="z";var Nt="[object z]"===String(Ut),Bt=he("toStringTag"),Lt=o.Object,jt="Arguments"==w(function(){return arguments}()),Vt=Nt?w:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Lt(e),Bt))?n:jt?w(t):"Object"==(r=w(t))&&I(t.callee)?"Arguments":r},zt=function(){},Kt=[],qt=M("Reflect","construct"),Ht=/^\s*(?:class|function)\b/,Ft=_(Ht.exec),Jt=!Ht.exec(zt),Wt=function(e){if(!I(e))return!1;try{return qt(zt,Kt,e),!0}catch(e){return!1}},$t=function(e){if(!I(e))return!1;switch(Vt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Jt||!!Ft(Ht,je(e))}catch(e){return!0}};$t.sham=!0;var Xt=!qt||a((function(){var e;return Wt(Wt.call)||!Wt(Object)||!Wt((function(){e=!0}))||e}))?$t:Wt,Qt=he("species"),Yt=o.Array,Zt=function(e,t){return new(function(e){var t;return Gt(e)&&(t=e.constructor,(Xt(t)&&(t===Yt||Gt(t.prototype))||D(t)&&null===(t=t[Qt]))&&(t=void 0)),void 0===t?Yt:t}(e))(0===t?0:t)},en=_([].push),tn=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(c,u,l,f){for(var h,p,d=te(c),g=T(d),v=Pt(u,l),m=ft(g),y=0,_=f||Zt,b=t?_(c,m):n||a?_(c,0):void 0;m>y;y++)if((s||y in g)&&(p=v(h=g[y],y,d),e))if(t)b[y]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:en(b,h)}else switch(e){case 4:return!1;case 7:en(b,h)}return o?-1:r||i?i:b}},nn={forEach:tn(0),map:tn(1),filter:tn(2),some:tn(3),every:tn(4),find:tn(5),findIndex:tn(6),filterReject:tn(7)},rn=function(e,t){var n=[][e];return!!n&&a((function(){n.call(null,t||function(){return 1},1)}))},on=nn.forEach,an=rn("forEach")?[].forEach:function(e){return on(this,e,arguments.length>1?arguments[1]:void 0)};Mt({target:"Array",proto:!0,forced:[].forEach!=an},{forEach:an});var sn=pt.indexOf,cn=_([].indexOf),un=!!cn&&1/cn([1],1,-0)<0,ln=rn("indexOf");Mt({target:"Array",proto:!0,forced:un||!ln},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return un?cn(this,e,t)||0:sn(this,e,t)}}),Mt({target:"Array",stat:!0},{isArray:Gt});var fn,hn=Object.keys||function(e){return vt(e,mt)},pn=s&&!Se?Object.defineProperties:function(e,t){Ae(e);for(var n,r=x(t),i=hn(t),o=i.length,a=0;o>a;)De.f(e,n=i[a++],r[n]);return e},dn={f:pn},gn=M("document","documentElement"),vn=qe("IE_PROTO"),mn=function(){},yn=function(e){return"<script>"+e+"<\/script>"},_n=function(e){e.write(yn("")),e.close();var t=e.parentWindow.Object;return e=null,t},bn=function(){try{fn=new ActiveXObject("htmlfile")}catch(e){}var e,t;bn="undefined"!=typeof document?document.domain&&fn?_n(fn):((t=_e("iframe")).style.display="none",gn.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(yn("document.F=Object")),e.close(),e.F):_n(fn);for(var n=mt.length;n--;)delete bn.prototype[mt[n]];return bn()};He[vn]=!0;var En=Object.create||function(e,t){var n;return null!==e?(mn.prototype=Ae(e),n=new mn,mn.prototype=null,n[vn]=e):n=bn(),void 0===t?n:dn.f(n,t)},wn=De.f,Sn=he("unscopables"),kn=Array.prototype;null==kn[Sn]&&wn(kn,Sn,{configurable:!0,value:En(null)});var Tn,An,On,xn=function(e){kn[Sn][e]=!0},In={},Dn=!a((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Rn=qe("IE_PROTO"),Mn=o.Object,Cn=Mn.prototype,Pn=Dn?Mn.getPrototypeOf:function(e){var t=te(e);if(re(t,Rn))return t[Rn];var n=t.constructor;return I(n)&&t instanceof n?n.prototype:t instanceof Mn?Cn:null},Gn=he("iterator"),Un=!1;[].keys&&("next"in(On=[].keys())?(An=Pn(Pn(On)))!==Object.prototype&&(Tn=An):Un=!0);var Nn=null==Tn||a((function(){var e={};return Tn[Gn].call(e)!==e}));Nn&&(Tn={}),I(Tn[Gn])||tt(Tn,Gn,(function(){return this}));var Bn={IteratorPrototype:Tn,BUGGY_SAFARI_ITERATORS:Un},Ln=De.f,jn=he("toStringTag"),Vn=function(e,t,n){e&&!n&&(e=e.prototype),e&&!re(e,jn)&&Ln(e,jn,{configurable:!0,value:t})},zn=Bn.IteratorPrototype,Kn=function(){return this},qn=function(e,t,n,r){var i=t+" Iterator";return e.prototype=En(zn,{next:d(+!r,n)}),Vn(e,i,!1),In[i]=Kn,e},Hn=o.String,Fn=o.TypeError,Jn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=_(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ae(n),function(e){if("object"==typeof e||I(e))return e;throw Fn("Can't set "+Hn(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Wn=Ge.PROPER,$n=Ge.CONFIGURABLE,Xn=Bn.IteratorPrototype,Qn=Bn.BUGGY_SAFARI_ITERATORS,Yn=he("iterator"),Zn=function(){return this},er=function(e,t,n,r,i,o,a){qn(n,t,r);var s,c,u,f=function(e){if(e===i&&v)return v;if(!Qn&&e in d)return d[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",p=!1,d=e.prototype,g=d[Yn]||d["@@iterator"]||i&&d[i],v=!Qn&&g||f(i),m="Array"==t&&d.entries||g;if(m&&(s=Pn(m.call(new e)))!==Object.prototype&&s.next&&(Pn(s)!==Xn&&(Jn?Jn(s,Xn):I(s[Yn])||tt(s,Yn,Zn)),Vn(s,h,!0)),Wn&&"values"==i&&g&&"values"!==g.name&&($n?Re(d,"name","values"):(p=!0,v=function(){return l(g,this)})),i)if(c={values:f("values"),keys:o?v:f("keys"),entries:f("entries")},a)for(u in c)(Qn||p||!(u in d))&&tt(d,u,c[u]);else Mt({target:t,proto:!0,forced:Qn||p},c);return d[Yn]!==v&&tt(d,Yn,v,{name:i}),In[t]=v,c},tr=De.f,nr=Ze.set,rr=Ze.getterFor("Array Iterator"),ir=er(Array,"Array",(function(e,t){nr(this,{type:"Array Iterator",target:x(e),index:0,kind:t})}),(function(){var e=rr(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),or=In.Arguments=In.Array;if(xn("keys"),xn("values"),xn("entries"),s&&"values"!==or.name)try{tr(or,"name",{value:"values"})}catch(e){}var ar=_([].join),sr=T!=Object,cr=rn("join",",");Mt({target:"Array",proto:!0,forced:sr||!cr},{join:function(e){return ar(x(this),void 0===e?",":e)}});var ur=o.TypeError,lr=function(e){return function(t,n,r,i){J(n);var o=te(t),a=T(o),s=ft(o),c=e?s-1:0,u=e?-1:1;if(r<2)for(;;){if(c in a){i=a[c],c+=u;break}if(c+=u,e?c<0:s<=c)throw ur("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=u)c in a&&(i=n(i,a[c],c,o));return i}},fr={left:lr(!1),right:lr(!0)},hr="process"==w(o.process),pr=fr.left,dr=rn("reduce");Mt({target:"Array",proto:!0,forced:!dr||!hr&&L>79&&L<83},{reduce:function(e){var t=arguments.length;return pr(this,e,t,t>1?arguments[1]:void 0)}});var gr=_([].reverse),vr=[1,2];Mt({target:"Array",proto:!0,forced:String(vr)===String(vr.reverse())},{reverse:function(){return Gt(this)&&(this.length=this.length),gr(this)}});var mr=function(e,t,n){var r=ve(t);r in e?De.f(e,r,d(0,n)):e[r]=n},yr=he("species"),_r=function(e){return L>=51||!a((function(){var t=[];return(t.constructor={})[yr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},br=_([].slice),Er=_r("slice"),wr=he("species"),Sr=o.Array,kr=Math.max;Mt({target:"Array",proto:!0,forced:!Er},{slice:function(e,t){var n,r,i,o=x(this),a=ft(o),s=ct(e,a),c=ct(void 0===t?a:t,a);if(Gt(o)&&(n=o.constructor,(Xt(n)&&(n===Sr||Gt(n.prototype))||D(n)&&null===(n=n[wr]))&&(n=void 0),n===Sr||void 0===n))return br(o,s,c);for(r=new(void 0===n?Sr:n)(kr(c-s,0)),i=0;s<c;s++,i++)s in o&&mr(r,i,o[s]);return r.length=i,r}});var Tr=o.Date,Ar=_(Tr.prototype.getTime);Mt({target:"Date",stat:!0},{now:function(){return Ar(new Tr)}});var Or=Date.prototype,xr=_(Or.toString),Ir=_(Or.getTime);"Invalid Date"!=String(new Date(NaN))&&tt(Or,"toString",(function(){var e=Ir(this);return e==e?xr(this):"Invalid Date"}));var Dr=Ge.EXISTS,Rr=De.f,Mr=Function.prototype,Cr=_(Mr.toString),Pr=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Gr=_(Pr.exec);s&&!Dr&&Rr(Mr,"name",{configurable:!0,get:function(){try{return Gr(Pr,Cr(this))[1]}catch(e){return""}}});var Ur=o.Array,Nr=Math.max,Br=function(e,t,n){for(var r=ft(e),i=ct(t,r),o=ct(void 0===n?r:n,r),a=Ur(Nr(o-i,0)),s=0;i<o;i++,s++)mr(a,s,e[i]);return a.length=s,a},Lr=_t.f,jr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Vr={f:function(e){return jr&&"Window"==w(e)?function(e){try{return Lr(e)}catch(e){return Br(jr)}}(e):Lr(x(e))}},zr=a((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Kr=Object.isExtensible,qr=a((function(){Kr(1)}))||zr?function(e){return!!D(e)&&((!zr||"ArrayBuffer"!=w(e))&&(!Kr||Kr(e)))}:Kr,Hr=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),Fr=t((function(e){var t=De.f,n=!1,r=se("meta"),i=0,o=function(e){t(e,r,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var e=_t.f,t=_([].splice),i={};i[r]=1,e(i).length&&(_t.f=function(n){for(var i=e(n),o=0,a=i.length;o<a;o++)if(i[o]===r){t(i,o,1);break}return i},Mt({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Vr.f}))},fastKey:function(e,t){if(!D(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!re(e,r)){if(!qr(e))return"F";if(!t)return"E";o(e)}return e[r].objectID},getWeakData:function(e,t){if(!re(e,r)){if(!qr(e))return!0;if(!t)return!1;o(e)}return e[r].weakData},onFreeze:function(e){return Hr&&n&&qr(e)&&!re(e,r)&&o(e),e}};He[r]=!0}));Fr.enable,Fr.fastKey,Fr.getWeakData,Fr.onFreeze;var Jr=he("iterator"),Wr=Array.prototype,$r=function(e){return void 0!==e&&(In.Array===e||Wr[Jr]===e)},Xr=he("iterator"),Qr=function(e){if(null!=e)return W(e,Xr)||W(e,"@@iterator")||In[Vt(e)]},Yr=o.TypeError,Zr=function(e,t){var n=arguments.length<2?Qr(e):t;if(J(n))return Ae(l(n,e));throw Yr(H(e)+" is not iterable")},ei=function(e,t,n){var r,i;Ae(e);try{if(!(r=W(e,"return"))){if("throw"===t)throw n;return n}r=l(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Ae(r),n},ti=o.TypeError,ni=function(e,t){this.stopped=e,this.result=t},ri=ni.prototype,ii=function(e,t,n){var r,i,o,a,s,c,u,f=n&&n.that,h=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),g=Pt(t,f),v=function(e){return r&&ei(r,"normal",e),new ni(!0,e)},m=function(e){return h?(Ae(e),d?g(e[0],e[1],v):g(e[0],e[1])):d?g(e,v):g(e)};if(p)r=e;else{if(!(i=Qr(e)))throw ti(H(e)+" is not iterable");if($r(i)){for(o=0,a=ft(e);a>o;o++)if((s=m(e[o]))&&C(ri,s))return s;return new ni(!1)}r=Zr(e,i)}for(c=r.next;!(u=l(c,r)).done;){try{s=m(u.value)}catch(e){ei(r,"throw",e)}if("object"==typeof s&&s&&C(ri,s))return s}return new ni(!1)},oi=o.TypeError,ai=function(e,t){if(C(t,e))return e;throw oi("Incorrect invocation")},si=he("iterator"),ci=!1;try{var ui=0,li={next:function(){return{done:!!ui++}},return:function(){ci=!0}};li[si]=function(){return this},Array.from(li,(function(){throw 2}))}catch(e){}var fi=function(e,t){if(!t&&!ci)return!1;var n=!1;try{var r={};r[si]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},hi=function(e,t,n){var r,i;return Jn&&I(r=t.constructor)&&r!==n&&D(i=r.prototype)&&i!==n.prototype&&Jn(e,i),e},pi=function(e,t,n){for(var r in t)tt(e,r,t[r],n);return e},di=he("species"),gi=function(e){var t=M(e),n=De.f;s&&t&&!t[di]&&n(t,di,{configurable:!0,get:function(){return this}})},vi=De.f,mi=Fr.fastKey,yi=Ze.set,_i=Ze.getterFor,bi={getConstructor:function(e,t,n,r){var i=e((function(e,i){ai(e,o),yi(e,{type:t,index:En(null),first:void 0,last:void 0,size:0}),s||(e.size=0),null!=i&&ii(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=_i(t),c=function(e,t,n){var r,i,o=a(e),c=u(e,t);return c?c.value=n:(o.last=c={index:i=mi(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=c),r&&(r.next=c),s?o.size++:e.size++,"F"!==i&&(o.index[i]=c)),e},u=function(e,t){var n,r=a(e),i=mi(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return pi(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,s?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),s?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=Pt(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),pi(o,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return c(this,0===e?0:e,t)}}:{add:function(e){return c(this,e=0===e?0:e,e)}}),s&&vi(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=_i(t),o=_i(r);er(e,t,(function(e,t){yi(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),gi(t)}};!function(e,t,n){var r=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),s=r?"set":"add",c=o[e],u=c&&c.prototype,l=c,f={},h=function(e){var t=_(u[e]);tt(u,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!D(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return i&&!D(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!D(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(Dt(e,!I(c)||!(i||u.forEach&&!a((function(){(new c).entries().next()})))))l=n.getConstructor(t,e,r,s),Fr.enable();else if(Dt(e,!0)){var p=new l,d=p[s](i?{}:-0,1)!=p,g=a((function(){p.has(1)})),v=fi((function(e){new c(e)})),m=!i&&a((function(){for(var e=new c,t=5;t--;)e[s](t,t);return!e.has(-0)}));v||((l=t((function(e,t){ai(e,u);var n=hi(new c,e,l);return null!=t&&ii(t,n[s],{that:n,AS_ENTRIES:r}),n}))).prototype=u,u.constructor=l),(g||m)&&(h("delete"),h("has"),r&&h("get")),(m||d)&&h(s),i&&u.clear&&delete u.clear}f[e]=l,Mt({global:!0,constructor:!0,forced:l!=c},f),Vn(l,e),i||n.setStrong(l,e,r)}("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),bi);var Ei=Object.assign,wi=Object.defineProperty,Si=_([].concat),ki=!Ei||a((function(){if(s&&1!==Ei({b:1},Ei(wi({},"a",{enumerable:!0,get:function(){wi(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=Ei({},e)[n]||hn(Ei({},t)).join("")!=r}))?function(e,t){for(var n=te(e),r=arguments.length,i=1,o=bt.f,a=p.f;r>i;)for(var c,u=T(arguments[i++]),f=o?Si(hn(u),o(u)):hn(u),h=f.length,d=0;h>d;)c=f[d++],s&&!l(a,u,c)||(n[c]=u[c]);return n}:Ei;Mt({target:"Object",stat:!0,arity:2,forced:Object.assign!==ki},{assign:ki});var Ti=Nt?{}.toString:function(){return"[object "+Vt(this)+"]"};Nt||tt(Object.prototype,"toString",Ti,{unsafe:!0});var Ai,Oi,xi,Ii,Di=o.TypeError,Ri=he("species"),Mi=function(e,t){var n,r=Ae(e).constructor;return void 0===r||null==(n=Ae(r)[Ri])?t:function(e){if(Xt(e))return e;throw Di(H(e)+" is not a constructor")}(n)},Ci=Function.prototype,Pi=Ci.apply,Gi=Ci.call,Ui="object"==typeof Reflect&&Reflect.apply||(c?Gi.bind(Pi):function(){return Gi.apply(Pi,arguments)}),Ni=o.TypeError,Bi=function(e,t){if(e<t)throw Ni("Not enough arguments");return e},Li=/(?:ipad|iphone|ipod).*applewebkit/i.test(P),ji=o.setImmediate,Vi=o.clearImmediate,zi=o.process,Ki=o.Dispatch,qi=o.Function,Hi=o.MessageChannel,Fi=o.String,Ji=0,Wi={};try{Ai=o.location}catch(e){}var $i=function(e){if(re(Wi,e)){var t=Wi[e];delete Wi[e],t()}},Xi=function(e){return function(){$i(e)}},Qi=function(e){$i(e.data)},Yi=function(e){o.postMessage(Fi(e),Ai.protocol+"//"+Ai.host)};ji&&Vi||(ji=function(e){Bi(arguments.length,1);var t=I(e)?e:qi(e),n=br(arguments,1);return Wi[++Ji]=function(){Ui(t,void 0,n)},Oi(Ji),Ji},Vi=function(e){delete Wi[e]},hr?Oi=function(e){zi.nextTick(Xi(e))}:Ki&&Ki.now?Oi=function(e){Ki.now(Xi(e))}:Hi&&!Li?(Ii=(xi=new Hi).port2,xi.port1.onmessage=Qi,Oi=Pt(Ii.postMessage,Ii)):o.addEventListener&&I(o.postMessage)&&!o.importScripts&&Ai&&"file:"!==Ai.protocol&&!a(Yi)?(Oi=Yi,o.addEventListener("message",Qi,!1)):Oi="onreadystatechange"in _e("script")?function(e){gn.appendChild(_e("script")).onreadystatechange=function(){gn.removeChild(this),$i(e)}}:function(e){setTimeout(Xi(e),0)});var Zi,eo,to,no,ro,io,oo,ao,so={set:ji,clear:Vi},co=/ipad|iphone|ipod/i.test(P)&&void 0!==o.Pebble,uo=/web0s(?!.*chrome)/i.test(P),lo=we.f,fo=so.set,ho=o.MutationObserver||o.WebKitMutationObserver,po=o.document,go=o.process,vo=o.Promise,mo=lo(o,"queueMicrotask"),yo=mo&&mo.value;yo||(Zi=function(){var e,t;for(hr&&(e=go.domain)&&e.exit();eo;){t=eo.fn,eo=eo.next;try{t()}catch(e){throw eo?no():to=void 0,e}}to=void 0,e&&e.enter()},Li||hr||uo||!ho||!po?!co&&vo&&vo.resolve?((oo=vo.resolve(void 0)).constructor=vo,ao=Pt(oo.then,oo),no=function(){ao(Zi)}):hr?no=function(){go.nextTick(Zi)}:(fo=Pt(fo,o),no=function(){fo(Zi)}):(ro=!0,io=po.createTextNode(""),new ho(Zi).observe(io,{characterData:!0}),no=function(){io.data=ro=!ro}));var _o=yo||function(e){var t={fn:e,next:void 0};to&&(to.next=t),eo||(eo=t,no()),to=t},bo=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Eo=function(){this.head=null,this.tail=null};Eo.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var wo=Eo,So=o.Promise,ko="object"==typeof window&&"object"!=typeof Deno;So&&So.prototype;var To,Ao,Oo,xo=he("species"),Io=!1,Do=I(o.PromiseRejectionEvent),Ro=Dt("Promise",(function(){var e=je(So),t=e!==String(So);if(!t&&66===L)return!0;if(L>=51&&/native code/.test(e))return!1;var n=new So((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[xo]=r,!(Io=n.then((function(){}))instanceof r)||!t&&ko&&!Do})),Mo={CONSTRUCTOR:Ro,REJECTION_EVENT:Do,SUBCLASSING:Io},Co=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=J(t),this.reject=J(n)},Po={f:function(e){return new Co(e)}},Go=so.set,Uo=Mo.CONSTRUCTOR,No=Mo.REJECTION_EVENT,Bo=Mo.SUBCLASSING,Lo=Ze.getterFor("Promise"),jo=Ze.set,Vo=So&&So.prototype,zo=So,Ko=Vo,qo=o.TypeError,Ho=o.document,Fo=o.process,Jo=Po.f,Wo=Jo,$o=!!(Ho&&Ho.createEvent&&o.dispatchEvent),Xo=function(e){var t;return!(!D(e)||!I(t=e.then))&&t},Qo=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(a||(2===t.rejection&&na(t),t.rejection=1),!0===s?n=o:(f&&f.enter(),n=s(o),f&&(f.exit(),i=!0)),n===e.promise?u(qo("Promise-chain cycle")):(r=Xo(n))?l(r,n,c,u):c(n)):u(o)}catch(e){f&&!i&&f.exit(),u(e)}},Yo=function(e,t){e.notified||(e.notified=!0,_o((function(){for(var n,r=e.reactions;n=r.get();)Qo(n,e);e.notified=!1,t&&!e.rejection&&ea(e)})))},Zo=function(e,t,n){var r,i;$o?((r=Ho.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),o.dispatchEvent(r)):r={promise:t,reason:n},!No&&(i=o["on"+e])?i(r):"unhandledrejection"===e&&function(e,t){var n=o.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},ea=function(e){l(Go,o,(function(){var t,n=e.facade,r=e.value;if(ta(e)&&(t=bo((function(){hr?Fo.emit("unhandledRejection",r,n):Zo("unhandledrejection",n,r)})),e.rejection=hr||ta(e)?2:1,t.error))throw t.value}))},ta=function(e){return 1!==e.rejection&&!e.parent},na=function(e){l(Go,o,(function(){var t=e.facade;hr?Fo.emit("rejectionHandled",t):Zo("rejectionhandled",t,e.value)}))},ra=function(e,t,n){return function(r){e(t,r,n)}},ia=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Yo(e,!0))},oa=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw qo("Promise can't be resolved itself");var r=Xo(t);r?_o((function(){var n={done:!1};try{l(r,t,ra(oa,n,e),ra(ia,n,e))}catch(t){ia(n,t,e)}})):(e.value=t,e.state=1,Yo(e,!1))}catch(t){ia({done:!1},t,e)}}};if(Uo&&(Ko=(zo=function(e){ai(this,Ko),J(e),l(To,this);var t=Lo(this);try{e(ra(oa,t),ra(ia,t))}catch(e){ia(t,e)}}).prototype,(To=function(e){jo(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new wo,rejection:!1,state:0,value:void 0})}).prototype=tt(Ko,"then",(function(e,t){var n=Lo(this),r=Jo(Mi(this,zo));return n.parent=!0,r.ok=!I(e)||e,r.fail=I(t)&&t,r.domain=hr?Fo.domain:void 0,0==n.state?n.reactions.add(r):_o((function(){Qo(r,n)})),r.promise})),Ao=function(){var e=new To,t=Lo(e);this.promise=e,this.resolve=ra(oa,t),this.reject=ra(ia,t)},Po.f=Jo=function(e){return e===zo||undefined===e?new Ao(e):Wo(e)},I(So)&&Vo!==Object.prototype)){Oo=Vo.then,Bo||tt(Vo,"then",(function(e,t){var n=this;return new zo((function(e,t){l(Oo,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete Vo.constructor}catch(e){}Jn&&Jn(Vo,Ko)}Mt({global:!0,constructor:!0,wrap:!0,forced:Uo},{Promise:zo}),Vn(zo,"Promise",!1),gi("Promise");var aa=Mo.CONSTRUCTOR||!fi((function(e){So.all(e).then(void 0,(function(){}))}));Mt({target:"Promise",stat:!0,forced:aa},{all:function(e){var t=this,n=Po.f(t),r=n.resolve,i=n.reject,o=bo((function(){var n=J(t.resolve),o=[],a=0,s=1;ii(e,(function(e){var c=a++,u=!1;s++,l(n,t,e).then((function(e){u||(u=!0,o[c]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var sa=Mo.CONSTRUCTOR,ca=So&&So.prototype;if(Mt({target:"Promise",proto:!0,forced:sa,real:!0},{catch:function(e){return this.then(void 0,e)}}),I(So)){var ua=M("Promise").prototype.catch;ca.catch!==ua&&tt(ca,"catch",ua,{unsafe:!0})}Mt({target:"Promise",stat:!0,forced:aa},{race:function(e){var t=this,n=Po.f(t),r=n.reject,i=bo((function(){var i=J(t.resolve);ii(e,(function(e){l(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}}),Mt({target:"Promise",stat:!0,forced:Mo.CONSTRUCTOR},{reject:function(e){var t=Po.f(this);return l(t.reject,void 0,e),t.promise}});var la=Mo.CONSTRUCTOR;M("Promise"),Mt({target:"Promise",stat:!0,forced:la},{resolve:function(e){return function(e,t){if(Ae(e),D(t)&&t.constructor===e)return t;var n=Po.f(e);return(0,n.resolve)(t),n.promise}(this,e)}});var fa=o.String,ha=function(e){if("Symbol"===Vt(e))throw TypeError("Cannot convert a Symbol value to a string");return fa(e)},pa=function(){var e=Ae(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},da=o.RegExp,ga=a((function(){var e=da("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),va=ga||a((function(){return!da("a","y").sticky})),ma={BROKEN_CARET:ga||a((function(){var e=da("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:va,UNSUPPORTED_Y:ga},ya=o.RegExp,_a=a((function(){var e=ya(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ba=o.RegExp,Ea=a((function(){var e=ba("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),wa=Ze.get,Sa=Z("native-string-replace",String.prototype.replace),ka=RegExp.prototype.exec,Ta=ka,Aa=_("".charAt),Oa=_("".indexOf),xa=_("".replace),Ia=_("".slice),Da=function(){var e=/a/,t=/b*/g;return l(ka,e,"a"),l(ka,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Ra=ma.BROKEN_CARET,Ma=void 0!==/()??/.exec("")[1];(Da||Ma||Ra||_a||Ea)&&(Ta=function(e){var t,n,r,i,o,a,s,c=this,u=wa(c),f=ha(e),h=u.raw;if(h)return h.lastIndex=c.lastIndex,t=l(Ta,h,f),c.lastIndex=h.lastIndex,t;var p=u.groups,d=Ra&&c.sticky,g=l(pa,c),v=c.source,m=0,y=f;if(d&&(g=xa(g,"y",""),-1===Oa(g,"g")&&(g+="g"),y=Ia(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Aa(f,c.lastIndex-1))&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),Ma&&(n=new RegExp("^"+v+"$(?!\\s)",g)),Da&&(r=c.lastIndex),i=l(ka,d?n:c,y),d?i?(i.input=Ia(i.input,m),i[0]=Ia(i[0],m),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Da&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),Ma&&i&&i.length>1&&l(Sa,i[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&p)for(i.groups=a=En(null),o=0;o<p.length;o++)a[(s=p[o])[0]]=i[s[1]];return i});var Ca=Ta;Mt({target:"RegExp",proto:!0,forced:/./.exec!==Ca},{exec:Ca});var Pa=_("".charAt),Ga=_("".charCodeAt),Ua=_("".slice),Na=function(e){return function(t,n){var r,i,o=ha(O(t)),a=ot(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=Ga(o,a))<55296||r>56319||a+1===s||(i=Ga(o,a+1))<56320||i>57343?e?Pa(o,a):r:e?Ua(o,a,a+2):i-56320+(r-55296<<10)+65536}},Ba={codeAt:Na(!1),charAt:Na(!0)},La=Ba.charAt,ja=Ze.set,Va=Ze.getterFor("String Iterator");er(String,"String",(function(e){ja(this,{type:"String Iterator",string:ha(e),index:0})}),(function(){var e,t=Va(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=La(n,r),t.index+=e.length,{value:e,done:!1})}));var za=he("species"),Ka=RegExp.prototype,qa=function(e,t,n,r){var i=he(e),o=!a((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=o&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[za]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!o||!s||n){var c=_(/./[i]),u=t(i,""[e],(function(e,t,n,r,i){var a=_(e),s=t.exec;return s===Ca||s===Ka.exec?o&&!i?{done:!0,value:c(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));tt(String.prototype,e,u[0]),tt(Ka,i,u[1])}r&&Re(Ka[i],"sham",!0)},Ha=he("match"),Fa=function(e){var t;return D(e)&&(void 0!==(t=e[Ha])?!!t:"RegExp"==w(e))},Ja=Ba.charAt,Wa=function(e,t,n){return t+(n?Ja(e,t).length:1)},$a=o.TypeError,Xa=function(e,t){var n=e.exec;if(I(n)){var r=l(n,e,t);return null!==r&&Ae(r),r}if("RegExp"===w(e))return l(Ca,e,t);throw $a("RegExp#exec called on incompatible receiver")},Qa=ma.UNSUPPORTED_Y,Ya=Math.min,Za=[].push,es=_(/./.exec),ts=_(Za),ns=_("".slice);qa("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=ha(O(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!Fa(e))return l(t,r,e,i);for(var o,a,s,c=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,h=new RegExp(e.source,u+"g");(o=l(Ca,h,r))&&!((a=h.lastIndex)>f&&(ts(c,ns(r,f,o.index)),o.length>1&&o.index<r.length&&Ui(Za,c,Br(o,1)),s=o[0].length,f=a,c.length>=i));)h.lastIndex===o.index&&h.lastIndex++;return f===r.length?!s&&es(h,"")||ts(c,""):ts(c,ns(r,f)),c.length>i?Br(c,0,i):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:l(t,this,e,n)}:t,[function(t,n){var i=O(this),o=null==t?void 0:W(t,e);return o?l(o,t,i,n):l(r,ha(i),t,n)},function(e,i){var o=Ae(this),a=ha(e),s=n(r,o,a,i,r!==t);if(s.done)return s.value;var c=Mi(o,RegExp),u=o.unicode,l=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Qa?"g":"y"),f=new c(Qa?"^(?:"+o.source+")":o,l),h=void 0===i?4294967295:i>>>0;if(0===h)return[];if(0===a.length)return null===Xa(f,a)?[a]:[];for(var p=0,d=0,g=[];d<a.length;){f.lastIndex=Qa?0:d;var v,m=Xa(f,Qa?ns(a,d):a);if(null===m||(v=Ya(lt(f.lastIndex+(Qa?d:0)),a.length))===p)d=Wa(a,d,u);else{if(ts(g,ns(a,p,d)),g.length===h)return g;for(var y=1;y<=m.length-1;y++)if(ts(g,m[y]),g.length===h)return g;d=p=v}}return ts(g,ns(a,p)),g}]}),!!a((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Qa);var rs,is="\t\n\v\f\r \u2028\u2029\ufeff",os=_("".replace),as="["+is+"]",ss=RegExp("^"+as+as+"*"),cs=RegExp(as+as+"*$"),us=function(e){return function(t){var n=ha(O(t));return 1&e&&(n=os(n,ss,"")),2&e&&(n=os(n,cs,"")),n}},ls={start:us(1),end:us(2),trim:us(3)},fs=Ge.PROPER,hs=ls.trim;Mt({target:"String",proto:!0,forced:(rs="trim",a((function(){return!!is[rs]()||"
"!=="
"[rs]()||fs&&is[rs].name!==rs})))},{trim:function(){return hs(this)}});Mt({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=Ae(this),n=J(t.delete),r=!0,i=0,o=arguments.length;i<o;i++)e=l(n,t,arguments[i]),r=r&&e;return!!r}});var ps=function(e){return l(Map.prototype.entries,e)};Mt({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=Ae(this),n=ps(t),r=Pt(e,arguments.length>1?arguments[1]:void 0);return!ii(n,(function(e,n,i){if(!r(n,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Mt({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Ae(this),n=ps(t),r=Pt(e,arguments.length>1?arguments[1]:void 0),i=new(Mi(t,M("Map"))),o=J(i.set);return ii(n,(function(e,n){r(n,e,t)&&l(o,i,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}}),Mt({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Ae(this),n=ps(t),r=Pt(e,arguments.length>1?arguments[1]:void 0);return ii(n,(function(e,n,i){if(r(n,e,t))return i(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Mt({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Ae(this),n=ps(t),r=Pt(e,arguments.length>1?arguments[1]:void 0);return ii(n,(function(e,n,i){if(r(n,e,t))return i(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});Mt({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return ii(ps(Ae(this)),(function(t,n,r){if((i=n)===(o=e)||i!=i&&o!=o)return r();var i,o}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}}),Mt({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){return ii(ps(Ae(this)),(function(t,n,r){if(n===e)return r(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Mt({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=Ae(this),n=ps(t),r=Pt(e,arguments.length>1?arguments[1]:void 0),i=new(Mi(t,M("Map"))),o=J(i.set);return ii(n,(function(e,n){l(o,i,r(n,e,t),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}}),Mt({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=Ae(this),n=ps(t),r=Pt(e,arguments.length>1?arguments[1]:void 0),i=new(Mi(t,M("Map"))),o=J(i.set);return ii(n,(function(e,n){l(o,i,e,r(n,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}}),Mt({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=Ae(this),n=J(t.set),r=arguments.length,i=0;i<r;)ii(arguments[i++],n,{that:t,AS_ENTRIES:!0});return t}});var ds=o.TypeError;Mt({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=Ae(this),n=ps(t),r=arguments.length<2,i=r?void 0:arguments[1];if(J(e),ii(n,(function(n,o){r?(r=!1,i=o):i=e(i,o,n,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw ds("Reduce of empty map with no initial value");return i}}),Mt({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=Ae(this),n=ps(t),r=Pt(e,arguments.length>1?arguments[1]:void 0);return ii(n,(function(e,n,i){if(r(n,e,t))return i()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var gs=o.TypeError;Mt({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=Ae(this),r=J(n.get),i=J(n.has),o=J(n.set),a=arguments.length;J(t);var s=l(i,n,e);if(!s&&a<3)throw gs("Updating absent value");var c=s?l(r,n,e):J(a>2?arguments[2]:void 0)(e,n);return l(o,n,e,t(c,e,n)),n}});var vs={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},ms=_e("span").classList,ys=ms&&ms.constructor&&ms.constructor.prototype,_s=ys===Object.prototype?void 0:ys,bs=function(e){if(e&&e.forEach!==an)try{Re(e,"forEach",an)}catch(t){e.forEach=an}};for(var Es in vs)vs[Es]&&bs(o[Es]&&o[Es].prototype);bs(_s);var ws=he("iterator"),Ss=he("toStringTag"),ks=ir.values,Ts=function(e,t){if(e){if(e[ws]!==ks)try{Re(e,ws,ks)}catch(t){e[ws]=ks}if(e[Ss]||Re(e,Ss,t),vs[t])for(var n in ir)if(e[n]!==ir[n])try{Re(e,n,ir[n])}catch(t){e[n]=ir[n]}}};for(var As in vs)Ts(o[As]&&o[As].prototype,As);Ts(_s,"DOMTokenList");var Os=/MSIE .\./.test(P),xs=o.Function,Is=function(e){return Os?function(t,n){var r=Bi(arguments.length,1)>2,i=I(t)?t:xs(t),o=r?br(arguments,2):void 0;return e(r?function(){Ui(i,this,o)}:i,n)}:e},Ds={setTimeout:Is(o.setTimeout),setInterval:Is(o.setInterval)},Rs=Ds.setInterval;Mt({global:!0,bind:!0,forced:o.setInterval!==Rs},{setInterval:Rs});var Ms=Ds.setTimeout;Mt({global:!0,bind:!0,forced:o.setTimeout!==Ms},{setTimeout:Ms});var Cs=function(){return Cs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Cs.apply(this,arguments)};function Ps(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Gs(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ps(arguments[t]));return e}var Us=_r("splice"),Ns=o.TypeError,Bs=Math.max,Ls=Math.min;Mt({target:"Array",proto:!0,forced:!Us},{splice:function(e,t){var n,r,i,o,a,s,c=te(this),u=ft(c),l=ct(e,u),f=arguments.length;if(0===f?n=r=0:1===f?(n=0,r=u-l):(n=f-2,r=Ls(Bs(ot(t),0),u-l)),u+n-r>9007199254740991)throw Ns("Maximum allowed length exceeded");for(i=Zt(c,r),o=0;o<r;o++)(a=l+o)in c&&mr(i,o,c[a]);if(i.length=r,n<r){for(o=l;o<u-r;o++)s=o+n,(a=o+r)in c?c[s]=c[a]:delete c[s];for(o=u;o>u-r+n;o--)delete c[o-1]}else if(n>r)for(o=u-r;o>l;o--)s=o+n-1,(a=o+r-1)in c?c[s]=c[a]:delete c[s];for(o=0;o<n;o++)c[o+l]=arguments[o+2];return c.length=u-r+n,i}});var js=function(){function e(){this._hooks={},this._cache=[],this._hooksCache={}}return e.prototype.on=function(e,t){e&&t&&"function"==typeof t&&(this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t))},e.prototype.once=function(e,t){var n=this;if(e&&t&&"function"==typeof t){this.on(e,(function r(i){t(i),n.off(e,r)}))}},e.prototype.off=function(e,t){if(e&&this._hooks[e]&&this._hooks[e].length)if(t){var n=this._hooks[e].indexOf(t);-1!==n&&this._hooks[e].splice(n,1)}else this._hooks[e]=[]},e.prototype.emit=function(e,t,n){if(n){if(!e)return;-1!==this._cache.indexOf(n)?this._emit(e,t):(this._hooksCache.hasOwnProperty(n)||(this._hooksCache[n]={}),this._hooksCache[n].hasOwnProperty(e)||(this._hooksCache[n][e]=[]),this._hooksCache[n][e].push(t))}else this._emit(e,t)},e.prototype._emit=function(e,t){e&&this._hooks[e]&&this._hooks[e].length&&Gs(this._hooks[e]).forEach((function(e){try{e(t)}catch(e){}}))},e.prototype.set=function(e){e&&-1===this._cache.indexOf(e)&&this._cache.push(e)},e}(),Vs=nn.map,zs=_r("map");Mt({target:"Array",proto:!0,forced:!zs},{map:function(e){return Vs(this,e,arguments.length>1?arguments[1]:void 0)}});var Ks=_(1..valueOf),qs=_t.f,Hs=we.f,Fs=De.f,Js=ls.trim,Ws=o.Number,$s=Ws.prototype,Xs=o.TypeError,Qs=_("".slice),Ys=_("".charCodeAt),Zs=function(e){var t=ge(e,"number");return"bigint"==typeof t?t:ec(t)},ec=function(e){var t,n,r,i,o,a,s,c,u=ge(e,"number");if(K(u))throw Xs("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=Js(u),43===(t=Ys(u,0))||45===t){if(88===(n=Ys(u,2))||120===n)return NaN}else if(48===t){switch(Ys(u,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+u}for(a=(o=Qs(u,2)).length,s=0;s<a;s++)if((c=Ys(o,s))<48||c>i)return NaN;return parseInt(o,r)}return+u};if(Dt("Number",!Ws(" 0o1")||!Ws("0b1")||Ws("+0x1"))){for(var tc,nc=function(e){var t=arguments.length<1?0:Ws(Zs(e)),n=this;return C($s,n)&&a((function(){Ks(n)}))?hi(Object(t),n,nc):t},rc=s?qs(Ws):"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(","),ic=0;rc.length>ic;ic++)re(Ws,tc=rc[ic])&&!re(nc,tc)&&Fs(nc,tc,Hs(Ws,tc));nc.prototype=$s,$s.constructor=nc,tt(o,"Number",nc,{constructor:!0})}var oc=a((function(){hn(1)}));Mt({target:"Object",stat:!0,forced:oc},{keys:function(e){return hn(te(e))}});var ac=ls.trim,sc=o.parseInt,cc=o.Symbol,uc=cc&&cc.iterator,lc=/^[+-]?0x/i,fc=_(lc.exec),hc=8!==sc(is+"08")||22!==sc(is+"0x16")||uc&&!a((function(){sc(Object(uc))}))?function(e,t){var n=ac(ha(e));return sc(n,t>>>0||(fc(lc,n)?16:10))}:sc;Mt({global:!0,forced:parseInt!=hc},{parseInt:hc});var pc=RegExp.prototype,dc=function(e){var t=e.flags;return void 0!==t||"flags"in pc||re(e,"flags")||!C(pc,e)?t:l(pa,e)},gc=Ge.PROPER,vc=RegExp.prototype.toString,mc=a((function(){return"/a/b"!=vc.call({source:"a",flags:"b"})})),yc=gc&&"toString"!=vc.name;(mc||yc)&&tt(RegExp.prototype,"toString",(function(){var e=Ae(this);return"/"+ha(e.source)+"/"+ha(dc(e))}),{unsafe:!0}),qa("match",(function(e,t,n){return[function(t){var n=O(this),r=null==t?void 0:W(t,e);return r?l(r,t,n):new RegExp(t)[e](ha(n))},function(e){var r=Ae(this),i=ha(e),o=n(t,r,i);if(o.done)return o.value;if(!r.global)return Xa(r,i);var a=r.unicode;r.lastIndex=0;for(var s,c=[],u=0;null!==(s=Xa(r,i));){var l=ha(s[0]);c[u]=l,""===l&&(r.lastIndex=Wa(i,lt(r.lastIndex),a)),u++}return 0===u?null:c}]}));var _c=Math.floor,bc=_("".charAt),Ec=_("".replace),wc=_("".slice),Sc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,kc=/\$([$&'`]|\d{1,2})/g,Tc=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,c=kc;return void 0!==i&&(i=te(i),c=Sc),Ec(o,c,(function(o,c){var u;switch(bc(c,0)){case"$":return"$";case"&":return e;case"`":return wc(t,0,n);case"'":return wc(t,a);case"<":u=i[wc(c,1,-1)];break;default:var l=+c;if(0===l)return o;if(l>s){var f=_c(l/10);return 0===f?o:f<=s?void 0===r[f-1]?bc(c,1):r[f-1]+bc(c,1):o}u=r[l-1]}return void 0===u?"":u}))},Ac=he("replace"),Oc=Math.max,xc=Math.min,Ic=_([].concat),Dc=_([].push),Rc=_("".indexOf),Mc=_("".slice),Cc="$0"==="a".replace(/./,"$0"),Pc=!!/./[Ac]&&""===/./[Ac]("a","$0");qa("replace",(function(e,t,n){var r=Pc?"$":"$0";return[function(e,n){var r=O(this),i=null==e?void 0:W(e,Ac);return i?l(i,e,r,n):l(t,ha(r),e,n)},function(e,i){var o=Ae(this),a=ha(e);if("string"==typeof i&&-1===Rc(i,r)&&-1===Rc(i,"$<")){var s=n(t,o,a,i);if(s.done)return s.value}var c=I(i);c||(i=ha(i));var u=o.global;if(u){var l=o.unicode;o.lastIndex=0}for(var f=[];;){var h=Xa(o,a);if(null===h)break;if(Dc(f,h),!u)break;""===ha(h[0])&&(o.lastIndex=Wa(a,lt(o.lastIndex),l))}for(var p,d="",g=0,v=0;v<f.length;v++){for(var m=ha((h=f[v])[0]),y=Oc(xc(ot(h.index),a.length),0),_=[],b=1;b<h.length;b++)Dc(_,void 0===(p=h[b])?p:String(p));var E=h.groups;if(c){var w=Ic([m],_,y,a);void 0!==E&&Dc(w,E);var S=ha(Ui(i,void 0,w))}else S=Tc(m,a,y,_,E,i);y>=g&&(d+=Mc(a,g,y)+S,g=y+m.length)}return d+Mc(a,g)}]}),!!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Cc||Pc);var Gc=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};qa("search",(function(e,t,n){return[function(t){var n=O(this),r=null==t?void 0:W(t,e);return r?l(r,t,n):new RegExp(t)[e](ha(n))},function(e){var r=Ae(this),i=ha(e),o=n(t,r,i);if(o.done)return o.value;var a=r.lastIndex;Gc(a,0)||(r.lastIndex=0);var s=Xa(r,i);return Gc(r.lastIndex,a)||(r.lastIndex=a),null===s?-1:s.index}]}));var Uc,Nc=function(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)},Bc=function(e){return Array.isArray(e)},Lc=(Uc=+Date.now()+Number((""+Math.random()).slice(2,8)),function(){return Uc+=1}),jc=function(e){return function(e,t,n){if("string"==typeof e&&"number"==typeof t&&"number"==typeof n){var r,i=[];n=n<=25?n:n%25;var o=String.fromCharCode(n+97);r=e.split(o);for(var a=0;a<r.length;a++){var s=parseInt(r[a],n);s=1*s^t;var c=String.fromCharCode(s);i.push(c)}return i.join("")}}(e,64,25)},Vc=function(e){!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)?window.addEventListener("pagehide",e,!1):window.addEventListener("beforeunload",e,!1)},zc=function(e,t,n){var r=document.createElement("script");r.src=e,r.onerror=function(){n(e)},r.onload=function(){t()},document.getElementsByTagName("head")[0].appendChild(r)},Kc=function(){var e=0;return["hidden","msHidden","webkitHidden"].forEach((function(t){void 0!==document[t]&&(e=1)})),e},qc=function(e){var t=document.createElement("a");return t.href=e,t},Hc=function(e){var t={};try{var n=qc(e).search;(n=n.slice(1)).split("&").forEach((function(e){var n,r,i=e.split("=");i.length&&(n=i[0],r=i[1]);try{t[n]=decodeURIComponent(void 0===r?"":r)}catch(e){t[n]=r}}))}catch(e){}return t},Fc=function(e){for(var t=0,n=0,r=(e+="").length,i=0;i<r;i++)((t=31*t+e.charCodeAt(n++))>0x7fffffffffff||t<-0x800000000000)&&(t&=0xffffffffffff);return t<0&&(t+=0x7ffffffffffff),t},Jc=ls.trim,Wc=_("".charAt),$c=o.parseFloat,Xc=o.Symbol,Qc=Xc&&Xc.iterator,Yc=1/$c(is+"-0")!=-1/0||Qc&&!a((function(){$c(Object(Qc))}))?function(e){var t=Jc(ha(e)),n=$c(t);return 0===n&&"-"==Wc(t,0)?-0:n}:$c;Mt({global:!0,forced:parseFloat!=Yc},{parseFloat:Yc});var Zc=De.f,eu=function(e,t,n){n in e||Zc(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},tu=_t.f,nu=Ze.enforce,ru=he("match"),iu=o.RegExp,ou=iu.prototype,au=o.SyntaxError,su=_(ou.exec),cu=_("".charAt),uu=_("".replace),lu=_("".indexOf),fu=_("".slice),hu=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,pu=/a/g,du=/a/g,gu=new iu(pu)!==pu,vu=ma.MISSED_STICKY,mu=ma.UNSUPPORTED_Y,yu=s&&(!gu||vu||_a||Ea||a((function(){return du[ru]=!1,iu(pu)!=pu||iu(du)==du||"/a/i"!=iu(pu,"i")})));if(Dt("RegExp",yu)){for(var _u=function(e,t){var n,r,i,o,a,s,c=C(ou,this),u=Fa(e),l=void 0===t,f=[],h=e;if(!c&&u&&l&&e.constructor===_u)return e;if((u||C(ou,e))&&(e=e.source,l&&(t=dc(h))),e=void 0===e?"":ha(e),t=void 0===t?"":ha(t),h=e,_a&&"dotAll"in pu&&(r=!!t&&lu(t,"s")>-1)&&(t=uu(t,/s/g,"")),n=t,vu&&"sticky"in pu&&(i=!!t&&lu(t,"y")>-1)&&mu&&(t=uu(t,/y/g,"")),Ea&&(o=function(e){for(var t,n=e.length,r=0,i="",o=[],a={},s=!1,c=!1,u=0,l="";r<=n;r++){if("\\"===(t=cu(e,r)))t+=cu(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:su(hu,fu(e,r+1))&&(r+=2,c=!0),i+=t,u++;continue;case">"===t&&c:if(""===l||re(a,l))throw new au("Invalid capture group name");a[l]=!0,o[o.length]=[l,u],c=!1,l="";continue}c?l+=t:i+=t}return[i,o]}(e),e=o[0],f=o[1]),a=hi(iu(e,t),c?this:ou,_u),(r||i||f.length)&&(s=nu(a),r&&(s.dotAll=!0,s.raw=_u(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(t=cu(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+cu(e,++r);return i}(e),n)),i&&(s.sticky=!0),f.length&&(s.groups=f)),e!==h)try{Re(a,"source",""===h?"(?:)":h)}catch(e){}return a},bu=tu(iu),Eu=0;bu.length>Eu;)eu(_u,iu,bu[Eu++]);ou.constructor=_u,_u.prototype=ou,tt(o,"RegExp",_u,{constructor:!0})}gi("RegExp");var wu=t((function(e,t){e.exports=function(){function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function t(n,r){function i(t,i,o){if("undefined"!=typeof document){"number"==typeof(o=e({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+="; "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=t+"="+n.write(i,t)+a}}function o(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},i=0;i<t.length;i++){var o=t[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=n.read(a,s),e===s)break}catch(e){}}return e?r[e]:r}}return Object.create({set:i,get:o,remove:function(t,n){i(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}return t({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()})),Su=wu,ku=function(){function e(){this.cache={}}return e.prototype.setItem=function(e,t){this.cache[e]=t},e.prototype.getItem=function(e){return this.cache[e]},e.prototype.removeItem=function(e){this.cache[e]=void 0},e.prototype.getCookie=function(e){this.getItem(e)},e.prototype.setCookie=function(e,t){this.setItem(e,t)},e}();var Tu,Au,Ou={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(e){}return n||{}}catch(e){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:JSON.stringify(t);localStorage.setItem(e,n)}catch(e){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(e){}},getCookie:function(e,t){try{return Su.get(e,{domain:t||document.domain})}catch(e){return""}},setCookie:function(e,t,n,r){try{var i=r||document.domain,o=+new Date+n;Su.set(e,t,{expires:new Date(o),path:"/",domain:i})}catch(e){}},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},xu={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(e){}return n||{}}catch(e){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:JSON.stringify(t);sessionStorage.setItem(e,n)}catch(e){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(e){}},getCookie:function(e){this.getItem(e)},setCookie:function(e,t){this.setItem(e,t)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},Iu=function(){function e(e,t){this._storage=t&&"session"===t?xu:!e&&Ou.isSupportLS?Ou:new ku}return e.prototype.getItem=function(e){return this._storage.getItem(e)},e.prototype.setItem=function(e,t){this._storage.setItem(e,t)},e.prototype.getCookie=function(e,t){return this._storage.getCookie(e,t)},e.prototype.setCookie=function(e,t,n,r){this._storage.setCookie(e,t,n,r)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),Du=function(){function e(e,t,n){this.appid=e,this.domain=t,this.userAgent=window.navigator.userAgent,this.appVersion=window.navigator.appVersion,this.cookie_expire=n}return e.prototype.init=function(){var e=window.navigator.userAgent,t=window.navigator.language,n=document.referrer,r=n?qc(n).hostname:"",i=Hc(window.location.href),o=/Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion)?"wap":"web";this.utm=function(e,t,n,r){var i=new Iu(!1),o=new Iu(!1,"session"),a=e?"_tea_utm_cache_"+e:"_tea_utm_cache",s=e?"_$utm_from_url_"+e:"_$utm_from_url",c={},u=["tr_shareuser","tr_admaster","tr_param1","tr_param2","tr_param3","tr_param4","$utm_from_url"],l={ad_id:Number(t.ad_id)||void 0,campaign_id:Number(t.campaign_id)||void 0,creative_id:Number(t.creative_id)||void 0,utm_source:t.utm_source,utm_medium:t.utm_medium,utm_campaign:t.utm_campaign,utm_term:t.utm_term,utm_content:t.utm_content,tr_shareuser:t.tr_shareuser,tr_admaster:t.tr_admaster,tr_param1:t.tr_param1,tr_param2:t.tr_param2,tr_param3:t.tr_param3,tr_param4:t.tr_param4};try{var f=!1;for(var h in l)l[h]&&(-1!==u.indexOf(h)?(c.hasOwnProperty("tracer_data")||(c.tracer_data={}),c.tracer_data[h]=l[h]):c[h]=l[h],f=!0);if(f)o.setItem(s,"1"),i.setCookie(a,JSON.stringify(c),r,n);else{var p=i.getCookie(a,n);p&&(c=JSON.parse(p))}o.getItem(s)&&(c.hasOwnProperty("tracer_data")||(c.tracer_data={}),c.tracer_data.$utm_from_url=1)}catch(e){return l}return c}(this.appid,i,this.domain,this.cookie_expire);var a=this.browser(),s=this.os();return{browser:a.browser,browser_version:a.browser_version,platform:o,os_name:s.os_name,os_version:s.os_version,userAgent:e,screen_width:window.screen&&window.screen.width,screen_height:window.screen&&window.screen.height,device_model:this.getDeviceModel(s.os_name),language:t,referrer:n,referrer_host:r,utm:this.utm,latest_data:this.last(n,r)}},e.prototype.last=function(e,t){var n="",r="",i="",o=location.hostname,a=!1;if(e&&t&&o!==t){n=e,r=t,a=!0;var s=Hc(e);s.keyword&&(i=s.keyword)}return{$latest_referrer:n,$latest_referrer_host:r,$latest_search_keyword:i,isLast:a}},e.prototype.browser=function(){var e,t,n="",r=""+parseFloat(this.appVersion),i=this.userAgent;return-1!==i.indexOf("Edge")||-1!==i.indexOf("Edg")?(n="Microsoft Edge",-1!==i.indexOf("Edge")?(e=i.indexOf("Edge"),r=i.substring(e+5)):(e=i.indexOf("Edg"),r=i.substring(e+4))):-1!==(e=i.indexOf("MSIE"))?(n="Microsoft Internet Explorer",r=i.substring(e+5)):-1!==(e=i.indexOf("Lark"))?(n="Lark",r=i.substring(e+5,e+11)):-1!==(e=i.indexOf("MetaSr"))?(n="sougoubrowser",r=i.substring(e+7,e+10)):-1!==i.indexOf("MQQBrowser")||-1!==i.indexOf("QQBrowser")?(n="qqbrowser",-1!==i.indexOf("MQQBrowser")?(e=i.indexOf("MQQBrowser"),r=i.substring(e+11,e+15)):-1!==i.indexOf("QQBrowser")&&(e=i.indexOf("QQBrowser"),r=i.substring(e+10,e+17))):-1!==i.indexOf("Chrome")?-1!==(e=i.indexOf("MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=i.indexOf("360"))?(n="360browser",r=i.substring(i.indexOf("Chrome")+7)):-1!==i.indexOf("baidubrowser")||-1!==i.indexOf("BIDUBrowser")?(-1!==i.indexOf("baidubrowser")?(e=i.indexOf("baidubrowser"),r=i.substring(e+13,e+16)):-1!==i.indexOf("BIDUBrowser")&&(e=i.indexOf("BIDUBrowser"),r=i.substring(e+12,e+15)),n="baidubrowser"):-1!==(e=i.indexOf("xiaomi"))?-1!==i.indexOf("openlanguagexiaomi")?(n="openlanguage xiaomi",r=i.substring(e+7,e+13)):(n="xiaomi",r=i.substring(e-7,e-1)):-1!==(e=i.indexOf("TTWebView"))?(n="TTWebView",r=i.substring(e+10,e+23)):(-1!==(e=i.indexOf("Chrome"))||-1!==(e=i.indexOf("Chrome")))&&(n="Chrome",r=i.substring(e+7)):-1!==i.indexOf("Safari")?-1!==(e=i.indexOf("QQ"))?(n="qqbrowser",r=i.substring(e+10,e+16)):-1!==(e=i.indexOf("Safari"))&&(n="Safari",r=i.substring(e+7),-1!==(e=i.indexOf("Version"))&&(r=i.substring(e+8))):-1!==(e=i.indexOf("Firefox"))?(n="Firefox",r=i.substring(e+8)):-1!==(e=i.indexOf("MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=i.indexOf("QQ"))?(n="qqbrowser",r=i.substring(e+3,e+8)):-1!==(e=i.indexOf("Opera"))&&(n="Opera",r=i.substring(e+6),-1!==(e=i.indexOf("Version"))&&(r=i.substring(e+8))),-1!==(t=r.indexOf(";"))&&(r=r.substring(0,t)),-1!==(t=r.indexOf(" "))&&(r=r.substring(0,t)),-1!==(t=r.indexOf(")"))&&(r=r.substring(0,t)),{browser:n,browser_version:r}},e.prototype.os=function(){for(var e="",t="",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)/}],r=0;r<n.length;r++){var i=n[r];if(i.r.test(this.userAgent)){"Mac OS X"===(e=i.s)&&this.isNewIpad()&&(e="iOS");break}}var o=function(e,t){var n=e.exec(t);return n&&n[1]?n[1]:""},a=function(e,t){var n=RegExp("(?:^|[^A-Z0-9-_]|[^A-Z0-9-]_|sprd-)(?:"+e+")","i").exec(t);return n?n.slice(1)[0]:""};/Windows/.test(e)&&(t=o(/Windows (.*)/,e),e="windows");switch(e){case"Mac OS X":t=a("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent),e="mac";break;case"Android":t=function(e){var t=o(/Android ([\.\_\d]+)/,e);return t||(t=o(/Android\/([\.\_\d]+)/,e)),t}(this.userAgent),e="android";break;case"iOS":t=this.isNewIpad()?a("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent):(t=/OS (\d+)_(\d+)_?(\d+)?/.exec(this.appVersion))?t[1]+"."+t[2]+"."+(0|t[3]):"",e="ios"}return{os_name:e,os_version:t}},e.prototype.getDeviceModel=function(e){var t="";try{if("android"===e)navigator.userAgent.split(";").forEach((function(e){e.indexOf("Build/")>-1&&(t=e.slice(0,e.indexOf("Build/")))}));else if("ios"===e||"mac"===e||"windows"===e)if(this.isNewIpad())t="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),r=n.indexOf(";");t=n.slice(0,r)}}catch(e){return t.trim()}return t.trim()},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),Ru={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az24z1mz1jz1az1cz18z1nz1nz1jz1mz1ez4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},Mu={cn:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},Cu="https://lf3-data.volccdn.com/obj/data-static/log-sdk/collect/visual-ab-core.js",Pu=function(){function e(e,t){this.collector=e,this.config=t,this.eventNameWhiteList=["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","_be_active"],this.paramsNameWhiteList=["$inactive","$inline","$target_uuid_list","$source_uuid","$is_spider","$source_id","$is_first_time","$user_unique_id_type","_staging_flag"],this.regStr=new RegExp("^[a-zA-Z0-9][a-z0-9A-Z_.-]{1,255}$")}return e.prototype.checkVerify=function(e){var t=this;if(!e||!e.length)return!1;var n=e[0];if(!n)return!1;var r=n.events,i=n.header;if(!r||!r.length)return!1;var o=!0;return r.forEach((function(e){t.checkEventName(e.event)||(o=!1,e.checkEvent="事件名不能以 $ or __开头"),t.checkEventParams(e.params)||(o=!1,e.checkParams="属性名不能以 $ or __开头")})),this.checkEventParams(i)||(o=!1),o},e.prototype.checkEventName=function(e){return!!e&&this.calculate(e,"event")},e.prototype.checkEventParams=function(e){var t=e;"string"==typeof e&&(t=JSON.parse(t));var n=!0;if(!Object.keys(t).length)return n;for(var r in t){if(!this.calculate(r,"params")){n=!1;break}if("string"==typeof t[r]&&t[r].length>1024){console.warn("params: "+r+" can not over 1024 byte, please check;"),n=!1;break}}return n},e.prototype.calculate=function(e,t){return-1!==("event"===t?this.eventNameWhiteList:"params"===t?this.paramsNameWhiteList:[]).indexOf(e)||(!new RegExp("^\\$").test(e)&&!new RegExp("^__").test(e)||(console.warn(t+" name: "+e+" can not start with $ or __, pleace check;"),!1))},e}();!function(e){e.Init="init",e.Config="config",e.Start="start",e.Ready="ready",e.TokenComplete="token-complete",e.TokenStorage="token-storage",e.TokenFetch="token-fetch",e.TokenError="token-error",e.ConfigUuid="config-uuid",e.ConfigWebId="config-webid",e.ConfigDomain="config-domain",e.CustomWebId="custom-webid",e.TokenChange="token-change",e.TokenReset="token-reset",e.ConfigTransform="config-transform",e.EnvTransform="env-transform",e.SessionReset="session-reset",e.SessionResetTime="session-reset-time",e.Event="event",e.Events="events",e.EventNow="event-now",e.CleanEvents="clean-events",e.BeconEvent="becon-event",e.SubmitBefore="submit-before",e.SubmitScuess="submit-scuess",e.SubmitAfter="submit-after",e.SubmitError="submit-error",e.SubmitVerify="submit-verify",e.SubmitVerifyH="submit-verify-h5",e.Stay="stay",e.ResetStay="reset-stay",e.StayReady="stay-ready",e.SetStay="set-stay",e.RouteChange="route-change",e.RouteReady="route-ready",e.Ab="ab",e.AbVar="ab-var",e.AbAllVars="ab-all-vars",e.AbConfig="ab-config",e.AbExternalVersion="ab-external-version",e.AbVersionChangeOn="ab-version-change-on",e.AbVersionChangeOff="ab-version-change-off",e.AbOpenLayer="ab-open-layer",e.AbCloseLayer="ab-close-layer",e.AbReady="ab-ready",e.AbComplete="ab-complete",e.AbTimeout="ab-timeout",e.Profile="profile",e.ProfileSet="profile-set",e.ProfileSetOnce="profile-set-once",e.ProfileUnset="profile-unset",e.ProfileIncrement="profile-increment",e.ProfileAppend="profile-append",e.ProfileClear="profile-clear",e.TrackDuration="track-duration",e.TrackDurationStart="track-duration-start",e.TrackDurationEnd="track-duration-end",e.TrackDurationPause="track-duration-pause",e.TrackDurationResume="tracl-duration-resume",e.Autotrack="autotrack",e.AutotrackReady="autotrack-ready"}(Tu||(Tu={})),function(e){e.DEBUGGER_MESSAGE="debugger-message",e.DEBUGGER_MESSAGE_SDK="debugger-message-sdk",e.DEBUGGER_MESSAGE_FETCH="debugger-message-fetch",e.DEBUGGER_MESSAGE_FETCH_RESULT="debugger-message-fetch-result",e.DEBUGGER_MESSAGE_EVENT="debugger-message-event",e.DEVTOOL_WEB_READY="devtool-web-ready"}(Au||(Au={}));var Gu=Tu,Uu=void 0,Nu=(new Date).getTimezoneOffset(),Bu=parseInt(""+-Nu/60,10),Lu=60*Nu,ju=function(){function e(e,t){this.is_first_time=!0,this.configPersist=!1,this.initConfig=t,this.collect=e;var n=new Du(t.app_id,t.cookie_domain||"",t.cookie_expire||7776e6).init();this.eventCheck=new Pu(e,t);var r="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new Iu(!1,"session"),this.localStorage=new Iu(!1,"local"),t.configPersist&&(this.configPersist=!0,this.storage=1===t.configPersist?this.sessionStorage:this.localStorage);var i=this.localStorage.getItem(r);i&&1==i?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(r,"1")),this.envInfo={user:{user_unique_id:Uu,user_type:Uu,user_id:Uu,user_is_auth:Uu,user_is_login:Uu,device_id:Uu,web_id:Uu,ip_addr_id:Uu,user_unique_id_type:Uu},header:{app_id:Uu,app_name:Uu,app_install_id:Uu,install_id:Uu,app_package:Uu,app_channel:Uu,app_version:Uu,ab_version:Uu,os_name:n.os_name,os_version:n.os_version,device_model:n.device_model,ab_client:Uu,traffic_type:Uu,client_ip:Uu,device_brand:Uu,os_api:Uu,access:Uu,language:n.language,region:Uu,app_language:Uu,app_region:Uu,creative_id:n.utm.creative_id,ad_id:n.utm.ad_id,campaign_id:n.utm.campaign_id,log_type:Uu,rnd:Uu,platform:n.platform,sdk_version:"0.0.1",sdk_lib:"js",province:Uu,city:Uu,timezone:Bu,tz_offset:Lu,tz_name:Uu,sim_region:Uu,carrier:Uu,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:Uu,wechat_openid:Uu}},this.ab_version="",this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(n),this.initDomain(),this.initABData()}return e.prototype.initDomain=function(){var e=this.initConfig.channel_domain;if(e)this.domain=e;else{var t=this.initConfig.channel;this.domain=jc(Ru[t])}},e.prototype.setDomain=function(e){this.domain=e},e.prototype.getDomain=function(){return this.domain},e.prototype.initABData=function(){var e="__tea_sdk_ab_version_"+this.initConfig.app_id,t=null;if(this.initConfig.ab_cross){var n=this.localStorage.getCookie(e,this.initConfig.ab_cookie_domain);t=n?JSON.parse(n):null}else t=this.localStorage.getItem(e);this.setAbCache(t)},e.prototype.setAbCache=function(e){this.ab_cache=e},e.prototype.getAbCache=function(){return this.ab_cache},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.initConfig.report_url||"/list";break;case"webid":t="/webid";break;case"tobid":t="/tobid"}var n="";return this.initConfig.caller&&(n="?sdk_version=0.0.1&sdk_name=web&app_id="+this.initConfig.app_id+"&caller="+this.initConfig.caller),""+this.getDomain()+t+n},e.prototype.setCustom=function(e){if(e&&e.latest_data&&e.latest_data.isLast)for(var t in delete e.latest_data.isLast,this.isLast=!0,e.latest_data)this.envInfo.header.custom[t]=e.latest_data[t]},e.prototype.set=function(e){var t=this;Object.keys(e).forEach((function(n){void 0!==e[n]&&null!==e[n]||t.delete(n);try{t.eventCheck.calculate(n,"config")}catch(e){}if("traffic_type"===n&&t.isLast&&(t.envInfo.header.custom.$latest_traffic_source_type=e[n]),"evtParams"===n)t.evtParams=Cs({},t.evtParams||{},e.evtParams||{});else if("_staging_flag"===n)t.evtParams=Cs({},t.evtParams||{},{_staging_flag:e._staging_flag});else if("reportErrorCallback"===n&&"function"==typeof e[n])t.reportErrorCallback=e[n];else{var r="",i="";if(n.indexOf(".")>-1){var o=n.split(".");r=o[0],i=o[1]}r?"user"===r||"header"===r?t.envInfo[r][i]=e[n]:t.envInfo.header.custom[i]=e[n]:Object.hasOwnProperty.call(t.envInfo.user,n)?["user_type","ip_addr_id"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?Number(e[n]):e[n]:["user_id","web_id","user_unique_id","user_unique_id_type"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?String(e[n]):e[n]:["user_is_auth","user_is_login"].indexOf(n)>-1?t.envInfo.user[n]=Boolean(e[n]):"device_id"===n&&(t.envInfo.user[n]=e[n]):Object.hasOwnProperty.call(t.envInfo.header,n)?t.envInfo.header[n]=e[n]:t.envInfo.header.custom[n]=e[n]}}))},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(JSON.stringify(this.envInfo[e])):JSON.parse(JSON.stringify(this.envInfo))}catch(e){console.log("get config stringify error "),this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};if(t&&Object.keys(e).length){var n=Object.assign(e,t);this.storage.setItem(this.configKey,n)}}catch(e){console.log("setStore error"),this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey)||{};return e&&Object.keys(e).length?e:null}catch(e){return this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message}),null}},e.prototype.delete=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};t&&Object.hasOwnProperty.call(t,e)&&(delete t[e],this.storage.setItem(this.configKey,t))}catch(e){this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message}),console.log("delete error")}},e}(),Vu=function(){function e(e,t){this.isLog=t||!1,this.name=e||""}return e.prototype.info=function(e){this.isLog&&console.log("%c %s","color: yellow; background-color: black;","[instance: "+this.name+"] "+e)},e.prototype.warn=function(e){this.isLog&&console.warn("%c %s","color: yellow; background-color: black;","[instance: "+this.name+"] "+e)},e.prototype.error=function(e){this.isLog&&console.error("[instance: "+this.name+"] "+e)},e.prototype.throw=function(e){throw this.error(this.name),new Error(e)},e}(),zu=function(){function e(e,t){this.native=e.enable_native||e["evitaN".split("").reverse().join("")],this.os=t.get("os_name")}var t=e.prototype;return t.bridgeInject=function(){try{return!!this.native&&(AppLogBridge?(console.log("AppLogBridge is injected"),!0):(console.log("AppLogBridge is not inject"),!1))}catch(e){return console.log("AppLogBridge is not inject"),!1}},t.bridgeReady=function(){var e=this;return new Promise((function(t,n){try{e.bridgeInject()?AppLogBridge.hasStarted((function(e){console.log("AppLogBridge is started? : "+e),e?t(!0):n(!1)})):n(!1)}catch(e){console.log("AppLogBridge, error:"+JSON.stringify(e.stack)),n(!1)}}))},t.setNativeAppId=function(e){try{AppLogBridge.setNativeAppId(JSON.stringify(e)),console.log("change bridge appid, event report with appid: "+e)}catch(e){console.error("setNativeAppId error")}},t.setConfig=function(e){var t=this;try{Object.keys(e).forEach((function(n){"user_unique_id"===n?t.setUserUniqueId(e[n]):e[n]?t.addHeaderInfo(n,e[n]):t.removeHeaderInfo(n)}))}catch(e){console.error("setConfig error")}},t.setUserUniqueId=function(e){try{AppLogBridge.setUserUniqueId(e)}catch(e){console.error("setUserUniqueId error")}},t.addHeaderInfo=function(e,t){try{AppLogBridge.addHeaderInfo(e,t)}catch(e){console.error("addHeaderInfo error")}},t.setHeaderInfo=function(e){try{AppLogBridge.setHeaderInfo(JSON.stringify(e))}catch(e){console.error("setHeaderInfo error")}},t.removeHeaderInfo=function(e){try{AppLogBridge.removeHeaderInfo(e)}catch(e){console.error("removeHeaderInfo error")}},t.reportPv=function(e){this.onEventV3("predefine_pageview",e)},t.onEventV3=function(e,t){try{AppLogBridge.onEventV3(e,t)}catch(e){console.error("onEventV3 error")}},t.profileSet=function(e){try{AppLogBridge.profileSet(e)}catch(e){console.error("profileSet error")}},t.profileSetOnce=function(e){try{AppLogBridge.profileSetOnce(e)}catch(e){console.error("profileSetOnce error")}},t.profileIncrement=function(e){try{AppLogBridge.profileIncrement(e)}catch(e){console.error("profileIncrement error")}},t.profileUnset=function(e){try{AppLogBridge.profileUnset(e)}catch(e){console.error("profileUnset error")}},t.profileAppend=function(e){try{AppLogBridge.profileAppend(e)}catch(e){console.error("profileAppend error")}},t.setExternalAbVersion=function(e){try{AppLogBridge.setExternalAbVersion(e)}catch(e){console.error("setExternalAbVersion error")}},t.getVar=function(e,t,n){try{"android"===this.os?n(AppLogBridge.getABTestConfigValueForKey(e,t)):AppLogBridge.getABTestConfigValueForKey(e,t,(function(e){n(e)}))}catch(e){console.error("getVar error"),n(t)}},t.getAllVars=function(e){try{"android"===this.os?e(AppLogBridge.getAllAbTestConfigs()):AppLogBridge.getAllAbTestConfigs((function(t){e(t)}))}catch(t){console.error("getAllVars error"),e(null)}},t.getAbSdkVersion=function(e){try{"android"===this.os?e(AppLogBridge.getAbSdkVersion()):AppLogBridge.getAbSdkVersion((function(t){e(t)}))}catch(t){console.error("getAbSdkVersion error"),e("")}},e}(),Ku=nn.filter,qu=_r("filter");Mt({target:"Array",proto:!0,forced:!qu},{filter:function(e){return Ku(this,e,arguments.length>1?arguments[1]:void 0)}});var Hu=500,Fu=5005;function Ju(e,t,n,r,i,o,a,s,c){try{var u=new XMLHttpRequest,l=s||"POST";u.open(l,""+e,!0),u.setRequestHeader("Content-Type","application/json; charset=utf-8"),a&&u.setRequestHeader("X-MCS-AppKey",""+a),r&&(u.withCredentials=!0),n&&(u.timeout=n,u.ontimeout=function(){o&&o(t,Fu)}),u.onload=function(){if(i){var e=null;if(u.responseText){try{e=JSON.parse(u.responseText)}catch(t){e={}}i(e,t)}}},u.onerror=function(){u.abort(),o&&o(t,Hu)},c?u.send(t):u.send(JSON.stringify(t))}catch(e){}}var Wu=4001,$u=4e3,Xu=4002,Qu=4003,Yu=function(e,t,n,r){try{var i=e.match(/\/v\d\//),o="";o=i?i[0]:-1!==e.indexOf("/v1/")?"/v1/":"/v2/";var a=e.split(o)[0];if(!a)return void r(e,t,Wu);t.forEach((function(i){var o=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&(t+="&"+n+"="+encodeURIComponent(JSON.stringify(e[n])));return"&"===t[0]?t.slice(1):t}(i),s=new Image(1,1);s.onload=function(){s=null,n&&n()},s.onerror=function(){s=null,r&&r(e,t,$u)},s.src=a+"/gif?"+o}))}catch(n){r&&r(e,t,Xu,n.message)}},Zu=function(e,t,n,r,i,o,a,s){var c=window.navigator.userAgent;if(-1===window.navigator.appName.indexOf("Microsoft Internet Explorer")||-1===c.indexOf("MSIE 8.0")&&-1===c.indexOf("MSIE 9.0")){if(a)return window.navigator&&window.navigator.sendBeacon?void(window.navigator.sendBeacon(e,JSON.stringify(t))?i():o(e,t,Qu)):void Yu(e,t,i,o)}else Yu(e,t,i,o);Ju(e,t,n,r,i,o,"","",s)},el=function(){function e(){this.eventLimit=50,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.cacheStorgae=new Iu(!0),this.localStorage=new Iu(!1),this.eventCheck=new Pu(e,t),this.maxReport=t.max_report||20,this.reportTime=t.reportTime||30,this.timeout=t.timeout||1e5,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.collect.on(Gu.Ready,(function(){n.reportAll(!1)})),this.collect.on(Gu.ConfigDomain,(function(){n.reportUrl=n.configManager.getUrl("event")})),this.collect.on(Gu.Event,(function(e){n.event(e)})),this.collect.on(Gu.BeconEvent,(function(e){n.beconEvent(e)})),this.collect.on(Gu.CleanEvents,(function(){n.reportAll(!1)})),this.linster()},e.prototype.linster=function(){var e=this;window.addEventListener("unload",(function(){e.reportAll(!0)}),!1),Vc((function(){e.reportAll(!0)})),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.reportAll(!0)}),!1)},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;try{var n=Gs(e,this.cacheStorgae.getItem(this.eventKey)||[]);if(this.cacheStorgae.setItem(this.eventKey,n),this.reportTimeout&&clearTimeout(this.reportTimeout),n.length>=this.maxReport)this.report(!1);else{var r=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),r)}}catch(e){this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}},e.prototype.beconEvent=function(e){var t=Gs(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.destroyInstance||this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(t)),!0))},e.prototype.reportBecon=function(){var e=this.cacheStorgae.getItem(this.beconKey)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))},e.prototype.report=function(e){if(!this.collect.destroyInstance&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))}},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n<e.length;n+=this.eventLimit){var r;r=e.slice(n,n+this.eventLimit);var i=this.split(this.merge(r));this.send(i,t)}else{i=this.split(this.merge(e));this.send(i,t)}},e.prototype.merge=function(e,t){var n=this,r=this.configManager.get(),i=r.header,o=r.user;i.custom=JSON.stringify(i.custom);var a=this.configManager.get("evtParams"),s=this.configManager.get("user_unique_id_type"),c=e.map((function(e){try{Object.keys(a).length&&!t&&(e.params=Cs({},a,e.params)),s&&(e.params.$user_unique_id_type=s);var r=n.configManager.getAbCache(),i=n.configManager.getAbVersion();return i&&r&&(n.config.disable_ab_reset||r.uuid===o.user_unique_id)&&(e.ab_sdk_version=i),e.session_id=n.collect.sessionManager.getSessionId(),e.params=JSON.stringify(e.params),e}catch(t){return n.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),e}})),u=[];if(!Object.keys(o).length)return console.warn("user info error,cant report"),u;var l=JSON.parse(JSON.stringify({events:c,user:o,header:i}));return l.local_time=Math.floor(Date.now()/1e3),l.verbose=1,l.user_unique_type=this.config.enable_ttwebid?this.config.user_unique_type:void 0,u.push(l),u},e.prototype.split=function(e){return e=e.map((function(e){var t=[];return t.push(e),t}))},e.prototype.send=function(e,t){var n=this;e.length&&e.forEach((function(e){try{var r=JSON.parse(JSON.stringify(e));n.config.filter&&((r=n.config.filter(r))||console.warn("filter must return data !!")),n.collect.eventFilter&&r&&((r=n.collect.eventFilter(r))||console.warn("filterEvent api must return data !!"));var i=r||e,o=JSON.parse(JSON.stringify(i));if(n.eventCheck.checkVerify(o),!i.length)return;n.collect.emit(Gu.SubmitBefore,i),n.collect.emit(Gu.SubmitVerify,i),Zu(n.reportUrl,i,n.timeout,!1,(function(e,t){e&&0!==e.e?(n.collect.emit(Gu.SubmitError,{type:"f_data",eventData:t,errorCode:e.e,response:e}),n.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_EVENT,info:"埋点上报失败",time:Date.now(),data:o,code:e.e,failType:"数据异常",status:"fail"})):(n.collect.emit(Gu.SubmitScuess,{eventData:t,res:e}),n.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:o,code:200,status:"success"}))}),(function(e,t){n.configManager.get("reportErrorCallback")(e,t),n.collect.emit(Gu.SubmitError,{type:"f_net",eventData:e,errorCode:t}),n.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_EVENT,info:"埋点上报网络异常",time:Date.now(),data:o,code:t,failType:"网络异常",status:"fail"})}),t,!1),n.eventCheck.checkVerify(i),n.collect.emit(Gu.SubmitVerify,i),n.collect.emit(Gu.SubmitVerifyH,i),n.collect.emit(Gu.SubmitAfter,i)}catch(e){console.warn("something error, "+JSON.stringify(e.stack)),n.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}}))},e}(),tl=function e(t){return t?(t^16*Math.random()>>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},nl=function(){return tl().replace(/-/g,"").slice(0,19)},rl=function(){function e(){this.cacheToken={},this.enableCookie=!1,this.enable_ttwebid=!1,this.enableCustomWebid=!1}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new Iu(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.enable_ttwebid=t.enable_ttwebid,this.enableCustomWebid=t.enable_custom_webid,this.collect.on(Gu.ConfigUuid,(function(e){n.setUuid(e)})),this.collect.on(Gu.ConfigWebId,(function(e){n.setWebId(e)})),this.enableCookie=t.cross_subdomain,this.expiresTime=t.cookie_expire||6048e5,this.cookieDomain=t.cookie_domain||"",this.checkStorage()},e.prototype.checkStorage=function(){var e=this;if(this.enableCookie){var t=this.storage.getCookie(this.tokenKey,this.cookieDomain);this.cacheToken=t&&"string"==typeof t?JSON.parse(t):{}}else this.cacheToken=this.storage.getItem(this.tokenKey)||{};this.tokenType=this.cacheToken&&this.cacheToken._type_?this.cacheToken._type_:"default","custom"!==this.tokenType||this.enableCustomWebid?this.enableCustomWebid?this.collect.on(Gu.CustomWebId,(function(){e.tokenReady=!0,e.collect.emit(Gu.TokenComplete)})):this.checkEnv()||(this.enable_ttwebid?this.completeTtWid(this.cacheToken):this.check()):this.remoteWebid()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.config.disable_webid?this.complete({web_id:nl(),user_unique_id:this.configManager.get("user_unique_id")||nl()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e=window.navigator.userAgent;if(-1!==e.indexOf("miniProgram")||-1!==e.indexOf("MiniProgram")){var t=Hc(window.location.href);return!(!t||!t.Web_ID)&&(this.complete({web_id:""+t.Web_ID,user_unique_id:this.configManager.get("user_unique_id")||""+t.Web_ID}),!0)}return!1},e.prototype.remoteWebid=function(){var e=this,t=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(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 发起WEBID请求",logType:"fetch",level:"info",time:Date.now(),data:n});var r=nl();Ju(t,n,3e5,!1,(function(t){var n;t&&0===t.e?(n=t.web_id,e.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"WEBID请求成功",logType:"fetch",level:"info",time:Date.now(),data:t})):(n=r,e.collect.configManager.set({localWebId:r}),e.collect.emit(Gu.TokenError),e.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"WEBID请求返回值异常",logType:"fetch",level:"warn",time:Date.now(),data:t}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")),e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})}),(function(){e.complete({web_id:e.configManager.get("web_id")||r,user_unique_id:e.configManager.get("user_unique_id")||r}),e.collect.configManager.set({localWebId:r}),e.collect.emit(Gu.TokenError),e.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"WEBID请求网络异常",logType:"fetch",level:"error",time:Date.now(),data:null}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")}))},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id;if(!t&&!n)return this.collect.emit(Gu.TokenError),void console.warn("token error");e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(Gu.TokenComplete)},e.prototype.completeTtWid=function(e){var t=e.user_unique_id||"",n=this.configManager.get("user_unique_id");this.configManager.set({user_unique_id:n||t}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(Gu.TokenComplete)},e.prototype.setUuid=function(e){if(e&&-1===["null","undefined","Null","None"].indexOf(e)){var t=String(e),n=this.configManager.get("user_unique_id"),r=this.cacheToken&&this.cacheToken.user_unique_id;if(t===n&&t===r)return;this.configManager.set({user_unique_id:t}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=t,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken),this.collect.emit(Gu.TokenChange,"uuid"),this.collect.emit(Gu.SessionReset)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(Gu.TokenReset))},e.prototype.setWebId=function(e){if(e&&!this.config.enable_ttwebid){this.cacheToken&&this.cacheToken.web_id?this.cacheToken.web_id!==e&&(this.cacheToken.user_unique_id=this.cacheToken.web_id===this.cacheToken.user_unique_id?e:this.cacheToken.user_unique_id,this.cacheToken.web_id=e):(this.cacheToken={},this.cacheToken.web_id=e,this.cacheToken.user_unique_id=e),this.cacheToken.timestamp=Date.now();var t=this.configManager.get("web_id"),n=this.configManager.get("user_unique_id");n&&n!==t||(this.configManager.set({user_unique_id:e}),this.collect.emit(Gu.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(Gu.TokenChange,"webid")),this.setStorage(this.cacheToken)}},e.prototype.setStorage=function(e){e._type_=this.enableCustomWebid?"custom":"default",delete e["diss".split("").reverse().join("")],this.enableCookie||this.enable_ttwebid?this.storage.setCookie(this.tokenKey,e,this.expiresTime,this.cookieDomain):this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e.prototype.getTobId=function(){var e=this,t=this.configManager.getUrl("tobid");return new Promise((function(n){Ju(t,{app_id:e.config.app_id,user_unique_id:e.configManager.get("user_unique_id"),web_id:e.configManager.get("web_id"),user_unique_id_type:e.configManager.get("user_unique_id_type")},3e4,e.enable_ttwebid,(function(e){e&&0===e.e?n(e.tobid):n("")}),(function(){n("")}))}))},e}(),il=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},ol=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new Iu(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSession||(this.setSessionId(),this.collect.on(Gu.SessionReset,(function(){n.resetSessionId()})),this.collect.on(Gu.SessionResetTime,(function(){n.updateSessionIdTime()})))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;Date.now()-t>this.expireTime?e={sessionId:il(),timestamp:Date.now()}:e.timestamp=Date.now(),this.storage.setItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:il(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,t),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime)},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.resetSessionId=function(){var e={sessionId:il(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,e)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&(Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:il(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e)))},e}(),al=function(){function e(e,t){this.devToolReady=!1,this.devToolOrigin="*",this.sendAlready=!1,this.collect=e,this.config=t,this.app_id=t.app_id,this.filterEvent=["__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()}return e.prototype.loadScript=function(e){try{var t=document.createElement("script");t.src=e,t.onerror=function(){console.log("load DevTool render fail")},t.onload=function(){console.log("load DevTool render success")},document.getElementsByTagName("body")[0].appendChild(t)}catch(e){console.log("devTool load fail, "+e.message)}},e.prototype.load=function(){try{this.loadBaseInfo(),this.loadHook();var e=Hc(window.location.href);if(!e.open_devtool_web||parseInt(e.app_id)!==this.app_id)return;this.addLintener(),this.loadDebuggerModule(),this.loadDevTool()}catch(e){console.log("debug fail, "+e.message)}},e.prototype.loadDevTool=function(){this.loadScript("https://lf3-cdn-tos.bytescm.com/obj/static/log-sdk/collect/devtool/debug-web.js")},e.prototype.loadBaseInfo=function(){var e=this;this.info=[{title:"基本信息",type:1,infoName:{app_id:this.config.app_id,channel:this.config.channel,"上报域名":this.collect.configManager.getDomain(),"SDK版本":"0.0.1","SDK引入方式":"npm"}},{title:"用户信息",type:2,infoName:{uuid:this.collect.configManager.get("user").user_unique_id||"",web_id:this.collect.configManager.get("user").web_id||"",ssid:"点击获取SSID"}},{title:"公共参数信息",type:2,infoName:{"浏览器":this.collect.configManager.get("browser"),"浏览器版本":this.collect.configManager.get("browser_version"),"平台":this.collect.configManager.get("platform"),"设备型号":this.collect.configManager.get("device_model"),"操作系统":this.collect.configManager.get("os_name"),"操作系统版本":this.collect.configManager.get("os_version"),"屏幕分辨率":this.collect.configManager.get("os_version"),"来源":this.collect.configManager.get("referrer"),"自定义信息":""}},{title:"配置信息",type:3,infoName:{"全埋点":!!this.config.autotrack,"停留时长":!!this.config.enable_stay_duration}},{title:"A/B配置信息",type:4,infoName:{"A/B实验":!!this.config.enable_ab_test}},{title:"客户端信息",type:3,infoName:{"打通开关":!!this.config.Native}}],this.log=[],this.event=[],this.collect.on(Gu.Ready,(function(){e.info[1].infoName.uuid=e.collect.configManager.get("user").user_unique_id,e.info[1].infoName.web_id=e.collect.configManager.get("user").web_id,e.info[2].infoName["自定义信息"]=JSON.stringify(e.collect.configManager.get("custom")),e.config.enable_ab_test&&(e.info[4].infoName["已曝光VID"]=e.collect.configManager.getAbVersion(),e.info[4].infoName["A/B域名"]=e.config.ab_channel_domain||jc(Mu[e.config.channel]),e.info[4].infoName["全部配置"]=e.collect.configManager.getAbData()),e.config.Native&&(e.info[5].infoName["是否打通"]=!!e.collect.bridgeReport)}))},e.prototype.loadHook=function(){var e=this;this.collect.on(Au.DEBUGGER_MESSAGE,(function(t){switch(t.type){case Au.DEBUGGER_MESSAGE_SDK:var n={time:t.time,type:t.logType||"sdk",level:t.level,name:t.info,show:!0,levelShow:!0,needDesc:!!t.data};return t.data&&(n.desc={content:JSON.stringify(t.data)}),e.updateLog(n),t.secType&&"AB"===t.secType?(e.info[4].infoName["已曝光VID"]=e.collect.configManager.getAbVersion(),e.info[4].infoName["全部配置"]=e.collect.configManager.getAbData()):"USER"===t.secType&&(e.info[1].infoName.uuid=e.collect.configManager.get("user").user_unique_id,e.info[1].infoName.web_id=e.collect.configManager.get("user").web_id),void e.updateInfo();case Au.DEBUGGER_MESSAGE_EVENT:if(t.data&&t.data.length){var r=t.data[0],i=r.events;if(!i.length)return;i.forEach((function(n){n.checkShow=!0,n.searchShow=!0,n.success=t.status,n.type=-1!==e.filterEvent.indexOf(n.event)?"sdk":"cus",n.type=e.collect.bridgeReport?"bridge":n.type,n.info="","fail"===t.status&&(n.info={message:"code: "+t.code+", msg: "+t.failType})})),e.updateEvent(r)}return}}))},e.prototype.addLintener=function(){var e=this;window.addEventListener("message",(function(t){if(t&&t.data&&"devtool:web:ready"===t.data.type){if(e.devToolOrigin=t.origin,e.devToolReady=!0,e.sendAlready)return;console.log("inittttt"),e.sendData("devtool:web:init",{info:e.info,log:e.log,event:e.event}),e.sendAlready=!0}t&&t.data&&"devtool:web:ssid"===t.data.type&&e.collect.getToken((function(t){e.info[1].infoName.ssid=t.tobid,e.updateInfo()}))}))},e.prototype.sendData=function(e,t){try{var n={type:e,payload:t};(window.opener||window.parent).postMessage(n,this.devToolOrigin)}catch(e){}},e.prototype.updateInfo=function(){this.devToolReady&&this.sendData("devtool:web:info",this.info)},e.prototype.updateLog=function(e){this.devToolReady?this.sendData("devtool:web:log",e):this.log.push(e)},e.prototype.updateEvent=function(e){this.devToolReady?this.sendData("devtool:web:event",e):this.event.push(e)},e.prototype.loadDebuggerModule=function(){var e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.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: pointer;\n z-index:100;\n }")),e.appendChild(t);var n=document.createElement("div");n.innerHTML='<div id="debugger-applog-web" class="debugger-applog-web">AppLog调试</div>';var r=document.createElement("div");r.innerHTML='<div id="debugger-container" class="debugger-container"></div>',document.getElementsByTagName("body")[0].appendChild(n),document.getElementsByTagName("body")[0].appendChild(r),document.getElementById("debugger-applog-web").addEventListener("click",(function(){(window.opener||window.parent).postMessage({type:"devtool:web:open-draw"},location.origin)}))},e}(),sl=function(){function e(e){this.disableAutoPageView=!1,this.bridgeReport=!1,this.staging=!1,this.pluginInstances=[],this.sended=!1,this.started=!1,this.destroyInstance=!1,this.adapters={},this.sdkReady=!1,this.name=e,this.hook=new js,this.logger=new Vu(e),this.remotePlugin=new Map,this.Types=Gu,this.adapters.fetch=Ju,this.adapters.storage=Iu}return e.usePlugin=function(t,n,r){if(n){for(var i=!1,o=0,a=e.plugins.length;o<a;o++){if(e.plugins[o].name===n){e.plugins[o].plugin=t,e.plugins[o].options=r||{},i=!0;break}}i||e.plugins.push({name:n,plugin:t,options:r})}else e.plugins.push({plugin:t})},e.prototype.init=function(t){var n,r=this;this.inited?console.log("init can be call only one time"):t&&Nc(t)?t.app_id&&("number"==typeof(n=t.app_id)&&!isNaN(n))?!t.app_key||function(e){return"string"==typeof e}(t.app_key)?(t.channel_domain||-1!==["cn","sg","va"].indexOf(t.channel)||(console.warn("channel must be `cn`, `sg`,`va` !!!"),t.channel="cn"),this.inited=!0,this.logger=new Vu(this.name,t.log),this.configManager=new ju(this,t),this.appBridge=new zu(t,this.configManager),this.bridgeReport=this.appBridge.bridgeInject(),this.debugger=new al(this,t),this.initConfig=t,this.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行INIT",data:t,level:"info",time:Date.now()}),t.disable_auto_pv&&(this.disableAutoPageView=!0),this.bridgeReport||(this.configManager.set({app_id:t.app_id}),this.eventManager=new el,this.tokenManager=new rl,this.sessionManager=new ol,Promise.all([new Promise((function(e){r.once(Gu.TokenComplete,(function(){e(!0)}))})),new Promise((function(e){r.once(Gu.Start,(function(){e(!0)}))}))]).then((function(){try{e.plugins.reduce((function(e,t){var n=t.plugin,i=t.options,o=Object.assign(r.initConfig,i),a=new n;return a.apply(r,o),e.push(a),e}),r.pluginInstances)}catch(e){console.log("load plugin error, "+e.message),r.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}r.sdkReady=!0,r.emit(Gu.Ready),r.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 初始化完成",time:Date.now(),level:"info",data:r.configManager.get("user")}),r.logger.info("appid: "+t.app_id+", userInfo:"+JSON.stringify(r.configManager.get("user"))),r.logger.info("appid: "+t.app_id+", sdk is ready, version is 0.0.1, you can report now !!!");try{(window.opener||window.parent).postMessage("[tea-sdk]ready","*")}catch(e){r.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}r.pageView(),r.on(Gu.TokenChange,(function(e){"webid"===e&&r.pageView(),r.logger.info("appid: "+t.app_id+" token change, new userInfo:"+JSON.stringify(r.configManager.get("user"))),r.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 设置了用户信息",time:Date.now(),secType:"USER",level:"info",data:r.configManager.get("user")})})),r.on(Gu.TokenReset,(function(){r.logger.info("appid: "+t.app_id+" token reset, new userInfo:"+JSON.stringify(r.configManager.get("user"))),r.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 重置了用户信息",time:Date.now(),secType:"USER",level:"info",data:r.configManager.get("user")})})),r.on(Gu.RouteChange,(function(e){e.init||t.disable_route_report||r.pageView()}))})),this.tokenManager.apply(this,t),this.eventManager.apply(this,t),this.sessionManager.apply(this,t),this.emit(Gu.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.prototype.config=function(e){if(this.inited)if(e&&Nc(e))if(this.bridgeReport)this.appBridge.setConfig(e);else{e._staging_flag&&1===e._staging_flag&&(this.staging=!0),e.disable_auto_pv&&(this.disableAutoPageView=!0,delete e.disable_auto_pv);var t=Cs({},e);if(this.initConfig&&this.initConfig.configPersist){var n=this.configManager.getStore();n&&(t=Object.assign(n,e)),this.configManager.setStore(e)}t.web_id,t.user_unique_id;var r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["web_id","user_unique_id"]);t.hasOwnProperty("web_id")&&this.emit(Gu.ConfigWebId,t.web_id),t.hasOwnProperty("user_unique_id")&&this.emit(Gu.ConfigUuid,t.user_unique_id),this.configManager.set(r),this.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行CONFIG",level:"info",time:Date.now(),data:t})}else this.logger.warn("config params is error, please check");else this.logger.warn("config must be use after function init")},e.prototype.setDomain=function(e){this.configManager&&this.configManager.setDomain(e),this.emit(Gu.ConfigDomain)},e.prototype.getConfig=function(e){return this.configManager.get(e)},e.prototype.send=function(){this.start()},e.prototype.start=function(){this.inited&&!this.sended&&(this.sended=!0,this.emit(Gu.Start),this.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行START",level:"info",time:Date.now()}),this.bridgeReport&&(this.pageView(),this.emit(Gu.Ready)))},e.prototype.event=function(e,t){var n=this;try{if(this.initConfig&&this.initConfig.disable_track_event)return;var r=[];Array.isArray(e)?e.forEach((function(e){r.push(n.processEvent(e[0],e[1]||{}))})):r.push(this.processEvent(e,t)),this.bridgeReport?r.forEach((function(e){var t=e.event,r=e.params;n.appBridge.onEventV3(t,JSON.stringify(r))})):r.length&&(this.emit(Gu.Event,r),this.emit(Gu.SessionResetTime))}catch(e){this.logger.warn("something error, please check"),this.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}},e.prototype.beconEvent=function(e,t){if(!this.initConfig||!this.initConfig.disable_track_event)if(Array.isArray(e))console.warn("beconEvent not support batch report, please check");else{var n=[];n.push(this.processEvent(e,t||{})),n.length&&(this.emit(Gu.BeconEvent,n),this.emit(Gu.SessionResetTime))}},e.prototype.processEvent=function(e,t){void 0===t&&(t={});try{var n=e;/^event\./.test(e)&&(n=e.slice(6));var r=t;"object"!=typeof r&&(r={}),r.profile?delete r.profile:r.event_index=Lc();var i=void 0;return 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(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:n.message}),{event:e,params:t}}},e.prototype.filterEvent=function(e){this.eventFilter=e},e.prototype.on=function(e,t){this.hook.on(e,t)},e.prototype.once=function(e,t){this.hook.once(e,t)},e.prototype.off=function(e,t){this.hook.off(e,t)},e.prototype.emit=function(e,t,n){this.hook.emit(e,t,n)},e.prototype.set=function(e){this.hook.set(e)},e.prototype.pageView=function(){this.disableAutoPageView||this.predefinePageView()},e.prototype.predefinePageView=function(e){void 0===e&&(e={});var t={title:document.title||location.pathname,url:location.href,url_path:location.pathname,time:Date.now(),referrer:window.document.referrer,$is_first_time:""+this.configManager.is_first_time},n=Cs({},t,e);this.event("predefine_pageview",n)},e.prototype.clearEventCache=function(){this.emit(Gu.CleanEvents)},e.prototype.setWebIDviaUnionID=function(e){if(e){var t=Fc(e);this.config({web_id:""+t,wechat_unionid:e}),this.emit(Gu.CustomWebId)}},e.prototype.setWebIDviaOpenID=function(e){if(e){var t=Fc(e);this.config({web_id:""+t,wechat_openid:e}),this.emit(Gu.CustomWebId)}},e.prototype.setNativeAppId=function(e){this.bridgeReport&&this.appBridge.setNativeAppId(e)},e.prototype.resetStayDuration=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.emit(Gu.ResetStay,{url_path:e,title:t,url:n},Gu.Stay)},e.prototype.resetStayParams=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.emit(Gu.SetStay,{url_path:e,title:t,url:n},Gu.Stay)},e.prototype.getToken=function(e,t){var n=this,r=!1,i=function(t){if(!r){r=!0;var i=n.configManager.get().user;return t&&(i.tobid=t,i["diss".split("").reverse().join("")]=t),e(Cs({},i))}},o=function(){n.tokenManager.getTobId().then((function(e){i(e)}))};this.sdkReady?o():(t&&setTimeout((function(){i()}),t),this.on(Gu.Ready,(function(){o()})))},e.prototype.startTrackEvent=function(e){e&&this.emit(Gu.TrackDurationStart,e,Gu.TrackDuration)},e.prototype.endTrackEvent=function(e,t){void 0===t&&(t={}),e&&this.emit(Gu.TrackDurationEnd,{eventName:e,params:t},Gu.TrackDuration)},e.prototype.pauseTrackEvent=function(e){e&&this.emit(Gu.TrackDurationPause,e,Gu.TrackDuration)},e.prototype.resumeTrackEvent=function(e){e&&this.emit(Gu.TrackDurationResume,e,Gu.TrackDuration)},e.prototype.profileSet=function(e){this.bridgeReport?this.appBridge.profileSet(JSON.stringify(e)):this.emit(Gu.ProfileSet,e,Gu.Profile),this.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileSet",level:"info",time:Date.now(),data:e})},e.prototype.profileSetOnce=function(e){this.bridgeReport?this.appBridge.profileSetOnce(JSON.stringify(e)):this.emit(Gu.ProfileSetOnce,e,Gu.Profile),this.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileSetOnce",level:"info",time:Date.now(),data:e})},e.prototype.profileIncrement=function(e){this.bridgeReport?this.appBridge.profileIncrement(JSON.stringify(e)):this.emit(Gu.ProfileIncrement,e,Gu.Profile),this.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileIncrement",level:"info",time:Date.now(),data:e})},e.prototype.profileUnset=function(e){this.bridgeReport?this.appBridge.profileUnset(e):this.emit(Gu.ProfileUnset,e,Gu.Profile),this.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileUnset",level:"info",time:Date.now(),data:e})},e.prototype.profileAppend=function(e){this.bridgeReport?this.appBridge.profileAppend(JSON.stringify(e)):this.emit(Gu.ProfileAppend,e,Gu.Profile),this.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileAppend",level:"info",time:Date.now(),data:e})},e.prototype.setExternalAbVersion=function(e){this.bridgeReport?this.appBridge.setExternalAbVersion(e):this.emit(Gu.AbExternalVersion,"string"==typeof e&&e?(""+e).trim():null,Gu.Ab)},e.prototype.getVar=function(e,t,n){this.bridgeReport?this.appBridge.getVar(e,t,n):this.emit(Gu.AbVar,{name:e,defaultValue:t,callback:n},Gu.Ab)},e.prototype.getAllVars=function(e){this.bridgeReport?this.appBridge.getAllVars(e):this.emit(Gu.AbAllVars,e,Gu.Ab)},e.prototype.getABconfig=function(e,t){this.emit(Gu.AbConfig,{params:e,callback:t},Gu.Ab)},e.prototype.getAbSdkVersion=function(e){if(!this.bridgeReport||!e)return this.configManager.getAbVersion()||"";this.appBridge.getAbSdkVersion(e)},e.prototype.onAbSdkVersionChange=function(e){var t=this;return this.emit(Gu.AbVersionChangeOn,e,Gu.Ab),function(){t.emit(Gu.AbVersionChangeOff,e,Gu.Ab)}},e.prototype.offAbSdkVersionChange=function(e){this.emit(Gu.AbVersionChangeOff,e,Gu.Ab)},e.prototype.openOverlayer=function(){this.emit(Gu.AbOpenLayer,"",Gu.Ab)},e.prototype.closeOverlayer=function(){this.emit(Gu.AbCloseLayer,"",Gu.Ab)},e.prototype.destoryInstace=function(){this.destroyInstance||(this.destroyInstance=!0,this.off(Gu.TokenComplete))},e.plugins=[],e}(),cl=he("isConcatSpreadable"),ul=o.TypeError,ll=L>=51||!a((function(){var e=[];return e[cl]=!1,e.concat()[0]!==e})),fl=_r("concat"),hl=function(e){if(!D(e))return!1;var t=e[cl];return void 0!==t?!!t:Gt(e)};Mt({target:"Array",proto:!0,arity:1,forced:!ll||!fl},{concat:function(e){var t,n,r,i,o,a=te(this),s=Zt(a,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(hl(o=-1===t?a:arguments[t])){if(c+(i=ft(o))>9007199254740991)throw ul("Maximum allowed index exceeded");for(n=0;n<i;n++,c++)n in o&&mr(s,c,o[n])}else{if(c>=9007199254740991)throw ul("Maximum allowed index exceeded");mr(s,c++,o)}return s.length=c,s}});var pl=pt.includes,dl=a((function(){return!Array(1).includes()}));Mt({target:"Array",proto:!0,forced:dl},{includes:function(e){return pl(this,e,arguments.length>1?arguments[1]:void 0)}}),xn("includes");var gl=o.TypeError,vl=function(e){if(Fa(e))throw gl("The method doesn't accept regular expressions");return e},ml=he("match"),yl=_("".indexOf);Mt({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ml]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~yl(ha(O(this)),ha(vl(e)),arguments.length>1?arguments[1]:void 0)}});var _l=he("iterator"),bl=!a((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[_l]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),El=function(e,t,n){return n.get&&et(n.get,t,{getter:!0}),n.set&&et(n.set,t,{setter:!0}),De.f(e,t,n)},wl=function(e,t,n,r){try{return r?t(Ae(n)[0],n[1]):t(n)}catch(t){ei(e,"throw",t)}},Sl=o.Array,kl=function(e){var t=te(e),n=Xt(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=Pt(i,r>2?arguments[2]:void 0));var a,s,c,u,f,h,p=Qr(t),d=0;if(!p||this==Sl&&$r(p))for(a=ft(t),s=n?new this(a):Sl(a);a>d;d++)h=o?i(t[d],d):t[d],mr(s,d,h);else for(f=(u=Zr(t,p)).next,s=n?new this:[];!(c=l(f,u)).done;d++)h=o?wl(u,i,[c.value,d],!0):c.value,mr(s,d,h);return s.length=d,s},Tl=/[^\0-\u007E]/,Al=/[.\u3002\uFF0E\uFF61]/g,Ol="Overflow: input needs wider integers to process",xl=o.RangeError,Il=_(Al.exec),Dl=Math.floor,Rl=String.fromCharCode,Ml=_("".charCodeAt),Cl=_([].join),Pl=_([].push),Gl=_("".replace),Ul=_("".split),Nl=_("".toLowerCase),Bl=function(e){return e+22+75*(e<26)},Ll=function(e,t,n){var r=0;for(e=n?Dl(e/700):e>>1,e+=Dl(e/t);e>455;)e=Dl(e/35),r+=36;return Dl(r+36*e/(e+38))},jl=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=Ml(e,n++);if(i>=55296&&i<=56319&&n<r){var o=Ml(e,n++);56320==(64512&o)?Pl(t,((1023&i)<<10)+(1023&o)+65536):(Pl(t,i),n--)}else Pl(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&Pl(t,Rl(r));var c=t.length,u=c;for(c&&Pl(t,"-");u<i;){var l=2147483647;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<l&&(l=r);var f=u+1;if(l-o>Dl((2147483647-a)/f))throw xl(Ol);for(a+=(l-o)*f,o=l,n=0;n<e.length;n++){if((r=e[n])<o&&++a>2147483647)throw xl(Ol);if(r==o){for(var h=a,p=36;;){var d=p<=s?1:p>=s+26?26:p-s;if(h<d)break;var g=h-d,v=36-d;Pl(t,Rl(Bl(d+g%v))),h=Dl(g/v),p+=36}Pl(t,Rl(Bl(h))),s=Ll(a,f,u==c),a=0,u++}}a++,o++}return Cl(t,"")},Vl=Math.floor,zl=function(e,t){var n=e.length,r=Vl(n/2);return n<8?Kl(e,t):ql(e,zl(Br(e,0,r),t),zl(Br(e,r),t),t)},Kl=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},ql=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},Hl=zl,Fl=he("iterator"),Jl=Ze.set,Wl=Ze.getterFor("URLSearchParams"),$l=Ze.getterFor("URLSearchParamsIterator"),Xl=Object.getOwnPropertyDescriptor,Ql=function(e){if(!s)return o[e];var t=Xl(o,e);return t&&t.value},Yl=Ql("fetch"),Zl=Ql("Request"),ef=Ql("Headers"),tf=Zl&&Zl.prototype,nf=ef&&ef.prototype,rf=o.RegExp,of=o.TypeError,af=o.decodeURIComponent,sf=o.encodeURIComponent,cf=_("".charAt),uf=_([].join),lf=_([].push),ff=_("".replace),hf=_([].shift),pf=_([].splice),df=_("".split),gf=_("".slice),vf=/\+/g,mf=Array(4),yf=function(e){return mf[e-1]||(mf[e-1]=rf("((?:%[\\da-f]{2}){"+e+"})","gi"))},_f=function(e){try{return af(e)}catch(t){return e}},bf=function(e){var t=ff(e,vf," "),n=4;try{return af(t)}catch(e){for(;n;)t=ff(t,yf(n--),_f);return t}},Ef=/[!'()~]|%20/g,wf={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Sf=function(e){return wf[e]},kf=function(e){return ff(sf(e),Ef,Sf)},Tf=qn((function(e,t){Jl(this,{type:"URLSearchParamsIterator",iterator:Zr(Wl(e).entries),kind:t})}),"Iterator",(function(){var e=$l(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),Af=function(e){this.entries=[],this.url=null,void 0!==e&&(D(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===cf(e,0)?gf(e,1):e:ha(e)))};Af.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,c=Qr(e);if(c)for(n=(t=Zr(e,c)).next;!(r=l(n,t)).done;){if(o=(i=Zr(Ae(r.value))).next,(a=l(o,i)).done||(s=l(o,i)).done||!l(o,i).done)throw of("Expected sequence with length 2");lf(this.entries,{key:ha(a.value),value:ha(s.value)})}else for(var u in e)re(e,u)&&lf(this.entries,{key:u,value:ha(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=df(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=df(t,"="),lf(this.entries,{key:bf(hf(n)),value:bf(uf(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],lf(n,kf(e.key)+"="+kf(e.value));return uf(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Of=function(){ai(this,xf);var e=arguments.length>0?arguments[0]:void 0;Jl(this,new Af(e))},xf=Of.prototype;if(pi(xf,{append:function(e,t){Bi(arguments.length,2);var n=Wl(this);lf(n.entries,{key:ha(e),value:ha(t)}),n.updateURL()},delete:function(e){Bi(arguments.length,1);for(var t=Wl(this),n=t.entries,r=ha(e),i=0;i<n.length;)n[i].key===r?pf(n,i,1):i++;t.updateURL()},get:function(e){Bi(arguments.length,1);for(var t=Wl(this).entries,n=ha(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Bi(arguments.length,1);for(var t=Wl(this).entries,n=ha(e),r=[],i=0;i<t.length;i++)t[i].key===n&&lf(r,t[i].value);return r},has:function(e){Bi(arguments.length,1);for(var t=Wl(this).entries,n=ha(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Bi(arguments.length,1);for(var n,r=Wl(this),i=r.entries,o=!1,a=ha(e),s=ha(t),c=0;c<i.length;c++)(n=i[c]).key===a&&(o?pf(i,c--,1):(o=!0,n.value=s));o||lf(i,{key:a,value:s}),r.updateURL()},sort:function(){var e=Wl(this);Hl(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=Wl(this).entries,r=Pt(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new Tf(this,"keys")},values:function(){return new Tf(this,"values")},entries:function(){return new Tf(this,"entries")}},{enumerable:!0}),tt(xf,Fl,xf.entries,{name:"entries"}),tt(xf,"toString",(function(){return Wl(this).serialize()}),{enumerable:!0}),Vn(Of,"URLSearchParams"),Mt({global:!0,constructor:!0,forced:!bl},{URLSearchParams:Of}),!bl&&I(ef)){var If=_(nf.has),Df=_(nf.set),Rf=function(e){if(D(e)){var t,n=e.body;if("URLSearchParams"===Vt(n))return t=e.headers?new ef(e.headers):new ef,If(t,"content-type")||Df(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),En(e,{body:d(0,ha(n)),headers:d(0,t)})}return e};if(I(Yl)&&Mt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Yl(e,arguments.length>1?Rf(arguments[1]):{})}}),I(Zl)){var Mf=function(e){return ai(this,tf),new Zl(e,arguments.length>1?Rf(arguments[1]):{})};tf.constructor=Mf,Mf.prototype=tf,Mt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Mf})}}var Cf,Pf={URLSearchParams:Of,getState:Wl},Gf=Ba.codeAt,Uf=Ze.set,Nf=Ze.getterFor("URL"),Bf=Pf.URLSearchParams,Lf=Pf.getState,jf=o.URL,Vf=o.TypeError,zf=o.parseInt,Kf=Math.floor,qf=Math.pow,Hf=_("".charAt),Ff=_(/./.exec),Jf=_([].join),Wf=_(1..toString),$f=_([].pop),Xf=_([].push),Qf=_("".replace),Yf=_([].shift),Zf=_("".split),eh=_("".slice),th=_("".toLowerCase),nh=_([].unshift),rh=/[a-z]/i,ih=/[\d+-.a-z]/i,oh=/\d/,ah=/^0x/i,sh=/^[0-7]+$/,ch=/^\d+$/,uh=/^[\da-f]+$/i,lh=/[\0\t\n\r #%/:<>?@[\\\]^|]/,fh=/[\0\t\n\r #/:<>?@[\\\]^|]/,hh=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,ph=/[\t\n\r]/g,dh=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)nh(t,e%256),e=Kf(e/256);return Jf(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=Wf(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},gh={},vh=ki({},gh,{" ":1,'"':1,"<":1,">":1,"`":1}),mh=ki({},vh,{"#":1,"?":1,"{":1,"}":1}),yh=ki({},mh,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),_h=function(e,t){var n=Gf(e,0);return n>32&&n<127&&!re(t,e)?e:encodeURIComponent(e)},bh={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Eh=function(e,t){var n;return 2==e.length&&Ff(rh,Hf(e,0))&&(":"==(n=Hf(e,1))||!t&&"|"==n)},wh=function(e){var t;return e.length>1&&Eh(eh(e,0,2))&&(2==e.length||"/"===(t=Hf(e,2))||"\\"===t||"?"===t||"#"===t)},Sh=function(e){return"."===e||"%2e"===th(e)},kh={},Th={},Ah={},Oh={},xh={},Ih={},Dh={},Rh={},Mh={},Ch={},Ph={},Gh={},Uh={},Nh={},Bh={},Lh={},jh={},Vh={},zh={},Kh={},qh={},Hh=function(e,t,n){var r,i,o,a=ha(e);if(t){if(i=this.parse(a))throw Vf(i);this.searchParams=null}else{if(void 0!==n&&(r=new Hh(n,!0)),i=this.parse(a,null,r))throw Vf(i);(o=Lf(new Bf)).bindURL(this),this.searchParams=o}};Hh.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,c=this,u=t||kh,l=0,f="",h=!1,p=!1,d=!1;for(e=ha(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=Qf(e,hh,"")),e=Qf(e,ph,""),r=kl(e);l<=r.length;){switch(i=r[l],u){case kh:if(!i||!Ff(rh,i)){if(t)return"Invalid scheme";u=Ah;continue}f+=th(i),u=Th;break;case Th:if(i&&(Ff(ih,i)||"+"==i||"-"==i||"."==i))f+=th(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",u=Ah,l=0;continue}if(t&&(c.isSpecial()!=re(bh,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&bh[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?u=Nh:c.isSpecial()&&n&&n.scheme==c.scheme?u=Oh:c.isSpecial()?u=Rh:"/"==r[l+1]?(u=xh,l++):(c.cannotBeABaseURL=!0,Xf(c.path,""),u=zh)}break;case Ah:if(!n||n.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=Br(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=qh;break}u="file"==n.scheme?Nh:Ih;continue;case Oh:if("/"!=i||"/"!=r[l+1]){u=Ih;continue}u=Mh,l++;break;case xh:if("/"==i){u=Ch;break}u=Vh;continue;case Ih:if(c.scheme=n.scheme,i==Cf)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Br(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())u=Dh;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Br(n.path),c.query="",u=Kh;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Br(n.path),c.path.length--,u=Vh;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Br(n.path),c.query=n.query,c.fragment="",u=qh}break;case Dh:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=Vh;continue}u=Ch}else u=Mh;break;case Rh:if(u=Mh,"/"!=i||"/"!=Hf(f,l+1))continue;l++;break;case Mh:if("/"!=i&&"\\"!=i){u=Ch;continue}break;case Ch:if("@"==i){h&&(f="%40"+f),h=!0,o=kl(f);for(var g=0;g<o.length;g++){var v=o[g];if(":"!=v||d){var m=_h(v,yh);d?c.password+=m:c.username+=m}else d=!0}f=""}else if(i==Cf||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";l-=kl(f).length+1,f="",u=Ph}else f+=i;break;case Ph:case Gh:if(t&&"file"==c.scheme){u=Lh;continue}if(":"!=i||p){if(i==Cf||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(f))return a;if(f="",u=jh,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return"Invalid host";if(a=c.parseHost(f))return a;if(f="",u=Uh,t==Gh)return}break;case Uh:if(!Ff(oh,i)){if(i==Cf||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var y=zf(f,10);if(y>65535)return"Invalid port";c.port=c.isSpecial()&&y===bh[c.scheme]?null:y,f=""}if(t)return;u=jh;continue}return"Invalid port"}f+=i;break;case Nh:if(c.scheme="file","/"==i||"\\"==i)u=Bh;else{if(!n||"file"!=n.scheme){u=Vh;continue}if(i==Cf)c.host=n.host,c.path=Br(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=Br(n.path),c.query="",u=Kh;else{if("#"!=i){wh(Jf(Br(r,l),""))||(c.host=n.host,c.path=Br(n.path),c.shortenPath()),u=Vh;continue}c.host=n.host,c.path=Br(n.path),c.query=n.query,c.fragment="",u=qh}}break;case Bh:if("/"==i||"\\"==i){u=Lh;break}n&&"file"==n.scheme&&!wh(Jf(Br(r,l),""))&&(Eh(n.path[0],!0)?Xf(c.path,n.path[0]):c.host=n.host),u=Vh;continue;case Lh:if(i==Cf||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Eh(f))u=Vh;else if(""==f){if(c.host="",t)return;u=jh}else{if(a=c.parseHost(f))return a;if("localhost"==c.host&&(c.host=""),t)return;f="",u=jh}continue}f+=i;break;case jh:if(c.isSpecial()){if(u=Vh,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=Cf&&(u=Vh,"/"!=i))continue}else c.fragment="",u=qh;else c.query="",u=Kh;break;case Vh:if(i==Cf||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=th(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||Xf(c.path,"")):Sh(f)?"/"==i||"\\"==i&&c.isSpecial()||Xf(c.path,""):("file"==c.scheme&&!c.path.length&&Eh(f)&&(c.host&&(c.host=""),f=Hf(f,0)+":"),Xf(c.path,f)),f="","file"==c.scheme&&(i==Cf||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)Yf(c.path);"?"==i?(c.query="",u=Kh):"#"==i&&(c.fragment="",u=qh)}else f+=_h(i,mh);break;case zh:"?"==i?(c.query="",u=Kh):"#"==i?(c.fragment="",u=qh):i!=Cf&&(c.path[0]+=_h(i,gh));break;case Kh:t||"#"!=i?i!=Cf&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":_h(i,gh)):(c.fragment="",u=qh);break;case qh:i!=Cf&&(c.fragment+=_h(i,vh))}l++}},parseHost:function(e){var t,n,r;if("["==Hf(e,0)){if("]"!=Hf(e,e.length-1))return"Invalid host";if(t=function(e){var t,n,r,i,o,a,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,f=0,h=function(){return Hf(e,f)};if(":"==h()){if(":"!=Hf(e,1))return;f+=2,l=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&Ff(uh,h());)t=16*t+zf(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,u>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!Ff(oh,h()))return;for(;Ff(oh,h());){if(o=zf(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}c[u]=256*c[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[u++]=t}else{if(null!==l)return;f++,l=++u}}if(null!==l)for(a=u-l,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[l+a-1],c[l+--a]=s;else if(8!=u)return;return c}(eh(e,1,-1)),!t)return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,n,r=[],i=Ul(Gl(Nl(e),Al,"."),".");for(t=0;t<i.length;t++)n=i[t],Pl(r,Il(Tl,n)?"xn--"+jl(n):n);return Cl(r,".")}(e),Ff(lh,e))return"Invalid host";if(t=function(e){var t,n,r,i,o,a,s,c=Zf(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(o=10,i.length>1&&"0"==Hf(i,0)&&(o=Ff(ah,i)?16:8,i=eh(i,8==o?1:2)),""===i)a=0;else{if(!Ff(10==o?ch:8==o?sh:uh,i))return e;a=zf(i,o)}Xf(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=qf(256,5-t))return null}else if(a>255)return null;for(s=$f(n),r=0;r<n.length;r++)s+=n[r]*qf(256,3-r);return s}(e),null===t)return"Invalid host";this.host=t}else{if(Ff(fh,e))return"Invalid host";for(t="",n=kl(e),r=0;r<n.length;r++)t+=_h(n[r],gh);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return re(bh,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Eh(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=dh(i),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+Jf(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw Vf(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Fh(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+dh(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(ha(e)+":",kh)},getUsername:function(){return this.username},setUsername:function(e){var t=kl(ha(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=_h(t[n],yh)}},getPassword:function(){return this.password},setPassword:function(e){var t=kl(ha(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=_h(t[n],yh)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?dh(e):dh(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ph)},getHostname:function(){var e=this.host;return null===e?"":dh(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Gh)},getPort:function(){var e=this.port;return null===e?"":ha(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=ha(e))?this.port=null:this.parse(e,Uh))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Jf(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,jh))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=ha(e))?this.query=null:("?"==Hf(e,0)&&(e=eh(e,1)),this.query="",this.parse(e,Kh)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=ha(e))?("#"==Hf(e,0)&&(e=eh(e,1)),this.fragment="",this.parse(e,qh)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Fh=function(e){var t=ai(this,Jh),n=Bi(arguments.length,1)>1?arguments[1]:void 0,r=Uf(t,new Hh(e,!1,n));s||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Jh=Fh.prototype,Wh=function(e,t){return{get:function(){return Nf(this)[e]()},set:t&&function(e){return Nf(this)[t](e)},configurable:!0,enumerable:!0}};if(s&&(El(Jh,"href",Wh("serialize","setHref")),El(Jh,"origin",Wh("getOrigin")),El(Jh,"protocol",Wh("getProtocol","setProtocol")),El(Jh,"username",Wh("getUsername","setUsername")),El(Jh,"password",Wh("getPassword","setPassword")),El(Jh,"host",Wh("getHost","setHost")),El(Jh,"hostname",Wh("getHostname","setHostname")),El(Jh,"port",Wh("getPort","setPort")),El(Jh,"pathname",Wh("getPathname","setPathname")),El(Jh,"search",Wh("getSearch","setSearch")),El(Jh,"searchParams",Wh("getSearchParams")),El(Jh,"hash",Wh("getHash","setHash"))),tt(Jh,"toJSON",(function(){return Nf(this).serialize()}),{enumerable:!0}),tt(Jh,"toString",(function(){return Nf(this).serialize()}),{enumerable:!0}),jf){var $h=jf.createObjectURL,Xh=jf.revokeObjectURL;$h&&tt(Fh,"createObjectURL",Pt($h,jf)),Xh&&tt(Fh,"revokeObjectURL",Pt(Xh,jf))}Vn(Fh,"URL"),Mt({global:!0,constructor:!0,forced:!bl,sham:!s},{URL:Fh});var Qh="__rangers_ab_style__";var Yh={f:he},Zh=o,ep=De.f,tp=function(e){var t=Zh.Symbol||(Zh.Symbol={});re(t,e)||ep(t,e,{value:Yh.f(e)})},np=nn.forEach,rp=qe("hidden"),ip=Ze.set,op=Ze.getterFor("Symbol"),ap=Object.prototype,sp=o.Symbol,cp=sp&&sp.prototype,up=o.TypeError,lp=o.QObject,fp=we.f,hp=De.f,pp=Vr.f,dp=p.f,gp=_([].push),vp=Z("symbols"),mp=Z("op-symbols"),yp=Z("wks"),_p=!lp||!lp.prototype||!lp.prototype.findChild,bp=s&&a((function(){return 7!=En(hp({},"a",{get:function(){return hp(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=fp(ap,t);r&&delete ap[t],hp(e,t,n),r&&e!==ap&&hp(ap,t,r)}:hp,Ep=function(e,t){var n=vp[e]=En(cp);return ip(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},wp=function(e,t,n){e===ap&&wp(mp,t,n),Ae(e);var r=ve(t);return Ae(n),re(vp,r)?(n.enumerable?(re(e,rp)&&e[rp][r]&&(e[rp][r]=!1),n=En(n,{enumerable:d(0,!1)})):(re(e,rp)||hp(e,rp,d(1,{})),e[rp][r]=!0),bp(e,r,n)):hp(e,r,n)},Sp=function(e,t){Ae(e);var n=x(t),r=hn(n).concat(Op(n));return np(r,(function(t){s&&!l(kp,n,t)||wp(e,t,n[t])})),e},kp=function(e){var t=ve(e),n=l(dp,this,t);return!(this===ap&&re(vp,t)&&!re(mp,t))&&(!(n||!re(this,t)||!re(vp,t)||re(this,rp)&&this[rp][t])||n)},Tp=function(e,t){var n=x(e),r=ve(t);if(n!==ap||!re(vp,r)||re(mp,r)){var i=fp(n,r);return!i||!re(vp,r)||re(n,rp)&&n[rp][r]||(i.enumerable=!0),i}},Ap=function(e){var t=pp(x(e)),n=[];return np(t,(function(e){re(vp,e)||re(He,e)||gp(n,e)})),n},Op=function(e){var t=e===ap,n=pp(t?mp:x(e)),r=[];return np(n,(function(e){!re(vp,e)||t&&!re(ap,e)||gp(r,vp[e])})),r};j||(cp=(sp=function(){if(C(cp,this))throw up("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ha(arguments[0]):void 0,t=se(e),n=function(e){this===ap&&l(n,mp,e),re(this,rp)&&re(this[rp],t)&&(this[rp][t]=!1),bp(this,t,d(1,e))};return s&&_p&&bp(ap,t,{configurable:!0,set:n}),Ep(t,e)}).prototype,tt(cp,"toString",(function(){return op(this).tag})),tt(sp,"withoutSetter",(function(e){return Ep(se(e),e)})),p.f=kp,De.f=wp,dn.f=Sp,we.f=Tp,_t.f=Vr.f=Ap,bt.f=Op,Yh.f=function(e){return Ep(he(e),e)},s&&(hp(cp,"description",{configurable:!0,get:function(){return op(this).description}}),tt(ap,"propertyIsEnumerable",kp,{unsafe:!0}))),Mt({global:!0,constructor:!0,wrap:!0,forced:!j,sham:!j},{Symbol:sp}),np(hn(yp),(function(e){tp(e)})),Mt({target:"Symbol",stat:!0,forced:!j},{useSetter:function(){_p=!0},useSimple:function(){_p=!1}}),Mt({target:"Object",stat:!0,forced:!j,sham:!s},{create:function(e,t){return void 0===t?En(e):Sp(En(e),t)},defineProperty:wp,defineProperties:Sp,getOwnPropertyDescriptor:Tp}),Mt({target:"Object",stat:!0,forced:!j},{getOwnPropertyNames:Ap}),function(){var e=M("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=he("toPrimitive");t&&!t[r]&&tt(t,r,(function(e){return l(n,this)}),{arity:1})}(),Vn(sp,"Symbol"),He[rp]=!0;var xp=j&&!!Symbol.for&&!!Symbol.keyFor,Ip=Z("string-to-symbol-registry"),Dp=Z("symbol-to-string-registry");Mt({target:"Symbol",stat:!0,forced:!xp},{for:function(e){var t=ha(e);if(re(Ip,t))return Ip[t];var n=M("Symbol")(t);return Ip[t]=n,Dp[n]=t,n}});var Rp=Z("symbol-to-string-registry");Mt({target:"Symbol",stat:!0,forced:!xp},{keyFor:function(e){if(!K(e))throw TypeError(H(e)+" is not a symbol");if(re(Rp,e))return Rp[e]}});var Mp=M("JSON","stringify"),Cp=_(/./.exec),Pp=_("".charAt),Gp=_("".charCodeAt),Up=_("".replace),Np=_(1..toString),Bp=/[\uD800-\uDFFF]/g,Lp=/^[\uD800-\uDBFF]$/,jp=/^[\uDC00-\uDFFF]$/,Vp=!j||a((function(){var e=M("Symbol")();return"[null]"!=Mp([e])||"{}"!=Mp({a:e})||"{}"!=Mp(Object(e))})),zp=a((function(){return'"\\udf06\\ud834"'!==Mp("\udf06\ud834")||'"\\udead"'!==Mp("\udead")})),Kp=function(e,t){var n=br(arguments),r=t;if((D(t)||void 0!==e)&&!K(e))return Gt(t)||(t=function(e,t){if(I(r)&&(t=l(r,this,e,t)),!K(t))return t}),n[1]=t,Ui(Mp,null,n)},qp=function(e,t,n){var r=Pp(n,t-1),i=Pp(n,t+1);return Cp(Lp,e)&&!Cp(jp,i)||Cp(jp,e)&&!Cp(Lp,r)?"\\u"+Np(Gp(e,0),16):e};Mp&&Mt({target:"JSON",stat:!0,arity:3,forced:Vp||zp},{stringify:function(e,t,n){var r=br(arguments),i=Ui(Vp?Kp:Mp,null,r);return zp&&"string"==typeof i?Up(i,Bp,qp):i}});var Hp=!j||a((function(){bt.f(1)}));Mt({target:"Object",stat:!0,forced:Hp},{getOwnPropertySymbols:function(e){var t=bt.f;return t?t(te(e)):[]}});var Fp=De.f,Jp=o.Symbol,Wp=Jp&&Jp.prototype;if(s&&I(Jp)&&(!("description"in Wp)||void 0!==Jp().description)){var $p={},Xp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:ha(arguments[0]),t=C(Wp,this)?new Jp(e):void 0===e?Jp():Jp(e);return""===e&&($p[t]=!0),t};St(Xp,Jp),Xp.prototype=Wp,Wp.constructor=Xp;var Qp="Symbol(test)"==String(Jp("test")),Yp=_(Wp.toString),Zp=_(Wp.valueOf),ed=/^Symbol\((.*)\)[^)]+$/,td=_("".replace),nd=_("".slice);Fp(Wp,"description",{configurable:!0,get:function(){var e=Zp(this),t=Yp(e);if(re($p,e))return"";var n=Qp?nd(t,7,-1):td(t,ed,"$1");return""===n?void 0:n}}),Mt({global:!0,constructor:!0,forced:!0},{Symbol:Xp})}tp("iterator");var rd=P.match(/firefox\/(\d+)/i),id=!!rd&&+rd[1],od=/MSIE|Trident/.test(P),ad=P.match(/AppleWebKit\/(\d+)\./),sd=!!ad&&+ad[1],cd=[],ud=_(cd.sort),ld=_(cd.push),fd=a((function(){cd.sort(void 0)})),hd=a((function(){cd.sort(null)})),pd=rn("sort"),dd=!a((function(){if(L)return L<70;if(!(id&&id>3)){if(od)return!0;if(sd)return sd<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)cd.push({k:t+r,v:n})}for(cd.sort((function(e,t){return t.v-e.v})),r=0;r<cd.length;r++)t=cd[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));Mt({target:"Array",proto:!0,forced:fd||!hd||!pd||!dd},{sort:function(e){void 0!==e&&J(e);var t=te(this);if(dd)return void 0===e?ud(t):ud(t,e);var n,r,i=[],o=ft(t);for(r=0;r<o;r++)r in t&&ld(i,t[r]);for(Hl(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:ha(t)>ha(n)?1:-1}}(e)),n=i.length,r=0;r<n;)t[r]=i[r++];for(;r<o;)delete t[r++];return t}});var gd=dn.f;Mt({target:"Object",stat:!0,forced:Object.defineProperties!==gd,sham:!s},{defineProperties:gd});var vd=De.f;Mt({target:"Object",stat:!0,forced:Object.defineProperty!==vd,sham:!s},{defineProperty:vd}),function(e){var t=function(){try{return!!Symbol.iterator}catch(e){return!1}}(),n=function(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t&&(n[Symbol.iterator]=function(){return n}),n},r=function(e){return encodeURIComponent(e).replace(/%20/g,"+")},i=function(e){return decodeURIComponent(String(e).replace(/\+/g," "))};(function(){try{var t=e.URLSearchParams;return"a=1"===new t("?a=1").toString()&&"function"==typeof t.prototype.set&&"function"==typeof t.prototype.entries}catch(t){return!1}})()||function(){var i=function e(t){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var n=typeof t;if("undefined"===n);else if("string"===n)""!==t&&this._fromString(t);else if(t instanceof e){var r=this;t.forEach((function(e,t){r.append(t,e)}))}else{if(null===t||"object"!==n)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(t))for(var i=0;i<t.length;i++){var o=t[i];if("[object Array]"!==Object.prototype.toString.call(o)&&2===o.length)throw new TypeError("Expected [string, any] as entry at index "+i+" of URLSearchParams's input");this.append(o[0],o[1])}else for(var a in t)t.hasOwnProperty(a)&&this.append(a,t[a])}},o=i.prototype;o.append=function(e,t){e in this._entries?this._entries[e].push(String(t)):this._entries[e]=[String(t)]},o.delete=function(e){delete this._entries[e]},o.get=function(e){return e in this._entries?this._entries[e][0]:null},o.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]},o.has=function(e){return e in this._entries},o.set=function(e,t){this._entries[e]=[String(t)]},o.forEach=function(e,t){var n;for(var r in this._entries)if(this._entries.hasOwnProperty(r)){n=this._entries[r];for(var i=0;i<n.length;i++)e.call(t,n[i],r,this)}},o.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),n(e)},o.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),n(e)},o.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),n(e)},t&&(o[Symbol.iterator]=o.entries),o.toString=function(){var e=[];return this.forEach((function(t,n){e.push(r(n)+"="+r(t))})),e.join("&")},e.URLSearchParams=i}();var o=e.URLSearchParams.prototype;"function"!=typeof o.sort&&(o.sort=function(){var e=this,t=[];this.forEach((function(n,r){t.push([r,n]),e._entries||e.delete(r)})),t.sort((function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})),e._entries&&(e._entries={});for(var n=0;n<t.length;n++)this.append(t[n][0],t[n][1])}),"function"!=typeof o._fromString&&Object.defineProperty(o,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(e){if(this._entries)this._entries={};else{var t=[];this.forEach((function(e,n){t.push(n)}));for(var n=0;n<t.length;n++)this.delete(t[n])}var r,o=(e=e.replace(/^\?/,"")).split("&");for(n=0;n<o.length;n++)r=o[n].split("="),this.append(i(r[0]),r.length>1?i(r[1]):"")}})}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0),function(e){if(function(){try{var t=new e.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&t.searchParams}catch(t){return!1}}()||function(){var t=e.URL,n=function t(n,r){"string"!=typeof n&&(n=String(n)),r&&"string"!=typeof r&&(r=String(r));var i,o=document;if(r&&(void 0===e.location||r!==e.location.href)){r=r.toLowerCase(),(i=(o=document.implementation.createHTMLDocument("")).createElement("base")).href=r,o.head.appendChild(i);try{if(0!==i.href.indexOf(r))throw new Error(i.href)}catch(t){throw new Error("URL unable to set base "+r+" due to "+t)}}var a=o.createElement("a");a.href=n,i&&(o.body.appendChild(a),a.href=a.href);var s=o.createElement("input");if(s.type="url",s.value=n,":"===a.protocol||!/:/.test(a.href)||!s.checkValidity()&&!r)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:a});var c=new e.URLSearchParams(this.search),u=!0,l=!0,f=this;["append","delete","set"].forEach((function(e){var t=c[e];c[e]=function(){t.apply(c,arguments),u&&(l=!1,f.search=c.toString(),l=!0)}})),Object.defineProperty(this,"searchParams",{value:c,enumerable:!0});var h=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==h&&(h=this.search,l&&(u=!1,this.searchParams._fromString(this.search),u=!0))}})},r=n.prototype;["hash","host","hostname","port","protocol"].forEach((function(e){!function(e){Object.defineProperty(r,e,{get:function(){return this._anchorElement[e]},set:function(t){this._anchorElement[e]=t},enumerable:!0})}(e)})),Object.defineProperty(r,"search",{get:function(){return this._anchorElement.search},set:function(e){this._anchorElement.search=e,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(r,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:!0},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],t=this._anchorElement.port!=e&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(e){},enumerable:!0},username:{get:function(){return""},set:function(e){},enumerable:!0}}),n.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)},n.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)},e.URL=n}(),void 0!==e.location&&!("origin"in e.location)){var t=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:t,enumerable:!0})}catch(n){setInterval((function(){e.location.origin=t()}),100)}}}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0);var md=nn.some,yd=rn("some");Mt({target:"Array",proto:!0,forced:!yd},{some:function(e){return md(this,e,arguments.length>1?arguments[1]:void 0)}});var _d={},bd=[],Ed=function(e){e.length&&e.forEach((function(e){bd.push(e)}))};function wd(e,t,n,r){var i=e&&e.source||window.opener||window.parent,o=e&&e.origin||r||"*",a={type:t,payload:n};i.postMessage(JSON.stringify(a),o)}function Sd(e,t){_d[e]=_d[e]||[],_d[e].push(t)}function kd(e){if(bd.some((function(e){return"*"===e}))||bd.some((function(t){return e.origin.indexOf(t)>-1}))){var t=e.data;if("string"==typeof e.data)try{t=JSON.parse(e.data)}catch(e){t=void 0}if(!t)return;var n=t.type,r=t.payload;_d[n]&&_d[n].forEach((function(t){"function"==typeof t&&t(e,r)}))}}function Td(e,t){var n=Cs({},e);n.filter&&delete n.filter,"object"==typeof n.autotrack&&n.autotrack.collect_url&&delete n.autotrack.collect_url,(window.opener||window.parent).postMessage({type:"tea:sdk:info",config:n,version:t},"*"),window.addEventListener("message",kd,!1)}var Ad="",Od=!1;function xd(e){var t=e.event,n=e.editorUrl;e.collectInstance,e.fromSession,Od||(Od=!0,zc(n,(function(){wd(t,"abEditorScriptloadSuccess")}),(function(){t&&wd(t,"abEditorScriptloadError"),Od=!1})))}var Id;!function(e){e[e.Var=0]="Var",e[e.All=1]="All"}(Id||(Id={}));var Dd=function(){function e(){this.fetchStatus="no",this.refreshFetchStatus="complete",this.versions=[],this.extVersions=[],this.mulilinkVersions=[],this.enable_multilink=!1,this.enable_ab_visual=!1,this.editMode=!1,this.callbacks=[],this.data=null,this.changeListener=new Map,this.readyStatus=!1,this.exposureCache=[]}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_ab_test){var r=t.enable_multilink,i=t.ab_channel_domain,o=t.enable_ab_visual,a=t.ab_cross,s=t.ab_cookie_domain,c=t.disable_ab_reset,u=i||jc(Mu[t.channel||"cn"]),l=e.adapters,f=l.storage,h=l.fetch;this.cacheStorgae=new f(!1),this.fetch=h,this.enable_multilink=r,this.enable_ab_visual=o,this.abKey="__tea_sdk_ab_version_"+t.app_id,this.ab_cross=a,this.ab_cookie_domain=s||"",this.fetchUrl=u+"/service/2/abtest_config/",this.reportUrl=""+e.configManager.getUrl("event"),this.exposureLimit=t.exposure_limit||20,this.ab_batch_time=t.ab_batch_time||500;var p=this.collect.Types;this.types=p,this.collect.on(p.TokenChange,(function(e){c||"uuid"===e&&n.readyStatus&&(n.clearCache(),n.fetchAB())})),this.collect.on(p.AbVar,(function(e){var t=e.name,r=e.defaultValue,i=e.callback;n.getVar(t,r,i)})),this.collect.on(p.AbAllVars,(function(e){n.getAllVars(e)})),this.collect.on(p.AbConfig,(function(e){var t=e.params,r=e.callback;n.getABconfig(t,r)})),this.collect.on(p.AbExternalVersion,(function(e){n.setExternalAbVersion(e)})),this.collect.on(p.AbOpenLayer,(function(){n.openOverlayer()})),this.collect.on(p.AbCloseLayer,(function(){n.closeOverlayer()})),this.collect.on(p.AbVersionChangeOn,(function(e){n.changeListener.set(e,e)})),this.collect.on(p.AbVersionChangeOff,(function(e){n.changeListener.get(e)&&n.changeListener.delete(e)})),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(p.AbReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!Object.keys(n).length)return;var r=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var i in n)r(i)}},e.prototype.loadMode=function(){var e,t,n=function(){try{return JSON.parse(atob(window.name))||void 0}catch(e){return}}(),r="";if(n){var i=n.scenario,o=n.href;i?(this.editMode=!0,r=i):!o||-1===o.indexOf("datatester")&&-1===o.indexOf("visual-editor")||(this.editMode=!0,r="visual-editor")}this.enable_ab_visual&&(function(e,t){window.TEAVisualEditor=window.TEAVisualEditor||{},Ed(["*"]);var n,r="";Td(t,"0.0.1");var i="";try{var o=window.performance.getEntriesByType("resource");if(o&&o.length&&(o.forEach((function(e){"script"===e.initiatorType&&e.name&&-1!==e.name.indexOf("collect")&&(i=e.name)})),i||document.currentScript&&(i=document.currentScript.src),i&&(n=i.split("/"))&&n.length)){r="https:/";for(var a=2;a<n.length&&a!==n.length-1;a++)r=r+"/"+n[a];r+="/visual-ab-core"}}catch(e){}Sd("tea:openVisualABEditor",(function(n){var i=n.data;if("string"==typeof n.data)try{i=JSON.parse(n.data)}catch(e){i=void 0}if(i){var o=i.lang;if(i.appId!==t.app_id)return wd(n,"appIdError"),void console.error("abtest appid is not belong the page appid please check");var a=i.version;Ad=a&&r?r+(a?"."+a:".1.0.1")+".js?query="+Date.now():Cu+"?query="+Date.now(),window.TEAVisualEditor.lang=o,window.TEAVisualEditor.__ab_domin=t.channel_domain||"",xd({event:n,editorUrl:Ad,collectInstance:e})}}))}(this.collect,this.config),"visual-editor"===r)?this.collect.destoryInstace():this.enable_multilink&&(e=this.collect,t=this.config,window.TEAVisualEditor=window.TEAVisualEditor||{},window.TEAVisualEditor.appId=t.app_id,Sd("tea:openTesterEventInspector",(function(t){var n=t.data;if("string"==typeof t.data)try{n=JSON.parse(t.data)}catch(e){n=void 0}if(n){var r=n.referrer,i=n.lang,o=n.appId;window.TEAVisualEditor.__editor_ajax_domain=r||"",window.TEAVisualEditor.__ab_appId=o||"",window.TEAVisualEditor.lang=i||"",xd({event:t,editorUrl:"https://lf3-data.volccdn.com/obj/data-static/log-sdk/collect/tester-event-inspector.js?query="+Date.now(),collectInstance:e})}})))},e.prototype.checkLocal=function(){var e=this.getABCache(),t=e.ab_version,n=e.ab_ext_version,r=e.ab_version_multilink,i=e.data,o=this.checkFromUrl();o?this.mulilinkVersions.push(o):this.mulilinkVersions=r||[],this.extVersions=n||[],this.versions=t||[],this.data=i;var a=this.versions.concat(this.extVersions);this.enable_multilink&&(a=a.concat(this.mulilinkVersions)),this.configVersions(a.join(","))},e.prototype.checkFromUrl=function(){var e=Hc(window.location.href);return e&&e.vid?e.vid:""},e.prototype.updateVersions=function(){var e=this.extVersions.length?this.versions.concat(this.extVersions):this.versions;this.enable_multilink&&(e=e.concat(this.mulilinkVersions)),this.configVersions(e.join(",")),this.updateABCache(),this.changeListener.size>0&&this.changeListener.forEach((function(t){"function"==typeof t&&t(e)}))},e.prototype.configVersions=function(e){this.collect.configManager.setAbVersion(e)},e.prototype.getVar=function(e,t,n){if(!e)throw new Error("variable must not be empty");if(void 0===t)throw new Error("variable no default value");if("function"!=typeof n)throw new Error("callback must be a function");var r={name:e,defaultValue:t,callback:n,type:Id.Var};"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealVar(r,e):this.callbacks.push(r)},e.prototype.getRealVar=function(e,t){var n=e.name,r=e.defaultValue,i=e.callback,o=this.data;if(o){if(Nc(o[n])){var a=o[n].vid;return"$ab_url"===t?this.mulilinkVersions.includes(a)||this.mulilinkVersions.push(a):this.versions.includes(a)||this.versions.push(a),this.updateVersions(),this.fechEvent(a,t,r),i(o[n].val),void this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 曝光了实验"+n,level:"info",time:Date.now(),data:o[n]})}this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 调用getVar",level:"info",time:Date.now(),data:r}),i(r)}else i(r)},e.prototype.getAllVars=function(e){if("function"!=typeof e)throw new Error("callback must be a function");var t={callback:e,type:Id.All};"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealAllVars(t):this.callbacks.push(t)},e.prototype.getRealAllVars=function(e){(0,e.callback)(this.data?JSON.parse(JSON.stringify(this.data)):{}),this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 调用getAllVars",level:"info",time:Date.now(),data:this.data})},e.prototype.fechEvent=function(e,t,n){try{if(this.config.disable_track_event)return;if(!e)return;var r=this.collect.configManager.get(),i=r.header,o=r.user,a=this.getABCache();if(a&&a.uuid&&a.uuid!==o.user_unique_id)return;var s={event:"abtest_exposure",ab_sdk_version:""+e,params:JSON.stringify({app_id:this.config.appId,ab_url:"$ab_url"===t?n:window.location.href}),local_time_ms:Date.now()};i.custom=JSON.stringify(i.custom);var c={events:[s],user:o,header:i};"$ab_url"===t&&window.navigator.sendBeacon?window.navigator.sendBeacon(this.reportUrl,JSON.stringify([c])):this.reportExposure(c)}catch(e){this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}},e.prototype.reportExposure=function(e){var t=this;this.exposureCache.push(e),this.reportTimeout&&clearTimeout(this.reportTimeout),this.exposureCache.length>=this.exposureLimit?this.report():this.reportTimeout=setTimeout((function(){t.report(),clearTimeout(t.reportTimeout)}),this.ab_batch_time)},e.prototype.report=function(){var e=this;this.fetch(this.reportUrl,this.exposureCache,2e4),this.exposureCache.forEach((function(t){e.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:[t],code:200,status:"success"})})),this.exposureCache=[]},e.prototype.setExternalAbVersion=function(e){this.extVersions=[e],this.updateVersions()},e.prototype.getABconfig=function(e,t){var n=Object.keys(e);n&&n.length&&this.collect.configManager.set(e),this.fetchAB(t)},e.prototype.get=function(e){if(this.ab_cross){var t=this.cacheStorgae.getCookie(e,this.ab_cookie_domain);return t?JSON.parse(t):null}return this.cacheStorgae.getItem(e)},e.prototype.set=function(e,t){this.ab_cross?this.cacheStorgae.setCookie(e,t,2592e6,this.ab_cookie_domain):this.cacheStorgae.setItem(e,t),this.collect.configManager.setAbCache(t)},e.prototype.getABCache=function(e){var t={ab_version:[],ab_ext_version:[],ab_version_multilink:[],data:null,timestamp:+new Date,uuid:""};return t=this.get(this.abKey)||t,Date.now()-t.timestamp>=2592e6?(this.cacheStorgae.removeItem(this.abKey),null):e?t[e]:t},e.prototype.updateABCache=function(){var e=this.getABCache();e.ab_version_multilink=this.mulilinkVersions,e.ab_ext_version=this.extVersions,e.ab_version=this.versions,e.timestamp=Date.now(),this.set(this.abKey,e)},e.prototype.setAbCache=function(e){var t=this.getABCache();t.data=this.data,t.uuid=e,t.timestamp=Date.now(),this.set(this.abKey,t)},e.prototype.clearCache=function(){this.refreshFetchStatus="ing",this.data={},this.extVersions=[],this.mulilinkVersions=[],this.versions=[]},e.prototype.openOverlayer=function(e){var t=this;if(function(){if(!document.getElementById(Qh)){var e="body { opacity: 0 !important; }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id=Qh,n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(),e)var n=setTimeout((function(){t.closeOverlayer(),clearTimeout(n)}),e)},e.prototype.closeOverlayer=function(){var e;(e=document.getElementById(Qh))&&e.parentElement.removeChild(e)},e.prototype.fetchComplete=function(e,t){var n=this;if(e&&"[object Object]"==Object.prototype.toString.call(e)){this.data=e,this.setAbCache(t);var r=[];Object.keys(e).forEach((function(t){var n=e[t].vid;n&&r.push(n)})),this.versions=this.versions.filter((function(e){return r.includes(e)}));var i=e.$ab_url,o=e.$ab_modification;if(o&&o.val&&this.enable_ab_visual){if(this.collect.destroyInstance)return;this.getVar("$ab_modification",window.location.href,(function(){var e;e=o.val,window.TEAVisualEditor=window.TEAVisualEditor||{},window.TEAVisualEditor.__ab_config=e,zc("https://lf3-data.volccdn.com/obj/data-static/log-sdk/collect/visual-ab-loader.js?query="+Date.now(),(function(){console.log("load visual render success")}),(function(){console.log("load visual render fail")})),n.closeOverlayer()}))}else if(i&&this.enable_multilink){this.mulilinkVersions=this.mulilinkVersions.filter((function(e){return r.includes(e)}));var a=i.val,s=i.vid;a&&s&&this.getVar("$ab_url",a,(function(){n.editMode||(a!==window.location.href?setTimeout((function(){if(!n.collect.destroyInstance){var e=""+a;e=-1===e.indexOf("http")?"https://"+e:e;var t=qc(e).host;try{var r=new URL(e);t!==location.host?r.searchParams.append("vid",s):window.history.replaceState("","",e),window.location.href=r.href}catch(t){window.location.href=e}}}),100):n.closeOverlayer())}))}this.updateVersions()}else this.closeOverlayer();this.callbacks.forEach((function(e){return n[e.type===Id.Var?"getRealVar":"getRealAllVars"](e,"")})),this.callbacks=[]},e.prototype.fetchAB=function(e){var t=this,n=this.collect.configManager.get(),r={header:Cs({aid:this.config.app_id},n.user||{},n.header||{},{ab_sdk_version:this.collect.configManager.getAbVersion(),ab_url:window.location.href})};this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 发起AB实验请求",level:"info",logType:"fetch",time:Date.now(),data:r}),this.fetch(this.fetchUrl,r,this.config.ab_timeout||3e3,!1,(function(r){t.fetchStatus="complete",t.refreshFetchStatus="complete";var i=r.data;"success"===r.message?(t.fetchComplete(i,n.user.user_unique_id),e&&e(i)):(t.fetchComplete(null,n.user.user_unique_id),e&&e(null)),t.collect.emit(t.types.AbComplete,i),t.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"AB实验请求成功",level:"info",logType:"fetch",time:Date.now(),data:i})}),(function(){t.fetchStatus="complete",t.refreshFetchStatus="complete",t.fetchComplete(null,n.user.user_unique_id),e&&e(null),t.collect.emit(t.types.AbTimeout),t.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"AB实验请求网络异常",level:"error",logType:"fetch",time:Date.now()})}))},e.prototype.filterUrl=function(e){try{var t="";-1!==e.indexOf("&multilink=true")?t="&multilink=true[\0-ÿ]*":-1!==e.indexOf("?multilink=true")&&(t="\\?multilink=true[\0-ÿ]*");var n=new RegExp(t,"g");e=e.replace(n,"")}catch(e){}return e},e}(),Rd=o.Function,Md=_([].concat),Cd=_([].join),Pd={},Gd=function(e,t,n){if(!re(Pd,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Pd[t]=Rd("C,a","return new C("+Cd(r,",")+")")}return Pd[t](e,n)},Ud=c?Rd.bind:function(e){var t=J(this),n=t.prototype,r=br(arguments,1),i=function(){var n=Md(r,br(arguments));return this instanceof i?Gd(t,n.length,n):t.apply(e,n)};return D(n)&&(i.prototype=n),i};Mt({target:"Function",proto:!0,forced:Function.bind!==Ud},{bind:Ud});var Nd=function(){function e(e,t){this.maxDuration=432e5,this.aliveDTime=6e4,this.options={aliveName:"predefine_page_alive",params:{}},this.collect=e,this.config=t,this.pageStartTime=Date.now(),this.sessionStartTime=this.pageStartTime,this.timerHandler=null,Nc(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration))}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageAlive()},e.prototype.disable=function(){this.disableCallback(),this.pageStartTime=Date.now()},e.prototype.sendEvent=function(e,t){void 0===t&&(t=!1);var n=t?this.aliveDTime:Date.now()-this.sessionStartTime;n<0||n>this.aliveDTime||Date.now()-this.pageStartTime>this.maxDuration||(this.collect.beconEvent(this.options.aliveName,Cs({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),duration:n,is_support_visibility_change:Kc(),startTime:this.sessionStartTime,hidden:document.visibilityState,leave:e},this.options.params)),this.sessionStartTime=Date.now())},e.prototype.getParams=function(e){switch(e){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.prototype.setUpTimer=function(){var e=this;return this.timerHandler&&clearInterval(this.timerHandler),setInterval((function(){Date.now()-e.sessionStartTime>e.aliveDTime&&e.sendEvent(!1,!0)}),1e3)},e.prototype.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.prototype.beforeunload=function(){document.hidden||this.sendEvent(!0)},e.prototype.enablePageAlive=function(){var e=this;this.timerHandler=this.setUpTimer();var t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),Vc(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e}(),Bd=function(){function e(e,t){var n=this;this.maxDuration=432e5,this.aliveDTime=6e4,this.options={closeName:"predefine_page_close",params:{}},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())},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(e){}}n.sendEventPageClose()},this.collect=e,this.config=t,this.maxDuration=t.maxDuration||864e5,this.pageStartTime=Date.now(),Nc(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration)),this.resetData()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageClose()},e.prototype.disable=function(){this.disableCallback()},e.prototype.resetData=function(){this.activeStartTime=void 0===this.activeStartTime?this.pageStartTime:Date.now(),this.activeEndTime=void 0,this.activeTimes=1,this.totalTime=0},e.prototype.sendEventPageClose=function(){var e=Date.now()-this.pageStartTime;this.totalTime<0||e<0||this.totalTime>=this.maxDuration||(this.collect.beconEvent(this.options.closeName,Cs({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),active_times:this.activeTimes,duration:this.totalTime,total_duration:e,is_support_visibility_change:Kc()},this.options.params)),this.pageStartTime=Date.now(),this.resetData())},e.prototype.getParams=function(e){switch(e){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.prototype.enablePageClose=function(){var e=this,t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),Vc(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e}(),Ld=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_stay_duration){this.title=document.title||location.pathname,this.url=location.href,this.url_path=location.pathname,this.pageAlive=new Nd(e,t),this.pageClose=new Bd(e,t);var r=this.collect.Types;this.collect.on(r.ResetStay,(function(e){var t=e.url_path,r=e.title,i=e.url;n.resetStayDuration(t,r,i)})),this.collect.on(r.RouteChange,(function(e){e.init||t.disable_route_report||n.resetStayDuration()})),this.collect.on(r.SetStay,(function(e){var t=e.url_path,r=e.title,i=e.url;n.setStayParmas(t,r,i)})),this.enable(this.url_path,this.title,this.url),this.ready(r.Stay),this.collect.emit(r.StayReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!Object.keys(n).length)return;var r=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var i in n)r(i)}},e.prototype.enable=function(e,t,n){this.pageAlive.enable(e,t,n),this.pageClose.enable(e,t,n)},e.prototype.disable=function(){this.pageAlive.disable(),this.pageClose.disable()},e.prototype.setStayParmas=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.pageAlive.setParams(e,t,n),this.pageClose.setParams(e,t,n),this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行 resetStayParams",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e.prototype.reset=function(e,t,n){this.disable(),this.enable(e,t,n)},e.prototype.resetStayDuration=function(e,t,n){this.reset(e,t,n),this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"SDK 执行 resetStayDuration",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e}(),jd=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.duration=6e4,this.reportUrl=e.configManager.getDomain()+"/profile/list";var r=e.Types,i=e.adapters.fetch;this.eventCheck=new Pu(e,t),this.fetch=i,this.cache={},this.collect.on(r.ProfileSet,(function(e){n.setProfile(e)})),this.collect.on(r.ProfileSetOnce,(function(e){n.setOnceProfile(e)})),this.collect.on(r.ProfileUnset,(function(e){n.unsetProfile(e)})),this.collect.on(r.ProfileIncrement,(function(e){n.incrementProfile(e)})),this.collect.on(r.ProfileAppend,(function(e){n.appendProfile(e)})),this.collect.on(r.ProfileClear,(function(){n.cache={}})),this.ready(r.Profile)},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!Object.keys(n).length)return;var r=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var i in n)r(i)}},e.prototype.report=function(e,t){void 0===t&&(t={});try{if(this.config.disable_track_event)return;var n=[];n.push(this.collect.processEvent(e,t));var r=this.collect.eventManager.merge(n,!0);this.fetch(this.reportUrl,r),this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:r,code:200,status:"success"})}catch(e){this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}},e.prototype.setProfile=function(e){var t=this.formatParams(e);t&&Object.keys(t).length&&(this.pushCache(t),this.report("__profile_set",Cs({},t,{profile:!0})))},e.prototype.setOnceProfile=function(e){var t=this.formatParams(e,!0);t&&Object.keys(t).length&&(this.pushCache(t),this.report("__profile_set_once",Cs({},t,{profile:!0})))},e.prototype.incrementProfile=function(e){e?this.report("__profile_increment",Cs({},e,{profile:!0})):console.warn("please check the params, must be object!!!")},e.prototype.unsetProfile=function(e){if(e){var t={};t[e]="1",this.report("__profile_unset",Cs({},t,{profile:!0}))}else console.warn("please check the key, must be string!!!")},e.prototype.appendProfile=function(e){if(e){var t={};for(var n in e)"string"==typeof e[n]||"Array"===Object.prototype.toString.call(e[n]).slice(8,-1)?t[n]=e[n]:console.warn("please check the value of param: "+n+", must be string or array !!!");Object.keys(t).length&&this.report("__profile_append",Cs({},t,{profile:!0}))}else console.warn("please check the params, must be object!!!")},e.prototype.pushCache=function(e){var t=this;Object.keys(e).forEach((function(n){t.cache[n]={val:t.clone(e[n]),timestamp:Date.now()}}))},e.prototype.formatParams=function(e,t){var n=this;void 0===t&&(t=!1);try{if(!e||"[object Object]"!==Object.prototype.toString.call(e))return void console.warn("please check the params type, must be object !!!");var r={};for(var i in e)"string"==typeof e[i]||"number"==typeof e[i]||"Array"===Object.prototype.toString.call(e[i]).slice(8,-1)?r[i]=e[i]:console.warn("please check the value of params:"+i+", must be string,number,Array !!!");var o=Object.keys(r);if(!o.length)return;var a=Date.now();return o.filter((function(r){var i=n.cache[r];return t?!i:!(i&&n.compare(i.val,e[r])&&a-i.timestamp<n.duration)})).reduce((function(e,t){return e[t]=r[t],e}),{})}catch(e){this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message}),console.log("error")}},e.prototype.compare=function(e,t){try{return JSON.stringify(e)===JSON.stringify(t)}catch(e){return this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message}),!1}},e.prototype.clone=function(e){try{return JSON.parse(JSON.stringify(e))}catch(t){return this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),e}},e.prototype.unReady=function(){console.warn("sdk is not ready, please use this api after start")},e}(),Vd=function(){function e(){var e=this;this.setInterval=function(){e.clearIntervalFunc=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=1e3);var n,r=Date.now()+t;return n=window.setTimeout((function i(){var o=Date.now()-r;e(),r+=t,n=window.setTimeout(i,Math.max(0,t-o))}),t),function(){window.clearTimeout(n)}}((function(){e.isSessionhasEvent&&e.endCurrentSession()}),e.sessionInterval)},this.clearInterval=function(){e.clearIntervalFunc&&e.clearIntervalFunc()}}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,!t.disable_heartbeat){this.sessionInterval=6e4,this.startTime=0,this.lastTime=0,this.setInterval();var r=this.collect.Types;this.collect.on(r.SessionReset,(function(){n.process()}))}},e.prototype.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.prototype.process=function(){this.isSessionhasEvent||(this.isSessionhasEvent=!0,this.startTime=+new Date);var e=this.lastTime||+new Date;this.lastTime=+new Date,this.lastTime-e>this.sessionInterval&&(this.clearInterval(),this.endCurrentSession(),this.setInterval())},e}(),zd=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,!this.config.channel_domain&&!this.config.disable_track_event&&!this.config.disable_sdk_monitor){var r=e.adapters.fetch;this.fetch=r,this.url=e.configManager.getUrl("event");var i=this.collect.Types;this.collect.on(i.Ready,(function(){n.sdkOnload()})),this.collect.on(i.SubmitError,(function(e){var t=e.type,r=e.eventData,i=e.errorCode;"f_data"===t&&n.sdkError(r,i)}))}},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),n=t.header,r=t.user,i=n.app_id,o=n.app_name,a=n.sdk_version,s=r.web_id,c={events:[{event:"onload",params:JSON.stringify({app_id:i,app_name:o||"",sdk_version:a,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOB"}),local_time_ms:Date.now()}],user:{user_unique_id:s},header:{}};setTimeout((function(){e.fetch(e.url,[c],3e4,!1,(function(){}),(function(){}),"566f58151b0ed37e")}),16)}catch(e){}},e.prototype.sdkError=function(e,t){var n=this;try{var r=e[0],i=r.user,o=r.header,a=[];e.forEach((function(e){e.events.forEach((function(e){a.push(e)}))}));var s={events:a.map((function(e){return{event:"on_error",params:JSON.stringify({error_code:t,app_id:o.app_id,app_name:o.app_name||"",error_event:e.event,sdk_version:o.sdk_version,local_time_ms:e.local_time_ms,tea_event_index:Date.now(),params:e.params,header:JSON.stringify(o),user:JSON.stringify(i)}),local_time_ms:Date.now()}})),user:{user_unique_id:i.user_unique_id},header:{}};setTimeout((function(){n.fetch(n.url,[s],3e4,!1,(function(){}),(function(){}),"566f58151b0ed37e")}),16)}catch(e){}},e}();function Kd(e,t){if(void 0===t&&(t="list"),!e)return!1;if(t&&"list"===t){if(["LI","TR","DL"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaIdx"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-idx"))return!0}else{if(["A","BUTTON"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaContainer"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-container"))return!0;if(e.hasAttribute&&Wd(e,"ss"))return!0}return!1}var qd=function(e,t){return!!Wd(e,t)};function Hd(e){for(var t=e;t&&!Kd(t,"container");){if("HTML"===t.nodeName||"BODY"===t.nodeName)return e;t=t.parentElement}return t||e}function Fd(e){var t="";return 3===e.nodeType?t=e.textContent.trim():e.dataset&&e.dataset.hasOwnProperty("teaTitle")||e.hasAttribute("ata-tea-title")?t=e.getAttribute("data-tea-title"):e.hasAttribute("title")?t=e.getAttribute("title"):"INPUT"===e.nodeName&&["button","submit"].includes(e.getAttribute("type"))?t=e.getAttribute("value"):"IMG"===e.nodeName&&e.getAttribute("alt")&&(t=e.getAttribute("alt")),t.slice(0,200)}var Jd=function(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0},Wd=function(e,t){if("string"==typeof t)return Jd(e,t);if(Bc(t)){for(var n=!1,r=0;r<t.length;r++){if(Jd(e,t[r])){n=!0;break}}return n}};var $d=function(){function e(e,t,n){var r=this;this.clickEvent=function(e){(function(e,t){if(1!==e.nodeType)return!1;if(!t.svg&&function(e){if("svg"===e.tagName.toLowerCase())return!0;for(var t=e.parentElement,n=!1;t;)"svg"===t.tagName.toLowerCase()?(t=null,n=!0):t=t.parentElement;return n}(e))return!1;if(["HTML","BODY"].includes(e.tagName.toUpperCase()))return!1;var n=e;return!!("none"!==n.style.display&&(Kd(n,"container")||t.track_attr&&qd(n,t.track_attr)||function(e){if(e.children.length){var t=e.children;return![].slice.call(t).some((function(e){return e.children.length>0}))}return!0}(n)))})(e.target,r.options)&&r.eventHandel({eventType:"dom",eventName:"click"},e)},this.changeEvent=function(e){r.eventHandel({eventType:"dom",eventName:"change"},e)},this.submitEvent=function(e){r.eventHandel({eventType:"dom",eventName:"submit"},e)},this.getPageViewEvent=function(e,t){t&&"pushState"===t&&r.eventHandel({eventType:"dom",eventName:"beat"},Cs({beat_type:0},e)),r.eventHandel({eventType:"dom",eventName:"page_view"},e)},this.getPageLoadEvent=function(e){r.eventHandel({eventType:"dom",eventName:"page_statistics"},{lcp:e})},this.config=n.getConfig().eventConfig,this.collect=t,this.options=e,this.beatTime=e.beat,this.statistics=!1}return e.prototype.init=function(e){this.eventHandel=e;var t=this.config.mode;this.addListener(t)},e.prototype.addListener=function(e){var t=this;if("proxy-capturing"===e&&(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(e){var n=e.config,r=e.name;t.getPageViewEvent(n,r)})),this.config.beat)){try{"complete"===document.readyState?this.beatEvent(this.beatTime):window.addEventListener("load",(function(){t.beatEvent(t.beatTime)}));var n=0,r=null;window.addEventListener("scroll",(function(){clearTimeout(r),r=setTimeout(i,500),n=document.documentElement.scrollTop||document.body.scrollTop}));var i=function(){(document.documentElement.scrollTop||document.body.scrollTop)==n&&t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:1})}}catch(e){}try{var o=window.performance&&window.performance.getEntriesByType("paint");if(o&&o.length){var a=new PerformanceObserver((function(e){var n=e.getEntries(),r=n[n.length-1],i=r.renderTime||r.loadTime;t.statistics||(t.getPageLoadEvent(i),t.statistics=!0)}));a.observe({entryTypes:["largest-contentful-paint"]}),setTimeout((function(){t.statistics||(t.getPageLoadEvent(o[0].startTime||0),t.statistics=!0)}),2e3)}else this.getPageLoadEvent(0)}catch(e){this.getPageLoadEvent(0)}}},e.prototype.removeListener=function(){window.document.removeEventListener("click",this.clickEvent,!0),window.document.removeEventListener("change",this.changeEvent,!0),window.document.removeEventListener("submit",this.submitEvent,!0)},e.prototype.beatEvent=function(e){var t=this;try{var n;this.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:3}),this.beatTime&&(n=setInterval((function(){t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:2})}),e)),Vc((function(){t.eventHandel({eventType:"dom",eventName:"beat",eventSend:"becon"},{beat_type:0}),t.beatTime&&clearInterval(n)}))}catch(e){}},e}(),Xd={eventConfig:{mode:"proxy-capturing",submit:!1,click:!0,change:!1,pv:!0,beat:!0,hashTag:!1,impr:!1},scoutConfig:{mode:"xpath"}},Qd=function(){function e(e,t){this.config=e,this.config.eventConfig=Object.assign(this.config.eventConfig,t)}return e.prototype.getConfig=function(){return this.config},e.prototype.setConfig=function(e){return this.config=e},e}();function Yd(e){for(var t=[];null!==e.parentElement;)t.push(e),e=e.parentElement;var n=[],r=[];return t.forEach((function(e){var t=function(e){if(null===e)return{str:"",index:0};var t=0,n=e.parentElement;if(n)for(var r=n.children,i=0;i<r.length&&r[i]!==e;i++)r[i].nodeName===e.nodeName&&t++;return{str:[e.nodeName.toLowerCase(),Kd(e,"list")?"[]":""].join(""),index:t}}(e),i=t.str,o=t.index;n.unshift(i),r.unshift(o)})),{element_path:"/"+n.join("/"),positions:r}}function Zd(e,t,n,r){var i={},o=function(e){if(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return{left:t.left,top:t.top,element_width:n,element_height:r}}}(t),a=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var n=e.clientX,r=e.clientY,i=t.left,o=t.top,a=n-i>=0?n-i:0,s=r-o>=0?r-o:0;return{touch_x:Math.floor(a),touch_y:Math.floor(s)}}(e,o),s=o.element_width,c=o.element_height,u=a.touch_x,l=a.touch_y,f=Yd(t),h=f.element_path,p=f.positions,d=function(e){var t=Hd(e),n=[];return function e(t){var r=Fd(t);if(r&&-1===n.indexOf(r)&&n.push(r),t.childNodes.length>0)for(var i=t.childNodes,o=0;o<i.length;o++)8!==i[o].nodeType&&e(i[o])}(t),n}(t),g=window.performance.timing.navigationStart,v=Date.now()-g,m=p.map((function(e){return""+e})),y=null;if(window.TEAVisualEditor.getOriginXpath&&(y=window.TEAVisualEditor.getOriginXpath({xpath:h,positions:m})),i.element_path=y&&y.xpath||h,i.positions=y&&y.positions||m,r&&!r.text&&(i.texts=d,i.element_title=function(e){var t=Hd(e),n="";return function e(t){var r=Fd(t);if(r&&(n+=r),t.childNodes.length>0)for(var i=t.childNodes,o=0;o<i.length;o++)3===i[o].nodeType&&e(i[o])}(t),n}(t)),i.element_id=t.getAttribute("id")||"",i.element_class_name=t.getAttribute("class")||"",i.element_type=t.nodeType,i.element_width=Math.floor(s),i.element_height=Math.floor(c),i.touch_x=u,i.touch_y=l,i.page_manual_key="",i.elememt_manual_key="",i.since_page_start_ms=v,i.page_start_ms=g,i.page_path=location.pathname,i.page_host=location.host,n.track_attr&&qd(t,n.track_attr)){var _=function(e,t){var n={};if("string"==typeof t)Jd(e,t)&&(n.attrs=e.getAttribute(t));else if(Bc(t))for(var r=0;r<t.length;r++)Jd(e,t[r])&&(n[t[r]]=e.getAttribute(t[r]));return n}(t,n.track_attr);for(var b in _)i[b]=_[b]}var E=Hd(t);return"A"===E.tagName&&(i.href=E.getAttribute("href")),"IMG"===t.tagName&&(i.src=t.getAttribute("src")),i}var eg=function(e,t,n,r,i){return Cs({event:e},Zd(t,n,r,i),{is_html:1,page_key:window.location.href,page_title:document.title})},tg=function(){function e(e,t){this.ignore={text:!1},this.initConfig=e,this.options=t,this.eventName=t&&"tea"===t.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"},t&&!1===t.text&&(this.ignore.text=!0),t&&t.exposure&&t.exposure.eventName&&(this.eventName.exposure=t.exposure.eventName)}return e.prototype.handleEvent=function(e,t){try{if(function(e){for(var t=e;t&&t.parentNode;){if(t.hasAttribute("data-tea-ignore"))return!0;if("HTML"===t.nodeName||"body"===t.nodeName)return!1;t=t.parentNode}return!1}(e.target))return null;var n="bav2b_click";switch(t){case"click":return n=this.eventName.click,eg(n,e,e.target,this.options,this.ignore);case"exposure":return n=this.eventName.exposure,eg(n,e,e.target,this.options,this.ignore);case"change":return Cs({},eg(n="bav2b_change",e,e.target,this.options),function(e,t){try{if("bav2b_change"===e)return t.hasAttribute("data-tea-track")?{value:t.value}:{}}catch(e){return{}}}(n,e.target));case"submit":return eg(n="bav2b_submit",e,e.target,this.options)}}catch(e){return console.error(e),null}},e.prototype.handleViewEvent=function(e){e.event=this.eventName.page,e.page_title=document.title,e.page_total_width=window.innerWidth,e.page_total_height=window.innerHeight;try{var t=window.sessionStorage.getItem("_tea_cache_duration");if(t){var n=JSON.parse(t);e.refer_page_duration_ms=n?n.duration:""}e.scroll_width=document.documentElement.scrollLeft?document.documentElement.scrollLeft+window.innerWidth:window.innerWidth,e.scroll_height=document.documentElement.scrollTop?document.documentElement.scrollTop+window.innerHeight:window.innerHeight,e.page_start_ms=window.performance.timing.navigationStart}catch(e){console.log("page event error "+JSON.stringify(e))}return e},e.prototype.handleStatisticsEvent=function(e){var t={};t.event=this.eventName.static,t.is_html=1,t.page_key=location.href,t.refer_page_key=document.referrer||"",t.page_title=document.title,t.page_manual_key=this.initConfig.autotrack.page_manual_key||"",t.refer_page_manual_key="";try{var n=e.lcp,r=window.performance.timing,i=r.loadEventEnd-r.navigationStart;t.page_init_cost_ms=parseInt(n||(i>0?i:0)),t.page_start_ms=r.navigationStart}catch(e){console.log("page_statistics event error "+JSON.stringify(e))}return t},e.prototype.handleBeadtEvent=function(e){e.event=this.eventName.beat,e.page_key=window.location.href,e.is_html=1,e.page_title=document.title,e.page_manual_key=this.initConfig.autotrack.page_manual_key||"";try{e.page_viewport_width=window.innerWidth,e.page_viewport_height=window.innerHeight,e.page_total_width=document.documentElement.scrollWidth,e.page_total_height=document.documentElement.scrollHeight,e.scroll_width=document.documentElement.scrollLeft+window.innerWidth,e.scroll_height=document.documentElement.scrollTop+window.innerHeight,e.since_page_start_ms=Date.now()-window.performance.timing.navigationStart,e.page_start_ms=window.performance.timing.navigationStart}catch(e){console.log("beat event error "+JSON.stringify(e))}return e},e}(),ng=function(){function e(e){this.collect=e,this.eventNameList=["report_click_event","report_change_event","report_submit_event","report_exposure_event","report_page_view_event","report_page_statistics_event","report_beat_event"]}return e.prototype.send=function(e,t){var n=e.eventSend,r=t.event;delete t.event,n&&"becon"===n?this.collect.beconEvent(r,t):this.collect.event(r,t)},e.prototype.get=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"GET"},t);fetch(e,n)},e.prototype.post=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"POST"},t);fetch(e,n)},e}();function rg(){try{var e=window.TEAVisualEditor.lang=window.TEAVisualEditor.lang||Su.get("lang"),t=window.TEAVisualEditor.__editor_ajax_domain=window.TEAVisualEditor.__editor_ajax_domain||Su.get("_TEA_VE_APIHOST"),n=window.TEAVisualEditor.__editor_verison=window.TEAVisualEditor.__editor_verison||Su.get("_VISUAL_EDITOR_V"),r=window.TEAVisualEditor.__editor_url=window.TEAVisualEditor.__editor_url||Su.get("_VISUAL_EDITOR_U"),i=+new Date,o=new Date(i+18e5);Su.set("_TEA_VE_OPEN","1",{expires:o}),Su.set("_TEA_VE_APIHOST",t,{expires:o}),Su.set("_VISUAL_EDITOR_U",r,{expires:o}),Su.set("lang",e,{expires:o}),Su.set("_VISUAL_EDITOR_V",n||"",{expires:o})}catch(e){console.log("set cookie err")}}var ig=!1;function og(e){var t=e.event,n=e.editorUrl,r=e.autoTrackInstance;ig||(ig=!0,zc(n,(function(){wd(t,"editorScriptloadSuccess"),r.destroy()}),(function(){t&&wd(t,"editorScriptloadError"),ig=!1})))}function ag(e,t){window.TEAVisualEditor=window.TEAVisualEditor||{};var n="",r="https://lf3-data.volccdn.com/obj/data-static/log-sdk/collect/visual-editor-rangers.js?query="+Date.now();window.TEAVisualEditor.appId=t.app_id;var i=t.channel_domain,o="";if(Ed(["*"]),i){var a,s="";try{var c=window.performance.getEntriesByType("resource");if(c&&c.length&&(c.forEach((function(e){"script"===e.initiatorType&&e.name&&-1!==e.name.indexOf("collect")&&(s=e.name)})),s||document.currentScript&&(s=document.currentScript.src),s&&(a=s.split("/"))&&a.length)){o="https:/";for(var u=2;u<a.length&&u!==a.length-1;u++)o=o+"/"+a[u];if(o&&o.indexOf("/5.0")){var l=o.split("/5.0");o=l[0]||o}}}catch(e){}}if(Td(t,"0.0.1"),"1"===Su.get("_TEA_VE_OPEN")){var f=function(){var e=Su.get("_TEA_VE_APIHOST");try{e=JSON.parse(e)}catch(e){}return e}(),h="";f&&(window.TEAVisualEditor.__editor_ajax_domain=f,h=Su.get("_VISUAL_EDITOR_U")),og({event:null,editorUrl:h||r,autoTrackInstance:e}),rg()}else try{Sd("tea:openVisualEditor",(function(t){var a=t.data;if("string"==typeof t.data)try{a=JSON.parse(t.data)}catch(e){a=void 0}if(a){var s=a.referrer,c=a.lang;if(s&&(window.TEAVisualEditor.__editor_ajax_domain=s),n=r,i){var u=a.version;n=o?""+o+(u?"/visual-editor-rangers-v"+u:"/visual-editor-rangers-v1.0.0")+".js":r,window.TEAVisualEditor.__editor_verison=u}window.TEAVisualEditor.__editor_url=n,window.TEAVisualEditor.lang=c,og({event:t,editorUrl:n,autoTrackInstance:e}),rg()}})),window.TEAVisualEditor.openAutotrackEditor=function(){og({event:null,editorUrl:window.TEAVisualEditor.__editor_url,autoTrackInstance:e})}}catch(e){console.log("receive message error")}try{Sd("tea:openHeatMapCore",(function(t){og({event:t,editorUrl:"https://lf3-data.volccdn.com/obj/data-static/log-sdk/collect/heatmap-core.js?query="+Date.now(),autoTrackInstance:e})}))}catch(e){console.log("openHeatMapCore error")}}var sg=function(){function e(e){this._instance=null,this._intersection=e,this._intersection&&this.init()}return e.prototype.init=function(){var e=this;MutationObserver?(this._instance=new MutationObserver((function(t){t.forEach((function(t){"attributes"===t.type&&e.attributeChangeObserve(t),"childList"===t.type&&e.modifyNodeObserve(t)}))})),this._instance.observe(document.body,{childList:!0,attributes:!0,subtree:!0,attributeOldValue:!1})):console.log("your browser cannot support MutationObserver")},e.prototype.attributeChangeObserve=function(e){e.target.hasAttribute("data-exposure")?this.exposureAdd(e,"mutation"):this.exposureRemove(e)},e.prototype.modifyNodeObserve=function(e){var t=this;Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t.exposureAdd(e,"intersect"),t.mapChild(e,t.exposureAdd)})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t.exposureRemove(e),t.mapChild(e,t.exposureRemove)}))},e.prototype.mapChild=function(e,t){var n=this;1===e.nodeType&&e.children.length&&Array.prototype.forEach.call(e.children,(function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t(e),n.mapChild(e,t)}))},e.prototype.exposureAdd=function(e,t){try{this._intersection&&this._intersection.exposureAdd(e,t)}catch(e){console.log("intersection error",JSON.stringify(e.message))}},e.prototype.exposureRemove=function(e){try{this._intersection&&this._intersection.exposureRemove(e)}catch(e){console.log("intersection error",JSON.stringify(e.message))}},e._exposure_observer=null,e}(),cg=function(){function e(t,n){this.count=1,this.instance=this.buildObserver(),this.observeMap=e._observer_map,t.autotrack.exposure.ratio?this.Ratio=t.autotrack.exposure.ratio:0===t.autotrack.exposure.ratio?this.Ratio=0:this.Ratio=.5,this.EventHandle=n}return e.prototype.buildObserver=function(){var t=this;return e._observer_instance?(console.log("your browser cannot support IntersectionObserver"),null):(IntersectionObserver&&(e._observer_instance=new IntersectionObserver((function(e){e.forEach((function(e){t.observeMap.get(e.target._observeId)&&t.exposureEvent(e)}))}),{threshold:[.01,.25,.5,.75,1]})),e._observer_instance)},e.prototype.exposureAdd=function(e,t){var n=e;"mutation"===t&&(n=e.target);var r=n._observeId;if(r||this.observeMap.has(r)){if(!1===n.visible){var i=n.getBoundingClientRect(),o=i.top,a=i.left,s=i.right,c=i.bottom;o>=0&&c<=window.innerHeight&&a>=0&&s<=window.innerWidth&&(n.visible=!0,this.EventHandle({eventType:"dom",eventName:"exposure"},e))}}else n._observeId=this.count,n.visible=!1,this.observeMap.set(this.count,n),this.observe(n),this.count++},e.prototype.exposureRemove=function(e){this.observeMap.has(e._observeId)&&(this.observeMap.delete(e._observeId),this.unobserve(e))},e.prototype.exposureEvent=function(e){if(e.intersectionRatio>=this.Ratio&&e.isIntersecting){if("0"===e.target.style.opacity||"hidden"===e.target.style.visibility)return;if(!0===e.target.visible)return;e.target.visible=!0,this.EventHandle({eventType:"dom",eventName:"exposure"},e)}else e.target.visible=!1},e.prototype.observe=function(e){this.instance&&this.instance.observe(e)},e.prototype.unobserve=function(e){this.instance&&this.instance.unobserve(e)},e._observer_instance=null,e._observer_map=new Map,e}(),ug=function(){function e(e,t){e.autotrack&&e.autotrack.exposure&&(this._intersection=new cg(e,t),this._observer=new sg(this._intersection),this._intersection&&this._observer?this.initObserver():console.log("your browser version cannot support exposure, please update~"))}return e.prototype.initObserver=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),(function(t){e._intersection.exposureAdd(t,"intersect")}))},e}(),lg={hashTag:!1,impr:!1},fg=function(){function e(){}return e.prototype.apply=function(e,t){if(this.autoTrackStart=!1,this.collect=e,this.config=t,t.autotrack){var n=e.Types;t.autotrack&&t.autotrack.collect_url&&!t.autotrack.collect_url()||(this.ready(n.Autotrack),this.collect.emit(n.AutotrackReady))}},e.prototype.ready=function(e){this.collect.set(e);var t=this.config.autotrack;t="object"==typeof t?t:{},t=Object.assign(lg,t),this.destroyed=!1,this.options=t,this.Config=new Qd(Xd,this.options),this.Exposure=new ug(this.config,this.handle.bind(this)),this.Listener=new $d(t,this.collect,this.Config),this.EventHandle=new tg(this.config,t),this.Request=new ng(this.collect),this.autoTrackStart=!0,this.init(),ag(this,this.config)},e.prototype.init=function(){this.Listener.init(this.handle.bind(this))},e.prototype.handle=function(e,t){"dom"===e.eventType&&this.handleDom(e,t)},e.prototype.handleDom=function(e,t){try{var n=e.eventName;if("click"===n||"exposure"===n||"change"===n||"submit"===n){var r=this.EventHandle.handleEvent(t,n);null!==r&&this.Request.send({eventType:"custom",eventName:"report_"+n+"_event",extra:{methods:"GET"}},r)}else if("page_view"===n||"page_statistics"===n){var i=void 0;i="page_view"===n?this.EventHandle.handleViewEvent(t):this.EventHandle.handleStatisticsEvent(t),this.Request.send({eventType:"custom",eventName:"report_${eventName}_event",extra:{methods:"GET"}},i)}else if("beat"===n){var o=this.EventHandle.handleBeadtEvent(t),a=e.eventSend;this.Request.send({eventType:"custom",eventName:"report_${eventName}_event",extra:{methods:"GET"},eventSend:a},o)}}catch(e){console.log("handel dom event error "+JSON.stringify(e))}},e.prototype.destroy=function(){if(!this.autoTrackStart)return console.warn("engine is undefined, make sure you have called autoTrack.start()");this.autoTrackStart=!1,this.Listener.removeListener()},e}(),hg=function(){function e(){this.verifyReady=!1,this.waitTime=5e3,this.cleanStatus=!1}return e.prototype.apply=function(e,t){var n=this;this.collector=e,this.config=t;var r=e.adapters.storage;this.cacheStorgae=new r(!1,"session"),this.eventStorage=[],this.collector.on("submit-verify",(function(e){e&&e.length&&n.eventStore(e[0])})),this.checkCache()},e.prototype.checkCache=function(){var e=this;this.verifyCookieKey="__applog_verify_set_"+this.config.app_id,this.cacheStorgae.getCookie(this.verifyCookieKey);var t=this.cacheStorgae.getItem(this.verifyCookieKey);this.sign=t&&t.sign||"",this.origin=t&&t.origin||"*";var n=setTimeout((function(){e.cleanVerify(),clearTimeout(n),e.collector.off("submit-verify")}),this.waitTime);window.addEventListener("message",(function(t){t&&t.data&&"simulator:verify"===t.data.type&&(clearTimeout(n),e.receMessage(t))}),!0)},e.prototype.receMessage=function(e){if(!this.cleanStatus){var t=e.data;this.verifyReady=!0,this.sign=t.sign,this.origin=e.origin,this.cacheStorgae.setItem(this.verifyCookieKey,JSON.stringify({sign:t.sign,origin:e.origin})),this.eventStorage.length&&this.postVerify(this.eventStorage,t.sign,e.origin)}},e.prototype.eventStore=function(e){this.cleanStatus||(this.verifyReady?this.postVerify(e,this.sign,this.origin):this.eventStorage.push(e))},e.prototype.cleanVerify=function(){this.cleanStatus=!0,this.eventStorage=[]},e.prototype.postVerify=function(e,t,n){try{var r=[];Bc(e)?e.forEach((function(e){r.push(e)})):r.push(e);var i={type:"simulator:verify:event",sign:t,pageUrl:window.location.href,events:r};(window.opener||window.parent).postMessage(i,n)}catch(e){console.log("web verify post message error ~")}},e}(),pg=function(){function e(){this.autotrack=!1,this.spa=!1,this.cache={},this.allowHash=!1}return e.prototype.apply=function(e,t){if(t.spa||t.autotrack){this.collect=e,this.config=t,this.appid=t.app_id,this.allowHash=t.allow_hash,this.fncArray=new Map,this.setKey(),this.setLocation(),this.hack(),this.init(),this.listener();var n=e.Types;e.emit(n.RouteReady)}},e.prototype.setKey=function(){var e=this.collect.adapters.storage;this.storage=new e(!1),this.cache_key="__tea_cache_refer_"+this.appid,this.cache={refer_key:location.href,refer_title:document.title||location.pathname,refer_manual_key:""},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.setItem(this.cache_key,this.cache)},e.prototype.hack=function(){var e=this,t=window.history.pushState;history.pushState=function(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];"function"==typeof history.onpushstate&&history.onpushstate({state:n});var o=t.call.apply(t,Gs([history,n],r));if(e.lastLocation!==location.href){var a=e.getPopStateChangeEventData();return e.lastLocation=location.href,e.sendPv(a,"pushState"),o}};var n=history.replaceState;history.replaceState=function(t){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];"function"==typeof history.onreplacestate&&history.onreplacestate({state:t});var o=n.call.apply(n,Gs([history,t],r));if(e.lastLocation!==location.href){var a=e.getPopStateChangeEventData();return e.lastLocation=location.href,e.sendPv(a),o}}},e.prototype.setLocation=function(){"undefined"!=typeof window&&(this.lastLocation=window.location.href)},e.prototype.init=function(){var e=this.getPopStateChangeEventData();this.collect.emit("route-change",{config:e,init:!0})},e.prototype.listener=function(){var e=this,t=null;window.addEventListener("hashchange",(function(n){if(e.lastLocation!==window.location.href&&(clearTimeout(t),e.allowHash)){e.lastLocation=window.location.href;var r=e.getPopStateChangeEventData();e.sendPv(r)}})),window.addEventListener("popstate",(function(n){e.lastLocation!==window.location.href&&(t=setTimeout((function(){e.lastLocation=window.location.href;var t=e.getPopStateChangeEventData();e.sendPv(t)}),10))}))},e.prototype.getPopStateChangeEventData=function(){var e=this.pageConfig();return e.is_back=0,e},e.prototype.pageConfig=function(){try{var e="",t=this.storage.getItem(this.cache_key)||{},n=!1;e=document.referrer?document.referrer:t&&t.refer_key||"";var r=this.storage.getItem("__tea_cache_first_"+this.appid);return n=!r||1!=r,{is_html:1,url:location.href,referrer:e,page_key:location.href,refer_page_key:e,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:""+n}}catch(e){return this.collect.emit(Au.DEBUGGER_MESSAGE,{type:Au.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message}),{}}},e.prototype.sendPv=function(e,t){this.collect.emit("route-change",{config:e,init:!1})},e}(),dg=function(){function e(){this.verifyReady=!1,this.cleanStatus=!1}return e.prototype.apply=function(e,t){var n=this;this.collector=e,this.config=t,this.eventStorage=[],this.collector.on("submit-verify-h5",(function(e){e&&e.length&&n.eventStore(e[0])})),this.checkUrl(),this.heartbeat()},e.prototype.checkUrl=function(){var e=window.location.href,t=Hc(e);t._r_d_&&t._r_c_k_?(this.verifyReady=!0,this.domain=t._r_d_,this.key=t._r_c_k_,this.checkCache()):this.collector.off("submit-verify-h5")},e.prototype.checkCache=function(){this.eventStorage.length&&this.postVerify(this.eventStorage)},e.prototype.heartbeat=function(){var e=this;this.heart=setInterval((function(){var t={event:"simulator_test__",local_time_ms:Date.now()},n=e.collector.configManager.get(),r=n.header,i={events:[t],user:n.user,header:r};e.eventStore(i)}),6e4)},e.prototype.eventStore=function(e){this.cleanStatus||(this.verifyReady?this.postVerify(e):this.eventStorage.push(e))},e.prototype.cleanVerify=function(){this.cleanStatus=!0,this.eventStorage=[],clearInterval(this.heart)},e.prototype.postVerify=function(e){var t=this;try{var n=JSON.parse(JSON.stringify(e));Bc(e)?n.forEach((function(e){t.fetchLog(e)})):this.fetchLog(n)}catch(e){console.log("web verify post error ~")}},e.prototype.fetchLog=function(e){Ju(this.domain+"/simulator/h5/log?connection_key="+this.key,e,2e4,!1)},e.prototype.leave=function(){var e=this;document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.cleanVerify()})),Vc((function(){e.cleanVerify()}))},e}(),gg=function(){function e(){this.retryWaitTime=3e3,this.retryStatus=!1,this.retryCacheStatus=!1}return e.prototype.apply=function(e,t){var n=this;if(t.enable_storage&&!t.disable_storage&&(this.collect=e,this.config=t,!this.collect.destroyInstance)){var r=e.Types,i=e.adapters,o=i.storage,a=i.fetch;this.storage=new o(!1),this.fetch=a,this.eventUrl=this.collect.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+t.app_id,this.storageNum=t.storage_num||50,this.retryNum=t.retry_num||3,this.retryInterval=1e3,e.on(r.SubmitError,(function(e){"f_data"===e.type&&n.storeData(e)})),e.on(r.Ready,(function(){n.checkStorage()}))}},e.prototype.retryRightNow=function(e){var t=this;if(this.retryStatus)this.errorCache.push(e);else{var n=0;this.retryStatus=!0;var r=setInterval((function(){if(3===n)return t.storeData(t.errorCache),t.retryStatus=!1,void clearInterval(r);var i=e.eventData;t.fetchData(i,(function(){t.retryStatus=!1,clearInterval(r),t.retryCacheStatus&&t.errorCache.splice(0,1),t.errorCache.length&&(t.retryCacheStatus=!0,t.retryRightNow(t.errorCache[0]))}),(function(){n++}))}),this.retryInterval)}},e.prototype.storeData=function(e){var t=this.storage.getItem(this.eventKey),n=e.eventData;Object.keys(t).length!==this.storageNum&&(t[Date.now()]=n,this.storage.setItem(this.eventKey,t))},e.prototype.checkStorage=function(){var e=this;try{if(!window.navigator.onLine)return;var t=this.storage.getItem(this.eventKey);if(!t||!Object.keys(t).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(t)),r=function(r){e.fetchData(t[r],(function(){delete n[r],e.storage.setItem(e.eventKey,n)}),(function(){}),!1)};for(var i in t)r(i)}),(function(){}),!0)}catch(e){console.warn("error check storage")}},e.prototype.fetchData=function(e,t,n,r){this.fetch(this.eventUrl,e,3e4,!1,(function(){t&&t()}),(function(){n&&n(),console.log("network error,compensate report failk")}),r&&!this.config.channel_domain?"566f58151b0ed37e":"")},e}(),vg=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collector=e,this.config=t;var r=e.Types;e.on(r.TrackDurationStart,(function(e){n.trackStart(e)})),e.on(r.TrackDurationEnd,(function(e){n.trackEnd(e)})),e.on(r.TrackDurationPause,(function(e){n.trackPause(e)})),e.on(r.TrackDurationResume,(function(e){n.trackResume(e)})),this.Types=r,this.TrackMap=new Map,this.ready(r.TrackDuration)},e.prototype.ready=function(e){var t=this;if(this.collector.set(e),this.collector.hook._hooksCache.hasOwnProperty(e)){var n=this.collector.hook._hooksCache[e];if(!Object.keys(n).length)return;var r=function(e){n[e].length&&n[e].forEach((function(n){t.collector.hook.emit(e,n)}))};for(var i in n)r(i)}},e.prototype.trackStart=function(e){this.TrackMap.set(e,{startTime:Date.now(),isPause:!1,pauseTime:0,resumeTime:0})},e.prototype.trackEnd=function(e){var t=e.eventName,n=e.params;if(this.TrackMap.has(t)){var r=this.TrackMap.get(t),i=0;i=r.isPause?r.pauseTime-r.startTime:r.resumeTime?r.pauseTime-r.startTime+(Date.now()-r.resumeTime):Date.now()-r.startTime;var o=Object.assign(n,{event_duration:i});this.collector.event(t,o),this.cleanTrack(t)}},e.prototype.trackPause=function(e){if(this.TrackMap.has(e)){var t=this.TrackMap.get(e);t.isPause||(t.isPause=!0,t.pauseTime=Date.now(),this.TrackMap.set(e,t))}},e.prototype.trackResume=function(e){if(this.TrackMap.has(e)){var t=this.TrackMap.get(e);t.isPause&&(t.isPause=!1,t.resumeTime=Date.now(),this.TrackMap.set(e,t))}},e.prototype.cleanTrack=function(e){this.TrackMap.delete(e)},e}();sl.usePlugin(Dd,"ab"),sl.usePlugin(Ld,"stay"),sl.usePlugin(gg,"store"),sl.usePlugin(fg,"autotrack"),sl.usePlugin(vg,"trackDuration"),sl.usePlugin(hg,"verify"),sl.usePlugin(dg,"verify"),sl.usePlugin(jd,"profile"),sl.usePlugin(Vd,"heartbeat"),sl.usePlugin(zd,"monitor"),sl.usePlugin(pg,"route");var mg=new sl("default"),yg=sl;exports.Collector=yg,exports.default=mg;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n,r,i=function(e){return e&&e.Math==Math&&e},o=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")(),a=function(e){try{return!!e()}catch(e){return!0}},s=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!a((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=Function.prototype.call,f=c?u.bind(u):function(){return u.apply(u,arguments)},l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p={f:h&&!l.call({1:2},1)?function(e){var t=h(this,e);return!!t&&t.enumerable}:l},d=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},g=Function.prototype,v=g.bind,m=g.call,y=c&&v.bind(m,m),b=c?function(e){return e&&y(e)}:function(e){return e&&function(){return m.apply(e,arguments)}},w=b({}.toString),_=b("".slice),x=function(e){return _(w(e),8,-1)},S=o.Object,O=b("".split),I=a((function(){return!S("z").propertyIsEnumerable(0)}))?function(e){return"String"==x(e)?O(e,""):S(e)}:S,E=o.TypeError,k=function(e){if(null==e)throw E("Can't call method on "+e);return e},T=function(e){return I(k(e))},j=function(e){return"function"==typeof e},M=function(e){return"object"==typeof e?null!==e:j(e)},P=function(e){return j(e)?e:void 0},R=function(e,t){return arguments.length<2?P(o[e]):o[e]&&o[e][t]},C=b({}.isPrototypeOf),A=R("navigator","userAgent")||"",z=o.process,N=o.Deno,D=z&&z.versions||N&&N.version,L=D&&D.v8;L&&(r=(n=L.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&A&&(!(n=A.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=A.match(/Chrome\/(\d+)/))&&(r=+n[1]);var U=r,F=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&U&&U<41})),B=F&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,V=o.Object,q=B?function(e){return"symbol"==typeof e}:function(e){var t=R("Symbol");return j(t)&&C(t.prototype,V(e))},K=o.String,W=function(e){try{return K(e)}catch(e){return"Object"}},G=o.TypeError,J=function(e){if(j(e))return e;throw G(W(e)+" is not a function")},$=function(e,t){var n=e[t];return null==n?void 0:J(n)},X=o.TypeError,Q=Object.defineProperty,Y=function(e,t){try{Q(o,e,{value:t,configurable:!0,writable:!0})}catch(n){o[e]=t}return t},H=o["__core-js_shared__"]||Y("__core-js_shared__",{}),Z=t((function(e){(e.exports=function(e,t){return H[e]||(H[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.6",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.6/LICENSE",source:"https://github.com/zloirock/core-js"})})),ee=o.Object,te=function(e){return ee(k(e))},ne=b({}.hasOwnProperty),re=Object.hasOwn||function(e,t){return ne(te(e),t)},ie=0,oe=Math.random(),ae=b(1..toString),se=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ae(++ie+oe,36)},ce=Z("wks"),ue=o.Symbol,fe=ue&&ue.for,le=B?ue:ue&&ue.withoutSetter||se,he=function(e){if(!re(ce,e)||!F&&"string"!=typeof ce[e]){var t="Symbol."+e;F&&re(ue,e)?ce[e]=ue[e]:ce[e]=B&&fe?fe(t):le(t)}return ce[e]},pe=o.TypeError,de=he("toPrimitive"),ge=function(e,t){if(!M(e)||q(e))return e;var n,r=$(e,de);if(r){if(void 0===t&&(t="default"),n=f(r,e,t),!M(n)||q(n))return n;throw pe("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&j(n=e.toString)&&!M(r=f(n,e)))return r;if(j(n=e.valueOf)&&!M(r=f(n,e)))return r;if("string"!==t&&j(n=e.toString)&&!M(r=f(n,e)))return r;throw X("Can't convert object to primitive value")}(e,t)},ve=function(e){var t=ge(e,"string");return q(t)?t:t+""},me=o.document,ye=M(me)&&M(me.createElement),be=function(e){return ye?me.createElement(e):{}},we=!s&&!a((function(){return 7!=Object.defineProperty(be("div"),"a",{get:function(){return 7}}).a})),_e=Object.getOwnPropertyDescriptor,xe={f:s?_e:function(e,t){if(e=T(e),t=ve(t),we)try{return _e(e,t)}catch(e){}if(re(e,t))return d(!f(p.f,e,t),e[t])}},Se=s&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=o.String,Ie=o.TypeError,Ee=function(e){if(M(e))return e;throw Ie(Oe(e)+" is not an object")},ke=o.TypeError,Te=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Me={f:s?Se?function(e,t,n){if(Ee(e),t=ve(t),Ee(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=je(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return Te(e,t,n)}:Te:function(e,t,n){if(Ee(e),t=ve(t),Ee(n),we)try{return Te(e,t,n)}catch(e){}if("get"in n||"set"in n)throw ke("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Pe=s?function(e,t,n){return Me.f(e,t,d(1,n))}:function(e,t,n){return e[t]=n,e},Re=Function.prototype,Ce=s&&Object.getOwnPropertyDescriptor,Ae=re(Re,"name"),ze={EXISTS:Ae,PROPER:Ae&&"something"===function(){}.name,CONFIGURABLE:Ae&&(!s||s&&Ce(Re,"name").configurable)},Ne=b(Function.toString);j(H.inspectSource)||(H.inspectSource=function(e){return Ne(e)});var De,Le,Ue,Fe=H.inspectSource,Be=o.WeakMap,Ve=j(Be)&&/native code/.test(Fe(Be)),qe=Z("keys"),Ke=function(e){return qe[e]||(qe[e]=se(e))},We={},Ge=o.TypeError,Je=o.WeakMap;if(Ve||H.state){var $e=H.state||(H.state=new Je),Xe=b($e.get),Qe=b($e.has),Ye=b($e.set);De=function(e,t){if(Qe($e,e))throw new Ge("Object already initialized");return t.facade=e,Ye($e,e,t),t},Le=function(e){return Xe($e,e)||{}},Ue=function(e){return Qe($e,e)}}else{var He=Ke("state");We[He]=!0,De=function(e,t){if(re(e,He))throw new Ge("Object already initialized");return t.facade=e,Pe(e,He,t),t},Le=function(e){return re(e,He)?e[He]:{}},Ue=function(e){return re(e,He)}}var Ze={set:De,get:Le,has:Ue,enforce:function(e){return Ue(e)?Le(e):De(e,{})},getterFor:function(e){return function(t){var n;if(!M(t)||(n=Le(t)).type!==e)throw Ge("Incompatible receiver, "+e+" required");return n}}},et=t((function(e){var t=ze.CONFIGURABLE,n=Ze.enforce,r=Ze.get,i=Object.defineProperty,o=s&&!a((function(){return 8!==i((function(){}),"length",{value:8}).length})),c=String(String).split("String"),u=e.exports=function(e,r,a){if("Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(r="get "+r),a&&a.setter&&(r="set "+r),(!re(e,"name")||t&&e.name!==r)&&i(e,"name",{value:r,configurable:!0}),o&&a&&re(a,"arity")&&e.length!==a.arity&&i(e,"length",{value:a.arity}),a&&re(a,"constructor")&&a.constructor){if(s)try{i(e,"prototype",{writable:!1})}catch(e){}}else e.prototype=void 0;var u=n(e);return re(u,"source")||(u.source=c.join("string"==typeof r?r:"")),e};Function.prototype.toString=u((function(){return j(this)&&r(this).source||Fe(this)}),"toString")})),tt=function(e,t,n,r){r||(r={});var i=r.enumerable,o=void 0!==r.name?r.name:t;return j(n)&&et(n,o,r),r.global?i?e[t]=n:Y(t,n):(r.unsafe?e[t]&&(i=!0):delete e[t],i?e[t]=n:Pe(e,t,n)),e},nt=Math.ceil,rt=Math.floor,it=Math.trunc||function(e){var t=+e;return(t>0?rt:nt)(t)},ot=function(e){var t=+e;return t!=t||0===t?0:it(t)},at=Math.max,st=Math.min,ct=function(e,t){var n=ot(e);return n<0?at(n+t,0):st(n,t)},ut=Math.min,ft=function(e){return e>0?ut(ot(e),9007199254740991):0},lt=function(e){return ft(e.length)},ht=function(e){return function(t,n,r){var i,o=T(t),a=lt(o),s=ct(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},pt={includes:ht(!0),indexOf:ht(!1)},dt=pt.indexOf,gt=b([].push),vt=function(e,t){var n,r=T(e),i=0,o=[];for(n in r)!re(We,n)&&re(r,n)&>(o,n);for(;t.length>i;)re(r,n=t[i++])&&(~dt(o,n)||gt(o,n));return o},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yt=mt.concat("length","prototype"),bt={f:Object.getOwnPropertyNames||function(e){return vt(e,yt)}},wt={f:Object.getOwnPropertySymbols},_t=b([].concat),xt=R("Reflect","ownKeys")||function(e){var t=bt.f(Ee(e)),n=wt.f;return n?_t(t,n(e)):t},St=function(e,t,n){for(var r=xt(t),i=Me.f,o=xe.f,a=0;a<r.length;a++){var s=r[a];re(e,s)||n&&re(n,s)||i(e,s,o(t,s))}},Ot=/#|\.prototype\./,It=function(e,t){var n=kt[Et(e)];return n==jt||n!=Tt&&(j(t)?a(t):!!t)},Et=It.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},kt=It.data={},Tt=It.NATIVE="N",jt=It.POLYFILL="P",Mt=It,Pt=xe.f,Rt=function(e,t){var n,r,i,a,s,c=e.target,u=e.global,f=e.stat;if(n=u?o:f?o[c]||Y(c,{}):(o[c]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Pt(n,r))&&s.value:n[r],!Mt(u?r:c+(f?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;St(a,i)}(e.sham||i&&i.sham)&&Pe(a,"sham",!0),tt(n,r,a,e)}},Ct=b(b.bind),At=function(e,t){return J(e),void 0===t?e:c?Ct(e,t):function(){return e.apply(t,arguments)}},zt=Array.isArray||function(e){return"Array"==x(e)},Nt={};Nt[he("toStringTag")]="z";var Dt="[object z]"===String(Nt),Lt=he("toStringTag"),Ut=o.Object,Ft="Arguments"==x(function(){return arguments}()),Bt=Dt?x:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Ut(e),Lt))?n:Ft?x(t):"Object"==(r=x(t))&&j(t.callee)?"Arguments":r},Vt=function(){},qt=[],Kt=R("Reflect","construct"),Wt=/^\s*(?:class|function)\b/,Gt=b(Wt.exec),Jt=!Wt.exec(Vt),$t=function(e){if(!j(e))return!1;try{return Kt(Vt,qt,e),!0}catch(e){return!1}},Xt=function(e){if(!j(e))return!1;switch(Bt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Jt||!!Gt(Wt,Fe(e))}catch(e){return!0}};Xt.sham=!0;var Qt=!Kt||a((function(){var e;return $t($t.call)||!$t(Object)||!$t((function(){e=!0}))||e}))?Xt:$t,Yt=he("species"),Ht=o.Array,Zt=function(e,t){return new(function(e){var t;return zt(e)&&(t=e.constructor,(Qt(t)&&(t===Ht||zt(t.prototype))||M(t)&&null===(t=t[Yt]))&&(t=void 0)),void 0===t?Ht:t}(e))(0===t?0:t)},en=b([].push),tn=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(c,u,f,l){for(var h,p,d=te(c),g=I(d),v=At(u,f),m=lt(g),y=0,b=l||Zt,w=t?b(c,m):n||a?b(c,0):void 0;m>y;y++)if((s||y in g)&&(p=v(h=g[y],y,d),e))if(t)w[y]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:en(w,h)}else switch(e){case 4:return!1;case 7:en(w,h)}return o?-1:r||i?i:w}},nn={forEach:tn(0),map:tn(1),filter:tn(2),some:tn(3),every:tn(4),find:tn(5),findIndex:tn(6),filterReject:tn(7)},rn=function(e,t){var n=[][e];return!!n&&a((function(){n.call(null,t||function(){return 1},1)}))},on=nn.forEach,an=rn("forEach")?[].forEach:function(e){return on(this,e,arguments.length>1?arguments[1]:void 0)};Rt({target:"Array",proto:!0,forced:[].forEach!=an},{forEach:an});var sn=pt.indexOf,cn=b([].indexOf),un=!!cn&&1/cn([1],1,-0)<0,fn=rn("indexOf");Rt({target:"Array",proto:!0,forced:un||!fn},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return un?cn(this,e,t)||0:sn(this,e,t)}}),Rt({target:"Array",stat:!0},{isArray:zt});var ln,hn=Object.keys||function(e){return vt(e,mt)},pn=s&&!Se?Object.defineProperties:function(e,t){Ee(e);for(var n,r=T(t),i=hn(t),o=i.length,a=0;o>a;)Me.f(e,n=i[a++],r[n]);return e},dn={f:pn},gn=R("document","documentElement"),vn=Ke("IE_PROTO"),mn=function(){},yn=function(e){return"<script>"+e+"<\/script>"},bn=function(e){e.write(yn("")),e.close();var t=e.parentWindow.Object;return e=null,t},wn=function(){try{ln=new ActiveXObject("htmlfile")}catch(e){}var e,t;wn="undefined"!=typeof document?document.domain&&ln?bn(ln):((t=be("iframe")).style.display="none",gn.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(yn("document.F=Object")),e.close(),e.F):bn(ln);for(var n=mt.length;n--;)delete wn.prototype[mt[n]];return wn()};We[vn]=!0;var _n=Object.create||function(e,t){var n;return null!==e?(mn.prototype=Ee(e),n=new mn,mn.prototype=null,n[vn]=e):n=wn(),void 0===t?n:dn.f(n,t)},xn=Me.f,Sn=he("unscopables"),On=Array.prototype;null==On[Sn]&&xn(On,Sn,{configurable:!0,value:_n(null)});var In,En,kn,Tn=function(e){On[Sn][e]=!0},jn={},Mn=!a((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Pn=Ke("IE_PROTO"),Rn=o.Object,Cn=Rn.prototype,An=Mn?Rn.getPrototypeOf:function(e){var t=te(e);if(re(t,Pn))return t[Pn];var n=t.constructor;return j(n)&&t instanceof n?n.prototype:t instanceof Rn?Cn:null},zn=he("iterator"),Nn=!1;[].keys&&("next"in(kn=[].keys())?(En=An(An(kn)))!==Object.prototype&&(In=En):Nn=!0);var Dn=null==In||a((function(){var e={};return In[zn].call(e)!==e}));Dn&&(In={}),j(In[zn])||tt(In,zn,(function(){return this}));var Ln={IteratorPrototype:In,BUGGY_SAFARI_ITERATORS:Nn},Un=Me.f,Fn=he("toStringTag"),Bn=function(e,t,n){e&&!n&&(e=e.prototype),e&&!re(e,Fn)&&Un(e,Fn,{configurable:!0,value:t})},Vn=Ln.IteratorPrototype,qn=function(){return this},Kn=o.String,Wn=o.TypeError,Gn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=b(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ee(n),function(e){if("object"==typeof e||j(e))return e;throw Wn("Can't set "+Kn(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Jn=ze.PROPER,$n=ze.CONFIGURABLE,Xn=Ln.IteratorPrototype,Qn=Ln.BUGGY_SAFARI_ITERATORS,Yn=he("iterator"),Hn=function(){return this},Zn=function(e,t,n,r,i,o,a){!function(e,t,n,r){var i=t+" Iterator";e.prototype=_n(Vn,{next:d(+!r,n)}),Bn(e,i,!1),jn[i]=qn}(n,t,r);var s,c,u,l=function(e){if(e===i&&m)return m;if(!Qn&&e in g)return g[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",p=!1,g=e.prototype,v=g[Yn]||g["@@iterator"]||i&&g[i],m=!Qn&&v||l(i),y="Array"==t&&g.entries||v;if(y&&(s=An(y.call(new e)))!==Object.prototype&&s.next&&(An(s)!==Xn&&(Gn?Gn(s,Xn):j(s[Yn])||tt(s,Yn,Hn)),Bn(s,h,!0)),Jn&&"values"==i&&v&&"values"!==v.name&&($n?Pe(g,"name","values"):(p=!0,m=function(){return f(v,this)})),i)if(c={values:l("values"),keys:o?m:l("keys"),entries:l("entries")},a)for(u in c)(Qn||p||!(u in g))&&tt(g,u,c[u]);else Rt({target:t,proto:!0,forced:Qn||p},c);return g[Yn]!==m&&tt(g,Yn,m,{name:i}),jn[t]=m,c},er=Me.f,tr=Ze.set,nr=Ze.getterFor("Array Iterator"),rr=Zn(Array,"Array",(function(e,t){tr(this,{type:"Array Iterator",target:T(e),index:0,kind:t})}),(function(){var e=nr(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),ir=jn.Arguments=jn.Array;if(Tn("keys"),Tn("values"),Tn("entries"),s&&"values"!==ir.name)try{er(ir,"name",{value:"values"})}catch(e){}var or=function(e,t,n){var r=ve(t);r in e?Me.f(e,r,d(0,n)):e[r]=n},ar=he("species"),sr=function(e){return U>=51||!a((function(){var t=[];return(t.constructor={})[ar]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},cr=b([].slice),ur=sr("slice"),fr=he("species"),lr=o.Array,hr=Math.max;Rt({target:"Array",proto:!0,forced:!ur},{slice:function(e,t){var n,r,i,o=T(this),a=lt(o),s=ct(e,a),c=ct(void 0===t?a:t,a);if(zt(o)&&(n=o.constructor,(Qt(n)&&(n===lr||zt(n.prototype))||M(n)&&null===(n=n[fr]))&&(n=void 0),n===lr||void 0===n))return cr(o,s,c);for(r=new(void 0===n?lr:n)(hr(c-s,0)),i=0;s<c;s++,i++)s in o&&or(r,i,o[s]);return r.length=i,r}});var pr=o.Date,dr=b(pr.prototype.getTime);Rt({target:"Date",stat:!0},{now:function(){return dr(new pr)}});var gr=Date.prototype,vr=b(gr.toString),mr=b(gr.getTime);"Invalid Date"!=String(new Date(NaN))&&tt(gr,"toString",(function(){var e=mr(this);return e==e?vr(this):"Invalid Date"}));var yr=ze.EXISTS,br=Me.f,wr=Function.prototype,_r=b(wr.toString),xr=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Sr=b(xr.exec);s&&!yr&&br(wr,"name",{configurable:!0,get:function(){try{return Sr(xr,_r(this))[1]}catch(e){return""}}});var Or=Dt?{}.toString:function(){return"[object "+Bt(this)+"]"};Dt||tt(Object.prototype,"toString",Or,{unsafe:!0});var Ir,Er,kr,Tr,jr="process"==x(o.process),Mr=he("species"),Pr=function(e){var t=R(e),n=Me.f;s&&t&&!t[Mr]&&n(t,Mr,{configurable:!0,get:function(){return this}})},Rr=o.TypeError,Cr=o.TypeError,Ar=he("species"),zr=function(e,t){var n,r=Ee(e).constructor;return void 0===r||null==(n=Ee(r)[Ar])?t:function(e){if(Qt(e))return e;throw Cr(W(e)+" is not a constructor")}(n)},Nr=Function.prototype,Dr=Nr.apply,Lr=Nr.call,Ur="object"==typeof Reflect&&Reflect.apply||(c?Lr.bind(Dr):function(){return Lr.apply(Dr,arguments)}),Fr=o.TypeError,Br=function(e,t){if(e<t)throw Fr("Not enough arguments");return e},Vr=/(?:ipad|iphone|ipod).*applewebkit/i.test(A),qr=o.setImmediate,Kr=o.clearImmediate,Wr=o.process,Gr=o.Dispatch,Jr=o.Function,$r=o.MessageChannel,Xr=o.String,Qr=0,Yr={};try{Ir=o.location}catch(e){}var Hr=function(e){if(re(Yr,e)){var t=Yr[e];delete Yr[e],t()}},Zr=function(e){return function(){Hr(e)}},ei=function(e){Hr(e.data)},ti=function(e){o.postMessage(Xr(e),Ir.protocol+"//"+Ir.host)};qr&&Kr||(qr=function(e){Br(arguments.length,1);var t=j(e)?e:Jr(e),n=cr(arguments,1);return Yr[++Qr]=function(){Ur(t,void 0,n)},Er(Qr),Qr},Kr=function(e){delete Yr[e]},jr?Er=function(e){Wr.nextTick(Zr(e))}:Gr&&Gr.now?Er=function(e){Gr.now(Zr(e))}:$r&&!Vr?(Tr=(kr=new $r).port2,kr.port1.onmessage=ei,Er=At(Tr.postMessage,Tr)):o.addEventListener&&j(o.postMessage)&&!o.importScripts&&Ir&&"file:"!==Ir.protocol&&!a(ti)?(Er=ti,o.addEventListener("message",ei,!1)):Er="onreadystatechange"in be("script")?function(e){gn.appendChild(be("script")).onreadystatechange=function(){gn.removeChild(this),Hr(e)}}:function(e){setTimeout(Zr(e),0)});var ni,ri,ii,oi,ai,si,ci,ui,fi={set:qr,clear:Kr},li=/ipad|iphone|ipod/i.test(A)&&void 0!==o.Pebble,hi=/web0s(?!.*chrome)/i.test(A),pi=xe.f,di=fi.set,gi=o.MutationObserver||o.WebKitMutationObserver,vi=o.document,mi=o.process,yi=o.Promise,bi=pi(o,"queueMicrotask"),wi=bi&&bi.value;wi||(ni=function(){var e,t;for(jr&&(e=mi.domain)&&e.exit();ri;){t=ri.fn,ri=ri.next;try{t()}catch(e){throw ri?oi():ii=void 0,e}}ii=void 0,e&&e.enter()},Vr||jr||hi||!gi||!vi?!li&&yi&&yi.resolve?((ci=yi.resolve(void 0)).constructor=yi,ui=At(ci.then,ci),oi=function(){ui(ni)}):jr?oi=function(){mi.nextTick(ni)}:(di=At(di,o),oi=function(){di(ni)}):(ai=!0,si=vi.createTextNode(""),new gi(ni).observe(si,{characterData:!0}),oi=function(){si.data=ai=!ai}));var _i=wi||function(e){var t={fn:e,next:void 0};ii&&(ii.next=t),ri||(ri=t,oi()),ii=t},xi=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Si=function(){this.head=null,this.tail=null};Si.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var Oi=Si,Ii=o.Promise,Ei="object"==typeof window&&"object"!=typeof Deno;Ii&&Ii.prototype;var ki,Ti,ji,Mi=he("species"),Pi=!1,Ri=j(o.PromiseRejectionEvent),Ci=Mt("Promise",(function(){var e=Fe(Ii),t=e!==String(Ii);if(!t&&66===U)return!0;if(U>=51&&/native code/.test(e))return!1;var n=new Ii((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[Mi]=r,!(Pi=n.then((function(){}))instanceof r)||!t&&Ei&&!Ri})),Ai={CONSTRUCTOR:Ci,REJECTION_EVENT:Ri,SUBCLASSING:Pi},zi=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=J(t),this.reject=J(n)},Ni={f:function(e){return new zi(e)}},Di=fi.set,Li=Ai.CONSTRUCTOR,Ui=Ai.REJECTION_EVENT,Fi=Ai.SUBCLASSING,Bi=Ze.getterFor("Promise"),Vi=Ze.set,qi=Ii&&Ii.prototype,Ki=Ii,Wi=qi,Gi=o.TypeError,Ji=o.document,$i=o.process,Xi=Ni.f,Qi=Xi,Yi=!!(Ji&&Ji.createEvent&&o.dispatchEvent),Hi=function(e){var t;return!(!M(e)||!j(t=e.then))&&t},Zi=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&io(t),t.rejection=1),!0===s?n=o:(l&&l.enter(),n=s(o),l&&(l.exit(),i=!0)),n===e.promise?u(Gi("Promise-chain cycle")):(r=Hi(n))?f(r,n,c,u):c(n)):u(o)}catch(e){l&&!i&&l.exit(),u(e)}},eo=function(e,t){e.notified||(e.notified=!0,_i((function(){for(var n,r=e.reactions;n=r.get();)Zi(n,e);e.notified=!1,t&&!e.rejection&&no(e)})))},to=function(e,t,n){var r,i;Yi?((r=Ji.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),o.dispatchEvent(r)):r={promise:t,reason:n},!Ui&&(i=o["on"+e])?i(r):"unhandledrejection"===e&&function(e,t){var n=o.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},no=function(e){f(Di,o,(function(){var t,n=e.facade,r=e.value;if(ro(e)&&(t=xi((function(){jr?$i.emit("unhandledRejection",r,n):to("unhandledrejection",n,r)})),e.rejection=jr||ro(e)?2:1,t.error))throw t.value}))},ro=function(e){return 1!==e.rejection&&!e.parent},io=function(e){f(Di,o,(function(){var t=e.facade;jr?$i.emit("rejectionHandled",t):to("rejectionhandled",t,e.value)}))},oo=function(e,t,n){return function(r){e(t,r,n)}},ao=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,eo(e,!0))},so=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Gi("Promise can't be resolved itself");var r=Hi(t);r?_i((function(){var n={done:!1};try{f(r,t,oo(so,n,e),oo(ao,n,e))}catch(t){ao(n,t,e)}})):(e.value=t,e.state=1,eo(e,!1))}catch(t){ao({done:!1},t,e)}}};if(Li&&(Wi=(Ki=function(e){!function(e,t){if(C(t,e))return e;throw Rr("Incorrect invocation")}(this,Wi),J(e),f(ki,this);var t=Bi(this);try{e(oo(so,t),oo(ao,t))}catch(e){ao(t,e)}}).prototype,(ki=function(e){Vi(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Oi,rejection:!1,state:0,value:void 0})}).prototype=tt(Wi,"then",(function(e,t){var n=Bi(this),r=Xi(zr(this,Ki));return n.parent=!0,r.ok=!j(e)||e,r.fail=j(t)&&t,r.domain=jr?$i.domain:void 0,0==n.state?n.reactions.add(r):_i((function(){Zi(r,n)})),r.promise})),Ti=function(){var e=new ki,t=Bi(e);this.promise=e,this.resolve=oo(so,t),this.reject=oo(ao,t)},Ni.f=Xi=function(e){return e===Ki||undefined===e?new Ti(e):Qi(e)},j(Ii)&&qi!==Object.prototype)){ji=qi.then,Fi||tt(qi,"then",(function(e,t){var n=this;return new Ki((function(e,t){f(ji,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete qi.constructor}catch(e){}Gn&&Gn(qi,Wi)}Rt({global:!0,constructor:!0,wrap:!0,forced:Li},{Promise:Ki}),Bn(Ki,"Promise",!1),Pr("Promise");var co=he("iterator"),uo=Array.prototype,fo=he("iterator"),lo=function(e){if(null!=e)return $(e,fo)||$(e,"@@iterator")||jn[Bt(e)]},ho=o.TypeError,po=function(e,t,n){var r,i;Ee(e);try{if(!(r=$(e,"return"))){if("throw"===t)throw n;return n}r=f(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Ee(r),n},go=o.TypeError,vo=function(e,t){this.stopped=e,this.result=t},mo=vo.prototype,yo=function(e,t,n){var r,i,o,a,s,c,u,l,h=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),g=!(!n||!n.INTERRUPTED),v=At(t,h),m=function(e){return r&&po(r,"normal",e),new vo(!0,e)},y=function(e){return p?(Ee(e),g?v(e[0],e[1],m):v(e[0],e[1])):g?v(e,m):v(e)};if(d)r=e;else{if(!(i=lo(e)))throw go(W(e)+" is not iterable");if(void 0!==(l=i)&&(jn.Array===l||uo[co]===l)){for(o=0,a=lt(e);a>o;o++)if((s=y(e[o]))&&C(mo,s))return s;return new vo(!1)}r=function(e,t){var n=arguments.length<2?lo(e):t;if(J(n))return Ee(f(n,e));throw ho(W(e)+" is not iterable")}(e,i)}for(c=r.next;!(u=f(c,r)).done;){try{s=y(u.value)}catch(e){po(r,"throw",e)}if("object"==typeof s&&s&&C(mo,s))return s}return new vo(!1)},bo=he("iterator"),wo=!1;try{var _o=0,xo={next:function(){return{done:!!_o++}},return:function(){wo=!0}};xo[bo]=function(){return this},Array.from(xo,(function(){throw 2}))}catch(e){}var So=Ai.CONSTRUCTOR||!function(e,t){if(!t&&!wo)return!1;var n=!1;try{var r={};r[bo]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}((function(e){Ii.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:So},{all:function(e){var t=this,n=Ni.f(t),r=n.resolve,i=n.reject,o=xi((function(){var n=J(t.resolve),o=[],a=0,s=1;yo(e,(function(e){var c=a++,u=!1;s++,f(n,t,e).then((function(e){u||(u=!0,o[c]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Oo=Ai.CONSTRUCTOR,Io=Ii&&Ii.prototype;if(Rt({target:"Promise",proto:!0,forced:Oo,real:!0},{catch:function(e){return this.then(void 0,e)}}),j(Ii)){var Eo=R("Promise").prototype.catch;Io.catch!==Eo&&tt(Io,"catch",Eo,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:So},{race:function(e){var t=this,n=Ni.f(t),r=n.reject,i=xi((function(){var i=J(t.resolve);yo(e,(function(e){f(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}}),Rt({target:"Promise",stat:!0,forced:Ai.CONSTRUCTOR},{reject:function(e){var t=Ni.f(this);return f(t.reject,void 0,e),t.promise}});var ko=Ai.CONSTRUCTOR;R("Promise"),Rt({target:"Promise",stat:!0,forced:ko},{resolve:function(e){return function(e,t){if(Ee(e),M(t)&&t.constructor===e)return t;var n=Ni.f(e);return(0,n.resolve)(t),n.promise}(this,e)}});var To=o.String,jo=function(e){if("Symbol"===Bt(e))throw TypeError("Cannot convert a Symbol value to a string");return To(e)},Mo=b("".charAt),Po=b("".charCodeAt),Ro=b("".slice),Co=function(e){return function(t,n){var r,i,o=jo(k(t)),a=ot(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=Po(o,a))<55296||r>56319||a+1===s||(i=Po(o,a+1))<56320||i>57343?e?Mo(o,a):r:e?Ro(o,a,a+2):i-56320+(r-55296<<10)+65536}},Ao={codeAt:Co(!1),charAt:Co(!0)},zo=Ao.charAt,No=Ze.set,Do=Ze.getterFor("String Iterator");Zn(String,"String",(function(e){No(this,{type:"String Iterator",string:jo(e),index:0})}),(function(){var e,t=Do(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=zo(n,r),t.index+=e.length,{value:e,done:!1})}));var Lo={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},Uo=be("span").classList,Fo=Uo&&Uo.constructor&&Uo.constructor.prototype,Bo=Fo===Object.prototype?void 0:Fo,Vo=function(e){if(e&&e.forEach!==an)try{Pe(e,"forEach",an)}catch(t){e.forEach=an}};for(var qo in Lo)Lo[qo]&&Vo(o[qo]&&o[qo].prototype);Vo(Bo);var Ko=he("iterator"),Wo=he("toStringTag"),Go=rr.values,Jo=function(e,t){if(e){if(e[Ko]!==Go)try{Pe(e,Ko,Go)}catch(t){e[Ko]=Go}if(e[Wo]||Pe(e,Wo,t),Lo[t])for(var n in rr)if(e[n]!==rr[n])try{Pe(e,n,rr[n])}catch(t){e[n]=rr[n]}}};for(var $o in Lo)Jo(o[$o]&&o[$o].prototype,$o);Jo(Bo,"DOMTokenList");var Xo=function(){return Xo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Xo.apply(this,arguments)};function Qo(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Yo(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Qo(arguments[t]));return e}var Ho=sr("splice"),Zo=o.TypeError,ea=Math.max,ta=Math.min;Rt({target:"Array",proto:!0,forced:!Ho},{splice:function(e,t){var n,r,i,o,a,s,c=te(this),u=lt(c),f=ct(e,u),l=arguments.length;if(0===l?n=r=0:1===l?(n=0,r=u-f):(n=l-2,r=ta(ea(ot(t),0),u-f)),u+n-r>9007199254740991)throw Zo("Maximum allowed length exceeded");for(i=Zt(c,r),o=0;o<r;o++)(a=f+o)in c&&or(i,o,c[a]);if(i.length=r,n<r){for(o=f;o<u-r;o++)s=o+n,(a=o+r)in c?c[s]=c[a]:delete c[s];for(o=u;o>u-r+n;o--)delete c[o-1]}else if(n>r)for(o=u-r;o>f;o--)s=o+n-1,(a=o+r-1)in c?c[s]=c[a]:delete c[s];for(o=0;o<n;o++)c[o+f]=arguments[o+2];return c.length=u-r+n,i}});var na=function(){function e(){this._hooks={},this._cache=[],this._hooksCache={}}return e.prototype.on=function(e,t){e&&t&&"function"==typeof t&&(this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t))},e.prototype.once=function(e,t){var n=this;if(e&&t&&"function"==typeof t){this.on(e,(function r(i){t(i),n.off(e,r)}))}},e.prototype.off=function(e,t){if(e&&this._hooks[e]&&this._hooks[e].length)if(t){var n=this._hooks[e].indexOf(t);-1!==n&&this._hooks[e].splice(n,1)}else this._hooks[e]=[]},e.prototype.emit=function(e,t,n){if(n){if(!e)return;-1!==this._cache.indexOf(n)?this._emit(e,t):(this._hooksCache.hasOwnProperty(n)||(this._hooksCache[n]={}),this._hooksCache[n].hasOwnProperty(e)||(this._hooksCache[n][e]=[]),this._hooksCache[n][e].push(t))}else this._emit(e,t)},e.prototype._emit=function(e,t){e&&this._hooks[e]&&this._hooks[e].length&&Yo(this._hooks[e]).forEach((function(e){try{e(t)}catch(e){}}))},e.prototype.set=function(e){e&&-1===this._cache.indexOf(e)&&this._cache.push(e)},e}(),ra=b([].join),ia=I!=Object,oa=rn("join",",");Rt({target:"Array",proto:!0,forced:ia||!oa},{join:function(e){return ra(T(this),void 0===e?",":e)}});var aa=nn.map,sa=sr("map");Rt({target:"Array",proto:!0,forced:!sa},{map:function(e){return aa(this,e,arguments.length>1?arguments[1]:void 0)}});var ca=function(e,t,n){var r,i;return Gn&&j(r=t.constructor)&&r!==n&&M(i=r.prototype)&&i!==n.prototype&&Gn(e,i),e},ua=b(1..valueOf),fa="\t\n\v\f\r \u2028\u2029\ufeff",la=b("".replace),ha="["+fa+"]",pa=RegExp("^"+ha+ha+"*"),da=RegExp(ha+ha+"*$"),ga=function(e){return function(t){var n=jo(k(t));return 1&e&&(n=la(n,pa,"")),2&e&&(n=la(n,da,"")),n}},va={start:ga(1),end:ga(2),trim:ga(3)},ma=bt.f,ya=xe.f,ba=Me.f,wa=va.trim,_a=o.Number,xa=_a.prototype,Sa=o.TypeError,Oa=b("".slice),Ia=b("".charCodeAt),Ea=function(e){var t=ge(e,"number");return"bigint"==typeof t?t:ka(t)},ka=function(e){var t,n,r,i,o,a,s,c,u=ge(e,"number");if(q(u))throw Sa("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=wa(u),43===(t=Ia(u,0))||45===t){if(88===(n=Ia(u,2))||120===n)return NaN}else if(48===t){switch(Ia(u,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+u}for(a=(o=Oa(u,2)).length,s=0;s<a;s++)if((c=Ia(o,s))<48||c>i)return NaN;return parseInt(o,r)}return+u};if(Mt("Number",!_a(" 0o1")||!_a("0b1")||_a("+0x1"))){for(var Ta,ja=function(e){var t=arguments.length<1?0:_a(Ea(e)),n=this;return C(xa,n)&&a((function(){ua(n)}))?ca(Object(t),n,ja):t},Ma=s?ma(_a):"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(","),Pa=0;Ma.length>Pa;Pa++)re(_a,Ta=Ma[Pa])&&!re(ja,Ta)&&ba(ja,Ta,ya(_a,Ta));ja.prototype=xa,xa.constructor=ja,tt(o,"Number",ja,{constructor:!0})}var Ra=a((function(){hn(1)}));Rt({target:"Object",stat:!0,forced:Ra},{keys:function(e){return hn(te(e))}});var Ca=va.trim,Aa=o.parseInt,za=o.Symbol,Na=za&&za.iterator,Da=/^[+-]?0x/i,La=b(Da.exec),Ua=8!==Aa(fa+"08")||22!==Aa(fa+"0x16")||Na&&!a((function(){Aa(Object(Na))}))?function(e,t){var n=Ca(jo(e));return Aa(n,t>>>0||(La(Da,n)?16:10))}:Aa;Rt({global:!0,forced:parseInt!=Ua},{parseInt:Ua});var Fa=function(){var e=Ee(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Ba=o.RegExp,Va=a((function(){var e=Ba("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),qa=Va||a((function(){return!Ba("a","y").sticky})),Ka={BROKEN_CARET:Va||a((function(){var e=Ba("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:qa,UNSUPPORTED_Y:Va},Wa=o.RegExp,Ga=a((function(){var e=Wa(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Ja=o.RegExp,$a=a((function(){var e=Ja("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Xa=Ze.get,Qa=Z("native-string-replace",String.prototype.replace),Ya=RegExp.prototype.exec,Ha=Ya,Za=b("".charAt),es=b("".indexOf),ts=b("".replace),ns=b("".slice),rs=function(){var e=/a/,t=/b*/g;return f(Ya,e,"a"),f(Ya,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),is=Ka.BROKEN_CARET,os=void 0!==/()??/.exec("")[1];(rs||os||is||Ga||$a)&&(Ha=function(e){var t,n,r,i,o,a,s,c=this,u=Xa(c),l=jo(e),h=u.raw;if(h)return h.lastIndex=c.lastIndex,t=f(Ha,h,l),c.lastIndex=h.lastIndex,t;var p=u.groups,d=is&&c.sticky,g=f(Fa,c),v=c.source,m=0,y=l;if(d&&(g=ts(g,"y",""),-1===es(g,"g")&&(g+="g"),y=ns(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Za(l,c.lastIndex-1))&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),os&&(n=new RegExp("^"+v+"$(?!\\s)",g)),rs&&(r=c.lastIndex),i=f(Ya,d?n:c,y),d?i?(i.input=ns(i.input,m),i[0]=ns(i[0],m),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:rs&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),os&&i&&i.length>1&&f(Qa,i[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i&&p)for(i.groups=a=_n(null),o=0;o<p.length;o++)a[(s=p[o])[0]]=i[s[1]];return i});var as=Ha;Rt({target:"RegExp",proto:!0,forced:/./.exec!==as},{exec:as});var ss=RegExp.prototype,cs=function(e){var t=e.flags;return void 0!==t||"flags"in ss||re(e,"flags")||!C(ss,e)?t:f(Fa,e)},us=ze.PROPER,fs=RegExp.prototype.toString,ls=a((function(){return"/a/b"!=fs.call({source:"a",flags:"b"})})),hs=us&&"toString"!=fs.name;(ls||hs)&&tt(RegExp.prototype,"toString",(function(){var e=Ee(this);return"/"+jo(e.source)+"/"+jo(cs(e))}),{unsafe:!0});var ps=he("species"),ds=RegExp.prototype,gs=function(e,t,n,r){var i=he(e),o=!a((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=o&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ps]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!o||!s||n){var c=b(/./[i]),u=t(i,""[e],(function(e,t,n,r,i){var a=b(e),s=t.exec;return s===as||s===ds.exec?o&&!i?{done:!0,value:c(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));tt(String.prototype,e,u[0]),tt(ds,i,u[1])}r&&Pe(ds[i],"sham",!0)},vs=Ao.charAt,ms=function(e,t,n){return t+(n?vs(e,t).length:1)},ys=o.TypeError,bs=function(e,t){var n=e.exec;if(j(n)){var r=f(n,e,t);return null!==r&&Ee(r),r}if("RegExp"===x(e))return f(as,e,t);throw ys("RegExp#exec called on incompatible receiver")};gs("match",(function(e,t,n){return[function(t){var n=k(this),r=null==t?void 0:$(t,e);return r?f(r,t,n):new RegExp(t)[e](jo(n))},function(e){var r=Ee(this),i=jo(e),o=n(t,r,i);if(o.done)return o.value;if(!r.global)return bs(r,i);var a=r.unicode;r.lastIndex=0;for(var s,c=[],u=0;null!==(s=bs(r,i));){var f=jo(s[0]);c[u]=f,""===f&&(r.lastIndex=ms(i,ft(r.lastIndex),a)),u++}return 0===u?null:c}]}));var ws=Math.floor,_s=b("".charAt),xs=b("".replace),Ss=b("".slice),Os=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Is=/\$([$&'`]|\d{1,2})/g,Es=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,c=Is;return void 0!==i&&(i=te(i),c=Os),xs(o,c,(function(o,c){var u;switch(_s(c,0)){case"$":return"$";case"&":return e;case"`":return Ss(t,0,n);case"'":return Ss(t,a);case"<":u=i[Ss(c,1,-1)];break;default:var f=+c;if(0===f)return o;if(f>s){var l=ws(f/10);return 0===l?o:l<=s?void 0===r[l-1]?_s(c,1):r[l-1]+_s(c,1):o}u=r[f-1]}return void 0===u?"":u}))},ks=he("replace"),Ts=Math.max,js=Math.min,Ms=b([].concat),Ps=b([].push),Rs=b("".indexOf),Cs=b("".slice),As="$0"==="a".replace(/./,"$0"),zs=!!/./[ks]&&""===/./[ks]("a","$0");gs("replace",(function(e,t,n){var r=zs?"$":"$0";return[function(e,n){var r=k(this),i=null==e?void 0:$(e,ks);return i?f(i,e,r,n):f(t,jo(r),e,n)},function(e,i){var o=Ee(this),a=jo(e);if("string"==typeof i&&-1===Rs(i,r)&&-1===Rs(i,"$<")){var s=n(t,o,a,i);if(s.done)return s.value}var c=j(i);c||(i=jo(i));var u=o.global;if(u){var f=o.unicode;o.lastIndex=0}for(var l=[];;){var h=bs(o,a);if(null===h)break;if(Ps(l,h),!u)break;""===jo(h[0])&&(o.lastIndex=ms(a,ft(o.lastIndex),f))}for(var p,d="",g=0,v=0;v<l.length;v++){for(var m=jo((h=l[v])[0]),y=Ts(js(ot(h.index),a.length),0),b=[],w=1;w<h.length;w++)Ps(b,void 0===(p=h[w])?p:String(p));var _=h.groups;if(c){var x=Ms([m],b,y,a);void 0!==_&&Ps(x,_);var S=jo(Ur(i,void 0,x))}else S=Es(m,a,y,b,_,i);y>=g&&(d+=Cs(a,g,y)+S,g=y+m.length)}return d+Cs(a,g)}]}),!!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!As||zs);var Ns=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};gs("search",(function(e,t,n){return[function(t){var n=k(this),r=null==t?void 0:$(t,e);return r?f(r,t,n):new RegExp(t)[e](jo(n))},function(e){var r=Ee(this),i=jo(e),o=n(t,r,i);if(o.done)return o.value;var a=r.lastIndex;Ns(a,0)||(r.lastIndex=0);var s=bs(r,i);return Ns(r.lastIndex,a)||(r.lastIndex=a),null===s?-1:s.index}]}));var Ds=he("match"),Ls=function(e){var t;return M(e)&&(void 0!==(t=e[Ds])?!!t:"RegExp"==x(e))},Us=o.Array,Fs=Math.max,Bs=function(e,t,n){for(var r=lt(e),i=ct(t,r),o=ct(void 0===n?r:n,r),a=Us(Fs(o-i,0)),s=0;i<o;i++,s++)or(a,s,e[i]);return a.length=s,a},Vs=Ka.UNSUPPORTED_Y,qs=Math.min,Ks=[].push,Ws=b(/./.exec),Gs=b(Ks),Js=b("".slice);gs("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=jo(k(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!Ls(e))return f(t,r,e,i);for(var o,a,s,c=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,h=new RegExp(e.source,u+"g");(o=f(as,h,r))&&!((a=h.lastIndex)>l&&(Gs(c,Js(r,l,o.index)),o.length>1&&o.index<r.length&&Ur(Ks,c,Bs(o,1)),s=o[0].length,l=a,c.length>=i));)h.lastIndex===o.index&&h.lastIndex++;return l===r.length?!s&&Ws(h,"")||Gs(c,""):Gs(c,Js(r,l)),c.length>i?Bs(c,0,i):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:f(t,this,e,n)}:t,[function(t,n){var i=k(this),o=null==t?void 0:$(t,e);return o?f(o,t,i,n):f(r,jo(i),t,n)},function(e,i){var o=Ee(this),a=jo(e),s=n(r,o,a,i,r!==t);if(s.done)return s.value;var c=zr(o,RegExp),u=o.unicode,f=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Vs?"g":"y"),l=new c(Vs?"^(?:"+o.source+")":o,f),h=void 0===i?4294967295:i>>>0;if(0===h)return[];if(0===a.length)return null===bs(l,a)?[a]:[];for(var p=0,d=0,g=[];d<a.length;){l.lastIndex=Vs?0:d;var v,m=bs(l,Vs?Js(a,d):a);if(null===m||(v=qs(ft(l.lastIndex+(Vs?d:0)),a.length))===p)d=ms(a,d,u);else{if(Gs(g,Js(a,p,d)),g.length===h)return g;for(var y=1;y<=m.length-1;y++)if(Gs(g,m[y]),g.length===h)return g;d=p=v}}return Gs(g,Js(a,p)),g}]}),!!a((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Vs);var $s,Xs=function(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)},Qs=($s=+Date.now()+Number((""+Math.random()).slice(2,8)),function(){return $s+=1}),Ys=function(e){return function(e,t,n){if("string"==typeof e&&"number"==typeof t&&"number"==typeof n){var r,i=[];n=n<=25?n:n%25;var o=String.fromCharCode(n+97);r=e.split(o);for(var a=0;a<r.length;a++){var s=parseInt(r[a],n);s=1*s^t;var c=String.fromCharCode(s);i.push(c)}return i.join("")}}(e,64,25)},Hs=function(e){var t=document.createElement("a");return t.href=e,t},Zs=va.trim,ec=b("".charAt),tc=o.parseFloat,nc=o.Symbol,rc=nc&&nc.iterator,ic=1/tc(fa+"-0")!=-1/0||rc&&!a((function(){tc(Object(rc))}))?function(e){var t=Zs(jo(e)),n=tc(t);return 0===n&&"-"==ec(t,0)?-0:n}:tc;Rt({global:!0,forced:parseFloat!=ic},{parseFloat:ic});var oc=Me.f,ac=function(e,t,n){n in e||oc(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},sc=bt.f,cc=Ze.enforce,uc=he("match"),fc=o.RegExp,lc=fc.prototype,hc=o.SyntaxError,pc=b(lc.exec),dc=b("".charAt),gc=b("".replace),vc=b("".indexOf),mc=b("".slice),yc=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,bc=/a/g,wc=/a/g,_c=new fc(bc)!==bc,xc=Ka.MISSED_STICKY,Sc=Ka.UNSUPPORTED_Y,Oc=s&&(!_c||xc||Ga||$a||a((function(){return wc[uc]=!1,fc(bc)!=bc||fc(wc)==wc||"/a/i"!=fc(bc,"i")})));if(Mt("RegExp",Oc)){for(var Ic=function(e,t){var n,r,i,o,a,s,c=C(lc,this),u=Ls(e),f=void 0===t,l=[],h=e;if(!c&&u&&f&&e.constructor===Ic)return e;if((u||C(lc,e))&&(e=e.source,f&&(t=cs(h))),e=void 0===e?"":jo(e),t=void 0===t?"":jo(t),h=e,Ga&&"dotAll"in bc&&(r=!!t&&vc(t,"s")>-1)&&(t=gc(t,/s/g,"")),n=t,xc&&"sticky"in bc&&(i=!!t&&vc(t,"y")>-1)&&Sc&&(t=gc(t,/y/g,"")),$a&&(o=function(e){for(var t,n=e.length,r=0,i="",o=[],a={},s=!1,c=!1,u=0,f="";r<=n;r++){if("\\"===(t=dc(e,r)))t+=dc(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:pc(yc,mc(e,r+1))&&(r+=2,c=!0),i+=t,u++;continue;case">"===t&&c:if(""===f||re(a,f))throw new hc("Invalid capture group name");a[f]=!0,o[o.length]=[f,u],c=!1,f="";continue}c?f+=t:i+=t}return[i,o]}(e),e=o[0],l=o[1]),a=ca(fc(e,t),c?this:lc,Ic),(r||i||l.length)&&(s=cc(a),r&&(s.dotAll=!0,s.raw=Ic(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(t=dc(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+dc(e,++r);return i}(e),n)),i&&(s.sticky=!0),l.length&&(s.groups=l)),e!==h)try{Pe(a,"source",""===h?"(?:)":h)}catch(e){}return a},Ec=sc(fc),kc=0;Ec.length>kc;)ac(Ic,fc,Ec[kc++]);lc.constructor=Ic,Ic.prototype=lc,tt(o,"RegExp",Ic,{constructor:!0})}Pr("RegExp");var Tc,jc=ze.PROPER,Mc=va.trim;Rt({target:"String",proto:!0,forced:(Tc="trim",a((function(){return!!fa[Tc]()||"
"!=="
"[Tc]()||jc&&fa[Tc].name!==Tc})))},{trim:function(){return Mc(this)}});var Pc=function(){function e(e){this.appid=e,this.userAgent=window.navigator.userAgent,this.appVersion=window.navigator.appVersion}return e.prototype.init=function(){var e=window.navigator.userAgent,t=window.navigator.language,n=document.referrer,r=n?Hs(n).hostname:"";!function(e){var t={};try{var n=Hs(e).search;(n=n.slice(1)).split("&").forEach((function(e){var n,r,i=e.split("=");i.length&&(n=i[0],r=i[1]);try{t[n]=decodeURIComponent(void 0===r?"":r)}catch(e){t[n]=r}}))}catch(e){}}(window.location.href);var i=/Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion)?"wap":"web",o=this.browser(),a=this.os();return{browser:o.browser,browser_version:o.browser_version,platform:i,os_name:a.os_name,os_version:a.os_version,userAgent:e,screen_width:window.screen&&window.screen.width,screen_height:window.screen&&window.screen.height,device_model:this.getDeviceModel(a.os_name),language:t,referrer:n,referrer_host:r}},e.prototype.browser=function(){var e,t,n="",r=""+parseFloat(this.appVersion),i=this.userAgent;return-1!==i.indexOf("Edge")||-1!==i.indexOf("Edg")?(n="Microsoft Edge",-1!==i.indexOf("Edge")?(e=i.indexOf("Edge"),r=i.substring(e+5)):(e=i.indexOf("Edg"),r=i.substring(e+4))):-1!==(e=i.indexOf("MSIE"))?(n="Microsoft Internet Explorer",r=i.substring(e+5)):-1!==(e=i.indexOf("Lark"))?(n="Lark",r=i.substring(e+5,e+11)):-1!==(e=i.indexOf("MetaSr"))?(n="sougoubrowser",r=i.substring(e+7,e+10)):-1!==i.indexOf("MQQBrowser")||-1!==i.indexOf("QQBrowser")?(n="qqbrowser",-1!==i.indexOf("MQQBrowser")?(e=i.indexOf("MQQBrowser"),r=i.substring(e+11,e+15)):-1!==i.indexOf("QQBrowser")&&(e=i.indexOf("QQBrowser"),r=i.substring(e+10,e+17))):-1!==i.indexOf("Chrome")?-1!==(e=i.indexOf("MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=i.indexOf("360"))?(n="360browser",r=i.substring(i.indexOf("Chrome")+7)):-1!==i.indexOf("baidubrowser")||-1!==i.indexOf("BIDUBrowser")?(-1!==i.indexOf("baidubrowser")?(e=i.indexOf("baidubrowser"),r=i.substring(e+13,e+16)):-1!==i.indexOf("BIDUBrowser")&&(e=i.indexOf("BIDUBrowser"),r=i.substring(e+12,e+15)),n="baidubrowser"):-1!==(e=i.indexOf("xiaomi"))?-1!==i.indexOf("openlanguagexiaomi")?(n="openlanguage xiaomi",r=i.substring(e+7,e+13)):(n="xiaomi",r=i.substring(e-7,e-1)):-1!==(e=i.indexOf("TTWebView"))?(n="TTWebView",r=i.substring(e+10,e+23)):(-1!==(e=i.indexOf("Chrome"))||-1!==(e=i.indexOf("Chrome")))&&(n="Chrome",r=i.substring(e+7)):-1!==i.indexOf("Safari")?-1!==(e=i.indexOf("QQ"))?(n="qqbrowser",r=i.substring(e+10,e+16)):-1!==(e=i.indexOf("Safari"))&&(n="Safari",r=i.substring(e+7),-1!==(e=i.indexOf("Version"))&&(r=i.substring(e+8))):-1!==(e=i.indexOf("Firefox"))?(n="Firefox",r=i.substring(e+8)):-1!==(e=i.indexOf("MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=i.indexOf("QQ"))?(n="qqbrowser",r=i.substring(e+3,e+8)):-1!==(e=i.indexOf("Opera"))&&(n="Opera",r=i.substring(e+6),-1!==(e=i.indexOf("Version"))&&(r=i.substring(e+8))),-1!==(t=r.indexOf(";"))&&(r=r.substring(0,t)),-1!==(t=r.indexOf(" "))&&(r=r.substring(0,t)),-1!==(t=r.indexOf(")"))&&(r=r.substring(0,t)),{browser:n,browser_version:r}},e.prototype.os=function(){for(var e="",t="",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)/}],r=0;r<n.length;r++){var i=n[r];if(i.r.test(this.userAgent)){"Mac OS X"===(e=i.s)&&this.isNewIpad()&&(e="iOS");break}}var o=function(e,t){var n=e.exec(t);return n&&n[1]?n[1]:""},a=function(e,t){var n=RegExp("(?:^|[^A-Z0-9-_]|[^A-Z0-9-]_|sprd-)(?:"+e+")","i").exec(t);return n?n.slice(1)[0]:""};/Windows/.test(e)&&(t=o(/Windows (.*)/,e),e="windows");switch(e){case"Mac OS X":t=a("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent),e="mac";break;case"Android":t=function(e){var t=o(/Android ([\.\_\d]+)/,e);return t||(t=o(/Android\/([\.\_\d]+)/,e)),t}(this.userAgent),e="android";break;case"iOS":t=this.isNewIpad()?a("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent):(t=/OS (\d+)_(\d+)_?(\d+)?/.exec(this.appVersion))?t[1]+"."+t[2]+"."+(0|t[3]):"",e="ios"}return{os_name:e,os_version:t}},e.prototype.getDeviceModel=function(e){var t="";try{if("android"===e)navigator.userAgent.split(";").forEach((function(e){e.indexOf("Build/")>-1&&(t=e.slice(0,e.indexOf("Build/")))}));else if("ios"===e||"mac"===e||"windows"===e)if(this.isNewIpad())t="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),r=n.indexOf(";");t=n.slice(0,r)}}catch(e){return t.trim()}return t.trim()},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),Rc=t((function(e,t){e.exports=function(){function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function t(n,r){function i(t,i,o){if("undefined"!=typeof document){"number"==typeof(o=e({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+="; "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=t+"="+n.write(i,t)+a}}function o(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},i=0;i<t.length;i++){var o=t[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=n.read(a,s),e===s)break}catch(e){}}return e?r[e]:r}}return Object.create({set:i,get:o,remove:function(t,n){i(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}return t({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()})),Cc=Rc,Ac=function(){function e(){this.cache={}}return e.prototype.setItem=function(e,t){this.cache[e]=t},e.prototype.getItem=function(e){return this.cache[e]},e.prototype.removeItem=function(e){this.cache[e]=void 0},e.prototype.getCookie=function(e){this.getItem(e)},e.prototype.setCookie=function(e,t){this.setItem(e,t)},e}();var zc,Nc={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(e){}return n||{}}catch(e){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:JSON.stringify(t);localStorage.setItem(e,n)}catch(e){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(e){}},getCookie:function(e,t){try{return Cc.get(e,{domain:t||document.domain})}catch(e){return""}},setCookie:function(e,t,n,r){try{var i=r||document.domain,o=+new Date+n;Cc.set(e,t,{expires:new Date(o),path:"/",domain:i})}catch(e){}},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},Dc={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(e){}return n||{}}catch(e){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:JSON.stringify(t);sessionStorage.setItem(e,n)}catch(e){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(e){}},getCookie:function(e){this.getItem(e)},setCookie:function(e,t){this.setItem(e,t)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},Lc=function(){function e(e,t){this._storage=t&&"session"===t?Dc:!e&&Nc.isSupportLS?Nc:new Ac}return e.prototype.getItem=function(e){return this._storage.getItem(e)},e.prototype.setItem=function(e,t){this._storage.setItem(e,t)},e.prototype.getCookie=function(e,t){return this._storage.getCookie(e,t)},e.prototype.setCookie=function(e,t,n,r){this._storage.setCookie(e,t,n,r)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),Uc={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az24z1mz1jz1az1cz18z1nz1nz1jz1mz1ez4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},Fc=void 0,Bc=(new Date).getTimezoneOffset(),Vc=parseInt(""+-Bc/60,10),qc=60*Bc,Kc=function(){function e(e,t){this.is_first_time=!0,this.initConfig=t,this.collect=e;var n=new Pc(t.app_id).init(),r="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new Lc(!1,"session"),this.localStorage=new Lc(!1,"local");var i=this.localStorage.getItem(r);i&&1==i?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(r,"1")),this.envInfo={user:{user_unique_id:Fc,user_type:Fc,user_id:Fc,user_is_auth:Fc,user_is_login:Fc,device_id:Fc,web_id:Fc,user_unique_id_type:Fc},header:{app_id:Fc,app_name:Fc,app_install_id:Fc,install_id:Fc,app_package:Fc,app_channel:Fc,app_version:Fc,ab_version:Fc,os_name:n.os_name,os_version:n.os_version,device_model:n.device_model,ab_client:Fc,traffic_type:Fc,client_ip:Fc,device_brand:Fc,os_api:Fc,access:Fc,language:n.language,region:Fc,app_language:Fc,app_region:Fc,creative_id:Fc,ad_id:Fc,campaign_id:Fc,log_type:Fc,rnd:Fc,platform:n.platform,sdk_version:"0.0.3-lite",sdk_lib:"js",province:Fc,city:Fc,timezone:Vc,tz_offset:qc,tz_name:Fc,sim_region:Fc,carrier:Fc,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:Fc,utm_content:Fc,utm_source:Fc,utm_medium:Fc,utm_campaign:Fc,custom:{},wechat_unionid:Fc,wechat_openid:Fc}},this.evtParams={},this.reportErrorCallback=function(){},this.initDomain()}return e.prototype.initDomain=function(){var e=this.initConfig.channel_domain;if(e)this.domain=e;else{var t=this.initConfig.channel;this.domain=Ys(Uc[t])}},e.prototype.setDomain=function(e){this.domain=e},e.prototype.getDomain=function(){return this.domain},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.initConfig.report_url||"/list";break;case"webid":t="/webid"}return""+this.getDomain()+t},e.prototype.set=function(e){var t=this;Object.keys(e).forEach((function(n){"evtParams"===n?t.evtParams=Xo({},t.evtParams||{},e.evtParams||{}):"_staging_flag"===n?t.evtParams=Xo({},t.evtParams||{},{_staging_flag:e._staging_flag}):"reportErrorCallback"===n&&"function"==typeof e[n]?t.reportErrorCallback=e[n]:Object.hasOwnProperty.call(t.envInfo.user,n)?["user_id","web_id","user_unique_id"].indexOf(n)>-1&&(t.envInfo.user[n]=e[n]?String(e[n]):e[n]):Object.hasOwnProperty.call(t.envInfo.header,n)?t.envInfo.header[n]=e[n]:t.envInfo.header.custom[n]=e[n]}))},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(JSON.stringify(this.envInfo[e])):JSON.parse(JSON.stringify(this.envInfo))}catch(e){console.log("get config stringify error ")}},e}();!function(e){e.Init="init",e.Config="config",e.Start="start",e.Ready="ready",e.TokenComplete="token-complete",e.TokenStorage="token-storage",e.TokenFetch="token-fetch",e.TokenError="token-error",e.ConfigUuid="config-uuid",e.TokenChange="token-change",e.TokenReset="token-reset",e.SessionReset="session-reset",e.SessionResetTime="session-reset-time",e.Event="event",e.Events="events",e.EventNow="event-now",e.CleanEvents="clean-events",e.BeconEvent="becon-event"}(zc||(zc={}));var Wc=zc,Gc=/MSIE .\./.test(A),Jc=o.Function,$c=function(e){return Gc?function(t,n){var r=Br(arguments.length,1)>2,i=j(t)?t:Jc(t),o=r?cr(arguments,2):void 0;return e(r?function(){Ur(i,this,o)}:i,n)}:e},Xc={setTimeout:$c(o.setTimeout),setInterval:$c(o.setInterval)},Qc=Xc.setInterval;Rt({global:!0,bind:!0,forced:o.setInterval!==Qc},{setInterval:Qc});var Yc=Xc.setTimeout;Rt({global:!0,bind:!0,forced:o.setTimeout!==Yc},{setTimeout:Yc});var Hc=500,Zc=5005;function eu(e,t,n,r,i,o,a,s,c){try{var u=new XMLHttpRequest,f=s||"POST";u.open(f,""+e,!0),u.setRequestHeader("Content-Type","application/json; charset=utf-8"),n&&(u.timeout=n,u.ontimeout=function(){o&&o(t,Zc)}),u.onload=function(){if(i){var e=null;if(u.responseText){try{e=JSON.parse(u.responseText)}catch(t){e={}}i(e,t)}}},u.onerror=function(){u.abort(),o&&o(t,Hc)},c?u.send(t):u.send(JSON.stringify(t))}catch(e){}}var tu=4003,nu=function(){function e(){this.eventLimit=50,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.cacheStorgae=new Lc(!0),this.localStorage=new Lc(!1),this.maxReport=t.max_report||20,this.reportTime=t.reportTime||30,this.timeout=t.timeout||1e5,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.collect.on(Wc.Ready,(function(){n.reportAll(!1)})),this.collect.on(Wc.Event,(function(e){n.event(e)})),this.collect.on(Wc.BeconEvent,(function(e){n.beconEvent(e)})),this.linster()},e.prototype.linster=function(){var e,t=this;window.addEventListener("unload",(function(){t.reportAll(!0)}),!1),e=function(){t.reportAll(!0)},navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)?window.addEventListener("pagehide",e,!1):window.addEventListener("beforeunload",e,!1),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&t.reportAll(!0)}),!1)},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;try{var n=Yo(e,this.cacheStorgae.getItem(this.eventKey)||[]);if(this.cacheStorgae.setItem(this.eventKey,n),this.reportTimeout&&clearTimeout(this.reportTimeout),n.length>=this.maxReport)this.report(!1);else{var r=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),r)}}catch(e){}},e.prototype.beconEvent=function(e){var t=Yo(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.destroyInstance||this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(t)),!0))},e.prototype.reportBecon=function(){var e=this.cacheStorgae.getItem(this.beconKey)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))},e.prototype.report=function(e){if(!this.collect.destroyInstance&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))}},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n<e.length;n+=this.eventLimit){var r;r=e.slice(n,n+this.eventLimit);var i=this.split(this.merge(r));this.send(i,t)}else{i=this.split(this.merge(e));this.send(i,t)}},e.prototype.merge=function(e){var t=this,n=this.configManager.get(),r=n.header,i=n.user;r.custom=JSON.stringify(r.custom);var o=this.configManager.get("evtParams"),a=e.map((function(e){try{return Object.keys(o).length&&(e.params=Xo({},o,e.params)),e.session_id=t.collect.sessionManager.getSessionId(),e.params=JSON.stringify(e.params),e}catch(t){return e}})),s=[];if(!Object.keys(i).length)return console.warn("user info error,cant report"),s;var c=JSON.parse(JSON.stringify({events:a,user:i,header:r}));return c.local_time=Math.floor(Date.now()/1e3),c.verbose=1,s.push(c),s},e.prototype.split=function(e){return e=e.map((function(e){var t=[];return t.push(e),t}))},e.prototype.send=function(e,t){var n=this;e.length&&e.forEach((function(e){try{if(!e.length)return;!function(e,t,n,r,i,o,a,s){a&&window.navigator&&window.navigator.sendBeacon?window.navigator.sendBeacon(e,JSON.stringify(t))?i():o(e,t,tu):eu(e,t,n,0,i,o,0,"",s)}(n.reportUrl,e,n.timeout,0,(function(e,t){}),(function(e,t){n.configManager.get("reportErrorCallback")(e,t)}),t,!1)}catch(e){console.warn("something error, "+JSON.stringify(e.stack))}}))},e}(),ru=function e(t){return t?(t^16*Math.random()>>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},iu=function(){return ru().replace(/-/g,"").slice(0,19)},ou=function(){function e(){this.cacheToken={}}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new Lc(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.collect.on(Wc.ConfigUuid,(function(e){n.setUuid(e)})),this.checkStorage()},e.prototype.checkStorage=function(){this.cacheToken=this.storage.getItem(this.tokenKey)||{},this.check()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.remoteWebid()},e.prototype.remoteWebid=function(){var e=this,t=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:""},r=iu();eu(t,n,3e5,0,(function(t){var n;t&&0===t.e?n=t.web_id:(n=r,e.collect.configManager.set({localWebId:r}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")),e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})}),(function(){e.complete({web_id:e.configManager.get("web_id")||r,user_unique_id:e.configManager.get("user_unique_id")||r}),e.collect.configManager.set({localWebId:r}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")}))},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id;t||n?(e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(Wc.TokenComplete)):console.warn("token error")},e.prototype.setUuid=function(e){if(e&&-1===["null","undefined","Null","None"].indexOf(e)){var t=String(e),n=this.configManager.get("user_unique_id"),r=this.cacheToken&&this.cacheToken.user_unique_id;if(t===n&&t===r)return;this.configManager.set({user_unique_id:t}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=t,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(Wc.TokenReset))},e.prototype.setStorage=function(e){e._type_="default",this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e}(),au=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},su=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new Lc(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSession||(this.setSessionId(),this.collect.on(Wc.SessionReset,(function(){n.resetSessionId()})),this.collect.on(Wc.SessionResetTime,(function(){n.updateSessionIdTime()})))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;Date.now()-t>this.expireTime?e={sessionId:au(),timestamp:Date.now()}:e.timestamp=Date.now(),this.storage.setItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:au(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,t),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime)},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.resetSessionId=function(){var e={sessionId:au(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,e)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&(Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:au(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e)))},e}(),cu=function(){function e(e){this.disableAutoPageView=!1,this.staging=!1,this.sended=!1,this.started=!1,this.adapters={},this.sdkReady=!1,this.name=e,this.hook=new na,this.Types=Wc,this.adapters.fetch=eu,this.adapters.storage=Lc}return e.prototype.init=function(e){var t,n=this;this.inited?console.log("init can be call only one time"):e&&Xs(e)?e.app_id&&("number"==typeof(t=e.app_id)&&!isNaN(t))?!e.app_key||function(e){return"string"==typeof e}(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.inited=!0,this.configManager=new Kc(this,e),this.initConfig=e,e.disable_auto_pv&&(this.disableAutoPageView=!0),this.configManager.set({app_id:e.app_id}),this.eventManager=new nu,this.tokenManager=new ou,this.sessionManager=new su,Promise.all([new Promise((function(e){n.once(Wc.TokenComplete,(function(){e(!0)}))})),new Promise((function(e){n.once(Wc.Start,(function(){e(!0)}))}))]).then((function(){n.sdkReady=!0,n.emit(Wc.Ready),console.info("appid: "+e.app_id+", userInfo:"+JSON.stringify(n.configManager.get("user"))),console.info("appid: "+e.app_id+", sdk is ready, version is 0.0.3-lite, you can report now !!!"),n.pageView()})),this.tokenManager.apply(this,e),this.eventManager.apply(this,e),this.sessionManager.apply(this,e),this.emit(Wc.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.prototype.config=function(e){if(this.inited)if(e&&Xs(e)){e._staging_flag&&1===e._staging_flag&&(this.staging=!0),e.disable_auto_pv&&(this.disableAutoPageView=!0,delete e.disable_auto_pv);var t=Xo({},e);t.user_unique_id;var n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["user_unique_id"]);t.hasOwnProperty("user_unique_id")&&this.emit(Wc.ConfigUuid,t.user_unique_id),this.configManager.set(n)}else console.warn("config params is error, please check");else console.warn("config must be use after function init")},e.prototype.getConfig=function(e){return this.configManager.get(e)},e.prototype.start=function(){this.inited&&!this.sended&&(this.sended=!0,this.emit(Wc.Start))},e.prototype.event=function(e,t){var n=this;try{var r=[];Array.isArray(e)?e.forEach((function(e){r.push(n.processEvent(e[0],e[1]||{}))})):r.push(this.processEvent(e,t)),r.length&&(this.emit(Wc.Event,r),this.emit(Wc.SessionResetTime))}catch(e){console.warn("something error, please check")}},e.prototype.beconEvent=function(e,t){if(Array.isArray(e))console.warn("beconEvent not support batch report, please check");else{var n=[];n.push(this.processEvent(e,t||{})),n.length&&(this.emit(Wc.BeconEvent,n),this.emit(Wc.SessionResetTime))}},e.prototype.processEvent=function(e,t){void 0===t&&(t={});try{var n=e;/^event\./.test(e)&&(n=e.slice(6));var r=t;"object"!=typeof r&&(r={}),r.event_index=Qs();var i=void 0;return r.local_ms?(i=r.local_ms,delete r.local_ms):i=+new Date,{event:n,params:r,local_time_ms:i}}catch(n){return{event:e,params:t}}},e.prototype.on=function(e,t){this.hook.on(e,t)},e.prototype.once=function(e,t){this.hook.once(e,t)},e.prototype.off=function(e,t){this.hook.off(e,t)},e.prototype.emit=function(e,t,n){this.hook.emit(e,t,n)},e.prototype.set=function(e){this.hook.set(e)},e.prototype.pageView=function(){this.disableAutoPageView||this.predefinePageView()},e.prototype.predefinePageView=function(e){void 0===e&&(e={});var t={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)},n=Xo({},t,e);this.event("predefine_pageview",n)},e}(),uu=new cu("default"),fu=cu;exports.Collector=fu,exports.default=uu;
|