UNPKG

@lastos/page-spy-plugin-data-harbor

Version:
3 lines 188 kB
var DataHarborPlugin=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 a=function(e){return e&&e.Math==Math&&e},i=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof n&&n)||function(){return this}()||n||Function("return this")(),o={},s=function(e){try{return!!e()}catch(e){return!0}},c=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!s((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,m=Object.getOwnPropertyDescriptor,g=m&&!p.call({1:2},1);h.f=g?function(e){var t=m(this,e);return!!t&&t.enumerable}:p;var v,y,b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},w=u,_=Function.prototype,x=_.call,k=w&&_.bind.bind(x,x),T=w?k:function(e){return function(){return x.apply(e,arguments)}},E=T,S=E({}.toString),I=E("".slice),A=function(e){return I(S(e),8,-1)},O=s,P=A,C=Object,R=T("".split),L=O((function(){return!C("z").propertyIsEnumerable(0)}))?function(e){return"String"==P(e)?R(e,""):C(e)}:C,j=function(e){return null==e},N=j,D=TypeError,Z=function(e){if(N(e))throw D("Can't call method on "+e);return e},M=L,U=Z,z=function(e){return M(U(e))},F="object"==typeof document&&document.all,H={all:F,IS_HTMLDDA:void 0===F&&void 0!==F},q=H.all,B=H.IS_HTMLDDA?function(e){return"function"==typeof e||e===q}:function(e){return"function"==typeof e},V=B,W=H.all,$=H.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:V(e)||e===W}:function(e){return"object"==typeof e?null!==e:V(e)},G=i,K=B,Y=function(e,t){return arguments.length<2?(n=G[e],K(n)?n:void 0):G[e]&&G[e][t];var n},J=T({}.isPrototypeOf),X="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Q=i,ee=X,te=Q.process,ne=Q.Deno,re=te&&te.versions||ne&&ne.version,ae=re&&re.v8;ae&&(y=(v=ae.split("."))[0]>0&&v[0]<4?1:+(v[0]+v[1])),!y&&ee&&(!(v=ee.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=ee.match(/Chrome\/(\d+)/))&&(y=+v[1]);var ie=y,oe=ie,se=s,ce=i.String,ue=!!Object.getOwnPropertySymbols&&!se((function(){var e=Symbol();return!ce(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&oe&&oe<41})),le=ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,de=Y,fe=B,he=J,pe=Object,me=le?function(e){return"symbol"==typeof e}:function(e){var t=de("Symbol");return fe(t)&&he(t.prototype,pe(e))},ge=String,ve=function(e){try{return ge(e)}catch(e){return"Object"}},ye=B,be=ve,we=TypeError,_e=function(e){if(ye(e))return e;throw we(be(e)+" is not a function")},xe=_e,ke=j,Te=function(e,t){var n=e[t];return ke(n)?void 0:xe(n)},Ee=f,Se=B,Ie=$,Ae=TypeError,Oe={exports:{}},Pe=i,Ce=Object.defineProperty,Re=function(e,t){try{Ce(Pe,e,{value:t,configurable:!0,writable:!0})}catch(n){Pe[e]=t}return t},Le=Re,je="__core-js_shared__",Ne=i[je]||Le(je,{}),De=Ne;(Oe.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 Ze=Oe.exports,Me=Z,Ue=Object,ze=function(e){return Ue(Me(e))},Fe=ze,He=T({}.hasOwnProperty),qe=Object.hasOwn||function(e,t){return He(Fe(e),t)},Be=T,Ve=0,We=Math.random(),$e=Be(1..toString),Ge=function(e){return"Symbol("+(void 0===e?"":e)+")_"+$e(++Ve+We,36)},Ke=Ze,Ye=qe,Je=Ge,Xe=ue,Qe=le,et=i.Symbol,tt=Ke("wks"),nt=Qe?et.for||et:et&&et.withoutSetter||Je,rt=function(e){return Ye(tt,e)||(tt[e]=Xe&&Ye(et,e)?et[e]:nt("Symbol."+e)),tt[e]},at=f,it=$,ot=me,st=Te,ct=function(e,t){var n,r;if("string"===t&&Se(n=e.toString)&&!Ie(r=Ee(n,e)))return r;if(Se(n=e.valueOf)&&!Ie(r=Ee(n,e)))return r;if("string"!==t&&Se(n=e.toString)&&!Ie(r=Ee(n,e)))return r;throw Ae("Can't convert object to primitive value")},ut=TypeError,lt=rt("toPrimitive"),dt=function(e,t){if(!it(e)||ot(e))return e;var n,r=st(e,lt);if(r){if(void 0===t&&(t="default"),n=at(r,e,t),!it(n)||ot(n))return n;throw ut("Can't convert object to primitive value")}return void 0===t&&(t="number"),ct(e,t)},ft=dt,ht=me,pt=function(e){var t=ft(e,"string");return ht(t)?t:t+""},mt=$,gt=i.document,vt=mt(gt)&&mt(gt.createElement),yt=function(e){return vt?gt.createElement(e):{}},bt=yt,wt=!c&&!s((function(){return 7!=Object.defineProperty(bt("div"),"a",{get:function(){return 7}}).a})),_t=c,xt=f,kt=h,Tt=b,Et=z,St=pt,It=qe,At=wt,Ot=Object.getOwnPropertyDescriptor;o.f=_t?Ot:function(e,t){if(e=Et(e),t=St(t),At)try{return Ot(e,t)}catch(e){}if(It(e,t))return Tt(!xt(kt.f,e,t),e[t])};var Pt={},Ct=c&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Rt=$,Lt=String,jt=TypeError,Nt=function(e){if(Rt(e))return e;throw jt(Lt(e)+" is not an object")},Dt=c,Zt=wt,Mt=Ct,Ut=Nt,zt=pt,Ft=TypeError,Ht=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,Bt="enumerable",Vt="configurable",Wt="writable";Pt.f=Dt?Mt?function(e,t,n){if(Ut(e),t=zt(t),Ut(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Wt in n&&!n[Wt]){var r=qt(e,t);r&&r[Wt]&&(e[t]=n.value,n={configurable:Vt in n?n[Vt]:r[Vt],enumerable:Bt in n?n[Bt]:r[Bt],writable:!1})}return Ht(e,t,n)}:Ht:function(e,t,n){if(Ut(e),t=zt(t),Ut(n),Zt)try{return Ht(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Ft("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var $t=Pt,Gt=b,Kt=c?function(e,t,n){return $t.f(e,t,Gt(1,n))}:function(e,t,n){return e[t]=n,e},Yt={exports:{}},Jt=c,Xt=qe,Qt=Function.prototype,en=Jt&&Object.getOwnPropertyDescriptor,tn=Xt(Qt,"name"),nn={EXISTS:tn,PROPER:tn&&"something"===function(){}.name,CONFIGURABLE:tn&&(!Jt||Jt&&en(Qt,"name").configurable)},rn=B,an=Ne,on=T(Function.toString);rn(an.inspectSource)||(an.inspectSource=function(e){return on(e)});var sn,cn,un,ln=an.inspectSource,dn=B,fn=i.WeakMap,hn=dn(fn)&&/native code/.test(String(fn)),pn=Ge,mn=Ze("keys"),gn=function(e){return mn[e]||(mn[e]=pn(e))},vn={},yn=hn,bn=i,wn=$,_n=Kt,xn=qe,kn=Ne,Tn=gn,En=vn,Sn="Object already initialized",In=bn.TypeError,An=bn.WeakMap;if(yn||kn.state){var On=kn.state||(kn.state=new An);On.get=On.get,On.has=On.has,On.set=On.set,sn=function(e,t){if(On.has(e))throw In(Sn);return t.facade=e,On.set(e,t),t},cn=function(e){return On.get(e)||{}},un=function(e){return On.has(e)}}else{var Pn=Tn("state");En[Pn]=!0,sn=function(e,t){if(xn(e,Pn))throw In(Sn);return t.facade=e,_n(e,Pn,t),t},cn=function(e){return xn(e,Pn)?e[Pn]:{}},un=function(e){return xn(e,Pn)}}var Cn={set:sn,get:cn,has:un,enforce:function(e){return un(e)?cn(e):sn(e,{})},getterFor:function(e){return function(t){var n;if(!wn(t)||(n=cn(t)).type!==e)throw In("Incompatible receiver, "+e+" required");return n}}},Rn=T,Ln=s,jn=B,Nn=qe,Dn=c,Zn=nn.CONFIGURABLE,Mn=ln,Un=Cn.enforce,zn=Cn.get,Fn=String,Hn=Object.defineProperty,qn=Rn("".slice),Bn=Rn("".replace),Vn=Rn([].join),Wn=Dn&&!Ln((function(){return 8!==Hn((function(){}),"length",{value:8}).length})),$n=String(String).split("String"),Gn=Yt.exports=function(e,t,n){"Symbol("===qn(Fn(t),0,7)&&(t="["+Bn(Fn(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Nn(e,"name")||Zn&&e.name!==t)&&(Dn?Hn(e,"name",{value:t,configurable:!0}):e.name=t),Wn&&n&&Nn(n,"arity")&&e.length!==n.arity&&Hn(e,"length",{value:n.arity});try{n&&Nn(n,"constructor")&&n.constructor?Dn&&Hn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Un(e);return Nn(r,"source")||(r.source=Vn($n,"string"==typeof t?t:"")),e};Function.prototype.toString=Gn((function(){return jn(this)&&zn(this).source||Mn(this)}),"toString");var Kn=Yt.exports,Yn=B,Jn=Pt,Xn=Kn,Qn=Re,er=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(Yn(n)&&Xn(n,i,r),r.global)a?e[t]=n:Qn(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:Jn.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},tr={},nr=Math.ceil,rr=Math.floor,ar=Math.trunc||function(e){var t=+e;return(t>0?rr:nr)(t)},ir=ar,or=function(e){var t=+e;return t!=t||0===t?0:ir(t)},sr=or,cr=Math.max,ur=Math.min,lr=function(e,t){var n=sr(e);return n<0?cr(n+t,0):ur(n,t)},dr=or,fr=Math.min,hr=function(e){return e>0?fr(dr(e),9007199254740991):0},pr=hr,mr=function(e){return pr(e.length)},gr=z,vr=lr,yr=mr,br=function(e){return function(t,n,r){var a,i=gr(t),o=yr(i),s=vr(r,o);if(e&&n!=n){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},wr={includes:br(!0),indexOf:br(!1)},_r=qe,xr=z,kr=wr.indexOf,Tr=vn,Er=T([].push),Sr=function(e,t){var n,r=xr(e),a=0,i=[];for(n in r)!_r(Tr,n)&&_r(r,n)&&Er(i,n);for(;t.length>a;)_r(r,n=t[a++])&&(~kr(i,n)||Er(i,n));return i},Ir=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ar=Sr,Or=Ir.concat("length","prototype");tr.f=Object.getOwnPropertyNames||function(e){return Ar(e,Or)};var Pr={};Pr.f=Object.getOwnPropertySymbols;var Cr=Y,Rr=tr,Lr=Pr,jr=Nt,Nr=T([].concat),Dr=Cr("Reflect","ownKeys")||function(e){var t=Rr.f(jr(e)),n=Lr.f;return n?Nr(t,n(e)):t},Zr=qe,Mr=Dr,Ur=o,zr=Pt,Fr=function(e,t,n){for(var r=Mr(t),a=zr.f,i=Ur.f,o=0;o<r.length;o++){var s=r[o];Zr(e,s)||n&&Zr(n,s)||a(e,s,i(t,s))}},Hr=s,qr=B,Br=/#|\.prototype\./,Vr=function(e,t){var n=$r[Wr(e)];return n==Kr||n!=Gr&&(qr(t)?Hr(t):!!t)},Wr=Vr.normalize=function(e){return String(e).replace(Br,".").toLowerCase()},$r=Vr.data={},Gr=Vr.NATIVE="N",Kr=Vr.POLYFILL="P",Yr=Vr,Jr=i,Xr=o.f,Qr=Kt,ea=er,ta=Re,na=Fr,ra=Yr,aa=function(e,t){var n,r,a,i,o,s=e.target,c=e.global,u=e.stat;if(n=c?Jr:u?Jr[s]||ta(s,{}):(Jr[s]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(o=Xr(n,r))&&o.value:n[r],!ra(c?r:s+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;na(i,a)}(e.sham||a&&a.sham)&&Qr(i,"sham",!0),ea(n,r,i,e)}},ia=u,oa=Function.prototype,sa=oa.apply,ca=oa.call,ua="object"==typeof Reflect&&Reflect.apply||(ia?ca.bind(sa):function(){return ca.apply(sa,arguments)}),la=T,da=_e,fa=function(e,t,n){try{return la(da(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},ha=B,pa=String,ma=TypeError,ga=fa,va=Nt,ya=function(e){if("object"==typeof e||ha(e))return e;throw ma("Can't set "+pa(e)+" as a prototype")},ba=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=ga(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return va(n),ya(r),t?e(n,r):n.__proto__=r,n}}():void 0),wa=Pt.f,_a=B,xa=$,ka=ba,Ta=function(e,t,n){var r,a;return ka&&_a(r=t.constructor)&&r!==n&&xa(a=r.prototype)&&a!==n.prototype&&ka(e,a),e},Ea={};Ea[rt("toStringTag")]="z";var Sa="[object z]"===String(Ea),Ia=B,Aa=A,Oa=rt("toStringTag"),Pa=Object,Ca="Arguments"==Aa(function(){return arguments}()),Ra=Sa?Aa: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=Pa(e),Oa))?n:Ca?Aa(t):"Object"==(r=Aa(t))&&Ia(t.callee)?"Arguments":r},La=Ra,ja=String,Na=function(e){if("Symbol"===La(e))throw TypeError("Cannot convert a Symbol value to a string");return ja(e)},Da=Na,Za=function(e,t){return void 0===e?arguments.length<2?"":t:Da(e)},Ma=$,Ua=Kt,za=Error,Fa=T("".replace),Ha=String(za("zxcasd").stack),qa=/\n\s*at [^:]*:[^\n]*/,Ba=qa.test(Ha),Va=function(e,t){if(Ba&&"string"==typeof e&&!za.prepareStackTrace)for(;t--;)e=Fa(e,qa,"");return e},Wa=b,$a=!s((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Wa(1,7)),7!==e.stack)})),Ga=Kt,Ka=Va,Ya=$a,Ja=Error.captureStackTrace,Xa=Y,Qa=qe,ei=Kt,ti=J,ni=ba,ri=Fr,ai=function(e,t,n){n in e||wa(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},ii=Ta,oi=Za,si=function(e,t){Ma(t)&&"cause"in t&&Ua(e,"cause",t.cause)},ci=function(e,t,n,r){Ya&&(Ja?Ja(e,t):Ga(e,"stack",Ka(n,r)))},ui=c,li=aa,di=ua,fi=function(e,t,n,r){var a="stackTraceLimit",i=r?2:1,o=e.split("."),s=o[o.length-1],c=Xa.apply(null,o);if(c){var u=c.prototype;if(Qa(u,"cause")&&delete u.cause,!n)return c;var l=Xa("Error"),d=t((function(e,t){var n=oi(r?t:e,void 0),a=r?new c(e):new c;return void 0!==n&&ei(a,"message",n),ci(a,d,a.stack,2),this&&ti(u,this)&&ii(a,this,d),arguments.length>i&&si(a,arguments[i]),a}));d.prototype=u,"Error"!==s?ni?ni(d,l):ri(d,l,{name:!0}):ui&&a in c&&(ai(d,c,a),ai(d,c,"prepareStackTrace")),ri(d,c);try{u.name!==s&&ei(u,"name",s),u.constructor=d}catch(e){}return d}},hi="WebAssembly",pi=i[hi],mi=7!==Error("e",{cause:7}).cause,gi=function(e,t){var n={};n[e]=fi(e,t,mi),li({global:!0,constructor:!0,arity:1,forced:mi},n)},vi=function(e,t){if(pi&&pi[e]){var n={};n[e]=fi(hi+"."+e,t,mi),li({target:hi,stat:!0,constructor:!0,arity:1,forced:mi},n)}};gi("Error",(function(e){return function(t){return di(e,this,arguments)}})),gi("EvalError",(function(e){return function(t){return di(e,this,arguments)}})),gi("RangeError",(function(e){return function(t){return di(e,this,arguments)}})),gi("ReferenceError",(function(e){return function(t){return di(e,this,arguments)}})),gi("SyntaxError",(function(e){return function(t){return di(e,this,arguments)}})),gi("TypeError",(function(e){return function(t){return di(e,this,arguments)}})),gi("URIError",(function(e){return function(t){return di(e,this,arguments)}})),vi("CompileError",(function(e){return function(t){return di(e,this,arguments)}})),vi("LinkError",(function(e){return function(t){return di(e,this,arguments)}})),vi("RuntimeError",(function(e){return function(t){return di(e,this,arguments)}}));var yi=A,bi=Array.isArray||function(e){return"Array"==yi(e)},wi=c,_i=bi,xi=TypeError,ki=Object.getOwnPropertyDescriptor,Ti=wi&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(_i(e)&&!ki(e,"length").writable)throw xi("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ei=TypeError,Si=function(e){if(e>9007199254740991)throw Ei("Maximum allowed index exceeded");return e},Ii=ze,Ai=mr,Oi=Ti,Pi=Si;aa({target:"Array",proto:!0,arity:1,forced:s((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=Ii(this),n=Ai(t),r=arguments.length;Pi(n+r);for(var a=0;a<r;a++)t[n]=arguments[a],n++;return Oi(t,n),n}});var Ci=yt("span").classList,Ri=Ci&&Ci.constructor&&Ci.constructor.prototype,Li=Ri===Object.prototype?void 0:Ri,ji={},Ni=Sr,Di=Ir,Zi=Object.keys||function(e){return Ni(e,Di)},Mi=c,Ui=Ct,zi=Pt,Fi=Nt,Hi=z,qi=Zi;ji.f=Mi&&!Ui?Object.defineProperties:function(e,t){Fi(e);for(var n,r=Hi(t),a=qi(t),i=a.length,o=0;i>o;)zi.f(e,n=a[o++],r[n]);return e};var Bi,Vi=Y("document","documentElement"),Wi=Nt,$i=ji,Gi=Ir,Ki=vn,Yi=Vi,Ji=yt,Xi="prototype",Qi="script",eo=gn("IE_PROTO"),to=function(){},no=function(e){return"<"+Qi+">"+e+"</"+Qi+">"},ro=function(e){e.write(no("")),e.close();var t=e.parentWindow.Object;return e=null,t},ao=function(){try{Bi=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;ao="undefined"!=typeof document?document.domain&&Bi?ro(Bi):(t=Ji("iframe"),n="java"+Qi+":",t.style.display="none",Yi.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(no("document.F=Object")),e.close(),e.F):ro(Bi);for(var r=Gi.length;r--;)delete ao[Xi][Gi[r]];return ao()};Ki[eo]=!0;var io=Object.create||function(e,t){var n;return null!==e?(to[Xi]=Wi(e),n=new to,to[Xi]=null,n[eo]=e):n=ao(),void 0===t?n:$i.f(n,t)},oo=rt,so=io,co=Pt.f,uo=oo("unscopables"),lo=Array.prototype;null==lo[uo]&&co(lo,uo,{configurable:!0,value:so(null)});var fo,ho,po,mo=function(e){lo[uo][e]=!0},go={},vo=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),yo=qe,bo=B,wo=ze,_o=vo,xo=gn("IE_PROTO"),ko=Object,To=ko.prototype,Eo=_o?ko.getPrototypeOf:function(e){var t=wo(e);if(yo(t,xo))return t[xo];var n=t.constructor;return bo(n)&&t instanceof n?n.prototype:t instanceof ko?To:null},So=s,Io=B,Ao=$,Oo=Eo,Po=er,Co=rt("iterator"),Ro=!1;[].keys&&("next"in(po=[].keys())?(ho=Oo(Oo(po)))!==Object.prototype&&(fo=ho):Ro=!0);var Lo=!Ao(fo)||So((function(){var e={};return fo[Co].call(e)!==e}));Lo&&(fo={}),Io(fo[Co])||Po(fo,Co,(function(){return this}));var jo={IteratorPrototype:fo,BUGGY_SAFARI_ITERATORS:Ro},No=Pt.f,Do=qe,Zo=rt("toStringTag"),Mo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!Do(e,Zo)&&No(e,Zo,{configurable:!0,value:t})},Uo=jo.IteratorPrototype,zo=io,Fo=b,Ho=Mo,qo=go,Bo=function(){return this},Vo=function(e,t,n,r){var a=t+" Iterator";return e.prototype=zo(Uo,{next:Fo(+!r,n)}),Ho(e,a,!1),qo[a]=Bo,e},Wo=aa,$o=f,Go=B,Ko=Vo,Yo=Eo,Jo=ba,Xo=Mo,Qo=Kt,es=er,ts=go,ns=nn.PROPER,rs=nn.CONFIGURABLE,as=jo.IteratorPrototype,is=jo.BUGGY_SAFARI_ITERATORS,os=rt("iterator"),ss="keys",cs="values",us="entries",ls=function(){return this},ds=function(e,t,n,r,a,i,o){Ko(n,t,r);var s,c,u,l=function(e){if(e===a&&m)return m;if(!is&&e in h)return h[e];switch(e){case ss:case cs:case us:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[os]||h["@@iterator"]||a&&h[a],m=!is&&p||l(a),g="Array"==t&&h.entries||p;if(g&&(s=Yo(g.call(new e)))!==Object.prototype&&s.next&&(Yo(s)!==as&&(Jo?Jo(s,as):Go(s[os])||es(s,os,ls)),Xo(s,d,!0)),ns&&a==cs&&p&&p.name!==cs&&(rs?Qo(h,"name",cs):(f=!0,m=function(){return $o(p,this)})),a)if(c={values:l(cs),keys:i?m:l(ss),entries:l(us)},o)for(u in c)(is||f||!(u in h))&&es(h,u,c[u]);else Wo({target:t,proto:!0,forced:is||f},c);return h[os]!==m&&es(h,os,m,{name:a}),ts[t]=m,c},fs=function(e,t){return{value:e,done:t}},hs=z,ps=mo,ms=go,gs=Cn,vs=Pt.f,ys=ds,bs=fs,ws=c,_s="Array Iterator",xs=gs.set,ks=gs.getterFor(_s),Ts=ys(Array,"Array",(function(e,t){xs(this,{type:_s,target:hs(e),index:0,kind:t})}),(function(){var e=ks(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,bs(void 0,!0)):bs("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Es=ms.Arguments=ms.Array;if(ps("keys"),ps("values"),ps("entries"),ws&&"values"!==Es.name)try{vs(Es,"name",{value:"values"})}catch(e){}var Ss=i,Is={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=Li,Os=Ts,Ps=Kt,Cs=rt,Rs=Cs("iterator"),Ls=Cs("toStringTag"),js=Os.values,Ns=function(e,t){if(e){if(e[Rs]!==js)try{Ps(e,Rs,js)}catch(t){e[Rs]=js}if(e[Ls]||Ps(e,Ls,t),Is[t])for(var n in Os)if(e[n]!==Os[n])try{Ps(e,n,Os[n])}catch(t){e[n]=Os[n]}}};for(var Ds in Is)Ns(Ss[Ds]&&Ss[Ds].prototype,Ds);Ns(As,"DOMTokenList");var Zs=s,Ms=c,Us=rt("iterator"),zs=!Zs((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&&!Ms||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Us]||"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})),Fs=Kn,Hs=Pt,qs=function(e,t,n){return n.get&&Fs(n.get,t,{getter:!0}),n.set&&Fs(n.set,t,{setter:!0}),Hs.f(e,t,n)},Bs=er,Vs=function(e,t,n){for(var r in t)Bs(e,r,t[r],n);return e},Ws=J,$s=TypeError,Gs=function(e,t){if(Ws(t,e))return e;throw $s("Incorrect invocation")},Ks=A,Ys=T,Js=function(e){if("Function"===Ks(e))return Ys(e)},Xs=_e,Qs=u,ec=Js(Js.bind),tc=function(e,t){return Xs(e),void 0===t?e:Qs?ec(e,t):function(){return e.apply(t,arguments)}},nc=Ra,rc=Te,ac=j,ic=go,oc=rt("iterator"),sc=function(e){if(!ac(e))return rc(e,oc)||rc(e,"@@iterator")||ic[nc(e)]},cc=f,uc=_e,lc=Nt,dc=ve,fc=sc,hc=TypeError,pc=function(e,t){var n=arguments.length<2?fc(e):t;if(uc(n))return lc(cc(n,e));throw hc(dc(e)+" is not iterable")},mc=TypeError,gc=function(e,t){if(e<t)throw mc("Not enough arguments");return e},vc=pt,yc=Pt,bc=b,wc=function(e,t,n){var r=vc(t);r in e?yc.f(e,r,bc(0,n)):e[r]=n},_c=lr,xc=mr,kc=wc,Tc=Array,Ec=Math.max,Sc=function(e,t,n){for(var r=xc(e),a=_c(t,r),i=_c(void 0===n?r:n,r),o=Tc(Ec(i-a,0)),s=0;a<i;a++,s++)kc(o,s,e[a]);return o.length=s,o},Ic=Sc,Ac=Math.floor,Oc=function(e,t){var n=e.length,r=Ac(n/2);return n<8?Pc(e,t):Cc(e,Oc(Ic(e,0,r),t),Oc(Ic(e,r),t),t)},Pc=function(e,t){for(var n,r,a=e.length,i=1;i<a;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},Cc=function(e,t,n,r){for(var a=t.length,i=n.length,o=0,s=0;o<a||s<i;)e[o+s]=o<a&&s<i?r(t[o],n[s])<=0?t[o++]:n[s++]:o<a?t[o++]:n[s++];return e},Rc=Oc,Lc=aa,jc=i,Nc=f,Dc=T,Zc=c,Mc=zs,Uc=er,zc=qs,Fc=Vs,Hc=Mo,qc=Vo,Bc=Cn,Vc=Gs,Wc=B,$c=qe,Gc=tc,Kc=Ra,Yc=Nt,Jc=$,Xc=Na,Qc=io,eu=b,tu=pc,nu=sc,ru=gc,au=Rc,iu=rt("iterator"),ou="URLSearchParams",su=ou+"Iterator",cu=Bc.set,uu=Bc.getterFor(ou),lu=Bc.getterFor(su),du=Object.getOwnPropertyDescriptor,fu=function(e){if(!Zc)return jc[e];var t=du(jc,e);return t&&t.value},hu=fu("fetch"),pu=fu("Request"),mu=fu("Headers"),gu=pu&&pu.prototype,vu=mu&&mu.prototype,yu=jc.RegExp,bu=jc.TypeError,wu=jc.decodeURIComponent,_u=jc.encodeURIComponent,xu=Dc("".charAt),ku=Dc([].join),Tu=Dc([].push),Eu=Dc("".replace),Su=Dc([].shift),Iu=Dc([].splice),Au=Dc("".split),Ou=Dc("".slice),Pu=/\+/g,Cu=Array(4),Ru=function(e){return Cu[e-1]||(Cu[e-1]=yu("((?:%[\\da-f]{2}){"+e+"})","gi"))},Lu=function(e){try{return wu(e)}catch(t){return e}},ju=function(e){var t=Eu(e,Pu," "),n=4;try{return wu(t)}catch(e){for(;n;)t=Eu(t,Ru(n--),Lu);return t}},Nu=/[!'()~]|%20/g,Du={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Zu=function(e){return Du[e]},Mu=function(e){return Eu(_u(e),Nu,Zu)},Uu=qc((function(e,t){cu(this,{type:su,iterator:tu(uu(e).entries),kind:t})}),"Iterator",(function(){var e=lu(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),zu=function(e){this.entries=[],this.url=null,void 0!==e&&(Jc(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===xu(e,0)?Ou(e,1):e:Xc(e)))};zu.prototype={type:ou,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,o,s,c=nu(e);if(c)for(n=(t=tu(e,c)).next;!(r=Nc(n,t)).done;){if(i=(a=tu(Yc(r.value))).next,(o=Nc(i,a)).done||(s=Nc(i,a)).done||!Nc(i,a).done)throw bu("Expected sequence with length 2");Tu(this.entries,{key:Xc(o.value),value:Xc(s.value)})}else for(var u in e)$c(e,u)&&Tu(this.entries,{key:u,value:Xc(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=Au(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=Au(t,"="),Tu(this.entries,{key:ju(Su(n)),value:ju(ku(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Tu(n,Mu(e.key)+"="+Mu(e.value));return ku(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Fu=function(){Vc(this,Hu);var e=cu(this,new zu(arguments.length>0?arguments[0]:void 0));Zc||(this.length=e.entries.length)},Hu=Fu.prototype;if(Fc(Hu,{append:function(e,t){ru(arguments.length,2);var n=uu(this);Tu(n.entries,{key:Xc(e),value:Xc(t)}),Zc||this.length++,n.updateURL()},delete:function(e){ru(arguments.length,1);for(var t=uu(this),n=t.entries,r=Xc(e),a=0;a<n.length;)n[a].key===r?Iu(n,a,1):a++;Zc||(this.length=n.length),t.updateURL()},get:function(e){ru(arguments.length,1);for(var t=uu(this).entries,n=Xc(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){ru(arguments.length,1);for(var t=uu(this).entries,n=Xc(e),r=[],a=0;a<t.length;a++)t[a].key===n&&Tu(r,t[a].value);return r},has:function(e){ru(arguments.length,1);for(var t=uu(this).entries,n=Xc(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){ru(arguments.length,1);for(var n,r=uu(this),a=r.entries,i=!1,o=Xc(e),s=Xc(t),c=0;c<a.length;c++)(n=a[c]).key===o&&(i?Iu(a,c--,1):(i=!0,n.value=s));i||Tu(a,{key:o,value:s}),Zc||(this.length=a.length),r.updateURL()},sort:function(){var e=uu(this);au(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=uu(this).entries,r=Gc(e,arguments.length>1?arguments[1]:void 0),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new Uu(this,"keys")},values:function(){return new Uu(this,"values")},entries:function(){return new Uu(this,"entries")}},{enumerable:!0}),Uc(Hu,iu,Hu.entries,{name:"entries"}),Uc(Hu,"toString",(function(){return uu(this).serialize()}),{enumerable:!0}),Zc&&zc(Hu,"size",{get:function(){return uu(this).entries.length},configurable:!0,enumerable:!0}),Hc(Fu,ou),Lc({global:!0,constructor:!0,forced:!Mc},{URLSearchParams:Fu}),!Mc&&Wc(mu)){var qu=Dc(vu.has),Bu=Dc(vu.set),Vu=function(e){if(Jc(e)){var t,n=e.body;if(Kc(n)===ou)return t=e.headers?new mu(e.headers):new mu,qu(t,"content-type")||Bu(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Qc(e,{body:eu(0,Xc(n)),headers:eu(0,t)})}return e};if(Wc(hu)&&Lc({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return hu(e,arguments.length>1?Vu(arguments[1]):{})}}),Wc(pu)){var Wu=function(e){return Vc(this,gu),new pu(e,arguments.length>1?Vu(arguments[1]):{})};gu.constructor=Wu,Wu.prototype=gu,Lc({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Wu})}}var $u={URLSearchParams:Fu,getState:uu},Gu=c,Ku=T,Yu=qs,Ju=URLSearchParams.prototype,Xu=Ku(Ju.forEach);Gu&&!("size"in Ju)&&Yu(Ju,"size",{get:function(){var e=0;return Xu(this,(function(){e++})),e},configurable:!0,enumerable:!0});var Qu=_e,el=ze,tl=L,nl=mr,rl=TypeError,al=function(e){return function(t,n,r,a){Qu(n);var i=el(t),o=tl(i),s=nl(i),c=e?s-1:0,u=e?-1:1;if(r<2)for(;;){if(c in o){a=o[c],c+=u;break}if(c+=u,e?c<0:s<=c)throw rl("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=u)c in o&&(a=n(a,o[c],c,i));return a}},il={left:al(!1),right:al(!0)},ol=s,sl="undefined"!=typeof process&&"process"==A(process),cl=il.left;aa({target:"Array",proto:!0,forced:!sl&&ie>79&&ie<83||!function(e,t){var n=[][e];return!!n&&ol((function(){n.call(null,t||function(){return 1},1)}))}("reduce")},{reduce:function(e){var t=arguments.length;return cl(this,e,t,t>1?arguments[1]:void 0)}});var ul,ll,dl=Nt,fl=s,hl=i.RegExp,pl=fl((function(){var e=hl("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ml=pl||fl((function(){return!hl("a","y").sticky})),gl={BROKEN_CARET:pl||fl((function(){var e=hl("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:ml,UNSUPPORTED_Y:pl},vl=s,yl=i.RegExp,bl=vl((function(){var e=yl(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),wl=s,_l=i.RegExp,xl=wl((function(){var e=_l("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),kl=f,Tl=T,El=Na,Sl=function(){var e=dl(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},Il=gl,Al=io,Ol=Cn.get,Pl=bl,Cl=xl,Rl=Ze("native-string-replace",String.prototype.replace),Ll=RegExp.prototype.exec,jl=Ll,Nl=Tl("".charAt),Dl=Tl("".indexOf),Zl=Tl("".replace),Ml=Tl("".slice),Ul=(ll=/b*/g,kl(Ll,ul=/a/,"a"),kl(Ll,ll,"a"),0!==ul.lastIndex||0!==ll.lastIndex),zl=Il.BROKEN_CARET,Fl=void 0!==/()??/.exec("")[1];(Ul||Fl||zl||Pl||Cl)&&(jl=function(e){var t,n,r,a,i,o,s,c=this,u=Ol(c),l=El(e),d=u.raw;if(d)return d.lastIndex=c.lastIndex,t=kl(jl,d,l),c.lastIndex=d.lastIndex,t;var f=u.groups,h=zl&&c.sticky,p=kl(Sl,c),m=c.source,g=0,v=l;if(h&&(p=Zl(p,"y",""),-1===Dl(p,"g")&&(p+="g"),v=Ml(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Nl(l,c.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",p)),Fl&&(n=new RegExp("^"+m+"$(?!\\s)",p)),Ul&&(r=c.lastIndex),a=kl(Ll,h?n:c,v),h?a?(a.input=Ml(a.input,g),a[0]=Ml(a[0],g),a.index=c.lastIndex,c.lastIndex+=a[0].length):c.lastIndex=0:Ul&&a&&(c.lastIndex=c.global?a.index+a[0].length:r),Fl&&a&&a.length>1&&kl(Rl,a[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&f)for(a.groups=o=Al(null),i=0;i<f.length;i++)o[(s=f[i])[0]]=a[s[1]];return a});var Hl=jl;aa({target:"RegExp",proto:!0,forced:/./.exec!==Hl},{exec:Hl});var ql=Js,Bl=er,Vl=Hl,Wl=s,$l=rt,Gl=Kt,Kl=$l("species"),Yl=RegExp.prototype,Jl=T,Xl=or,Ql=Na,ed=Z,td=Jl("".charAt),nd=Jl("".charCodeAt),rd=Jl("".slice),ad=function(e){return function(t,n){var r,a,i=Ql(ed(t)),o=Xl(n),s=i.length;return o<0||o>=s?e?"":void 0:(r=nd(i,o))<55296||r>56319||o+1===s||(a=nd(i,o+1))<56320||a>57343?e?td(i,o):r:e?rd(i,o,o+2):a-56320+(r-55296<<10)+65536}},id={codeAt:ad(!1),charAt:ad(!0)},od=id.charAt,sd=T,cd=ze,ud=Math.floor,ld=sd("".charAt),dd=sd("".replace),fd=sd("".slice),hd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,pd=/\$([$&'`]|\d{1,2})/g,md=f,gd=Nt,vd=B,yd=A,bd=Hl,wd=TypeError,_d=ua,xd=f,kd=T,Td=function(e,t,n,r){var a=$l(e),i=!Wl((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),o=i&&!Wl((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Kl]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!o||n){var s=ql(/./[a]),c=t(a,""[e],(function(e,t,n,r,a){var o=ql(e),c=t.exec;return c===Vl||c===Yl.exec?i&&!a?{done:!0,value:s(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}));Bl(String.prototype,e,c[0]),Bl(Yl,a,c[1])}r&&Gl(Yl[a],"sham",!0)},Ed=s,Sd=Nt,Id=B,Ad=j,Od=or,Pd=hr,Cd=Na,Rd=Z,Ld=function(e,t,n){return t+(n?od(e,t).length:1)},jd=Te,Nd=function(e,t,n,r,a,i){var o=n+e.length,s=r.length,c=pd;return void 0!==a&&(a=cd(a),c=hd),dd(i,c,(function(i,c){var u;switch(ld(c,0)){case"$":return"$";case"&":return e;case"`":return fd(t,0,n);case"'":return fd(t,o);case"<":u=a[fd(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>s){var d=ud(l/10);return 0===d?i:d<=s?void 0===r[d-1]?ld(c,1):r[d-1]+ld(c,1):i}u=r[l-1]}return void 0===u?"":u}))},Dd=function(e,t){var n=e.exec;if(vd(n)){var r=md(n,e,t);return null!==r&&gd(r),r}if("RegExp"===yd(e))return md(bd,e,t);throw wd("RegExp#exec called on incompatible receiver")},Zd=rt("replace"),Md=Math.max,Ud=Math.min,zd=kd([].concat),Fd=kd([].push),Hd=kd("".indexOf),qd=kd("".slice),Bd="$0"==="a".replace(/./,"$0"),Vd=!!/./[Zd]&&""===/./[Zd]("a","$0");Td("replace",(function(e,t,n){var r=Vd?"$":"$0";return[function(e,n){var r=Rd(this),a=Ad(e)?void 0:jd(e,Zd);return a?xd(a,e,r,n):xd(t,Cd(r),e,n)},function(e,a){var i=Sd(this),o=Cd(e);if("string"==typeof a&&-1===Hd(a,r)&&-1===Hd(a,"$<")){var s=n(t,i,o,a);if(s.done)return s.value}var c=Id(a);c||(a=Cd(a));var u=i.global;if(u){var l=i.unicode;i.lastIndex=0}for(var d=[];;){var f=Dd(i,o);if(null===f)break;if(Fd(d,f),!u)break;""===Cd(f[0])&&(i.lastIndex=Ld(o,Pd(i.lastIndex),l))}for(var h,p="",m=0,g=0;g<d.length;g++){for(var v=Cd((f=d[g])[0]),y=Md(Ud(Od(f.index),o.length),0),b=[],w=1;w<f.length;w++)Fd(b,void 0===(h=f[w])?h:String(h));var _=f.groups;if(c){var x=zd([v],b,y,o);void 0!==_&&Fd(x,_);var k=Cd(_d(a,void 0,x))}else k=Nd(v,o,y,b,_,a);y>=m&&(p+=qd(o,m,y)+k,m=y+v.length)}return p+qd(o,m)}]}),!!Ed((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Bd||Vd);var Wd=A,$d=TypeError,Gd=fa(ArrayBuffer.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!=Wd(e))throw $d("ArrayBuffer expected");return e.byteLength},Kd=Gd,Yd=T(ArrayBuffer.prototype.slice),Jd=function(e){if(0!==Kd(e))return!1;try{return Yd(e,0,0),!1}catch(e){return!0}},Xd=c,Qd=qs,ef=Jd,tf=ArrayBuffer.prototype;Xd&&!("detached"in tf)&&Qd(tf,"detached",{configurable:!0,get:function(){return ef(this)}});var nf=or,rf=hr,af=RangeError,of=function(e){if(void 0===e)return 0;var t=nf(e),n=rf(t);if(t!==n)throw af("Wrong length or index");return n},sf="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,cf=!sf&&!sl&&"object"==typeof window&&"object"==typeof document,uf=s,lf=ie,df=cf,ff=sf,hf=sl,pf=i.structuredClone,mf=!!pf&&!uf((function(){if(ff&&lf>92||hf&&lf>94||df&&lf>97)return!1;var e=new ArrayBuffer(8),t=pf(e,{transfer:[e]});return 0!=e.byteLength||8!=t.byteLength})),gf=i,vf=T,yf=fa,bf=of,wf=Jd,_f=Gd,xf=mf,kf=gf.TypeError,Tf=gf.structuredClone,Ef=gf.ArrayBuffer,Sf=gf.DataView,If=Math.min,Af=Ef.prototype,Of=Sf.prototype,Pf=vf(Af.slice),Cf=yf(Af,"resizable","get"),Rf=yf(Af,"maxByteLength","get"),Lf=vf(Of.getInt8),jf=vf(Of.setInt8),Nf=xf&&function(e,t,n){var r=_f(e),a=void 0===t?r:If(bf(t),r),i=!Cf||!Cf(e);if(wf(e))throw kf("ArrayBuffer is detached");var o=Tf(e,{transfer:[e]});if(r==a&&(n||i))return o;if(!n||i)return Pf(o,0,a);for(var s=new Ef(a,Rf&&{maxByteLength:Rf(o)}),c=new Sf(o),u=new Sf(s),l=0;l<a;l++)jf(u,l,Lf(c,l));return s},Df=Nf;Df&&aa({target:"ArrayBuffer",proto:!0},{transfer:function(){return Df(this,arguments.length?arguments[0]:void 0,!0)}});var Zf=Nf;Zf&&aa({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return Zf(this,arguments.length?arguments[0]:void 0,!1)}});var Mf=id.charAt,Uf=Na,zf=Cn,Ff=ds,Hf=fs,qf="String Iterator",Bf=zf.set,Vf=zf.getterFor(qf);Ff(String,"String",(function(e){Bf(this,{type:qf,string:Uf(e),index:0})}),(function(){var e,t=Vf(this),n=t.string,r=t.index;return r>=n.length?Hf(void 0,!0):(e=Mf(n,r),t.index+=e.length,Hf(e,!1))}));var Wf=c,$f=T,Gf=f,Kf=s,Yf=Zi,Jf=Pr,Xf=h,Qf=ze,eh=L,th=Object.assign,nh=Object.defineProperty,rh=$f([].concat),ah=!th||Kf((function(){if(Wf&&1!==th({b:1},th(nh({},"a",{enumerable:!0,get:function(){nh(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!=th({},e)[n]||Yf(th({},t)).join("")!=r}))?function(e,t){for(var n=Qf(e),r=arguments.length,a=1,i=Jf.f,o=Xf.f;r>a;)for(var s,c=eh(arguments[a++]),u=i?rh(Yf(c),i(c)):Yf(c),l=u.length,d=0;l>d;)s=u[d++],Wf&&!Gf(o,c,s)||(n[s]=c[s]);return n}:th,ih=f,oh=Nt,sh=Te,ch=function(e,t,n){var r,a;oh(e);try{if(!(r=sh(e,"return"))){if("throw"===t)throw n;return n}r=ih(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return oh(r),n},uh=Nt,lh=ch,dh=go,fh=rt("iterator"),hh=Array.prototype,ph=function(e){return void 0!==e&&(dh.Array===e||hh[fh]===e)},mh=T,gh=s,vh=B,yh=Ra,bh=ln,wh=function(){},_h=[],xh=Y("Reflect","construct"),kh=/^\s*(?:class|function)\b/,Th=mh(kh.exec),Eh=!kh.exec(wh),Sh=function(e){if(!vh(e))return!1;try{return xh(wh,_h,e),!0}catch(e){return!1}},Ih=function(e){if(!vh(e))return!1;switch(yh(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Eh||!!Th(kh,bh(e))}catch(e){return!0}};Ih.sham=!0;var Ah,Oh=!xh||gh((function(){var e;return Sh(Sh.call)||!Sh(Object)||!Sh((function(){e=!0}))||e}))?Ih:Sh,Ph=tc,Ch=f,Rh=ze,Lh=function(e,t,n,r){try{return r?t(uh(n)[0],n[1]):t(n)}catch(t){lh(e,"throw",t)}},jh=ph,Nh=Oh,Dh=mr,Zh=wc,Mh=pc,Uh=sc,zh=Array,Fh=T,Hh=2147483647,qh=/[^\0-\u007E]/,Bh=/[.\u3002\uFF0E\uFF61]/g,Vh="Overflow: input needs wider integers to process",Wh=RangeError,$h=Fh(Bh.exec),Gh=Math.floor,Kh=String.fromCharCode,Yh=Fh("".charCodeAt),Jh=Fh([].join),Xh=Fh([].push),Qh=Fh("".replace),ep=Fh("".split),tp=Fh("".toLowerCase),np=function(e){return e+22+75*(e<26)},rp=function(e,t,n){var r=0;for(e=n?Gh(e/700):e>>1,e+=Gh(e/t);e>455;)e=Gh(e/35),r+=36;return Gh(r+36*e/(e+38))},ap=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=Yh(e,n++);if(a>=55296&&a<=56319&&n<r){var i=Yh(e,n++);56320==(64512&i)?Xh(t,((1023&a)<<10)+(1023&i)+65536):(Xh(t,a),n--)}else Xh(t,a)}return t}(e);var n,r,a=e.length,i=128,o=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&Xh(t,Kh(r));var c=t.length,u=c;for(c&&Xh(t,"-");u<a;){var l=Hh;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<l&&(l=r);var d=u+1;if(l-i>Gh((Hh-o)/d))throw Wh(Vh);for(o+=(l-i)*d,i=l,n=0;n<e.length;n++){if((r=e[n])<i&&++o>Hh)throw Wh(Vh);if(r==i){for(var f=o,h=36;;){var p=h<=s?1:h>=s+26?26:h-s;if(f<p)break;var m=f-p,g=36-p;Xh(t,Kh(np(p+m%g))),f=Gh(m/g),h+=36}Xh(t,Kh(np(f))),s=rp(o,d,u==c),o=0,u++}}o++,i++}return Jh(t,"")},ip=aa,op=c,sp=zs,cp=i,up=tc,lp=T,dp=er,fp=qs,hp=Gs,pp=qe,mp=ah,gp=function(e){var t=Rh(e),n=Nh(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=Ph(a,r>2?arguments[2]:void 0));var o,s,c,u,l,d,f=Uh(t),h=0;if(!f||this===zh&&jh(f))for(o=Dh(t),s=n?new this(o):zh(o);o>h;h++)d=i?a(t[h],h):t[h],Zh(s,h,d);else for(l=(u=Mh(t,f)).next,s=n?new this:[];!(c=Ch(l,u)).done;h++)d=i?Lh(u,a,[c.value,h],!0):c.value,Zh(s,h,d);return s.length=h,s},vp=Sc,yp=id.codeAt,bp=function(e){var t,n,r=[],a=ep(Qh(tp(e),Bh,"."),".");for(t=0;t<a.length;t++)n=a[t],Xh(r,$h(qh,n)?"xn--"+ap(n):n);return Jh(r,".")},wp=Na,_p=Mo,xp=gc,kp=$u,Tp=Cn,Ep=Tp.set,Sp=Tp.getterFor("URL"),Ip=kp.URLSearchParams,Ap=kp.getState,Op=cp.URL,Pp=cp.TypeError,Cp=cp.parseInt,Rp=Math.floor,Lp=Math.pow,jp=lp("".charAt),Np=lp(/./.exec),Dp=lp([].join),Zp=lp(1..toString),Mp=lp([].pop),Up=lp([].push),zp=lp("".replace),Fp=lp([].shift),Hp=lp("".split),qp=lp("".slice),Bp=lp("".toLowerCase),Vp=lp([].unshift),Wp="Invalid scheme",$p="Invalid host",Gp="Invalid port",Kp=/[a-z]/i,Yp=/[\d+-.a-z]/i,Jp=/\d/,Xp=/^0x/i,Qp=/^[0-7]+$/,em=/^\d+$/,tm=/^[\da-f]+$/i,nm=/[\0\t\n\r #%/:<>?@[\\\]^|]/,rm=/[\0\t\n\r #/:<>?@[\\\]^|]/,am=/^[\u0000-\u0020]+/,im=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,om=/[\t\n\r]/g,sm=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)Vp(t,e%256),e=Rp(e/256);return Dp(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=Zp(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},cm={},um=mp({},cm,{" ":1,'"':1,"<":1,">":1,"`":1}),lm=mp({},um,{"#":1,"?":1,"{":1,"}":1}),dm=mp({},lm,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),fm=function(e,t){var n=yp(e,0);return n>32&&n<127&&!pp(t,e)?e:encodeURIComponent(e)},hm={ftp:21,file:null,http:80,https:443,ws:80,wss:443},pm=function(e,t){var n;return 2==e.length&&Np(Kp,jp(e,0))&&(":"==(n=jp(e,1))||!t&&"|"==n)},mm=function(e){var t;return e.length>1&&pm(qp(e,0,2))&&(2==e.length||"/"===(t=jp(e,2))||"\\"===t||"?"===t||"#"===t)},gm=function(e){return"."===e||"%2e"===Bp(e)},vm={},ym={},bm={},wm={},_m={},xm={},km={},Tm={},Em={},Sm={},Im={},Am={},Om={},Pm={},Cm={},Rm={},Lm={},jm={},Nm={},Dm={},Zm={},Mm=function(e,t,n){var r,a,i,o=wp(e);if(t){if(a=this.parse(o))throw Pp(a);this.searchParams=null}else{if(void 0!==n&&(r=new Mm(n,!0)),a=this.parse(o,null,r))throw Pp(a);(i=Ap(new Ip)).bindURL(this),this.searchParams=i}};Mm.prototype={type:"URL",parse:function(e,t,n){var r,a,i,o,s,c=this,u=t||vm,l=0,d="",f=!1,h=!1,p=!1;for(e=wp(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=zp(e,am,""),e=zp(e,im,"$1")),e=zp(e,om,""),r=gp(e);l<=r.length;){switch(a=r[l],u){case vm:if(!a||!Np(Kp,a)){if(t)return Wp;u=bm;continue}d+=Bp(a),u=ym;break;case ym:if(a&&(Np(Yp,a)||"+"==a||"-"==a||"."==a))d+=Bp(a);else{if(":"!=a){if(t)return Wp;d="",u=bm,l=0;continue}if(t&&(c.isSpecial()!=pp(hm,d)||"file"==d&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=d,t)return void(c.isSpecial()&&hm[c.scheme]==c.port&&(c.port=null));d="","file"==c.scheme?u=Pm:c.isSpecial()&&n&&n.scheme==c.scheme?u=wm:c.isSpecial()?u=Tm:"/"==r[l+1]?(u=_m,l++):(c.cannotBeABaseURL=!0,Up(c.path,""),u=Nm)}break;case bm:if(!n||n.cannotBeABaseURL&&"#"!=a)return Wp;if(n.cannotBeABaseURL&&"#"==a){c.scheme=n.scheme,c.path=vp(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=Zm;break}u="file"==n.scheme?Pm:xm;continue;case wm:if("/"!=a||"/"!=r[l+1]){u=xm;continue}u=Em,l++;break;case _m:if("/"==a){u=Sm;break}u=jm;continue;case xm:if(c.scheme=n.scheme,a==Ah)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=vp(n.path),c.query=n.query;else if("/"==a||"\\"==a&&c.isSpecial())u=km;else if("?"==a)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=vp(n.path),c.query="",u=Dm;else{if("#"!=a){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=vp(n.path),c.path.length--,u=jm;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=vp(n.path),c.query=n.query,c.fragment="",u=Zm}break;case km:if(!c.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=jm;continue}u=Sm}else u=Em;break;case Tm:if(u=Em,"/"!=a||"/"!=jp(d,l+1))continue;l++;break;case Em:if("/"!=a&&"\\"!=a){u=Sm;continue}break;case Sm:if("@"==a){f&&(d="%40"+d),f=!0,i=gp(d);for(var m=0;m<i.length;m++){var g=i[m];if(":"!=g||p){var v=fm(g,dm);p?c.password+=v:c.username+=v}else p=!0}d=""}else if(a==Ah||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()){if(f&&""==d)return"Invalid authority";l-=gp(d).length+1,d="",u=Im}else d+=a;break;case Im:case Am:if(t&&"file"==c.scheme){u=Rm;continue}if(":"!=a||h){if(a==Ah||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()){if(c.isSpecial()&&""==d)return $p;if(t&&""==d&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(d))return o;if(d="",u=Lm,t)return;continue}"["==a?h=!0:"]"==a&&(h=!1),d+=a}else{if(""==d)return $p;if(o=c.parseHost(d))return o;if(d="",u=Om,t==Am)return}break;case Om:if(!Np(Jp,a)){if(a==Ah||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()||t){if(""!=d){var y=Cp(d,10);if(y>65535)return Gp;c.port=c.isSpecial()&&y===hm[c.scheme]?null:y,d=""}if(t)return;u=Lm;continue}return Gp}d+=a;break;case Pm:if(c.scheme="file","/"==a||"\\"==a)u=Cm;else{if(!n||"file"!=n.scheme){u=jm;continue}if(a==Ah)c.host=n.host,c.path=vp(n.path),c.query=n.query;else if("?"==a)c.host=n.host,c.path=vp(n.path),c.query="",u=Dm;else{if("#"!=a){mm(Dp(vp(r,l),""))||(c.host=n.host,c.path=vp(n.path),c.shortenPath()),u=jm;continue}c.host=n.host,c.path=vp(n.path),c.query=n.query,c.fragment="",u=Zm}}break;case Cm:if("/"==a||"\\"==a){u=Rm;break}n&&"file"==n.scheme&&!mm(Dp(vp(r,l),""))&&(pm(n.path[0],!0)?Up(c.path,n.path[0]):c.host=n.host),u=jm;continue;case Rm:if(a==Ah||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&pm(d))u=jm;else if(""==d){if(c.host="",t)return;u=Lm}else{if(o=c.parseHost(d))return o;if("localhost"==c.host&&(c.host=""),t)return;d="",u=Lm}continue}d+=a;break;case Lm:if(c.isSpecial()){if(u=jm,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=Ah&&(u=jm,"/"!=a))continue}else c.fragment="",u=Zm;else c.query="",u=Dm;break;case jm:if(a==Ah||"/"==a||"\\"==a&&c.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(s=Bp(s=d))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==a||"\\"==a&&c.isSpecial()||Up(c.path,"")):gm(d)?"/"==a||"\\"==a&&c.isSpecial()||Up(c.path,""):("file"==c.scheme&&!c.path.length&&pm(d)&&(c.host&&(c.host=""),d=jp(d,0)+":"),Up(c.path,d)),d="","file"==c.scheme&&(a==Ah||"?"==a||"#"==a))for(;c.path.length>1&&""===c.path[0];)Fp(c.path);"?"==a?(c.query="",u=Dm):"#"==a&&(c.fragment="",u=Zm)}else d+=fm(a,lm);break;case Nm:"?"==a?(c.query="",u=Dm):"#"==a?(c.fragment="",u=Zm):a!=Ah&&(c.path[0]+=fm(a,cm));break;case Dm:t||"#"!=a?a!=Ah&&("'"==a&&c.isSpecial()?c.query+="%27":c.query+="#"==a?"%23":fm(a,cm)):(c.fragment="",u=Zm);break;case Zm:a!=Ah&&(c.fragment+=fm(a,um))}l++}},parseHost:function(e){var t,n,r;if("["==jp(e,0)){if("]"!=jp(e,e.length-1))return $p;if(t=function(e){var t,n,r,a,i,o,s,c=[0,0,0,0,0,0,0,0],u=0,l=null,d=0,f=function(){return jp(e,d)};if(":"==f()){if(":"!=jp(e,1))return;d+=2,l=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=n=0;n<4&&Np(tm,f());)t=16*t+Cp(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,u>6)return;for(r=0;f();){if(a=null,r>0){if(!("."==f()&&r<4))return;d++}if(!Np(Jp,f()))return;for(;Np(Jp,f());){if(i=Cp(f(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;d++}c[u]=256*c[u]+a,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(o=u-l,u=7;0!=u&&o>0;)s=c[u],c[u--]=c[l+o-1],c[l+--o]=s;else if(8!=u)return;return c}(qp(e,1,-1)),!t)return $p;this.host=t}else if(this.isSpecial()){if(e=bp(e),Np(nm,e))return $p;if(t=function(e){var t,n,r,a,i,o,s,c=Hp(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=c[r]))return e;if(i=10,a.length>1&&"0"==jp(a,0)&&(i=Np(Xp,a)?16:8,a=qp(a,8==i?1:2)),""===a)o=0;else{if(!Np(10==i?em:8==i?Qp:tm,a))return e;o=Cp(a,i)}Up(n,o)}for(r=0;r<t;r++)if(o=n[r],r==t-1){if(o>=Lp(256,5-t))return null}else if(o>255)return null;for(s=Mp(n),r=0;r<n.length;r++)s+=n[r]*Lp(256,3-r);return s}(e),null===t)return $p;this.host=t}else{if(Np(rm,e))return $p;for(t="",n=gp(e),r=0;r<n.length;r++)t+=fm(n[r],cm);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return pp(hm,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&pm(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,o=e.path,s=e.query,c=e.fragment,u=t+":";return null!==a?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=sm(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?o[0]:o.length?"/"+Dp(o,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw Pp(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Um(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+sm(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(wp(e)+":",vm)},getUsername:function(){return this.username},setUsername:function(e){var t=gp(wp(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=fm(t[n],dm)}},getPassword:function(){return this.password},setPassword:function(e){var t=gp(wp(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=fm(t[n],dm)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?sm(e):sm(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Im)},getHostname:function(){var e=this.host;return null===e?"":sm(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Am)},getPort:function(){var e=this.port;return null===e?"":wp(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=wp(e))?this.port=null:this.parse(e,Om))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Dp(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Lm))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=wp(e))?this.query=null:("?"==jp(e,0)&&(e=qp(e,1)),this.query="",this.parse(e,Dm)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=wp(e))?("#"==jp(e,0)&&(e=qp(e,1)),this.fragment="",this.parse(e,Zm)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Um=function(e){var t=hp(this,zm),n=xp(arguments.length,1)>1?arguments[1]:void 0,r=Ep(t,new Mm(e,!1,n));op||(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())},zm=Um.prototype,Fm=function(e,t){return{get:function(){return Sp(this)[e]()},set:t&&function(e){return Sp(this)[t](e)},configurable:!0,enumerable:!0}};if(op&&(fp(zm,"href",Fm("serialize","setHref")),fp(zm,"origin",Fm("getOrigin")),fp(zm,"protocol",Fm("getProtocol","setProtocol")),fp(zm,"username",Fm("getUsername","setUsername")),fp(zm,"password",Fm("getPassword","setPassword")),fp(zm,"host",Fm("getHost","setHost")),fp(zm,"hostname",Fm("getHostname","setHostname")),fp(zm,"port",Fm("getPort","setPort")),fp(zm,"pathname",Fm("getPathname","setPathname")),fp(zm,"search",Fm("getSearch","setSearch")),fp(zm,"searchParams",Fm("getSearchParams")),fp(zm,"hash",Fm("getHash","setHash"))),dp(zm,"toJSON",(function(){return Sp(this).serialize()}),{enumerable:!0}),dp(zm,"toString",(function(){return Sp(this).serialize()}),{enumerable:!0}),Op){var Hm=Op.createObjectURL,qm=Op.revokeObjectURL;Hm&&dp(Um,"createObjectURL",up(Hm,Op)),qm&&dp(Um,"revokeObjectURL",up(qm,Op))}_p(Um,"URL"),ip({global:!0,constructor:!0,forced:!sp,sham:!op},{URL:Um});var Bm=f;function Vm(){return"object"==typeof window&&"object"==typeof document&&"[object HTMLDocument]"===Object.prototype.toString.call(document)}function Wm(){return Math.random().toString(36).slice(2)}function $m(e){return Object.prototype.toString.call(e)}function Gm(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Km(e){return"number"==typeof e}function Ym(e){return"[object BigInt]"===$m(e)}function Jm(e){return e instanceof Array}function Xm(e){return"object"==typeof e&&null!==e}aa({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Bm(URL.prototype.toString,this)}});const Qm=["zh-CN","zh-HK","zh-TW","zh","zh-Hans-CN"];const eg=e=>"".concat(e),tg=e=>({ok:!0,value:e});function ng(e){return void 0===e?tg(eg(e)):null===e?tg(e):Km(e)&&(e===-1/0||e===1/0||Number.isNaN(e))?tg(eg(e)):Ym(e)?tg("".concat(e,"n")):"symbol"==typeof e||"function"==typeof e?tg(eg(e.toString())):e instanceof Error?tg(eg(e.stack)):e===Object.prototype?{value:null,ok:!1}:e instanceof Object||"object"==typeof e?{value:e,ok:!1}:tg(e)}function rg(e){return void 0===e?"undefined":null===e?"null":Ym(e)?"bigint":e instanceof Object?e instanceof Error?"error":"function"==typeof e?"function":"object":typeof e}const ag={...console},ig=["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];ag[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...n)},e)),{unproxy:{}}),og=e=>e.replace(/\/$/,"");var sg=tc,cg=L,ug=ze,lg=mr,dg=function(e){var t=1==e;return function(n,r,a){for(var i,o=ug(n),s=cg(o),c=sg(r,a),u=lg(s);u-- >0;)if(c(i=s[u],u,o))switch(e){case 0:return i;case 1:return u}return t?-1:void 0}},fg={findLast:dg(0),findLastIndex:dg(1)},hg=fg.findLast,pg=mo;aa({target:"Array",proto:!0},{findLast:function(e){return hg(this,e,arguments.length>1?arguments[1]:void 0)}}),pg("findLast");var mg=ve,gg=TypeError,vg=ze,yg=mr,bg=Ti,wg=function(e,t){if(!delete e[t])throw gg("Cannot delete property "+mg(t)+" of "+mg(e))},_g=Si;aa({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=vg(this),n=yg(t),r=arguments.length;if(r){_g(n+r);for(var a=n;a--;){var i=a+r;a in t?t[i]=t[a]:wg(t,i)}for(var o=0;o<r;o++)t[o]=arguments[o]}return bg(t,n+r)}});var xg={exports:{}},kg=rt("iterator"),Tg=!1;try{var Eg=0,Sg={next:function(){return{done:!!Eg++}},return:function(){Tg=!0}};Sg[kg]=function(){return this},Array.from(Sg,(function(){throw 2}))}catch(e){}var Ig,Ag,Og,Pg="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Cg=Pg,Rg=c,Lg=i,jg=B,Ng=$,Dg=qe,Zg=Ra,Mg=ve,Ug=Kt,zg=er,Fg=qs,Hg=J,qg=Eo,Bg=ba,Vg=rt,Wg=Ge,$g=Cn.enforce,Gg=Cn.get,Kg=Lg.Int8Array,Yg=Kg&&Kg.prototype,Jg=Lg.Uint8ClampedArray,Xg=Jg&&Jg.prototype,Qg=Kg&&qg(Kg),ev=Yg&&qg(Yg),tv=Object.prototype,nv=Lg.TypeError,rv=Vg("toStringTag"),av=Wg("TYPED_ARRAY_TAG"),iv="TypedArrayConstructor",ov=Cg&&!!Bg&&"Opera"!==Zg(Lg.opera),sv=!1,cv={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},uv={BigInt64Array:8,BigUint64Array:8},lv=function(e){var t=qg(e);if(Ng(t)){var n=Gg(t);return n&&Dg(n,iv)?n[iv]:lv(t)}},dv=function(e){if(!Ng(e))return!1;var t=Zg(e);return Dg(cv,t)||Dg(uv,t)};for(Ig in cv)(Og=(Ag=Lg[Ig])&&Ag.prototype)?$g(Og)[iv]=Ag:ov=!1;for(Ig in uv)(Og=(Ag=Lg[Ig])&&Ag.prototype)&&($g(Og)[iv]=Ag);if((!ov||!jg(Qg)||Qg===Function.prototype)&&(Qg=function(){throw nv("Incorrect invocation")},ov))for(Ig in cv)Lg[Ig]&&Bg(Lg[Ig],Qg);if((!ov||!ev||ev===tv)&&(ev=Qg.prototype,ov))for(Ig in cv)Lg[Ig]&&Bg(Lg[Ig].prototype,ev);if(ov&&qg(Xg)!==ev&&Bg(Xg,ev),Rg&&!Dg(ev,rv))for(Ig in sv=!0,Fg(ev,rv,{configurable:!0,get:function(){return Ng(this)?this[av]:void 0}}),cv)Lg[Ig]&&Ug(Lg[Ig],av,Ig);var fv={NATIVE_ARRAY_BUFFER_VIEWS:ov,TYPED_ARRAY_TAG:sv&&av,aTypedArray:function(e){if(dv(e))return e;throw nv("Target is not a typed array")},aTypedArrayConstructor:function(e){if(jg(e)&&(!Bg||Hg(Qg,e)))return e;throw nv(Mg(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(Rg){if(n)for(var a in cv){var i=Lg[a];if(i&&Dg(i.prototype,e))try{delete i.prototype[e]}catch(n){try{i.prototype[e]=t}catch(e){}}}ev[e]&&!n||zg(ev,e,n?t:ov&&Yg[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,a;if(Rg){if(Bg){if(n)for(r in cv)if((a=Lg[r])&&Dg(a,e))try{delete a[e]}catch(e){}if(Qg[e]&&!n)return;try{return zg(Qg,e,n?t:ov&&Qg[e]||t)}catch(e){}}for(r in cv)!(a=Lg[r])||a[e]&&!n||zg(a,e,t)}},getTypedArrayConstructor:lv,isView:function(e){if(!Ng(e))return!1;var t=Zg(e);return"DataView"===t||Dg(cv,t)||Dg(uv,t)},isTypedArray:dv,TypedArray:Qg,TypedArrayPrototype:ev},hv=i,pv=s,mv=function(e,t){if(!t&&!Tg)return!1;var n=!1;try{var r={};r[kg]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},gv=fv.NATIVE_ARRAY_BUFFER_VIEWS,vv=hv.ArrayBuffer,yv=hv.Int8Array,bv=!gv||!pv((function(){yv(1)}))||!pv((function(){new yv(-1)}))||!mv((function(e){new yv,new yv(null),new yv(1.5),new yv(e)}),!0)||pv((function(){return 1!==new yv(new vv(2),1,void 0).length})),wv=Array,_v=Math.abs,xv=Math.pow,kv=Math.floor,Tv=Math.log,Ev=Math.LN2,Sv=ze,Iv=lr,Av=mr,Ov=function(e){for(var t=Sv(this),n=Av(t),r=arguments.length,a=Iv(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,o=void 0===i?n:Iv(i,n);o>a;)t[a++]=e;return t},Pv=i,Cv=T,Rv=c,Lv=Pg,jv=nn,Nv=Kt,Dv=qs,Zv=Vs,Mv=s,Uv=Gs,zv=or,Fv=hr,Hv=of,qv={pack:function(e,t,n){var r,a,i,o=wv(n),s=8*n-t-1,c=(1<<s)-1,u=c>>1,l=23===t?xv(2,-24)-xv(2,-77):0,d=e<0||0===e&&1/e<0?1:0,f=0;for((e=_v(e))!=e||e===1/0?(a=e!=e?1:0,r=c):(r=kv(Tv(e)/Ev),e*(i=xv(2,-r))<1&&(r--,i*=2),(e+=r+u>=1?l/i:l*xv(2,1-u))*i>=2&&(r++,i/=2),r+u>=c?(a=0,r=c):r+u>=1?(a=(e*i-1)*xv(2,t),r+=u):(a=e*xv(2,u-1)*xv(2,t),r=0));t>=8;)o[f++]=255&a,a/=256,t-=8;for(r=r<<t|a,s+=t;s>0;)o[f++]=255&r,r/=256,s-=8;return o[--f]|=128*d,o},unpack:function(e,t){var n,r=e.length,a=8*r-t-1,i=(1<<a)-1,o=i>>1,s=a-7,c=r-1,u=e[c--],l=127&u;for(u>>=7;s>0;)l=256*l+e[c--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)n=256*n+e[c--],s-=8;if(0===l)l=1-o;else{if(l===i)return n?NaN:u?-1/0:1/0;n+=xv(2,t),l-=o}return(u?-1:1)*n*xv(2,l-t)}},Bv=Eo,Vv=ba,Wv=tr.f,$v=Ov,Gv=Sc,Kv=Mo,Yv=Cn,Jv=jv.PROPER,Xv=jv.CONFIGURABLE,Qv="ArrayBuffer",ey="DataView",ty="prototype",ny="Wrong index",ry=Yv.getterFor(Qv),ay=Yv.getterFor(ey),iy=Yv.set,oy=Pv[Qv],sy=oy,cy=sy&&sy[ty],uy=Pv[ey],ly=uy&&uy[ty],dy=Object.prototype,fy=Pv.Array,hy=Pv.RangeError,py=Cv($v),my=Cv([].reverse),gy=qv.pack,vy=qv.unpack,yy=function(e){return[255&e]},by=function(e){return[255&e,e>>8&255]},wy=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},_y=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},xy=function(e){return gy(e,23,4)},ky=function(e){return gy(e,52,8)},Ty=function(e,t,n){Dv(e[ty],t,{configurable:!0,get:function(){return n(this)[t]}})},Ey=function(e,t,n,r){var a=Hv(n),i=ay(e);if(a+t>i.byteLength)throw hy(ny);var o=i.bytes,s=a+i.byteOffset,c=Gv(o,s,s+t);return r?c:my(c)},Sy=function(e,t,n,r,a,i){var o=Hv(n),s=ay(e);if(o+t>s.byteLength)throw hy(ny);for(var c=s.bytes,u=o+s.byteOffset,l=r(+a),d=0;d<t;d++)c[u+d]=l[i?d:t-d-1]};if(Lv){var Iy=Jv&&oy.name!==Qv;if(Mv((function(){oy(1)}))&&Mv((function(){new oy(-1)}))&&!Mv((function(){return new oy,new oy(1.5),new oy(NaN),1!=oy.length||Iy&&!Xv})))Iy&&Xv&&Nv(oy,"name",Qv);else{(sy=function(e){return Uv(this,cy),new oy(Hv(e))})[ty]=cy;for(var Ay,Oy=Wv(oy),Py=0;Oy.length>Py;)(Ay=Oy[Py++])in sy||Nv(sy,Ay,oy[Ay]);cy.constructor=sy}Vv&&Bv(ly)!==dy&&Vv(ly,dy);var Cy=new uy(new sy(2)),Ry=Cv(ly.setInt8);Cy.setInt8(0,2147483648),Cy.setInt8(1,2147483649),!Cy.getInt8(0)&&Cy.getInt8(1)||Zv(ly,{setInt8:function(e,t){Ry(this,e,t<<24>>24)},setUint8:function(e,t){Ry(this,e,t<<24>>24)}},{unsafe:!0})}else cy=(sy=function(e){Uv(this,cy);var t=Hv(e);iy(this,{type:Qv,bytes:py(fy(t),0),byteLength:t}),Rv||(this.byteLength=t,this.detached=!1)})[ty],ly=(uy=function(e,t,n){Uv(this,ly),Uv(e,cy);var r=ry(e),a=r.byteLength,i=zv(t);if(i<0||i>a)throw hy("Wrong offset");if(i+(n=void 0===n?a-i:Fv(n))>a)throw hy("Wrong length");iy(this,{type:ey,buffer:e,byteLength:n,byteOffset:i,bytes:r.bytes}),Rv||(this.buffer=e,this.byteLength=n,this.byteOffset=i)})[ty],Rv&&(Ty(sy,"byteLength",ry),Ty(uy,"buffer",ay),Ty(uy,"byteLength",ay),Ty(uy,"byteOffset",ay)),Zv(ly,{getInt8:function(e){return Ey(this,1,e)[0]<<24>>24},getUint8:function(e){return Ey(this,1,e)[0]},getInt16:function(e){var t=Ey(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Ey(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return _y(Ey(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return _y(Ey(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return vy(Ey(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return vy(Ey(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Sy(this,1,e,yy,t)},setUint8:function(e,t){Sy(this,1,e,yy,t)},setInt16:function(e,t){Sy(this,2,e,by,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Sy(this,2,e,by,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Sy(this,4,e,wy,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Sy(this,4,e,wy,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Sy(this,4,e,xy,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Sy(this,8,e,ky,t,arguments.length>2?arguments[2]:void 0)}});Kv(sy,Qv),Kv(uy,ey);var Ly={ArrayBuffer:sy,DataView:uy},jy=$,Ny=Math.floor,Dy=Number.isInteger||function(e){return!jy(e)&&isFinite(e)&&Ny(e)===e},Zy=or,My=RangeError,Uy=function(e){var t=Zy(e);if(t<0)throw My("The argument can't be less than 0");return t},zy=RangeError,Fy=function(e,t){var n=Uy(e);if(n%t)throw zy("Wrong offset");return n},Hy=Oh,qy=ve,By=TypeError,Vy=Ra,Wy=function(e){var t=Vy(e);return"BigInt64Array"==t||"BigUint64Array"==t},$y=dt,Gy=TypeError,Ky=function(e){var t=$y(e,"number");if("number"==typeof t)throw Gy("Can't convert number to bigint");return BigInt(t)},Yy=tc,Jy=f,Xy=function(e){if(Hy(e))return e;throw By(qy(e)+" is not a constructor")},Qy=ze,eb=mr,tb=pc,nb=sc,rb=ph,ab=Wy,ib=fv.aTypedArrayConstructor,ob=Ky,sb=bi,cb=Oh,ub=$,lb=rt("species"),db=Array,fb=function(e){var t;return sb(e)&&(t=e.constructor,(cb(t)&&(t===db||sb(t.prototype))||ub(t)&&null===(t=t[lb]))&&(t=void 0)),void 0===t?db:t},hb=tc,pb=L,mb=ze,gb=mr,vb=function(e,t){return new(fb(e))(0===t?0:t)},yb=T([].push),bb=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,o=7==e,s=5==e||i;return function(c,u,l,d){for(var f,h,p=mb(c),m=pb(p),g=hb(u,l),v=gb(m),y=0,b=d||vb,w=t?b(c,v):n||o?b(c,0):void 0;v>y;y++)if((s||y in m)&&(h=g(f=m[y],y,p),e))if(t)w[y]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:yb(w,f)}else switch(e){case 4:return!1;case 7:yb(w,f)}return i?-1:r||a?a:w}},wb={forEach:bb(0),map:bb(1),filter:bb(2),some:bb(3),every:bb(4),find:bb(5),findIndex:bb(6),filterReject:bb(7)},_b=Y,xb=qs,kb=c,Tb=rt("species"),Eb=aa,Sb=i,Ib=f,Ab=c,Ob=bv,Pb=fv,Cb=Ly,Rb=Gs,Lb=b,jb=Kt,Nb=Dy,Db=hr,Zb=of,Mb=Fy,Ub=pt,zb=qe,Fb=Ra,Hb=$,qb=me,Bb=io,Vb=J,Wb=ba,$b=tr.f,Gb=function(e){var t,n,r,a,i,o,s,c,u=Xy(this),l=Qy(e),d=arguments.length,f=d>1?arguments[1]:void 0,h=void 0!==f,p=nb(l);if(p&&!rb(p))for(c=(s=tb(l,p)).next,l=[];!(o=Jy(c,s)).done;)l.push(o.value);for(h&&d>2&&(f=Yy(f,arguments[2])),n=eb(l),r=new(ib(u))(n),a=ab(r),t=0;n>t;t++)i=h?f(l[t],t):l[t],r[t]=a?ob(i):+i;return r},Kb=wb.forEach,Yb=function(e){var t=_b(e);kb&&t&&!t[Tb]&&xb(t,Tb,{configurable:!0,get:function(){return this}})},Jb=qs,Xb=Pt,Qb=o,ew=Ta,tw=Cn.get,nw=Cn.set,rw=Cn.enforce,aw=Xb.f,iw=Qb.f,ow=Math.round,sw=Sb.RangeError,cw=Cb.ArrayBuffer,uw=cw.prototype,lw=Cb.DataView,dw=Pb.NATIVE_ARRAY_BUFFER_VIEWS,fw=Pb.TYPED_ARRAY_TAG,hw=Pb.TypedArray,pw=Pb.TypedArrayPrototype,mw=Pb.aTypedArrayConstructor,gw=Pb.isTypedArray,vw="BYTES_PER_ELEMENT",yw="Wrong length",bw=function(e,t){mw(e);for(var n=0,r=t.length,a=new e(r);r>n;)a[n]=t[n++];return a},ww=function(e,t){Jb(e,t,{configurable:!0,get:function(){return tw(this)[t]}})},_w=function(e){var t;return Vb(uw,e)||"ArrayBuffer"==(t=Fb(e))||"SharedArrayBuffer"==t},xw=function(e,t){return gw(e)&&!qb(t)&&t in e&&Nb(+t)&&t>=0},kw=function(e,t){return t=Ub(t),xw(e,t)?Lb(2,e[t]):iw(e,t)},Tw=function(e,t,n){return t=Ub(t),!(xw(e,t)&&Hb(n)&&zb(n,"value"))||zb(n,"get")||zb(n,"set")||n.configurable||zb(n,"writable")&&!n.writable||zb(n,"enumerable")&&!n.enumerable?aw(e,t,n):(e[t]=n.value,e)};Ab?(dw||(Qb.f=kw,Xb.f=Tw,ww(pw,"buffer"),ww(pw,"byteOffset"),ww(pw,"byteLength"),ww(pw,"length")),Eb({target:"Object",stat:!0,forced:!dw},{getOwnPropertyDescriptor:kw,defineProperty:Tw}),xg.exports=function(e,t,n){var r=e.match(/\d+/)[0]/8,a=e+(n?"Clamped":"")+"Array",i="get"+e,o="set"+e,s=Sb[a],c=s,u=c&&c.prototype,l={},d=function(e,t){aw(e,t,{get:function(){return function(e,t){var n=tw(e);return n.view[i](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,a){var i=tw(e);n&&(a=(a=ow(a))<0?0:a>255?255:255&a),i.view[o](t*r+i.byteOffset,a,!0)}(this,t,e)},enumerable:!0})};dw?Ob&&(c=t((function(e,t,n,a){return Rb(e,u),ew(Hb(t)?_w(t)?void 0!==a?new s(t,Mb(n,r),a):void 0!==n?new s(t,Mb(n,r)):new s(t):gw(t)?bw(c,t):Ib(Gb,c,t):new s(Zb(t)),e,c)})),Wb&&Wb(c,hw),Kb($b(s),(function(e){e in c||jb(c,e,s[e])})),c.prototype=u):(c=t((function(e,t,n,a){Rb(e,u);var i,o,s,l=0,f=0;if(Hb(t)){if(!_w(t))return gw(t)?bw(c,t):Ib(Gb,c,t);i=t,f=Mb(n,r);var h=t.byteLength;if(void 0===a){if(h%r)throw sw(yw);if((o=h-f)<0)throw sw(yw)}else if((o=Db(a)*r)+f>h)throw sw(yw);s=o/r}else s=Zb(t),i=new cw(o=s*r);for(nw(e,{buffer:i,byteOffset:f,byteLength:o,length:s,view:new lw(i)});l<s;)d(e,l++)})),Wb&&Wb(c,hw),u=c.prototype=Bb(pw)),u.constructor!==c&&jb(u,"constructor",c),rw(u).TypedArrayConstructor=c,fw&&jb(u,fw,a);var f=c!=s;l[a]=c,Eb({global:!0,constructor:!0,forced:f,sham:!dw},l),vw in c||jb(c,vw,r),vw in u||jb(u,vw,r),Yb(a)}):xg.exports=function(){};var Ew=xg.exports;Ew("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),Ew("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),Ew("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var Sw=mr,Iw=or,Aw=fv.aTypedArray;(0,fv.exportTypedArrayMethod)("at",(function(e){var t=Aw(this),n=Sw(t),r=Iw(e),a=r>=0?r:n+r;return a<0||a>=n?void 0:t[a]}));var Ow=Ov,Pw=Ky,Cw=Ra,Rw=f,Lw=s,jw=fv.aTypedArray,Nw=fv.exportTypedArrayMethod,Dw=T("".slice);Nw("fill",(function(e){var t=arguments.length;jw(this);var n="Big"===Dw(Cw(this),0,3)?Pw(e):+e;return Rw(Ow,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),Lw((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Zw=fg.findLast,Mw=fv.aTypedArray;(0,fv.exportTypedArrayMethod)("findLast",(function(e){return Zw(Mw(this),e,arguments.length>1?arguments[1]:void 0)}));var Uw=fg.findLastIndex,zw=fv.aTypedArray;(0,fv.exportTypedArrayMethod)("findLastIndex",(function(e){return Uw(zw(this),e,arguments.length>1?arguments[1]:void 0)}));var Fw=i,Hw=f,qw=fv,Bw=mr,Vw=Fy,Ww=ze,$w=s,Gw=Fw.RangeError,Kw=Fw.Int8Array,Yw=Kw&&Kw.prototype,Jw=Yw&&Yw.set,Xw=qw.aTypedArray,Qw=qw.exportTypedArrayMethod,e_=!$w((function(){var e=new Uint8ClampedArray(2);return Hw(Jw,e,{length:1,0:3},1),3!==e[1]})),t_=e_&&qw.NATIVE_ARRAY_BUFFER_VIEWS&&$w((function(){var e=new Kw(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Qw("set",(function(e){Xw(this);var t=Vw(arguments.length>1?arguments[1]:void 0,1),n=Ww(e);if(e_)return Hw(Jw,this,n,t);var r=this.length,a=Bw(n),i=0;if(a+t>r)throw Gw("Wrong length");for(;i<a;)this[t+i]=n[i++]}),!e_||t_);var n_=X.match(/firefox\/(\d+)/i),r_=!!n_&&+n_[1],a_=/MSIE|Trident/.test(X),i_=X.match(/AppleWebKit\/(\d+)\./),o_=!!i_&&+i_[1],s_=Js,c_=s,u_=_e,l_=Rc,d_=r_,f_=a_,h_=ie,p_=o_,m_=fv.aTypedArray,g_=fv.exportTypedArrayMethod,v_=i.Uint16Array,y_=v_&&s_(v_.prototype.sort),b_=!(!y_||c_((function(){y_(new v_(2),null)}))&&c_((function(){y_(new v_(2),{})}))),w_=!!y_&&!c_((function(){if(h_)return h_<74;if(d_)return d_<67;if(f_)return!0;if(p_)return p_<602;var e,t,n=new v_(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(y_(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));g_("sort",(function(e){return void 0!==e&&u_(e),w_?y_(this,e):l_(m_(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!w_||b_);var __=mr,x_=function(e,t){for(var n=__(e),r=new t(n),a=0;a<n;a++)r[a]=e[n-a-1];return r},k_=fv.aTypedArray,T_=fv.getTypedArrayConstructor;(0,fv.exportTypedArrayMethod)("toReversed",(function(){return x_(k_(this),T_(this))}));var E_=mr,S_=_e,I_=function(e,t){for(var n=0,r=E_(t),a=new e(r);r>n;)a[n]=t[n++];return a},A_=fv.aTypedArray,O_=fv.getTypedArrayConstructor,P_=fv.exportTypedArrayMethod,C_=T(fv.TypedArrayPrototype.sort);P_("toSorted",(function(e){void 0!==e&&S_(e);var t=A_(this),n=I_(O_(t),t);return C_(n,e)}));var R_=mr,L_=or,j_=RangeError,N_=function(e,t,n,r){var a=R_(e),i=L_(n),o=i<0?a+i:i;if(o>=a||o<0)throw j_("Incorrect index");for(var s=new t(a),c=0;c<a;c++)s[c]=c===o?r:e[c];return s},D_=Wy,Z_=or,M_=Ky,U_=fv.aTypedArray,z_=fv.getTypedArrayConstructor,F_=fv.exportTypedArrayMethod,H_=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}();F_("with",{with:function(e,t){var n=U_(this),r=Z_(e),a=D_(n)?M_(t):+t;return N_(n,z_(n),r,a)}}.with,!H_);var q_=Uint8Array,B_=Uint16Array,V_=Int32Array,W_=new q_([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),$_=new q_([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),G_=new q_([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),K_=function(e,t){for(var n=new B_(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var a=new V_(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)a[i]=i-n[r]<<5|r;return{b:n,r:a}},Y_=K_(W_,2),J_=Y_.b,X_=Y_.r;J_[28]=258,X_[258]=28;for(var Q_=K_($_,0).r,ex=new B_(32768),tx=0;tx<32768;++tx){var nx=(43690&tx)>>1|(21845&tx)<<1;nx=(61680&(nx=(52428&nx)>>2|(13107&nx)<<2))>>4|(3855&nx)<<4,ex[tx]=((65280&nx)>>8|(255&nx)<<8)>>1}var rx=function(e,t,n){for(var r=e.length,a=0,i=new B_(t);a<r;++a)e[a]&&++i[e[a]-1];var o,s=new B_(t);for(a=1;a<t;++a)s[a]=s[a-1]+i[a-1]<<1;if(n){o=new B_(1<<t);var c=15-t;for(a=0;a<r;++a)if(e[a])for(var u=a<<4|e[a],l=t-e[a],d=s[e[a]-1]++<<l,f=d|(1<<l)-1;d<=f;++d)o[ex[d]>>c]=u}else for(o=new B_(r),a=0;a<r;++a)e[a]&&(o[a]=ex[s[e[a]-1]++]>>15-e[a]);return o},ax=new q_(288);for(tx=0;tx<144;++tx)ax[tx]=8;for(tx=144;tx<256;++tx)ax[tx]=9;for(tx=256;tx<280;++tx)ax[tx]=7;for(tx=280;tx<288;++tx)ax[tx]=8;var ix=new q_(32);for(tx=0;tx<32;++tx)ix[tx]=5;var ox=rx(ax,9,0),sx=rx(ix,5,0),cx=function(e){return(e+7)/8|0},ux=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new q_(e.subarray(t,n))},lx=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],dx=function(e,t,n){var r=new Error(t||lx[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,dx),!n)throw r;return r},fx=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},hx=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},px=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var a=n.length,i=n.slice();if(!a)return{t:_x,l:0};if(1==a){var o=new q_(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],c=n[1],u=0,l=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};l!=a-1;)s=n[n[u].f<n[d].f?u++:d++],c=n[u!=l&&n[u].f<n[d].f?u++:d++],n[l++]={s:-1,f:s.f+c.f,l:s,r:c};var f=i[0].s;for(r=1;r<a;++r)i[r].s>f&&(f=i[r].s);var h=new B_(f+1),p=mx(n[l-1],h,0);if(p>t){r=0;var m=0,g=p-t,v=1<<g;for(i.sort((function(e,t){return h[t.s]-h[e.s]||e.f-t.f}));r<a;++r){var y=i[r].s;if(!(h[y]>t))break;m+=v-(1<<p-h[y]),h[y]=t}for(m>>=g;m>0;){var b=i[r].s;h[b]<t?m-=1<<t-h[b]++-1:++r}for(;r>=0&&m;--r){var w=i[r].s;h[w]==t&&(--h[w],++m)}p=t}return{t:new q_(h),l:p}},mx=function(e,t,n){return-1==e.s?Math.max(mx(e.l,t,n+1),mx(e.r,t,n+1)):t[e.s]=n},gx=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new B_(++t),r=0,a=e[0],i=1,o=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==a&&s!=t)++i;else{if(!a&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(a),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(a);i=1,a=e[s]}return{c:n.subarray(0,r),n:t}},vx=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},yx=function(e,t,n){var r=n.length,a=cx(t+2);e[a]=255&r,e[a+1]=r>>8,e[a+2]=255^e[a],e[a+3]=255^e[a+1];for(var i=0;i<r;++i)e[a+i+4]=n[i];return 8*(a+4+r)},bx=function(e,t,n,r,a,i,o,s,c,u,l){fx(t,l++,n),++a[256];for(var d=px(a,15),f=d.t,h=d.l,p=px(i,15),m=p.t,g=p.l,v=gx(f),y=v.c,b=v.n,w=gx(m),_=w.c,x=w.n,k=new B_(19),T=0;T<y.length;++T)++k[31&y[T]];for(T=0;T<_.length;++T)++k[31&_[T]];for(var E=px(k,7),S=E.t,I=E.l,A=19;A>4&&!S[G_[A-1]];--A);var O,P,C,R,L=u+5<<3,j=vx(a,ax)+vx(i,ix)+o,N=vx(a,f)+vx(i,m)+o+14+3*A+vx(k,S)+2*k[16]+3*k[17]+7*k[18];if(c>=0&&L<=j&&L<=N)return yx(t,l,e.subarray(c,c+u));if(fx(t,l,1+(N<j)),l+=2,N<j){O=rx(f,h,0),P=f,C=rx(m,g,0),R=m;var D=rx(S,I,0);fx(t,l,b-257),fx(t,l+5,x-1),fx(t,l+10,A-4),l+=14;for(T=0;T<A;++T)fx(t,l+3*T,S[G_[T]]);l+=3*A;for(var Z=[y,_],M=0;M<2;++M){var U=Z[M];for(T=0;T<U.length;++T){var z=31&U[T];fx(t,l,D[z]),l+=S[z],z>15&&(fx(t,l,U[T]>>5&127),l+=U[T]>>12)}}}else O=ox,P=ax,C=sx,R=ix;for(T=0;T<s;++T){var F=r[T];if(F>255){hx(t,l,O[(z=F>>18&31)+257]),l+=P[z+257],z>7&&(fx(t,l,F>>23&31),l+=W_[z]);var H=31&F;hx(t,l,C[H]),l+=R[H],H>3&&(hx(t,l,F>>5&8191),l+=$_[H])}else hx(t,l,O[F]),l+=P[F]}return hx(t,l,O[256]),l+P[256]},wx=new V_([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_x=new q_(0),xx=function(){var e=1,t=0;return{p:function(n){for(var r=e,a=t,i=0|n.length,o=0;o!=i;){for(var s=Math.min(o+2655,i);o<s;++o)a+=r+=n[o];r=(65535&r)+15*(r>>16),a=(65535&a)+15*(a>>16)}e=r,t=a},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},kx=function(e,t,n,r,a){if(!a&&(a={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),o=new q_(i.length+e.length);o.set(i),o.set(e,i.length),e=o,a.w=i.length}return function(e,t,n,r,a,i){var o=i.z||e.length,s=new q_(r+o+5*(1+Math.ceil(o/7e3))+a),c=s.subarray(r,s.length-a),u=i.l,l=7&(i.r||0);if(t){l&&(c[0]=i.r>>3);for(var d=wx[t-1],f=d>>13,h=8191&d,p=(1<<n)-1,m=i.p||new B_(32768),g=i.h||new B_(p+1),v=Math.ceil(n/3),y=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&p},w=new V_(25e3),_=new B_(288),x=new B_(32),k=0,T=0,E=i.i||0,S=0,I=i.w||0,A=0;E+2<o;++E){var O=b(E),P=32767&E,C=g[O];if(m[P]=C,g[O]=P,I<=E){var R=o-E;if((k>7e3||S>24576)&&(R>423||!u)){l=bx(e,c,0,w,_,x,T,S,A,E-A,l),S=k=T=0,A=E;for(var L=0;L<286;++L)_[L]=0;for(L=0;L<30;++L)x[L]=0}var j=2,N=0,D=h,Z=P-C&32767;if(R>2&&O==b(E-Z))for(var M=Math.min(f,R)-1,U=Math.min(32767,E),z=Math.min(258,R);Z<=U&&--D&&P!=C;){if(e[E+j]==e[E+j-Z]){for(var F=0;F<z&&e[E+F]==e[E+F-Z];++F);if(F>j){if(j=F,N=Z,F>M)break;var H=Math.min(Z,F-2),q=0;for(L=0;L<H;++L){var B=E-Z+L&32767,V=B-m[B]&32767;V>q&&(q=V,C=B)}}}Z+=(P=C)-(C=m[P])&32767}if(N){w[S++]=268435456|X_[j]<<18|Q_[N];var W=31&X_[j],$=31&Q_[N];T+=W_[W]+$_[$],++_[257+W],++x[$],I=E+j,++k}else w[S++]=e[E],++_[e[E]]}}for(E=Math.max(E,I);E<o;++E)w[S++]=e[E],++_[e[E]];l=bx(e,c,u,w,_,x,T,S,A,E-A,l),u||(i.r=7&l|c[l/8|0]<<3,l-=7,i.h=g,i.p=m,i.i=E,i.w=I)}else{for(E=i.w||0;E<o+u;E+=65535){var G=E+65535;G>=o&&(c[l/8|0]=u,G=o),l=yx(c,l+1,e.subarray(E,G))}i.i=o}return ux(s,0,r+cx(l)+a)}(e,null==t.level?6:t.level,null==t.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,a)},Tx=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Ex(e,t){t||(t={});var n=xx();n.p(e);var r=kx(e,t,t.dictionary?6:2,4);return function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var a=xx();a.p(t.dictionary),Tx(e,2,a.d())}}(r,t),Tx(r,r.length-4,n.d()),r}var Sx="undefined"!=typeof TextEncoder&&new TextEncoder,Ix="undefined"!=typeof TextDecoder&&new TextDecoder;try{Ix.decode(_x,{stream:!0}),1}catch(e){}function Ax(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(Ix)return Ix.decode(e);var a=function(e){for(var t="",n=0;;){var r=e[n++],a=(r>127)+(r>223)+(r>239);if(n+a>e.length)return{s:t,r:ux(e,n-1)};a?3==a?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&a?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}(e),i=a.s;return(n=a.r).length&&dx(8),i}const Ox=()=>{if(Vm()){var e,t;const r=sessionStorage.getItem("page-spy-room");var n;return r?(null===(n=JSON.parse(r))||void 0===n?void 0:n.address)||"--":(null===(e=window.$pageSpy)||void 0===e?void 0:e.address)||(null===(t=window.PageSpy)||void 0===t||null===(t=t.instance)||void 0===t?void 0:t.address)||"--"}return"--"},Px=e=>e.toString().replace(/[^\w]/g,"_"),Cx=e=>Ax(Ex(function(e,t){if(t){for(var n=new q_(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Sx)return Sx.encode(e);var a=e.length,i=new q_(e.length+(e.length>>1)),o=0,s=function(e){i[o++]=e};for(r=0;r<a;++r){if(o+5>i.length){var c=new q_(o+8+(a-r<<1));c.set(i),i=c}var u=e.charCodeAt(r);u<128||t?s(u):u<2048?(s(192|u>>6),s(128|63&u)):u>55295&&u<57344?(s(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++r))>>18),s(128|u>>12&63),s(128|u>>6&63),s(128|63&u)):(s(224|u>>12),s(128|u>>6&63),s(128|63&u))}return ux(i,0,o)}(JSON.stringify(e)),{level:9}),!0);function Rx(e){return e>=10?e.toString():"0".concat(e)}function Lx(e){const t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),r=Math.floor(e-3600*t-60*n),a=Rx(t),i=Rx(n),o=Rx(r);return 0===t?"".concat(i,":").concat(o):"".concat(a,":").concat(i,":").concat(o)}const jx="message",Nx="broadcast",Dx="ping",Zx="updateRoomInfo";var Mx,Ux=Object.freeze({__proto__:null,BROADCAST:Nx,CLOSE:"close",CONNECT:"connect",ERROR:"error",JOIN:"join",LEAVE:"leave",MESSAGE:jx,PING:Dx,PONG:"pong",UPDATE_ROOM_INFO:Zx});function zx(e,t){return{role:"client",type:e,data:{...(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&{id:Wm()},...t}}}class Fx{constructor(e){t(this,"id",""),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","__PLACEHOLDER_RESPONSE_DEFINED_BY_PAGE_SPY__"),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,"postData",null),t(this,"requestPayload",null),t(this,"withCredentials",!1),t(this,"lastEventId",""),this.id=e}}!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"}(Mx||(Mx={}));class Hx{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]?(ig.warn("The request object has been in store, disallow duplicate create"),!1):(this.reqMap[e]=new Fx(e),!0):(ig.warn('The "id" is required when init request object'),!1)}setRequest(e,t){return!(!e||!t)&&(this.reqMap[e]=t,!0)}sendRequestItem(e,t){var n;if(!1!==(null===(n=Hx.dataProcessor)||void 0===n?void 0:n.call(Hx,t)))try{this.reqMap[e]||(this.reqMap[e]=t);const n=zx("network",{...t},!1);this.socketStore.dispatchEvent("public-data",n),this.socketStore.broadcastMessage(n,t.readyState!==Mx.DONE),this.deferDeleteRequest(e)}catch(e){ig.error(e.message)}}deferDeleteRequest(e){const t=this.getRequest(e);t&&t.readyState===Mx.DONE&&setTimeout((()=>{delete this.reqMap[e]}),3e3)}}t(Hx,"dataProcessor",void 0);var qx=T,Bx=Set.prototype,Vx={Set:Set,add:qx(Bx.add),has:qx(Bx.has),remove:qx(Bx.delete),proto:Bx},Wx=Vx.has,$x=function(e){return Wx(e),e},Gx=f,Kx=function(e,t,n){for(var r,a,i=n||e.next;!(r=Gx(i,e)).done;)if(void 0!==(a=t(r.value)))return a},Yx=T,Jx=Kx,Xx=Vx.Set,Qx=Vx.proto,ek=Yx(Qx.forEach),tk=Yx(Qx.keys),nk=tk(new Xx).next,rk=function(e,t,n){return n?Jx(tk(e),t,nk):ek(e,t)},ak=rk,ik=Vx.Set,ok=Vx.add,sk=function(e){var t=new ik;return ak(e,(function(e){ok(t,e)})),t},ck=fa(Vx.proto,"size","get")||function(e){return e.size},uk=_e,lk=Nt,dk=f,fk=or,hk=TypeError,pk=Math.max,mk=function(e,t,n,r){this.set=e,this.size=t,this.has=n,this.keys=r};mk.prototype={getIterator:function(){return lk(dk(this.keys,this.set))},includes:function(e){return dk(this.has,this.set,e)}};var gk=function(e){lk(e);var t=+e.size;if(t!=t)throw hk("Invalid size");return new mk(e,pk(fk(t),0),uk(e.has),uk(e.keys))},vk=$x,yk=sk,bk=ck,wk=gk,_k=rk,xk=Kx,kk=Vx.has,Tk=Vx.remove,Ek=Y,Sk=function(e){try{return(new(Ek("Set")))[e]({size:0,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}),!0}catch(e){return!1}},Ik=function(e){var t=vk(this),n=wk(e),r=yk(t);return bk(t)<=n.size?_k(t,(function(e){n.includes(e)&&Tk(r,e)})):xk(n.getIterator(),(function(e){kk(t,e)&&Tk(r,e)})),r};aa({target:"Set",proto:!0,real:!0,forced:!Sk("difference")},{difference:Ik});var Ak=$x,Ok=ck,Pk=gk,Ck=rk,Rk=Kx,Lk=Vx.Set,jk=Vx.add,Nk=Vx.has,Dk=s,Zk=function(e){var t=Ak(this),n=Pk(e),r=new Lk;return Ok(t)>n.size?Rk(n.getIterator(),(function(e){Nk(t,e)&&jk(r,e)})):Ck(t,(function(e){n.includes(e)&&jk(r,e)})),r};aa({target:"Set",proto:!0,real:!0,forced:!Sk("intersection")||Dk((function(){return"3,2"!=Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:Zk});var Mk=$x,Uk=Vx.has,zk=ck,Fk=gk,Hk=rk,qk=Kx,Bk=ch,Vk=function(e){var t=Mk(this),n=Fk(e);if(zk(t)<=n.size)return!1!==Hk(t,(function(e){if(n.includes(e))return!1}),!0);var r=n.getIterator();return!1!==qk(r,(function(e){if(Uk(t,e))return Bk(r,"normal",!1)}))};aa({target:"Set",proto:!0,real:!0,forced:!Sk("isDisjointFrom")},{isDisjointFrom:Vk});var Wk=$x,$k=ck,Gk=rk,Kk=gk,Yk=function(e){var t=Wk(this),n=Kk(e);return!($k(t)>n.size)&&!1!==Gk(t,(function(e){if(!n.includes(e))return!1}),!0)};aa({target:"Set",proto:!0,real:!0,forced:!Sk("isSubsetOf")},{isSubsetOf:Yk});var Jk=$x,Xk=Vx.has,Qk=ck,eT=gk,tT=Kx,nT=ch,rT=function(e){var t=Jk(this),n=eT(e);if(Qk(t)<n.size)return!1;var r=n.getIterator();return!1!==tT(r,(function(e){if(!Xk(t,e))return nT(r,"normal",!1)}))};aa({target:"Set",proto:!0,real:!0,forced:!Sk("isSupersetOf")},{isSupersetOf:rT});var aT=$x,iT=sk,oT=gk,sT=Kx,cT=Vx.add,uT=Vx.has,lT=Vx.remove,dT=function(e){var t=aT(this),n=oT(e).getIterator(),r=iT(t);return sT(n,(function(e){uT(t,e)?lT(r,e):cT(r,e)})),r};aa({target:"Set",proto:!0,real:!0,forced:!Sk("symmetricDifference")},{symmetricDifference:dT});var fT=$x,hT=Vx.add,pT=sk,mT=gk,gT=Kx,vT=function(e){var t=fT(this),n=mT(e).getIterator(),r=pT(t);return gT(n,(function(e){hT(r,e)})),r};aa({target:"Set",proto:!0,real:!0,forced:!Sk("union")},{union:vT});class yT{constructor(){t(this,"store",{}),t(this,"instanceStore",{})}getStore(){return this.store}resetStore(){this.store={}}getInstanceStore(){return this.instanceStore}resetInstanceStore(){this.instanceStore={}}transformToAtom(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{value:n,ok:r}=ng(e),a=Wm();if(r)return{id:a,type:rg(e),value:n};if(t)try{return{id:a,type:"json",value:JSON.stringify(e)}}catch(e){return{id:a,type:"json",value:null}}return this.add(e)}get(e){const t=this.store[e],n=this.instanceStore[e];if(!t)return null;const r={},a=Object.getOwnPropertyDescriptors(t);Object.keys(a).forEach((e=>{const t=a[e];Gm(t,"value")&&(t.value=this.transformToAtom(t.value)),r[e]=yT.getAtomOverview({atomId:Wm(),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=Wm();let r=n;var a;Xm(a=e)&&Gm(a,"constructor")&&"function"==typeof a.constructor&&(r=t),this.store[n]=e,this.instanceStore[n]=r;const i=yT.getSemanticValue(e);return yT.getAtomOverview({atomId:n,value:i,instanceId:r})}static getAtomOverview(e){let{instanceId:t="",atomId:n,value:r}=e;return{id:Wm(),type:"atom",__atomId:n,instanceId:t,value:r}}static getSemanticValue(e){if(Xm(t=e)&&"[object Object]"===$m(t))return"Object {...}";var t;if(Jm(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,a]of t.entries())e[n++]={key:r,value:a};e.size=t.size,r["[[Entries]]"]=this.transformToAtom(e)}var a;return(Jm(t)||(a=t,"function"==typeof NodeList&&"NodeList"===NodeList.name&&a instanceof NodeList||"function"==typeof HTMLCollection&&"HTMLCollection"===HTMLCollection.name&&a 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 bT=new yT;var wT=aa,_T=i,xT=Y,kT=b,TT=Pt.f,ET=qe,ST=Gs,IT=Ta,AT=Za,OT={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}},PT=Va,CT=c,RT="DOMException",LT=xT("Error"),jT=xT(RT),NT=function(){ST(this,DT);var e=arguments.length,t=AT(e<1?void 0:arguments[0]),n=AT(e<2?void 0:arguments[1],"Error"),r=new jT(t,n),a=LT(t);return a.name=RT,TT(r,"stack",kT(1,PT(a.stack,1))),IT(r,this,NT),r},DT=NT.prototype=jT.prototype,ZT="stack"in LT(RT),MT="stack"in new jT(1,2),UT=jT&&CT&&Object.getOwnPropertyDescriptor(_T,RT),zT=!(!UT||UT.writable&&UT.configurable),FT=ZT&&!zT&&!MT;wT({global:!0,constructor:!0,forced:FT},{DOMException:FT?NT:jT});var HT,qT,BT=xT(RT),VT=BT.prototype;if(VT.constructor!==BT)for(var WT in TT(VT,"constructor",kT(1,BT)),OT)if(ET(OT,WT)){var $T=OT[WT],GT=$T.s;ET(BT,GT)||TT(BT,GT,kT(6,$T.c))}!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map((e=>"string"==typeof e?"'".concat(e,"'"):e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(HT||(HT={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(qT||(qT={}));const KT=HT.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),YT=e=>{switch(typeof e){case"undefined":return KT.undefined;case"string":return KT.string;case"number":return isNaN(e)?KT.nan:KT.number;case"boolean":return KT.boolean;case"function":return KT.function;case"bigint":return KT.bigint;case"symbol":return KT.symbol;case"object":return Array.isArray(e)?KT.array:null===e?KT.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?KT.promise:"undefined"!=typeof Map&&e instanceof Map?KT.map:"undefined"!=typeof Set&&e instanceof Set?KT.set:"undefined"!=typeof Date&&e instanceof Date?KT.date:KT.object;default:return KT.unknown}},JT=HT.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class XT extends Error{get errors(){return this.issues}constructor(e){var t;super(),t=this,this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.issues=[...t.issues,...e]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof XT))throw new Error("Not a ZodError: ".concat(e))}toString(){return this.message}get message(){return JSON.stringify(this.issues,HT.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e.message;const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}XT.create=e=>new XT(e);const QT=(e,t)=>{let n;switch(e.code){case JT.invalid_type:n=e.received===KT.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case JT.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,HT.jsonStringifyReplacer));break;case JT.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(HT.joinValues(e.keys,", "));break;case JT.invalid_union:n="Invalid input";break;case JT.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(HT.joinValues(e.options));break;case JT.invalid_enum_value:n="Invalid enum value. Expected ".concat(HT.joinValues(e.options),", received '").concat(e.received,"'");break;case JT.invalid_arguments:n="Invalid function arguments";break;case JT.invalid_return_type:n="Invalid function return type";break;case JT.invalid_date:n="Invalid date";break;case JT.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"==typeof e.validation.position&&(n="".concat(n," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?n='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?n='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):HT.assertNever(e.validation):n="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case JT.too_small:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case JT.too_big:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case JT.custom:n="Invalid input";break;case JT.invalid_intersection_types:n="Intersection results could not be merged";break;case JT.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case JT.not_finite:n="Number must be finite";break;default:n=t.defaultError,HT.assertNever(e)}return{message:n}};let eE=QT;function tE(){return eE}const nE=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],o={...a,path:i};if(void 0!==a.message)return{...a,path:i,message:a.message};let s="";const c=r.filter((e=>!!e)).slice().reverse();for(const e of c)s=e(o,{data:t,defaultError:s}).message;return{...a,path:i,message:s}};function rE(e,t){const n=tE(),r=nE({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===QT?void 0:QT].filter((e=>!!e))});e.common.issues.push(r)}class aE{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return iE;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,r=await e.value;n.push({key:t,value:r})}return aE.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return iE;if("aborted"===a.status)return iE;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const iE=Object.freeze({status:"aborted"}),oE=e=>({status:"dirty",value:e}),sE=e=>({status:"valid",value:e}),cE=e=>"aborted"===e.status,uE=e=>"dirty"===e.status,lE=e=>"valid"===e.status,dE=e=>"undefined"!=typeof Promise&&e instanceof Promise;function fE(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function hE(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n}var pE,mE,gE;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(pE||(pE={}));class vE{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const yE=(e,t)=>{if(lE(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new XT(e.common.issues);return this._error=t,this._error}}};function bE(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{var i,o;const{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:a.defaultError}:void 0===a.data?{message:null!==(i=null!=s?s:r)&&void 0!==i?i:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(o=null!=s?s:n)&&void 0!==o?o:a.defaultError}},description:a}}class wE{get description(){return this._def.description}_getType(e){return YT(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:YT(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new aE,ctx:{common:e.parent.common,data:e.data,parsedType:YT(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(dE(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:YT(e)},a=this._parseSync({data:e,path:r.path,parent:r});return yE(r,a)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:YT(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return lE(t)?{value:t.value}:{issues:r.common.issues}}catch(e){(null===(n=null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>lE(e)?{value:e.value}:{issues:r.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:YT(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(dE(r)?r:Promise.resolve(r));return yE(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),i=()=>r.addIssue({code:JT.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(i(),!1))):!!a||(i(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new _S({schema:this,typeName:jS.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return xS.create(this,this._def)}nullable(){return kS.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nS.create(this)}promise(){return wS.create(this,this._def)}or(e){return iS.create([this,e],this._def)}and(e){return uS.create(this,e,this._def)}transform(e){return new _S({...bE(this._def),schema:this,typeName:jS.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new TS({...bE(this._def),innerType:this,defaultValue:t,typeName:jS.ZodDefault})}brand(){return new AS({typeName:jS.ZodBranded,type:this,...bE(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ES({...bE(this._def),innerType:this,catchValue:t,typeName:jS.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return OS.create(this,e)}readonly(){return PS.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _E=/^c[^\s-]{8,}$/i,xE=/^[0-9a-z]+$/,kE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,TE=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,EE=/^[a-z0-9_-]{21}$/i,SE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,IE=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,AE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let OE;const PE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,RE=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,LE=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,NE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,DE="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ZE=new RegExp("^".concat(DE,"$"));function ME(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?")),t}function UE(e){let t="".concat(DE,"T").concat(ME(e));const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(n.join("|"),")"),new RegExp("^".concat(t,"$"))}function zE(e,t){return!("v4"!==t&&t||!PE.test(e))||!("v6"!==t&&t||!RE.test(e))}function FE(e,t){if(!SE.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return"object"==typeof a&&null!==a&&(!(!a.typ||!a.alg)&&(!t||a.alg===t))}catch(e){return!1}}function HE(e,t){return!("v4"!==t&&t||!CE.test(e))||!("v6"!==t&&t||!LE.test(e))}class qE extends wE{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==KT.string){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.string,received:t.parsedType}),iE}const t=new aE;let n;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const a=e.data.length>r.value,i=e.data.length<r.value;(a||i)&&(n=this._getOrReturnCtx(e,n),a?rE(n,{code:JT.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):i&&rE(n,{code:JT.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)AE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"email",code:JT.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)OE||(OE=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),OE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"emoji",code:JT.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)TE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"uuid",code:JT.invalid_string,message:r.message}),t.dirty());else if("nanoid"===r.kind)EE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"nanoid",code:JT.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)_E.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"cuid",code:JT.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)xE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"cuid2",code:JT.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)kE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"ulid",code:JT.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch(a){n=this._getOrReturnCtx(e,n),rE(n,{validation:"url",code:JT.invalid_string,message:r.message}),t.dirty()}else if("regex"===r.kind){r.regex.lastIndex=0;r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"regex",code:JT.invalid_string,message:r.message}),t.dirty())}else if("trim"===r.kind)e.data=e.data.trim();else if("includes"===r.kind)e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty());else if("toLowerCase"===r.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===r.kind)e.data=e.data.toUpperCase();else if("startsWith"===r.kind)e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty());else if("endsWith"===r.kind)e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty());else if("datetime"===r.kind){UE(r).test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.invalid_string,validation:"datetime",message:r.message}),t.dirty())}else if("date"===r.kind){ZE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.invalid_string,validation:"date",message:r.message}),t.dirty())}else if("time"===r.kind){new RegExp("^".concat(ME(r),"$")).test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.invalid_string,validation:"time",message:r.message}),t.dirty())}else"duration"===r.kind?IE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"duration",code:JT.invalid_string,message:r.message}),t.dirty()):"ip"===r.kind?zE(e.data,r.version)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"ip",code:JT.invalid_string,message:r.message}),t.dirty()):"jwt"===r.kind?FE(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"jwt",code:JT.invalid_string,message:r.message}),t.dirty()):"cidr"===r.kind?HE(e.data,r.version)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"cidr",code:JT.invalid_string,message:r.message}),t.dirty()):"base64"===r.kind?jE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"base64",code:JT.invalid_string,message:r.message}),t.dirty()):"base64url"===r.kind?NE.test(e.data)||(n=this._getOrReturnCtx(e,n),rE(n,{validation:"base64url",code:JT.invalid_string,message:r.message}),t.dirty()):HT.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:JT.invalid_string,...pE.errToObj(n)})}_addCheck(e){return new qE({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...pE.errToObj(e)})}url(e){return this._addCheck({kind:"url",...pE.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...pE.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...pE.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...pE.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...pE.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...pE.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...pE.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...pE.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...pE.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...pE.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...pE.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...pE.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...pE.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...pE.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...pE.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...pE.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...pE.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...pE.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...pE.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...pE.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...pE.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...pE.errToObj(t)})}nonempty(e){return this.min(1,pE.errToObj(e))}trim(){return new qE({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qE({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qE({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function BE(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}qE.create=e=>{var t;return new qE({checks:[],typeName:jS.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...bE(e)})};class VE extends wE{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==KT.number){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.number,received:t.parsedType}),iE}let t;const n=new aE;for(const r of this._def.checks)if("int"===r.kind)HT.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),rE(t,{code:JT.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),rE(t,{code:JT.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),rE(t,{code:JT.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==BE(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),rE(t,{code:JT.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),rE(t,{code:JT.not_finite,message:r.message}),n.dirty()):HT.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,pE.toString(t))}gt(e,t){return this.setLimit("min",e,!1,pE.toString(t))}lte(e,t){return this.setLimit("max",e,!0,pE.toString(t))}lt(e,t){return this.setLimit("max",e,!1,pE.toString(t))}setLimit(e,t,n,r){return new VE({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:pE.toString(r)}]})}_addCheck(e){return new VE({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:pE.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pE.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pE.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pE.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pE.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:pE.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:pE.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pE.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pE.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&HT.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}VE.create=e=>new VE({checks:[],typeName:jS.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...bE(e)});class WE extends wE{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==KT.bigint)return this._getInvalidInput(e);let t;const n=new aE;for(const r of this._def.checks)if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),rE(t,{code:JT.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),rE(t,{code:JT.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),rE(t,{code:JT.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):HT.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.bigint,received:t.parsedType}),iE}gte(e,t){return this.setLimit("min",e,!0,pE.toString(t))}gt(e,t){return this.setLimit("min",e,!1,pE.toString(t))}lte(e,t){return this.setLimit("max",e,!0,pE.toString(t))}lt(e,t){return this.setLimit("max",e,!1,pE.toString(t))}setLimit(e,t,n,r){return new WE({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:pE.toString(r)}]})}_addCheck(e){return new WE({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pE.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pE.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pE.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pE.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:pE.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}WE.create=e=>{var t;return new WE({checks:[],typeName:jS.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...bE(e)})};class $E extends wE{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==KT.boolean){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.boolean,received:t.parsedType}),iE}return sE(e.data)}}$E.create=e=>new $E({typeName:jS.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...bE(e)});class GE extends wE{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==KT.date){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.date,received:t.parsedType}),iE}if(isNaN(e.data.getTime())){return rE(this._getOrReturnCtx(e),{code:JT.invalid_date}),iE}const t=new aE;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),rE(n,{code:JT.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):HT.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new GE({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:pE.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:pE.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}GE.create=e=>new GE({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:jS.ZodDate,...bE(e)});class KE extends wE{_parse(e){if(this._getType(e)!==KT.symbol){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.symbol,received:t.parsedType}),iE}return sE(e.data)}}KE.create=e=>new KE({typeName:jS.ZodSymbol,...bE(e)});class YE extends wE{_parse(e){if(this._getType(e)!==KT.undefined){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.undefined,received:t.parsedType}),iE}return sE(e.data)}}YE.create=e=>new YE({typeName:jS.ZodUndefined,...bE(e)});class JE extends wE{_parse(e){if(this._getType(e)!==KT.null){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.null,received:t.parsedType}),iE}return sE(e.data)}}JE.create=e=>new JE({typeName:jS.ZodNull,...bE(e)});class XE extends wE{constructor(){super(...arguments),this._any=!0}_parse(e){return sE(e.data)}}XE.create=e=>new XE({typeName:jS.ZodAny,...bE(e)});class QE extends wE{constructor(){super(...arguments),this._unknown=!0}_parse(e){return sE(e.data)}}QE.create=e=>new QE({typeName:jS.ZodUnknown,...bE(e)});class eS extends wE{_parse(e){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.never,received:t.parsedType}),iE}}eS.create=e=>new eS({typeName:jS.ZodNever,...bE(e)});class tS extends wE{_parse(e){if(this._getType(e)!==KT.undefined){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.void,received:t.parsedType}),iE}return sE(e.data)}}tS.create=e=>new tS({typeName:jS.ZodVoid,...bE(e)});class nS extends wE{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==KT.array)return rE(t,{code:JT.invalid_type,expected:KT.array,received:t.parsedType}),iE;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(rE(t,{code:e?JT.too_big:JT.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(rE(t,{code:JT.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(rE(t,{code:JT.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new vE(t,e,t.path,n))))).then((e=>aE.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new vE(t,e,t.path,n))));return aE.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new nS({...this._def,minLength:{value:e,message:pE.toString(t)}})}max(e,t){return new nS({...this._def,maxLength:{value:e,message:pE.toString(t)}})}length(e,t){return new nS({...this._def,exactLength:{value:e,message:pE.toString(t)}})}nonempty(e){return this.min(1,e)}}function rS(e){if(e instanceof aS){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=xS.create(rS(r))}return new aS({...e._def,shape:()=>t})}return e instanceof nS?new nS({...e._def,type:rS(e.element)}):e instanceof xS?xS.create(rS(e.unwrap())):e instanceof kS?kS.create(rS(e.unwrap())):e instanceof lS?lS.create(e.items.map((e=>rS(e)))):e}nS.create=(e,t)=>new nS({type:e,minLength:null,maxLength:null,exactLength:null,typeName:jS.ZodArray,...bE(t)});class aS extends wE{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=HT.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==KT.object){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.object,received:t.parsedType}),iE}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof eS&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||i.push(e);const o=[];for(const e of a){const t=r[e],a=n.data[e];o.push({key:{status:"valid",value:e},value:t._parse(new vE(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof eS){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of i)o.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)i.length>0&&(rE(n,{code:JT.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const r=n.data[t];o.push({key:{status:"valid",value:t},value:e._parse(new vE(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of o){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>aE.mergeObjectSync(t,e))):aE.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return pE.errToObj,new aS({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,i,o;const s=null!==(i=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==i?i:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=pE.errToObj(e).message)&&void 0!==o?o:s}:{message:s}}}:{}})}strip(){return new aS({...this._def,unknownKeys:"strip"})}passthrough(){return new aS({...this._def,unknownKeys:"passthrough"})}extend(e){return new aS({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new aS({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:jS.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new aS({...this._def,catchall:e})}pick(e){const t={};return HT.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new aS({...this._def,shape:()=>t})}omit(e){const t={};return HT.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new aS({...this._def,shape:()=>t})}deepPartial(){return rS(this)}partial(e){const t={};return HT.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new aS({...this._def,shape:()=>t})}required(e){const t={};return HT.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof xS;)e=e._def.innerType;t[n]=e}})),new aS({...this._def,shape:()=>t})}keyof(){return vS(HT.objectKeys(this.shape))}}aS.create=(e,t)=>new aS({shape:()=>e,unknownKeys:"strip",catchall:eS.create(),typeName:jS.ZodObject,...bE(t)}),aS.strictCreate=(e,t)=>new aS({shape:()=>e,unknownKeys:"strict",catchall:eS.create(),typeName:jS.ZodObject,...bE(t)}),aS.lazycreate=(e,t)=>new aS({shape:e,unknownKeys:"strip",catchall:eS.create(),typeName:jS.ZodObject,...bE(t)});class iS extends wE{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new XT(e.ctx.common.issues)));return rE(t,{code:JT.invalid_union,unionErrors:n}),iE}));{let e;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},i=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new XT(e)));return rE(t,{code:JT.invalid_union,unionErrors:a}),iE}}get options(){return this._def.options}}iS.create=(e,t)=>new iS({options:e,typeName:jS.ZodUnion,...bE(t)});const oS=e=>e instanceof mS?oS(e.schema):e instanceof _S?oS(e.innerType()):e instanceof gS?[e.value]:e instanceof yS?e.options:e instanceof bS?HT.objectValues(e.enum):e instanceof TS?oS(e._def.innerType):e instanceof YE?[void 0]:e instanceof JE?[null]:e instanceof xS?[void 0,...oS(e.unwrap())]:e instanceof kS?[null,...oS(e.unwrap())]:e instanceof AS||e instanceof PS?oS(e.unwrap()):e instanceof ES?oS(e._def.innerType):[];class sS extends wE{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==KT.object)return rE(t,{code:JT.invalid_type,expected:KT.object,received:t.parsedType}),iE;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(rE(t,{code:JT.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),iE)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const n of t){const t=oS(n.shape[e]);if(!t.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));for(const a of t){if(r.has(a))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(a)));r.set(a,n)}}return new sS({typeName:jS.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...bE(n)})}}function cS(e,t){const n=YT(e),r=YT(t);if(e===t)return{valid:!0,data:e};if(n===KT.object&&r===KT.object){const n=HT.objectKeys(t),r=HT.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of r){const r=cS(e[n],t[n]);if(!r.valid)return{valid:!1};a[n]=r.data}return{valid:!0,data:a}}if(n===KT.array&&r===KT.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=cS(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===KT.date&&r===KT.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class uS extends wE{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(cE(e)||cE(r))return iE;const a=cS(e.value,r.value);return a.valid?((uE(e)||uE(r))&&t.dirty(),{status:t.value,value:a.data}):(rE(n,{code:JT.invalid_intersection_types}),iE)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((e=>{let[t,n]=e;return r(t,n)})):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}uS.create=(e,t,n)=>new uS({left:e,right:t,typeName:jS.ZodIntersection,...bE(n)});class lS extends wE{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==KT.array)return rE(n,{code:JT.invalid_type,expected:KT.array,received:n.parsedType}),iE;if(n.data.length<this._def.items.length)return rE(n,{code:JT.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),iE;!this._def.rest&&n.data.length>this._def.items.length&&(rE(n,{code:JT.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new vE(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>aE.mergeArray(t,e))):aE.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new lS({...this._def,rest:e})}}lS.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lS({items:e,typeName:jS.ZodTuple,rest:null,...bE(t)})};class dS extends wE{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==KT.object)return rE(n,{code:JT.invalid_type,expected:KT.object,received:n.parsedType}),iE;const r=[],a=this._def.keyType,i=this._def.valueType;for(const e in n.data)r.push({key:a._parse(new vE(n,e,n.path,e)),value:i._parse(new vE(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?aE.mergeObjectAsync(t,r):aE.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new dS(t instanceof wE?{keyType:e,valueType:t,typeName:jS.ZodRecord,...bE(n)}:{keyType:qE.create(),valueType:e,typeName:jS.ZodRecord,...bE(t)})}}class fS extends wE{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==KT.map)return rE(n,{code:JT.invalid_type,expected:KT.map,received:n.parsedType}),iE;const r=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(((e,t)=>{let[i,o]=e;return{key:r._parse(new vE(n,i,n.path,[t,"key"])),value:a._parse(new vE(n,o,n.path,[t,"value"]))}}));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of i){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return iE;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of i){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return iE;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}fS.create=(e,t,n)=>new fS({valueType:t,keyType:e,typeName:jS.ZodMap,...bE(n)});class hS extends wE{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==KT.set)return rE(n,{code:JT.invalid_type,expected:KT.set,received:n.parsedType}),iE;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(rE(n,{code:JT.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(rE(n,{code:JT.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function i(e){const n=new Set;for(const r of e){if("aborted"===r.status)return iE;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const o=[...n.data.values()].map(((e,t)=>a._parse(new vE(n,e,n.path,t))));return n.common.async?Promise.all(o).then((e=>i(e))):i(o)}min(e,t){return new hS({...this._def,minSize:{value:e,message:pE.toString(t)}})}max(e,t){return new hS({...this._def,maxSize:{value:e,message:pE.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}hS.create=(e,t)=>new hS({valueType:e,minSize:null,maxSize:null,typeName:jS.ZodSet,...bE(t)});class pS extends wE{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==KT.function)return rE(t,{code:JT.invalid_type,expected:KT.function,received:t.parsedType}),iE;function n(e,n){return nE({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,tE(),QT].filter((e=>!!e)),issueData:{code:JT.invalid_arguments,argumentsError:n}})}function r(e,n){return nE({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,tE(),QT].filter((e=>!!e)),issueData:{code:JT.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof wS){const e=this;return sE((async function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];const c=new XT([]),u=await e._def.args.parseAsync(o,a).catch((e=>{throw c.addIssue(n(o,e)),c})),l=await Reflect.apply(i,this,u);return await e._def.returns._def.type.parseAsync(l,a).catch((e=>{throw c.addIssue(r(l,e)),c}))}))}{const e=this;return sE((function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];const c=e._def.args.safeParse(o,a);if(!c.success)throw new XT([n(o,c.error)]);const u=Reflect.apply(i,this,c.data),l=e._def.returns.safeParse(u,a);if(!l.success)throw new XT([r(u,l.error)]);return l.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new pS({...this._def,args:lS.create(t).rest(QE.create())})}returns(e){return new pS({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new pS({args:e||lS.create([]).rest(QE.create()),returns:t||QE.create(),typeName:jS.ZodFunction,...bE(n)})}}class mS extends wE{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}mS.create=(e,t)=>new mS({getter:e,typeName:jS.ZodLazy,...bE(t)});class gS extends wE{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return rE(t,{received:t.data,code:JT.invalid_literal,expected:this._def.value}),iE}return{status:"valid",value:e.data}}get value(){return this._def.value}}function vS(e,t){return new yS({values:e,typeName:jS.ZodEnum,...bE(t)})}gS.create=(e,t)=>new gS({value:e,typeName:jS.ZodLiteral,...bE(t)});class yS extends wE{constructor(){super(...arguments),mE.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return rE(t,{expected:HT.joinValues(n),received:t.parsedType,code:JT.invalid_type}),iE}if(fE(this,mE,"f")||hE(this,mE,new Set(this._def.values),"f"),!fE(this,mE,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return rE(t,{received:t.data,code:JT.invalid_enum_value,options:n}),iE}return sE(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return yS.create(e,{...this._def,...t})}exclude(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return yS.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}mE=new WeakMap,yS.create=vS;class bS extends wE{constructor(){super(...arguments),gE.set(this,void 0)}_parse(e){const t=HT.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==KT.string&&n.parsedType!==KT.number){const e=HT.objectValues(t);return rE(n,{expected:HT.joinValues(e),received:n.parsedType,code:JT.invalid_type}),iE}if(fE(this,gE,"f")||hE(this,gE,new Set(HT.getValidEnumValues(this._def.values)),"f"),!fE(this,gE,"f").has(e.data)){const e=HT.objectValues(t);return rE(n,{received:n.data,code:JT.invalid_enum_value,options:e}),iE}return sE(e.data)}get enum(){return this._def.values}}gE=new WeakMap,bS.create=(e,t)=>new bS({values:e,typeName:jS.ZodNativeEnum,...bE(t)});class wS extends wE{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==KT.promise&&!1===t.common.async)return rE(t,{code:JT.invalid_type,expected:KT.promise,received:t.parsedType}),iE;const n=t.parsedType===KT.promise?t.data:Promise.resolve(t.data);return sE(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}wS.create=(e,t)=>new wS({type:e,typeName:jS.ZodPromise,...bE(t)});class _S extends wE{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===jS.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:e=>{rE(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===r.type){const e=r.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return iE;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?iE:"dirty"===r.status||"dirty"===t.value?oE(r.value):r}));{if("aborted"===t.value)return iE;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?iE:"dirty"===r.status||"dirty"===t.value?oE(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?iE:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?iE:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!lE(e))return e;const i=r.transform(e.value,a);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>lE(e)?Promise.resolve(r.transform(e.value,a)).then((e=>({status:t.value,value:e}))):e))}HT.assertNever(r)}}_S.create=(e,t,n)=>new _S({schema:e,typeName:jS.ZodEffects,effect:t,...bE(n)}),_S.createWithPreprocess=(e,t,n)=>new _S({schema:t,effect:{type:"preprocess",transform:e},typeName:jS.ZodEffects,...bE(n)});class xS extends wE{_parse(e){return this._getType(e)===KT.undefined?sE(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xS.create=(e,t)=>new xS({innerType:e,typeName:jS.ZodOptional,...bE(t)});class kS extends wE{_parse(e){return this._getType(e)===KT.null?sE(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}kS.create=(e,t)=>new kS({innerType:e,typeName:jS.ZodNullable,...bE(t)});class TS extends wE{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===KT.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}TS.create=(e,t)=>new TS({innerType:e,typeName:jS.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...bE(t)});class ES extends wE{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return dE(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new XT(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new XT(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ES.create=(e,t)=>new ES({innerType:e,typeName:jS.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...bE(t)});class SS extends wE{_parse(e){if(this._getType(e)!==KT.nan){const t=this._getOrReturnCtx(e);return rE(t,{code:JT.invalid_type,expected:KT.nan,received:t.parsedType}),iE}return{status:"valid",value:e.data}}}SS.create=e=>new SS({typeName:jS.ZodNaN,...bE(e)});const IS=Symbol("zod_brand");class AS extends wE{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class OS extends wE{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?iE:"dirty"===e.status?(t.dirty(),oE(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?iE:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new OS({in:e,out:t,typeName:jS.ZodPipeline})}}class PS extends wE{_parse(e){const t=this._def.innerType._parse(e),n=e=>(lE(e)&&(e.value=Object.freeze(e.value)),e);return dE(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function CS(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function RS(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return e?XE.create().superRefine(((r,a)=>{var i,o;const s=e(r);if(s instanceof Promise)return s.then((e=>{var i,o;if(!e){const e=CS(t,r),s=null===(o=null!==(i=e.fatal)&&void 0!==i?i:n)||void 0===o||o;a.addIssue({code:"custom",...e,fatal:s})}}));if(!s){const e=CS(t,r),s=null===(o=null!==(i=e.fatal)&&void 0!==i?i:n)||void 0===o||o;a.addIssue({code:"custom",...e,fatal:s})}})):XE.create()}PS.create=(e,t)=>new PS({innerType:e,typeName:jS.ZodReadonly,...bE(t)});const LS={object:aS.lazycreate};var jS;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(jS||(jS={}));const NS=qE.create,DS=VE.create,ZS=SS.create,MS=WE.create,US=$E.create,zS=GE.create,FS=KE.create,HS=YE.create,qS=JE.create,BS=XE.create,VS=QE.create,WS=eS.create,$S=tS.create,GS=nS.create,KS=aS.create,YS=aS.strictCreate,JS=iS.create,XS=sS.create,QS=uS.create,eI=lS.create,tI=dS.create,nI=fS.create,rI=hS.create,aI=pS.create,iI=mS.create,oI=gS.create,sI=yS.create,cI=bS.create,uI=wS.create,lI=_S.create,dI=xS.create,fI=kS.create,hI=_S.createWithPreprocess,pI=OS.create,mI={string:e=>qE.create({...e,coerce:!0}),number:e=>VE.create({...e,coerce:!0}),boolean:e=>$E.create({...e,coerce:!0}),bigint:e=>WE.create({...e,coerce:!0}),date:e=>GE.create({...e,coerce:!0})},gI=iE;var vI=Object.freeze({__proto__:null,defaultErrorMap:QT,setErrorMap:function(e){eE=e},getErrorMap:tE,makeIssue:nE,EMPTY_PATH:[],addIssueToContext:rE,ParseStatus:aE,INVALID:iE,DIRTY:oE,OK:sE,isAborted:cE,isDirty:uE,isValid:lE,isAsync:dE,get util(){return HT},get objectUtil(){return qT},ZodParsedType:KT,getParsedType:YT,ZodType:wE,datetimeRegex:UE,ZodString:qE,ZodNumber:VE,ZodBigInt:WE,ZodBoolean:$E,ZodDate:GE,ZodSymbol:KE,ZodUndefined:YE,ZodNull:JE,ZodAny:XE,ZodUnknown:QE,ZodNever:eS,ZodVoid:tS,ZodArray:nS,ZodObject:aS,ZodUnion:iS,ZodDiscriminatedUnion:sS,ZodIntersection:uS,ZodTuple:lS,ZodRecord:dS,ZodMap:fS,ZodSet:hS,ZodFunction:pS,ZodLazy:mS,ZodLiteral:gS,ZodEnum:yS,ZodNativeEnum:bS,ZodPromise:wS,ZodEffects:_S,ZodTransformer:_S,ZodOptional:xS,ZodNullable:kS,ZodDefault:TS,ZodCatch:ES,ZodNaN:SS,BRAND:IS,ZodBranded:AS,ZodPipeline:OS,ZodReadonly:PS,custom:RS,Schema:wE,ZodSchema:wE,late:LS,get ZodFirstPartyTypeKind(){return jS},coerce:mI,any:BS,array:GS,bigint:MS,boolean:US,date:zS,discriminatedUnion:XS,effect:lI,enum:sI,function:aI,instanceof:function(e){return RS((t=>t instanceof e),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"Input not instance of ".concat(e.name)})},intersection:QS,lazy:iI,literal:oI,map:nI,nan:ZS,nativeEnum:cI,never:WS,null:qS,nullable:fI,number:DS,object:KS,oboolean:()=>US().optional(),onumber:()=>DS().optional(),optional:dI,ostring:()=>NS().optional(),pipeline:pI,preprocess:hI,promise:uI,record:tI,set:rI,strictObject:YS,string:NS,symbol:FS,transformer:lI,tuple:eI,undefined:HS,union:JS,unknown:VS,void:$S,NEVER:gI,ZodIssueCode:JT,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:XT});const yI=()=>vI.function().args(vI.custom()).returns(vI.boolean().optional()),bI=vI.enum(["dev","test","uat","prod"]);var wI;vI.object({api:vI.string().refine((e=>!e.startsWith("http")),{message:"Just need host part in url"}),project:vI.string().min(1,"Missing value"),title:vI.string().min(1,"Missing value"),env:bI.or(vI.literal("")),version:vI.string(),enableSSL:vI.boolean(),messageCapacity:vI.number(),useSecret:vI.boolean(),secret:vI.string().refine((e=>!e),{message:"Secret is not allowed to be set manually"}),offline:vI.boolean(),serializeData:vI.boolean(),disabledPlugins:vI.array(vI.string()),dataProcessor:vI.object({console:yI(),network:yI(),storage:yI(),database:yI(),page:yI(),system:yI()}).partial().strict()}).partial().strict(),function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"}(wI||(wI={}));const _I=2e3,xI=Math.pow(1.5,4)*_I;class kI{getSocket(){return this.socketWrapper}updateRoomInfo(){if(this.getPageSpyConfig){var e;const{project:t,title:n,env:r,version:a}=this.getPageSpyConfig(),i=null===(e=this.getClient)||void 0===e?void 0:e.call(this).getName();this.send({type:Zx,content:{info:{name:i,group:t,tags:{title:n,name:i,group:t,env:r,version:a}}}},!0)}}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":[],"harbor-clear":[]}),t(this,"retryInterval",_I),t(this,"connectable",!0),t(this,"getPageSpyConfig",null),t(this,"getClient",null),this.addListener("atom-detail",kI.handleResolveAtom),this.addListener("atom-getter",kI.handleAtomPropertyGetter),this.addListener("debugger-online",this.handleFlushBuffer)}async init(e){try{var t,n,r,a,i;if(!e)throw Error("WebSocket url cannot be empty");this.socketWrapper.clearListeners(),this.socketWrapper.getState()===wI.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===(a=this.socketWrapper)||void 0===a||a.onError((()=>{this.connectOffline()})),this.socketUrl=e,null===(i=this.socketWrapper)||void 0===i||i.init(e)}catch(e){ig.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:Nx,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=_I,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<xI&&(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;kI.messageFilters.length&&kI.messageFilters.forEach((t=>{e=t(e)}));const{CONNECT:n,MESSAGE:r,ERROR:a,JOIN:i,PING:o,PONG:s,LEAVE:c,CLOSE:u,BROADCAST:l}=Ux,d=JSON.parse(e.data),{type:f}=d;switch(f){case n:const{selfConnection:e,roomConnections:o}=d.content;this.socketConnection=e,this.debuggerConnection=o.find((e=>"Debugger"===e.userId))||null;break;case i:case c:const{connection:s}=d.content;"Debugger"===s.userId&&(f===i?(this.debuggerConnection=s,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 a: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:jx,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:jx,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:a}=n;if("atom-detail"===r){const e=bT.get(a)||{};t(zx("atom-detail-".concat(a),e,!1))}}static handleAtomPropertyGetter(e,t){let{source:n}=e;const{type:r,data:a}=n;if("atom-getter"===r){const{id:e,parentId:n,key:r,instanceId:o}=a,s=bT.getOrigin(o),c=bT.getOrigin(n);let u={};var i;if(s&&c)u=null===(i=Object.getOwnPropertyDescriptor(c,r))||void 0===i||null===(i=i.get)||void 0===i?void 0:i.call(s);else u=new Error("Getter computed failed");t(zx("atom-getter-".concat(e),bT.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=Wm();const r=function(e){const{ok:t,value:n}=ng(e);return t?n:JSON.stringify(e,((e,t)=>ng(t).value),2)}(t);null===(n=this.socketWrapper)||void 0===n||n.send(r)}catch(e){ig.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()===wI.OPEN&&(!![Zx,Dx].includes(e.type)||!!this.debuggerConnection)}checkIfCache(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.isOffline&&!t&&![jx,Dx].includes(e.type)}sendClientInfo(){var e;const t=null===(e=this.getClient)||void 0===e?void 0:e.call(this).makeClientInfoMsg();this.broadcastMessage({role:"client",type:"client-info",data:t},!0)}}t(kI,"messageFilters",[]);const TI=function(){if(Vm()){const{lang:e}=document.documentElement;return e?Qm.some((t=>t===e)):Qm.some((e=>e===navigator.language))}return!1}()?"zh":"en";const EI=new class{constructor(e){t(this,"locales",void 0),t(this,"currentLang",void 0);const{locales:n,defaultLang:r=TI}=e;if(!n||0===Object.keys(n).length)throw new Error("[PageSpy] Locales cannot be empty");if(!n[r])throw new Error('[PageSpy] Language "'.concat(r,'" not found'));this.locales=n,this.currentLang=r}t(e,t){const n=t||this.currentLang,r=this.locales[n];return r?r[e]||e:(ig.warn("Language '".concat(n,"' not found, falling back to default")),e)}setLang(e){this.locales[e]?this.currentLang=e:ig.error("Language '".concat(e,"' is not supported"))}getCurrentLang(){return this.currentLang}getSupportedLangs(){return Object.keys(this.locales)}}({locales:{zh:{title:"离线日志",uploadPeriods:"上传时间段",downloadPeriods:"下载时间段",readying:"准备数据...",ready:"数据已就绪",success:"处理成功",fail:"处理失败",invalid:"无法上传",copied:"已复制调试连接",selectPeriod:"选择时间段",periodDuration:"每段时长",remark:"备注",remarkPlaceholder:"上传后,可以看到备注信息",from:"从",to:"到",refreshed:"已刷新",minutes:"分钟",eventCountNotEnough:"时间段内的数据量不足以回放",invalidPeriods:"选择的开始时间无效",invalidParams:"调用 onOfflineLog() 的参数不正确",copyUrl:"复制调试链接",copyFailed:"复制失败",paused:"已暂停",pausedInfoText:"暂停期间数据不会被记录",noData:"请先选择时间段"},en:{title:"Offline log",uploadPeriods:"Upload Periods",downloadPeriods:"Download Periods",readying:"Handling...",ready:"Ready",success:"Succeed",fail:"Failed",invalid:"Cannot upload",copied:"Replay url copied",selectPeriod:"Select period",periodDuration:"Each duration",remark:"Remark",remarkPlaceholder:"After uploading, you can view the remark information.",from:"From",to:"To",refreshed:"Refreshed",minutes:"minutes",eventCountNotEnough:"The data within the time period is insufficient for playback",invalidPeriods:"The start of selected period is invalid",invalidParams:"Incorrect params which you call onOfflineLog()",copyUrl:"Copy URL",copyFailed:"Copy failed",paused:"Paused",pausedInfoText:"Data will not be recorded during pause",noData:"Please select period"}}});let SI=0;const II="PERIOD_DIVIDE_IDENTIFIER",AI=10485760;class OI{constructor(e){var n;t(this,"stock",[]),t(this,"container",[]),t(this,"maximum",AI),t(this,"periodList",{stable:[],active:[]}),Km(n=null==e?void 0:e.maximum)&&n>=0&&(this.maximum=e.maximum),Vm()&&window.addEventListener("beforeunload",(()=>{this.stock.forEach((e=>{URL.revokeObjectURL(e)}))}))}add(e){const t=0===this.periodList.active.length&&0===this.stock.length&&0===this.container.length,n=e===II;try{if((t||n)&&(this.periodList.active.push({time:new Date,stockIndex:null,dataIndex:this.container.length}),n))return!0;if(0===this.maximum)return this.container.push(e),!0;const{size:r}=new Blob([JSON.stringify(e)],{type:"application/json"}),a=SI+r;if(a>=this.maximum){const t=URL.createObjectURL(new Blob([JSON.stringify(this.container)],{type:"application/json"}));this.stock.push(t),this.flushActivePeriod(),this.container=[e],SI=0}else this.container.push(e),SI=a;return!0}catch(e){return!1}}flushActivePeriod(){const e=this.periodList.active.map((e=>({...e,stockIndex:this.stock.length-1})));this.periodList.stable.push(...e),this.periodList.active=[]}getPeriodList(){const e={time:new Date,stockIndex:null,dataIndex:this.container.length};return[...this.periodList.stable,...this.periodList.active,e]}async getPeriodData(e){const{head:t,tail:n}=this.getHeadAndTailPeriods(e),{endTime:r}=e,{stockIndex:a=null,dataIndex:i}=t||{},{stockIndex:o=null,dataIndex:s}=n||{};let c=[];if(null===a&&null===o)c=this.container.slice(i,s);else{if(null===a)throw new Error(EI.t("invalidPeriods"));c=(await Promise.all(this.stock.map((async(e,t)=>{try{if(t<a||Km(o)&&t>o)return null;const n=await fetch(e);if(!n.ok)return null;const r=await n.json();return t===a?t===o?r.slice(i,s):r.slice(i):t===o?r.slice(0,s):r}catch(e){return null}})))).reduce(((e,t)=>t?e.concat(t):e),[]),Km(o)||(c=c.concat(this.container.slice(0,s)))}return c.filter((e=>e.timestamp<=r))}getHeadAndTailPeriods(e){let{startTime:t,endTime:n}=e;const r=this.getPeriodList(),a=r.findLast((e=>e.time.getTime()<=t)),i=r.find((e=>e.time.getTime()>=n));return{head:a,tail:i}}async getAll(){const e=await Promise.all(this.stock.map((async e=>{try{const t=await fetch(e);return t.ok?await t.json():null}catch(e){return null}})));return e.filter(Boolean).reduce(((e,t)=>e.concat(t)),[]).concat(this.container)}clear(){this.stock.forEach((e=>URL.revokeObjectURL(e))),this.stock=[],this.container=[],this.periodList={stable:[],active:[]}}}var PI=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()}},CI={"text/plain":"Text","text/html":"Url",default:"Text"};var RI=function(e,t){var n,r,a,i,o,s,c=!1;t||(t={}),n=t.debug||!1;try{if(a=PI(),i=document.createRange(),o=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.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 a=CI[t.format]||CI.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(s),i.selectNodeContents(s),o.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(a){n&&console.error("unable to copy using execCommand: ",a),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(a){n&&console.error("unable to copy using clipboardData: ",a),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{o&&("function"==typeof o.removeRange?o.removeRange(i):o.removeAllRanges()),s&&document.body.removeChild(s),a()}return c},LI=r(RI),jI="content-LZZnQ",NI="timeInfo-Icd9h",DI="recorder-BbZe0",ZI="paused-ByjEq",MI="duration-xNczp",UI="colon-layOC",zI="pauseIcon-3NXkY",FI="infoIcon-EKSZE",HI="pausedInfo-4u2DI",qI="pausedInfoText-FHdmg",BI="periodInfo-HnHms",VI="label-attmz",WI="periodTips-F91zM",$I="refreshIcon-9zYat",GI="selectPeriod-h8D6d",KI="track-g8egA",YI="range-cWHDf",JI="remarkInfo-0rspp",XI="result-CAAkx";!function(){const e=document.createElement("style");e.setAttribute("data-harbor-style","true"),e.textContent=".content-LZZnQ {\n  padding-top: var(--block-padding);\n}\n.timeInfo-Icd9h {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n.timeInfo-Icd9h .recorder-BbZe0 {\n  padding: var(--input-padding-lg);\n  font-size: var(--text-base);\n  border-radius: 999px;\n  transition: background-color 0.15s ease, transform 0.15s ease;\n  cursor: pointer;\n  -webkit-user-select: none;\n          user-select: none;\n  background-color: hsl(0, 0%, 94%);\n}\n.timeInfo-Icd9h .recorder-BbZe0:hover {\n  background-color: hsl(0, 0%, 90%);\n}\n.timeInfo-Icd9h .recorder-BbZe0:active {\n  transform: scale(0.95);\n}\n.timeInfo-Icd9h .recorder-BbZe0.paused-ByjEq > div:nth-child(1) {\n  display: none;\n}\n.timeInfo-Icd9h .recorder-BbZe0.paused-ByjEq > div:nth-child(2) {\n  display: flex;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div {\n  gap: var(--input-padding-lg);\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1) {\n  display: flex;\n  align-items: center;\n  position: relative;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1)::before {\n  content: '';\n  width: 1.07142857em;\n  height: 1.07142857em;\n  border-radius: 1.07142857em;\n  background-color: #ff0f0f;\n  animation: fade-uxQdC 0.8s ease-in-out infinite alternate;\n}\n@keyframes fade-uxQdC {\n  from {\n    opacity: 1;\n  }\n  to {\n    opacity: 0.05;\n  }\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1) .duration-xNczp {\n  display: flex;\n  align-items: center;\n  font-size: var(--text-3xl);\n  font-weight: 700;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1) .duration-xNczp span {\n  display: inline-flex;\n  justify-content: center;\n  align-items: center;\n  width: 0.64em;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1) .duration-xNczp span.colon-layOC {\n  width: 0.36em;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) {\n  display: none;\n  align-items: center;\n  color: var(--text-primary);\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) b {\n  color: var(--text-primary);\n  font-size: var(--text-3xl);\n  font-weight: 700;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) svg {\n  width: 1em;\n  height: 1em;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pauseIcon-3NXkY {\n  font-size: var(--text-3xl);\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .infoIcon-EKSZE {\n  font-size: var(--text-lg);\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI {\n  position: relative;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI:hover .pausedInfoText-FHdmg,\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI:active .pausedInfoText-FHdmg {\n  display: block;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI .pausedInfoText-FHdmg {\n  display: none;\n  position: absolute;\n  left: 0;\n  top: 0;\n  transform: translate(-65%, -170%);\n  white-space: nowrap;\n  font-size: var(--text-base);\n  color: var(--text-primary);\n  background-color: #fff;\n  padding: var(--input-padding-lg);\n  border-radius: 0.29em;\n  box-shadow: var(--dark-shadow);\n  z-index: 1;\n}\n.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI .pausedInfoText-FHdmg::before {\n  content: '';\n  position: absolute;\n  left: 65%;\n  bottom: 0;\n  transform: translate(0, 30%) rotate(45deg);\n  width: 0.86em;\n  height: 0.86em;\n  background-color: #fff;\n  border-radius: 2px;\n  z-index: -1;\n}\n.periodInfo-HnHms {\n  margin-top: 1.43em;\n}\n.periodInfo-HnHms .label-attmz {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  margin-bottom: 2.29em;\n}\n.periodInfo-HnHms .label-attmz .periodTips-F91zM {\n  display: flex;\n  align-items: center;\n  gap: var(--gap);\n}\n.periodInfo-HnHms .label-attmz .periodTips-F91zM b {\n  font-size: 1em;\n  color: var(--text-primary);\n}\n.periodInfo-HnHms .label-attmz .periodTips-F91zM span {\n  color: var(--text-secondary);\n  font-size: var(--text-sm);\n}\n.periodInfo-HnHms .label-attmz .refreshIcon-9zYat {\n  cursor: pointer;\n}\n.periodInfo-HnHms .label-attmz .refreshIcon-9zYat svg {\n  width: 1.71em;\n  height: 1.71em;\n  color: var(--primary-color);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d {\n  position: relative;\n  width: 92%;\n  margin: 0 auto;\n  --thumb-size: 1.71em;\n  --thumb-shadow: 0 0 0 5px var(--primary-color) inset, 0 0 0 99px white inset;\n  --thumb-shadow-hover: 0 0 0 7px var(--primary-color) inset,\n      0 0 0 99px white inset;\n  --thumb-shadow-disabled: 0 0 0 5px var(--disabled-color) inset,\n      0 0 0 99px white inset;\n  --track-size: calc(var(--thumb-size) / 2);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG {\n  cursor: not-allowed;\n}\n.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG .track-g8egA .range-cWHDf {\n  background-color: var(--disabled-color);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG input:disabled {\n  --thumb-shadow: var(--thumb-shadow-disabled);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG input:disabled::-webkit-slider-thumb {\n  cursor: not-allowed;\n}\n.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG input:disabled::-moz-range-thumb {\n  cursor: not-allowed;\n}\n.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG input:disabled::-ms-thumb {\n  cursor: not-allowed;\n}\n.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA {\n  width: 100%;\n  height: var(--track-size);\n  background-color: var(--divider-color);\n  border-radius: var(--track-size);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf {\n  --left: 0;\n  --right: 0;\n  --min-text: 'From';\n  --max-text: 'To';\n  position: absolute;\n  left: var(--left);\n  right: var(--right);\n  height: 100%;\n  background-color: var(--primary-color);\n  border-radius: var(--track-size);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf[data-min-text-position='bottom']::before {\n  top: calc(var(--thumb-size));\n}\n.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf[data-max-text-position='bottom']::after {\n  top: calc(var(--thumb-size));\n}\n.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf::before,\n.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf::after {\n  position: absolute;\n  top: calc(var(--thumb-size) * -1);\n  transition: top 0.15s ease-in-out;\n  font-size: var(--text-base);\n  font-weight: 500;\n  color: var(--text-placeholder);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf::before {\n  content: var(--min-text);\n  left: 0;\n  transform: translateX(-50%) scale(0.8);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf::after {\n  content: var(--max-text);\n  right: 0;\n  transform: translateX(50%) scale(0.8);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d input {\n  -webkit-appearance: none;\n          appearance: none;\n  pointer-events: none;\n  position: absolute;\n  left: calc(var(--track-size) * -1);\n  top: 0;\n  width: calc(100% + var(--thumb-size));\n  height: var(--track-size);\n  background-color: transparent;\n  z-index: 2;\n}\n.periodInfo-HnHms .selectPeriod-h8D6d input:hover {\n  --thumb-shadow: var(--thumb-shadow-hover);\n}\n.periodInfo-HnHms .selectPeriod-h8D6d input::-webkit-slider-thumb {\n  -webkit-appearance: none;\n          appearance: none;\n  pointer-events: auto;\n  width: var(--thumb-size);\n  height: var(--thumb-size);\n  border-radius: var(--thumb-size);\n  background-color: white;\n  box-shadow: var(--thumb-shadow);\n  cursor: grab;\n  -webkit-transition: 0.15s;\n  transition: 0.15s;\n  border: 0.14em solid white;\n}\n.periodInfo-HnHms .selectPeriod-h8D6d input::-moz-range-thumb {\n  appearance: none;\n  pointer-events: auto;\n  width: var(--thumb-size);\n  height: var(--thumb-size);\n  border-radius: var(--thumb-size);\n  background-color: white;\n  box-shadow: var(--thumb-shadow);\n  cursor: grab;\n  -moz-transition: 0.15s;\n  transition: 0.15s;\n  border: 0.14em solid white;\n}\n.periodInfo-HnHms .selectPeriod-h8D6d input::-ms-thumb {\n  appearance: none;\n  pointer-events: auto;\n  width: var(--thumb-size);\n  height: var(--thumb-size);\n  border-radius: var(--thumb-size);\n  background-color: white;\n  box-shadow: var(--thumb-shadow);\n  cursor: grab;\n  -ms-transition: 0.15s;\n  transition: 0.15s;\n  border: 0.14em solid white;\n}\n.remarkInfo-0rspp {\n  margin-top: 1.43em;\n}\n.remarkInfo-0rspp .label-attmz {\n  margin-bottom: 0.86em;\n  font-size: 1em;\n  font-weight: 700;\n  color: var(--text-primary);\n}\n.remarkInfo-0rspp textarea {\n  width: 100%;\n  padding: var(--input-padding);\n  background-color: hsl(0, 0%, 95%);\n  border-radius: 0.29em;\n  box-sizing: border-box;\n  border: var(--border);\n  outline: none;\n  color: var(--text-primary);\n  font-size: var(--text-base);\n  line-height: 1.5;\n  font-family: var(--font-family);\n}\n.remarkInfo-0rspp textarea:focus,\n.remarkInfo-0rspp textarea:active {\n  border-color: var(--primary-color);\n}\n.result-CAAkx {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  gap: var(--gap-lg);\n  padding-top: var(--gap-lg);\n  padding-bottom: var(--gap-lg);\n}\n.result-CAAkx svg {\n  width: 2.86em;\n  height: 2.86em;\n  color: var(--primary-color);\n}\n.result-CAAkx b {\n  font-size: var(--text-lg);\n}\n",window.dataHarborStyles&&Array.isArray(window.dataHarborStyles)||(window.dataHarborStyles=[]),window.dataHarborStyles.push(e)}();function QI(e){return e<10?.2:e<30?.16:.135}const eA=e=>{let{plugin:t,modal:n,toast:r}=e;const a=(new DOMParser).parseFromString('\n    \x3c!-- Add button for default modal --\x3e\n    <button class="page-spy-btn" data-dashed id="open-log-action">\n      '.concat('\n  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">\n    <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 21v-3m0 0H9.197c-1.118 0-1.678 0-2.105-.218a2 2 0 0 1-.874-.874C6 16.48 6 15.92 6 14.8V6m12 12h3M6 6H3m3 0V3m4 3h4.8c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.427.218.987.218 2.105V14"/>\n  </svg>',"\n      <span>").concat(EI.t("title"),'</span>\n    </button>\n\n    \x3c!-- Show modal content on button#open-log-action clicked --\x3e\n    <div class="').concat(jI,'">\n      <div class="').concat(NI,'">\n        <div class="').concat(DI,'">\n          <div>\n            <span class="').concat(MI,'">--</span>\n          </div>\n          <div>\n            <span class="').concat(zI,'">').concat('\n  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">\n    <path fill="currentColor"\n      d="M9 16h2V8H9zm4 0h2V8h-2zm-1 6q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8" />\n  </svg>  \n',"</span>\n            <b>").concat(EI.t("paused"),'</b>\n            <div class="').concat(HI,'">\n              <span class="').concat(FI,'">').concat('\n  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">\n    <path fill="currentColor"\n      d="M12.3 7.29c.2-.18.44-.29.7-.29c.27 0 .5.11.71.29c.19.21.29.45.29.71c0 .27-.1.5-.29.71c-.21.19-.44.29-.71.29c-.26 0-.5-.1-.7-.29c-.19-.21-.3-.44-.3-.71c0-.26.11-.5.3-.71m-2.5 4.68s2.17-1.72 2.96-1.79c.74-.06.59.79.52 1.23l-.01.06c-.14.53-.31 1.17-.48 1.78c-.38 1.39-.75 2.75-.66 3c.1.34.72-.09 1.17-.39c.06-.04.11-.08.16-.11c0 0 .08-.08.16.03c.02.03.04.06.06.08c.09.14.14.19.02.27l-.04.02c-.22.15-1.16.81-1.54 1.05c-.41.27-1.98 1.17-1.74-.58c.21-1.23.49-2.29.71-3.12c.41-1.5.59-2.18-.33-1.59c-.37.22-.59.36-.72.45c-.11.08-.12.08-.19-.05l-.03-.06l-.05-.08c-.07-.1-.07-.11.03-.2M22 12c0 5.5-4.5 10-10 10S2 17.5 2 12S6.5 2 12 2s10 4.5 10 10m-2 0c0-4.42-3.58-8-8-8s-8 3.58-8 8s3.58 8 8 8s8-3.58 8-8" />\n  </svg>\n','</span>\n              <div class="').concat(qI,'">\n                <span>').concat(EI.t("pausedInfoText"),'</span>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class="').concat(BI,'">\n        <div class="').concat(VI,'">\n          <div class="').concat(WI,'">\n            <b>').concat(EI.t("selectPeriod"),'</b>\n          </div>\n          <div class="').concat($I,'">').concat('\n  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">\n    <path fill="currentColor" d="M3.5 12q0-3.616 2.664-6.058T12.5 3.5v-.692q0-.242.217-.354t.43.03l2.163 1.62q.323.242.323.646t-.323.646l-2.164 1.62q-.212.142-.429.03t-.217-.354V6Q9.86 6 7.93 7.718T6 12q0 .883.247 1.713t.73 1.556q.217.323.167.69t-.348.583l-.407.298q-.373.293-.818.227t-.711-.444q-.668-1.017-1.014-2.2Q3.5 13.241 3.5 12m8 8.5v.692q0 .243-.217.354q-.217.112-.43-.03l-2.162-1.62q-.324-.242-.324-.646t.323-.646l2.164-1.62q.212-.142.429-.03t.217.354V18q2.64 0 4.57-1.718T18 12q0-.883-.247-1.722q-.247-.84-.73-1.566q-.217-.323-.167-.69t.348-.583l.407-.298q.373-.293.818-.225t.712.442q.661 1.036 1.01 2.21T20.5 12q0 3.616-2.664 6.058T11.5 20.5"/>\n  </svg>\n','</div>\n        </div>\n        <div class="').concat(GI,'">\n          <div class="').concat(KI,'">\n            <div class="').concat(YI,'"></div>\n          </div>\n          <input type="range" id="period-min" min="0" step="1" />\n          <input type="range" id="period-max" min="0" step="1" />\n        </div>\n      </div>\n      <div class="').concat(JI,'">\n        <div class="').concat(VI,'">').concat(EI.t("remark"),'</div>\n        <textarea rows="4" id="harbor-remark" placeholder="').concat(EI.t("remarkPlaceholder"),'"></textarea>\n      </div>\n    </div>\n\n    \x3c!-- Upload / Download log button --\x3e\n    <button class="page-spy-btn" data-primary id="upload-periods">\n      ').concat('\n  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">\n    <path fill="currentColor" d="M9.8 21.75q-3.425-.775-5.613-3.5T2 12t2.188-6.25T9.8 2.25q.475-.125.838.175t.362.8q0 .35-.2.625t-.55.35Q7.5 4.825 5.75 7T4 12t1.75 5t4.5 2.8q.35.075.55.35t.2.625q0 .5-.362.8t-.838.175m4.4 0q-.475.125-.837-.175t-.363-.8q0-.35.2-.625t.55-.35q.675-.15 1.313-.413t1.212-.637q.275-.2.613-.15t.587.3q.35.35.3.813t-.45.737q-.725.45-1.513.775t-1.612.525m4.7-4.25q-.25-.25-.3-.587t.15-.613q.375-.575.638-1.225t.412-1.325q.075-.35.35-.537t.625-.188q.5 0 .8.363t.175.837q-.2.825-.525 1.613t-.775 1.512q-.275.4-.737.45t-.813-.3m1.875-6.5q-.35 0-.625-.2t-.35-.55q-.15-.675-.413-1.312t-.637-1.213q-.2-.3-.15-.637t.3-.588q.35-.35.813-.3t.737.475q.45.725.775 1.513T21.75 9.8q.125.475-.175.838t-.8.362m-4.5-5.75q-.575-.375-1.212-.638T13.75 4.2q-.35-.075-.55-.35t-.2-.625q0-.5.363-.8t.837-.175q.825.2 1.613.525t1.512.775q.425.275.475.738t-.3.812q-.25.25-.587.3t-.638-.15M11.975 17q-.425 0-.712-.288T10.975 16v-5.125l-1.875 1.9q-.3.3-.712.3t-.713-.3t-.312-.712t.287-.713l3.625-3.65q.275-.275.7-.275t.7.275l3.575 3.575q.3.3.313.725t-.288.725t-.725.3t-.725-.3l-1.85-1.85V16q0 .425-.287.713t-.713.287"/>\n  </svg>\n',"\n      <span>").concat(EI.t("uploadPeriods"),'</span>\n    </button>\n    <button class="page-spy-btn" id="download-periods">\n      ').concat('\n  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">\n    <path fill="currentColor" d="M10.975 21.95q-1.9-.2-3.537-1.062t-2.838-2.2t-1.887-3.063t-.688-3.65q0-3.875 2.563-6.712T11 2v2q-3.025.425-5 2.688t-1.975 5.287T6 17.263t4.975 2.687zm1-4.95L6.95 11.95l1.425-1.425l2.6 2.6V7h2v6.125l2.575-2.575L16.975 12zm1 4.95v-2q1.075-.15 2.063-.575t1.837-1.075l1.45 1.45q-1.175.925-2.525 1.488t-2.825.712m3.95-16.3Q16.05 5 15.063 4.575T13 4V2q1.475.15 2.825.713t2.5 1.487zm2.8 12.65l-1.4-1.425q.65-.85 1.05-1.837t.55-2.063h2.05q-.2 1.475-.75 2.838t-1.5 2.487m.2-7.325q-.15-1.075-.55-2.062t-1.05-1.838l1.4-1.425q.95 1.125 1.525 2.488t.725 2.837z"/>\n  </svg>\n',"\n      <span>").concat(EI.t("downloadPeriods"),'</span>\n    </button>\n\n    \x3c!-- Result --\x3e\n    <div class="').concat(XI,'">\n      ').concat('\n  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">\n    <path fill="currentColor" fill-rule="evenodd"\n      d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m-1.177-7.86l-2.765-2.767L7 12.431l3.119 3.121a1 1 0 0 0 1.414 0l5.952-5.95l-1.062-1.062z" />\n  </svg>\n',"\n      <b>").concat(EI.t("success"),'</b>\n    </div>\n\n    <button class="page-spy-btn" data-primary id="copy-replay-url" data-url>\n      ').concat('\n  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">\n    <g fill="none" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">\n      <path\n        d="M7 9.667A2.667 2.667 0 0 1 9.667 7h8.666A2.667 2.667 0 0 1 21 9.667v8.666A2.667 2.667 0 0 1 18.333 21H9.667A2.667 2.667 0 0 1 7 18.333z" />\n      <path d="M4.012 16.737A2 2 0 0 1 3 15V5c0-1.1.9-2 2-2h10c.75 0 1.158.385 1.5 1" />\n    </g>\n  </svg>\n',"\n      <span>").concat(EI.t("copyUrl"),"</span>\n    </button>\n    "),"text/html"),i=e=>a.querySelector.call(a,e),o=e=>i(".".concat(e)),s=i("#open-log-action"),c=o(jI),u=o($I),l=o(YI),d=i("#period-min"),f=i("#period-max"),h=i("#harbor-remark"),p=i("#upload-periods"),m=i("#download-periods"),g=o(XI),v=i("#copy-replay-url"),y=o(DI),b=o(MI),w=o(HI),_={max:0,periods:[],firstTime:0,lastTime:0},x=()=>{const{max:e}=_,t=+d.value,n=+f.value,r=t/e,a=1-n/e;l.style.setProperty("--left","".concat((100*r).toFixed(3),"%")),l.style.setProperty("--right","".concat((100*a).toFixed(3),"%")),l.style.setProperty("--min-text",'"'.concat(Lx(t),'"')),l.style.setProperty("--max-text",'"'.concat(Lx(n),'"'))},k=()=>{const e=t.harbor.getPeriodList(),n=e[0].time.getTime(),r=e[e.length-1].time.getTime(),a=Math.floor((r-n)/1e3),i=a.toString();d.max=i,d.value="0",f.max=i,f.value=i,_.max=a,_.periods=e,_.firstTime=n,_.lastTime=r,x()},T=()=>{const{firstTime:e}=_;return{startTime:e+1e3*+d.value,endTime:e+1e3*+f.value,remark:h.value}};u.addEventListener("click",(()=>{k(),r.message(EI.t("refreshed"))})),d.addEventListener("input",(function(){const e=+f.value,t=+this.value;if(t>e-1)return void(d.value=String(e-1));(e-t)/_.max<=QI(_.max)?l.dataset.maxTextPosition="bottom":l.dataset.maxTextPosition="top",l.dataset.minTextPosition="top",x()})),f.addEventListener("input",(function(){const e=+d.value,t=+this.value;if(t<e+1)return void(f.value=String(e+1));(t-e)/_.max<=QI(_.max)?l.dataset.minTextPosition="bottom":l.dataset.minTextPosition="top",l.dataset.maxTextPosition="top",x()})),v.addEventListener("click",(()=>{const{url:e}=v.dataset,t=LI(e);r.message(t?EI.t("copied"):EI.t("copyFailed")),n.close()})),p.addEventListener("click",(async()=>{try{p.disabled=!0;const e=await t.onOfflineLog("upload-periods",T());v.dataset.url=e,n.show({content:g,footer:[v]})}catch(e){ig.error(e),r.message(e.message)}finally{p.disabled=!1}})),m.addEventListener("click",(async()=>{try{m.disabled=!0,await t.onOfflineLog("download-periods",T()),r.message(EI.t("success"))}catch(e){ig.error(e),r.message(e.message)}finally{m.disabled=!1}}));let E=null;const S=()=>{const{isPaused:e,startTimestamp:n}=t;if(e)y.classList.add(ZI);else if(y.classList.remove(ZI),n&&b){const e=parseInt(String((Date.now()-n)/1e3),10);b.innerHTML=Lx(e).split("").map((e=>'<span class="'.concat(":"===e?UI:"duration-item",'">').concat(e,"</span>"))).join("")}};y.addEventListener("click",(()=>{t.isPaused?t.resume():t.pause(),S()})),w.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()})),null==s||s.addEventListener("click",(()=>{var e;null!==(e=t.$pageSpyConfig)&&void 0!==e&&e.api?p.disabled=!1:p.disabled=!0,E&&clearInterval(E),S(),E=setInterval(S,1e3),k(),n.show({content:c,footer:[p,m]})})),n.build({footer:[...n.config.footer,s]})},tA={maximum:AI,caredData:{console:!0,network:!0,storage:!0,system:!0,"rrweb-event":!0},filename:()=>(new Date).toLocaleString(),onDownload:null,onAfterUpload:null};class nA{constructor(e){t(this,"enforce","pre"),t(this,"name","DataHarborPlugin"),t(this,"apiBase",""),t(this,"isPaused",!1),t(this,"startTimestamp",0),t(this,"periodTimer",null),t(this,"$socketStore",null),t(this,"$pageSpyConfig",null),this.$harborConfig={...tA,...e},this.harbor=new OI({maximum:this.$harborConfig.maximum})}async onInit(e){let{socketStore:t,config:n}=e;if(nA.hasInited)return;nA.hasInited=!0,this.$pageSpyConfig=n,this.$socketStore=t;const{api:r,enableSSL:a,offline:i,lang:o}=n;if(o&&EI.setLang(o),i||r){const e=a?"https://":"http://";this.apiBase=og("".concat(e).concat(r))}else ig.warn("Cannot upload log to PageSpy for miss 'api' configuration. See: ",n);this.initPeriodTimer(),this.$socketStore.addListener("public-data",(e=>{if(this.isPaused||!this.isCaredPublicData(e))return;const t=((e,t)=>(sessionStorage.getItem("harbor-debug")&&ig.unproxy.debug("harbor-debug",t),{type:e,timestamp:Date.now(),data:Cx(t)}))(e.type,e.data);this.startTimestamp||(this.startTimestamp=t.timestamp);this.harbor.add(t)||ig.warn("[".concat(this.name,"] Fail to save data in harbor "),t)}))}initPeriodTimer(){this.periodTimer&&clearInterval(this.periodTimer),this.periodTimer=setInterval((()=>{var e;this.harbor.add(II),null===(e=this.$socketStore)||void 0===e||e.dispatchEvent("harbor-clear",null)}),3e5)}onMounted(e){var t;let{modal:n,toast:r,root:a}=e;nA.hasMounted||(nA.hasMounted=!0,null===(t=window.dataHarborStyles)||void 0===t||t.forEach((e=>{a.appendChild(e.cloneNode(!0))})),n&&r&&eA({plugin:this,modal:n,toast:r}))}async getParams(e,t){var n;let r;if(["download-periods","upload-periods"].includes(e)){if(!(e=>!!e&&["startTime","endTime"].every((t=>Object.prototype.hasOwnProperty.call(e,t))))(t)||t.startTime>t.endTime)throw new Error(EI.t("invalidParams"));if(r=await this.harbor.getPeriodData(t),!r.length)throw new Error(EI.t("noData"));const e=t.startTime,n=r[0].timestamp,a=e<n?n:e,i=r.filter((e=>e.timestamp>=a&&e.timestamp<=t.endTime)).length;if(i<5)throw new Error(EI.t("eventCountNotEnough"));r.push({type:"meta",timestamp:t.endTime,data:Cx({ua:navigator.userAgent,title:document.title,url:window.location.href,...t,startTime:a})})}else{var a;if(r=await this.harbor.getAll(),!r.length)throw new Error(EI.t("noData"));const e=r[0].timestamp,n=r[r.length-1].timestamp;r.push({type:"meta",timestamp:n,data:Cx({ua:navigator.userAgent,title:document.title,url:window.location.href,startTime:e,endTime:n,remark:null!==(a=null==t?void 0:t.remark)&&void 0!==a?a:""})})}const{onDownload:i,filename:o}=this.$harborConfig;if("download"===e||"download-periods"===e)return{data:r,filename:o,customDownload:i};const{project:s="",title:c=""}=this.$pageSpyConfig||{},u={project:s,title:c,deviceId:Ox(),userAgent:navigator.userAgent,remark:null!==(n=null==t?void 0:t.remark)&&void 0!==n?n:""};if("upload"===e||"upload-periods"===e){const e=((e,t)=>{const n=new Blob([JSON.stringify(e)],{type:"application/json"});return new File([n],"".concat(Px(t),".json"),{type:"application/json"})})(r,o()),t=new FormData;return t.append("log",e),{url:"".concat(this.apiBase,"/api/v1/log/upload?").concat(new URLSearchParams(u).toString()),body:t}}}async onOfflineLog(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{clearCache:!0,remark:""};const n=await this.getParams(e,t),r=["upload","upload-periods"].includes(e)?await(async e=>{let{url:t,body:n}=e;try{const e=await fetch(t,{method:"POST",body:n});if(!e.ok)return ig.warn("Upload failed"),null;const r=await e.json();return r.success?r:(ig.warn(r.message),null)}catch(e){return ig.error(e.message),null}})(n):await(async e=>{let{data:t,filename:n,customDownload:r}=e;if(r)return void await r(t);const a=new Blob([JSON.stringify(t)],{type:"application/json"}),i=document.getElementsByTagName("body")[0]||document.documentElement;if(!i)throw new Error("Download file failed because cannot find the document.body & document.documentElement");const o=URL.createObjectURL(a),s=document.createElement("a");s.download="".concat(Px(n()),".json"),s.href=o,s.style.display="none",i.insertAdjacentElement("beforeend",s),s.click(),i.removeChild(s),URL.revokeObjectURL(o),ig.info("".concat(EI.t("success")))})(n);if(!0===t.clearCache&&this.clearAndNotify(),r){var a,i;const e=this.getDebugUrl(r);return null===(a=(i=this.$harborConfig).onAfterUpload)||void 0===a||a.call(i,e,n.remark),e}}async upload(e){return await this.onOfflineLog("upload",e)}async uploadPeriods(e){return await this.onOfflineLog("upload-periods",e)}async download(e){await this.onOfflineLog("download",e)}async downloadPeriods(e){await this.onOfflineLog("download-periods",e)}onReset(){this.periodTimer&&(clearInterval(this.periodTimer),this.periodTimer=null),this.clearAndNotify(!1),nA.hasInited=!1,nA.hasMounted=!1}pause(){this.isPaused=!0}resume(){this.isPaused=!1}reharbor(){this.initPeriodTimer(),this.clearAndNotify(),this.isPaused&&(this.isPaused=!1)}clearAndNotify(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];var t;(this.harbor.clear(),this.startTimestamp=0,e)&&(null===(t=this.$socketStore)||void 0===t||t.dispatchEvent("harbor-clear",null))}isCaredPublicData(e){if(!e)return!1;const{type:t}=e,{caredData:n}=this.$harborConfig;switch(t){case"console":case"storage":case"system":case"rrweb-event":return n[t];case"network":const{url:r}=e.data,a=this.harbor.stock.includes(r);return!(!n.network||a);default:return!1}}getDebugUrl(e){var t;if(!e||!e.success)return"";const n="".concat(og(null===(t=this.$pageSpyConfig)||void 0===t?void 0:t.clientOrigin),"/#/replay"),r="".concat(this.apiBase,"/api/v1/log/download?fileId=").concat(e.data.fileId);return"".concat(n,"?url=").concat(r)}}return t(nA,"hasInited",!1),t(nA,"hasMounted",!1),nA}();
//# sourceMappingURL=index.min.js.map