PageSpy-2

一个网页调试的脚本做成的库

目前为 2024-07-14 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.cn-greasyfork.org/scripts/483696/1410567/PageSpy-2.js

/**
 * @desc 初始化PageSpy
 * @version 1.9.1
 * @latestTime 2024.7.14
 * @link https://fastly.jsdelivr.net/npm/@huolala-tech/page-spy-browser
 */
/* prettier-ignore */
class initPageSpy {
  constructor(window = globalThis || self) {
    var PageSpy=function(){"use strict";function e(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function t(t,n,r){return(n=e(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=function(e){return e&&e.Math==Math&&e},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof n&&n)||function(){return this}()||n||Function("return this")(),s={},a=function(e){try{return!!e()}catch(e){return!0}},c=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!a((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),l=u,d=Function.prototype.call,f=l?d.bind(d):function(){return d.apply(d,arguments)},h={},p={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,m=g&&!p.call({1:2},1);h.f=m?function(e){var t=g(this,e);return!!t&&t.enumerable}:p;var y,v,A=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b=u,w=Function.prototype,S=w.call,E=b&&w.bind.bind(S,S),x=b?E:function(e){return function(){return S.apply(e,arguments)}},k=x,T=k({}.toString),P=k("".slice),R=function(e){return P(T(e),8,-1)},I=a,C=R,O=Object,L=x("".split),B=I((function(){return!O("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?L(e,""):O(e)}:O,j=function(e){return null==e},D=j,M=TypeError,U=function(e){if(D(e))throw M("Can't call method on "+e);return e},q=B,N=U,_=function(e){return q(N(e))},H="object"==typeof document&&document.all,Q={all:H,IS_HTMLDDA:void 0===H&&void 0!==H},z=Q.all,F=Q.IS_HTMLDDA?function(e){return"function"==typeof e||e===z}:function(e){return"function"==typeof e},G=F,W=Q.all,V=Q.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:G(e)||e===W}:function(e){return"object"==typeof e?null!==e:G(e)},J=i,X=F,Y=function(e,t){return arguments.length<2?(n=J[e],X(n)?n:void 0):J[e]&&J[e][t];var n},$=x({}.isPrototypeOf),K=i,Z="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ee=K.process,te=K.Deno,ne=ee&&ee.versions||te&&te.version,re=ne&&ne.v8;re&&(v=(y=re.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!v&&Z&&(!(y=Z.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=Z.match(/Chrome\/(\d+)/))&&(v=+y[1]);var oe=v,ie=oe,se=a,ae=i.String,ce=!!Object.getOwnPropertySymbols&&!se((function(){var e=Symbol();return!ae(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ie&&ie<41})),ue=ce&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,le=Y,de=F,fe=$,he=Object,pe=ue?function(e){return"symbol"==typeof e}:function(e){var t=le("Symbol");return de(t)&&fe(t.prototype,he(e))},ge=String,me=function(e){try{return ge(e)}catch(e){return"Object"}},ye=F,ve=me,Ae=TypeError,be=function(e){if(ye(e))return e;throw Ae(ve(e)+" is not a function")},we=be,Se=j,Ee=function(e,t){var n=e[t];return Se(n)?void 0:we(n)},xe=f,ke=F,Te=V,Pe=TypeError,Re={exports:{}},Ie=i,Ce=Object.defineProperty,Oe=function(e,t){try{Ce(Ie,e,{value:t,configurable:!0,writable:!0})}catch(n){Ie[e]=t}return t},Le=Oe,Be="__core-js_shared__",je=i[Be]||Le(Be,{}),De=je;(Re.exports=function(e,t){return De[e]||(De[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Me=Re.exports,Ue=U,qe=Object,Ne=function(e){return qe(Ue(e))},_e=Ne,He=x({}.hasOwnProperty),Qe=Object.hasOwn||function(e,t){return He(_e(e),t)},ze=x,Fe=0,Ge=Math.random(),We=ze(1..toString),Ve=function(e){return"Symbol("+(void 0===e?"":e)+")_"+We(++Fe+Ge,36)},Je=Me,Xe=Qe,Ye=Ve,$e=ce,Ke=ue,Ze=i.Symbol,et=Je("wks"),tt=Ke?Ze.for||Ze:Ze&&Ze.withoutSetter||Ye,nt=function(e){return Xe(et,e)||(et[e]=$e&&Xe(Ze,e)?Ze[e]:tt("Symbol."+e)),et[e]},rt=f,ot=V,it=pe,st=Ee,at=function(e,t){var n,r;if("string"===t&&ke(n=e.toString)&&!Te(r=xe(n,e)))return r;if(ke(n=e.valueOf)&&!Te(r=xe(n,e)))return r;if("string"!==t&&ke(n=e.toString)&&!Te(r=xe(n,e)))return r;throw Pe("Can't convert object to primitive value")},ct=TypeError,ut=nt("toPrimitive"),lt=function(e,t){if(!ot(e)||it(e))return e;var n,r=st(e,ut);if(r){if(void 0===t&&(t="default"),n=rt(r,e,t),!ot(n)||it(n))return n;throw ct("Can't convert object to primitive value")}return void 0===t&&(t="number"),at(e,t)},dt=pe,ft=function(e){var t=lt(e,"string");return dt(t)?t:t+""},ht=V,pt=i.document,gt=ht(pt)&&ht(pt.createElement),mt=function(e){return gt?pt.createElement(e):{}},yt=mt,vt=!c&&!a((function(){return 7!=Object.defineProperty(yt("div"),"a",{get:function(){return 7}}).a})),At=c,bt=f,wt=h,St=A,Et=_,xt=ft,kt=Qe,Tt=vt,Pt=Object.getOwnPropertyDescriptor;s.f=At?Pt:function(e,t){if(e=Et(e),t=xt(t),Tt)try{return Pt(e,t)}catch(e){}if(kt(e,t))return St(!bt(wt.f,e,t),e[t])};var Rt={},It=c&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ct=V,Ot=String,Lt=TypeError,Bt=function(e){if(Ct(e))return e;throw Lt(Ot(e)+" is not an object")},jt=c,Dt=vt,Mt=It,Ut=Bt,qt=ft,Nt=TypeError,_t=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Qt="enumerable",zt="configurable",Ft="writable";Rt.f=jt?Mt?function(e,t,n){if(Ut(e),t=qt(t),Ut(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Ft in n&&!n[Ft]){var r=Ht(e,t);r&&r[Ft]&&(e[t]=n.value,n={configurable:zt in n?n[zt]:r[zt],enumerable:Qt in n?n[Qt]:r[Qt],writable:!1})}return _t(e,t,n)}:_t:function(e,t,n){if(Ut(e),t=qt(t),Ut(n),Dt)try{return _t(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Nt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Gt=Rt,Wt=A,Vt=c?function(e,t,n){return Gt.f(e,t,Wt(1,n))}:function(e,t,n){return e[t]=n,e},Jt={exports:{}},Xt=c,Yt=Qe,$t=Function.prototype,Kt=Xt&&Object.getOwnPropertyDescriptor,Zt=Yt($t,"name"),en={EXISTS:Zt,PROPER:Zt&&"something"===function(){}.name,CONFIGURABLE:Zt&&(!Xt||Xt&&Kt($t,"name").configurable)},tn=F,nn=je,rn=x(Function.toString);tn(nn.inspectSource)||(nn.inspectSource=function(e){return rn(e)});var on,sn,an,cn=nn.inspectSource,un=F,ln=i.WeakMap,dn=un(ln)&&/native code/.test(String(ln)),fn=Ve,hn=Me("keys"),pn=function(e){return hn[e]||(hn[e]=fn(e))},gn={},mn=dn,yn=i,vn=V,An=Vt,bn=Qe,wn=je,Sn=pn,En=gn,xn="Object already initialized",kn=yn.TypeError,Tn=yn.WeakMap;if(mn||wn.state){var Pn=wn.state||(wn.state=new Tn);Pn.get=Pn.get,Pn.has=Pn.has,Pn.set=Pn.set,on=function(e,t){if(Pn.has(e))throw kn(xn);return t.facade=e,Pn.set(e,t),t},sn=function(e){return Pn.get(e)||{}},an=function(e){return Pn.has(e)}}else{var Rn=Sn("state");En[Rn]=!0,on=function(e,t){if(bn(e,Rn))throw kn(xn);return t.facade=e,An(e,Rn,t),t},sn=function(e){return bn(e,Rn)?e[Rn]:{}},an=function(e){return bn(e,Rn)}}var In={set:on,get:sn,has:an,enforce:function(e){return an(e)?sn(e):on(e,{})},getterFor:function(e){return function(t){var n;if(!vn(t)||(n=sn(t)).type!==e)throw kn("Incompatible receiver, "+e+" required");return n}}},Cn=x,On=a,Ln=F,Bn=Qe,jn=c,Dn=en.CONFIGURABLE,Mn=cn,Un=In.enforce,qn=In.get,Nn=String,_n=Object.defineProperty,Hn=Cn("".slice),Qn=Cn("".replace),zn=Cn([].join),Fn=jn&&!On((function(){return 8!==_n((function(){}),"length",{value:8}).length})),Gn=String(String).split("String"),Wn=Jt.exports=function(e,t,n){"Symbol("===Hn(Nn(t),0,7)&&(t="["+Qn(Nn(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Bn(e,"name")||Dn&&e.name!==t)&&(jn?_n(e,"name",{value:t,configurable:!0}):e.name=t),Fn&&n&&Bn(n,"arity")&&e.length!==n.arity&&_n(e,"length",{value:n.arity});try{n&&Bn(n,"constructor")&&n.constructor?jn&&_n(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Un(e);return Bn(r,"source")||(r.source=zn(Gn,"string"==typeof t?t:"")),e};Function.prototype.toString=Wn((function(){return Ln(this)&&qn(this).source||Mn(this)}),"toString");var Vn=Jt.exports,Jn=F,Xn=Rt,Yn=Vn,$n=Oe,Kn=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;if(Jn(n)&&Yn(n,i,r),r.global)o?e[t]=n:$n(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:Xn.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Zn={},er=Math.ceil,tr=Math.floor,nr=Math.trunc||function(e){var t=+e;return(t>0?tr:er)(t)},rr=function(e){var t=+e;return t!=t||0===t?0:nr(t)},or=rr,ir=Math.max,sr=Math.min,ar=function(e,t){var n=or(e);return n<0?ir(n+t,0):sr(n,t)},cr=rr,ur=Math.min,lr=function(e){return e>0?ur(cr(e),9007199254740991):0},dr=lr,fr=function(e){return dr(e.length)},hr=_,pr=ar,gr=fr,mr=function(e){return function(t,n,r){var o,i=hr(t),s=gr(i),a=pr(r,s);if(e&&n!=n){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},yr={includes:mr(!0),indexOf:mr(!1)},vr=Qe,Ar=_,br=yr.indexOf,wr=gn,Sr=x([].push),Er=function(e,t){var n,r=Ar(e),o=0,i=[];for(n in r)!vr(wr,n)&&vr(r,n)&&Sr(i,n);for(;t.length>o;)vr(r,n=t[o++])&&(~br(i,n)||Sr(i,n));return i},xr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kr=Er,Tr=xr.concat("length","prototype");Zn.f=Object.getOwnPropertyNames||function(e){return kr(e,Tr)};var Pr={};Pr.f=Object.getOwnPropertySymbols;var Rr=Y,Ir=Zn,Cr=Pr,Or=Bt,Lr=x([].concat),Br=Rr("Reflect","ownKeys")||function(e){var t=Ir.f(Or(e)),n=Cr.f;return n?Lr(t,n(e)):t},jr=Qe,Dr=Br,Mr=s,Ur=Rt,qr=function(e,t,n){for(var r=Dr(t),o=Ur.f,i=Mr.f,s=0;s<r.length;s++){var a=r[s];jr(e,a)||n&&jr(n,a)||o(e,a,i(t,a))}},Nr=a,_r=F,Hr=/#|\.prototype\./,Qr=function(e,t){var n=Fr[zr(e)];return n==Wr||n!=Gr&&(_r(t)?Nr(t):!!t)},zr=Qr.normalize=function(e){return String(e).replace(Hr,".").toLowerCase()},Fr=Qr.data={},Gr=Qr.NATIVE="N",Wr=Qr.POLYFILL="P",Vr=Qr,Jr=i,Xr=s.f,Yr=Vt,$r=Kn,Kr=Oe,Zr=qr,eo=Vr,to=function(e,t){var n,r,o,i,s,a=e.target,c=e.global,u=e.stat;if(n=c?Jr:u?Jr[a]||Kr(a,{}):(Jr[a]||{}).prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(s=Xr(n,r))&&s.value:n[r],!eo(c?r:a+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Zr(i,o)}(e.sham||o&&o.sham)&&Yr(i,"sham",!0),$r(n,r,i,e)}},no=R,ro=c,oo=Array.isArray||function(e){return"Array"==no(e)},io=TypeError,so=Object.getOwnPropertyDescriptor,ao=ro&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),co=TypeError,uo=Ne,lo=fr,fo=ao?function(e,t){if(oo(e)&&!so(e,"length").writable)throw io("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},ho=function(e){if(e>9007199254740991)throw co("Maximum allowed index exceeded");return e};to({target:"Array",proto:!0,arity:1,forced:a((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=uo(this),n=lo(t),r=arguments.length;ho(n+r);for(var o=0;o<r;o++)t[n]=arguments[o],n++;return fo(t,n),n}});var po=mt("span").classList,go=po&&po.constructor&&po.constructor.prototype,mo=go===Object.prototype?void 0:go,yo={},vo=Er,Ao=xr,bo=Object.keys||function(e){return vo(e,Ao)},wo=c,So=It,Eo=Rt,xo=Bt,ko=_,To=bo;yo.f=wo&&!So?Object.defineProperties:function(e,t){xo(e);for(var n,r=ko(t),o=To(t),i=o.length,s=0;i>s;)Eo.f(e,n=o[s++],r[n]);return e};var Po,Ro=Y("document","documentElement"),Io=Bt,Co=yo,Oo=xr,Lo=gn,Bo=Ro,jo=mt,Do="prototype",Mo="script",Uo=pn("IE_PROTO"),qo=function(){},No=function(e){return"<"+Mo+">"+e+"</"+Mo+">"},_o=function(e){e.write(No("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ho=function(){try{Po=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ho="undefined"!=typeof document?document.domain&&Po?_o(Po):(t=jo("iframe"),n="java"+Mo+":",t.style.display="none",Bo.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(No("document.F=Object")),e.close(),e.F):_o(Po);for(var r=Oo.length;r--;)delete Ho[Do][Oo[r]];return Ho()};Lo[Uo]=!0;var Qo=Object.create||function(e,t){var n;return null!==e?(qo[Do]=Io(e),n=new qo,qo[Do]=null,n[Uo]=e):n=Ho(),void 0===t?n:Co.f(n,t)},zo=nt,Fo=Qo,Go=Rt.f,Wo=zo("unscopables"),Vo=Array.prototype;null==Vo[Wo]&&Go(Vo,Wo,{configurable:!0,value:Fo(null)});var Jo,Xo,Yo,$o={},Ko=!a((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Zo=Qe,ei=F,ti=Ne,ni=Ko,ri=pn("IE_PROTO"),oi=Object,ii=oi.prototype,si=ni?oi.getPrototypeOf:function(e){var t=ti(e);if(Zo(t,ri))return t[ri];var n=t.constructor;return ei(n)&&t instanceof n?n.prototype:t instanceof oi?ii:null},ai=a,ci=F,ui=V,li=si,di=Kn,fi=nt("iterator"),hi=!1;[].keys&&("next"in(Yo=[].keys())?(Xo=li(li(Yo)))!==Object.prototype&&(Jo=Xo):hi=!0);var pi=!ui(Jo)||ai((function(){var e={};return Jo[fi].call(e)!==e}));pi&&(Jo={}),ci(Jo[fi])||di(Jo,fi,(function(){return this}));var gi={IteratorPrototype:Jo,BUGGY_SAFARI_ITERATORS:hi},mi=Rt.f,yi=Qe,vi=nt("toStringTag"),Ai=function(e,t,n){e&&!n&&(e=e.prototype),e&&!yi(e,vi)&&mi(e,vi,{configurable:!0,value:t})},bi=gi.IteratorPrototype,wi=Qo,Si=A,Ei=Ai,xi=$o,ki=function(){return this},Ti=function(e,t,n,r){var o=t+" Iterator";return e.prototype=wi(bi,{next:Si(+!r,n)}),Ei(e,o,!1),xi[o]=ki,e},Pi=x,Ri=be,Ii=function(e,t,n){try{return Pi(Ri(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Ci=F,Oi=String,Li=TypeError,Bi=Ii,ji=Bt,Di=function(e){if("object"==typeof e||Ci(e))return e;throw Li("Can't set "+Oi(e)+" as a prototype")},Mi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Bi(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return ji(n),Di(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ui=to,qi=f,Ni=F,_i=Ti,Hi=si,Qi=Mi,zi=Ai,Fi=Vt,Gi=Kn,Wi=$o,Vi=en.PROPER,Ji=en.CONFIGURABLE,Xi=gi.IteratorPrototype,Yi=gi.BUGGY_SAFARI_ITERATORS,$i=nt("iterator"),Ki="keys",Zi="values",es="entries",ts=function(){return this},ns=function(e,t,n,r,o,i,s){_i(n,t,r);var a,c,u,l=function(e){if(e===o&&g)return g;if(!Yi&&e in h)return h[e];switch(e){case Ki:case Zi:case es:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[$i]||h["@@iterator"]||o&&h[o],g=!Yi&&p||l(o),m="Array"==t&&h.entries||p;if(m&&(a=Hi(m.call(new e)))!==Object.prototype&&a.next&&(Hi(a)!==Xi&&(Qi?Qi(a,Xi):Ni(a[$i])||Gi(a,$i,ts)),zi(a,d,!0)),Vi&&o==Zi&&p&&p.name!==Zi&&(Ji?Fi(h,"name",Zi):(f=!0,g=function(){return qi(p,this)})),o)if(c={values:l(Zi),keys:i?g:l(Ki),entries:l(es)},s)for(u in c)(Yi||f||!(u in h))&&Gi(h,u,c[u]);else Ui({target:t,proto:!0,forced:Yi||f},c);return h[$i]!==g&&Gi(h,$i,g,{name:o}),Wi[t]=g,c},rs=function(e,t){return{value:e,done:t}},os=_,is=function(e){Vo[Wo][e]=!0},ss=$o,as=In,cs=Rt.f,us=ns,ls=rs,ds=c,fs="Array Iterator",hs=as.set,ps=as.getterFor(fs),gs=us(Array,"Array",(function(e,t){hs(this,{type:fs,target:os(e),index:0,kind:t})}),(function(){var e=ps(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,ls(void 0,!0)):ls("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),ms=ss.Arguments=ss.Array;if(is("keys"),is("values"),is("entries"),ds&&"values"!==ms.name)try{cs(ms,"name",{value:"values"})}catch(e){}var ys=i,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},As=mo,bs=gs,ws=Vt,Ss=nt,Es=Ss("iterator"),xs=Ss("toStringTag"),ks=bs.values,Ts=function(e,t){if(e){if(e[Es]!==ks)try{ws(e,Es,ks)}catch(t){e[Es]=ks}if(e[xs]||ws(e,xs,t),vs[t])for(var n in bs)if(e[n]!==bs[n])try{ws(e,n,bs[n])}catch(t){e[n]=bs[n]}}};for(var Ps in vs)Ts(ys[Ps]&&ys[Ps].prototype,Ps);Ts(As,"DOMTokenList");var Rs=u,Is=Function.prototype,Cs=Is.apply,Os=Is.call,Ls="object"==typeof Reflect&&Reflect.apply||(Rs?Os.bind(Cs):function(){return Os.apply(Cs,arguments)}),Bs=Rt.f,js=F,Ds=V,Ms=Mi,Us={};Us[nt("toStringTag")]="z";var qs="[object z]"===String(Us),Ns=F,_s=R,Hs=nt("toStringTag"),Qs=Object,zs="Arguments"==_s(function(){return arguments}()),Fs=qs?_s: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=Qs(e),Hs))?n:zs?_s(t):"Object"==(r=_s(t))&&Ns(t.callee)?"Arguments":r},Gs=Fs,Ws=String,Vs=function(e){if("Symbol"===Gs(e))throw TypeError("Cannot convert a Symbol value to a string");return Ws(e)},Js=Vs,Xs=V,Ys=Vt,$s=Error,Ks=x("".replace),Zs=String($s("zxcasd").stack),ea=/\n\s*at [^:]*:[^\n]*/,ta=ea.test(Zs),na=A,ra=!a((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",na(1,7)),7!==e.stack)})),oa=Vt,ia=function(e,t){if(ta&&"string"==typeof e&&!$s.prepareStackTrace)for(;t--;)e=Ks(e,ea,"");return e},sa=ra,aa=Error.captureStackTrace,ca=Y,ua=Qe,la=Vt,da=$,fa=Mi,ha=qr,pa=function(e,t,n){n in e||Bs(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},ga=function(e,t,n){var r,o;return Ms&&js(r=t.constructor)&&r!==n&&Ds(o=r.prototype)&&o!==n.prototype&&Ms(e,o),e},ma=function(e,t){return void 0===e?arguments.length<2?"":t:Js(e)},ya=function(e,t){Xs(t)&&"cause"in t&&Ys(e,"cause",t.cause)},va=function(e,t,n,r){sa&&(aa?aa(e,t):oa(e,"stack",ia(n,r)))},Aa=c,ba=to,wa=Ls,Sa=function(e,t,n,r){var o="stackTraceLimit",i=r?2:1,s=e.split("."),a=s[s.length-1],c=ca.apply(null,s);if(c){var u=c.prototype;if(ua(u,"cause")&&delete u.cause,!n)return c;var l=ca("Error"),d=t((function(e,t){var n=ma(r?t:e,void 0),o=r?new c(e):new c;return void 0!==n&&la(o,"message",n),va(o,d,o.stack,2),this&&da(u,this)&&ga(o,this,d),arguments.length>i&&ya(o,arguments[i]),o}));d.prototype=u,"Error"!==a?fa?fa(d,l):ha(d,l,{name:!0}):Aa&&o in c&&(pa(d,c,o),pa(d,c,"prepareStackTrace")),ha(d,c);try{u.name!==a&&la(u,"name",a),u.constructor=d}catch(e){}return d}},Ea="WebAssembly",xa=i[Ea],ka=7!==Error("e",{cause:7}).cause,Ta=function(e,t){var n={};n[e]=Sa(e,t,ka),ba({global:!0,constructor:!0,arity:1,forced:ka},n)},Pa=function(e,t){if(xa&&xa[e]){var n={};n[e]=Sa(Ea+"."+e,t,ka),ba({target:Ea,stat:!0,constructor:!0,arity:1,forced:ka},n)}};Ta("Error",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("EvalError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("RangeError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("ReferenceError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("SyntaxError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("TypeError",(function(e){return function(t){return wa(e,this,arguments)}})),Ta("URIError",(function(e){return function(t){return wa(e,this,arguments)}})),Pa("CompileError",(function(e){return function(t){return wa(e,this,arguments)}})),Pa("LinkError",(function(e){return function(t){return wa(e,this,arguments)}})),Pa("RuntimeError",(function(e){return function(t){return wa(e,this,arguments)}}));var Ra,Ia,Ca=Bt,Oa=function(){var e=Ca(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},La=a,Ba=i.RegExp,ja=La((function(){var e=Ba("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Da=ja||La((function(){return!Ba("a","y").sticky})),Ma={BROKEN_CARET:ja||La((function(){var e=Ba("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Da,UNSUPPORTED_Y:ja},Ua=a,qa=i.RegExp,Na=Ua((function(){var e=qa(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),_a=a,Ha=i.RegExp,Qa=_a((function(){var e=Ha("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),za=f,Fa=x,Ga=Vs,Wa=Oa,Va=Ma,Ja=Qo,Xa=In.get,Ya=Na,$a=Qa,Ka=Me("native-string-replace",String.prototype.replace),Za=RegExp.prototype.exec,ec=Za,tc=Fa("".charAt),nc=Fa("".indexOf),rc=Fa("".replace),oc=Fa("".slice),ic=(Ia=/b*/g,za(Za,Ra=/a/,"a"),za(Za,Ia,"a"),0!==Ra.lastIndex||0!==Ia.lastIndex),sc=Va.BROKEN_CARET,ac=void 0!==/()??/.exec("")[1];(ic||ac||sc||Ya||$a)&&(ec=function(e){var t,n,r,o,i,s,a,c=this,u=Xa(c),l=Ga(e),d=u.raw;if(d)return d.lastIndex=c.lastIndex,t=za(ec,d,l),c.lastIndex=d.lastIndex,t;var f=u.groups,h=sc&&c.sticky,p=za(Wa,c),g=c.source,m=0,y=l;if(h&&(p=rc(p,"y",""),-1===nc(p,"g")&&(p+="g"),y=oc(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==tc(l,c.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,m++),n=new RegExp("^(?:"+g+")",p)),ac&&(n=new RegExp("^"+g+"$(?!\\s)",p)),ic&&(r=c.lastIndex),o=za(Za,h?n:c,y),h?o?(o.input=oc(o.input,m),o[0]=oc(o[0],m),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:ic&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),ac&&o&&o.length>1&&za(Ka,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&f)for(o.groups=s=Ja(null),i=0;i<f.length;i++)s[(a=f[i])[0]]=o[a[1]];return o});var cc=ec;to({target:"RegExp",proto:!0,forced:/./.exec!==cc},{exec:cc});var uc=R,lc=x,dc=function(e){if("Function"===uc(e))return lc(e)},fc=dc,hc=Kn,pc=cc,gc=a,mc=nt,yc=Vt,vc=mc("species"),Ac=RegExp.prototype,bc=x,wc=rr,Sc=Vs,Ec=U,xc=bc("".charAt),kc=bc("".charCodeAt),Tc=bc("".slice),Pc=function(e){return function(t,n){var r,o,i=Sc(Ec(t)),s=wc(n),a=i.length;return s<0||s>=a?e?"":void 0:(r=kc(i,s))<55296||r>56319||s+1===a||(o=kc(i,s+1))<56320||o>57343?e?xc(i,s):r:e?Tc(i,s,s+2):o-56320+(r-55296<<10)+65536}},Rc={codeAt:Pc(!1),charAt:Pc(!0)},Ic=Rc.charAt,Cc=x,Oc=Ne,Lc=Math.floor,Bc=Cc("".charAt),jc=Cc("".replace),Dc=Cc("".slice),Mc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Uc=/\$([$&'`]|\d{1,2})/g,qc=function(e,t,n,r,o,i){var s=n+e.length,a=r.length,c=Uc;return void 0!==o&&(o=Oc(o),c=Mc),jc(i,c,(function(i,c){var u;switch(Bc(c,0)){case"$":return"$";case"&":return e;case"`":return Dc(t,0,n);case"'":return Dc(t,s);case"<":u=o[Dc(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>a){var d=Lc(l/10);return 0===d?i:d<=a?void 0===r[d-1]?Bc(c,1):r[d-1]+Bc(c,1):i}u=r[l-1]}return void 0===u?"":u}))},Nc=f,_c=Bt,Hc=F,Qc=R,zc=cc,Fc=TypeError,Gc=Ls,Wc=f,Vc=x,Jc=function(e,t,n,r){var o=mc(e),i=!gc((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),s=i&&!gc((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[vc]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!s||n){var a=fc(/./[o]),c=t(o,""[e],(function(e,t,n,r,o){var s=fc(e),c=t.exec;return c===pc||c===Ac.exec?i&&!o?{done:!0,value:a(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));hc(String.prototype,e,c[0]),hc(Ac,o,c[1])}r&&yc(Ac[o],"sham",!0)},Xc=a,Yc=Bt,$c=F,Kc=j,Zc=rr,eu=lr,tu=Vs,nu=U,ru=function(e,t,n){return t+(n?Ic(e,t).length:1)},ou=Ee,iu=qc,su=function(e,t){var n=e.exec;if(Hc(n)){var r=Nc(n,e,t);return null!==r&&_c(r),r}if("RegExp"===Qc(e))return Nc(zc,e,t);throw Fc("RegExp#exec called on incompatible receiver")},au=nt("replace"),cu=Math.max,uu=Math.min,lu=Vc([].concat),du=Vc([].push),fu=Vc("".indexOf),hu=Vc("".slice),pu="$0"==="a".replace(/./,"$0"),gu=!!/./[au]&&""===/./[au]("a","$0");Jc("replace",(function(e,t,n){var r=gu?"$":"$0";return[function(e,n){var r=nu(this),o=Kc(e)?void 0:ou(e,au);return o?Wc(o,e,r,n):Wc(t,tu(r),e,n)},function(e,o){var i=Yc(this),s=tu(e);if("string"==typeof o&&-1===fu(o,r)&&-1===fu(o,"$<")){var a=n(t,i,s,o);if(a.done)return a.value}var c=$c(o);c||(o=tu(o));var u=i.global;if(u){var l=i.unicode;i.lastIndex=0}for(var d=[];;){var f=su(i,s);if(null===f)break;if(du(d,f),!u)break;""===tu(f[0])&&(i.lastIndex=ru(s,eu(i.lastIndex),l))}for(var h,p="",g=0,m=0;m<d.length;m++){for(var y=tu((f=d[m])[0]),v=cu(uu(Zc(f.index),s.length),0),A=[],b=1;b<f.length;b++)du(A,void 0===(h=f[b])?h:String(h));var w=f.groups;if(c){var S=lu([y],A,v,s);void 0!==w&&du(S,w);var E=tu(Gc(o,void 0,S))}else E=iu(y,s,v,A,w,o);v>=g&&(p+=hu(s,g,v)+E,g=v+y.length)}return p+hu(s,g)}]}),!!Xc((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!pu||gu);var mu=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},yu={"text/plain":"Text","text/html":"Url",default:"Text"};var vu=function(e,t){var n,r,o,i,s,a,c=!1;t||(t={}),n=t.debug||!1;try{if(o=mu(),i=document.createRange(),s=document.getSelection(),(a=document.createElement("span")).textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=yu[t.format]||yu.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(a),i.selectNodeContents(a),s.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(i):s.removeAllRanges()),a&&document.body.removeChild(a),o()}return c},Au=r(vu),bu=be,wu=Ne,Su=B,Eu=fr,xu=TypeError,ku=function(e){return function(t,n,r,o){bu(n);var i=wu(t),s=Su(i),a=Eu(i),c=e?a-1:0,u=e?-1:1;if(r<2)for(;;){if(c in s){o=s[c],c+=u;break}if(c+=u,e?c<0:a<=c)throw xu("Reduce of empty array with no initial value")}for(;e?c>=0:a>c;c+=u)c in s&&(o=n(o,s[c],c,i));return o}},Tu={left:ku(!1),right:ku(!0)},Pu=a,Ru="undefined"!=typeof process&&"process"==R(process),Iu=Tu.left,Cu=function(e,t){var n=[][e];return!!n&&Pu((function(){n.call(null,t||function(){return 1},1)}))};to({target:"Array",proto:!0,forced:!Ru&&oe>79&&oe<83||!Cu("reduce")},{reduce:function(e){var t=arguments.length;return Iu(this,e,t,t>1?arguments[1]:void 0)}});var Ou=Vn,Lu=Rt,Bu=function(e,t,n){return n.get&&Ou(n.get,t,{getter:!0}),n.set&&Ou(n.set,t,{setter:!0}),Lu.f(e,t,n)},ju=R,Du=TypeError,Mu=Ii(ArrayBuffer.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!=ju(e))throw Du("ArrayBuffer expected");return e.byteLength},Uu=Mu,qu=x(ArrayBuffer.prototype.slice),Nu=function(e){if(0!==Uu(e))return!1;try{return qu(e,0,0),!1}catch(e){return!0}},_u=c,Hu=Bu,Qu=Nu,zu=ArrayBuffer.prototype;_u&&!("detached"in zu)&&Hu(zu,"detached",{configurable:!0,get:function(){return Qu(this)}});var Fu=rr,Gu=lr,Wu=RangeError,Vu="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Ju=!Vu&&!Ru&&"object"==typeof window&&"object"==typeof document,Xu=a,Yu=oe,$u=Ju,Ku=Vu,Zu=Ru,el=i.structuredClone,tl=!!el&&!Xu((function(){if(Ku&&Yu>92||Zu&&Yu>94||$u&&Yu>97)return!1;var e=new ArrayBuffer(8),t=el(e,{transfer:[e]});return 0!=e.byteLength||8!=t.byteLength})),nl=i,rl=x,ol=Ii,il=function(e){if(void 0===e)return 0;var t=Fu(e),n=Gu(t);if(t!==n)throw Wu("Wrong length or index");return n},sl=Nu,al=Mu,cl=tl,ul=nl.TypeError,ll=nl.structuredClone,dl=nl.ArrayBuffer,fl=nl.DataView,hl=Math.min,pl=dl.prototype,gl=fl.prototype,ml=rl(pl.slice),yl=ol(pl,"resizable","get"),vl=ol(pl,"maxByteLength","get"),Al=rl(gl.getInt8),bl=rl(gl.setInt8),wl=cl&&function(e,t,n){var r=al(e),o=void 0===t?r:hl(il(t),r),i=!yl||!yl(e);if(sl(e))throw ul("ArrayBuffer is detached");var s=ll(e,{transfer:[e]});if(r==o&&(n||i))return s;if(!n||i)return ml(s,0,o);for(var a=new dl(o,vl&&{maxByteLength:vl(s)}),c=new fl(s),u=new fl(a),l=0;l<o;l++)bl(u,l,Al(c,l));return a},Sl=wl;Sl&&to({target:"ArrayBuffer",proto:!0},{transfer:function(){return Sl(this,arguments.length?arguments[0]:void 0,!0)}});var El=wl;El&&to({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return El(this,arguments.length?arguments[0]:void 0,!1)}});var xl=Rc.charAt,kl=Vs,Tl=In,Pl=ns,Rl=rs,Il="String Iterator",Cl=Tl.set,Ol=Tl.getterFor(Il);Pl(String,"String",(function(e){Cl(this,{type:Il,string:kl(e),index:0})}),(function(){var e,t=Ol(this),n=t.string,r=t.index;return r>=n.length?Rl(void 0,!0):(e=xl(n,r),t.index+=e.length,Rl(e,!1))}));var Ll=a,Bl=c,jl=nt("iterator"),Dl=!Ll((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.size&&!Bl||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[jl]||"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})),Ml=be,Ul=u,ql=dc(dc.bind),Nl=function(e,t){return Ml(e),void 0===t?e:Ul?ql(e,t):function(){return e.apply(t,arguments)}},_l=$,Hl=TypeError,Ql=function(e,t){if(_l(t,e))return e;throw Hl("Incorrect invocation")},zl=c,Fl=x,Gl=f,Wl=a,Vl=bo,Jl=Pr,Xl=h,Yl=Ne,$l=B,Kl=Object.assign,Zl=Object.defineProperty,ed=Fl([].concat),td=!Kl||Wl((function(){if(zl&&1!==Kl({b:1},Kl(Zl({},"a",{enumerable:!0,get:function(){Zl(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!=Kl({},e)[n]||Vl(Kl({},t)).join("")!=r}))?function(e,t){for(var n=Yl(e),r=arguments.length,o=1,i=Jl.f,s=Xl.f;r>o;)for(var a,c=$l(arguments[o++]),u=i?ed(Vl(c),i(c)):Vl(c),l=u.length,d=0;l>d;)a=u[d++],zl&&!Gl(s,c,a)||(n[a]=c[a]);return n}:Kl,nd=f,rd=Bt,od=Ee,id=function(e,t,n){var r,o;rd(e);try{if(!(r=od(e,"return"))){if("throw"===t)throw n;return n}r=nd(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return rd(r),n},sd=Bt,ad=id,cd=$o,ud=nt("iterator"),ld=Array.prototype,dd=x,fd=a,hd=F,pd=Fs,gd=cn,md=function(){},yd=[],vd=Y("Reflect","construct"),Ad=/^\s*(?:class|function)\b/,bd=dd(Ad.exec),wd=!Ad.exec(md),Sd=function(e){if(!hd(e))return!1;try{return vd(md,yd,e),!0}catch(e){return!1}},Ed=function(e){if(!hd(e))return!1;switch(pd(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return wd||!!bd(Ad,gd(e))}catch(e){return!0}};Ed.sham=!0;var xd=!vd||fd((function(){var e;return Sd(Sd.call)||!Sd(Object)||!Sd((function(){e=!0}))||e}))?Ed:Sd,kd=ft,Td=Rt,Pd=A,Rd=function(e,t,n){var r=kd(t);r in e?Td.f(e,r,Pd(0,n)):e[r]=n},Id=Fs,Cd=Ee,Od=j,Ld=$o,Bd=nt("iterator"),jd=function(e){if(!Od(e))return Cd(e,Bd)||Cd(e,"@@iterator")||Ld[Id(e)]},Dd=f,Md=be,Ud=Bt,qd=me,Nd=jd,_d=TypeError,Hd=function(e,t){var n=arguments.length<2?Nd(e):t;if(Md(n))return Ud(Dd(n,e));throw _d(qd(e)+" is not iterable")},Qd=Nl,zd=f,Fd=Ne,Gd=function(e,t,n,r){try{return r?t(sd(n)[0],n[1]):t(n)}catch(t){ad(e,"throw",t)}},Wd=function(e){return void 0!==e&&(cd.Array===e||ld[ud]===e)},Vd=xd,Jd=fr,Xd=Rd,Yd=Hd,$d=jd,Kd=Array,Zd=ar,ef=fr,tf=Rd,nf=Array,rf=Math.max,of=function(e,t,n){for(var r=ef(e),o=Zd(t,r),i=Zd(void 0===n?r:n,r),s=nf(rf(i-o,0)),a=0;o<i;o++,a++)tf(s,a,e[o]);return s.length=a,s},sf=x,af=2147483647,cf=/[^\0-\u007E]/,uf=/[.\u3002\uFF0E\uFF61]/g,lf="Overflow: input needs wider integers to process",df=RangeError,ff=sf(uf.exec),hf=Math.floor,pf=String.fromCharCode,gf=sf("".charCodeAt),mf=sf([].join),yf=sf([].push),vf=sf("".replace),Af=sf("".split),bf=sf("".toLowerCase),wf=function(e){return e+22+75*(e<26)},Sf=function(e,t,n){var r=0;for(e=n?hf(e/700):e>>1,e+=hf(e/t);e>455;)e=hf(e/35),r+=36;return hf(r+36*e/(e+38))},Ef=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=gf(e,n++);if(o>=55296&&o<=56319&&n<r){var i=gf(e,n++);56320==(64512&i)?yf(t,((1023&o)<<10)+(1023&i)+65536):(yf(t,o),n--)}else yf(t,o)}return t}(e);var n,r,o=e.length,i=128,s=0,a=72;for(n=0;n<e.length;n++)(r=e[n])<128&&yf(t,pf(r));var c=t.length,u=c;for(c&&yf(t,"-");u<o;){var l=af;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<l&&(l=r);var d=u+1;if(l-i>hf((af-s)/d))throw df(lf);for(s+=(l-i)*d,i=l,n=0;n<e.length;n++){if((r=e[n])<i&&++s>af)throw df(lf);if(r==i){for(var f=s,h=36;;){var p=h<=a?1:h>=a+26?26:h-a;if(f<p)break;var g=f-p,m=36-p;yf(t,pf(wf(p+g%m))),f=hf(g/m),h+=36}yf(t,pf(wf(f))),a=Sf(s,d,u==c),s=0,u++}}s++,i++}return mf(t,"")},xf=TypeError,kf=function(e,t){if(e<t)throw xf("Not enough arguments");return e},Tf=Kn,Pf=of,Rf=Math.floor,If=function(e,t){var n=e.length,r=Rf(n/2);return n<8?Cf(e,t):Of(e,If(Pf(e,0,r),t),If(Pf(e,r),t),t)},Cf=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},Of=function(e,t,n,r){for(var o=t.length,i=n.length,s=0,a=0;s<o||a<i;)e[s+a]=s<o&&a<i?r(t[s],n[a])<=0?t[s++]:n[a++]:s<o?t[s++]:n[a++];return e},Lf=to,Bf=i,jf=f,Df=x,Mf=c,Uf=Dl,qf=Kn,Nf=Bu,_f=function(e,t,n){for(var r in t)Tf(e,r,t[r],n);return e},Hf=Ai,Qf=Ti,zf=In,Ff=Ql,Gf=F,Wf=Qe,Vf=Nl,Jf=Fs,Xf=Bt,Yf=V,$f=Vs,Kf=Qo,Zf=A,eh=Hd,th=jd,nh=kf,rh=If,oh=nt("iterator"),ih="URLSearchParams",sh=ih+"Iterator",ah=zf.set,ch=zf.getterFor(ih),uh=zf.getterFor(sh),lh=Object.getOwnPropertyDescriptor,dh=function(e){if(!Mf)return Bf[e];var t=lh(Bf,e);return t&&t.value},fh=dh("fetch"),hh=dh("Request"),ph=dh("Headers"),gh=hh&&hh.prototype,mh=ph&&ph.prototype,yh=Bf.RegExp,vh=Bf.TypeError,Ah=Bf.decodeURIComponent,bh=Bf.encodeURIComponent,wh=Df("".charAt),Sh=Df([].join),Eh=Df([].push),xh=Df("".replace),kh=Df([].shift),Th=Df([].splice),Ph=Df("".split),Rh=Df("".slice),Ih=/\+/g,Ch=Array(4),Oh=function(e){return Ch[e-1]||(Ch[e-1]=yh("((?:%[\\da-f]{2}){"+e+"})","gi"))},Lh=function(e){try{return Ah(e)}catch(t){return e}},Bh=function(e){var t=xh(e,Ih," "),n=4;try{return Ah(t)}catch(e){for(;n;)t=xh(t,Oh(n--),Lh);return t}},jh=/[!'()~]|%20/g,Dh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Mh=function(e){return Dh[e]},Uh=function(e){return xh(bh(e),jh,Mh)},qh=Qf((function(e,t){ah(this,{type:sh,iterator:eh(ch(e).entries),kind:t})}),"Iterator",(function(){var e=uh(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),Nh=function(e){this.entries=[],this.url=null,void 0!==e&&(Yf(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===wh(e,0)?Rh(e,1):e:$f(e)))};Nh.prototype={type:ih,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,i,s,a,c=th(e);if(c)for(n=(t=eh(e,c)).next;!(r=jf(n,t)).done;){if(i=(o=eh(Xf(r.value))).next,(s=jf(i,o)).done||(a=jf(i,o)).done||!jf(i,o).done)throw vh("Expected sequence with length 2");Eh(this.entries,{key:$f(s.value),value:$f(a.value)})}else for(var u in e)Wf(e,u)&&Eh(this.entries,{key:u,value:$f(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=Ph(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=Ph(t,"="),Eh(this.entries,{key:Bh(kh(n)),value:Bh(Sh(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Eh(n,Uh(e.key)+"="+Uh(e.value));return Sh(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var _h=function(){Ff(this,Hh);var e=ah(this,new Nh(arguments.length>0?arguments[0]:void 0));Mf||(this.length=e.entries.length)},Hh=_h.prototype;if(_f(Hh,{append:function(e,t){nh(arguments.length,2);var n=ch(this);Eh(n.entries,{key:$f(e),value:$f(t)}),Mf||this.length++,n.updateURL()},delete:function(e){nh(arguments.length,1);for(var t=ch(this),n=t.entries,r=$f(e),o=0;o<n.length;)n[o].key===r?Th(n,o,1):o++;Mf||(this.length=n.length),t.updateURL()},get:function(e){nh(arguments.length,1);for(var t=ch(this).entries,n=$f(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){nh(arguments.length,1);for(var t=ch(this).entries,n=$f(e),r=[],o=0;o<t.length;o++)t[o].key===n&&Eh(r,t[o].value);return r},has:function(e){nh(arguments.length,1);for(var t=ch(this).entries,n=$f(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){nh(arguments.length,1);for(var n,r=ch(this),o=r.entries,i=!1,s=$f(e),a=$f(t),c=0;c<o.length;c++)(n=o[c]).key===s&&(i?Th(o,c--,1):(i=!0,n.value=a));i||Eh(o,{key:s,value:a}),Mf||(this.length=o.length),r.updateURL()},sort:function(){var e=ch(this);rh(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=ch(this).entries,r=Vf(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new qh(this,"keys")},values:function(){return new qh(this,"values")},entries:function(){return new qh(this,"entries")}},{enumerable:!0}),qf(Hh,oh,Hh.entries,{name:"entries"}),qf(Hh,"toString",(function(){return ch(this).serialize()}),{enumerable:!0}),Mf&&Nf(Hh,"size",{get:function(){return ch(this).entries.length},configurable:!0,enumerable:!0}),Hf(_h,ih),Lf({global:!0,constructor:!0,forced:!Uf},{URLSearchParams:_h}),!Uf&&Gf(ph)){var Qh=Df(mh.has),zh=Df(mh.set),Fh=function(e){if(Yf(e)){var t,n=e.body;if(Jf(n)===ih)return t=e.headers?new ph(e.headers):new ph,Qh(t,"content-type")||zh(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Kf(e,{body:Zf(0,$f(n)),headers:Zf(0,t)})}return e};if(Gf(fh)&&Lf({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return fh(e,arguments.length>1?Fh(arguments[1]):{})}}),Gf(hh)){var Gh=function(e){return Ff(this,gh),new hh(e,arguments.length>1?Fh(arguments[1]):{})};gh.constructor=Gh,Gh.prototype=gh,Lf({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Gh})}}var Wh,Vh=to,Jh=c,Xh=Dl,Yh=i,$h=Nl,Kh=x,Zh=Kn,ep=Bu,tp=Ql,np=Qe,rp=td,op=function(e){var t=Fd(e),n=Vd(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Qd(o,r>2?arguments[2]:void 0));var s,a,c,u,l,d,f=$d(t),h=0;if(!f||this===Kd&&Wd(f))for(s=Jd(t),a=n?new this(s):Kd(s);s>h;h++)d=i?o(t[h],h):t[h],Xd(a,h,d);else for(l=(u=Yd(t,f)).next,a=n?new this:[];!(c=zd(l,u)).done;h++)d=i?Gd(u,o,[c.value,h],!0):c.value,Xd(a,h,d);return a.length=h,a},ip=of,sp=Rc.codeAt,ap=function(e){var t,n,r=[],o=Af(vf(bf(e),uf,"."),".");for(t=0;t<o.length;t++)n=o[t],yf(r,ff(cf,n)?"xn--"+Ef(n):n);return mf(r,".")},cp=Vs,up=Ai,lp=kf,dp={URLSearchParams:_h,getState:ch},fp=In,hp=fp.set,pp=fp.getterFor("URL"),gp=dp.URLSearchParams,mp=dp.getState,yp=Yh.URL,vp=Yh.TypeError,Ap=Yh.parseInt,bp=Math.floor,wp=Math.pow,Sp=Kh("".charAt),Ep=Kh(/./.exec),xp=Kh([].join),kp=Kh(1..toString),Tp=Kh([].pop),Pp=Kh([].push),Rp=Kh("".replace),Ip=Kh([].shift),Cp=Kh("".split),Op=Kh("".slice),Lp=Kh("".toLowerCase),Bp=Kh([].unshift),jp="Invalid scheme",Dp="Invalid host",Mp="Invalid port",Up=/[a-z]/i,qp=/[\d+-.a-z]/i,Np=/\d/,_p=/^0x/i,Hp=/^[0-7]+$/,Qp=/^\d+$/,zp=/^[\da-f]+$/i,Fp=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Gp=/[\0\t\n\r #/:<>?@[\\\]^|]/,Wp=/^[\u0000-\u0020]+/,Vp=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Jp=/[\t\n\r]/g,Xp=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)Bp(t,e%256),e=bp(e/256);return xp(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=kp(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Yp={},$p=rp({},Yp,{" ":1,'"':1,"<":1,">":1,"`":1}),Kp=rp({},$p,{"#":1,"?":1,"{":1,"}":1}),Zp=rp({},Kp,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),eg=function(e,t){var n=sp(e,0);return n>32&&n<127&&!np(t,e)?e:encodeURIComponent(e)},tg={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ng=function(e,t){var n;return 2==e.length&&Ep(Up,Sp(e,0))&&(":"==(n=Sp(e,1))||!t&&"|"==n)},rg=function(e){var t;return e.length>1&&ng(Op(e,0,2))&&(2==e.length||"/"===(t=Sp(e,2))||"\\"===t||"?"===t||"#"===t)},og=function(e){return"."===e||"%2e"===Lp(e)},ig={},sg={},ag={},cg={},ug={},lg={},dg={},fg={},hg={},pg={},gg={},mg={},yg={},vg={},Ag={},bg={},wg={},Sg={},Eg={},xg={},kg={},Tg=function(e,t,n){var r,o,i,s=cp(e);if(t){if(o=this.parse(s))throw vp(o);this.searchParams=null}else{if(void 0!==n&&(r=new Tg(n,!0)),o=this.parse(s,null,r))throw vp(o);(i=mp(new gp)).bindURL(this),this.searchParams=i}};Tg.prototype={type:"URL",parse:function(e,t,n){var r,o,i,s,a,c=this,u=t||ig,l=0,d="",f=!1,h=!1,p=!1;for(e=cp(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=Rp(e,Wp,""),e=Rp(e,Vp,"$1")),e=Rp(e,Jp,""),r=op(e);l<=r.length;){switch(o=r[l],u){case ig:if(!o||!Ep(Up,o)){if(t)return jp;u=ag;continue}d+=Lp(o),u=sg;break;case sg:if(o&&(Ep(qp,o)||"+"==o||"-"==o||"."==o))d+=Lp(o);else{if(":"!=o){if(t)return jp;d="",u=ag,l=0;continue}if(t&&(c.isSpecial()!=np(tg,d)||"file"==d&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=d,t)return void(c.isSpecial()&&tg[c.scheme]==c.port&&(c.port=null));d="","file"==c.scheme?u=vg:c.isSpecial()&&n&&n.scheme==c.scheme?u=cg:c.isSpecial()?u=fg:"/"==r[l+1]?(u=ug,l++):(c.cannotBeABaseURL=!0,Pp(c.path,""),u=Eg)}break;case ag:if(!n||n.cannotBeABaseURL&&"#"!=o)return jp;if(n.cannotBeABaseURL&&"#"==o){c.scheme=n.scheme,c.path=ip(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=kg;break}u="file"==n.scheme?vg:lg;continue;case cg:if("/"!=o||"/"!=r[l+1]){u=lg;continue}u=hg,l++;break;case ug:if("/"==o){u=pg;break}u=Sg;continue;case lg:if(c.scheme=n.scheme,o==Wh)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=ip(n.path),c.query=n.query;else if("/"==o||"\\"==o&&c.isSpecial())u=dg;else if("?"==o)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=ip(n.path),c.query="",u=xg;else{if("#"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=ip(n.path),c.path.length--,u=Sg;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=ip(n.path),c.query=n.query,c.fragment="",u=kg}break;case dg:if(!c.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=Sg;continue}u=pg}else u=hg;break;case fg:if(u=hg,"/"!=o||"/"!=Sp(d,l+1))continue;l++;break;case hg:if("/"!=o&&"\\"!=o){u=pg;continue}break;case pg:if("@"==o){f&&(d="%40"+d),f=!0,i=op(d);for(var g=0;g<i.length;g++){var m=i[g];if(":"!=m||p){var y=eg(m,Zp);p?c.password+=y:c.username+=y}else p=!0}d=""}else if(o==Wh||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(f&&""==d)return"Invalid authority";l-=op(d).length+1,d="",u=gg}else d+=o;break;case gg:case mg:if(t&&"file"==c.scheme){u=bg;continue}if(":"!=o||h){if(o==Wh||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(c.isSpecial()&&""==d)return Dp;if(t&&""==d&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(d))return s;if(d="",u=wg,t)return;continue}"["==o?h=!0:"]"==o&&(h=!1),d+=o}else{if(""==d)return Dp;if(s=c.parseHost(d))return s;if(d="",u=yg,t==mg)return}break;case yg:if(!Ep(Np,o)){if(o==Wh||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()||t){if(""!=d){var v=Ap(d,10);if(v>65535)return Mp;c.port=c.isSpecial()&&v===tg[c.scheme]?null:v,d=""}if(t)return;u=wg;continue}return Mp}d+=o;break;case vg:if(c.scheme="file","/"==o||"\\"==o)u=Ag;else{if(!n||"file"!=n.scheme){u=Sg;continue}if(o==Wh)c.host=n.host,c.path=ip(n.path),c.query=n.query;else if("?"==o)c.host=n.host,c.path=ip(n.path),c.query="",u=xg;else{if("#"!=o){rg(xp(ip(r,l),""))||(c.host=n.host,c.path=ip(n.path),c.shortenPath()),u=Sg;continue}c.host=n.host,c.path=ip(n.path),c.query=n.query,c.fragment="",u=kg}}break;case Ag:if("/"==o||"\\"==o){u=bg;break}n&&"file"==n.scheme&&!rg(xp(ip(r,l),""))&&(ng(n.path[0],!0)?Pp(c.path,n.path[0]):c.host=n.host),u=Sg;continue;case bg:if(o==Wh||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&ng(d))u=Sg;else if(""==d){if(c.host="",t)return;u=wg}else{if(s=c.parseHost(d))return s;if("localhost"==c.host&&(c.host=""),t)return;d="",u=wg}continue}d+=o;break;case wg:if(c.isSpecial()){if(u=Sg,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=Wh&&(u=Sg,"/"!=o))continue}else c.fragment="",u=kg;else c.query="",u=xg;break;case Sg:if(o==Wh||"/"==o||"\\"==o&&c.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(a=Lp(a=d))||"%2e."===a||".%2e"===a||"%2e%2e"===a?(c.shortenPath(),"/"==o||"\\"==o&&c.isSpecial()||Pp(c.path,"")):og(d)?"/"==o||"\\"==o&&c.isSpecial()||Pp(c.path,""):("file"==c.scheme&&!c.path.length&&ng(d)&&(c.host&&(c.host=""),d=Sp(d,0)+":"),Pp(c.path,d)),d="","file"==c.scheme&&(o==Wh||"?"==o||"#"==o))for(;c.path.length>1&&""===c.path[0];)Ip(c.path);"?"==o?(c.query="",u=xg):"#"==o&&(c.fragment="",u=kg)}else d+=eg(o,Kp);break;case Eg:"?"==o?(c.query="",u=xg):"#"==o?(c.fragment="",u=kg):o!=Wh&&(c.path[0]+=eg(o,Yp));break;case xg:t||"#"!=o?o!=Wh&&("'"==o&&c.isSpecial()?c.query+="%27":c.query+="#"==o?"%23":eg(o,Yp)):(c.fragment="",u=kg);break;case kg:o!=Wh&&(c.fragment+=eg(o,$p))}l++}},parseHost:function(e){var t,n,r;if("["==Sp(e,0)){if("]"!=Sp(e,e.length-1))return Dp;if(t=function(e){var t,n,r,o,i,s,a,c=[0,0,0,0,0,0,0,0],u=0,l=null,d=0,f=function(){return Sp(e,d)};if(":"==f()){if(":"!=Sp(e,1))return;d+=2,l=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=n=0;n<4&&Ep(zp,f());)t=16*t+Ap(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,u>6)return;for(r=0;f();){if(o=null,r>0){if(!("."==f()&&r<4))return;d++}if(!Ep(Np,f()))return;for(;Ep(Np,f());){if(i=Ap(f(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;d++}c[u]=256*c[u]+o,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;c[u++]=t}else{if(null!==l)return;d++,l=++u}}if(null!==l)for(s=u-l,u=7;0!=u&&s>0;)a=c[u],c[u--]=c[l+s-1],c[l+--s]=a;else if(8!=u)return;return c}(Op(e,1,-1)),!t)return Dp;this.host=t}else if(this.isSpecial()){if(e=ap(e),Ep(Fp,e))return Dp;if(t=function(e){var t,n,r,o,i,s,a,c=Cp(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(o=c[r]))return e;if(i=10,o.length>1&&"0"==Sp(o,0)&&(i=Ep(_p,o)?16:8,o=Op(o,8==i?1:2)),""===o)s=0;else{if(!Ep(10==i?Qp:8==i?Hp:zp,o))return e;s=Ap(o,i)}Pp(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=wp(256,5-t))return null}else if(s>255)return null;for(a=Tp(n),r=0;r<n.length;r++)a+=n[r]*wp(256,3-r);return a}(e),null===t)return Dp;this.host=t}else{if(Ep(Gp,e))return Dp;for(t="",n=op(e),r=0;r<n.length;r++)t+=eg(n[r],Yp);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return np(tg,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&ng(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,s=e.path,a=e.query,c=e.fragment,u=t+":";return null!==o?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=Xp(o),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+xp(s,"/"):"",null!==a&&(u+="?"+a),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw vp(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Pg(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Xp(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(cp(e)+":",ig)},getUsername:function(){return this.username},setUsername:function(e){var t=op(cp(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=eg(t[n],Zp)}},getPassword:function(){return this.password},setPassword:function(e){var t=op(cp(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=eg(t[n],Zp)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Xp(e):Xp(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,gg)},getHostname:function(){var e=this.host;return null===e?"":Xp(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,mg)},getPort:function(){var e=this.port;return null===e?"":cp(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=cp(e))?this.port=null:this.parse(e,yg))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+xp(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,wg))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=cp(e))?this.query=null:("?"==Sp(e,0)&&(e=Op(e,1)),this.query="",this.parse(e,xg)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=cp(e))?("#"==Sp(e,0)&&(e=Op(e,1)),this.fragment="",this.parse(e,kg)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Pg=function(e){var t=tp(this,Rg),n=lp(arguments.length,1)>1?arguments[1]:void 0,r=hp(t,new Tg(e,!1,n));Jh||(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())},Rg=Pg.prototype,Ig=function(e,t){return{get:function(){return pp(this)[e]()},set:t&&function(e){return pp(this)[t](e)},configurable:!0,enumerable:!0}};if(Jh&&(ep(Rg,"href",Ig("serialize","setHref")),ep(Rg,"origin",Ig("getOrigin")),ep(Rg,"protocol",Ig("getProtocol","setProtocol")),ep(Rg,"username",Ig("getUsername","setUsername")),ep(Rg,"password",Ig("getPassword","setPassword")),ep(Rg,"host",Ig("getHost","setHost")),ep(Rg,"hostname",Ig("getHostname","setHostname")),ep(Rg,"port",Ig("getPort","setPort")),ep(Rg,"pathname",Ig("getPathname","setPathname")),ep(Rg,"search",Ig("getSearch","setSearch")),ep(Rg,"searchParams",Ig("getSearchParams")),ep(Rg,"hash",Ig("getHash","setHash"))),Zh(Rg,"toJSON",(function(){return pp(this).serialize()}),{enumerable:!0}),Zh(Rg,"toString",(function(){return pp(this).serialize()}),{enumerable:!0}),yp){var Cg=yp.createObjectURL,Og=yp.revokeObjectURL;Cg&&Zh(Pg,"createObjectURL",$h(Cg,yp)),Og&&Zh(Pg,"revokeObjectURL",$h(Og,yp))}up(Pg,"URL"),Vh({global:!0,constructor:!0,forced:!Xh,sham:!Jh},{URL:Pg});var Lg=f;to({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Lg(URL.prototype.toString,this)}});var Bg=c,jg=x,Dg=Bu,Mg=URLSearchParams.prototype,Ug=jg(Mg.forEach);function qg(){return Math.random().toString(36).slice(2)}function Ng(e){return Object.keys(e)}function _g(e){return Object.prototype.toString.call(e)}function Hg(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qg(e){return"string"==typeof e}function zg(e){return"[object BigInt]"===_g(e)}function Fg(e){return e instanceof Array}function Gg(e){return"object"==typeof e&&null!==e}function Wg(e){return e instanceof Blob}function Vg(e){return e instanceof URLSearchParams}function Jg(e){return e instanceof FormData}function Xg(e){return e instanceof File}function Yg(e){return e instanceof Document}Bg&&!("size"in Mg)&&Dg(Mg,"size",{get:function(){var e=0;return Ug(this,(function(){e++})),e},configurable:!0,enumerable:!0});const $g=e=>"".concat(e),Kg=e=>({ok:!0,value:e});function Zg(e){return void 0===e?Kg($g(e)):null===e?Kg(e):function(e){return"number"==typeof e}(e)&&(e===-1/0||e===1/0||Number.isNaN(e))?Kg($g(e)):zg(e)?Kg("".concat(e,"n")):"symbol"==typeof e||"function"==typeof e?Kg($g(e.toString())):e instanceof Error?Kg($g(e.stack)):e===Object.prototype?{value:null,ok:!1}:e instanceof Object||"object"==typeof e?{value:e,ok:!1}:Kg(e)}function em(e){const{ok:t,value:n}=Zg(e);return t?n:JSON.stringify(e,((e,t)=>Zg(t).value),2)}function tm(e){return void 0===e?"undefined":null===e?"null":zg(e)?"bigint":e instanceof Object?e instanceof Error?"error":"function"==typeof e?"function":"object":typeof e}const nm={...console},rm=["log","info","error","warn","debug"].reduce(((e,t)=>(e[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];console[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...n)},e.unproxy[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];nm[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...n)},e)),{unproxy:{}});const om=e=>{if("object"!=typeof e)return null;const{name:t,message:n,stack:r}=Object(e);return!1===[t,n,r].every(Boolean)?null:{name:t,message:n,stack:r}},im=e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=e=>{var n;t(null===(n=e.target)||void 0===n?void 0:n.result)},r.onerror=()=>{n(new Error("blob2base64Async: can not convert"))},r.readAsDataURL(e)})),sm="message",am="broadcast",cm="ping",um="updateRoomInfo";var lm=Object.freeze({__proto__:null,BROADCAST:am,CLOSE:"close",CONNECT:"connect",ERROR:"error",JOIN:"join",LEAVE:"leave",MESSAGE:sm,PING:cm,PONG:"pong",UPDATE_ROOM_INFO:um});function dm(e,t){return{role:"client",type:e,data:{...(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&{id:qg()},...t}}}class fm{constructor(e){t(this,"id",""),t(this,"name",""),t(this,"method",""),t(this,"url",""),t(this,"requestType","xhr"),t(this,"requestHeader",null),t(this,"status",0),t(this,"statusText",""),t(this,"readyState",0),t(this,"response",void 0),t(this,"responseReason",null),t(this,"responseType",""),t(this,"responseHeader",null),t(this,"startTime",0),t(this,"endTime",0),t(this,"costTime",0),t(this,"getData",null),t(this,"postData",null),t(this,"requestPayload",null),t(this,"withCredentials",!1),this.id=e}}const hm=2097152,pm="Exceed maximum limit";var gm;!function(e){e[e.UNSENT=0]="UNSENT",e[e.OPENED=1]="OPENED",e[e.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",e[e.LOADING=3]="LOADING",e[e.DONE=4]="DONE"}(gm||(gm={}));const mm="(file)";function ym(e,t){try{let n,r;if("object"==typeof window&&"object"==typeof document&&"[object HTMLDocument]"===Object.prototype.toString.call(document)){const{searchParams:o,href:i}=new URL(e,t);n=i,r=[...o.entries()]}else n=e.toString(),r=function(e){const t=/[?&]([^=#]+)=([^&#]*)/g,n=[];let r;for(;null!==(r=t.exec(e));){const e=decodeURIComponent(r[1]),t=decodeURIComponent(r[2]);n.push([e,t])}return n}(n);const o=n.replace(/^.*?([^/]+)(\/)*(\?.*?)?$/,"$1$2$3")||"";return{url:n,name:o,query:r}}catch(e){return{url:"Unknown",name:"Unknown",query:null}}}const vm="Content-Type";function Am(e,t){if(!t)return e;const n=function(e){return e?Jg(e)?"multipart/form-data":Vg(e)?"application/x-www-form-urlencoded;charset=UTF-8":Yg(e)?"application/xml":Wg(e)?e.type:"text/plain;charset=UTF-8":null}(t);if(!n)return e;const r=[vm,n];if(!e)return[r];for(let t=0;t<e.length;t++){const[n]=e[t];if(n.toUpperCase()===vm.toUpperCase())return e}return[...e,r]}async function bm(e){if(!e)return null;if(Vg(e)||Jg(e))return function(e){const t=[];let n=e.next();for(;!n.done;){const[r,o]=n.value;let i;i=Xg(o)?mm:String(o),t.push([r,i]),n=e.next()}return t}(e.entries());if(Wg(e))return"[object Blob]";if(t=e,ArrayBuffer.isView(t))return"[object TypedArray]";var t;if(Yg(e)){return(new XMLSerializer).serializeToString(e)}return Qg(e)?e:_g(e)}class wm{constructor(e){t(this,"socketStore",void 0),t(this,"reqMap",Object.create(null)),this.socketStore=e}getRequestMap(){return this.reqMap}getRequest(e){return this.reqMap[e]}removeRequest(e){delete this.reqMap[e]}createRequest(e){return e?this.reqMap[e]?(rm.warn("The request object has been in store, disallow duplicate create"),!1):(this.reqMap[e]=new fm(e),!0):(rm.warn('The "id" is required when init request object'),!1)}setRequest(e,t){return!(!e||!t)&&(this.reqMap[e]=t,!0)}sendRequestItem(e,t){try{this.reqMap[e]||(this.reqMap[e]=t);const n=dm("network",{...t},!1);Number(t.readyState)===gm.DONE&&this.socketStore.dispatchEvent("public-data",n),this.socketStore.broadcastMessage(n,t.readyState!==gm.DONE),this.deferDeleteRequest(e)}catch(e){rm.error(e.message)}}deferDeleteRequest(e){const t=this.getRequest(e);t&&t.readyState===gm.DONE&&setTimeout((()=>{delete this.reqMap[e]}),3e3)}}var Sm=x,Em=Set.prototype,xm={Set:Set,add:Sm(Em.add),has:Sm(Em.has),remove:Sm(Em.delete),proto:Em},km=xm.has,Tm=function(e){return km(e),e},Pm=f,Rm=function(e,t,n){for(var r,o,i=n||e.next;!(r=Pm(i,e)).done;)if(void 0!==(o=t(r.value)))return o},Im=x,Cm=Rm,Om=xm.Set,Lm=xm.proto,Bm=Im(Lm.forEach),jm=Im(Lm.keys),Dm=jm(new Om).next,Mm=function(e,t,n){return n?Cm(jm(e),t,Dm):Bm(e,t)},Um=Mm,qm=xm.Set,Nm=xm.add,_m=function(e){var t=new qm;return Um(e,(function(e){Nm(t,e)})),t},Hm=Ii(xm.proto,"size","get")||function(e){return e.size},Qm=be,zm=Bt,Fm=f,Gm=rr,Wm=TypeError,Vm=Math.max,Jm=function(e,t,n,r){this.set=e,this.size=t,this.has=n,this.keys=r};Jm.prototype={getIterator:function(){return zm(Fm(this.keys,this.set))},includes:function(e){return Fm(this.has,this.set,e)}};var Xm=function(e){zm(e);var t=+e.size;if(t!=t)throw Wm("Invalid size");return new Jm(e,Vm(Gm(t),0),Qm(e.has),Qm(e.keys))},Ym=Tm,$m=_m,Km=Hm,Zm=Xm,ey=Mm,ty=Rm,ny=xm.has,ry=xm.remove,oy=Y,iy=function(e){try{return(new(oy("Set")))[e]({size:0,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}),!0}catch(e){return!1}},sy=function(e){var t=Ym(this),n=Zm(e),r=$m(t);return Km(t)<=n.size?ey(t,(function(e){n.includes(e)&&ry(r,e)})):ty(n.getIterator(),(function(e){ny(t,e)&&ry(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!iy("difference")},{difference:sy});var ay=Tm,cy=Hm,uy=Xm,ly=Mm,dy=Rm,fy=xm.Set,hy=xm.add,py=xm.has,gy=a,my=function(e){var t=ay(this),n=uy(e),r=new fy;return cy(t)>n.size?dy(n.getIterator(),(function(e){py(t,e)&&hy(r,e)})):ly(t,(function(e){n.includes(e)&&hy(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!iy("intersection")||gy((function(){return"3,2"!=Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:my});var yy=Tm,vy=xm.has,Ay=Hm,by=Xm,wy=Mm,Sy=Rm,Ey=id,xy=function(e){var t=yy(this),n=by(e);if(Ay(t)<=n.size)return!1!==wy(t,(function(e){if(n.includes(e))return!1}),!0);var r=n.getIterator();return!1!==Sy(r,(function(e){if(vy(t,e))return Ey(r,"normal",!1)}))};to({target:"Set",proto:!0,real:!0,forced:!iy("isDisjointFrom")},{isDisjointFrom:xy});var ky=Tm,Ty=Hm,Py=Mm,Ry=Xm,Iy=function(e){var t=ky(this),n=Ry(e);return!(Ty(t)>n.size)&&!1!==Py(t,(function(e){if(!n.includes(e))return!1}),!0)};to({target:"Set",proto:!0,real:!0,forced:!iy("isSubsetOf")},{isSubsetOf:Iy});var Cy=Tm,Oy=xm.has,Ly=Hm,By=Xm,jy=Rm,Dy=id,My=function(e){var t=Cy(this),n=By(e);if(Ly(t)<n.size)return!1;var r=n.getIterator();return!1!==jy(r,(function(e){if(!Oy(t,e))return Dy(r,"normal",!1)}))};to({target:"Set",proto:!0,real:!0,forced:!iy("isSupersetOf")},{isSupersetOf:My});var Uy=Tm,qy=_m,Ny=Xm,_y=Rm,Hy=xm.add,Qy=xm.has,zy=xm.remove,Fy=function(e){var t=Uy(this),n=Ny(e).getIterator(),r=qy(t);return _y(n,(function(e){Qy(t,e)?zy(r,e):Hy(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!iy("symmetricDifference")},{symmetricDifference:Fy});var Gy=Tm,Wy=xm.add,Vy=_m,Jy=Xm,Xy=Rm,Yy=function(e){var t=Gy(this),n=Jy(e).getIterator(),r=Vy(t);return Xy(n,(function(e){Wy(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!iy("union")},{union:Yy});class $y{constructor(){t(this,"store",{}),t(this,"instanceStore",{})}getStore(){return this.store}resetStore(){this.store={}}getInstanceStore(){return this.instanceStore}resetInstanceStore(){this.instanceStore={}}transformToAtom(e){const{value:t,ok:n}=Zg(e);return n?{id:qg(),type:tm(e),value:t}:this.add(e)}get(e){const t=this.store[e],n=this.instanceStore[e];if(!t)return null;const r={},o=Object.getOwnPropertyDescriptors(t);Object.keys(o).forEach((e=>{const t=o[e];Hg(t,"value")&&(t.value=this.transformToAtom(t.value)),r[e]=$y.getAtomOverview({atomId:qg(),instanceId:n,value:t})}));const i=this.addExtraProperty(e);return{...r,...i}}getOrigin(e){const t=this.store[e];return t||null}add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=qg();let r=n;var o;Gg(o=e)&&Hg(o,"constructor")&&"function"==typeof o.constructor&&(r=t),this.store[n]=e,this.instanceStore[n]=r;const i=$y.getSemanticValue(e);return $y.getAtomOverview({atomId:n,value:i,instanceId:r})}static getAtomOverview(e){let{instanceId:t="",atomId:n,value:r}=e;return{id:qg(),type:"atom",__atomId:n,instanceId:t,value:r}}static getSemanticValue(e){if(Gg(t=e)&&"[object Object]"===_g(t))return"Object {...}";var t;if(Fg(e))return"Array (".concat(e.length,")");return e.constructor.name}addExtraProperty(e){const t=this.store[e],n=this.instanceStore[e],r={};if((t instanceof String||t instanceof Number||t instanceof Boolean)&&(r["[[PrimitiveValue]]"]=this.transformToAtom(t.valueOf())),t instanceof Set){const e={};let n=0;for(const r of t)e[n++]=r;e.size=t.size,r["[[Entries]]"]=this.transformToAtom(e)}if(t instanceof Map){const e={};let n=0;for(const[r,o]of t.entries())e[n++]={key:r,value:o};e.size=t.size,r["[[Entries]]"]=this.transformToAtom(e)}var o;return(Fg(t)||(o=t,"function"==typeof NodeList&&"NodeList"===NodeList.name&&o instanceof NodeList||"function"==typeof HTMLCollection&&"HTMLCollection"===HTMLCollection.name&&o instanceof HTMLCollection))&&(r.length=this.transformToAtom(t.length)),null!==Object.getPrototypeOf(t)?r["[[Prototype]]"]=this.add(Object.getPrototypeOf(t),n):r.___proto___=this.transformToAtom(null),r}}const Ky=new $y;var Zy=V,ev=R,tv=nt("match"),nv=f,rv=Qe,ov=$,iv=Oa,sv=RegExp.prototype,av=to,cv=f,uv=x,lv=U,dv=F,fv=j,hv=function(e){var t;return Zy(e)&&(void 0!==(t=e[tv])?!!t:"RegExp"==ev(e))},pv=Vs,gv=Ee,mv=function(e){var t=e.flags;return void 0!==t||"flags"in sv||rv(e,"flags")||!ov(sv,e)?t:nv(iv,e)},yv=qc,vv=nt("replace"),Av=TypeError,bv=uv("".indexOf);uv("".replace);var wv=uv("".slice),Sv=Math.max,Ev=function(e,t,n){return n>e.length?-1:""===t?n:bv(e,t,n)};av({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,o,i,s,a,c,u,l=lv(this),d=0,f=0,h="";if(!fv(e)){if(hv(e)&&(n=pv(lv(mv(e))),!~bv(n,"g")))throw Av("`.replaceAll` does not allow non-global regexes");if(r=gv(e,vv))return cv(r,e,l,t)}for(o=pv(l),i=pv(e),(s=dv(t))||(t=pv(t)),a=i.length,c=Sv(1,a),d=Ev(o,i,0);-1!==d;)u=s?pv(t(i,d,o)):yv(i,o,d,[],void 0,t),h+=wv(o,f,d)+u,f=d+a,d=Ev(o,i,d+c);return f<o.length&&(h+=wv(o,f)),h}});class xv{static makeClientInfoMsg(){const e=xv.info.ua||(e=>{let{osType:t,osVersion:n,browserType:r,browserVersion:o}=e;return"".concat(t,"/").concat(n," ").concat(r,"/").concat(o)})(xv.info);return{sdk:xv.info.sdk,isDevTools:xv.info.isDevTools,ua:e,plugins:xv.plugins}}}t(xv,"info",{osType:"unknown",osVersion:"unknown",browserType:"unknown",browserVersion:"unknown",framework:"unknown",isDevTools:!1,sdk:"browser"}),t(xv,"plugins",[]);class kv{defaultConfig(){return{}}constructor(){t(this,"value",void 0),t(this,"mergeConfig",(e=>{const t=Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return this.privateKeys.includes(n)||(e[n]=r),e}),{});return this.value={...this.defaultConfig(),...t},this.value})),this.value=this.defaultConfig()}get(){return this.value}set(e,t){this.value[e]=t}}const Tv="page-spy-room";var Pv;!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"}(Pv||(Pv={}));const Rv=2e3,Iv=Math.pow(1.5,4)*Rv;class Cv{constructor(){t(this,"events",{open:[],close:[],error:[],message:[]})}emit(e,t){this.events[e].forEach((e=>{e(t)})),"close"!==e&&"error"!==e||this.clearListeners()}onOpen(e){this.events.open.push(e)}onClose(e){this.events.close.push(e)}onError(e){this.events.error.push(e)}onMessage(e){this.events.message.push(e)}clearListeners(){Object.entries(this.events).forEach((e=>{let[,t]=e;t.splice(0)}))}}class Ov{constructor(){t(this,"socketUrl",""),t(this,"socketConnection",null),t(this,"debuggerConnection",null),t(this,"pingTimer",null),t(this,"pongTimer",null),t(this,"retryTimer",null),t(this,"isOffline",!1),t(this,"messageCapacity",0),t(this,"messages",[]),t(this,"events",{debug:[],refresh:[],"atom-detail":[],"atom-getter":[],"debugger-online":[],"database-pagination":[],"public-data":[]}),t(this,"retryInterval",Rv),t(this,"connectable",!0),this.addListener("atom-detail",Ov.handleResolveAtom),this.addListener("atom-getter",Ov.handleAtomPropertyGetter),this.addListener("debugger-online",this.handleFlushBuffer)}async init(e){try{var t,n,r,o,i;if(!e)throw Error("WebSocket url cannot be empty");this.socketWrapper.clearListeners(),this.socketWrapper.getState()===Pv.OPEN&&await new Promise((e=>{this.socketWrapper.onClose((()=>{this.socketWrapper.clearListeners(),e()})),this.socketWrapper.close()})),null===(t=this.socketWrapper)||void 0===t||t.onOpen((()=>{this.connectOnline()})),null===(n=this.socketWrapper)||void 0===n||n.onMessage((e=>{this.handleMessage(e)})),null===(r=this.socketWrapper)||void 0===r||r.onClose((()=>{this.connectOffline()})),null===(o=this.socketWrapper)||void 0===o||o.onError((()=>{this.connectOffline()})),this.socketUrl=e,null===(i=this.socketWrapper)||void 0===i||i.init(e)}catch(e){rm.error(e.message)}}addListener(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}removeListener(e,t){const n=this.events[e]||[],r=n.indexOf(t);r>-1&&n.splice(r,1)}broadcastMessage(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=function(e){return{type:am,content:{data:e}}}(e);this.send(n,t)}close(){var e;this.connectable=!1,this.clearPing(),null===(e=this.socketWrapper)||void 0===e||e.close(),this.messages=[],Object.entries(this.events).forEach((e=>{let[t,n]=e;["atom-detail","atom-getter","debugger-online"].includes(t)||n.splice(0)}))}connectOnline(){this.retryInterval=Rv,this.updateRoomInfo(),this.ping()}connectOffline(){this.socketConnection=null,this.debuggerConnection=null,this.clearPing(),this.retryTimer&&clearTimeout(this.retryTimer),this.connectable&&(this.retryTimer=setTimeout((()=>{this.retryInterval<Iv&&(this.retryInterval*=1.5),this.retryTimer=null,this.tryReconnect()}),this.retryInterval))}tryReconnect(){this.init(this.socketUrl)}ping(){this.pingTimer&&clearTimeout(this.pingTimer),this.pongTimer&&clearTimeout(this.pongTimer),this.pingTimer=setTimeout((()=>{this.send({type:"ping",content:null}),this.pingTimer=null,this.pongTimer=setTimeout((()=>{this.connectOffline(),this.pongTimer=null}),5e3)}),5e3)}clearPing(){this.pingTimer&&(clearTimeout(this.pingTimer),this.pingTimer=null),this.pongTimer&&(clearTimeout(this.pongTimer),this.pongTimer=null)}handlePong(){clearTimeout(this.pongTimer),this.pongTimer=null,this.ping()}handleMessage(e){var t;Ov.messageFilters.length&&Ov.messageFilters.forEach((t=>{e=t(e)}));const{CONNECT:n,MESSAGE:r,ERROR:o,JOIN:i,PING:s,PONG:a,LEAVE:c,CLOSE:u,BROADCAST:l}=lm,d=JSON.parse(e.data),{type:f}=d;switch(f){case n:const{selfConnection:e,roomConnections:s}=d.content;this.socketConnection=e,this.debuggerConnection=s.find((e=>"Debugger"===e.userId))||null;break;case i:case c:const{connection:a}=d.content;"Debugger"===a.userId&&(f===i?(this.debuggerConnection=a,this.sendClientInfo()):this.debuggerConnection=null);break;case r:const{data:l,from:h,to:p}=d.content;p.address===(null===(t=this.socketConnection)||void 0===t?void 0:t.address)&&this.dispatchEvent(l.type,{source:l,from:h,to:p});break;case u:case o:this.connectOffline()}this.handlePong()}dispatchEvent(e,t){var n;["public-data"].includes(e)?this.events["public-data"].forEach((e=>{e(t)})):null===(n=this.events[e])||void 0===n||n.forEach((e=>{e.call(this,t,(e=>{this.unicastMessage(e,t.from)}))}))}unicastMessage(e,t){const n=function(e,t,n){return{type:sm,content:{data:e,from:t,to:n}}}(e,this.socketConnection,t);this.send(n)}handleFlushBuffer(e){const{latestId:t}=e.source.data,n=this.messages.findIndex((e=>e.content.data.data.id===t));this.messages.slice(n+1).forEach((t=>{const n={type:sm,content:{data:t.content.data,from:this.socketConnection,to:e.from}};this.send(n,!0)}))}static handleResolveAtom(e,t){let{source:n}=e;const{type:r,data:o}=n;if("atom-detail"===r){const e=Ky.get(o)||{};t(dm("atom-detail-".concat(o),e,!1))}}static handleAtomPropertyGetter(e,t){let{source:n}=e;const{type:r,data:o}=n;if("atom-getter"===r){const{id:e,parentId:n,key:r,instanceId:s}=o,a=Ky.getOrigin(s),c=Ky.getOrigin(n);let u={};var i;if(a&&c)u=null===(i=Object.getOwnPropertyDescriptor(c,r))||void 0===i||null===(i=i.get)||void 0===i?void 0:i.call(a);else u=new Error("Getter computed failed");t(dm("atom-getter-".concat(e),Ky.transformToAtom(u)))}}send(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.checkIfSend(e))try{var n;const t=e;t.createdAt=Date.now(),t.requestId=qg();const r=em(t);null===(n=this.socketWrapper)||void 0===n||n.send(r)}catch(e){rm.error("Incompatible: ".concat(e.message)),this.connectOffline()}this.checkIfCache(e,t)&&(0!==this.messageCapacity&&this.messages.length>=this.messageCapacity&&this.messages.shift(),this.messages.push(e))}checkIfSend(e){return this.socketWrapper.getState()===Pv.OPEN&&(!![um,cm].includes(e.type)||!!this.debuggerConnection)}checkIfCache(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.isOffline&&!t&&![sm,cm].includes(e.type)}sendClientInfo(){const e=xv.makeClientInfoMsg();this.broadcastMessage({role:"client",type:"client-info",data:e},!0)}}t(Ov,"messageFilters",[]);class Lv{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{className:t="",el:n="div"}=e,r=document.createElement(n);r.dataset.testid="modal",r.className=["page-spy-modal",t].join(" "),r.style.display="none",r.onclick=e=>{e.stopPropagation(),e.preventDefault(),this.close()},this.el=r}show(){this.el.style.display="flex",setTimeout((()=>{this.el.classList.add("show")}),50)}close(){this.el.classList.remove("show"),setTimeout((()=>{this.el.style.display="none"}),300)}appendNode(e){this.el.insertAdjacentElement("beforeend",e)}}class Bv{constructor(e){this.options={...e};const t=document.createElement("div");t.dataset.testid="content",t.className=["page-spy-content",e.className].join(" "),t.onclick=e=>{e.stopPropagation()},this.el=t,this.render()}render(){const{content:e="",onOk:t}=this.options,n=document.createElement("div");n.className="page-spy-content__info",n.innerHTML=e;const r=document.createElement("div");r.dataset.testid="copy-button",r.className="page-spy-content__btn",r.textContent=function(){const e=navigator.languages;return["zh-CN","zh-HK","zh-TW","zh","zh-Hans-CN"].some((t=>e.includes(t)))}()?"复制在线调试链接":"Copy debug link",r.onclick=e=>{e.stopPropagation(),t&&t()},this.el.insertAdjacentElement("beforeend",n),this.el.insertAdjacentElement("beforeend",r)}}class jv extends Cv{constructor(){super(...arguments),t(this,"socketInstance",null)}init(e){this.socketInstance=new WebSocket(e);["open","close","error","message"].forEach((e=>{this.socketInstance.addEventListener(e,(t=>{this.events[e].forEach((e=>{e(t)}))}))}))}send(e){var t;null===(t=this.socketInstance)||void 0===t||t.send(em(e))}close(){var e;null===(e=this.socketInstance)||void 0===e||e.close()}getState(){var e;return null===(e=this.socketInstance)||void 0===e?void 0:e.readyState}}var Dv=new class extends Ov{constructor(){super(...arguments),t(this,"socketWrapper",new jv),t(this,"getPageSpyConfig",null)}updateRoomInfo(){if(this.getPageSpyConfig){const{project:e,title:t}=this.getPageSpyConfig();this.send({type:um,content:{info:{name:navigator.userAgent,group:e,tags:{title:t,name:navigator.userAgent,group:e}}}},!0)}}getSocket(){return this.socketWrapper}onOffline(){window.dispatchEvent(new CustomEvent("sdk-inactive")),sessionStorage.removeItem(Tv)}};class Mv{constructor(){t(this,"name","ConsolePlugin"),t(this,"proxyTypes",["log","info","error","warn","debug"]),t(this,"console",{})}async onInit(){var e=this;Mv.hasInitd||(Mv.hasInitd=!0,Dv.addListener("debug",Mv.handleDebugger),this.proxyTypes.forEach((t=>{this.console[t]=window.console[t]||window.console.log||(()=>{}),window.console[t]=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.printLog({logType:t,logs:r,url:window.location.href})}})))}onReset(){this.proxyTypes.forEach((e=>{window.console[e]=this.console[e]})),Mv.hasInitd=!1}static handleDebugger(e,t){let{source:n}=e;const{type:r,data:o}=n;if("debug"===r){t(dm("console",{logType:"debug-origin",logs:[{id:qg(),type:"debug-origin",value:o}]}));try{const e=new Function("return ".concat(o))();t(dm("console",{logType:"debug-eval",logs:[Ky.transformToAtom(e)]}))}catch(e){t(dm("console",{logType:"error",logs:[{type:"error",value:e.stack}]}))}}}printLog(e){if(e.logs&&e.logs.length){this.console[e.logType](...e.logs),e.logs=e.logs.map((e=>Ky.transformToAtom(e)));const t=dm("console",{time:Date.now(),...e});Dv.dispatchEvent("public-data",t),Dv.broadcastMessage(t)}}}t(Mv,"hasInitd",!1);class Uv{constructor(){t(this,"name","ErrorPlugin"),t(this,"uncaughtErrorListener",(e=>{if(e.error){const{message:t,stack:n}=e.error,r=om(e.error);Uv.sendMessage(n||t,r)}else{const e="[PageSpy] An unknown error occurred and no stack trace available";Uv.sendMessage(e,null)}})),t(this,"resourceLoadErrorListener",(e=>{if(!(e instanceof ErrorEvent)){const{target:t}=e;Uv.sendMessage("[PageSpy] Resource Load Error: Cannot load resource of (".concat(t.src||t.href,")"),null)}})),t(this,"rejectionListener",(e=>{const t=om(e.reason);Uv.sendMessage(e.reason,t)}))}onInit(){Uv.hasInitd||(Uv.hasInitd=!0,this.onUncaughtError(),this.onResourceLoadError(),this.onUnhandledRejectionError())}onReset(){window.removeEventListener("error",this.uncaughtErrorListener),window.removeEventListener("error",this.resourceLoadErrorListener),window.removeEventListener("unhandledrejection",this.rejectionListener),Uv.hasInitd=!1}onUncaughtError(){window.addEventListener("error",this.uncaughtErrorListener)}onResourceLoadError(){window.addEventListener("error",this.resourceLoadErrorListener,!0)}onUnhandledRejectionError(){window.addEventListener("unhandledrejection",this.rejectionListener)}static sendMessage(e,t){const n=dm("console",{logType:"error",logs:[Ky.transformToAtom(e)],time:Date.now(),url:window.location.href,errorDetail:t});Dv.dispatchEvent("public-data",n),Dv.broadcastMessage(n)}}t(Uv,"hasInitd",!1);class qv extends wm{constructor(){super(Dv)}}class Nv extends qv{constructor(){super(),t(this,"xhrOpen",null),t(this,"xhrSend",null),t(this,"xhrSetRequestHeader",null),this.initProxyHandler()}initProxyHandler(){const e=this;if(!window.XMLHttpRequest)return;const{open:t,send:n,setRequestHeader:r}=window.XMLHttpRequest.prototype;this.xhrOpen=t,this.xhrSend=n,this.xhrSetRequestHeader=r,window.XMLHttpRequest.prototype.open=function(){const n=this;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];const s=o[0],a=o[1],c=qg();return e.createRequest(c),this.pageSpyRequestId=c,this.pageSpyRequestMethod=s,this.pageSpyRequestUrl=a,n.addEventListener("readystatechange",(async()=>{const t=e.getRequest(c);if(t){switch(t.readyState=n.readyState,n.readyState){case n.UNSENT:case n.OPENED:t.status=n.status,t.statusText="Pending",t.startTime||(t.startTime=Date.now());break;case n.HEADERS_RECEIVED:t.status=n.status,t.statusText="Loading";const r=(n.getAllResponseHeaders()||"").trim().split(/[\r\n]+/);t.responseHeader=r.reduce(((e,t)=>{const[n,...r]=t.split(": ");return e.push([n,r.join(": ")]),e}),[]);break;case n.LOADING:t.status=n.status,t.statusText="Loading";break;case n.DONE:t.status=n.status,t.statusText="Done",t.endTime=Date.now(),t.costTime=t.endTime-(t.startTime||t.endTime);const o=await e.formatResponse(n);Ng(o).forEach((e=>{t[e]=o[e]}));break;default:t.status=n.status,t.statusText="Unknown"}e.sendRequestItem(n.pageSpyRequestId,t)}else rm.warn("The request object is not found on XMLHttpRequest's readystatechange event")})),t.apply(n,o)},window.XMLHttpRequest.prototype.setRequestHeader=function(t,n){const o=e.getRequest(this.pageSpyRequestId);return o?(o.requestHeader||(o.requestHeader=[]),o.requestHeader.push([String(t),String(n)])):rm.warn("The request object is not found on XMLHttpRequest's setRequestHeader event"),r.apply(this,[t,n])},window.XMLHttpRequest.prototype.send=function(t){const r=this,{pageSpyRequestId:o,pageSpyRequestMethod:i="GET",pageSpyRequestUrl:s=""}=r,a=e.getRequest(o);if(a){const n=ym(s,window.location.href);a.url=n.url,a.name=n.name,a.getData=n.query,a.method=i.toUpperCase(),a.requestType="xhr",a.responseType=r.responseType,a.withCredentials=r.withCredentials,"GET"!==a.method&&(a.requestHeader=Am(a.requestHeader,t),bm(t).then((t=>{a.requestPayload=t,e.sendRequestItem(r.pageSpyRequestId,a)})))}else rm.warn("The request object is not found on XMLHttpRequest's send event");return n.apply(r,[t])}}reset(){this.xhrOpen&&(window.XMLHttpRequest.prototype.open=this.xhrOpen),this.xhrSend&&(window.XMLHttpRequest.prototype.send=this.xhrSend),this.xhrSetRequestHeader&&(window.XMLHttpRequest.prototype.setRequestHeader=this.xhrSetRequestHeader)}async formatResponse(e){const t={response:"",responseReason:null};switch(e.responseType){case"":case"text":if(Qg(e.response))try{t.response=JSON.parse(e.response)}catch(n){t.response=e.response}else void 0!==e.response&&(t.response=_g(e.response));break;case"json":void 0!==e.response&&(t.response=e.response);break;case"blob":case"arraybuffer":if(e.response){let n=e.response;if(n instanceof ArrayBuffer){const t=e.getResponseHeader("content-type");t&&(n=new Blob([n],{type:t}))}if(Wg(n))if(n.size<=hm)try{t.response=await im(n)}catch(e){t.response=await n.text(),rm.error(e.message)}else t.response="[object Blob]",t.responseReason=pm}break;default:void 0!==e.response&&(t.response=Object.prototype.toString.call(e.response))}return t}}var _v=i.Promise,Hv=xd,Qv=me,zv=TypeError,Fv=Bt,Gv=function(e){if(Hv(e))return e;throw zv(Qv(e)+" is not a constructor")},Wv=j,Vv=nt("species"),Jv={},Xv=be,Yv=TypeError,$v=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Yv("Bad Promise constructor");t=e,n=r})),this.resolve=Xv(t),this.reject=Xv(n)};Jv.f=function(e){return new $v(e)};var Kv=Bt,Zv=V,eA=Jv,tA=to,nA=_v,rA=a,oA=Y,iA=F,sA=function(e,t){var n,r=Fv(e).constructor;return void 0===r||Wv(n=Fv(r)[Vv])?t:Gv(n)},aA=function(e,t){if(Kv(e),Zv(t)&&t.constructor===e)return t;var n=eA.f(e);return(0,n.resolve)(t),n.promise},cA=Kn,uA=nA&&nA.prototype;if(tA({target:"Promise",proto:!0,real:!0,forced:!!nA&&rA((function(){uA.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=sA(this,oA("Promise")),n=iA(e);return this.then(n?function(n){return aA(t,e()).then((function(){return n}))}:e,n?function(n){return aA(t,e()).then((function(){throw n}))}:e)}}),iA(nA)){var lA=oA("Promise").prototype.finally;uA.finally!==lA&&cA(uA,"finally",lA,{unsafe:!0})}class dA extends qv{constructor(){super(),t(this,"fetch",null),this.initProxyHandler()}reset(){this.fetch&&(window.fetch=this.fetch)}initProxyHandler(){const e=this,t=window.fetch;t&&(this.fetch=t,window.fetch=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=t(n,r),i=qg();e.createRequest(i);const s=e.getRequest(i);if(s){let t,a="GET",c=null;Qg(n)||n instanceof URL?(a=r.method||"GET",t=n,c=r.headers||null):(a=n.method,t=n.url,c=n.headers);const u=ym(t,window.location.href);s.url=u.url,s.name=u.name,s.getData=u.query,s.method=a.toUpperCase(),s.requestType="fetch",s.status=0,s.statusText="Pending",s.startTime=Date.now(),s.readyState=XMLHttpRequest.UNSENT,r.credentials&&"omit"!==r.credentials&&(s.withCredentials=!0),c&&(!function(e){return e instanceof Headers}(c)?Gg(c)?s.requestHeader=Object.entries(c).map((e=>{let[t,n]=e;return[String(t),String(n)]})):s.requestHeader=c.map((e=>{let[t,n]=e;return[String(t),String(n)]})):s.requestHeader=[...c.entries()]),"GET"!==s.method&&(s.requestHeader=Am(s.requestHeader,r.body),bm(r.body).then((t=>{s.requestPayload=t,e.sendRequestItem(i,s)}))),e.sendRequestItem(i,s),o.then((t=>{s.endTime=Date.now(),s.costTime=s.endTime-(s.startTime||s.endTime),s.status=t.status||200,s.statusText=t.statusText||"Done",s.responseHeader=[...t.headers.entries()],s.readyState=XMLHttpRequest.HEADERS_RECEIVED,e.sendRequestItem(i,s);const n=t.headers.get("content-type");if(n){if(n.includes("application/json"))return s.responseType="json",t.clone().text();if(n.includes("text/html")||n.includes("text/plain"))return s.responseType="text",t.clone().text()}return s.responseType="blob",t.clone().blob()})).then((async e=>{switch(s.responseType){case"text":case"json":try{s.response=JSON.parse(e)}catch(t){s.response=e,s.responseType="text"}break;case"blob":const t=e;if(t.size<=hm)try{s.response=await im(t)}catch(e){s.response=await t.text(),rm.error(e.message)}else s.response="[object Blob]",s.responseReason=pm}})).finally((()=>{s.readyState=XMLHttpRequest.DONE,e.sendRequestItem(i,s)}))}else rm.warn("The request object is not found on window.fetch event");return o})}}class fA extends qv{constructor(){super(),t(this,"sendBeacon",null),this.initProxyHandler()}reset(){this.sendBeacon&&(window.navigator.sendBeacon=this.sendBeacon)}initProxyHandler(){const e=window.navigator.sendBeacon;if(!e)return;const t=this;this.sendBeacon=e,window.navigator.sendBeacon=function(n,r){const o=e.call(window.navigator,n,r),i=qg();t.createRequest(i);const s=t.getRequest(i);if(s){const e=ym(n,window.location.href);s.url=e.url,s.name=e.name,s.getData=e.query,s.method="POST",s.status=0,s.statusText="Pending",s.requestType="ping",s.requestHeader=Am(s.requestHeader,r),s.startTime=Date.now(),bm(r).then((e=>{s.requestPayload=e,t.sendRequestItem(i,s)})),s.response="",o?(s.status=200,s.statusText="Sent",s.endTime=Date.now(),s.costTime=s.endTime-(s.startTime||s.endTime)):(s.status=500,s.statusText="Unknown"),s.readyState=XMLHttpRequest.DONE,t.sendRequestItem(i,s)}else rm.warn("The request object is not on navigator.sendBeacon event");return o}}}const hA=window.EventSource;class pA extends qv{constructor(){super(),this.initProxyHandler()}initProxyHandler(){if(!window.EventSource)return;const e=this;window.EventSource=class{constructor(n,r){t(this,"content",'The "window.EventSource" is being proxied by PageSpy\'s NetworkPlugin.');const o=qg(),i=new fm(o),s=ym(n,window.location.href);i.method="GET",i.url=s.url,i.name=s.name,i.getData=s.query,i.requestType="eventsource",i.requestHeader=[["Accept","text/event-stream"],["Cache-Control","no-cache"]],i.readyState=gm.UNSENT,i.withCredentials=Boolean(null==r?void 0:r.withCredentials),i.responseHeader=[["Content-Type","text/event-stream"]],i.responseType="text",i.startTime=Date.now(),this.es=new hA(n,r),this.es.addEventListener("open",(()=>{i.readyState=gm.OPENED,i.endTime=Date.now(),i.costTime=i.endTime-i.startTime,e.sendRequestItem(o,i)})),this.es.addEventListener("message",(t=>{let{data:n}=t;i.status=200,i.statusText="Done",i.readyState=gm.DONE,i.response=n,i.endTime=Date.now(),i.costTime=i.endTime-i.startTime,e.sendRequestItem(o,i)})),this.es.addEventListener("error",(()=>{i.status=400,i.readyState=gm.DONE,i.endTime=Date.now(),i.costTime=i.endTime-i.startTime,e.sendRequestItem(o,i)}));const a=this;return new Proxy(a,{get(e,t){if(t in e)return e[t];const n=e.es[t];return"function"==typeof n?n.bind(a.es):n}})}}}reset(){window.EventSource=hA}}class gA{constructor(){t(this,"name","NetworkPlugin"),t(this,"xhrProxy",null),t(this,"fetchProxy",null),t(this,"beaconProxy",null),t(this,"sseProxy",null)}onInit(){gA.hasInitd||(gA.hasInitd=!0,this.xhrProxy=new Nv,this.fetchProxy=new dA,this.beaconProxy=new fA,this.sseProxy=new pA)}onReset(){var e,t,n,r;null===(e=this.xhrProxy)||void 0===e||e.reset(),null===(t=this.fetchProxy)||void 0===t||t.reset(),null===(n=this.beaconProxy)||void 0===n||n.reset(),null===(r=this.sseProxy)||void 0===r||r.reset(),gA.hasInitd=!1}}t(gA,"hasInitd",!1);var mA=i,yA=Ai;to({global:!0},{Reflect:{}}),yA(mA.Reflect,"Reflect",!0);var vA;
/*! modernizr 4.0.0-alpha (Custom Build) | MIT *
   * https://modernizr.com/download/?-apng-arrow-avif-beacon-blobworkers-clipboard-contextmenu-cookies-cors-customevent-datachannel-dataworkers-es6array-es6class-es6collections-es6math-es6number-es6object-es6string-es6symbol-es7array-es8object-eventlistener-exiforientation-fetch-forcetouch-generators-getusermedia-hashchange-history-imgcrossorigin-indexeddb-jpeg2000-lazyloading-localstorage-messagechannel-oninput-peerconnection-performance-pointerevents-postmessage-prefetch-promises-proxy-queryselector-requestanimationframe-resizeobserver-restdestructuringarray_restdestructuringobject-restparameters-sandbox-scriptasync-scriptdefer-seamless-serviceworker-sessionstorage-sharedworkers-spreadarray-spreadobject-srcdoc-stringtemplate-transferables-webanimations-webgl-webp-websqldatabase-webworkers-addtest-atrule-domprefixes-hasevent-load-mq-prefixed-prefixedcss-prefixes-printshiv-setclasses-testallprops-testprop-teststyles !*/vA={exports:{}},function(e,t,n,r){function o(e,t){return typeof e===t}function i(e){var t=E.className,n=A._config.classPrefix||"";if(x&&(t=t.baseVal),A._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}A._config.enableClasses&&(e.length>0&&(t+=" "+n+e.join(" "+n)),x?E.className.baseVal=t:E.className=t)}function s(e,t){if("object"==typeof e)for(var n in e)b(e,n)&&s(n,e[n]);else{var r=(e=e.toLowerCase()).split("."),o=A[r[0]];if(2===r.length&&(o=o[r[1]]),void 0!==o)return A;t="function"==typeof t?t():t,1===r.length?A[r[0]]=t:(!A[r[0]]||A[r[0]]instanceof Boolean||(A[r[0]]=new Boolean(A[r[0]])),A[r[0]][r[1]]=t),i([(t&&!1!==t?"":"no-")+r.join("-")]),A._trigger(e,t)}return A}function a(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):x?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function c(e,t,r,o){var i,s,c,u,l="modernizr",d=a("div"),f=function(){var e=n.body;return e||((e=a(x?"svg":"body")).fake=!0),e}();if(parseInt(r,10))for(;r--;)(c=a("div")).id=o?o[r]:l+(r+1),d.appendChild(c);return(i=a("style")).type="text/css",i.id="s"+l,(f.fake?f:d).appendChild(i),f.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(n.createTextNode(e)),d.id=l,f.fake&&(f.style.background="",f.style.overflow="hidden",u=E.style.overflow,E.style.overflow="hidden",E.appendChild(f)),s=t(d,e),f.fake&&f.parentNode?(f.parentNode.removeChild(f),E.style.overflow=u,E.offsetHeight):d.parentNode.removeChild(d),!!s}function u(e,n,r){var o;if("getComputedStyle"in t){o=getComputedStyle.call(t,e,n);var i=t.console;null!==o?r&&(o=o.getPropertyValue(r)):i&&i[i.error?"error":"log"].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}else o=!n&&e.currentStyle&&e.currentStyle[r];return o}function l(e,t){return!!~(""+e).indexOf(t)}function d(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()})).replace(/^ms-/,"-ms-")}function f(e){return e.replace(/([a-z])-([a-z])/g,(function(e,t,n){return t+n.toUpperCase()})).replace(/^-/,"")}function h(e,n,i,s){function h(){g&&(delete D.style,delete D.modElem)}if(s=!o(s,"undefined")&&s,!o(i,"undefined")){var p=function(e,n){var o=e.length;if("CSS"in t&&"supports"in t.CSS){for(;o--;)if(t.CSS.supports(d(e[o]),n))return!0;return!1}if("CSSSupportsRule"in t){for(var i=[];o--;)i.push("("+d(e[o])+":"+n+")");return c("@supports ("+(i=i.join(" or "))+") { #modernizr { position: absolute; } }",(function(e){return"absolute"===u(e,null,"position")}))}return r}(e,i);if(!o(p,"undefined"))return p}for(var g,m,y,v,A,b=["modernizr","tspan","samp"];!D.style&&b.length;)g=!0,D.modElem=a(b.shift()),D.style=D.modElem.style;for(y=e.length,m=0;m<y;m++)if(v=e[m],A=D.style[v],l(v,"-")&&(v=f(v)),D.style[v]!==r){if(s||o(i,"undefined"))return h(),"pfx"!==n||v;try{D.style[v]=i}catch(e){}if(D.style[v]!==A)return h(),"pfx"!==n||v}return h(),!1}function p(e,t){return function(){return e.apply(t,arguments)}}function g(e,t,n,r,i){var s=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+T.join(s+" ")+s).split(" ");return o(t,"string")||o(t,"undefined")?h(a,t,r,i):function(e,t,n){var r;for(var i in e)if(e[i]in t)return!1===n?e[i]:o(r=t[e[i]],"function")?p(r,n||t):r;return!1}(a=(e+" "+R.join(s+" ")+s).split(" "),t,n)}function m(e,t){var n=e.deleteDatabase(t);n.onsuccess=function(){s("indexeddb.deletedatabase",!0)},n.onerror=function(){s("indexeddb.deletedatabase",!1)}}var y=[],v={_version:"4.0.0-alpha",_config:{classPrefix:"",enableClasses:!1,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout((function(){t(n[e])}),0)},addTest:function(e,t,n){y.push({name:e,fn:t,options:n})},addAsyncTest:function(e){y.push({name:null,fn:e})}},A=function(){};A.prototype=v,A=new A;var b,w,S=[],E=n.documentElement,x="svg"===E.nodeName.toLowerCase();b=o(w={}.hasOwnProperty,"undefined")||o(w.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return w.call(e,t)},v._l={},v.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),A.hasOwnProperty(e)&&setTimeout((function(){A._trigger(e,A[e])}),0)},v._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout((function(){var e;for(e=0;e<n.length;e++)(0,n[e])(t)}),0),delete this._l[e]}},A._q.push((function(){v.addTest=s}));var k="Moz O ms Webkit",T=v._config.usePrefixes?k.split(" "):[];v._cssomPrefixes=T;var P=function(e){var n,o=U.length,i=t.CSSRule;if(void 0===i)return r;if(!e)return!1;if((n=(e=e.replace(/^@/,"")).replace(/-/g,"_").toUpperCase()+"_RULE")in i)return"@"+e;for(var s=0;s<o;s++){var a=U[s];if(a.toUpperCase()+"_"+n in i)return"@-"+a.toLowerCase()+"-"+e}return!1};v.atRule=P;var R=v._config.usePrefixes?k.toLowerCase().split(" "):[];v._domPrefixes=R;var I,C=(I=!("onblur"in E),function(e,t){var n;return!!e&&(t&&"string"!=typeof t||(t=a(t||"div")),!(n=(e="on"+e)in t)&&I&&(t.setAttribute||(t=a("div")),t.setAttribute(e,""),n="function"==typeof t[e],t[e]!==r&&(t[e]=r),t.removeAttribute(e)),n)});v.hasEvent=C,x||function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=b.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=A[e[y]];return t||(t={},v++,e[y]=v,A[v]=t),t}function i(e,n,r){return n||(n=t),h?n.createElement(e):(r||(r=o(n)),!(i=r.cache[e]?r.cache[e].cloneNode():m.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e)).canHaveChildren||g.test(e)||i.tagUrn?i:r.frag.appendChild(i));var i}function s(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return b.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(b,t.frag)}function a(e){e||(e=t);var r=o(e);return!b.shivCSS||f||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),h||s(e,r),e}function c(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),s=[];o--;)t=n[o],i.test(t.nodeName)&&s.push(t.applyElement(u(t)));return s}function u(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(S+":"+e.nodeName);r--;)(t=n[r]).specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function l(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),s="$1"+S+"\\:$2";o--;)(t=n[o]=n[o].split("}"))[t.length-1]=t[t.length-1].replace(i,s),n[o]=t.join("}");return n.join("{")}function d(e){function t(){clearTimeout(s._removeSheetTimer),r&&r.removeNode(!0),r=null}var r,i,s=o(e),a=e.namespaces,u=e.parentWindow;return!E||e.printShived||(void 0===a[S]&&a.add(S),u.attachEvent("onbeforeprint",(function(){t();for(var o,s,a,u=e.styleSheets,d=[],f=u.length,h=Array(f);f--;)h[f]=u[f];for(;a=h.pop();)if(!a.disabled&&w.test(a.media)){try{s=(o=a.imports).length}catch(e){s=0}for(f=0;f<s;f++)h.push(o[f]);try{d.push(a.cssText)}catch(e){}}d=l(d.reverse().join("")),i=c(e),r=n(e,d)})),u.attachEvent("onafterprint",(function(){(function(e){for(var t=e.length;t--;)e[t].removeNode()})(i),clearTimeout(s._removeSheetTimer),s._removeSheetTimer=setTimeout(t,500)})),e.printShived=!0),e}var f,h,p=e.html5||{},g=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,m=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,y="_html5shiv",v=0,A={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",f="hidden"in e,h=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}catch(e){f=!0,h=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==p.shivCSS,supportsUnknownElements:h,shivMethods:!1!==p.shivMethods,type:"default",shivDocument:a,createElement:i,createDocumentFragment:function(e,n){if(e||(e=t),h)return e.createDocumentFragment();for(var i=(n=n||o(e)).frag.cloneNode(),s=0,a=r(),c=a.length;s<c;s++)i.createElement(a[s]);return i},addElements:function(e,t){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),b.elements=n+" "+e,a(t)}};e.html5=b,a(t);var w=/^$|\b(?:all|print)\b/,S="html5shiv",E=!h&&function(){var n=t.documentElement;return!(void 0===t.namespaces||void 0===t.parentWindow||void 0===n.applyElement||void 0===n.removeNode||void 0===e.attachEvent)}();b.type+=" print",b.shivPrint=d,d(t),vA.exports&&(vA.exports=b)}(void 0!==t?t:this,n);var O=function(){},L=function(){};t.console&&(O=function(){var e=console.error?"error":"log";t.console[e].apply(t.console,Array.prototype.slice.call(arguments))},L=function(){var e=console.warn?"warn":"log";t.console[e].apply(t.console,Array.prototype.slice.call(arguments))}),v.load=function(){"yepnope"in t?(L("yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. yepnope appears to be available on the page, so we’ll use it to handle this call to Modernizr.load, but please update your code to use yepnope directly.\n See http://github.com/Modernizr/Modernizr/issues/1182 for more information."),t.yepnope.apply(t,[].slice.call(arguments,0))):O("yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. Get it from http://yepnopejs.com. See http://github.com/Modernizr/Modernizr/issues/1182 for more information.")};var B=function(){var e=t.matchMedia||t.msMatchMedia;return e?function(t){var n=e(t);return n&&n.matches||!1}:function(e){var t=!1;return c("@media "+e+" { #modernizr { position: absolute; } }",(function(e){t="absolute"===u(e,null,"position")})),t}}();v.mq=B;var j={elem:a("modernizr")};A._q.push((function(){delete j.elem}));var D={style:j.elem.style};A._q.unshift((function(){delete D.style})),v.testAllProps=g;var M=v.prefixed=function(e,t,n){return 0===e.indexOf("@")?P(e):(-1!==e.indexOf("-")&&(e=f(e)),t?g(e,t,n):g(e,"pfx"))},U=v._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];v._prefixes=U,v.prefixedCSS=function(e){var t=M(e);return t&&d(t)},v.testAllProps=function(e,t,n){return g(e,r,r,t,n)},v.testProp=function(e,t,n){return h([e],r,t,n)},v.testStyles=c,A.addAsyncTest((function(){var e,t=["read","readText","write","writeText"];if(navigator.clipboard){s("clipboard",!0);for(var n=0;n<t.length;n++)e=!!navigator.clipboard[t[n]],s("clipboard."+t[n].toLowerCase(),e)}else s("clipboard",!1)})),A.addTest("contextmenu","contextMenu"in E&&"HTMLMenuItemElement"in t),A.addTest("cors","XMLHttpRequest"in t&&"withCredentials"in new XMLHttpRequest),A.addTest("es6array",!!(Array.prototype&&Array.prototype.copyWithin&&Array.prototype.fill&&Array.prototype.find&&Array.prototype.findIndex&&Array.prototype.keys&&Array.prototype.entries&&Array.prototype.values&&Array.from&&Array.of)),A.addTest("arrow",(function(){try{(0,eval)("()=>{}")}catch(e){return!1}return!0})),A.addTest("es6class",(function(){try{(0,eval)("class A{}")}catch(e){return!1}return!0})),A.addTest("es6collections",!!(t.Map&&t.Set&&t.WeakMap&&t.WeakSet)),A.addTest("generators",(function(){try{new Function("function* test() {}")()}catch(e){return!1}return!0})),A.addTest("es6math",!!(Math&&Math.clz32&&Math.cbrt&&Math.imul&&Math.sign&&Math.log10&&Math.log2&&Math.log1p&&Math.expm1&&Math.cosh&&Math.sinh&&Math.tanh&&Math.acosh&&Math.asinh&&Math.atanh&&Math.hypot&&Math.trunc&&Math.fround)),A.addTest("es6number",!!(Number.isFinite&&Number.isInteger&&Number.isSafeInteger&&Number.isNaN&&Number.parseInt&&Number.parseFloat&&Number.isInteger(Number.MAX_SAFE_INTEGER)&&Number.isInteger(Number.MIN_SAFE_INTEGER)&&Number.isFinite(Number.EPSILON))),A.addTest("es6object",!!(Object.assign&&Object.is&&Object.setPrototypeOf)),A.addTest("promises",(function(){return"Promise"in t&&"resolve"in t.Promise&&"reject"in t.Promise&&"all"in t.Promise&&"race"in t.Promise&&function(){var e;return new t.Promise((function(t){e=t})),"function"==typeof e}()})),A.addTest("restparameters",(function(){try{(0,eval)("function f(...rest) {}")}catch(e){return!1}return!0})),A.addTest("spreadarray",(function(){try{(0,eval)("(function f(){})(...[1])")}catch(e){return!1}return!0})),A.addTest("stringtemplate",(function(){try{return"-1-"===(0,eval)("(function(){var a=1; return `-${a}-`;})()")}catch(e){return!1}})),A.addTest("es6string",!!(String.fromCodePoint&&String.raw&&String.prototype.codePointAt&&String.prototype.repeat&&String.prototype.startsWith&&String.prototype.endsWith&&String.prototype.includes)),A.addTest("es6symbol",!!("function"==typeof Symbol&&Symbol.for&&Symbol.hasInstance&&Symbol.isConcatSpreadable&&Symbol.iterator&&Symbol.keyFor&&Symbol.match&&Symbol.prototype&&Symbol.replace&&Symbol.search&&Symbol.species&&Symbol.split&&Symbol.toPrimitive&&Symbol.toStringTag&&Symbol.unscopables)),A.addTest("es7array",!(!Array.prototype||!Array.prototype.includes)),A.addTest("restdestructuringarray",(function(){try{(0,eval)("var [...rest]=[1]")}catch(e){return!1}return!0})),A.addTest("restdestructuringobject",(function(){try{(0,eval)("var {...rest}={a:1}")}catch(e){return!1}return!0})),A.addTest("spreadobject",(function(){try{(0,eval)("var a={...{b:1}}")}catch(e){return!1}return!0})),A.addTest("es8object",!(!Object.entries||!Object.values)),A.addTest("customevent","CustomEvent"in t&&"function"==typeof t.CustomEvent),A.addTest("eventlistener","addEventListener"in t),A.addTest("forcetouch",(function(){return!!C(M("mouseforcewillbegin",t,!1),t)&&MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN&&MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN})),A.addTest("hashchange",(function(){return!1!==C("hashchange",t)&&(n.documentMode===r||n.documentMode>7)})),A.addTest("oninput",(function(){var e,r=a("input");if(r.setAttribute("oninput","return"),r.style.cssText="position:fixed;top:0;",C("oninput",E)||"function"==typeof r.oninput)return!0;try{var o=n.createEvent("KeyboardEvent");e=!1;var i=function(t){e=!0,t.preventDefault(),t.stopPropagation()};o.initKeyEvent("keypress",!0,!0,t,!1,!1,!1,!1,0,"e".charCodeAt(0)),E.appendChild(r),r.addEventListener("input",i,!1),r.focus(),r.dispatchEvent(o),r.removeEventListener("input",i,!1),E.removeChild(r)}catch(r){e=!1}return e}));var q=[""].concat(R);v._domPrefixesAll=q,A.addTest("pointerevents",(function(){for(var e=0,t=q.length;e<t;e++)if(C(q[e]+"pointerdown"))return!0;return!1})),A.addTest("history",(function(){var e=navigator.userAgent;return!!e&&(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone")||"file:"===location.protocol)&&t.history&&"pushState"in t.history})),A.addTest("sandbox","sandbox"in a("iframe")),A.addTest("seamless","seamless"in a("iframe")),A.addTest("srcdoc","srcdoc"in a("iframe")),A.addTest("canvas",(function(){var e=a("canvas");return!(!e.getContext||!e.getContext("2d"))})),A.addAsyncTest((function(){if(!A.canvas)return!1;var e=new Image,t=a("canvas"),n=t.getContext("2d");e.onload=function(){s("apng",(function(){return void 0!==t.getContext&&(n.drawImage(e,0,0),0===n.getImageData(0,0,1,1).data[3])}))},e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="})),A.addAsyncTest((function(){var e=new Image;e.onload=e.onerror=function(){s("avif",1===e.width)},e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAAEcbWV0YQAAAAAAAABIaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGNhdmlmIC0gaHR0cHM6Ly9naXRodWIuY29tL2xpbmstdS9jYXZpZgAAAAAeaWxvYwAAAAAEQAABAAEAAAAAAUQAAQAAABcAAAAqaWluZgEAAAAAAAABAAAAGmluZmUCAAAAAAEAAGF2MDFJbWFnZQAAAAAOcGl0bQAAAAAAAQAAAHJpcHJwAAAAUmlwY28AAAAQcGFzcAAAAAEAAAABAAAAFGlzcGUAAAAAAAAAAQAAAAEAAAAQcGl4aQAAAAADCAgIAAAAFmF2MUOBAAwACggYAAYICGgIIAAAABhpcG1hAAAAAAAAAAEAAQUBAoMDhAAAAB9tZGF0CggYAAYICGgIIBoFHiAAAEQiBACwDoA="})),A.addTest("imgcrossorigin","crossOrigin"in a("img")),A.addAsyncTest((function(){var e=new Image;e.onerror=function(){s("exiforientation",!1)},e.onload=function(){s("exiforientation",2!==e.width)},e.src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q=="})),A.addAsyncTest((function(){var e=new Image;e.onload=e.onerror=function(){s("jpeg2000",1===e.width)},e.src="data:image/jp2;base64,/0//UQAyAAAAAAABAAAAAgAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAEBwEBBwEBBwEBBwEB/1IADAAAAAEAAAQEAAH/XAAEQED/ZAAlAAFDcmVhdGVkIGJ5IE9wZW5KUEVHIHZlcnNpb24gMi4wLjD/kAAKAAAAAABYAAH/UwAJAQAABAQAAf9dAAUBQED/UwAJAgAABAQAAf9dAAUCQED/UwAJAwAABAQAAf9dAAUDQED/k8+kEAGvz6QQAa/PpBABr994EAk//9k="})),A.addTest("lazyloading","loading"in HTMLImageElement.prototype),A.addAsyncTest((function(){function e(e,t,n){function r(t){var r=!(!t||"load"!==t.type)&&1===o.width;s(e,"webp"===e&&r?new Boolean(r):r),n&&n(t)}var o=new Image;o.onerror=r,o.onload=r,o.src=t}var t=[{uri:"data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=",name:"webp"},{uri:"data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==",name:"webp.alpha"},{uri:"data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA",name:"webp.animation"},{uri:"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",name:"webp.lossless"}],n=t.shift();e(n.name,n.uri,(function(n){if(n&&"load"===n.type)for(var r=0;r<t.length;r++)e(t[r].name,t[r].uri)}))})),A.addTest("messagechannel","MessageChannel"in t),A.addTest("beacon","sendBeacon"in navigator),A.addTest("fetch","fetch"in t),A.addTest("performance",!!M("performance",t));var N=!0;try{t.postMessage({toString:function(){N=!1}},"*")}catch(w){}A.addTest("postmessage",new Boolean("postMessage"in t)),A.addTest("postmessage.structuredclones",N),A.addTest("proxy","Proxy"in t),A.addTest("queryselector","querySelector"in n&&"querySelectorAll"in n),A.addTest("prefetch",(function(){if(11===n.documentMode)return!0;var e=a("link").relList;return!(!e||!e.supports)&&e.supports("prefetch")})),A.addTest("requestanimationframe",!!M("requestAnimationFrame",t),{aliases:["raf"]}),A.addTest("scriptasync","async"in a("script")),A.addTest("scriptdefer","defer"in a("script")),A.addTest("serviceworker","serviceWorker"in navigator),A.addTest("cookies",(function(){try{n.cookie="cookietest=1";var e=-1!==n.cookie.indexOf("cookietest=");return n.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})),A.addAsyncTest((function(){var e;try{e=M("indexedDB",t)}catch(e){}if(e){var n,r="modernizr-"+Math.random();try{n=e.open(r)}catch(e){return void s("indexeddb",!1)}n.onerror=function(t){!n.error||"InvalidStateError"!==n.error.name&&"UnknownError"!==n.error.name?(s("indexeddb",!0),m(e,r)):(s("indexeddb",!1),t.preventDefault())},n.onsuccess=function(){s("indexeddb",!0),m(e,r)}}else s("indexeddb",!1)})),A.addTest("localstorage",(function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}})),A.addTest("sessionstorage",(function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}})),A.addTest("websqldatabase","openDatabase"in t),A.addTest("webanimations","animate"in a("div")),A.addTest("webgl",(function(){return"WebGLRenderingContext"in t})),A.addTest("peerconnection",!!M("RTCPeerConnection",t)),A.addTest("datachannel",(function(){if(!A.peerconnection)return!1;for(var e=0,n=q.length;e<n;e++){var r=t[q[e]+"RTCPeerConnection"];if(r)try{return"createDataChannel"in new r({})}catch(e){}}return!1})),A.addTest("getUserMedia","mediaDevices"in navigator&&"getUserMedia"in navigator.mediaDevices),A.addTest("resizeobserver","ResizeObserver"in t),A.addAsyncTest((function(){function e(){s("blobworkers",!1),n()}function n(){u&&o.revokeObjectURL(u),c&&c.terminate(),l&&clearTimeout(l)}try{var r=t.BlobBuilder,o=t.URL;A._config.usePrefix&&(r=r||t.MozBlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.OBlobBuilder,o=o||t.MozURL||t.webkitURL||t.MSURL||t.OURL);var i,a,c,u,l,d="this.onmessage=function(e){postMessage(e.data)}";try{i=new Blob([d],{type:"text/javascript"})}catch(e){}i||((a=new r).append(d),i=a.getBlob()),u=o.createObjectURL(i),(c=new Worker(u)).onmessage=function(e){s("blobworkers","Modernizr"===e.data),n()},c.onerror=e,l=setTimeout(e,200),c.postMessage("Modernizr")}catch(n){e()}})),A.addAsyncTest((function(){try{var e=new Worker("data:text/javascript;base64,dGhpcy5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7cG9zdE1lc3NhZ2UoZS5kYXRhKX0=");e.onmessage=function(t){e.terminate(),s("dataworkers","Modernizr"===t.data),e=null},e.onerror=function(){s("dataworkers",!1),e=null},setTimeout((function(){s("dataworkers",!1)}),200),e.postMessage("Modernizr")}catch(e){setTimeout((function(){s("dataworkers",!1)}),0)}})),A.addTest("sharedworkers","SharedWorker"in t),A.addTest("blobconstructor",(function(){try{return!!new Blob}catch(e){return!1}}),{aliases:["blob-constructor"]});var _=M("URL",t,!1);_=_&&t[_],A.addTest("bloburls",_&&"revokeObjectURL"in _&&"createObjectURL"in _),A.addTest("webworkers","Worker"in t),A.addTest("typedarrays","ArrayBuffer"in t),A.addAsyncTest((function(){function e(){s("transferables",!1),t()}function t(){i&&URL.revokeObjectURL(i),a&&a.terminate(),r&&clearTimeout(r)}if(!(A.blobconstructor&&A.bloburls&&A.webworkers&&A.typedarrays))return s("transferables",!1);try{var n,r,o=new Blob(['var hello = "world"'],{type:"text/javascript"}),i=URL.createObjectURL(o),a=new Worker(i);a.onerror=e,r=setTimeout(e,200),n=new ArrayBuffer(1),a.postMessage(n,[n]),s("transferables",0===n.byteLength),t()}catch(t){e()}})),function(){var e,t,n,r,i,s;for(var a in y)if(y.hasOwnProperty(a)){if(e=[],(t=y[a]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(r=o(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)1===(s=e[i].split(".")).length?A[s[0]]=r:(A[s[0]]&&(!A[s[0]]||A[s[0]]instanceof Boolean)||(A[s[0]]=new Boolean(A[s[0]])),A[s[0]][s[1]]=r),S.push((r?"":"no-")+s.join("-"))}}(),i(S),delete v.addTest,delete v.addAsyncTest;for(var H=0;H<A._q.length;H++)A._q[H]();e.Modernizr=A}(window,window,document);const AA={Element:{sandbox:{title:"iframe/sandbox",keyPath:"iframe/sandbox"},srcdoc:{title:"iframe/srcdoc",keyPath:"iframe/srcdoc"},apng:{title:"img/apng",keyPath:"img/apng"},avif:{title:"img/avif",keyPath:"img/avif"},imgcrossorigin:{title:"img/crossorigin",keyPath:"img/crossorigin"},exiforientation:{title:"img/exif-orientation",keyPath:"img/exif-orientation"},lazyloading:{title:"img/lazyloading",keyPath:"img/lazyloading"},webp:{title:"img/webp",keyPath:"img/webp"},prefetch:{title:"link/prefetch",keyPath:"link/prefetch"},scriptasync:{title:"script/async",keyPath:"script/async"},scriptdefer:{title:"script/defer",keyPath:"script/defer"}},Feature:{clipboard:{title:"Clipboard",keyPath:"clipboard"},customevent:{title:"Custom Event",keyPath:"event/customevent"},eventlistener:{title:"Eventlistener",keyPath:"event/eventlistener"},forcetouch:{title:"Force Touch",keyPath:"event/forcetouch"},hashchange:{title:"Hash Change",keyPath:"event/hashchange"},oninput:{title:"Input Event",keyPath:"event/oninput"},pointerevents:{title:"Pointer Event",keyPath:"event/forcetouch"},history:{title:"History",keyPath:"history"},messagechannel:{title:"Message Channel",keyPath:"messagechannel"},postmessage:{title:"Postmessage",keyPath:"postmessage"},performance:{title:"Performance API",keyPath:"performance"},queryselector:{title:"queryselector",keyPath:"queryselector"},requestanimationframe:{title:"requestanimationframe",keyPath:"requestanimationframe"},serviceworker:{title:"Service Worker",keyPath:"serviceworker"},webanimations:{title:"Web Animation",keyPath:"webanimations"},webgl:{title:"WebGL",keyPath:"webgl/webgl"},datachannel:{title:"WebRTC/datachannel",keyPath:"webrtc/datachannel"},getusermedia:{title:"WebRTC/getusermedia",keyPath:"webrtc/getusermedia"},peerconnection:{title:"WebRTC/peerconnection",keyPath:"webrtc/peerconnection"},resizeobserver:{title:"Resizeobserver",keyPath:"window/resizeobserver"},sharedworkers:{title:"Shared Worker",keyPath:"workers/sharedworkers"},webworkers:{title:"Web Worker",keyPath:"workers/webworkers"}},Network:{cors:{title:"Cors",keyPath:"cors"},beacon:{title:"Beacon",keyPath:"network/beacon"},fetch:{title:"Fetch",keyPath:"network/fetch"}},Javascript:{es6array:{title:"ES6 Array",keyPath:"es6/array"},arrow:{title:"ES6 Arrow Function",keyPath:"es6/arrow"},es6class:{title:"ES6 Class",keyPath:"es6/class"},es6collections:{title:"ES6 Collections",keyPath:"es6/collections"},generators:{title:"ES6 Generators",keyPath:"es6/generators"},es6math:{title:"ES6 Math",keyPath:"es6/math"},es6number:{title:"ES6 Number",keyPath:"es6/number"},es6object:{title:"ES6 Object",keyPath:"es6/object"},promises:{title:"ES6 Promise",keyPath:"es6/promises"},restparameters:{title:"ES6 Rest Parameters",keyPath:"es6/rest-parameters"},spreadarray:{title:"ES6 Array Spread",keyPath:"es6/spread-array"},stringtemplate:{title:"ES6 String Template",keyPath:"es6/string-template"},es6string:{title:"ES6 String",keyPath:"es6/string"},es6symbol:{title:"ES6 Symbol",keyPath:"es6/symbol"},proxy:{title:"ES6 Proxy",keyPath:"proxy"},reflect:{title:"ES6 Reflect",customTest:"\"Reflect\" in window &&\n      typeof window.Reflect === 'object' &&\n      typeof Reflect.has === 'function' &&\n      [\n        'apply',\n        'construct',\n        'defineProperty',\n        'deleteProperty',\n        'getOwnPropertyDescriptor',\n        'getPrototypeOf',\n        'has',\n        'isExtensible',\n        'ownKeys',\n        'preventExtensions',\n        'setPrototypeOf',\n      ].every((i) => Reflect.has(Reflect, i))"},es7array:{title:"ES7 Array",keyPath:"es7/array"},restdestructuringarray:{title:"ES7 Rest Destructuring",keyPath:"es7/rest-destructuring"},spreadobject:{title:"ES7 Object Spread",keyPath:"es7/spread-object"},es8object:{title:"ES8 Object",keyPath:"es8/object"},finally:{title:"ES9 Promise Finally",customTest:"<ES6 Promise> && !!Promise.prototype.finally"}},Storage:{cookies:{title:"Cookies",keyPath:"storage/cookies"},indexeddb:{title:"IndexedDB",keyPath:"storage/indexeddb"},localstorage:{title:"LocalStorage",keyPath:"storage/localstorage"},sessionstorage:{title:"SessionStorage",keyPath:"storage/sessionstorage"},websqldatabase:{title:"Web SQL Database",keyPath:"storage/websqldatabase"}}},bA=["indexeddb","apng","avif","exiforientation","webp"];async function wA(){const e={Element:[],Feature:[],Network:[],Javascript:[],Storage:[]};Ng(AA).forEach((t=>{const n=AA[t],r=Ng(n).map((async e=>{const t=n[e];return t.keyPath&&(t.keyPath="".concat("https://github.com/Modernizr/Modernizr/tree/master/feature-detects","/").concat(t.keyPath,".js")),bA.indexOf(e)>-1?t.supported=await function(e){return new Promise((t=>{Modernizr.on(e,(e=>{t(e)}))}))}(e):t.supported=Modernizr[e],t}));e[t]=r}));for(const t in e)Hg(e,t)&&(e[t]=await Promise.all(e[t]));return e}window.Modernizr.addTest("finally",Modernizr.promises&&!!Promise.prototype.finally),window.Modernizr.addTest("reflect","Reflect"in window&&"object"==typeof window.Reflect&&"function"==typeof Reflect.has&&["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","setPrototypeOf"].every((e=>Reflect.has(Reflect,e))));class SA{constructor(){t(this,"name","SystemPlugin")}onInit(){SA.hasInitd||(SA.hasInitd=!0,Dv.addListener("refresh",(async(e,t)=>{let{source:n}=e;const{data:r}=n;if("system"===r){const e=await SA.getSystemInfo();Dv.dispatchEvent("public-data",e),t(e)}})))}onReset(){SA.hasInitd=!1}static async getSystemInfo(){const e=await wA();return dm("system",{system:{ua:navigator.userAgent},features:e})}}t(SA,"hasInitd",!1);class EA{constructor(){t(this,"name","PagePlugin")}onInit(){EA.hasInitd||(EA.hasInitd=!0,Dv.addListener("refresh",((e,t)=>{let{source:n}=e;const{data:r}=n;if("page"===r){const e=EA.collectHtml();Dv.dispatchEvent("public-data",e),t(e)}})))}onReset(){EA.hasInitd=!1}static collectHtml(){return dm("page",{html:document.documentElement.outerHTML,location:window.location})}}t(EA,"hasInitd",!1);class xA{constructor(){t(this,"name","StoragePlugin"),t(this,"originSetItem",null),t(this,"originRemoveItem",null),t(this,"originClear",null),t(this,"cookieStoreChangeListener",null)}onInit(){xA.hasInitd||(xA.hasInitd=!0,xA.listenRefreshEvent(),xA.onceInitPublicData(),this.initStorageProxy())}onReset(){this.originClear&&(Storage.prototype.clear=this.originClear),this.originRemoveItem&&(Storage.prototype.removeItem=this.originRemoveItem),this.originSetItem&&(Storage.prototype.setItem=this.originSetItem),this.cookieStoreChangeListener&&window.cookieStore&&window.cookieStore.removeEventListener("change",this.cookieStoreChangeListener),xA.hasInitd=!1}static async sendRefresh(e){let t=null;switch(e){case"localStorage":case"sessionStorage":t=xA.takeStorage(e);break;case"cookie":t=await xA.takeCookie()}t&&xA.sendStorageItem(t)}static listenRefreshEvent(){Dv.addListener("refresh",(async e=>{let{source:t}=e;const{data:n}=t;xA.sendRefresh(n)}))}static takeStorage(e){const t={type:e,action:"get",data:[]},n=window[e],r=n.length;if(!r)return t;for(let e=0;e<=r-1;e++){const r=n.key(e);if(r){const e=n.getItem(r)||"";t.data.push({name:r,value:e})}}return t}static async takeCookie(){const e={type:"cookie",action:"get",data:[]};return window.cookieStore?e.data=await window.cookieStore.getAll():e.data=document.cookie.split("; ").map((e=>{const[t,n]=e.split("=");return{name:t,value:n}})),e}initStorageProxy(){const{getStorageType:e,sendStorageItem:t}=xA,{clear:n,removeItem:r,setItem:o}=Storage.prototype;this.originClear=n,this.originRemoveItem=r,this.originSetItem=o,Storage.prototype.clear=function(){n.call(this);const r={type:e(this),action:"clear"};t(r)},Storage.prototype.removeItem=function(n){r.call(this,n);const o={type:e(this),action:"remove",name:String(n)};t(o)},Storage.prototype.setItem=function(n,r){o.call(this,n,r);const i={type:e(this),action:"set",name:String(n),value:String(r)};t(i)},window.cookieStore&&(this.cookieStoreChangeListener=e=>{const{changed:t,deleted:n}=e;t.length>0&&t.forEach((e=>{const t={type:"cookie",action:"set",...e};xA.sendStorageItem(t)})),n.length>0&&n.forEach((e=>{const t={type:"cookie",action:"remove",name:e.name};xA.sendStorageItem(t)}))},window.cookieStore.addEventListener("change",this.cookieStoreChangeListener))}static async onceInitPublicData(){(await Promise.all([xA.takeStorage("localStorage"),xA.takeStorage("sessionStorage"),xA.takeCookie()])).forEach((e=>{const t=dm("storage",e);Dv.dispatchEvent("public-data",t)}))}static getStorageType(e){return e===localStorage?"localStorage":e===sessionStorage?"sessionStorage":e.constructor.name}static sendStorageItem(e){const t=dm("storage",e);Dv.dispatchEvent("public-data",t),Dv.broadcastMessage(t,!0)}}function kA(e){return new Promise(((t,n)=>{e.addEventListener("success",(()=>{t(e.result)})),e.addEventListener("error",(()=>{n()}))}))}t(xA,"hasInitd",!1);class TA{constructor(){t(this,"name","DatabasePlugin"),t(this,"originAdd",null),t(this,"originPut",null),t(this,"originDelete",null),t(this,"originClear",null),t(this,"originDrop",null)}static get isSupport(){return!!(IDBFactory&&IDBObjectStore&&window.indexedDB&&window.indexedDB.databases)}onInit(){TA.isSupport&&(TA.hasInitd||(TA.hasInitd=!0,TA.listenEvents(),this.initIndexedDBProxy()))}onReset(){this.originAdd&&(IDBObjectStore.prototype.add=this.originAdd),this.originPut&&(IDBObjectStore.prototype.put=this.originPut),this.originClear&&(IDBObjectStore.prototype.clear=this.originClear),this.originDelete&&(IDBObjectStore.prototype.delete=this.originDelete),this.originDrop&&(IDBFactory.prototype.deleteDatabase=this.originDrop),TA.hasInitd=!1}static listenEvents(){Dv.addListener("refresh",(async e=>{let{source:t}=e;if("indexedDB"===t.data){const e={action:"basic",result:await this.takeBasicInfo()};TA.sendData(e)}})),Dv.addListener("database-pagination",(async e=>{let{source:t}=e;const{db:n,store:r,page:o}=t.data,i=await TA.getStoreDataWithPagination({db:n,store:r,page:o});TA.sendData(i)}))}initIndexedDBProxy(){const{put:e,add:t,delete:n,clear:r}=IDBObjectStore.prototype;this.originAdd=t,this.originPut=e,this.originDelete=n,this.originClear=r;const{sendData:o}=TA;[{origin:e,method:"put"},{origin:t,method:"add"},{origin:n,method:"delete"},{origin:r,method:"clear"}].forEach((e=>{let{origin:t,method:n}=e;IDBObjectStore.prototype[n]=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];const s=t.apply(this,r),a={action:"clear"===n?"clear":"update",database:this.transaction.db.name,store:this.name};return s.addEventListener("success",(()=>{o(a)})),s}}));const i=IDBFactory.prototype.deleteDatabase;this.originDrop=i,IDBFactory.prototype.deleteDatabase=function(e){const t=i.call(this,e),n={action:"drop",database:e};return t.addEventListener("success",(()=>{o(n)})),t}}static async takeBasicInfo(){const e=await window.indexedDB.databases();if(!e.length)return null;const t=e.filter((e=>e.name&&e.version));if(!t.length)return null;return(await Promise.all(t.map((e=>TA.getDBData(e))))).filter(Boolean)}static async getDBData(e){try{const t={name:e.name,version:e.version,stores:[]},n=await kA(window.indexedDB.open(e.name,e.version));if(n.objectStoreNames.length){const e=[...n.objectStoreNames].map((e=>n.transaction(e,"readonly").objectStore(e)));t.stores=e.map((e=>{const{name:t,keyPath:n,autoIncrement:r,indexNames:o}=e;return{name:t,keyPath:n,autoIncrement:r,indexes:[...o]}}))}return t}catch(e){return rm.error("Failed to get indexedDB data, more info: ".concat(e.message)),null}}static async getStoreDataWithPagination(e){let{db:t,store:n,page:r}=e;const o={action:"get",database:null,store:null,page:{current:r,prev:null,next:null},total:0,data:[]};if(r<1)return o;const i=await kA(window.indexedDB.open(t)),s=i.transaction(n,"readonly").objectStore(n);o.database={name:i.name,version:i.version},o.store={name:s.name,keyPath:s.keyPath,autoIncrement:s.autoIncrement,indexes:[...s.indexNames]},o.total=await kA(s.count());const a=50*(r-1),c=50*r;o.page.prev=r>1?r-1:null,o.page.next=a+50<o.total?r+1:null;let u=0;const l=s.openCursor();return new Promise(((e,t)=>{l.addEventListener("success",(()=>{const t=l.result;t?(u>=a&&u<c&&o.data.push({key:t.key,value:t.value}),u++,t.continue()):e(o)})),l.addEventListener("error",t)}))}static sendData(e){const t=dm("database",e);Dv.broadcastMessage(t,!0),["update","clear","drop"].includes(e.action)&&Dv.dispatchEvent("public-data",t)}}t(TA,"hasInitd",!1);const PA=e=>{const t=new URLSearchParams;return Object.entries(e).forEach((e=>{let[n,r]=e;t.append(n,String(r))})),t.toString()};class RA{constructor(e){if(this.config=e,!e.api)throw Error("The api base url cannot be empty")}get base(){return this.config.api}getScheme(){return this.config.enableSSL?["https://","wss://"]:["http://","ws://"]}createRoom(){const{project:e,title:t,useSecret:n,secret:r}=this.config,o=this.getScheme(),i=PA({name:navigator.userAgent,group:e,title:t});return fetch("".concat(o[0]).concat(this.base,"/api/v1/room/create?").concat(i),{method:"POST",body:JSON.stringify({useSecret:n,secret:r})}).then((e=>e.json())).then((e=>{const{name:t,address:n}=e.data||{};return{roomUrl:this.getRoomUrl(n),address:n,name:t}})).catch((e=>{throw Error("Request create room failed: ".concat(e.message))}))}getRoomUrl(e){const t=this.getScheme(),{useSecret:n,secret:r}=this.config;return"".concat(t[1]).concat(this.base,"/api/v1/ws/room/join?").concat(PA({address:e,name:"client:".concat(qg()),userId:"Client",forceCreate:!0,useSecret:n,secret:r}))}}const IA="50%",CA="100%";function OA(e){return window.TouchEvent&&e instanceof TouchEvent?e.touches[0]:e}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("#__pageSpy {\n  font-size: 14px;\n}\n#__pageSpy .page-spy-logo {\n  --top-radius: 100%;\n  --right-radius: 100%;\n  --bottom-radius: 100%;\n  --left-radius: 100%;\n  position: fixed;\n  right: 2.85714286em;\n  bottom: 5.71428571em;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: 5.71428571em;\n  height: 5.71428571em;\n  font-size: 1em;\n  border-radius: 5.71428571em;\n  background-color: #fff;\n  box-shadow: 0px 4px 8px 2px rgba(0, 0, 0, 0.2);\n  cursor: pointer;\n  z-index: 13000;\n  transition: opacity ease-in-out 0.3s, transform ease-in-out 0.3s, background-color ease-in-out 0.3s, filter ease-in-out 0.3s;\n}\n#__pageSpy .page-spy-logo.inactive {\n  background-color: #a2a2a2;\n  filter: grayscale(1);\n}\n#__pageSpy .page-spy-logo::after {\n  content: '';\n  display: block;\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  transform: rotateZ(45deg);\n  background-color: white;\n  border-top-left-radius: var(--top-radius);\n  border-top-right-radius: var(--right-radius);\n  border-bottom-right-radius: var(--bottom-radius);\n  border-bottom-left-radius: var(--left-radius);\n  transition: border-radius linear 0.15s;\n}\n#__pageSpy .page-spy-logo .hidden-mixin {\n  opacity: 0.35;\n}\n#__pageSpy .page-spy-logo.hidden-in-top {\n  opacity: 0.35;\n  transform: translateY(-65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-top img {\n  transform: translateY(30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-right {\n  opacity: 0.35;\n  transform: translateX(65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-right img {\n  transform: translateX(-30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-bottom {\n  opacity: 0.35;\n  transform: translateY(65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-bottom img {\n  transform: translateY(-30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-left {\n  opacity: 0.35;\n  transform: translateX(-65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-left img {\n  transform: translateX(30%);\n}\n#__pageSpy .page-spy-logo img {\n  position: relative;\n  display: block;\n  z-index: 100;\n  transition: transform ease-in-out 0.1s 0.4s;\n}\n#__pageSpy .page-spy-modal {\n  position: fixed;\n  left: 0;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  background-color: rgba(0, 0, 0, 0.5);\n  opacity: 0;\n  transition: all ease-out 0.3s;\n  z-index: 13000;\n}\n#__pageSpy .page-spy-modal.show {\n  opacity: 1;\n}\n#__pageSpy .page-spy-content {\n  width: 75%;\n  max-width: 25em;\n  background-color: #fafafa;\n  border-radius: 0.28571429em;\n  text-align: center;\n}\n#__pageSpy .page-spy-content__info {\n  padding: 1.71428571em 1.14285714em;\n  font-size: 1.14285714em;\n  line-height: 1.5;\n  text-align: left;\n  color: #202124;\n  letter-spacing: 2px;\n}\n#__pageSpy .page-spy-content__info > p {\n  margin: 0;\n  padding: 0;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n#__pageSpy .page-spy-content__info > p b {\n  display: inline-block;\n  width: 6.57142857em;\n  text-align: right;\n  margin-right: 10px;\n}\n#__pageSpy .page-spy-content__btn {\n  padding: 0.57142857em 0;\n  border-top: 1px solid #eee;\n  font-size: 1.14285714em;\n  line-height: 1.5;\n  color: transparent;\n  -webkit-background-clip: text;\n          background-clip: text;\n  background-image: linear-gradient(45deg, #efdfff, #4e00b1 52%, #3d0c7c);\n  cursor: pointer;\n}\n.page-spy-toast {\n  position: fixed;\n  left: 50%;\n  top: 10%;\n  transform: translateX(-50%);\n  max-width: 50vw;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  padding: 6px 12px;\n  color: #9a62e4;\n  font-size: 14px;\n  background-color: #fafafa;\n  border-radius: 4px;\n  box-shadow: 0px 4px 8px 2px rgba(0, 0, 0, 0.2);\n  z-index: 99999;\n}\n");var LA;class BA extends kv{constructor(){super(...arguments),t(this,"privateKeys",["secret"]),t(this,"defaultConfig",(()=>{const e={api:"",clientOrigin:"",project:"default",autoRender:!0,title:"--",enableSSL:null,disabledPlugins:[],offline:!1,logo:"data:image/svg+xml,%3csvg width='255' height='255' viewBox='0 0 255 255' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M183 24L81 126V141.5L90 150.5H105L145 110.5H160.5L169.5 119.5V133.5L72 231' stroke='url(%23paint0_linear_106_8)' stroke-width='25' stroke-linecap='round' /%3e %3cdefs%3e %3clinearGradient id='paint0_linear_106_8' x1='127.5' y1='24' x2='127.5' y2='231' gradientUnits='userSpaceOnUse'%3e %3cstop stop-color='%233D0C7C' /%3e %3cstop offset='0.519204' stop-color='%234E00B1' /%3e %3cstop offset='1' stop-color='%23EFDFFF' /%3e %3c/linearGradient%3e %3c/defs%3e%3c/svg%3e",logoStyle:{},messageCapacity:1e3,useSecret:!1,secret:""};if(!BA.scriptLink)return e;try{const{host:t,origin:n,protocol:r}=new URL(BA.scriptLink);return{...e,api:t,clientOrigin:n,enableSSL:r.startsWith("https")}}catch(t){return e}}))}}t(BA,"scriptLink",null===(LA=document.currentScript)||void 0===LA?void 0:LA.src);class jA{static message(e){const t=document.createElement("div");t.classList.add("page-spy-toast"),t.innerText=String(e),document.documentElement.appendChild(t);const n=setTimeout((()=>{document.contains(t)&&document.documentElement.removeChild(t),jA.timer===n&&(jA.timer=null)}),1500);jA.timer=n}static destroy(){const e=document.querySelectorAll(".page-spy-toast");e.length&&([...e].forEach((e=>{document.contains(e)&&document.documentElement.removeChild(e)})),jA.timer&&clearTimeout(jA.timer)),jA.timer=null}}t(jA,"timer",null);const DA="__pageSpy";xv.info.sdk="browser",xv.info.ua=navigator.userAgent;class MA{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t(this,"root",null),t(this,"version","1.9.1"),t(this,"request",null),t(this,"name",""),t(this,"address",""),t(this,"roomUrl",""),t(this,"socketStore",Dv),t(this,"config",new BA),t(this,"cacheTimer",null),MA.instance)return rm.warn("Cannot initialize PageSpy multiple times"),MA.instance;MA.instance=this;const n=this.config.mergeConfig(e);this.updateConfiguration(),this.triggerPlugins("onInit",{config:n,socketStore:Dv}),this.init()}updateConfiguration(){const{messageCapacity:e,offline:t,useSecret:n}=this.config.get();if(!0===n){const e=JSON.parse(sessionStorage.getItem(Tv));this.config.set("secret",(null==e?void 0:e.secret)||function(){const e=Math.floor(1e6*Math.random());return String(e).padStart(6,"0")}())}Dv.connectable=!0,Dv.getPageSpyConfig=()=>this.config.get(),Dv.isOffline=t,Dv.messageCapacity=e}async init(){const e=this.config.get();if(!1===e.offline){this.request=new RA(e);const t=sessionStorage.getItem(Tv);if(null===t)await this.createNewConnection();else{const{name:n,address:r,roomUrl:o,project:i}=JSON.parse(t);e.project!==i?await this.createNewConnection():(this.name=n,this.address=r,this.roomUrl=o,this.useOldConnection())}document.addEventListener("visibilitychange",(()=>{!document.hidden&&Dv.getSocket().getState()!==Pv.OPEN&&Dv.connectable&&this.useOldConnection()}))}rm.log("Plugins inited"),e.autoRender&&this.render()}async createNewConnection(){if(!this.request)return void rm.error("Cannot get the Request");const e=await this.request.createRoom();this.name=e.name,this.address=e.address,this.roomUrl=e.roomUrl,this.refreshRoomInfo(),Dv.init(e.roomUrl)}useOldConnection(){this.refreshRoomInfo(),Dv.init(this.roomUrl)}refreshRoomInfo(){this.saveSession(),this.cacheTimer=setInterval((()=>{Dv.getSocket().getState()===Pv.OPEN&&this.saveSession()}),15e3)}saveSession(){const{name:e,address:t,roomUrl:n,config:r}=this,{useSecret:o,secret:i,project:s}=r.get(),a=JSON.stringify({name:e,address:t,roomUrl:n,project:s,useSecret:o,secret:i});sessionStorage.setItem(Tv,a)}startRender(){const{project:e,clientOrigin:t,title:n,logo:r,logoStyle:o,useSecret:i,secret:s}=this.config.get(),a=document.createElement("div");a.id=DA,this.root=a;const c=document.createElement("div");c.className="page-spy-logo";const u=document.createElement("img");u.alt="PageSpy Logo",u.src=r,u.width=50,u.height=50,Object.entries(o).forEach((e=>{let[t,n]=e;u.style[t]=n})),c.insertAdjacentElement("beforeend",u),a.insertAdjacentElement("beforeend",c),window.addEventListener("sdk-inactive",(()=>{c.classList.add("inactive")}));const l=new Lv,d=new Bv({content:"\n      ".concat(i?'<p><b>Secret:</b> <span class="page-spy-secret">'.concat(s,"</span></p>"):"",'\n      <p>\n        <b>Device ID:</b>\n        <span style="font-family: \'Monaco\'" class="page-spy-device-id">\n          ').concat(this.address.slice(0,4)||"--",'\n        </span>\n      </p>\n      <p><b>Project:</b> <span class="page-spy-project">').concat(e,'</span></p>\n      <p><b>Title:</b> <span class="page-spy-title">').concat(n,"</span></p>\n      "),onOk:()=>{let e="".concat(t,"/#/devtools?address=").concat(encodeURIComponent(this.address));i&&(e+="&secret=".concat(s));const n=Au(e);let r="";const o=navigator.languages;r=["zh-CN","zh-HK","zh-TW","zh"].some((e=>o.includes(e)))?n?"拷贝成功!":"拷贝失败!":n?"Copy successfully!":"Copy failed!",jA.message(r),l.close()}});function f(e){const{isMoveEvent:t,isHidden:n}=c;t||n||(e.stopPropagation(),l.show())}l.appendNode(d.el),a.insertAdjacentElement("beforeend",l.el),c.addEventListener("click",f,!1),c.addEventListener("touchend",f,!1),document.documentElement.insertAdjacentElement("beforeend",a),function(e){let t,n;const r={xAxis:0,yAxis:0},o={x:0,y:0};function i(){if(!r.xAxis&&!r.yAxis)return;const{left:n,top:o}=e.getBoundingClientRect();n>=0&&n<=r.xAxis&&(e.isHidden=!1),t&&clearTimeout(t),t=setTimeout((()=>{t=null,e.disableHidden||(n<=0?e.classList.add("hidden-in-left"):n>=r.xAxis&&e.classList.add("hidden-in-right"),o<=0?e.classList.add("hidden-in-top"):o>=r.yAxis&&e.classList.add("hidden-in-bottom"),e.isHidden=!0)}),1e3)}function s(t){t.preventDefault(),e.isMoveEvent=!0;const{clientX:i,clientY:s}=OA(t),a=i-o.x,c=s-o.y;let u=n.x+a;u<=0?(u=0,e.style.setProperty("--left-radius",IA)):u>=r.xAxis?(u=r.xAxis,e.style.setProperty("--right-radius",IA)):(e.style.setProperty("--left-radius",CA),e.style.setProperty("--right-radius",CA));let l=n.y+c;l<=0?(l=0,e.style.setProperty("--top-radius",IA)):l>r.yAxis?(l=r.yAxis,e.style.setProperty("--bottom-radius",IA)):(e.style.setProperty("--top-radius",CA),e.style.setProperty("--bottom-radius",CA)),e.style.left="".concat(u,"px"),e.style.top="".concat(l,"px")}function a(){o.x=0,o.y=0,i(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",a)}function c(i){i.preventDefault(),t&&clearTimeout(t),e.isHidden&&e.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left"),e.isMoveEvent=!1,n=e.getBoundingClientRect(),r.xAxis=window.innerWidth-n.width,r.yAxis=window.innerHeight-n.height;const{clientX:c,clientY:u}=OA(i);o.x=c,o.y=u,document.addEventListener("mousemove",s,!1),document.addEventListener("mouseup",a,!1),document.addEventListener("touchmove",s,{capture:!1,passive:!1}),document.addEventListener("touchend",a,!1)}e.addEventListener("mousedown",c,!1),e.addEventListener("touchstart",c,{capture:!1,passive:!1}),e.addEventListener("mouseover",(()=>{e.disableHidden=!0,e.isHidden&&e.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left")}),!1),e.addEventListener("mouseleave",(()=>{e.disableHidden=!1,i()}),!1)}(c),this.triggerPlugins("onMounted",{root:a,content:d.el,socketStore:Dv}),this.handleDeviceDPR(),rm.log("Render success")}handleDeviceDPR(){const e=window.devicePixelRatio||1,t=document.querySelector('[name="viewport"]');if(t){const n=(t.getAttribute("content")||"").match(/initial-scale=\d+(\.\d+)?/);(n?parseFloat(n[0].split("=")[1]):1)<1&&(this.root.style.fontSize="".concat(14*e,"px"))}}triggerPlugins(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const{disabledPlugins:o}=this.config.get();MA.pluginsWithOrder.forEach((t=>{var r;Fg(o)&&o.length&&o.includes(t.name)||null===(r=t[e])||void 0===r||r.apply(t,n)}))}abort(){this.triggerPlugins("onReset"),Dv.close(),MA.instance=null;const e=document.querySelector("#".concat(DA));e&&document.documentElement.removeChild(e)}render(){if(document.querySelector("#".concat(DA)))rm.warn("Cannot render the widget because it has been in the DOM");else if(void 0!==document)"loading"===document.readyState?window.addEventListener("DOMContentLoaded",this.render.bind(this)):this.startRender();else{let e;const t=()=>{document&&"complete"===document.readyState?(e&&clearTimeout(e),this.startRender()):e=setTimeout(t,1)};e=setTimeout(t,1)}}updateRoomInfo(e){if(!e)return;const{project:t,title:n}=e;if(t){this.config.set("project",String(t));const e=document.querySelector(".page-spy-project");e&&(e.textContent=String(t))}if(n){this.config.set("title",String(n));const e=document.querySelector(".page-spy-title");e&&(e.textContent=String(n))}Dv.updateRoomInfo()}static get pluginsWithOrder(){return[...MA.plugins.pre,...MA.plugins.normal,...MA.plugins.post]}static registerPlugin(e){if(!e)return;if("function"==typeof(t=e)&&void 0!==t.prototype)return void rm.error("PageSpy.registerPlugin() expect to pass an instance, not a class");var t;if(!e.name)return void rm.error("The ".concat(e.constructor.name,' plugin should provide a "name" property'));if(MA.pluginsWithOrder.some((t=>t.name===e.name)))return void rm.error("The ".concat(e.name,' has registered. Consider the following reasons:\n      - Duplicate register one same plugin;\n      - Plugin\'s "name" conflict with others, you can print all registered plugins by "PageSpy.plugins";'));MA.plugins[e.enforce||"normal"].push(e)}}t(MA,"instance",null),t(MA,"plugins",{pre:[],normal:[],post:[]});return[new Mv,new Uv,new gA,new xA,new TA,new EA,new SA].forEach((e=>{MA.registerPlugin(e)})),MA}();
//# sourceMappingURL=index.min.js.map

        return PageSpy;
  }
}