@tachybase/plugin-pagespy 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/PageSpy.d.ts +1 -0
- package/dist/client/PageSpyPane.d.ts +1 -0
- package/dist/client/PageSpyProvider.d.ts +10 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +939 -0
- package/dist/client/locale.d.ts +7 -0
- package/dist/client/plugin.d.ts +5 -0
- package/dist/client/styles.d.ts +3 -0
- package/dist/externalVersion.js +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/locale/en-US.json +4 -0
- package/dist/locale/zh-CN.json +4 -0
- package/dist/server/collections/pagespy.d.ts +3 -0
- package/dist/server/collections/pagespy.js +44 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +33 -0
- package/dist/server/plugin.d.ts +5 -0
- package/dist/server/plugin.js +50 -0
- package/package.json +25 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,939 @@
|
|
|
1
|
+
(function(tr,er){typeof exports=="object"&&typeof module!="undefined"?er(exports,require("@tachybase/client"),require("react/jsx-runtime"),require("@ant-design/icons"),require("antd"),require("react"),require("react-dom"),require("@tachybase/schema"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","react/jsx-runtime","@ant-design/icons","antd","react","react-dom","@tachybase/schema","lodash"],er):(tr=typeof globalThis!="undefined"?globalThis:tr||self,er(tr["@tachybase/plugin-pagespy"]={},tr["@tachybase/client"],tr.jsxRuntime,tr["@ant-design/icons"],tr.antd,tr.react,tr["react-dom"],tr["@tachybase/schema"],tr.lodash))})(this,function(exports,client,jsxRuntime,icons,antd,react,reactDom,schema$2,lodash){"use strict";var yo=Object.defineProperty,$o=Object.defineProperties;var vo=Object.getOwnPropertyDescriptors;var Fa=Object.getOwnPropertySymbols;var Ja=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable;var Xa=(tr,er,rr)=>er in tr?yo(tr,er,{enumerable:!0,configurable:!0,writable:!0,value:rr}):tr[er]=rr,ur=(tr,er)=>{for(var rr in er||(er={}))Ja.call(er,rr)&&Xa(tr,rr,er[rr]);if(Fa)for(var rr of Fa(er))eo.call(er,rr)&&Xa(tr,rr,er[rr]);return tr},br=(tr,er)=>$o(tr,vo(er));var to=(tr,er)=>{var rr={};for(var nr in tr)Ja.call(tr,nr)&&er.indexOf(nr)<0&&(rr[nr]=tr[nr]);if(tr!=null&&Fa)for(var nr of Fa(tr))er.indexOf(nr)<0&&eo.call(tr,nr)&&(rr[nr]=tr[nr]);return rr};var Dr=(tr,er,rr)=>new Promise((nr,ar)=>{var sr=cr=>{try{or(rr.next(cr))}catch(lr){ar(lr)}},ir=cr=>{try{or(rr.throw(cr))}catch(lr){ar(lr)}},or=cr=>cr.done?nr(cr.value):Promise.resolve(cr.value).then(sr,ir);or((rr=rr.apply(tr,er)).next())});const NAMESPACE="@tachybase/plugin-pagespy";function useTranslation(){return{t:(er,rr={})=>client.i18n.t(er,ur({ns:NAMESPACE},rr))}}function lang(tr,er={}){return client.i18n.t(tr,br(ur({},er),{ns:NAMESPACE}))}function _toPrimitive(tr,er){if(typeof tr!="object"||!tr)return tr;var rr=tr[Symbol.toPrimitive];if(rr!==void 0){var nr=rr.call(tr,er);if(typeof nr!="object")return nr;throw new TypeError("@@toPrimitive must return a primitive value.")}return(er==="string"?String:Number)(tr)}function _toPropertyKey(tr){var er=_toPrimitive(tr,"string");return typeof er=="symbol"?er:er+""}function _defineProperty(tr,er,rr){return(er=_toPropertyKey(er))in tr?Object.defineProperty(tr,er,{value:rr,enumerable:!0,configurable:!0,writable:!0}):tr[er]=rr,tr}var commonjsGlobal=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function getDefaultExportFromCjs(tr){return tr&&tr.__esModule&&Object.prototype.hasOwnProperty.call(tr,"default")?tr.default:tr}var check=function(tr){return tr&&tr.Math==Math&&tr},global$q=check(typeof globalThis=="object"&&globalThis)||check(typeof window=="object"&&window)||check(typeof self=="object"&&self)||check(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||commonjsGlobal||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$s=function(tr){try{return!!tr()}catch(er){return!0}},fails$r=fails$s,descriptors=!fails$r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),fails$q=fails$s,functionBindNative=!fails$q(function(){var tr=(function(){}).bind();return typeof tr!="function"||tr.hasOwnProperty("prototype")}),NATIVE_BIND$3=functionBindNative,call$i=Function.prototype.call,functionCall=NATIVE_BIND$3?call$i.bind(call$i):function(){return call$i.apply(call$i,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$3=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$3&&!$propertyIsEnumerable.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function(tr){var er=getOwnPropertyDescriptor$3(this,tr);return!!er&&er.enumerable}:$propertyIsEnumerable;var createPropertyDescriptor$7=function(tr,er){return{enumerable:!(1&tr),configurable:!(2&tr),writable:!(4&tr),value:er}},NATIVE_BIND$2=functionBindNative,FunctionPrototype$2=Function.prototype,call$h=FunctionPrototype$2.call,uncurryThisWithBind=NATIVE_BIND$2&&FunctionPrototype$2.bind.bind(call$h,call$h),functionUncurryThis=NATIVE_BIND$2?uncurryThisWithBind:function(tr){return function(){return call$h.apply(tr,arguments)}},uncurryThis$z=functionUncurryThis,toString$a=uncurryThis$z({}.toString),stringSlice$8=uncurryThis$z("".slice),classofRaw$2=function(tr){return stringSlice$8(toString$a(tr),8,-1)},uncurryThis$y=functionUncurryThis,fails$p=fails$s,classof$a=classofRaw$2,$Object$4=Object,split$3=uncurryThis$y("".split),indexedObject=fails$p(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(tr){return classof$a(tr)=="String"?split$3(tr,""):$Object$4(tr)}:$Object$4,isNullOrUndefined$5=function(tr){return tr==null},isNullOrUndefined$4=isNullOrUndefined$5,$TypeError$h=TypeError,requireObjectCoercible$5=function(tr){if(isNullOrUndefined$4(tr))throw $TypeError$h("Can't call method on "+tr);return tr},IndexedObject$2=indexedObject,requireObjectCoercible$4=requireObjectCoercible$5,toIndexedObject$5=function(tr){return IndexedObject$2(requireObjectCoercible$4(tr))},documentAll$2=typeof document=="object"&&document.all,IS_HTMLDDA=documentAll$2===void 0&&documentAll$2!==void 0,documentAll_1={all:documentAll$2,IS_HTMLDDA},$documentAll$1=documentAll_1,documentAll$1=$documentAll$1.all,isCallable$o=$documentAll$1.IS_HTMLDDA?function(tr){return typeof tr=="function"||tr===documentAll$1}:function(tr){return typeof tr=="function"},isCallable$n=isCallable$o,$documentAll=documentAll_1,documentAll=$documentAll.all,isObject$a=$documentAll.IS_HTMLDDA?function(tr){return typeof tr=="object"?tr!==null:isCallable$n(tr)||tr===documentAll}:function(tr){return typeof tr=="object"?tr!==null:isCallable$n(tr)},global$p=global$q,isCallable$m=isCallable$o,aFunction=function(tr){return isCallable$m(tr)?tr:void 0},getBuiltIn$a=function(tr,er){return arguments.length<2?aFunction(global$p[tr]):global$p[tr]&&global$p[tr][er]},uncurryThis$x=functionUncurryThis,objectIsPrototypeOf=uncurryThis$x({}.isPrototypeOf),engineUserAgent=typeof navigator!="undefined"&&String(navigator.userAgent)||"",global$o=global$q,userAgent=engineUserAgent,process$1=global$o.process,Deno$1=global$o.Deno,versions=process$1&&process$1.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,match,version$1;v8&&(match=v8.split("."),version$1=match[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version$1&&userAgent&&(match=userAgent.match(/Edge\/(\d+)/),(!match||match[1]>=74)&&(match=userAgent.match(/Chrome\/(\d+)/),match&&(version$1=+match[1])));var engineV8Version=version$1,V8_VERSION=engineV8Version,fails$o=fails$s,global$n=global$q,$String$6=global$n.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$o(function(){var tr=Symbol();return!$String$6(tr)||!(Object(tr)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$3=symbolConstructorDetection,useSymbolAsUid=NATIVE_SYMBOL$3&&!Symbol.sham&&typeof Symbol.iterator=="symbol",getBuiltIn$9=getBuiltIn$a,isCallable$l=isCallable$o,isPrototypeOf$3=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$3=USE_SYMBOL_AS_UID$1?function(tr){return typeof tr=="symbol"}:function(tr){var er=getBuiltIn$9("Symbol");return isCallable$l(er)&&isPrototypeOf$3(er.prototype,$Object$3(tr))},$String$5=String,tryToString$3=function(tr){try{return $String$5(tr)}catch(er){return"Object"}},isCallable$k=isCallable$o,tryToString$2=tryToString$3,$TypeError$g=TypeError,aCallable$7=function(tr){if(isCallable$k(tr))return tr;throw $TypeError$g(tryToString$2(tr)+" is not a function")},aCallable$6=aCallable$7,isNullOrUndefined$3=isNullOrUndefined$5,getMethod$4=function(tr,er){var rr=tr[er];return isNullOrUndefined$3(rr)?void 0:aCallable$6(rr)},call$g=functionCall,isCallable$j=isCallable$o,isObject$9=isObject$a,$TypeError$f=TypeError,ordinaryToPrimitive$1=function(tr,er){var rr,nr;if(er==="string"&&isCallable$j(rr=tr.toString)&&!isObject$9(nr=call$g(rr,tr))||isCallable$j(rr=tr.valueOf)&&!isObject$9(nr=call$g(rr,tr))||er!=="string"&&isCallable$j(rr=tr.toString)&&!isObject$9(nr=call$g(rr,tr)))return nr;throw $TypeError$f("Can't convert object to primitive value")},shared$4={exports:{}},isPure=!1,global$m=global$q,defineProperty$8=Object.defineProperty,defineGlobalProperty$3=function(tr,er){try{defineProperty$8(global$m,tr,{value:er,configurable:!0,writable:!0})}catch(rr){global$m[tr]=er}return er},global$l=global$q,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$l[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$4.exports=function(tr,er){return store$2[tr]||(store$2[tr]=er!==void 0?er:{})})("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 sharedExports=shared$4.exports,requireObjectCoercible$3=requireObjectCoercible$5,$Object$2=Object,toObject$8=function(tr){return $Object$2(requireObjectCoercible$3(tr))},uncurryThis$w=functionUncurryThis,toObject$7=toObject$8,hasOwnProperty$1=uncurryThis$w({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(tr,er){return hasOwnProperty$1(toObject$7(tr),er)},uncurryThis$v=functionUncurryThis,id=0,postfix=Math.random(),toString$9=uncurryThis$v(1 .toString),uid$2=function(tr){return"Symbol("+(tr===void 0?"":tr)+")_"+toString$9(++id+postfix,36)},global$k=global$q,shared$3=sharedExports,hasOwn$d=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL$2=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$1=global$k.Symbol,WellKnownSymbolsStore=shared$3("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1.for||Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$g=function(tr){return hasOwn$d(WellKnownSymbolsStore,tr)||(WellKnownSymbolsStore[tr]=NATIVE_SYMBOL$2&&hasOwn$d(Symbol$1,tr)?Symbol$1[tr]:createWellKnownSymbol("Symbol."+tr)),WellKnownSymbolsStore[tr]},call$f=functionCall,isObject$8=isObject$a,isSymbol$2=isSymbol$3,getMethod$3=getMethod$4,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$f=wellKnownSymbol$g,$TypeError$e=TypeError,TO_PRIMITIVE=wellKnownSymbol$f("toPrimitive"),toPrimitive$1=function(tr,er){if(!isObject$8(tr)||isSymbol$2(tr))return tr;var rr,nr=getMethod$3(tr,TO_PRIMITIVE);if(nr){if(er===void 0&&(er="default"),rr=call$f(nr,tr,er),!isObject$8(rr)||isSymbol$2(rr))return rr;throw $TypeError$e("Can't convert object to primitive value")}return er===void 0&&(er="number"),ordinaryToPrimitive(tr,er)},toPrimitive=toPrimitive$1,isSymbol$1=isSymbol$3,toPropertyKey$3=function(tr){var er=toPrimitive(tr,"string");return isSymbol$1(er)?er:er+""},global$j=global$q,isObject$7=isObject$a,document$1=global$j.document,EXISTS$1=isObject$7(document$1)&&isObject$7(document$1.createElement),documentCreateElement$2=function(tr){return EXISTS$1?document$1.createElement(tr):{}},DESCRIPTORS$k=descriptors,fails$n=fails$s,createElement=documentCreateElement$2,ie8DomDefine=!DESCRIPTORS$k&&!fails$n(function(){return Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a!=7}),DESCRIPTORS$j=descriptors,call$e=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$6=createPropertyDescriptor$7,toIndexedObject$4=toIndexedObject$5,toPropertyKey$2=toPropertyKey$3,hasOwn$c=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$j?$getOwnPropertyDescriptor$1:function(tr,er){if(tr=toIndexedObject$4(tr),er=toPropertyKey$2(er),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(tr,er)}catch(rr){}if(hasOwn$c(tr,er))return createPropertyDescriptor$6(!call$e(propertyIsEnumerableModule$1.f,tr,er),tr[er])};var objectDefineProperty={},DESCRIPTORS$i=descriptors,fails$m=fails$s,v8PrototypeDefineBug=DESCRIPTORS$i&&fails$m(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),isObject$6=isObject$a,$String$4=String,$TypeError$d=TypeError,anObject$g=function(tr){if(isObject$6(tr))return tr;throw $TypeError$d($String$4(tr)+" is not an object")},DESCRIPTORS$h=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$f=anObject$g,toPropertyKey$1=toPropertyKey$3,$TypeError$c=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable";objectDefineProperty.f=DESCRIPTORS$h?V8_PROTOTYPE_DEFINE_BUG$1?function(tr,er,rr){if(anObject$f(tr),er=toPropertyKey$1(er),anObject$f(rr),typeof tr=="function"&&er==="prototype"&&"value"in rr&&WRITABLE in rr&&!rr[WRITABLE]){var nr=$getOwnPropertyDescriptor(tr,er);nr&&nr[WRITABLE]&&(tr[er]=rr.value,rr={configurable:CONFIGURABLE$1 in rr?rr[CONFIGURABLE$1]:nr[CONFIGURABLE$1],enumerable:ENUMERABLE in rr?rr[ENUMERABLE]:nr[ENUMERABLE],writable:!1})}return $defineProperty(tr,er,rr)}:$defineProperty:function(tr,er,rr){if(anObject$f(tr),er=toPropertyKey$1(er),anObject$f(rr),IE8_DOM_DEFINE)try{return $defineProperty(tr,er,rr)}catch(nr){}if("get"in rr||"set"in rr)throw $TypeError$c("Accessors not supported");return"value"in rr&&(tr[er]=rr.value),tr};var DESCRIPTORS$g=descriptors,definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$5=createPropertyDescriptor$7,createNonEnumerableProperty$9=DESCRIPTORS$g?function(tr,er,rr){return definePropertyModule$4.f(tr,er,createPropertyDescriptor$5(1,rr))}:function(tr,er,rr){return tr[er]=rr,tr},makeBuiltIn$3={exports:{}},DESCRIPTORS$f=descriptors,hasOwn$b=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$f&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$b(FunctionPrototype$1,"name"),PROPER=EXISTS&&(function(){}).name==="something",CONFIGURABLE=EXISTS&&(!DESCRIPTORS$f||DESCRIPTORS$f&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={PROPER,CONFIGURABLE},uncurryThis$u=functionUncurryThis,isCallable$i=isCallable$o,store$1=sharedStore,functionToString=uncurryThis$u(Function.toString);isCallable$i(store$1.inspectSource)||(store$1.inspectSource=function(tr){return functionToString(tr)});var inspectSource$2=store$1.inspectSource,global$i=global$q,isCallable$h=isCallable$o,WeakMap$2=global$i.WeakMap,weakMapBasicDetection=isCallable$h(WeakMap$2)&&/native code/.test(String(WeakMap$2)),shared$2=sharedExports,uid=uid$2,keys$2=shared$2("keys"),sharedKey$3=function(tr){return keys$2[tr]||(keys$2[tr]=uid(tr))},hiddenKeys$4={},NATIVE_WEAK_MAP=weakMapBasicDetection,global$h=global$q,isObject$5=isObject$a,createNonEnumerableProperty$8=createNonEnumerableProperty$9,hasOwn$a=hasOwnProperty_1,shared$1=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$4=global$h.TypeError,WeakMap$1=global$h.WeakMap,set$1,get$1,has$6,enforce=function(tr){return has$6(tr)?get$1(tr):set$1(tr,{})},getterFor=function(tr){return function(er){var rr;if(!isObject$5(er)||(rr=get$1(er)).type!==tr)throw TypeError$4("Incompatible receiver, "+tr+" required");return rr}};if(NATIVE_WEAK_MAP||shared$1.state){var store=shared$1.state||(shared$1.state=new WeakMap$1);store.get=store.get,store.has=store.has,store.set=store.set,set$1=function(tr,er){if(store.has(tr))throw TypeError$4(OBJECT_ALREADY_INITIALIZED);return er.facade=tr,store.set(tr,er),er},get$1=function(tr){return store.get(tr)||{}},has$6=function(tr){return store.has(tr)}}else{var STATE=sharedKey$2("state");hiddenKeys$3[STATE]=!0,set$1=function(tr,er){if(hasOwn$a(tr,STATE))throw TypeError$4(OBJECT_ALREADY_INITIALIZED);return er.facade=tr,createNonEnumerableProperty$8(tr,STATE,er),er},get$1=function(tr){return hasOwn$a(tr,STATE)?tr[STATE]:{}},has$6=function(tr){return hasOwn$a(tr,STATE)}}var internalState={set:set$1,get:get$1,has:has$6,enforce,getterFor},uncurryThis$t=functionUncurryThis,fails$l=fails$s,isCallable$g=isCallable$o,hasOwn$9=hasOwnProperty_1,DESCRIPTORS$e=descriptors,CONFIGURABLE_FUNCTION_NAME$2=functionName.CONFIGURABLE,inspectSource$1=inspectSource$2,InternalStateModule$5=internalState,enforceInternalState=InternalStateModule$5.enforce,getInternalState$3=InternalStateModule$5.get,$String$3=String,defineProperty$7=Object.defineProperty,stringSlice$7=uncurryThis$t("".slice),replace$9=uncurryThis$t("".replace),join$3=uncurryThis$t([].join),CONFIGURABLE_LENGTH=DESCRIPTORS$e&&!fails$l(function(){return defineProperty$7(function(){},"length",{value:8}).length!==8}),TEMPLATE=String(String).split("String"),makeBuiltIn$2=makeBuiltIn$3.exports=function(tr,er,rr){stringSlice$7($String$3(er),0,7)==="Symbol("&&(er="["+replace$9($String$3(er),/^Symbol\(([^)]*)\)/,"$1")+"]"),rr&&rr.getter&&(er="get "+er),rr&&rr.setter&&(er="set "+er),(!hasOwn$9(tr,"name")||CONFIGURABLE_FUNCTION_NAME$2&&tr.name!==er)&&(DESCRIPTORS$e?defineProperty$7(tr,"name",{value:er,configurable:!0}):tr.name=er),CONFIGURABLE_LENGTH&&rr&&hasOwn$9(rr,"arity")&&tr.length!==rr.arity&&defineProperty$7(tr,"length",{value:rr.arity});try{rr&&hasOwn$9(rr,"constructor")&&rr.constructor?DESCRIPTORS$e&&defineProperty$7(tr,"prototype",{writable:!1}):tr.prototype&&(tr.prototype=void 0)}catch(ar){}var nr=enforceInternalState(tr);return hasOwn$9(nr,"source")||(nr.source=join$3(TEMPLATE,typeof er=="string"?er:"")),tr};Function.prototype.toString=makeBuiltIn$2(function(){return isCallable$g(this)&&getInternalState$3(this).source||inspectSource$1(this)},"toString");var makeBuiltInExports=makeBuiltIn$3.exports,isCallable$f=isCallable$o,definePropertyModule$3=objectDefineProperty,makeBuiltIn$1=makeBuiltInExports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$8=function(tr,er,rr,nr){nr||(nr={});var ar=nr.enumerable,sr=nr.name!==void 0?nr.name:er;if(isCallable$f(rr)&&makeBuiltIn$1(rr,sr,nr),nr.global)ar?tr[er]=rr:defineGlobalProperty$1(er,rr);else{try{nr.unsafe?tr[er]&&(ar=!0):delete tr[er]}catch(ir){}ar?tr[er]=rr:definePropertyModule$3.f(tr,er,{value:rr,enumerable:!1,configurable:!nr.nonConfigurable,writable:!nr.nonWritable})}return tr},objectGetOwnPropertyNames={},ceil=Math.ceil,floor$5=Math.floor,mathTrunc=Math.trunc||function(tr){var er=+tr;return(er>0?floor$5:ceil)(er)},trunc=mathTrunc,toIntegerOrInfinity$7=function(tr){var er=+tr;return er!=er||er===0?0:trunc(er)},toIntegerOrInfinity$6=toIntegerOrInfinity$7,max$3=Math.max,min$3=Math.min,toAbsoluteIndex$4=function(tr,er){var rr=toIntegerOrInfinity$6(tr);return rr<0?max$3(rr+er,0):min$3(rr,er)},toIntegerOrInfinity$5=toIntegerOrInfinity$7,min$2=Math.min,toLength$5=function(tr){return tr>0?min$2(toIntegerOrInfinity$5(tr),9007199254740991):0},toLength$4=toLength$5,lengthOfArrayLike$6=function(tr){return toLength$4(tr.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex$3=toAbsoluteIndex$4,lengthOfArrayLike$5=lengthOfArrayLike$6,createMethod$3=function(tr){return function(er,rr,nr){var ar,sr=toIndexedObject$3(er),ir=lengthOfArrayLike$5(sr),or=toAbsoluteIndex$3(nr,ir);if(tr&&rr!=rr){for(;ir>or;)if((ar=sr[or++])!=ar)return!0}else for(;ir>or;or++)if((tr||or in sr)&&sr[or]===rr)return tr||or||0;return!tr&&-1}},arrayIncludes={indexOf:createMethod$3(!1)},uncurryThis$s=functionUncurryThis,hasOwn$8=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf$1=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$5=uncurryThis$s([].push),objectKeysInternal=function(tr,er){var rr,nr=toIndexedObject$2(tr),ar=0,sr=[];for(rr in nr)!hasOwn$8(hiddenKeys$2,rr)&&hasOwn$8(nr,rr)&&push$5(sr,rr);for(;er.length>ar;)hasOwn$8(nr,rr=er[ar++])&&(~indexOf$1(sr,rr)||push$5(sr,rr));return sr},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$2.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(tr){return internalObjectKeys$1(tr,hiddenKeys$1)};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var getBuiltIn$8=getBuiltIn$a,uncurryThis$r=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$e=anObject$g,concat$2=uncurryThis$r([].concat),ownKeys$1=getBuiltIn$8("Reflect","ownKeys")||function(tr){var er=getOwnPropertyNamesModule.f(anObject$e(tr)),rr=getOwnPropertySymbolsModule$1.f;return rr?concat$2(er,rr(tr)):er},hasOwn$7=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$2=objectDefineProperty,copyConstructorProperties$3=function(tr,er,rr){for(var nr=ownKeys(er),ar=definePropertyModule$2.f,sr=getOwnPropertyDescriptorModule.f,ir=0;ir<nr.length;ir++){var or=nr[ir];hasOwn$7(tr,or)||rr&&hasOwn$7(rr,or)||ar(tr,or,sr(er,or))}},fails$k=fails$s,isCallable$e=isCallable$o,replacement=/#|\.prototype\./,isForced$1=function(tr,er){var rr=data[normalize(tr)];return rr==POLYFILL||rr!=NATIVE&&(isCallable$e(er)?fails$k(er):!!er)},normalize=isForced$1.normalize=function(tr){return String(tr).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$g=global$q,getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$7=createNonEnumerableProperty$9,defineBuiltIn$7=defineBuiltIn$8,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties$2=copyConstructorProperties$3,isForced=isForced_1,_export=function(tr,er){var rr,nr,ar,sr,ir,or=tr.target,cr=tr.global,lr=tr.stat;if(rr=cr?global$g:lr?global$g[or]||defineGlobalProperty(or,{}):(global$g[or]||{}).prototype)for(nr in er){if(sr=er[nr],ar=tr.dontCallGetSet?(ir=getOwnPropertyDescriptor$2(rr,nr))&&ir.value:rr[nr],!isForced(cr?nr:or+(lr?".":"#")+nr,tr.forced)&&ar!==void 0){if(typeof sr==typeof ar)continue;copyConstructorProperties$2(sr,ar)}(tr.sham||ar&&ar.sham)&&createNonEnumerableProperty$7(sr,"sham",!0),defineBuiltIn$7(rr,nr,sr,tr)}},NATIVE_BIND$1=functionBindNative,FunctionPrototype=Function.prototype,apply$3=FunctionPrototype.apply,call$d=FunctionPrototype.call,functionApply=typeof Reflect=="object"&&Reflect.apply||(NATIVE_BIND$1?call$d.bind(apply$3):function(){return call$d.apply(apply$3,arguments)}),uncurryThis$q=functionUncurryThis,aCallable$5=aCallable$7,functionUncurryThisAccessor=function(tr,er,rr){try{return uncurryThis$q(aCallable$5(Object.getOwnPropertyDescriptor(tr,er)[rr]))}catch(nr){}},isCallable$d=isCallable$o,$String$2=String,$TypeError$b=TypeError,aPossiblePrototype$1=function(tr){if(typeof tr=="object"||isCallable$d(tr))return tr;throw $TypeError$b("Can't set "+$String$2(tr)+" as a prototype")},uncurryThisAccessor$3=functionUncurryThisAccessor,anObject$d=anObject$g,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var tr,er=!1,rr={};try{(tr=uncurryThisAccessor$3(Object.prototype,"__proto__","set"))(rr,[]),er=rr instanceof Array}catch(nr){}return function(nr,ar){return anObject$d(nr),aPossiblePrototype(ar),er?tr(nr,ar):nr.__proto__=ar,nr}}():void 0),defineProperty$6=objectDefineProperty.f,proxyAccessor$1=function(tr,er,rr){rr in tr||defineProperty$6(tr,rr,{configurable:!0,get:function(){return er[rr]},set:function(nr){er[rr]=nr}})},isCallable$c=isCallable$o,isObject$4=isObject$a,setPrototypeOf$3=objectSetPrototypeOf,inheritIfRequired$2=function(tr,er,rr){var nr,ar;return setPrototypeOf$3&&isCallable$c(nr=er.constructor)&&nr!==rr&&isObject$4(ar=nr.prototype)&&ar!==rr.prototype&&setPrototypeOf$3(tr,ar),tr},wellKnownSymbol$e=wellKnownSymbol$g,TO_STRING_TAG$3=wellKnownSymbol$e("toStringTag"),test$1={};test$1[TO_STRING_TAG$3]="z";var toStringTagSupport=String(test$1)==="[object z]",TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$b=isCallable$o,classofRaw$1=classofRaw$2,wellKnownSymbol$d=wellKnownSymbol$g,TO_STRING_TAG$2=wellKnownSymbol$d("toStringTag"),$Object$1=Object,CORRECT_ARGUMENTS=classofRaw$1(function(){return arguments}())=="Arguments",tryGet=function(tr,er){try{return tr[er]}catch(rr){}},classof$9=TO_STRING_TAG_SUPPORT?classofRaw$1:function(tr){var er,rr,nr;return tr===void 0?"Undefined":tr===null?"Null":typeof(rr=tryGet(er=$Object$1(tr),TO_STRING_TAG$2))=="string"?rr:CORRECT_ARGUMENTS?classofRaw$1(er):(nr=classofRaw$1(er))=="Object"&&isCallable$b(er.callee)?"Arguments":nr},classof$8=classof$9,$String$1=String,toString$8=function(tr){if(classof$8(tr)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return $String$1(tr)},toString$7=toString$8,normalizeStringArgument$2=function(tr,er){return tr===void 0?arguments.length<2?"":er:toString$7(tr)},isObject$3=isObject$a,createNonEnumerableProperty$6=createNonEnumerableProperty$9,installErrorCause$1=function(tr,er){isObject$3(er)&&"cause"in er&&createNonEnumerableProperty$6(tr,"cause",er.cause)},uncurryThis$p=functionUncurryThis,$Error=Error,replace$8=uncurryThis$p("".replace),TEST=String($Error("zxcasd").stack),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(tr,er){if(IS_V8_OR_CHAKRA_STACK&&typeof tr=="string"&&!$Error.prepareStackTrace)for(;er--;)tr=replace$8(tr,V8_OR_CHAKRA_STACK_ENTRY,"");return tr},fails$j=fails$s,createPropertyDescriptor$4=createPropertyDescriptor$7,errorStackInstallable=!fails$j(function(){var tr=Error("a");return!("stack"in tr)||(Object.defineProperty(tr,"stack",createPropertyDescriptor$4(1,7)),tr.stack!==7)}),createNonEnumerableProperty$5=createNonEnumerableProperty$9,clearErrorStack$1=errorStackClear,ERROR_STACK_INSTALLABLE=errorStackInstallable,captureStackTrace=Error.captureStackTrace,errorStackInstall=function(tr,er,rr,nr){ERROR_STACK_INSTALLABLE&&(captureStackTrace?captureStackTrace(tr,er):createNonEnumerableProperty$5(tr,"stack",clearErrorStack$1(rr,nr)))},getBuiltIn$7=getBuiltIn$a,hasOwn$6=hasOwnProperty_1,createNonEnumerableProperty$4=createNonEnumerableProperty$9,isPrototypeOf$2=objectIsPrototypeOf,setPrototypeOf$2=objectSetPrototypeOf,copyConstructorProperties$1=copyConstructorProperties$3,proxyAccessor=proxyAccessor$1,inheritIfRequired$1=inheritIfRequired$2,normalizeStringArgument$1=normalizeStringArgument$2,installErrorCause=installErrorCause$1,installErrorStack=errorStackInstall,DESCRIPTORS$d=descriptors,wrapErrorConstructorWithCause$1=function(tr,er,rr,nr){var ar="stackTraceLimit",sr=nr?2:1,ir=tr.split("."),or=ir[ir.length-1],cr=getBuiltIn$7.apply(null,ir);if(cr){var lr=cr.prototype;if(hasOwn$6(lr,"cause")&&delete lr.cause,!rr)return cr;var dr=getBuiltIn$7("Error"),pr=er(function(hr,fr){var mr=normalizeStringArgument$1(nr?fr:hr,void 0),gr=nr?new cr(hr):new cr;return mr!==void 0&&createNonEnumerableProperty$4(gr,"message",mr),installErrorStack(gr,pr,gr.stack,2),this&&isPrototypeOf$2(lr,this)&&inheritIfRequired$1(gr,this,pr),arguments.length>sr&&installErrorCause(gr,arguments[sr]),gr});pr.prototype=lr,or!=="Error"?setPrototypeOf$2?setPrototypeOf$2(pr,dr):copyConstructorProperties$1(pr,dr,{name:!0}):DESCRIPTORS$d&&ar in cr&&(proxyAccessor(pr,cr,ar),proxyAccessor(pr,cr,"prepareStackTrace")),copyConstructorProperties$1(pr,cr);try{lr.name!==or&&createNonEnumerableProperty$4(lr,"name",or),lr.constructor=pr}catch(hr){}return pr}},$$p=_export,global$f=global$q,apply$2=functionApply,wrapErrorConstructorWithCause=wrapErrorConstructorWithCause$1,WEB_ASSEMBLY="WebAssembly",WebAssembly=global$f[WEB_ASSEMBLY],FORCED$2=Error("e",{cause:7}).cause!==7,exportGlobalErrorCauseWrapper=function(tr,er){var rr={};rr[tr]=wrapErrorConstructorWithCause(tr,er,FORCED$2),$$p({global:!0,constructor:!0,arity:1,forced:FORCED$2},rr)},exportWebAssemblyErrorCauseWrapper=function(tr,er){if(WebAssembly&&WebAssembly[tr]){var rr={};rr[tr]=wrapErrorConstructorWithCause(WEB_ASSEMBLY+"."+tr,er,FORCED$2),$$p({target:WEB_ASSEMBLY,stat:!0,constructor:!0,arity:1,forced:FORCED$2},rr)}};exportGlobalErrorCauseWrapper("Error",function(tr){return function(er){return apply$2(tr,this,arguments)}}),exportGlobalErrorCauseWrapper("EvalError",function(tr){return function(er){return apply$2(tr,this,arguments)}}),exportGlobalErrorCauseWrapper("RangeError",function(tr){return function(er){return apply$2(tr,this,arguments)}}),exportGlobalErrorCauseWrapper("ReferenceError",function(tr){return function(er){return apply$2(tr,this,arguments)}}),exportGlobalErrorCauseWrapper("SyntaxError",function(tr){return function(er){return apply$2(tr,this,arguments)}}),exportGlobalErrorCauseWrapper("TypeError",function(tr){return function(er){return apply$2(tr,this,arguments)}}),exportGlobalErrorCauseWrapper("URIError",function(tr){return function(er){return apply$2(tr,this,arguments)}}),exportWebAssemblyErrorCauseWrapper("CompileError",function(tr){return function(er){return apply$2(tr,this,arguments)}}),exportWebAssemblyErrorCauseWrapper("LinkError",function(tr){return function(er){return apply$2(tr,this,arguments)}}),exportWebAssemblyErrorCauseWrapper("RuntimeError",function(tr){return function(er){return apply$2(tr,this,arguments)}});var classof$7=classofRaw$2,isArray$4=Array.isArray||function(tr){return classof$7(tr)=="Array"},DESCRIPTORS$c=descriptors,isArray$3=isArray$4,$TypeError$a=TypeError,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$c&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(tr){return tr instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(tr,er){if(isArray$3(tr)&&!getOwnPropertyDescriptor$1(tr,"length").writable)throw $TypeError$a("Cannot set read only .length");return tr.length=er}:function(tr,er){return tr.length=er},$TypeError$9=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger$1=function(tr){if(tr>MAX_SAFE_INTEGER)throw $TypeError$9("Maximum allowed index exceeded");return tr},$$o=_export,toObject$6=toObject$8,lengthOfArrayLike$4=lengthOfArrayLike$6,setArrayLength=arraySetLength,doesNotExceedSafeInteger=doesNotExceedSafeInteger$1,fails$i=fails$s,INCORRECT_TO_LENGTH=fails$i(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(tr){return tr instanceof TypeError}},FORCED$1=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$o({target:"Array",proto:!0,arity:1,forced:FORCED$1},{push:function(tr){var er=toObject$6(this),rr=lengthOfArrayLike$4(er),nr=arguments.length;doesNotExceedSafeInteger(rr+nr);for(var ar=0;ar<nr;ar++)er[rr]=arguments[ar],rr++;return setArrayLength(er,rr),rr}});var uncurryThis$o=functionUncurryThis,arraySlice$4=uncurryThis$o([].slice),uncurryThis$n=functionUncurryThis,isArray$2=isArray$4,isCallable$a=isCallable$o,classof$6=classofRaw$2,toString$6=toString$8,push$4=uncurryThis$n([].push),getJsonReplacerFunction=function(tr){if(isCallable$a(tr))return tr;if(isArray$2(tr)){for(var er=tr.length,rr=[],nr=0;nr<er;nr++){var ar=tr[nr];typeof ar=="string"?push$4(rr,ar):typeof ar!="number"&&classof$6(ar)!="Number"&&classof$6(ar)!="String"||push$4(rr,toString$6(ar))}var sr=rr.length,ir=!0;return function(or,cr){if(ir)return ir=!1,cr;if(isArray$2(this))return cr;for(var lr=0;lr<sr;lr++)if(rr[lr]===or)return cr}}},$$n=_export,getBuiltIn$6=getBuiltIn$a,apply$1=functionApply,call$c=functionCall,uncurryThis$m=functionUncurryThis,fails$h=fails$s,isCallable$9=isCallable$o,isSymbol=isSymbol$3,arraySlice$3=arraySlice$4,getReplacerFunction=getJsonReplacerFunction,NATIVE_SYMBOL$1=symbolConstructorDetection,$String=String,$stringify=getBuiltIn$6("JSON","stringify"),exec$4=uncurryThis$m(/./.exec),charAt$7=uncurryThis$m("".charAt),charCodeAt$2=uncurryThis$m("".charCodeAt),replace$7=uncurryThis$m("".replace),numberToString$1=uncurryThis$m(1 .toString),tester=/[\uD800-\uDFFF]/g,low=/^[\uD800-\uDBFF]$/,hi=/^[\uDC00-\uDFFF]$/,WRONG_SYMBOLS_CONVERSION=!NATIVE_SYMBOL$1||fails$h(function(){var tr=getBuiltIn$6("Symbol")();return $stringify([tr])!="[null]"||$stringify({a:tr})!="{}"||$stringify(Object(tr))!="{}"}),ILL_FORMED_UNICODE=fails$h(function(){return $stringify("\uDF06\uD834")!=='"\\udf06\\ud834"'||$stringify("\uDEAD")!=='"\\udead"'}),stringifyWithSymbolsFix=function(tr,er){var rr=arraySlice$3(arguments),nr=getReplacerFunction(er);if(isCallable$9(nr)||tr!==void 0&&!isSymbol(tr))return rr[1]=function(ar,sr){if(isCallable$9(nr)&&(sr=call$c(nr,this,$String(ar),sr)),!isSymbol(sr))return sr},apply$1($stringify,null,rr)},fixIllFormed=function(tr,er,rr){var nr=charAt$7(rr,er-1),ar=charAt$7(rr,er+1);return exec$4(low,tr)&&!exec$4(hi,ar)||exec$4(hi,tr)&&!exec$4(low,nr)?"\\u"+numberToString$1(charCodeAt$2(tr,0),16):tr};$stringify&&$$n({target:"JSON",stat:!0,arity:3,forced:WRONG_SYMBOLS_CONVERSION||ILL_FORMED_UNICODE},{stringify:function(tr,er,rr){var nr=arraySlice$3(arguments),ar=apply$1(WRONG_SYMBOLS_CONVERSION?stringifyWithSymbolsFix:$stringify,null,nr);return ILL_FORMED_UNICODE&&typeof ar=="string"?replace$7(ar,tester,fixIllFormed):ar}});var domIterables={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},documentCreateElement$1=documentCreateElement$2,classList=documentCreateElement$1("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,objectDefineProperties={},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(tr){return internalObjectKeys(tr,enumBugKeys$1)},DESCRIPTORS$b=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$1=objectDefineProperty,anObject$c=anObject$g,toIndexedObject$1=toIndexedObject$5,objectKeys$1=objectKeys$2;objectDefineProperties.f=DESCRIPTORS$b&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(tr,er){anObject$c(tr);for(var rr,nr=toIndexedObject$1(er),ar=objectKeys$1(er),sr=ar.length,ir=0;sr>ir;)definePropertyModule$1.f(tr,rr=ar[ir++],nr[rr]);return tr};var getBuiltIn$5=getBuiltIn$a,html$1=getBuiltIn$5("document","documentElement"),anObject$b=anObject$g,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,documentCreateElement=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$1("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(tr){return LT+SCRIPT+GT+tr+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(tr){tr.write(scriptTag("")),tr.close();var er=tr.parentWindow.Object;return tr=null,er},NullProtoObjectViaIFrame=function(){var tr,er=documentCreateElement("iframe"),rr="java"+SCRIPT+":";return er.style.display="none",html.appendChild(er),er.src=String(rr),(tr=er.contentWindow.document).open(),tr.write(scriptTag("document.F=Object")),tr.close(),tr.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(er){}NullProtoObject=typeof document!="undefined"?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var tr=enumBugKeys.length;tr--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys[tr]];return NullProtoObject()};hiddenKeys[IE_PROTO$1]=!0;var objectCreate=Object.create||function(tr,er){var rr;return tr!==null?(EmptyConstructor[PROTOTYPE$1]=anObject$b(tr),rr=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,rr[IE_PROTO$1]=tr):rr=NullProtoObject(),er===void 0?rr:definePropertiesModule.f(rr,er)},wellKnownSymbol$c=wellKnownSymbol$g,create$3=objectCreate,defineProperty$5=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$c("unscopables"),ArrayPrototype$1=Array.prototype;ArrayPrototype$1[UNSCOPABLES]==null&&defineProperty$5(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$3(null)});var addToUnscopables$1=function(tr){ArrayPrototype$1[UNSCOPABLES][tr]=!0},iterators={},fails$g=fails$s,correctPrototypeGetter=!fails$g(function(){function tr(){}return tr.prototype.constructor=null,Object.getPrototypeOf(new tr)!==tr.prototype}),hasOwn$5=hasOwnProperty_1,isCallable$8=isCallable$o,toObject$5=toObject$8,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype$1=$Object.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object.getPrototypeOf:function(tr){var er=toObject$5(tr);if(hasOwn$5(er,IE_PROTO))return er[IE_PROTO];var rr=er.constructor;return isCallable$8(rr)&&er instanceof rr?rr.prototype:er instanceof $Object?ObjectPrototype$1:null},fails$f=fails$s,isCallable$7=isCallable$o,isObject$2=isObject$a,getPrototypeOf$2=objectGetPrototypeOf,defineBuiltIn$6=defineBuiltIn$8,wellKnownSymbol$b=wellKnownSymbol$g,ITERATOR$6=wellKnownSymbol$b("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$2(getPrototypeOf$2(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject$2(IteratorPrototype$2)||fails$f(function(){var tr={};return IteratorPrototype$2[ITERATOR$6].call(tr)!==tr});NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype$2={}),isCallable$7(IteratorPrototype$2[ITERATOR$6])||defineBuiltIn$6(IteratorPrototype$2,ITERATOR$6,function(){return this});var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},defineProperty$4=objectDefineProperty.f,hasOwn$4=hasOwnProperty_1,wellKnownSymbol$a=wellKnownSymbol$g,TO_STRING_TAG$1=wellKnownSymbol$a("toStringTag"),setToStringTag$6=function(tr,er,rr){tr&&!rr&&(tr=tr.prototype),tr&&!hasOwn$4(tr,TO_STRING_TAG$1)&&defineProperty$4(tr,TO_STRING_TAG$1,{configurable:!0,value:er})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$2=objectCreate,createPropertyDescriptor$3=createPropertyDescriptor$7,setToStringTag$5=setToStringTag$6,Iterators$4=iterators,returnThis$1=function(){return this},iteratorCreateConstructor=function(tr,er,rr,nr){var ar=er+" Iterator";return tr.prototype=create$2(IteratorPrototype$1,{next:createPropertyDescriptor$3(+!nr,rr)}),setToStringTag$5(tr,ar,!1),Iterators$4[ar]=returnThis$1,tr},$$m=_export,call$b=functionCall,FunctionName$1=functionName,isCallable$6=isCallable$o,createIteratorConstructor$1=iteratorCreateConstructor,getPrototypeOf$1=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$4=setToStringTag$6,createNonEnumerableProperty$3=createNonEnumerableProperty$9,defineBuiltIn$5=defineBuiltIn$8,wellKnownSymbol$9=wellKnownSymbol$g,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$2=FunctionName$1.PROPER,CONFIGURABLE_FUNCTION_NAME$1=FunctionName$1.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$5=wellKnownSymbol$9("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(tr,er,rr,nr,ar,sr,ir){createIteratorConstructor$1(rr,er,nr);var or,cr,lr,dr=function(yr){if(yr===ar&&gr)return gr;if(!BUGGY_SAFARI_ITERATORS&&yr in fr)return fr[yr];switch(yr){case KEYS:case VALUES:case ENTRIES:return function(){return new rr(this,yr)}}return function(){return new rr(this)}},pr=er+" Iterator",hr=!1,fr=tr.prototype,mr=fr[ITERATOR$5]||fr["@@iterator"]||ar&&fr[ar],gr=!BUGGY_SAFARI_ITERATORS&&mr||dr(ar),vr=er=="Array"&&fr.entries||mr;if(vr&&(or=getPrototypeOf$1(vr.call(new tr)))!==Object.prototype&&or.next&&(getPrototypeOf$1(or)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(or,IteratorPrototype):isCallable$6(or[ITERATOR$5])||defineBuiltIn$5(or,ITERATOR$5,returnThis)),setToStringTag$4(or,pr,!0)),PROPER_FUNCTION_NAME$2&&ar==VALUES&&mr&&mr.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME$1?createNonEnumerableProperty$3(fr,"name",VALUES):(hr=!0,gr=function(){return call$b(mr,this)})),ar)if(cr={values:dr(VALUES),keys:sr?gr:dr(KEYS),entries:dr(ENTRIES)},ir)for(lr in cr)(BUGGY_SAFARI_ITERATORS||hr||!(lr in fr))&&defineBuiltIn$5(fr,lr,cr[lr]);else $$m({target:er,proto:!0,forced:BUGGY_SAFARI_ITERATORS||hr},cr);return fr[ITERATOR$5]!==gr&&defineBuiltIn$5(fr,ITERATOR$5,gr,{name:ar}),Iterators$3[er]=gr,cr},createIterResultObject$2=function(tr,er){return{value:tr,done:er}},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators$2=iterators,InternalStateModule$4=internalState,defineProperty$3=objectDefineProperty.f,defineIterator$1=iteratorDefine,createIterResultObject$1=createIterResultObject$2,DESCRIPTORS$a=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$4=InternalStateModule$4.set,getInternalState$2=InternalStateModule$4.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator$1(Array,"Array",function(tr,er){setInternalState$4(this,{type:ARRAY_ITERATOR,target:toIndexedObject(tr),index:0,kind:er})},function(){var tr=getInternalState$2(this),er=tr.target,rr=tr.kind,nr=tr.index++;return!er||nr>=er.length?(tr.target=void 0,createIterResultObject$1(void 0,!0)):createIterResultObject$1(rr=="keys"?nr:rr=="values"?er[nr]:[nr,er[nr]],!1)},"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS$a&&values.name!=="values")try{defineProperty$3(values,"name",{value:"values"})}catch(tr){}var global$e=global$q,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty$2=createNonEnumerableProperty$9,wellKnownSymbol$8=wellKnownSymbol$g,ITERATOR$4=wellKnownSymbol$8("iterator"),TO_STRING_TAG=wellKnownSymbol$8("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(tr,er){if(tr){if(tr[ITERATOR$4]!==ArrayValues)try{createNonEnumerableProperty$2(tr,ITERATOR$4,ArrayValues)}catch(nr){tr[ITERATOR$4]=ArrayValues}if(tr[TO_STRING_TAG]||createNonEnumerableProperty$2(tr,TO_STRING_TAG,er),DOMIterables[er]){for(var rr in ArrayIteratorMethods)if(tr[rr]!==ArrayIteratorMethods[rr])try{createNonEnumerableProperty$2(tr,rr,ArrayIteratorMethods[rr])}catch(nr){tr[rr]=ArrayIteratorMethods[rr]}}}};for(var COLLECTION_NAME in DOMIterables)handlePrototype(global$e[COLLECTION_NAME]&&global$e[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var anObject$a=anObject$g,regexpFlags$1=function(){var tr=anObject$a(this),er="";return tr.hasIndices&&(er+="d"),tr.global&&(er+="g"),tr.ignoreCase&&(er+="i"),tr.multiline&&(er+="m"),tr.dotAll&&(er+="s"),tr.unicode&&(er+="u"),tr.unicodeSets&&(er+="v"),tr.sticky&&(er+="y"),er},fails$e=fails$s,global$d=global$q,$RegExp$2=global$d.RegExp,UNSUPPORTED_Y$1=fails$e(function(){var tr=$RegExp$2("a","y");return tr.lastIndex=2,tr.exec("abcd")!=null});UNSUPPORTED_Y$1||fails$e(function(){return!$RegExp$2("a","y").sticky});var BROKEN_CARET=UNSUPPORTED_Y$1||fails$e(function(){var tr=$RegExp$2("^r","gy");return tr.lastIndex=2,tr.exec("str")!=null}),regexpStickyHelpers={BROKEN_CARET},fails$d=fails$s,global$c=global$q,$RegExp$1=global$c.RegExp,regexpUnsupportedDotAll=fails$d(function(){var tr=$RegExp$1(".","s");return!(tr.dotAll&&tr.exec(`
|
|
2
|
+
`)&&tr.flags==="s")}),fails$c=fails$s,global$b=global$q,$RegExp=global$b.RegExp,regexpUnsupportedNcg=fails$c(function(){var tr=$RegExp("(?<a>b)","g");return tr.exec("b").groups.a!=="b"||"b".replace(tr,"$<a>c")!=="bc"}),call$a=functionCall,uncurryThis$l=functionUncurryThis,toString$5=toString$8,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=sharedExports,create$1=objectCreate,getInternalState$1=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$6=uncurryThis$l("".charAt),indexOf=uncurryThis$l("".indexOf),replace$6=uncurryThis$l("".replace),stringSlice$6=uncurryThis$l("".slice),UPDATES_LAST_INDEX_WRONG=(re1=/a/,re2=/b*/g,call$a(nativeExec,re1,"a"),call$a(nativeExec,re2,"a"),re1.lastIndex!==0||re2.lastIndex!==0),re1,re2,UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=/()??/.exec("")[1]!==void 0,PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG;PATCH&&(patchedExec=function(tr){var er,rr,nr,ar,sr,ir,or,cr=this,lr=getInternalState$1(cr),dr=toString$5(tr),pr=lr.raw;if(pr)return pr.lastIndex=cr.lastIndex,er=call$a(patchedExec,pr,dr),cr.lastIndex=pr.lastIndex,er;var hr=lr.groups,fr=UNSUPPORTED_Y&&cr.sticky,mr=call$a(regexpFlags,cr),gr=cr.source,vr=0,yr=dr;if(fr&&(mr=replace$6(mr,"y",""),indexOf(mr,"g")===-1&&(mr+="g"),yr=stringSlice$6(dr,cr.lastIndex),cr.lastIndex>0&&(!cr.multiline||cr.multiline&&charAt$6(dr,cr.lastIndex-1)!==`
|
|
3
|
+
`)&&(gr="(?: "+gr+")",yr=" "+yr,vr++),rr=new RegExp("^(?:"+gr+")",mr)),NPCG_INCLUDED&&(rr=new RegExp("^"+gr+"$(?!\\s)",mr)),UPDATES_LAST_INDEX_WRONG&&(nr=cr.lastIndex),ar=call$a(nativeExec,fr?rr:cr,yr),fr?ar?(ar.input=stringSlice$6(ar.input,vr),ar[0]=stringSlice$6(ar[0],vr),ar.index=cr.lastIndex,cr.lastIndex+=ar[0].length):cr.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&ar&&(cr.lastIndex=cr.global?ar.index+ar[0].length:nr),NPCG_INCLUDED&&ar&&ar.length>1&&call$a(nativeReplace,ar[0],rr,function(){for(sr=1;sr<arguments.length-2;sr++)arguments[sr]===void 0&&(ar[sr]=void 0)}),ar&&hr)for(ar.groups=ir=create$1(null),sr=0;sr<hr.length;sr++)ir[(or=hr[sr])[0]]=ar[or[1]];return ar});var regexpExec$2=patchedExec,$$l=_export,exec$3=regexpExec$2;$$l({target:"RegExp",proto:!0,forced:/./.exec!==exec$3},{exec:exec$3});var classofRaw=classofRaw$2,uncurryThis$k=functionUncurryThis,functionUncurryThisClause=function(tr){if(classofRaw(tr)==="Function")return uncurryThis$k(tr)},uncurryThis$j=functionUncurryThisClause,defineBuiltIn$4=defineBuiltIn$8,regexpExec$1=regexpExec$2,fails$b=fails$s,wellKnownSymbol$7=wellKnownSymbol$g,createNonEnumerableProperty$1=createNonEnumerableProperty$9,SPECIES$2=wellKnownSymbol$7("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(tr,er,rr,nr){var ar=wellKnownSymbol$7(tr),sr=!fails$b(function(){var lr={};return lr[ar]=function(){return 7},""[tr](lr)!=7}),ir=sr&&!fails$b(function(){var lr=!1,dr=/a/;return tr==="split"&&((dr={}).constructor={},dr.constructor[SPECIES$2]=function(){return dr},dr.flags="",dr[ar]=/./[ar]),dr.exec=function(){return lr=!0,null},dr[ar](""),!lr});if(!sr||!ir||rr){var or=uncurryThis$j(/./[ar]),cr=er(ar,""[tr],function(lr,dr,pr,hr,fr){var mr=uncurryThis$j(lr),gr=dr.exec;return gr===regexpExec$1||gr===RegExpPrototype.exec?sr&&!fr?{done:!0,value:or(dr,pr,hr)}:{done:!0,value:mr(pr,dr,hr)}:{done:!1}});defineBuiltIn$4(String.prototype,tr,cr[0]),defineBuiltIn$4(RegExpPrototype,ar,cr[1])}nr&&createNonEnumerableProperty$1(RegExpPrototype[ar],"sham",!0)},uncurryThis$i=functionUncurryThis,toIntegerOrInfinity$4=toIntegerOrInfinity$7,toString$4=toString$8,requireObjectCoercible$2=requireObjectCoercible$5,charAt$5=uncurryThis$i("".charAt),charCodeAt$1=uncurryThis$i("".charCodeAt),stringSlice$5=uncurryThis$i("".slice),createMethod$2=function(tr){return function(er,rr){var nr,ar,sr=toString$4(requireObjectCoercible$2(er)),ir=toIntegerOrInfinity$4(rr),or=sr.length;return ir<0||ir>=or?tr?"":void 0:(nr=charCodeAt$1(sr,ir))<55296||nr>56319||ir+1===or||(ar=charCodeAt$1(sr,ir+1))<56320||ar>57343?tr?charAt$5(sr,ir):nr:tr?stringSlice$5(sr,ir,ir+2):ar-56320+(nr-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$2(!1),charAt:createMethod$2(!0)},charAt$4=stringMultibyte.charAt,advanceStringIndex$1=function(tr,er,rr){return er+(rr?charAt$4(tr,er).length:1)},uncurryThis$h=functionUncurryThis,toObject$4=toObject$8,floor$4=Math.floor,charAt$3=uncurryThis$h("".charAt),replace$5=uncurryThis$h("".replace),stringSlice$4=uncurryThis$h("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(tr,er,rr,nr,ar,sr){var ir=rr+tr.length,or=nr.length,cr=SUBSTITUTION_SYMBOLS_NO_NAMED;return ar!==void 0&&(ar=toObject$4(ar),cr=SUBSTITUTION_SYMBOLS),replace$5(sr,cr,function(lr,dr){var pr;switch(charAt$3(dr,0)){case"$":return"$";case"&":return tr;case"`":return stringSlice$4(er,0,rr);case"'":return stringSlice$4(er,ir);case"<":pr=ar[stringSlice$4(dr,1,-1)];break;default:var hr=+dr;if(hr===0)return lr;if(hr>or){var fr=floor$4(hr/10);return fr===0?lr:fr<=or?nr[fr-1]===void 0?charAt$3(dr,1):nr[fr-1]+charAt$3(dr,1):lr}pr=nr[hr-1]}return pr===void 0?"":pr})},call$9=functionCall,anObject$9=anObject$g,isCallable$5=isCallable$o,classof$5=classofRaw$2,regexpExec=regexpExec$2,$TypeError$8=TypeError,regexpExecAbstract=function(tr,er){var rr=tr.exec;if(isCallable$5(rr)){var nr=call$9(rr,tr,er);return nr!==null&&anObject$9(nr),nr}if(classof$5(tr)==="RegExp")return call$9(regexpExec,tr,er);throw $TypeError$8("RegExp#exec called on incompatible receiver")},apply=functionApply,call$8=functionCall,uncurryThis$g=functionUncurryThis,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,fails$a=fails$s,anObject$8=anObject$g,isCallable$4=isCallable$o,isNullOrUndefined$2=isNullOrUndefined$5,toIntegerOrInfinity$3=toIntegerOrInfinity$7,toLength$3=toLength$5,toString$3=toString$8,requireObjectCoercible$1=requireObjectCoercible$5,advanceStringIndex=advanceStringIndex$1,getMethod$2=getMethod$4,getSubstitution=getSubstitution$1,regExpExec=regexpExecAbstract,wellKnownSymbol$6=wellKnownSymbol$g,REPLACE=wellKnownSymbol$6("replace"),max$2=Math.max,min$1=Math.min,concat$1=uncurryThis$g([].concat),push$3=uncurryThis$g([].push),stringIndexOf=uncurryThis$g("".indexOf),stringSlice$3=uncurryThis$g("".slice),maybeToString=function(tr){return tr===void 0?tr:String(tr)},REPLACE_KEEPS_$0="a".replace(/./,"$0")==="$0",REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&/./[REPLACE]("a","$0")==="",REPLACE_SUPPORTS_NAMED_GROUPS=!fails$a(function(){var tr=/./;return tr.exec=function(){var er=[];return er.groups={a:"7"},er},"".replace(tr,"$<a>")!=="7"});fixRegExpWellKnownSymbolLogic("replace",function(tr,er,rr){var nr=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(ar,sr){var ir=requireObjectCoercible$1(this),or=isNullOrUndefined$2(ar)?void 0:getMethod$2(ar,REPLACE);return or?call$8(or,ar,ir,sr):call$8(er,toString$3(ir),ar,sr)},function(ar,sr){var ir=anObject$8(this),or=toString$3(ar);if(typeof sr=="string"&&stringIndexOf(sr,nr)===-1&&stringIndexOf(sr,"$<")===-1){var cr=rr(er,ir,or,sr);if(cr.done)return cr.value}var lr=isCallable$4(sr);lr||(sr=toString$3(sr));var dr=ir.global;if(dr){var pr=ir.unicode;ir.lastIndex=0}for(var hr=[];;){var fr=regExpExec(ir,or);if(fr===null||(push$3(hr,fr),!dr))break;toString$3(fr[0])===""&&(ir.lastIndex=advanceStringIndex(or,toLength$3(ir.lastIndex),pr))}for(var mr="",gr=0,vr=0;vr<hr.length;vr++){for(var yr=toString$3((fr=hr[vr])[0]),Ir=max$2(min$1(toIntegerOrInfinity$3(fr.index),or.length),0),Pr=[],Rr=1;Rr<fr.length;Rr++)push$3(Pr,maybeToString(fr[Rr]));var $r=fr.groups;if(lr){var _r=concat$1([yr],Pr,Ir,or);$r!==void 0&&push$3(_r,$r);var kr=toString$3(apply(sr,void 0,_r))}else kr=getSubstitution(yr,or,Ir,Pr,$r,sr);Ir>=gr&&(mr+=stringSlice$3(or,gr,Ir)+kr,gr=Ir+yr.length)}return mr+stringSlice$3(or,gr)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var toggleSelection=function(){var tr=document.getSelection();if(!tr.rangeCount)return function(){};for(var er=document.activeElement,rr=[],nr=0;nr<tr.rangeCount;nr++)rr.push(tr.getRangeAt(nr));switch(er.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":er.blur();break;default:er=null}return tr.removeAllRanges(),function(){tr.type==="Caret"&&tr.removeAllRanges(),tr.rangeCount||rr.forEach(function(ar){tr.addRange(ar)}),er&&er.focus()}},deselectCurrent=toggleSelection,clipboardToIE11Formatting={"text/plain":"Text","text/html":"Url",default:"Text"},defaultMessage="Copy to clipboard: #{key}, Enter";function format(tr){var er=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return tr.replace(/#{\s*key\s*}/g,er)}function copy(tr,er){var rr,nr,ar,sr,ir,or,cr=!1;er||(er={}),rr=er.debug||!1;try{if(ar=deselectCurrent(),sr=document.createRange(),ir=document.getSelection(),(or=document.createElement("span")).textContent=tr,or.ariaHidden="true",or.style.all="unset",or.style.position="fixed",or.style.top=0,or.style.clip="rect(0, 0, 0, 0)",or.style.whiteSpace="pre",or.style.webkitUserSelect="text",or.style.MozUserSelect="text",or.style.msUserSelect="text",or.style.userSelect="text",or.addEventListener("copy",function(lr){if(lr.stopPropagation(),er.format)if(lr.preventDefault(),lr.clipboardData===void 0){rr&&console.warn("unable to use e.clipboardData"),rr&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var dr=clipboardToIE11Formatting[er.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(dr,tr)}else lr.clipboardData.clearData(),lr.clipboardData.setData(er.format,tr);er.onCopy&&(lr.preventDefault(),er.onCopy(lr.clipboardData))}),document.body.appendChild(or),sr.selectNodeContents(or),ir.addRange(sr),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");cr=!0}catch(lr){rr&&console.error("unable to copy using execCommand: ",lr),rr&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(er.format||"text",tr),er.onCopy&&er.onCopy(window.clipboardData),cr=!0}catch(dr){rr&&console.error("unable to copy using clipboardData: ",dr),rr&&console.error("falling back to prompt"),nr=format("message"in er?er.message:defaultMessage),window.prompt(nr,tr)}}finally{ir&&(typeof ir.removeRange=="function"?ir.removeRange(sr):ir.removeAllRanges()),or&&document.body.removeChild(or),ar()}return cr}var copyToClipboard=copy,copy$1=getDefaultExportFromCjs(copyToClipboard),aCallable$4=aCallable$7,toObject$3=toObject$8,IndexedObject$1=indexedObject,lengthOfArrayLike$3=lengthOfArrayLike$6,$TypeError$7=TypeError,createMethod$1=function(tr){return function(er,rr,nr,ar){aCallable$4(rr);var sr=toObject$3(er),ir=IndexedObject$1(sr),or=lengthOfArrayLike$3(sr),cr=tr?or-1:0,lr=tr?-1:1;if(nr<2)for(;;){if(cr in ir){ar=ir[cr],cr+=lr;break}if(cr+=lr,tr?cr<0:or<=cr)throw $TypeError$7("Reduce of empty array with no initial value")}for(;tr?cr>=0:or>cr;cr+=lr)cr in ir&&(ar=rr(ar,ir[cr],cr,sr));return ar}},arrayReduce={left:createMethod$1(!1)},fails$9=fails$s,arrayMethodIsStrict$1=function(tr,er){var rr=[][tr];return!!rr&&fails$9(function(){rr.call(null,er||function(){return 1},1)})},classof$4=classofRaw$2,engineIsNode=typeof process!="undefined"&&classof$4(process)=="process",$$k=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$1,CHROME_VERSION=engineV8Version,IS_NODE$2=engineIsNode,CHROME_BUG=!IS_NODE$2&&CHROME_VERSION>79&&CHROME_VERSION<83,FORCED=CHROME_BUG||!arrayMethodIsStrict("reduce");$$k({target:"Array",proto:!0,forced:FORCED},{reduce:function(tr){var er=arguments.length;return $reduce(this,tr,er,er>1?arguments[1]:void 0)}});var arrayBufferBasicDetection=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined",makeBuiltIn=makeBuiltInExports,defineProperty$2=objectDefineProperty,defineBuiltInAccessor$7=function(tr,er,rr){return rr.get&&makeBuiltIn(rr.get,er,{getter:!0}),rr.set&&makeBuiltIn(rr.set,er,{setter:!0}),defineProperty$2.f(tr,er,rr)},defineBuiltIn$3=defineBuiltIn$8,defineBuiltIns$2=function(tr,er,rr){for(var nr in er)defineBuiltIn$3(tr,nr,er[nr],rr);return tr},isPrototypeOf$1=objectIsPrototypeOf,$TypeError$6=TypeError,anInstance$4=function(tr,er){if(isPrototypeOf$1(er,tr))return tr;throw $TypeError$6("Incorrect invocation")},toIntegerOrInfinity$2=toIntegerOrInfinity$7,toLength$2=toLength$5,$RangeError$1=RangeError,toIndex$2=function(tr){if(tr===void 0)return 0;var er=toIntegerOrInfinity$2(tr),rr=toLength$2(er);if(er!==rr)throw $RangeError$1("Wrong length or index");return rr},$Array$2=Array,abs=Math.abs,pow$1=Math.pow,floor$3=Math.floor,log=Math.log,LN2=Math.LN2,pack=function(tr,er,rr){var nr,ar,sr,ir=$Array$2(rr),or=8*rr-er-1,cr=(1<<or)-1,lr=cr>>1,dr=er===23?pow$1(2,-24)-pow$1(2,-77):0,pr=tr<0||tr===0&&1/tr<0?1:0,hr=0;for((tr=abs(tr))!=tr||tr===1/0?(ar=tr!=tr?1:0,nr=cr):(nr=floor$3(log(tr)/LN2),tr*(sr=pow$1(2,-nr))<1&&(nr--,sr*=2),(tr+=nr+lr>=1?dr/sr:dr*pow$1(2,1-lr))*sr>=2&&(nr++,sr/=2),nr+lr>=cr?(ar=0,nr=cr):nr+lr>=1?(ar=(tr*sr-1)*pow$1(2,er),nr+=lr):(ar=tr*pow$1(2,lr-1)*pow$1(2,er),nr=0));er>=8;)ir[hr++]=255&ar,ar/=256,er-=8;for(nr=nr<<er|ar,or+=er;or>0;)ir[hr++]=255&nr,nr/=256,or-=8;return ir[--hr]|=128*pr,ir},unpack=function(tr,er){var rr,nr=tr.length,ar=8*nr-er-1,sr=(1<<ar)-1,ir=sr>>1,or=ar-7,cr=nr-1,lr=tr[cr--],dr=127&lr;for(lr>>=7;or>0;)dr=256*dr+tr[cr--],or-=8;for(rr=dr&(1<<-or)-1,dr>>=-or,or+=er;or>0;)rr=256*rr+tr[cr--],or-=8;if(dr===0)dr=1-ir;else{if(dr===sr)return rr?NaN:lr?-1/0:1/0;rr+=pow$1(2,er),dr-=ir}return(lr?-1:1)*rr*pow$1(2,dr-er)},ieee754={pack,unpack},toObject$2=toObject$8,toAbsoluteIndex$2=toAbsoluteIndex$4,lengthOfArrayLike$2=lengthOfArrayLike$6,arrayFill$1=function(tr){for(var er=toObject$2(this),rr=lengthOfArrayLike$2(er),nr=arguments.length,ar=toAbsoluteIndex$2(nr>1?arguments[1]:void 0,rr),sr=nr>2?arguments[2]:void 0,ir=sr===void 0?rr:toAbsoluteIndex$2(sr,rr);ir>ar;)er[ar++]=tr;return er},toPropertyKey=toPropertyKey$3,definePropertyModule=objectDefineProperty,createPropertyDescriptor$2=createPropertyDescriptor$7,createProperty$2=function(tr,er,rr){var nr=toPropertyKey(er);nr in tr?definePropertyModule.f(tr,nr,createPropertyDescriptor$2(0,rr)):tr[nr]=rr},toAbsoluteIndex$1=toAbsoluteIndex$4,lengthOfArrayLike$1=lengthOfArrayLike$6,createProperty$1=createProperty$2,$Array$1=Array,max$1=Math.max,arraySliceSimple=function(tr,er,rr){for(var nr=lengthOfArrayLike$1(tr),ar=toAbsoluteIndex$1(er,nr),sr=toAbsoluteIndex$1(rr===void 0?nr:rr,nr),ir=$Array$1(max$1(sr-ar,0)),or=0;ar<sr;ar++,or++)createProperty$1(ir,or,tr[ar]);return ir.length=or,ir},global$a=global$q,uncurryThis$f=functionUncurryThis,DESCRIPTORS$9=descriptors,NATIVE_ARRAY_BUFFER=arrayBufferBasicDetection,FunctionName=functionName,createNonEnumerableProperty=createNonEnumerableProperty$9,defineBuiltInAccessor$6=defineBuiltInAccessor$7,defineBuiltIns$1=defineBuiltIns$2,fails$8=fails$s,anInstance$3=anInstance$4,toIntegerOrInfinity$1=toIntegerOrInfinity$7,toLength$1=toLength$5,toIndex$1=toIndex$2,IEEE754=ieee754,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,getOwnPropertyNames=objectGetOwnPropertyNames.f,arrayFill=arrayFill$1,arraySlice$2=arraySliceSimple,setToStringTag$3=setToStringTag$6,InternalStateModule$3=internalState,PROPER_FUNCTION_NAME$1=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,ARRAY_BUFFER$1="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH="Wrong length",WRONG_INDEX="Wrong index",getInternalArrayBufferState=InternalStateModule$3.getterFor(ARRAY_BUFFER$1),getInternalDataViewState=InternalStateModule$3.getterFor(DATA_VIEW),setInternalState$3=InternalStateModule$3.set,NativeArrayBuffer$1=global$a[ARRAY_BUFFER$1],$ArrayBuffer=NativeArrayBuffer$1,ArrayBufferPrototype$2=$ArrayBuffer&&$ArrayBuffer[PROTOTYPE],$DataView=global$a[DATA_VIEW],DataViewPrototype$2=$DataView&&$DataView[PROTOTYPE],ObjectPrototype=Object.prototype,Array$1=global$a.Array,RangeError$1=global$a.RangeError,fill=uncurryThis$f(arrayFill),reverse=uncurryThis$f([].reverse),packIEEE754=IEEE754.pack,unpackIEEE754=IEEE754.unpack,packInt8=function(tr){return[255&tr]},packInt16=function(tr){return[255&tr,tr>>8&255]},packInt32=function(tr){return[255&tr,tr>>8&255,tr>>16&255,tr>>24&255]},unpackInt32=function(tr){return tr[3]<<24|tr[2]<<16|tr[1]<<8|tr[0]},packFloat32=function(tr){return packIEEE754(tr,23,4)},packFloat64=function(tr){return packIEEE754(tr,52,8)},addGetter=function(tr,er,rr){defineBuiltInAccessor$6(tr[PROTOTYPE],er,{configurable:!0,get:function(){return rr(this)[er]}})},get=function(tr,er,rr,nr){var ar=toIndex$1(rr),sr=getInternalDataViewState(tr);if(ar+er>sr.byteLength)throw RangeError$1(WRONG_INDEX);var ir=sr.bytes,or=ar+sr.byteOffset,cr=arraySlice$2(ir,or,or+er);return nr?cr:reverse(cr)},set=function(tr,er,rr,nr,ar,sr){var ir=toIndex$1(rr),or=getInternalDataViewState(tr);if(ir+er>or.byteLength)throw RangeError$1(WRONG_INDEX);for(var cr=or.bytes,lr=ir+or.byteOffset,dr=nr(+ar),pr=0;pr<er;pr++)cr[lr+pr]=dr[sr?pr:er-pr-1]};if(NATIVE_ARRAY_BUFFER){var INCORRECT_ARRAY_BUFFER_NAME=PROPER_FUNCTION_NAME$1&&NativeArrayBuffer$1.name!==ARRAY_BUFFER$1;if(fails$8(function(){NativeArrayBuffer$1(1)})&&fails$8(function(){new NativeArrayBuffer$1(-1)})&&!fails$8(function(){return new NativeArrayBuffer$1,new NativeArrayBuffer$1(1.5),new NativeArrayBuffer$1(NaN),NativeArrayBuffer$1.length!=1||INCORRECT_ARRAY_BUFFER_NAME&&!CONFIGURABLE_FUNCTION_NAME}))INCORRECT_ARRAY_BUFFER_NAME&&CONFIGURABLE_FUNCTION_NAME&&createNonEnumerableProperty(NativeArrayBuffer$1,"name",ARRAY_BUFFER$1);else{$ArrayBuffer=function(tr){return anInstance$3(this,ArrayBufferPrototype$2),new NativeArrayBuffer$1(toIndex$1(tr))},$ArrayBuffer[PROTOTYPE]=ArrayBufferPrototype$2;for(var keys$1=getOwnPropertyNames(NativeArrayBuffer$1),j$2=0,key$1;keys$1.length>j$2;)(key$1=keys$1[j$2++])in $ArrayBuffer||createNonEnumerableProperty($ArrayBuffer,key$1,NativeArrayBuffer$1[key$1]);ArrayBufferPrototype$2.constructor=$ArrayBuffer}setPrototypeOf&&getPrototypeOf(DataViewPrototype$2)!==ObjectPrototype&&setPrototypeOf(DataViewPrototype$2,ObjectPrototype);var testView=new $DataView(new $ArrayBuffer(2)),$setInt8=uncurryThis$f(DataViewPrototype$2.setInt8);testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),!testView.getInt8(0)&&testView.getInt8(1)||defineBuiltIns$1(DataViewPrototype$2,{setInt8:function(tr,er){$setInt8(this,tr,er<<24>>24)},setUint8:function(tr,er){$setInt8(this,tr,er<<24>>24)}},{unsafe:!0})}else $ArrayBuffer=function(tr){anInstance$3(this,ArrayBufferPrototype$2);var er=toIndex$1(tr);setInternalState$3(this,{type:ARRAY_BUFFER$1,bytes:fill(Array$1(er),0),byteLength:er}),DESCRIPTORS$9||(this.byteLength=er,this.detached=!1)},ArrayBufferPrototype$2=$ArrayBuffer[PROTOTYPE],$DataView=function(tr,er,rr){anInstance$3(this,DataViewPrototype$2),anInstance$3(tr,ArrayBufferPrototype$2);var nr=getInternalArrayBufferState(tr),ar=nr.byteLength,sr=toIntegerOrInfinity$1(er);if(sr<0||sr>ar)throw RangeError$1("Wrong offset");if(sr+(rr=rr===void 0?ar-sr:toLength$1(rr))>ar)throw RangeError$1(WRONG_LENGTH);setInternalState$3(this,{type:DATA_VIEW,buffer:tr,byteLength:rr,byteOffset:sr,bytes:nr.bytes}),DESCRIPTORS$9||(this.buffer=tr,this.byteLength=rr,this.byteOffset=sr)},DataViewPrototype$2=$DataView[PROTOTYPE],DESCRIPTORS$9&&(addGetter($ArrayBuffer,"byteLength",getInternalArrayBufferState),addGetter($DataView,"buffer",getInternalDataViewState),addGetter($DataView,"byteLength",getInternalDataViewState),addGetter($DataView,"byteOffset",getInternalDataViewState)),defineBuiltIns$1(DataViewPrototype$2,{getInt8:function(tr){return get(this,1,tr)[0]<<24>>24},getUint8:function(tr){return get(this,1,tr)[0]},getInt16:function(tr){var er=get(this,2,tr,arguments.length>1?arguments[1]:void 0);return(er[1]<<8|er[0])<<16>>16},getUint16:function(tr){var er=get(this,2,tr,arguments.length>1?arguments[1]:void 0);return er[1]<<8|er[0]},getInt32:function(tr){return unpackInt32(get(this,4,tr,arguments.length>1?arguments[1]:void 0))},getUint32:function(tr){return unpackInt32(get(this,4,tr,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(tr){return unpackIEEE754(get(this,4,tr,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(tr){return unpackIEEE754(get(this,8,tr,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(tr,er){set(this,1,tr,packInt8,er)},setUint8:function(tr,er){set(this,1,tr,packInt8,er)},setInt16:function(tr,er){set(this,2,tr,packInt16,er,arguments.length>2?arguments[2]:void 0)},setUint16:function(tr,er){set(this,2,tr,packInt16,er,arguments.length>2?arguments[2]:void 0)},setInt32:function(tr,er){set(this,4,tr,packInt32,er,arguments.length>2?arguments[2]:void 0)},setUint32:function(tr,er){set(this,4,tr,packInt32,er,arguments.length>2?arguments[2]:void 0)},setFloat32:function(tr,er){set(this,4,tr,packFloat32,er,arguments.length>2?arguments[2]:void 0)},setFloat64:function(tr,er){set(this,8,tr,packFloat64,er,arguments.length>2?arguments[2]:void 0)}});setToStringTag$3($ArrayBuffer,ARRAY_BUFFER$1),setToStringTag$3($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},getBuiltIn$4=getBuiltIn$a,defineBuiltInAccessor$5=defineBuiltInAccessor$7,wellKnownSymbol$5=wellKnownSymbol$g,DESCRIPTORS$8=descriptors,SPECIES$1=wellKnownSymbol$5("species"),setSpecies$1=function(tr){var er=getBuiltIn$4(tr);DESCRIPTORS$8&&er&&!er[SPECIES$1]&&defineBuiltInAccessor$5(er,SPECIES$1,{configurable:!0,get:function(){return this}})},$$j=_export,global$9=global$q,arrayBufferModule=arrayBuffer,setSpecies=setSpecies$1,ARRAY_BUFFER="ArrayBuffer",ArrayBuffer$3=arrayBufferModule[ARRAY_BUFFER],NativeArrayBuffer=global$9[ARRAY_BUFFER];$$j({global:!0,constructor:!0,forced:NativeArrayBuffer!==ArrayBuffer$3},{ArrayBuffer:ArrayBuffer$3}),setSpecies(ARRAY_BUFFER);var uncurryThis$e=functionUncurryThis,fails$7=fails$s,isCallable$3=isCallable$o,classof$3=classof$9,getBuiltIn$3=getBuiltIn$a,inspectSource=inspectSource$2,noop=function(){},empty=[],construct=getBuiltIn$3("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$2=uncurryThis$e(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(tr){if(!isCallable$3(tr))return!1;try{return construct(noop,empty,tr),!0}catch(er){return!1}},isConstructorLegacy=function(tr){if(!isCallable$3(tr))return!1;switch(classof$3(tr)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$2(constructorRegExp,inspectSource(tr))}catch(er){return!0}};isConstructorLegacy.sham=!0;var isConstructor$2=!construct||fails$7(function(){var tr;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){tr=!0})||tr})?isConstructorLegacy:isConstructorModern,isConstructor$1=isConstructor$2,tryToString$1=tryToString$3,$TypeError$5=TypeError,aConstructor$1=function(tr){if(isConstructor$1(tr))return tr;throw $TypeError$5(tryToString$1(tr)+" is not a constructor")},anObject$7=anObject$g,aConstructor=aConstructor$1,isNullOrUndefined$1=isNullOrUndefined$5,wellKnownSymbol$4=wellKnownSymbol$g,SPECIES=wellKnownSymbol$4("species"),speciesConstructor$2=function(tr,er){var rr,nr=anObject$7(tr).constructor;return nr===void 0||isNullOrUndefined$1(rr=anObject$7(nr)[SPECIES])?er:aConstructor(rr)},$$i=_export,uncurryThis$d=functionUncurryThisClause,fails$6=fails$s,ArrayBufferModule=arrayBuffer,anObject$6=anObject$g,toAbsoluteIndex=toAbsoluteIndex$4,toLength=toLength$5,speciesConstructor$1=speciesConstructor$2,ArrayBuffer$2=ArrayBufferModule.ArrayBuffer,DataView$2=ArrayBufferModule.DataView,DataViewPrototype$1=DataView$2.prototype,nativeArrayBufferSlice=uncurryThis$d(ArrayBuffer$2.prototype.slice),getUint8=uncurryThis$d(DataViewPrototype$1.getUint8),setUint8=uncurryThis$d(DataViewPrototype$1.setUint8),INCORRECT_SLICE=fails$6(function(){return!new ArrayBuffer$2(2).slice(1,void 0).byteLength});$$i({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:INCORRECT_SLICE},{slice:function(tr,er){if(nativeArrayBufferSlice&&er===void 0)return nativeArrayBufferSlice(anObject$6(this),tr);for(var rr=anObject$6(this).byteLength,nr=toAbsoluteIndex(tr,rr),ar=toAbsoluteIndex(er===void 0?rr:er,rr),sr=new(speciesConstructor$1(this,ArrayBuffer$2))(toLength(ar-nr)),ir=new DataView$2(this),or=new DataView$2(sr),cr=0;nr<ar;)setUint8(or,cr++,getUint8(ir,nr++));return sr}});var uncurryThisAccessor$2=functionUncurryThisAccessor,classof$2=classofRaw$2,$TypeError$4=TypeError,arrayBufferByteLength$2=uncurryThisAccessor$2(ArrayBuffer.prototype,"byteLength","get")||function(tr){if(classof$2(tr)!="ArrayBuffer")throw $TypeError$4("ArrayBuffer expected");return tr.byteLength},uncurryThis$c=functionUncurryThis,arrayBufferByteLength$1=arrayBufferByteLength$2,slice$1=uncurryThis$c(ArrayBuffer.prototype.slice),arrayBufferIsDetached=function(tr){if(arrayBufferByteLength$1(tr)!==0)return!1;try{return slice$1(tr,0,0),!1}catch(er){return!0}},DESCRIPTORS$7=descriptors,defineBuiltInAccessor$4=defineBuiltInAccessor$7,isDetached$1=arrayBufferIsDetached,ArrayBufferPrototype$1=ArrayBuffer.prototype;DESCRIPTORS$7&&!("detached"in ArrayBufferPrototype$1)&&defineBuiltInAccessor$4(ArrayBufferPrototype$1,"detached",{configurable:!0,get:function(){return isDetached$1(this)}});var engineIsDeno=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",IS_DENO$1=engineIsDeno,IS_NODE$1=engineIsNode,engineIsBrowser=!IS_DENO$1&&!IS_NODE$1&&typeof window=="object"&&typeof document=="object",global$8=global$q,fails$5=fails$s,V8=engineV8Version,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,IS_NODE=engineIsNode,structuredClone$1=global$8.structuredClone,structuredCloneProperTransfer=!!structuredClone$1&&!fails$5(function(){if(IS_DENO&&V8>92||IS_NODE&&V8>94||IS_BROWSER&&V8>97)return!1;var tr=new ArrayBuffer(8),er=structuredClone$1(tr,{transfer:[tr]});return tr.byteLength!=0||er.byteLength!=8}),global$7=global$q,uncurryThis$b=functionUncurryThis,uncurryThisAccessor$1=functionUncurryThisAccessor,toIndex=toIndex$2,isDetached=arrayBufferIsDetached,arrayBufferByteLength=arrayBufferByteLength$2,PROPER_TRANSFER=structuredCloneProperTransfer,TypeError$3=global$7.TypeError,structuredClone=global$7.structuredClone,ArrayBuffer$1=global$7.ArrayBuffer,DataView$1=global$7.DataView,min=Math.min,ArrayBufferPrototype=ArrayBuffer$1.prototype,DataViewPrototype=DataView$1.prototype,slice=uncurryThis$b(ArrayBufferPrototype.slice),isResizable=uncurryThisAccessor$1(ArrayBufferPrototype,"resizable","get"),maxByteLength=uncurryThisAccessor$1(ArrayBufferPrototype,"maxByteLength","get"),getInt8=uncurryThis$b(DataViewPrototype.getInt8),setInt8=uncurryThis$b(DataViewPrototype.setInt8),arrayBufferTransfer=PROPER_TRANSFER&&function(tr,er,rr){var nr=arrayBufferByteLength(tr),ar=er===void 0?nr:min(toIndex(er),nr),sr=!isResizable||!isResizable(tr);if(isDetached(tr))throw TypeError$3("ArrayBuffer is detached");var ir=structuredClone(tr,{transfer:[tr]});if(nr==ar&&(rr||sr))return ir;if(!rr||sr)return slice(ir,0,ar);for(var or=new ArrayBuffer$1(ar,maxByteLength&&{maxByteLength:maxByteLength(ir)}),cr=new DataView$1(ir),lr=new DataView$1(or),dr=0;dr<ar;dr++)setInt8(lr,dr,getInt8(cr,dr));return or},$$h=_export,$transfer$1=arrayBufferTransfer;$transfer$1&&$$h({target:"ArrayBuffer",proto:!0},{transfer:function(){return $transfer$1(this,arguments.length?arguments[0]:void 0,!0)}});var $$g=_export,$transfer=arrayBufferTransfer;$transfer&&$$g({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return $transfer(this,arguments.length?arguments[0]:void 0,!1)}});var charAt$2=stringMultibyte.charAt,toString$2=toString$8,InternalStateModule$2=internalState,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$2,STRING_ITERATOR="String Iterator",setInternalState$2=InternalStateModule$2.set,getInternalState=InternalStateModule$2.getterFor(STRING_ITERATOR);defineIterator(String,"String",function(tr){setInternalState$2(this,{type:STRING_ITERATOR,string:toString$2(tr),index:0})},function(){var tr,er=getInternalState(this),rr=er.string,nr=er.index;return nr>=rr.length?createIterResultObject(void 0,!0):(tr=charAt$2(rr,nr),er.index+=tr.length,createIterResultObject(tr,!1))});var fails$4=fails$s,wellKnownSymbol$3=wellKnownSymbol$g,DESCRIPTORS$6=descriptors,IS_PURE=isPure,ITERATOR$3=wellKnownSymbol$3("iterator"),urlConstructorDetection=!fails$4(function(){var tr=new URL("b?a=1&b=2&c=3","http://a"),er=tr.searchParams,rr="";return tr.pathname="c%20d",er.forEach(function(nr,ar){er.delete("b"),rr+=ar+nr}),IS_PURE&&!tr.toJSON||!er.size&&(IS_PURE||!DESCRIPTORS$6)||!er.sort||tr.href!=="http://a/c%20d?a=1&c=3"||er.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!er[ITERATOR$3]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||rr!=="a1c3"||new URL("http://x",void 0).host!=="x"}),uncurryThis$a=functionUncurryThisClause,aCallable$3=aCallable$7,NATIVE_BIND=functionBindNative,bind$3=uncurryThis$a(uncurryThis$a.bind),functionBindContext=function(tr,er){return aCallable$3(tr),er===void 0?tr:NATIVE_BIND?bind$3(tr,er):function(){return tr.apply(er,arguments)}},DESCRIPTORS$5=descriptors,uncurryThis$9=functionUncurryThis,call$7=functionCall,fails$3=fails$s,objectKeys=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$8,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$1=Object.defineProperty,concat=uncurryThis$9([].concat),objectAssign=!$assign||fails$3(function(){if(DESCRIPTORS$5&&$assign({b:1},$assign(defineProperty$1({},"a",{enumerable:!0,get:function(){defineProperty$1(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var tr={},er={},rr=Symbol(),nr="abcdefghijklmnopqrst";return tr[rr]=7,nr.split("").forEach(function(ar){er[ar]=ar}),$assign({},tr)[rr]!=7||objectKeys($assign({},er)).join("")!=nr})?function(tr,er){for(var rr=toObject$1(tr),nr=arguments.length,ar=1,sr=getOwnPropertySymbolsModule.f,ir=propertyIsEnumerableModule.f;nr>ar;)for(var or,cr=IndexedObject(arguments[ar++]),lr=sr?concat(objectKeys(cr),sr(cr)):objectKeys(cr),dr=lr.length,pr=0;dr>pr;)or=lr[pr++],DESCRIPTORS$5&&!call$7(ir,cr,or)||(rr[or]=cr[or]);return rr}:$assign,call$6=functionCall,anObject$5=anObject$g,getMethod$1=getMethod$4,iteratorClose$3=function(tr,er,rr){var nr,ar;anObject$5(tr);try{if(!(nr=getMethod$1(tr,"return"))){if(er==="throw")throw rr;return rr}nr=call$6(nr,tr)}catch(sr){ar=!0,nr=sr}if(er==="throw")throw rr;if(ar)throw nr;return anObject$5(nr),rr},anObject$4=anObject$g,iteratorClose$2=iteratorClose$3,callWithSafeIterationClosing$1=function(tr,er,rr,nr){try{return nr?er(anObject$4(rr)[0],rr[1]):er(rr)}catch(ar){iteratorClose$2(tr,"throw",ar)}},wellKnownSymbol$2=wellKnownSymbol$g,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$2("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(tr){return tr!==void 0&&(Iterators$1.Array===tr||ArrayPrototype[ITERATOR$2]===tr)},classof$1=classof$9,getMethod=getMethod$4,isNullOrUndefined=isNullOrUndefined$5,Iterators=iterators,wellKnownSymbol$1=wellKnownSymbol$g,ITERATOR$1=wellKnownSymbol$1("iterator"),getIteratorMethod$3=function(tr){if(!isNullOrUndefined(tr))return getMethod(tr,ITERATOR$1)||getMethod(tr,"@@iterator")||Iterators[classof$1(tr)]},call$5=functionCall,aCallable$2=aCallable$7,anObject$3=anObject$g,tryToString=tryToString$3,getIteratorMethod$2=getIteratorMethod$3,$TypeError$3=TypeError,getIterator$2=function(tr,er){var rr=arguments.length<2?getIteratorMethod$2(tr):er;if(aCallable$2(rr))return anObject$3(call$5(rr,tr));throw $TypeError$3(tryToString(tr)+" is not iterable")},bind$2=functionBindContext,call$4=functionCall,toObject=toObject$8,callWithSafeIterationClosing=callWithSafeIterationClosing$1,isArrayIteratorMethod=isArrayIteratorMethod$1,isConstructor=isConstructor$2,lengthOfArrayLike=lengthOfArrayLike$6,createProperty=createProperty$2,getIterator$1=getIterator$2,getIteratorMethod$1=getIteratorMethod$3,$Array=Array,arrayFrom$1=function(tr){var er=toObject(tr),rr=isConstructor(this),nr=arguments.length,ar=nr>1?arguments[1]:void 0,sr=ar!==void 0;sr&&(ar=bind$2(ar,nr>2?arguments[2]:void 0));var ir,or,cr,lr,dr,pr,hr=getIteratorMethod$1(er),fr=0;if(!hr||this===$Array&&isArrayIteratorMethod(hr))for(ir=lengthOfArrayLike(er),or=rr?new this(ir):$Array(ir);ir>fr;fr++)pr=sr?ar(er[fr],fr):er[fr],createProperty(or,fr,pr);else for(dr=(lr=getIterator$1(er,hr)).next,or=rr?new this:[];!(cr=call$4(dr,lr)).done;fr++)pr=sr?callWithSafeIterationClosing(lr,ar,[cr.value,fr],!0):cr.value,createProperty(or,fr,pr);return or.length=fr,or},uncurryThis$8=functionUncurryThis,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,$RangeError=RangeError,exec$1=uncurryThis$8(regexSeparators.exec),floor$2=Math.floor,fromCharCode=String.fromCharCode,charCodeAt=uncurryThis$8("".charCodeAt),join$2=uncurryThis$8([].join),push$2=uncurryThis$8([].push),replace$4=uncurryThis$8("".replace),split$2=uncurryThis$8("".split),toLowerCase$1=uncurryThis$8("".toLowerCase),ucs2decode=function(tr){for(var er=[],rr=0,nr=tr.length;rr<nr;){var ar=charCodeAt(tr,rr++);if(ar>=55296&&ar<=56319&&rr<nr){var sr=charCodeAt(tr,rr++);(64512&sr)==56320?push$2(er,((1023&ar)<<10)+(1023&sr)+65536):(push$2(er,ar),rr--)}else push$2(er,ar)}return er},digitToBasic=function(tr){return tr+22+75*(tr<26)},adapt=function(tr,er,rr){var nr=0;for(tr=rr?floor$2(tr/damp):tr>>1,tr+=floor$2(tr/er);tr>baseMinusTMin*tMax>>1;)tr=floor$2(tr/baseMinusTMin),nr+=base;return floor$2(nr+(baseMinusTMin+1)*tr/(tr+skew))},encode=function(tr){var er,rr,nr=[],ar=(tr=ucs2decode(tr)).length,sr=initialN,ir=0,or=initialBias;for(er=0;er<tr.length;er++)(rr=tr[er])<128&&push$2(nr,fromCharCode(rr));var cr=nr.length,lr=cr;for(cr&&push$2(nr,delimiter);lr<ar;){var dr=maxInt;for(er=0;er<tr.length;er++)(rr=tr[er])>=sr&&rr<dr&&(dr=rr);var pr=lr+1;if(dr-sr>floor$2((maxInt-ir)/pr))throw $RangeError(OVERFLOW_ERROR);for(ir+=(dr-sr)*pr,sr=dr,er=0;er<tr.length;er++){if((rr=tr[er])<sr&&++ir>maxInt)throw $RangeError(OVERFLOW_ERROR);if(rr==sr){for(var hr=ir,fr=base;;){var mr=fr<=or?tMin:fr>=or+tMax?tMax:fr-or;if(hr<mr)break;var gr=hr-mr,vr=base-mr;push$2(nr,fromCharCode(digitToBasic(mr+gr%vr))),hr=floor$2(gr/vr),fr+=base}push$2(nr,fromCharCode(digitToBasic(hr))),or=adapt(ir,pr,lr==cr),ir=0,lr++}}ir++,sr++}return join$2(nr,"")},stringPunycodeToAscii=function(tr){var er,rr,nr=[],ar=split$2(replace$4(toLowerCase$1(tr),regexSeparators,"."),".");for(er=0;er<ar.length;er++)rr=ar[er],push$2(nr,exec$1(regexNonASCII,rr)?"xn--"+encode(rr):rr);return join$2(nr,".")},$TypeError$2=TypeError,validateArgumentsLength$2=function(tr,er){if(tr<er)throw $TypeError$2("Not enough arguments");return tr},arraySlice$1=arraySliceSimple,floor$1=Math.floor,mergeSort=function(tr,er){var rr=tr.length,nr=floor$1(rr/2);return rr<8?insertionSort(tr,er):merge(tr,mergeSort(arraySlice$1(tr,0,nr),er),mergeSort(arraySlice$1(tr,nr),er),er)},insertionSort=function(tr,er){for(var rr,nr,ar=tr.length,sr=1;sr<ar;){for(nr=sr,rr=tr[sr];nr&&er(tr[nr-1],rr)>0;)tr[nr]=tr[--nr];nr!==sr++&&(tr[nr]=rr)}return tr},merge=function(tr,er,rr,nr){for(var ar=er.length,sr=rr.length,ir=0,or=0;ir<ar||or<sr;)tr[ir+or]=ir<ar&&or<sr?nr(er[ir],rr[or])<=0?er[ir++]:rr[or++]:ir<ar?er[ir++]:rr[or++];return tr},arraySort$1=mergeSort,$$f=_export,global$6=global$q,call$3=functionCall,uncurryThis$7=functionUncurryThis,DESCRIPTORS$4=descriptors,USE_NATIVE_URL$1=urlConstructorDetection,defineBuiltIn$2=defineBuiltIn$8,defineBuiltInAccessor$3=defineBuiltInAccessor$7,defineBuiltIns=defineBuiltIns$2,setToStringTag$2=setToStringTag$6,createIteratorConstructor=iteratorCreateConstructor,InternalStateModule$1=internalState,anInstance$2=anInstance$4,isCallable$2=isCallable$o,hasOwn$3=hasOwnProperty_1,bind$1=functionBindContext,classof=classof$9,anObject$2=anObject$g,isObject$1=isObject$a,$toString$1=toString$8,create=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$7,getIterator=getIterator$2,getIteratorMethod=getIteratorMethod$3,validateArgumentsLength$1=validateArgumentsLength$2,wellKnownSymbol=wellKnownSymbol$g,arraySort=arraySort$1,ITERATOR=wellKnownSymbol("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$1=InternalStateModule$1.set,getInternalParamsState=InternalStateModule$1.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=InternalStateModule$1.getterFor(URL_SEARCH_PARAMS_ITERATOR),getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(tr){if(!DESCRIPTORS$4)return global$6[tr];var er=getOwnPropertyDescriptor(global$6,tr);return er&&er.value},nativeFetch=safeGetBuiltIn("fetch"),NativeRequest=safeGetBuiltIn("Request"),Headers$1=safeGetBuiltIn("Headers"),RequestPrototype=NativeRequest&&NativeRequest.prototype,HeadersPrototype=Headers$1&&Headers$1.prototype,RegExp$1=global$6.RegExp,TypeError$2=global$6.TypeError,decodeURIComponent=global$6.decodeURIComponent,encodeURIComponent$1=global$6.encodeURIComponent,charAt$1=uncurryThis$7("".charAt),join$1=uncurryThis$7([].join),push$1=uncurryThis$7([].push),replace$3=uncurryThis$7("".replace),shift$1=uncurryThis$7([].shift),splice=uncurryThis$7([].splice),split$1=uncurryThis$7("".split),stringSlice$2=uncurryThis$7("".slice),plus=/\+/g,sequences=Array(4),percentSequence=function(tr){return sequences[tr-1]||(sequences[tr-1]=RegExp$1("((?:%[\\da-f]{2}){"+tr+"})","gi"))},percentDecode=function(tr){try{return decodeURIComponent(tr)}catch(er){return tr}},deserialize=function(tr){var er=replace$3(tr,plus," "),rr=4;try{return decodeURIComponent(er)}catch(nr){for(;rr;)er=replace$3(er,percentSequence(rr--),percentDecode);return er}},find=/[!'()~]|%20/g,replacements={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(tr){return replacements[tr]},serialize=function(tr){return replace$3(encodeURIComponent$1(tr),find,replacer)},URLSearchParamsIterator=createIteratorConstructor(function(tr,er){setInternalState$1(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(tr).entries),kind:er})},"Iterator",function(){var tr=getInternalIteratorState(this),er=tr.kind,rr=tr.iterator.next(),nr=rr.value;return rr.done||(rr.value=er==="keys"?nr.key:er==="values"?nr.value:[nr.key,nr.value]),rr},!0),URLSearchParamsState=function(tr){this.entries=[],this.url=null,tr!==void 0&&(isObject$1(tr)?this.parseObject(tr):this.parseQuery(typeof tr=="string"?charAt$1(tr,0)==="?"?stringSlice$2(tr,1):tr:$toString$1(tr)))};URLSearchParamsState.prototype={type:URL_SEARCH_PARAMS,bindURL:function(tr){this.url=tr,this.update()},parseObject:function(tr){var er,rr,nr,ar,sr,ir,or,cr=getIteratorMethod(tr);if(cr)for(rr=(er=getIterator(tr,cr)).next;!(nr=call$3(rr,er)).done;){if(sr=(ar=getIterator(anObject$2(nr.value))).next,(ir=call$3(sr,ar)).done||(or=call$3(sr,ar)).done||!call$3(sr,ar).done)throw TypeError$2("Expected sequence with length 2");push$1(this.entries,{key:$toString$1(ir.value),value:$toString$1(or.value)})}else for(var lr in tr)hasOwn$3(tr,lr)&&push$1(this.entries,{key:lr,value:$toString$1(tr[lr])})},parseQuery:function(tr){if(tr)for(var er,rr,nr=split$1(tr,"&"),ar=0;ar<nr.length;)(er=nr[ar++]).length&&(rr=split$1(er,"="),push$1(this.entries,{key:deserialize(shift$1(rr)),value:deserialize(join$1(rr,"="))}))},serialize:function(){for(var tr,er=this.entries,rr=[],nr=0;nr<er.length;)tr=er[nr++],push$1(rr,serialize(tr.key)+"="+serialize(tr.value));return join$1(rr,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var URLSearchParamsConstructor=function(){anInstance$2(this,URLSearchParamsPrototype$1);var tr=setInternalState$1(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));DESCRIPTORS$4||(this.length=tr.entries.length)},URLSearchParamsPrototype$1=URLSearchParamsConstructor.prototype;if(defineBuiltIns(URLSearchParamsPrototype$1,{append:function(tr,er){validateArgumentsLength$1(arguments.length,2);var rr=getInternalParamsState(this);push$1(rr.entries,{key:$toString$1(tr),value:$toString$1(er)}),DESCRIPTORS$4||this.length++,rr.updateURL()},delete:function(tr){validateArgumentsLength$1(arguments.length,1);for(var er=getInternalParamsState(this),rr=er.entries,nr=$toString$1(tr),ar=0;ar<rr.length;)rr[ar].key===nr?splice(rr,ar,1):ar++;DESCRIPTORS$4||(this.length=rr.length),er.updateURL()},get:function(tr){validateArgumentsLength$1(arguments.length,1);for(var er=getInternalParamsState(this).entries,rr=$toString$1(tr),nr=0;nr<er.length;nr++)if(er[nr].key===rr)return er[nr].value;return null},getAll:function(tr){validateArgumentsLength$1(arguments.length,1);for(var er=getInternalParamsState(this).entries,rr=$toString$1(tr),nr=[],ar=0;ar<er.length;ar++)er[ar].key===rr&&push$1(nr,er[ar].value);return nr},has:function(tr){validateArgumentsLength$1(arguments.length,1);for(var er=getInternalParamsState(this).entries,rr=$toString$1(tr),nr=0;nr<er.length;)if(er[nr++].key===rr)return!0;return!1},set:function(tr,er){validateArgumentsLength$1(arguments.length,1);for(var rr,nr=getInternalParamsState(this),ar=nr.entries,sr=!1,ir=$toString$1(tr),or=$toString$1(er),cr=0;cr<ar.length;cr++)(rr=ar[cr]).key===ir&&(sr?splice(ar,cr--,1):(sr=!0,rr.value=or));sr||push$1(ar,{key:ir,value:or}),DESCRIPTORS$4||(this.length=ar.length),nr.updateURL()},sort:function(){var tr=getInternalParamsState(this);arraySort(tr.entries,function(er,rr){return er.key>rr.key?1:-1}),tr.updateURL()},forEach:function(tr){for(var er,rr=getInternalParamsState(this).entries,nr=bind$1(tr,arguments.length>1?arguments[1]:void 0),ar=0;ar<rr.length;)nr((er=rr[ar++]).value,er.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0}),defineBuiltIn$2(URLSearchParamsPrototype$1,ITERATOR,URLSearchParamsPrototype$1.entries,{name:"entries"}),defineBuiltIn$2(URLSearchParamsPrototype$1,"toString",function(){return getInternalParamsState(this).serialize()},{enumerable:!0}),DESCRIPTORS$4&&defineBuiltInAccessor$3(URLSearchParamsPrototype$1,"size",{get:function(){return getInternalParamsState(this).entries.length},configurable:!0,enumerable:!0}),setToStringTag$2(URLSearchParamsConstructor,URL_SEARCH_PARAMS),$$f({global:!0,constructor:!0,forced:!USE_NATIVE_URL$1},{URLSearchParams:URLSearchParamsConstructor}),!USE_NATIVE_URL$1&&isCallable$2(Headers$1)){var headersHas=uncurryThis$7(HeadersPrototype.has),headersSet=uncurryThis$7(HeadersPrototype.set),wrapRequestOptions=function(tr){if(isObject$1(tr)){var er,rr=tr.body;if(classof(rr)===URL_SEARCH_PARAMS)return er=tr.headers?new Headers$1(tr.headers):new Headers$1,headersHas(er,"content-type")||headersSet(er,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),create(tr,{body:createPropertyDescriptor$1(0,$toString$1(rr)),headers:createPropertyDescriptor$1(0,er)})}return tr};if(isCallable$2(nativeFetch)&&$$f({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(tr){return nativeFetch(tr,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),isCallable$2(NativeRequest)){var RequestConstructor=function(tr){return anInstance$2(this,RequestPrototype),new NativeRequest(tr,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,$$f({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:RequestConstructor})}}var web_urlSearchParams_constructor={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},$$e=_export,DESCRIPTORS$3=descriptors,USE_NATIVE_URL=urlConstructorDetection,global$5=global$q,bind=functionBindContext,uncurryThis$6=functionUncurryThis,defineBuiltIn$1=defineBuiltIn$8,defineBuiltInAccessor$2=defineBuiltInAccessor$7,anInstance$1=anInstance$4,hasOwn$2=hasOwnProperty_1,assign=objectAssign,arrayFrom=arrayFrom$1,arraySlice=arraySliceSimple,codeAt=stringMultibyte.codeAt,toASCII=stringPunycodeToAscii,$toString=toString$8,setToStringTag$1=setToStringTag$6,validateArgumentsLength=validateArgumentsLength$2,URLSearchParamsModule=web_urlSearchParams_constructor,InternalStateModule=internalState,setInternalState=InternalStateModule.set,getInternalURLState=InternalStateModule.getterFor("URL"),URLSearchParams$1=URLSearchParamsModule.URLSearchParams,getInternalSearchParamsState=URLSearchParamsModule.getState,NativeURL=global$5.URL,TypeError$1=global$5.TypeError,parseInt$1=global$5.parseInt,floor=Math.floor,pow=Math.pow,charAt=uncurryThis$6("".charAt),exec=uncurryThis$6(/./.exec),join=uncurryThis$6([].join),numberToString=uncurryThis$6(1 .toString),pop=uncurryThis$6([].pop),push=uncurryThis$6([].push),replace$2=uncurryThis$6("".replace),shift=uncurryThis$6([].shift),split=uncurryThis$6("".split),stringSlice$1=uncurryThis$6("".slice),toLowerCase=uncurryThis$6("".toLowerCase),unshift=uncurryThis$6([].unshift),INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[a-z]/i,ALPHANUMERIC=/[\d+-.a-z]/i,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\da-f]+$/i,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+/,TRAILING_C0_CONTROL_OR_SPACE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,TAB_AND_NEW_LINE=/[\t\n\r]/g,EOF,parseIPv4=function(tr){var er,rr,nr,ar,sr,ir,or,cr=split(tr,".");if(cr.length&&cr[cr.length-1]==""&&cr.length--,(er=cr.length)>4)return tr;for(rr=[],nr=0;nr<er;nr++){if((ar=cr[nr])=="")return tr;if(sr=10,ar.length>1&&charAt(ar,0)=="0"&&(sr=exec(HEX_START,ar)?16:8,ar=stringSlice$1(ar,sr==8?1:2)),ar==="")ir=0;else{if(!exec(sr==10?DEC:sr==8?OCT:HEX,ar))return tr;ir=parseInt$1(ar,sr)}push(rr,ir)}for(nr=0;nr<er;nr++)if(ir=rr[nr],nr==er-1){if(ir>=pow(256,5-er))return null}else if(ir>255)return null;for(or=pop(rr),nr=0;nr<rr.length;nr++)or+=rr[nr]*pow(256,3-nr);return or},parseIPv6=function(tr){var er,rr,nr,ar,sr,ir,or,cr=[0,0,0,0,0,0,0,0],lr=0,dr=null,pr=0,hr=function(){return charAt(tr,pr)};if(hr()==":"){if(charAt(tr,1)!=":")return;pr+=2,dr=++lr}for(;hr();){if(lr==8)return;if(hr()!=":"){for(er=rr=0;rr<4&&exec(HEX,hr());)er=16*er+parseInt$1(hr(),16),pr++,rr++;if(hr()=="."){if(rr==0||(pr-=rr,lr>6))return;for(nr=0;hr();){if(ar=null,nr>0){if(!(hr()=="."&&nr<4))return;pr++}if(!exec(DIGIT,hr()))return;for(;exec(DIGIT,hr());){if(sr=parseInt$1(hr(),10),ar===null)ar=sr;else{if(ar==0)return;ar=10*ar+sr}if(ar>255)return;pr++}cr[lr]=256*cr[lr]+ar,++nr!=2&&nr!=4||lr++}if(nr!=4)return;break}if(hr()==":"){if(pr++,!hr())return}else if(hr())return;cr[lr++]=er}else{if(dr!==null)return;pr++,dr=++lr}}if(dr!==null)for(ir=lr-dr,lr=7;lr!=0&&ir>0;)or=cr[lr],cr[lr--]=cr[dr+ir-1],cr[dr+--ir]=or;else if(lr!=8)return;return cr},findLongestZeroSequence=function(tr){for(var er=null,rr=1,nr=null,ar=0,sr=0;sr<8;sr++)tr[sr]!==0?(ar>rr&&(er=nr,rr=ar),nr=null,ar=0):(nr===null&&(nr=sr),++ar);return ar>rr&&(er=nr,rr=ar),er},serializeHost=function(tr){var er,rr,nr,ar;if(typeof tr=="number"){for(er=[],rr=0;rr<4;rr++)unshift(er,tr%256),tr=floor(tr/256);return join(er,".")}if(typeof tr=="object"){for(er="",nr=findLongestZeroSequence(tr),rr=0;rr<8;rr++)ar&&tr[rr]===0||(ar&&(ar=!1),nr===rr?(er+=rr?":":"::",ar=!0):(er+=numberToString(tr[rr],16),rr<7&&(er+=":")));return"["+er+"]"}return tr},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=assign({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=assign({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=assign({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(tr,er){var rr=codeAt(tr,0);return rr>32&&rr<127&&!hasOwn$2(er,tr)?tr:encodeURIComponent(tr)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(tr,er){var rr;return tr.length==2&&exec(ALPHA,charAt(tr,0))&&((rr=charAt(tr,1))==":"||!er&&rr=="|")},startsWithWindowsDriveLetter=function(tr){var er;return tr.length>1&&isWindowsDriveLetter(stringSlice$1(tr,0,2))&&(tr.length==2||(er=charAt(tr,2))==="/"||er==="\\"||er==="?"||er==="#")},isSingleDot=function(tr){return tr==="."||toLowerCase(tr)==="%2e"},isDoubleDot=function(tr){return(tr=toLowerCase(tr))===".."||tr==="%2e."||tr===".%2e"||tr==="%2e%2e"},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},URLState=function(tr,er,rr){var nr,ar,sr,ir=$toString(tr);if(er){if(ar=this.parse(ir))throw TypeError$1(ar);this.searchParams=null}else{if(rr!==void 0&&(nr=new URLState(rr,!0)),ar=this.parse(ir,null,nr))throw TypeError$1(ar);(sr=getInternalSearchParamsState(new URLSearchParams$1)).bindURL(this),this.searchParams=sr}};URLState.prototype={type:"URL",parse:function(tr,er,rr){var nr,ar,sr,ir,or=this,cr=er||SCHEME_START,lr=0,dr="",pr=!1,hr=!1,fr=!1;for(tr=$toString(tr),er||(or.scheme="",or.username="",or.password="",or.host=null,or.port=null,or.path=[],or.query=null,or.fragment=null,or.cannotBeABaseURL=!1,tr=replace$2(tr,LEADING_C0_CONTROL_OR_SPACE,""),tr=replace$2(tr,TRAILING_C0_CONTROL_OR_SPACE,"$1")),tr=replace$2(tr,TAB_AND_NEW_LINE,""),nr=arrayFrom(tr);lr<=nr.length;){switch(ar=nr[lr],cr){case SCHEME_START:if(!ar||!exec(ALPHA,ar)){if(er)return INVALID_SCHEME;cr=NO_SCHEME;continue}dr+=toLowerCase(ar),cr=SCHEME;break;case SCHEME:if(ar&&(exec(ALPHANUMERIC,ar)||ar=="+"||ar=="-"||ar=="."))dr+=toLowerCase(ar);else{if(ar!=":"){if(er)return INVALID_SCHEME;dr="",cr=NO_SCHEME,lr=0;continue}if(er&&(or.isSpecial()!=hasOwn$2(specialSchemes,dr)||dr=="file"&&(or.includesCredentials()||or.port!==null)||or.scheme=="file"&&!or.host))return;if(or.scheme=dr,er)return void(or.isSpecial()&&specialSchemes[or.scheme]==or.port&&(or.port=null));dr="",or.scheme=="file"?cr=FILE:or.isSpecial()&&rr&&rr.scheme==or.scheme?cr=SPECIAL_RELATIVE_OR_AUTHORITY:or.isSpecial()?cr=SPECIAL_AUTHORITY_SLASHES:nr[lr+1]=="/"?(cr=PATH_OR_AUTHORITY,lr++):(or.cannotBeABaseURL=!0,push(or.path,""),cr=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!rr||rr.cannotBeABaseURL&&ar!="#")return INVALID_SCHEME;if(rr.cannotBeABaseURL&&ar=="#"){or.scheme=rr.scheme,or.path=arraySlice(rr.path),or.query=rr.query,or.fragment="",or.cannotBeABaseURL=!0,cr=FRAGMENT;break}cr=rr.scheme=="file"?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if(ar!="/"||nr[lr+1]!="/"){cr=RELATIVE;continue}cr=SPECIAL_AUTHORITY_IGNORE_SLASHES,lr++;break;case PATH_OR_AUTHORITY:if(ar=="/"){cr=AUTHORITY;break}cr=PATH;continue;case RELATIVE:if(or.scheme=rr.scheme,ar==EOF)or.username=rr.username,or.password=rr.password,or.host=rr.host,or.port=rr.port,or.path=arraySlice(rr.path),or.query=rr.query;else if(ar=="/"||ar=="\\"&&or.isSpecial())cr=RELATIVE_SLASH;else if(ar=="?")or.username=rr.username,or.password=rr.password,or.host=rr.host,or.port=rr.port,or.path=arraySlice(rr.path),or.query="",cr=QUERY;else{if(ar!="#"){or.username=rr.username,or.password=rr.password,or.host=rr.host,or.port=rr.port,or.path=arraySlice(rr.path),or.path.length--,cr=PATH;continue}or.username=rr.username,or.password=rr.password,or.host=rr.host,or.port=rr.port,or.path=arraySlice(rr.path),or.query=rr.query,or.fragment="",cr=FRAGMENT}break;case RELATIVE_SLASH:if(!or.isSpecial()||ar!="/"&&ar!="\\"){if(ar!="/"){or.username=rr.username,or.password=rr.password,or.host=rr.host,or.port=rr.port,cr=PATH;continue}cr=AUTHORITY}else cr=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(cr=SPECIAL_AUTHORITY_IGNORE_SLASHES,ar!="/"||charAt(dr,lr+1)!="/")continue;lr++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if(ar!="/"&&ar!="\\"){cr=AUTHORITY;continue}break;case AUTHORITY:if(ar=="@"){pr&&(dr="%40"+dr),pr=!0,sr=arrayFrom(dr);for(var mr=0;mr<sr.length;mr++){var gr=sr[mr];if(gr!=":"||fr){var vr=percentEncode(gr,userinfoPercentEncodeSet);fr?or.password+=vr:or.username+=vr}else fr=!0}dr=""}else if(ar==EOF||ar=="/"||ar=="?"||ar=="#"||ar=="\\"&&or.isSpecial()){if(pr&&dr=="")return INVALID_AUTHORITY;lr-=arrayFrom(dr).length+1,dr="",cr=HOST}else dr+=ar;break;case HOST:case HOSTNAME:if(er&&or.scheme=="file"){cr=FILE_HOST;continue}if(ar!=":"||hr){if(ar==EOF||ar=="/"||ar=="?"||ar=="#"||ar=="\\"&&or.isSpecial()){if(or.isSpecial()&&dr=="")return INVALID_HOST;if(er&&dr==""&&(or.includesCredentials()||or.port!==null))return;if(ir=or.parseHost(dr))return ir;if(dr="",cr=PATH_START,er)return;continue}ar=="["?hr=!0:ar=="]"&&(hr=!1),dr+=ar}else{if(dr=="")return INVALID_HOST;if(ir=or.parseHost(dr))return ir;if(dr="",cr=PORT,er==HOSTNAME)return}break;case PORT:if(!exec(DIGIT,ar)){if(ar==EOF||ar=="/"||ar=="?"||ar=="#"||ar=="\\"&&or.isSpecial()||er){if(dr!=""){var yr=parseInt$1(dr,10);if(yr>65535)return INVALID_PORT;or.port=or.isSpecial()&&yr===specialSchemes[or.scheme]?null:yr,dr=""}if(er)return;cr=PATH_START;continue}return INVALID_PORT}dr+=ar;break;case FILE:if(or.scheme="file",ar=="/"||ar=="\\")cr=FILE_SLASH;else{if(!rr||rr.scheme!="file"){cr=PATH;continue}if(ar==EOF)or.host=rr.host,or.path=arraySlice(rr.path),or.query=rr.query;else if(ar=="?")or.host=rr.host,or.path=arraySlice(rr.path),or.query="",cr=QUERY;else{if(ar!="#"){startsWithWindowsDriveLetter(join(arraySlice(nr,lr),""))||(or.host=rr.host,or.path=arraySlice(rr.path),or.shortenPath()),cr=PATH;continue}or.host=rr.host,or.path=arraySlice(rr.path),or.query=rr.query,or.fragment="",cr=FRAGMENT}}break;case FILE_SLASH:if(ar=="/"||ar=="\\"){cr=FILE_HOST;break}rr&&rr.scheme=="file"&&!startsWithWindowsDriveLetter(join(arraySlice(nr,lr),""))&&(isWindowsDriveLetter(rr.path[0],!0)?push(or.path,rr.path[0]):or.host=rr.host),cr=PATH;continue;case FILE_HOST:if(ar==EOF||ar=="/"||ar=="\\"||ar=="?"||ar=="#"){if(!er&&isWindowsDriveLetter(dr))cr=PATH;else if(dr==""){if(or.host="",er)return;cr=PATH_START}else{if(ir=or.parseHost(dr))return ir;if(or.host=="localhost"&&(or.host=""),er)return;dr="",cr=PATH_START}continue}dr+=ar;break;case PATH_START:if(or.isSpecial()){if(cr=PATH,ar!="/"&&ar!="\\")continue}else if(er||ar!="?")if(er||ar!="#"){if(ar!=EOF&&(cr=PATH,ar!="/"))continue}else or.fragment="",cr=FRAGMENT;else or.query="",cr=QUERY;break;case PATH:if(ar==EOF||ar=="/"||ar=="\\"&&or.isSpecial()||!er&&(ar=="?"||ar=="#")){if(isDoubleDot(dr)?(or.shortenPath(),ar=="/"||ar=="\\"&&or.isSpecial()||push(or.path,"")):isSingleDot(dr)?ar=="/"||ar=="\\"&&or.isSpecial()||push(or.path,""):(or.scheme=="file"&&!or.path.length&&isWindowsDriveLetter(dr)&&(or.host&&(or.host=""),dr=charAt(dr,0)+":"),push(or.path,dr)),dr="",or.scheme=="file"&&(ar==EOF||ar=="?"||ar=="#"))for(;or.path.length>1&&or.path[0]==="";)shift(or.path);ar=="?"?(or.query="",cr=QUERY):ar=="#"&&(or.fragment="",cr=FRAGMENT)}else dr+=percentEncode(ar,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:ar=="?"?(or.query="",cr=QUERY):ar=="#"?(or.fragment="",cr=FRAGMENT):ar!=EOF&&(or.path[0]+=percentEncode(ar,C0ControlPercentEncodeSet));break;case QUERY:er||ar!="#"?ar!=EOF&&(ar=="'"&&or.isSpecial()?or.query+="%27":or.query+=ar=="#"?"%23":percentEncode(ar,C0ControlPercentEncodeSet)):(or.fragment="",cr=FRAGMENT);break;case FRAGMENT:ar!=EOF&&(or.fragment+=percentEncode(ar,fragmentPercentEncodeSet))}lr++}},parseHost:function(tr){var er,rr,nr;if(charAt(tr,0)=="["){if(charAt(tr,tr.length-1)!="]"||!(er=parseIPv6(stringSlice$1(tr,1,-1))))return INVALID_HOST;this.host=er}else if(this.isSpecial()){if(tr=toASCII(tr),exec(FORBIDDEN_HOST_CODE_POINT,tr)||(er=parseIPv4(tr))===null)return INVALID_HOST;this.host=er}else{if(exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT,tr))return INVALID_HOST;for(er="",rr=arrayFrom(tr),nr=0;nr<rr.length;nr++)er+=percentEncode(rr[nr],C0ControlPercentEncodeSet);this.host=er}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme=="file"},includesCredentials:function(){return this.username!=""||this.password!=""},isSpecial:function(){return hasOwn$2(specialSchemes,this.scheme)},shortenPath:function(){var tr=this.path,er=tr.length;!er||this.scheme=="file"&&er==1&&isWindowsDriveLetter(tr[0],!0)||tr.length--},serialize:function(){var tr=this,er=tr.scheme,rr=tr.username,nr=tr.password,ar=tr.host,sr=tr.port,ir=tr.path,or=tr.query,cr=tr.fragment,lr=er+":";return ar!==null?(lr+="//",tr.includesCredentials()&&(lr+=rr+(nr?":"+nr:"")+"@"),lr+=serializeHost(ar),sr!==null&&(lr+=":"+sr)):er=="file"&&(lr+="//"),lr+=tr.cannotBeABaseURL?ir[0]:ir.length?"/"+join(ir,"/"):"",or!==null&&(lr+="?"+or),cr!==null&&(lr+="#"+cr),lr},setHref:function(tr){var er=this.parse(tr);if(er)throw TypeError$1(er);this.searchParams.update()},getOrigin:function(){var tr=this.scheme,er=this.port;if(tr=="blob")try{return new URLConstructor(tr.path[0]).origin}catch(rr){return"null"}return tr!="file"&&this.isSpecial()?tr+"://"+serializeHost(this.host)+(er!==null?":"+er:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(tr){this.parse($toString(tr)+":",SCHEME_START)},getUsername:function(){return this.username},setUsername:function(tr){var er=arrayFrom($toString(tr));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var rr=0;rr<er.length;rr++)this.username+=percentEncode(er[rr],userinfoPercentEncodeSet)}},getPassword:function(){return this.password},setPassword:function(tr){var er=arrayFrom($toString(tr));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var rr=0;rr<er.length;rr++)this.password+=percentEncode(er[rr],userinfoPercentEncodeSet)}},getHost:function(){var tr=this.host,er=this.port;return tr===null?"":er===null?serializeHost(tr):serializeHost(tr)+":"+er},setHost:function(tr){this.cannotBeABaseURL||this.parse(tr,HOST)},getHostname:function(){var tr=this.host;return tr===null?"":serializeHost(tr)},setHostname:function(tr){this.cannotBeABaseURL||this.parse(tr,HOSTNAME)},getPort:function(){var tr=this.port;return tr===null?"":$toString(tr)},setPort:function(tr){this.cannotHaveUsernamePasswordPort()||((tr=$toString(tr))==""?this.port=null:this.parse(tr,PORT))},getPathname:function(){var tr=this.path;return this.cannotBeABaseURL?tr[0]:tr.length?"/"+join(tr,"/"):""},setPathname:function(tr){this.cannotBeABaseURL||(this.path=[],this.parse(tr,PATH_START))},getSearch:function(){var tr=this.query;return tr?"?"+tr:""},setSearch:function(tr){(tr=$toString(tr))==""?this.query=null:(charAt(tr,0)=="?"&&(tr=stringSlice$1(tr,1)),this.query="",this.parse(tr,QUERY)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var tr=this.fragment;return tr?"#"+tr:""},setHash:function(tr){(tr=$toString(tr))!=""?(charAt(tr,0)=="#"&&(tr=stringSlice$1(tr,1)),this.fragment="",this.parse(tr,FRAGMENT)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var URLConstructor=function(tr){var er=anInstance$1(this,URLPrototype),rr=validateArgumentsLength(arguments.length,1)>1?arguments[1]:void 0,nr=setInternalState(er,new URLState(tr,!1,rr));DESCRIPTORS$3||(er.href=nr.serialize(),er.origin=nr.getOrigin(),er.protocol=nr.getProtocol(),er.username=nr.getUsername(),er.password=nr.getPassword(),er.host=nr.getHost(),er.hostname=nr.getHostname(),er.port=nr.getPort(),er.pathname=nr.getPathname(),er.search=nr.getSearch(),er.searchParams=nr.getSearchParams(),er.hash=nr.getHash())},URLPrototype=URLConstructor.prototype,accessorDescriptor=function(tr,er){return{get:function(){return getInternalURLState(this)[tr]()},set:er&&function(rr){return getInternalURLState(this)[er](rr)},configurable:!0,enumerable:!0}};if(DESCRIPTORS$3&&(defineBuiltInAccessor$2(URLPrototype,"href",accessorDescriptor("serialize","setHref")),defineBuiltInAccessor$2(URLPrototype,"origin",accessorDescriptor("getOrigin")),defineBuiltInAccessor$2(URLPrototype,"protocol",accessorDescriptor("getProtocol","setProtocol")),defineBuiltInAccessor$2(URLPrototype,"username",accessorDescriptor("getUsername","setUsername")),defineBuiltInAccessor$2(URLPrototype,"password",accessorDescriptor("getPassword","setPassword")),defineBuiltInAccessor$2(URLPrototype,"host",accessorDescriptor("getHost","setHost")),defineBuiltInAccessor$2(URLPrototype,"hostname",accessorDescriptor("getHostname","setHostname")),defineBuiltInAccessor$2(URLPrototype,"port",accessorDescriptor("getPort","setPort")),defineBuiltInAccessor$2(URLPrototype,"pathname",accessorDescriptor("getPathname","setPathname")),defineBuiltInAccessor$2(URLPrototype,"search",accessorDescriptor("getSearch","setSearch")),defineBuiltInAccessor$2(URLPrototype,"searchParams",accessorDescriptor("getSearchParams")),defineBuiltInAccessor$2(URLPrototype,"hash",accessorDescriptor("getHash","setHash"))),defineBuiltIn$1(URLPrototype,"toJSON",function(){return getInternalURLState(this).serialize()},{enumerable:!0}),defineBuiltIn$1(URLPrototype,"toString",function(){return getInternalURLState(this).serialize()},{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&defineBuiltIn$1(URLConstructor,"createObjectURL",bind(nativeCreateObjectURL,NativeURL)),nativeRevokeObjectURL&&defineBuiltIn$1(URLConstructor,"revokeObjectURL",bind(nativeRevokeObjectURL,NativeURL))}setToStringTag$1(URLConstructor,"URL"),$$e({global:!0,constructor:!0,forced:!USE_NATIVE_URL,sham:!DESCRIPTORS$3},{URL:URLConstructor});var $$d=_export,call$2=functionCall;$$d({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return call$2(URL.prototype.toString,this)}});var DESCRIPTORS$2=descriptors,uncurryThis$5=functionUncurryThis,defineBuiltInAccessor$1=defineBuiltInAccessor$7,URLSearchParamsPrototype=URLSearchParams.prototype,forEach$1=uncurryThis$5(URLSearchParamsPrototype.forEach);function isBrowser(){return typeof window=="object"&&typeof document=="object"&&Object.prototype.toString.call(document)==="[object HTMLDocument]"}function getRandomId(){return Math.random().toString(36).slice(2)}function getObjectKeys(tr){return Object.keys(tr)}function toStringTag(tr){return Object.prototype.toString.call(tr)}function hasOwnProperty(tr,er){return Object.prototype.hasOwnProperty.call(tr,er)}function isString(tr){return typeof tr=="string"}function isNumber(tr){return typeof tr=="number"}function isBigInt(tr){return toStringTag(tr)==="[object BigInt]"}function isArray$1(tr){return tr instanceof Array}function isArrayLike(tr){return typeof NodeList=="function"&&NodeList.name==="NodeList"&&tr instanceof NodeList||typeof HTMLCollection=="function"&&HTMLCollection.name==="HTMLCollection"&&tr instanceof HTMLCollection}function isObjectLike(tr){return typeof tr=="object"&&tr!==null}function isPlainObject(tr){return!(!isObjectLike(tr)||toStringTag(tr)!=="[object Object]")}function isPrototype(tr){return!(!isObjectLike(tr)||!hasOwnProperty(tr,"constructor")||typeof tr.constructor!="function")}function isBlob(tr){return tr instanceof Blob}function isArrayBuffer(tr){return tr instanceof ArrayBuffer}function isURLSearchParams(tr){return tr instanceof URLSearchParams}function isFormData(tr){return tr instanceof FormData}function isFile(tr){return tr instanceof File}function isHeaders(tr){return tr instanceof Headers}function isDocument(tr){return tr instanceof Document}function isURL(tr){return tr instanceof URL}function isClass(tr){return typeof tr=="function"&&tr.prototype!==void 0}DESCRIPTORS$2&&!("size"in URLSearchParamsPrototype)&&defineBuiltInAccessor$1(URLSearchParamsPrototype,"size",{get:function(){var tr=0;return forEach$1(this,function(){tr++}),tr},configurable:!0,enumerable:!0});const CN_IDs=["zh-CN","zh-HK","zh-TW","zh","zh-Hans-CN"];function isCN(){if(isBrowser()){const{lang:tr}=document.documentElement;return tr?CN_IDs.some(er=>er===tr):CN_IDs.some(er=>er===navigator.language)}return!1}function isTypedArray(tr){return ArrayBuffer.isView(tr)}const stringify=tr=>"".concat(tr),primitive=tr=>({ok:!0,value:tr});function makePrimitiveValue(tr){return tr===void 0?primitive(stringify(tr)):tr===null?primitive(tr):isNumber(tr)&&(tr===-1/0||tr===1/0||Number.isNaN(tr))?primitive(stringify(tr)):isBigInt(tr)?primitive("".concat(tr,"n")):typeof tr=="symbol"||typeof tr=="function"?primitive(stringify(tr.toString())):tr instanceof Error?primitive(stringify(tr.stack)):tr===Object.prototype?{value:null,ok:!1}:tr instanceof Object||typeof tr=="object"?{value:tr,ok:!1}:primitive(tr)}function stringifyData(tr){const{ok:er,value:rr}=makePrimitiveValue(tr);return er?rr:JSON.stringify(tr,(nr,ar)=>makePrimitiveValue(ar).value,2)}function getValueType(tr){return tr===void 0?"undefined":tr===null?"null":isBigInt(tr)?"bigint":tr instanceof Object?tr instanceof Error?"error":typeof tr=="function"?"function":"object":typeof tr}const unproxyConsole=ur({},console),psLog=["log","info","error","warn","debug"].reduce((tr,er)=>(tr[er]=function(){for(var rr=arguments.length,nr=new Array(rr),ar=0;ar<rr;ar++)nr[ar]=arguments[ar];console[er]("[PageSpy] [".concat(er.toLocaleUpperCase(),"] "),...nr)},tr.unproxy[er]=function(){for(var rr=arguments.length,nr=new Array(rr),ar=0;ar<rr;ar++)nr[ar]=arguments[ar];unproxyConsole[er]("[PageSpy] [".concat(er.toLocaleUpperCase(),"] "),...nr)},tr),{unproxy:{}});function getAuthSecret(){const tr=Math.floor(1e6*Math.random());return String(tr).padStart(6,"0")}const formatErrorObj=tr=>{if(typeof tr!="object")return null;const{name:er,message:rr,stack:nr}=Object(tr);return[er,rr,nr].every(Boolean)===!1?null:{name:er,message:rr,stack:nr}},blob2base64Async=tr=>new Promise((er,rr)=>{const nr=new FileReader;nr.onload=ar=>{var sr;er((sr=ar.target)===null||sr===void 0?void 0:sr.result)},nr.onerror=()=>{rr(new Error("blob2base64Async: can not convert"))},nr.readAsDataURL(tr)}),CONNECT="connect",JOIN="join",LEAVE="leave",CLOSE="close",MESSAGE="message",BROADCAST="broadcast",ERROR="error",PING="ping",PONG="pong",UPDATE_ROOM_INFO="updateRoomInfo";var SERVER_MESSAGE_TYPE=Object.freeze({__proto__:null,BROADCAST,CLOSE,CONNECT,ERROR,JOIN,LEAVE,MESSAGE,PING,PONG,UPDATE_ROOM_INFO});function makeMessage(tr,er){return{role:"client",type:tr,data:ur(ur({},(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])&&{id:getRandomId()}),er)}}function makeUnicastMessage(tr,er,rr){return{type:MESSAGE,content:{data:tr,from:er,to:rr}}}function makeBroadcastMessage(tr){return{type:BROADCAST,content:{data:tr}}}class RequestItem{constructor(er){_defineProperty(this,"id",""),_defineProperty(this,"method",""),_defineProperty(this,"url",""),_defineProperty(this,"requestType","xhr"),_defineProperty(this,"requestHeader",null),_defineProperty(this,"status",0),_defineProperty(this,"statusText",""),_defineProperty(this,"readyState",0),_defineProperty(this,"response",void 0),_defineProperty(this,"responseReason",null),_defineProperty(this,"responseType",""),_defineProperty(this,"responseHeader",null),_defineProperty(this,"startTime",0),_defineProperty(this,"endTime",0),_defineProperty(this,"costTime",0),_defineProperty(this,"postData",null),_defineProperty(this,"requestPayload",null),_defineProperty(this,"withCredentials",!1),_defineProperty(this,"lastEventId",""),this.id=er}}const MAX_SIZE=2097152,Reason={EXCEED_SIZE:"Exceed maximum limit"},PAGE_SPY_WS_ENDPOINT="/api/v1/ws/room/join";var ReqReadyState;(function(tr){tr[tr.UNSENT=0]="UNSENT",tr[tr.OPENED=1]="OPENED",tr[tr.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",tr[tr.LOADING=3]="LOADING",tr[tr.DONE=4]="DONE"})(ReqReadyState||(ReqReadyState={}));const BINARY_FILE_VARIANT="(file)";function formatEntries(tr){const er=[];let rr=tr.next();for(;!rr.done;){const[nr,ar]=rr.value;let sr;sr=isFile(ar)?BINARY_FILE_VARIANT:String(ar),er.push([nr,sr]),rr=tr.next()}return er}function getContentType(tr){return tr?isFormData(tr)?"multipart/form-data":isURLSearchParams(tr)?"application/x-www-form-urlencoded;charset=UTF-8":isDocument(tr)?"application/xml":isBlob(tr)?tr.type:"text/plain;charset=UTF-8":null}const CONTENT_TYPE_HEADER="Content-Type";function addContentTypeHeader(tr,er){if(!er)return tr;const rr=getContentType(er);if(!rr)return tr;const nr=[CONTENT_TYPE_HEADER,rr];if(!tr)return[nr];for(let ar=0;ar<tr.length;ar++){const[sr]=tr[ar];if(sr.toUpperCase()===CONTENT_TYPE_HEADER.toUpperCase())return tr}return[...tr,nr]}function getFormattedBody(tr){return Dr(this,null,function*(){return tr?isURLSearchParams(tr)||isFormData(tr)?formatEntries(tr.entries()):isBlob(tr)?"[object Blob]":isTypedArray(tr)?"[object TypedArray]":isDocument(tr)?new XMLSerializer().serializeToString(tr):isString(tr)?tr:toStringTag(tr):null})}class NetworkProxyBase{constructor(er){_defineProperty(this,"socketStore",void 0),_defineProperty(this,"reqMap",Object.create(null)),this.socketStore=er}getRequestMap(){return this.reqMap}getRequest(er){return this.reqMap[er]}removeRequest(er){delete this.reqMap[er]}createRequest(er){return er?this.reqMap[er]?(psLog.warn("The request object has been in store, disallow duplicate create"),!1):(this.reqMap[er]=new RequestItem(er),!0):(psLog.warn('The "id" is required when init request object'),!1)}setRequest(er,rr){return!(!er||!rr)&&(this.reqMap[er]=rr,!0)}sendRequestItem(er,rr){var nr;if(((nr=NetworkProxyBase.dataProcessor)===null||nr===void 0?void 0:nr.call(NetworkProxyBase,rr))!==!1)try{this.reqMap[er]||(this.reqMap[er]=rr);const ar=makeMessage("network",ur({},rr),!1);this.socketStore.dispatchEvent("public-data",ar),this.socketStore.broadcastMessage(ar,rr.readyState!==ReqReadyState.DONE),this.deferDeleteRequest(er)}catch(ar){psLog.error(ar.message)}}deferDeleteRequest(er){const rr=this.getRequest(er);rr&&rr.readyState===ReqReadyState.DONE&&setTimeout(()=>{delete this.reqMap[er]},3e3)}}_defineProperty(NetworkProxyBase,"dataProcessor",void 0);var uncurryThis$4=functionUncurryThis,SetPrototype$1=Set.prototype,setHelpers={Set,add:uncurryThis$4(SetPrototype$1.add),has:uncurryThis$4(SetPrototype$1.has),remove:uncurryThis$4(SetPrototype$1.delete),proto:SetPrototype$1},has$5=setHelpers.has,aSet$7=function(tr){return has$5(tr),tr},call$1=functionCall,iterateSimple$7=function(tr,er,rr){for(var nr,ar,sr=rr||tr.next;!(nr=call$1(sr,tr)).done;)if((ar=er(nr.value))!==void 0)return ar},uncurryThis$3=functionUncurryThis,iterateSimple$6=iterateSimple$7,SetHelpers$5=setHelpers,Set$3=SetHelpers$5.Set,SetPrototype=SetHelpers$5.proto,forEach=uncurryThis$3(SetPrototype.forEach),keys=uncurryThis$3(SetPrototype.keys),next=keys(new Set$3).next,setIterate=function(tr,er,rr){return rr?iterateSimple$6(keys(tr),er,next):forEach(tr,er)},SetHelpers$4=setHelpers,iterate$1=setIterate,Set$2=SetHelpers$4.Set,add$3=SetHelpers$4.add,setClone=function(tr){var er=new Set$2;return iterate$1(tr,function(rr){add$3(er,rr)}),er},uncurryThisAccessor=functionUncurryThisAccessor,SetHelpers$3=setHelpers,setSize=uncurryThisAccessor(SetHelpers$3.proto,"size","get")||function(tr){return tr.size},aCallable$1=aCallable$7,anObject$1=anObject$g,call=functionCall,toIntegerOrInfinity=toIntegerOrInfinity$7,$TypeError$1=TypeError,max=Math.max,SetRecord=function(tr,er,rr,nr){this.set=tr,this.size=er,this.has=rr,this.keys=nr};SetRecord.prototype={getIterator:function(){return anObject$1(call(this.keys,this.set))},includes:function(tr){return call(this.has,this.set,tr)}};var getSetRecord$7=function(tr){anObject$1(tr);var er=+tr.size;if(er!=er)throw $TypeError$1("Invalid size");return new SetRecord(tr,max(toIntegerOrInfinity(er),0),aCallable$1(tr.has),aCallable$1(tr.keys))},aSet$6=aSet$7,SetHelpers$2=setHelpers,clone$2=setClone,size$4=setSize,getSetRecord$6=getSetRecord$7,iterateSet$2=setIterate,iterateSimple$5=iterateSimple$7,has$4=SetHelpers$2.has,remove$1=SetHelpers$2.remove,setDifference=function(tr){var er=aSet$6(this),rr=getSetRecord$6(tr),nr=clone$2(er);return size$4(er)<=rr.size?iterateSet$2(er,function(ar){rr.includes(ar)&&remove$1(nr,ar)}):iterateSimple$5(rr.getIterator(),function(ar){has$4(er,ar)&&remove$1(nr,ar)}),nr},getBuiltIn$2=getBuiltIn$a,createEmptySetLike=function(){return{size:0,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},setMethodAcceptSetLike$7=function(tr){try{return new(getBuiltIn$2("Set"))()[tr](createEmptySetLike()),!0}catch(er){return!1}},$$c=_export,difference=setDifference,setMethodAcceptSetLike$6=setMethodAcceptSetLike$7;$$c({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$6("difference")},{difference});var aSet$5=aSet$7,SetHelpers$1=setHelpers,size$3=setSize,getSetRecord$5=getSetRecord$7,iterateSet$1=setIterate,iterateSimple$4=iterateSimple$7,Set$1=SetHelpers$1.Set,add$2=SetHelpers$1.add,has$3=SetHelpers$1.has,setIntersection=function(tr){var er=aSet$5(this),rr=getSetRecord$5(tr),nr=new Set$1;return size$3(er)>rr.size?iterateSimple$4(rr.getIterator(),function(ar){has$3(er,ar)&&add$2(nr,ar)}):iterateSet$1(er,function(ar){rr.includes(ar)&&add$2(nr,ar)}),nr},$$b=_export,fails$2=fails$s,intersection=setIntersection,setMethodAcceptSetLike$5=setMethodAcceptSetLike$7,INCORRECT=!setMethodAcceptSetLike$5("intersection")||fails$2(function(){return Array.from(new Set([1,2,3]).intersection(new Set([3,2])))!="3,2"});$$b({target:"Set",proto:!0,real:!0,forced:INCORRECT},{intersection});var aSet$4=aSet$7,has$2=setHelpers.has,size$2=setSize,getSetRecord$4=getSetRecord$7,iterateSet=setIterate,iterateSimple$3=iterateSimple$7,iteratorClose$1=iteratorClose$3,setIsDisjointFrom=function(tr){var er=aSet$4(this),rr=getSetRecord$4(tr);if(size$2(er)<=rr.size)return iterateSet(er,function(ar){if(rr.includes(ar))return!1},!0)!==!1;var nr=rr.getIterator();return iterateSimple$3(nr,function(ar){if(has$2(er,ar))return iteratorClose$1(nr,"normal",!1)})!==!1},$$a=_export,isDisjointFrom=setIsDisjointFrom,setMethodAcceptSetLike$4=setMethodAcceptSetLike$7;$$a({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$4("isDisjointFrom")},{isDisjointFrom});var aSet$3=aSet$7,size$1=setSize,iterate=setIterate,getSetRecord$3=getSetRecord$7,setIsSubsetOf=function(tr){var er=aSet$3(this),rr=getSetRecord$3(tr);return!(size$1(er)>rr.size)&&iterate(er,function(nr){if(!rr.includes(nr))return!1},!0)!==!1},$$9=_export,isSubsetOf=setIsSubsetOf,setMethodAcceptSetLike$3=setMethodAcceptSetLike$7;$$9({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$3("isSubsetOf")},{isSubsetOf});var aSet$2=aSet$7,has$1=setHelpers.has,size=setSize,getSetRecord$2=getSetRecord$7,iterateSimple$2=iterateSimple$7,iteratorClose=iteratorClose$3,setIsSupersetOf=function(tr){var er=aSet$2(this),rr=getSetRecord$2(tr);if(size(er)<rr.size)return!1;var nr=rr.getIterator();return iterateSimple$2(nr,function(ar){if(!has$1(er,ar))return iteratorClose(nr,"normal",!1)})!==!1},$$8=_export,isSupersetOf=setIsSupersetOf,setMethodAcceptSetLike$2=setMethodAcceptSetLike$7;$$8({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$2("isSupersetOf")},{isSupersetOf});var aSet$1=aSet$7,SetHelpers=setHelpers,clone$1=setClone,getSetRecord$1=getSetRecord$7,iterateSimple$1=iterateSimple$7,add$1=SetHelpers.add,has=SetHelpers.has,remove=SetHelpers.remove,setSymmetricDifference=function(tr){var er=aSet$1(this),rr=getSetRecord$1(tr).getIterator(),nr=clone$1(er);return iterateSimple$1(rr,function(ar){has(er,ar)?remove(nr,ar):add$1(nr,ar)}),nr},$$7=_export,symmetricDifference=setSymmetricDifference,setMethodAcceptSetLike$1=setMethodAcceptSetLike$7;$$7({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike$1("symmetricDifference")},{symmetricDifference});var aSet=aSet$7,add=setHelpers.add,clone=setClone,getSetRecord=getSetRecord$7,iterateSimple=iterateSimple$7,setUnion=function(tr){var er=aSet(this),rr=getSetRecord(tr).getIterator(),nr=clone(er);return iterateSimple(rr,function(ar){add(nr,ar)}),nr},$$6=_export,union=setUnion,setMethodAcceptSetLike=setMethodAcceptSetLike$7;$$6({target:"Set",proto:!0,real:!0,forced:!setMethodAcceptSetLike("union")},{union});class Atom{constructor(){_defineProperty(this,"store",{}),_defineProperty(this,"instanceStore",{})}getStore(){return this.store}resetStore(){this.store={}}getInstanceStore(){return this.instanceStore}resetInstanceStore(){this.instanceStore={}}transformToAtom(er){let rr=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const{value:nr,ok:ar}=makePrimitiveValue(er),sr=getRandomId();if(ar)return{id:sr,type:getValueType(er),value:nr};if(rr)try{return{id:sr,type:"json",value:JSON.stringify(er)}}catch(ir){return{id:sr,type:"json",value:null}}return this.add(er)}get(er){const rr=this.store[er],nr=this.instanceStore[er];if(!rr)return null;const ar={},sr=Object.getOwnPropertyDescriptors(rr);Object.keys(sr).forEach(or=>{const cr=sr[or];hasOwnProperty(cr,"value")&&(cr.value=this.transformToAtom(cr.value)),ar[or]=Atom.getAtomOverview({atomId:getRandomId(),instanceId:nr,value:cr})});const ir=this.addExtraProperty(er);return ur(ur({},ar),ir)}getOrigin(er){return this.store[er]||null}add(er){let rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const nr=getRandomId();let ar=nr;isPrototype(er)&&(ar=rr),this.store[nr]=er,this.instanceStore[nr]=ar;const sr=Atom.getSemanticValue(er);return Atom.getAtomOverview({atomId:nr,value:sr,instanceId:ar})}static getAtomOverview(er){let{instanceId:rr="",atomId:nr,value:ar}=er;return{id:getRandomId(),type:"atom",__atomId:nr,instanceId:rr,value:ar}}static getSemanticValue(er){return isPlainObject(er)?"Object {...}":isArray$1(er)?"Array (".concat(er.length,")"):er.constructor.name}addExtraProperty(er){const rr=this.store[er],nr=this.instanceStore[er],ar={};if((rr instanceof String||rr instanceof Number||rr instanceof Boolean)&&(ar["[[PrimitiveValue]]"]=this.transformToAtom(rr.valueOf())),rr instanceof Set){const sr={};let ir=0;for(const or of rr)sr[ir++]=or;sr.size=rr.size,ar["[[Entries]]"]=this.transformToAtom(sr)}if(rr instanceof Map){const sr={};let ir=0;for(const[or,cr]of rr.entries())sr[ir++]={key:or,value:cr};sr.size=rr.size,ar["[[Entries]]"]=this.transformToAtom(sr)}return(isArray$1(rr)||isArrayLike(rr))&&(ar.length=this.transformToAtom(rr.length)),Object.getPrototypeOf(rr)!==null?ar["[[Prototype]]"]=this.add(Object.getPrototypeOf(rr),nr):ar.___proto___=this.transformToAtom(null),ar}}const atom=new Atom;class Client{constructor(){let er=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{osType:"unknown",osVersion:"unknown",browserType:"unknown",browserVersion:"unknown",framework:"unknown",isDevTools:!1,sdk:"unknown",sdkVersion:"0.0.0"},rr=arguments.length>1?arguments[1]:void 0;_defineProperty(this,"info",void 0),_defineProperty(this,"rawInfo",void 0),_defineProperty(this,"plugins",[]),_defineProperty(this,"_name",""),this.info=er,this.rawInfo=rr}makeClientInfoMsg(){return{sdk:this.info.sdk,isDevTools:this.info.isDevTools,ua:this.getName(),plugins:this.plugins}}getName(){if(!this._name){const{ua:er,osType:rr,osVersion:nr,browserType:ar,browserVersion:sr}=this.info;this._name=er||"".concat(rr,"/").concat(nr," ").concat(ar,"/").concat(sr)}return this._name}}var $$5=_export,DESCRIPTORS$1=descriptors,global$4=global$q,uncurryThis$2=functionUncurryThis,hasOwn$1=hasOwnProperty_1,isCallable$1=isCallable$o,isPrototypeOf=objectIsPrototypeOf,toString$1=toString$8,defineBuiltInAccessor=defineBuiltInAccessor$7,copyConstructorProperties=copyConstructorProperties$3,NativeSymbol=global$4.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype;if(DESCRIPTORS$1&&isCallable$1(NativeSymbol)&&(!("description"in SymbolPrototype)||NativeSymbol().description!==void 0)){var EmptyStringDescriptionStore={},SymbolWrapper=function(){var tr=arguments.length<1||arguments[0]===void 0?void 0:toString$1(arguments[0]),er=isPrototypeOf(SymbolPrototype,this)?new NativeSymbol(tr):tr===void 0?NativeSymbol():NativeSymbol(tr);return tr===""&&(EmptyStringDescriptionStore[er]=!0),er};copyConstructorProperties(SymbolWrapper,NativeSymbol),SymbolWrapper.prototype=SymbolPrototype,SymbolPrototype.constructor=SymbolWrapper;var NATIVE_SYMBOL=String(NativeSymbol("test"))=="Symbol(test)",thisSymbolValue=uncurryThis$2(SymbolPrototype.valueOf),symbolDescriptiveString=uncurryThis$2(SymbolPrototype.toString),regexp=/^Symbol\((.*)\)[^)]+$/,replace$1=uncurryThis$2("".replace),stringSlice=uncurryThis$2("".slice);defineBuiltInAccessor(SymbolPrototype,"description",{configurable:!0,get:function(){var tr=thisSymbolValue(this);if(hasOwn$1(EmptyStringDescriptionStore,tr))return"";var er=symbolDescriptiveString(tr),rr=NATIVE_SYMBOL?stringSlice(er,7,-1):replace$1(er,regexp,"$1");return rr===""?void 0:rr}}),$$5({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper})}var $$4=_export,uncurryThis$1=functionUncurryThis,isArray=isArray$4,nativeReverse=uncurryThis$1([].reverse),test=[1,2];$$4({target:"Array",proto:!0,forced:String(test)===String(test.reverse())},{reverse:function(){return isArray(this)&&(this.length=this.length),nativeReverse(this)}});var whitespaces$2=`
|
|
4
|
+
\v\f\r \u2028\u2029\uFEFF`,uncurryThis=functionUncurryThis,requireObjectCoercible=requireObjectCoercible$5,toString=toString$8,whitespaces$1=whitespaces$2,replace=uncurryThis("".replace),ltrim=RegExp("^["+whitespaces$1+"]+"),rtrim=RegExp("(^|[^"+whitespaces$1+"])["+whitespaces$1+"]+$"),createMethod=function(tr){return function(er){var rr=toString(requireObjectCoercible(er));return 1&tr&&(rr=replace(rr,ltrim,"")),2&tr&&(rr=replace(rr,rtrim,"$1")),rr}},stringTrim={trim:createMethod(3)},PROPER_FUNCTION_NAME=functionName.PROPER,fails$1=fails$s,whitespaces=whitespaces$2,non="
",stringTrimForced=function(tr){return fails$1(function(){return!!whitespaces[tr]()||non[tr]()!==non||PROPER_FUNCTION_NAME&&whitespaces[tr].name!==tr})},$$3=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$$3({target:"String",proto:!0,forced:forcedStringTrimMethod("trim")},{trim:function(){return $trim(this)}});var domExceptionConstants={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}},$$2=_export,global$3=global$q,getBuiltIn$1=getBuiltIn$a,createPropertyDescriptor=createPropertyDescriptor$7,defineProperty=objectDefineProperty.f,hasOwn=hasOwnProperty_1,anInstance=anInstance$4,inheritIfRequired=inheritIfRequired$2,normalizeStringArgument=normalizeStringArgument$2,DOMExceptionConstants=domExceptionConstants,clearErrorStack=errorStackClear,DESCRIPTORS=descriptors,DOM_EXCEPTION="DOMException",Error$1=getBuiltIn$1("Error"),NativeDOMException=getBuiltIn$1(DOM_EXCEPTION),$DOMException=function(){anInstance(this,DOMExceptionPrototype);var tr=arguments.length,er=normalizeStringArgument(tr<1?void 0:arguments[0]),rr=normalizeStringArgument(tr<2?void 0:arguments[1],"Error"),nr=new NativeDOMException(er,rr),ar=Error$1(er);return ar.name=DOM_EXCEPTION,defineProperty(nr,"stack",createPropertyDescriptor(1,clearErrorStack(ar.stack,1))),inheritIfRequired(nr,this,$DOMException),nr},DOMExceptionPrototype=$DOMException.prototype=NativeDOMException.prototype,ERROR_HAS_STACK="stack"in Error$1(DOM_EXCEPTION),DOM_EXCEPTION_HAS_STACK="stack"in new NativeDOMException(1,2),descriptor=NativeDOMException&&DESCRIPTORS&&Object.getOwnPropertyDescriptor(global$3,DOM_EXCEPTION),BUGGY_DESCRIPTOR=!(!descriptor||descriptor.writable&&descriptor.configurable),FORCED_CONSTRUCTOR=ERROR_HAS_STACK&&!BUGGY_DESCRIPTOR&&!DOM_EXCEPTION_HAS_STACK;$$2({global:!0,constructor:!0,forced:FORCED_CONSTRUCTOR},{DOMException:FORCED_CONSTRUCTOR?$DOMException:NativeDOMException});var PolyfilledDOMException=getBuiltIn$1(DOM_EXCEPTION),PolyfilledDOMExceptionPrototype=PolyfilledDOMException.prototype,util,objectUtil;if(PolyfilledDOMExceptionPrototype.constructor!==PolyfilledDOMException){for(var key in defineProperty(PolyfilledDOMExceptionPrototype,"constructor",createPropertyDescriptor(1,PolyfilledDOMException)),DOMExceptionConstants)if(hasOwn(DOMExceptionConstants,key)){var constant=DOMExceptionConstants[key],constantName=constant.s;hasOwn(PolyfilledDOMException,constantName)||defineProperty(PolyfilledDOMException,constantName,createPropertyDescriptor(6,constant.c))}}(function(tr){tr.assertEqual=er=>er,tr.assertIs=function(er){},tr.assertNever=function(er){throw new Error},tr.arrayToEnum=er=>{const rr={};for(const nr of er)rr[nr]=nr;return rr},tr.getValidEnumValues=er=>{const rr=tr.objectKeys(er).filter(ar=>typeof er[er[ar]]!="number"),nr={};for(const ar of rr)nr[ar]=er[ar];return tr.objectValues(nr)},tr.objectValues=er=>tr.objectKeys(er).map(function(rr){return er[rr]}),tr.objectKeys=typeof Object.keys=="function"?er=>Object.keys(er):er=>{const rr=[];for(const nr in er)Object.prototype.hasOwnProperty.call(er,nr)&&rr.push(nr);return rr},tr.find=(er,rr)=>{for(const nr of er)if(rr(nr))return nr},tr.isInteger=typeof Number.isInteger=="function"?er=>Number.isInteger(er):er=>typeof er=="number"&&isFinite(er)&&Math.floor(er)===er,tr.joinValues=function(er){let rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" | ";return er.map(nr=>typeof nr=="string"?"'".concat(nr,"'"):nr).join(rr)},tr.jsonStringifyReplacer=(er,rr)=>typeof rr=="bigint"?rr.toString():rr})(util||(util={})),function(tr){tr.mergeShapes=(er,rr)=>ur(ur({},er),rr)}(objectUtil||(objectUtil={}));const ZodParsedType=util.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=tr=>{switch(typeof tr){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(tr)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(tr)?ZodParsedType.array:tr===null?ZodParsedType.null:tr.then&&typeof tr.then=="function"&&tr.catch&&typeof tr.catch=="function"?ZodParsedType.promise:typeof Map!="undefined"&&tr instanceof Map?ZodParsedType.map:typeof Set!="undefined"&&tr instanceof Set?ZodParsedType.set:typeof Date!="undefined"&&tr instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.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"]),quotelessJson=tr=>JSON.stringify(tr,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{get errors(){return this.issues}constructor(er){var rr;super(),rr=this,this.issues=[],this.addIssue=ar=>{this.issues=[...this.issues,ar]},this.addIssues=function(){let ar=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];rr.issues=[...rr.issues,...ar]};const nr=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,nr):this.__proto__=nr,this.name="ZodError",this.issues=er}format(er){const rr=er||function(sr){return sr.message},nr={_errors:[]},ar=sr=>{for(const ir of sr.issues)if(ir.code==="invalid_union")ir.unionErrors.map(ar);else if(ir.code==="invalid_return_type")ar(ir.returnTypeError);else if(ir.code==="invalid_arguments")ar(ir.argumentsError);else if(ir.path.length===0)nr._errors.push(rr(ir));else{let or=nr,cr=0;for(;cr<ir.path.length;){const lr=ir.path[cr];cr===ir.path.length-1?(or[lr]=or[lr]||{_errors:[]},or[lr]._errors.push(rr(ir))):or[lr]=or[lr]||{_errors:[]},or=or[lr],cr++}}};return ar(this),nr}static assert(er){if(!(er instanceof ZodError))throw new Error("Not a ZodError: ".concat(er))}toString(){return this.message}get message(){return JSON.stringify(this.issues,util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(){let er=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ar=>ar.message;const rr={},nr=[];for(const ar of this.issues)ar.path.length>0?(rr[ar.path[0]]=rr[ar.path[0]]||[],rr[ar.path[0]].push(er(ar))):nr.push(er(ar));return{formErrors:nr,fieldErrors:rr}}get formErrors(){return this.flatten()}}ZodError.create=tr=>new ZodError(tr);const errorMap=(tr,er)=>{let rr;switch(tr.code){case ZodIssueCode.invalid_type:rr=tr.received===ZodParsedType.undefined?"Required":"Expected ".concat(tr.expected,", received ").concat(tr.received);break;case ZodIssueCode.invalid_literal:rr="Invalid literal value, expected ".concat(JSON.stringify(tr.expected,util.jsonStringifyReplacer));break;case ZodIssueCode.unrecognized_keys:rr="Unrecognized key(s) in object: ".concat(util.joinValues(tr.keys,", "));break;case ZodIssueCode.invalid_union:rr="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:rr="Invalid discriminator value. Expected ".concat(util.joinValues(tr.options));break;case ZodIssueCode.invalid_enum_value:rr="Invalid enum value. Expected ".concat(util.joinValues(tr.options),", received '").concat(tr.received,"'");break;case ZodIssueCode.invalid_arguments:rr="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:rr="Invalid function return type";break;case ZodIssueCode.invalid_date:rr="Invalid date";break;case ZodIssueCode.invalid_string:typeof tr.validation=="object"?"includes"in tr.validation?(rr='Invalid input: must include "'.concat(tr.validation.includes,'"'),typeof tr.validation.position=="number"&&(rr="".concat(rr," at one or more positions greater than or equal to ").concat(tr.validation.position))):"startsWith"in tr.validation?rr='Invalid input: must start with "'.concat(tr.validation.startsWith,'"'):"endsWith"in tr.validation?rr='Invalid input: must end with "'.concat(tr.validation.endsWith,'"'):util.assertNever(tr.validation):rr=tr.validation!=="regex"?"Invalid ".concat(tr.validation):"Invalid";break;case ZodIssueCode.too_small:rr=tr.type==="array"?"Array must contain ".concat(tr.exact?"exactly":tr.inclusive?"at least":"more than"," ").concat(tr.minimum," element(s)"):tr.type==="string"?"String must contain ".concat(tr.exact?"exactly":tr.inclusive?"at least":"over"," ").concat(tr.minimum," character(s)"):tr.type==="number"?"Number must be ".concat(tr.exact?"exactly equal to ":tr.inclusive?"greater than or equal to ":"greater than ").concat(tr.minimum):tr.type==="date"?"Date must be ".concat(tr.exact?"exactly equal to ":tr.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(tr.minimum))):"Invalid input";break;case ZodIssueCode.too_big:rr=tr.type==="array"?"Array must contain ".concat(tr.exact?"exactly":tr.inclusive?"at most":"less than"," ").concat(tr.maximum," element(s)"):tr.type==="string"?"String must contain ".concat(tr.exact?"exactly":tr.inclusive?"at most":"under"," ").concat(tr.maximum," character(s)"):tr.type==="number"?"Number must be ".concat(tr.exact?"exactly":tr.inclusive?"less than or equal to":"less than"," ").concat(tr.maximum):tr.type==="bigint"?"BigInt must be ".concat(tr.exact?"exactly":tr.inclusive?"less than or equal to":"less than"," ").concat(tr.maximum):tr.type==="date"?"Date must be ".concat(tr.exact?"exactly":tr.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(tr.maximum))):"Invalid input";break;case ZodIssueCode.custom:rr="Invalid input";break;case ZodIssueCode.invalid_intersection_types:rr="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:rr="Number must be a multiple of ".concat(tr.multipleOf);break;case ZodIssueCode.not_finite:rr="Number must be finite";break;default:rr=er.defaultError,util.assertNever(tr)}return{message:rr}};let overrideErrorMap=errorMap;function setErrorMap(tr){overrideErrorMap=tr}function getErrorMap(){return overrideErrorMap}const makeIssue=tr=>{const{data:er,path:rr,errorMaps:nr,issueData:ar}=tr,sr=[...rr,...ar.path||[]],ir=br(ur({},ar),{path:sr});if(ar.message!==void 0)return br(ur({},ar),{path:sr,message:ar.message});let or="";const cr=nr.filter(lr=>!!lr).slice().reverse();for(const lr of cr)or=lr(ir,{data:er,defaultError:or}).message;return br(ur({},ar),{path:sr,message:or})},EMPTY_PATH=[];function addIssueToContext(tr,er){const rr=getErrorMap(),nr=makeIssue({issueData:er,data:tr.data,path:tr.path,errorMaps:[tr.common.contextualErrorMap,tr.schemaErrorMap,rr,rr===errorMap?void 0:errorMap].filter(ar=>!!ar)});tr.common.issues.push(nr)}class ParseStatus{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(er,rr){const nr=[];for(const ar of rr){if(ar.status==="aborted")return INVALID;ar.status==="dirty"&&er.dirty(),nr.push(ar.value)}return{status:er.value,value:nr}}static mergeObjectAsync(er,rr){return Dr(this,null,function*(){const nr=[];for(const ar of rr){const sr=yield ar.key,ir=yield ar.value;nr.push({key:sr,value:ir})}return ParseStatus.mergeObjectSync(er,nr)})}static mergeObjectSync(er,rr){const nr={};for(const ar of rr){const{key:sr,value:ir}=ar;if(sr.status==="aborted"||ir.status==="aborted")return INVALID;sr.status==="dirty"&&er.dirty(),ir.status==="dirty"&&er.dirty(),sr.value==="__proto__"||ir.value===void 0&&!ar.alwaysSet||(nr[sr.value]=ir.value)}return{status:er.value,value:nr}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=tr=>({status:"dirty",value:tr}),OK=tr=>({status:"valid",value:tr}),isAborted=tr=>tr.status==="aborted",isDirty=tr=>tr.status==="dirty",isValid=tr=>tr.status==="valid",isAsync=tr=>typeof Promise!="undefined"&&tr instanceof Promise;function __classPrivateFieldGet(tr,er,rr,nr){if(typeof er=="function"?tr!==er||!0:!er.has(tr))throw new TypeError("Cannot read private member from an object whose class did not declare it");return er.get(tr)}function __classPrivateFieldSet(tr,er,rr,nr,ar){if(typeof er=="function"?tr!==er||!0:!er.has(tr))throw new TypeError("Cannot write private member to an object whose class did not declare it");return er.set(tr,rr),rr}var errorUtil,_ZodEnum_cache,_ZodNativeEnum_cache;typeof SuppressedError=="function"&&SuppressedError,function(tr){tr.errToObj=er=>typeof er=="string"?{message:er}:er||{},tr.toString=er=>typeof er=="string"?er:er==null?void 0:er.message}(errorUtil||(errorUtil={}));class ParseInputLazyPath{constructor(er,rr,nr,ar){this._cachedPath=[],this.parent=er,this.data=rr,this._path=nr,this._key=ar}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 handleResult=(tr,er)=>{if(isValid(er))return{success:!0,data:er.value};if(!tr.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const rr=new ZodError(tr.common.issues);return this._error=rr,this._error}}};function processCreateParams(tr){if(!tr)return{};const{errorMap:er,invalid_type_error:rr,required_error:nr,description:ar}=tr;if(er&&(rr||nr))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return er?{errorMap:er,description:ar}:{errorMap:(sr,ir)=>{var or,cr;const{message:lr}=tr;return sr.code==="invalid_enum_value"?{message:lr!=null?lr:ir.defaultError}:ir.data===void 0?{message:(or=lr!=null?lr:nr)!==null&&or!==void 0?or:ir.defaultError}:sr.code!=="invalid_type"?{message:ir.defaultError}:{message:(cr=lr!=null?lr:rr)!==null&&cr!==void 0?cr:ir.defaultError}},description:ar}}class ZodType{get description(){return this._def.description}_getType(er){return getParsedType(er.data)}_getOrReturnCtx(er,rr){return rr||{common:er.parent.common,data:er.data,parsedType:getParsedType(er.data),schemaErrorMap:this._def.errorMap,path:er.path,parent:er.parent}}_processInputParams(er){return{status:new ParseStatus,ctx:{common:er.parent.common,data:er.data,parsedType:getParsedType(er.data),schemaErrorMap:this._def.errorMap,path:er.path,parent:er.parent}}}_parseSync(er){const rr=this._parse(er);if(isAsync(rr))throw new Error("Synchronous parse encountered promise.");return rr}_parseAsync(er){const rr=this._parse(er);return Promise.resolve(rr)}parse(er,rr){const nr=this.safeParse(er,rr);if(nr.success)return nr.data;throw nr.error}safeParse(er,rr){var nr;const ar={common:{issues:[],async:(nr=rr==null?void 0:rr.async)!==null&&nr!==void 0&&nr,contextualErrorMap:rr==null?void 0:rr.errorMap},path:(rr==null?void 0:rr.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:er,parsedType:getParsedType(er)},sr=this._parseSync({data:er,path:ar.path,parent:ar});return handleResult(ar,sr)}"~validate"(er){var rr,nr;const ar={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:er,parsedType:getParsedType(er)};if(!this["~standard"].async)try{const sr=this._parseSync({data:er,path:[],parent:ar});return isValid(sr)?{value:sr.value}:{issues:ar.common.issues}}catch(sr){!((nr=(rr=sr==null?void 0:sr.message)===null||rr===void 0?void 0:rr.toLowerCase())===null||nr===void 0)&&nr.includes("encountered")&&(this["~standard"].async=!0),ar.common={issues:[],async:!0}}return this._parseAsync({data:er,path:[],parent:ar}).then(sr=>isValid(sr)?{value:sr.value}:{issues:ar.common.issues})}parseAsync(er,rr){return Dr(this,null,function*(){const nr=yield this.safeParseAsync(er,rr);if(nr.success)return nr.data;throw nr.error})}safeParseAsync(er,rr){return Dr(this,null,function*(){const nr={common:{issues:[],contextualErrorMap:rr==null?void 0:rr.errorMap,async:!0},path:(rr==null?void 0:rr.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:er,parsedType:getParsedType(er)},ar=this._parse({data:er,path:nr.path,parent:nr}),sr=yield isAsync(ar)?ar:Promise.resolve(ar);return handleResult(nr,sr)})}refine(er,rr){const nr=ar=>typeof rr=="string"||rr===void 0?{message:rr}:typeof rr=="function"?rr(ar):rr;return this._refinement((ar,sr)=>{const ir=er(ar),or=()=>sr.addIssue(ur({code:ZodIssueCode.custom},nr(ar)));return typeof Promise!="undefined"&&ir instanceof Promise?ir.then(cr=>!!cr||(or(),!1)):!!ir||(or(),!1)})}refinement(er,rr){return this._refinement((nr,ar)=>!!er(nr)||(ar.addIssue(typeof rr=="function"?rr(nr,ar):rr),!1))}_refinement(er){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:er}})}superRefine(er){return this._refinement(er)}constructor(er){this.spa=this.safeParseAsync,this._def=er,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:rr=>this["~validate"](rr)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(er){return ZodUnion.create([this,er],this._def)}and(er){return ZodIntersection.create(this,er,this._def)}transform(er){return new ZodEffects(br(ur({},processCreateParams(this._def)),{schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:er}}))}default(er){const rr=typeof er=="function"?er:()=>er;return new ZodDefault(br(ur({},processCreateParams(this._def)),{innerType:this,defaultValue:rr,typeName:ZodFirstPartyTypeKind.ZodDefault}))}brand(){return new ZodBranded(ur({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this},processCreateParams(this._def)))}catch(er){const rr=typeof er=="function"?er:()=>er;return new ZodCatch(br(ur({},processCreateParams(this._def)),{innerType:this,catchValue:rr,typeName:ZodFirstPartyTypeKind.ZodCatch}))}describe(er){return new this.constructor(br(ur({},this._def),{description:er}))}pipe(er){return ZodPipeline.create(this,er)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[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,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?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)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(?:(?: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])$/,ipv4CidrRegex=/^(?:(?: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])$/,ipv6Regex=/^(([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]))$/,ipv6CidrRegex=/^(([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])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource="((\\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])))",dateRegex=new RegExp("^".concat(dateRegexSource,"$"));function timeRegexSource(tr){let er="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return tr.precision?er="".concat(er,"\\.\\d{").concat(tr.precision,"}"):tr.precision==null&&(er="".concat(er,"(\\.\\d+)?")),er}function timeRegex(tr){return new RegExp("^".concat(timeRegexSource(tr),"$"))}function datetimeRegex(tr){let er="".concat(dateRegexSource,"T").concat(timeRegexSource(tr));const rr=[];return rr.push(tr.local?"Z?":"Z"),tr.offset&&rr.push("([+-]\\d{2}:?\\d{2})"),er="".concat(er,"(").concat(rr.join("|"),")"),new RegExp("^".concat(er,"$"))}function isValidIP(tr,er){return!(er!=="v4"&&er||!ipv4Regex.test(tr))||!(er!=="v6"&&er||!ipv6Regex.test(tr))}function isValidJWT(tr,er){if(!jwtRegex.test(tr))return!1;try{const[rr]=tr.split("."),nr=rr.replace(/-/g,"+").replace(/_/g,"/").padEnd(rr.length+(4-rr.length%4)%4,"="),ar=JSON.parse(atob(nr));return typeof ar=="object"&&ar!==null&&!(!ar.typ||!ar.alg)&&(!er||ar.alg===er)}catch(rr){return!1}}function isValidCidr(tr,er){return!(er!=="v4"&&er||!ipv4CidrRegex.test(tr))||!(er!=="v6"&&er||!ipv6CidrRegex.test(tr))}class ZodString extends ZodType{_parse(er){if(this._def.coerce&&(er.data=String(er.data)),this._getType(er)!==ZodParsedType.string){const ar=this._getOrReturnCtx(er);return addIssueToContext(ar,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:ar.parsedType}),INVALID}const rr=new ParseStatus;let nr;for(const ar of this._def.checks)if(ar.kind==="min")er.data.length<ar.value&&(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.too_small,minimum:ar.value,type:"string",inclusive:!0,exact:!1,message:ar.message}),rr.dirty());else if(ar.kind==="max")er.data.length>ar.value&&(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.too_big,maximum:ar.value,type:"string",inclusive:!0,exact:!1,message:ar.message}),rr.dirty());else if(ar.kind==="length"){const sr=er.data.length>ar.value,ir=er.data.length<ar.value;(sr||ir)&&(nr=this._getOrReturnCtx(er,nr),sr?addIssueToContext(nr,{code:ZodIssueCode.too_big,maximum:ar.value,type:"string",inclusive:!0,exact:!0,message:ar.message}):ir&&addIssueToContext(nr,{code:ZodIssueCode.too_small,minimum:ar.value,type:"string",inclusive:!0,exact:!0,message:ar.message}),rr.dirty())}else if(ar.kind==="email")emailRegex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"email",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty());else if(ar.kind==="emoji")emojiRegex||(emojiRegex=new RegExp(_emojiRegex,"u")),emojiRegex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"emoji",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty());else if(ar.kind==="uuid")uuidRegex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"uuid",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty());else if(ar.kind==="nanoid")nanoidRegex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty());else if(ar.kind==="cuid")cuidRegex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"cuid",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty());else if(ar.kind==="cuid2")cuid2Regex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty());else if(ar.kind==="ulid")ulidRegex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"ulid",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty());else if(ar.kind==="url")try{new URL(er.data)}catch(sr){nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"url",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty()}else ar.kind==="regex"?(ar.regex.lastIndex=0,ar.regex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"regex",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty())):ar.kind==="trim"?er.data=er.data.trim():ar.kind==="includes"?er.data.includes(ar.value,ar.position)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.invalid_string,validation:{includes:ar.value,position:ar.position},message:ar.message}),rr.dirty()):ar.kind==="toLowerCase"?er.data=er.data.toLowerCase():ar.kind==="toUpperCase"?er.data=er.data.toUpperCase():ar.kind==="startsWith"?er.data.startsWith(ar.value)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.invalid_string,validation:{startsWith:ar.value},message:ar.message}),rr.dirty()):ar.kind==="endsWith"?er.data.endsWith(ar.value)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.invalid_string,validation:{endsWith:ar.value},message:ar.message}),rr.dirty()):ar.kind==="datetime"?datetimeRegex(ar).test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.invalid_string,validation:"datetime",message:ar.message}),rr.dirty()):ar.kind==="date"?dateRegex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.invalid_string,validation:"date",message:ar.message}),rr.dirty()):ar.kind==="time"?timeRegex(ar).test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.invalid_string,validation:"time",message:ar.message}),rr.dirty()):ar.kind==="duration"?durationRegex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"duration",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty()):ar.kind==="ip"?isValidIP(er.data,ar.version)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"ip",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty()):ar.kind==="jwt"?isValidJWT(er.data,ar.alg)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"jwt",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty()):ar.kind==="cidr"?isValidCidr(er.data,ar.version)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"cidr",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty()):ar.kind==="base64"?base64Regex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"base64",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty()):ar.kind==="base64url"?base64urlRegex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{validation:"base64url",code:ZodIssueCode.invalid_string,message:ar.message}),rr.dirty()):util.assertNever(ar);return{status:rr.value,value:er.data}}_regex(er,rr,nr){return this.refinement(ar=>er.test(ar),ur({validation:rr,code:ZodIssueCode.invalid_string},errorUtil.errToObj(nr)))}_addCheck(er){return new ZodString(br(ur({},this._def),{checks:[...this._def.checks,er]}))}email(er){return this._addCheck(ur({kind:"email"},errorUtil.errToObj(er)))}url(er){return this._addCheck(ur({kind:"url"},errorUtil.errToObj(er)))}emoji(er){return this._addCheck(ur({kind:"emoji"},errorUtil.errToObj(er)))}uuid(er){return this._addCheck(ur({kind:"uuid"},errorUtil.errToObj(er)))}nanoid(er){return this._addCheck(ur({kind:"nanoid"},errorUtil.errToObj(er)))}cuid(er){return this._addCheck(ur({kind:"cuid"},errorUtil.errToObj(er)))}cuid2(er){return this._addCheck(ur({kind:"cuid2"},errorUtil.errToObj(er)))}ulid(er){return this._addCheck(ur({kind:"ulid"},errorUtil.errToObj(er)))}base64(er){return this._addCheck(ur({kind:"base64"},errorUtil.errToObj(er)))}base64url(er){return this._addCheck(ur({kind:"base64url"},errorUtil.errToObj(er)))}jwt(er){return this._addCheck(ur({kind:"jwt"},errorUtil.errToObj(er)))}ip(er){return this._addCheck(ur({kind:"ip"},errorUtil.errToObj(er)))}cidr(er){return this._addCheck(ur({kind:"cidr"},errorUtil.errToObj(er)))}datetime(er){var rr,nr;return typeof er=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:er}):this._addCheck(ur({kind:"datetime",precision:(er==null?void 0:er.precision)===void 0?null:er==null?void 0:er.precision,offset:(rr=er==null?void 0:er.offset)!==null&&rr!==void 0&&rr,local:(nr=er==null?void 0:er.local)!==null&&nr!==void 0&&nr},errorUtil.errToObj(er==null?void 0:er.message)))}date(er){return this._addCheck({kind:"date",message:er})}time(er){return typeof er=="string"?this._addCheck({kind:"time",precision:null,message:er}):this._addCheck(ur({kind:"time",precision:(er==null?void 0:er.precision)===void 0?null:er==null?void 0:er.precision},errorUtil.errToObj(er==null?void 0:er.message)))}duration(er){return this._addCheck(ur({kind:"duration"},errorUtil.errToObj(er)))}regex(er,rr){return this._addCheck(ur({kind:"regex",regex:er},errorUtil.errToObj(rr)))}includes(er,rr){return this._addCheck(ur({kind:"includes",value:er,position:rr==null?void 0:rr.position},errorUtil.errToObj(rr==null?void 0:rr.message)))}startsWith(er,rr){return this._addCheck(ur({kind:"startsWith",value:er},errorUtil.errToObj(rr)))}endsWith(er,rr){return this._addCheck(ur({kind:"endsWith",value:er},errorUtil.errToObj(rr)))}min(er,rr){return this._addCheck(ur({kind:"min",value:er},errorUtil.errToObj(rr)))}max(er,rr){return this._addCheck(ur({kind:"max",value:er},errorUtil.errToObj(rr)))}length(er,rr){return this._addCheck(ur({kind:"length",value:er},errorUtil.errToObj(rr)))}nonempty(er){return this.min(1,errorUtil.errToObj(er))}trim(){return new ZodString(br(ur({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new ZodString(br(ur({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new ZodString(br(ur({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}get isDatetime(){return!!this._def.checks.find(er=>er.kind==="datetime")}get isDate(){return!!this._def.checks.find(er=>er.kind==="date")}get isTime(){return!!this._def.checks.find(er=>er.kind==="time")}get isDuration(){return!!this._def.checks.find(er=>er.kind==="duration")}get isEmail(){return!!this._def.checks.find(er=>er.kind==="email")}get isURL(){return!!this._def.checks.find(er=>er.kind==="url")}get isEmoji(){return!!this._def.checks.find(er=>er.kind==="emoji")}get isUUID(){return!!this._def.checks.find(er=>er.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(er=>er.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(er=>er.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(er=>er.kind==="cuid2")}get isULID(){return!!this._def.checks.find(er=>er.kind==="ulid")}get isIP(){return!!this._def.checks.find(er=>er.kind==="ip")}get isCIDR(){return!!this._def.checks.find(er=>er.kind==="cidr")}get isBase64(){return!!this._def.checks.find(er=>er.kind==="base64")}get isBase64url(){return!!this._def.checks.find(er=>er.kind==="base64url")}get minLength(){let er=null;for(const rr of this._def.checks)rr.kind==="min"&&(er===null||rr.value>er)&&(er=rr.value);return er}get maxLength(){let er=null;for(const rr of this._def.checks)rr.kind==="max"&&(er===null||rr.value<er)&&(er=rr.value);return er}}function floatSafeRemainder(tr,er){const rr=(tr.toString().split(".")[1]||"").length,nr=(er.toString().split(".")[1]||"").length,ar=rr>nr?rr:nr;return parseInt(tr.toFixed(ar).replace(".",""))%parseInt(er.toFixed(ar).replace(".",""))/Math.pow(10,ar)}ZodString.create=tr=>{var er;return new ZodString(ur({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:(er=tr==null?void 0:tr.coerce)!==null&&er!==void 0&&er},processCreateParams(tr)))};class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(er){if(this._def.coerce&&(er.data=Number(er.data)),this._getType(er)!==ZodParsedType.number){const ar=this._getOrReturnCtx(er);return addIssueToContext(ar,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:ar.parsedType}),INVALID}let rr;const nr=new ParseStatus;for(const ar of this._def.checks)ar.kind==="int"?util.isInteger(er.data)||(rr=this._getOrReturnCtx(er,rr),addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:ar.message}),nr.dirty()):ar.kind==="min"?(ar.inclusive?er.data<ar.value:er.data<=ar.value)&&(rr=this._getOrReturnCtx(er,rr),addIssueToContext(rr,{code:ZodIssueCode.too_small,minimum:ar.value,type:"number",inclusive:ar.inclusive,exact:!1,message:ar.message}),nr.dirty()):ar.kind==="max"?(ar.inclusive?er.data>ar.value:er.data>=ar.value)&&(rr=this._getOrReturnCtx(er,rr),addIssueToContext(rr,{code:ZodIssueCode.too_big,maximum:ar.value,type:"number",inclusive:ar.inclusive,exact:!1,message:ar.message}),nr.dirty()):ar.kind==="multipleOf"?floatSafeRemainder(er.data,ar.value)!==0&&(rr=this._getOrReturnCtx(er,rr),addIssueToContext(rr,{code:ZodIssueCode.not_multiple_of,multipleOf:ar.value,message:ar.message}),nr.dirty()):ar.kind==="finite"?Number.isFinite(er.data)||(rr=this._getOrReturnCtx(er,rr),addIssueToContext(rr,{code:ZodIssueCode.not_finite,message:ar.message}),nr.dirty()):util.assertNever(ar);return{status:nr.value,value:er.data}}gte(er,rr){return this.setLimit("min",er,!0,errorUtil.toString(rr))}gt(er,rr){return this.setLimit("min",er,!1,errorUtil.toString(rr))}lte(er,rr){return this.setLimit("max",er,!0,errorUtil.toString(rr))}lt(er,rr){return this.setLimit("max",er,!1,errorUtil.toString(rr))}setLimit(er,rr,nr,ar){return new ZodNumber(br(ur({},this._def),{checks:[...this._def.checks,{kind:er,value:rr,inclusive:nr,message:errorUtil.toString(ar)}]}))}_addCheck(er){return new ZodNumber(br(ur({},this._def),{checks:[...this._def.checks,er]}))}int(er){return this._addCheck({kind:"int",message:errorUtil.toString(er)})}positive(er){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(er)})}negative(er){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(er)})}nonpositive(er){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(er)})}nonnegative(er){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(er)})}multipleOf(er,rr){return this._addCheck({kind:"multipleOf",value:er,message:errorUtil.toString(rr)})}finite(er){return this._addCheck({kind:"finite",message:errorUtil.toString(er)})}safe(er){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(er)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(er)})}get minValue(){let er=null;for(const rr of this._def.checks)rr.kind==="min"&&(er===null||rr.value>er)&&(er=rr.value);return er}get maxValue(){let er=null;for(const rr of this._def.checks)rr.kind==="max"&&(er===null||rr.value<er)&&(er=rr.value);return er}get isInt(){return!!this._def.checks.find(er=>er.kind==="int"||er.kind==="multipleOf"&&util.isInteger(er.value))}get isFinite(){let er=null,rr=null;for(const nr of this._def.checks){if(nr.kind==="finite"||nr.kind==="int"||nr.kind==="multipleOf")return!0;nr.kind==="min"?(rr===null||nr.value>rr)&&(rr=nr.value):nr.kind==="max"&&(er===null||nr.value<er)&&(er=nr.value)}return Number.isFinite(rr)&&Number.isFinite(er)}}ZodNumber.create=tr=>new ZodNumber(ur({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(tr==null?void 0:tr.coerce)||!1},processCreateParams(tr)));class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(er){if(this._def.coerce)try{er.data=BigInt(er.data)}catch(ar){return this._getInvalidInput(er)}if(this._getType(er)!==ZodParsedType.bigint)return this._getInvalidInput(er);let rr;const nr=new ParseStatus;for(const ar of this._def.checks)ar.kind==="min"?(ar.inclusive?er.data<ar.value:er.data<=ar.value)&&(rr=this._getOrReturnCtx(er,rr),addIssueToContext(rr,{code:ZodIssueCode.too_small,type:"bigint",minimum:ar.value,inclusive:ar.inclusive,message:ar.message}),nr.dirty()):ar.kind==="max"?(ar.inclusive?er.data>ar.value:er.data>=ar.value)&&(rr=this._getOrReturnCtx(er,rr),addIssueToContext(rr,{code:ZodIssueCode.too_big,type:"bigint",maximum:ar.value,inclusive:ar.inclusive,message:ar.message}),nr.dirty()):ar.kind==="multipleOf"?er.data%ar.value!==BigInt(0)&&(rr=this._getOrReturnCtx(er,rr),addIssueToContext(rr,{code:ZodIssueCode.not_multiple_of,multipleOf:ar.value,message:ar.message}),nr.dirty()):util.assertNever(ar);return{status:nr.value,value:er.data}}_getInvalidInput(er){const rr=this._getOrReturnCtx(er);return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:rr.parsedType}),INVALID}gte(er,rr){return this.setLimit("min",er,!0,errorUtil.toString(rr))}gt(er,rr){return this.setLimit("min",er,!1,errorUtil.toString(rr))}lte(er,rr){return this.setLimit("max",er,!0,errorUtil.toString(rr))}lt(er,rr){return this.setLimit("max",er,!1,errorUtil.toString(rr))}setLimit(er,rr,nr,ar){return new ZodBigInt(br(ur({},this._def),{checks:[...this._def.checks,{kind:er,value:rr,inclusive:nr,message:errorUtil.toString(ar)}]}))}_addCheck(er){return new ZodBigInt(br(ur({},this._def),{checks:[...this._def.checks,er]}))}positive(er){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(er)})}negative(er){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(er)})}nonpositive(er){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(er)})}nonnegative(er){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(er)})}multipleOf(er,rr){return this._addCheck({kind:"multipleOf",value:er,message:errorUtil.toString(rr)})}get minValue(){let er=null;for(const rr of this._def.checks)rr.kind==="min"&&(er===null||rr.value>er)&&(er=rr.value);return er}get maxValue(){let er=null;for(const rr of this._def.checks)rr.kind==="max"&&(er===null||rr.value<er)&&(er=rr.value);return er}}ZodBigInt.create=tr=>{var er;return new ZodBigInt(ur({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:(er=tr==null?void 0:tr.coerce)!==null&&er!==void 0&&er},processCreateParams(tr)))};class ZodBoolean extends ZodType{_parse(er){if(this._def.coerce&&(er.data=!!er.data),this._getType(er)!==ZodParsedType.boolean){const rr=this._getOrReturnCtx(er);return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:rr.parsedType}),INVALID}return OK(er.data)}}ZodBoolean.create=tr=>new ZodBoolean(ur({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(tr==null?void 0:tr.coerce)||!1},processCreateParams(tr)));class ZodDate extends ZodType{_parse(er){if(this._def.coerce&&(er.data=new Date(er.data)),this._getType(er)!==ZodParsedType.date){const ar=this._getOrReturnCtx(er);return addIssueToContext(ar,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:ar.parsedType}),INVALID}if(isNaN(er.data.getTime()))return addIssueToContext(this._getOrReturnCtx(er),{code:ZodIssueCode.invalid_date}),INVALID;const rr=new ParseStatus;let nr;for(const ar of this._def.checks)ar.kind==="min"?er.data.getTime()<ar.value&&(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.too_small,message:ar.message,inclusive:!0,exact:!1,minimum:ar.value,type:"date"}),rr.dirty()):ar.kind==="max"?er.data.getTime()>ar.value&&(nr=this._getOrReturnCtx(er,nr),addIssueToContext(nr,{code:ZodIssueCode.too_big,message:ar.message,inclusive:!0,exact:!1,maximum:ar.value,type:"date"}),rr.dirty()):util.assertNever(ar);return{status:rr.value,value:new Date(er.data.getTime())}}_addCheck(er){return new ZodDate(br(ur({},this._def),{checks:[...this._def.checks,er]}))}min(er,rr){return this._addCheck({kind:"min",value:er.getTime(),message:errorUtil.toString(rr)})}max(er,rr){return this._addCheck({kind:"max",value:er.getTime(),message:errorUtil.toString(rr)})}get minDate(){let er=null;for(const rr of this._def.checks)rr.kind==="min"&&(er===null||rr.value>er)&&(er=rr.value);return er!=null?new Date(er):null}get maxDate(){let er=null;for(const rr of this._def.checks)rr.kind==="max"&&(er===null||rr.value<er)&&(er=rr.value);return er!=null?new Date(er):null}}ZodDate.create=tr=>new ZodDate(ur({checks:[],coerce:(tr==null?void 0:tr.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate},processCreateParams(tr)));class ZodSymbol extends ZodType{_parse(er){if(this._getType(er)!==ZodParsedType.symbol){const rr=this._getOrReturnCtx(er);return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:rr.parsedType}),INVALID}return OK(er.data)}}ZodSymbol.create=tr=>new ZodSymbol(ur({typeName:ZodFirstPartyTypeKind.ZodSymbol},processCreateParams(tr)));class ZodUndefined extends ZodType{_parse(er){if(this._getType(er)!==ZodParsedType.undefined){const rr=this._getOrReturnCtx(er);return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:rr.parsedType}),INVALID}return OK(er.data)}}ZodUndefined.create=tr=>new ZodUndefined(ur({typeName:ZodFirstPartyTypeKind.ZodUndefined},processCreateParams(tr)));class ZodNull extends ZodType{_parse(er){if(this._getType(er)!==ZodParsedType.null){const rr=this._getOrReturnCtx(er);return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:rr.parsedType}),INVALID}return OK(er.data)}}ZodNull.create=tr=>new ZodNull(ur({typeName:ZodFirstPartyTypeKind.ZodNull},processCreateParams(tr)));class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(er){return OK(er.data)}}ZodAny.create=tr=>new ZodAny(ur({typeName:ZodFirstPartyTypeKind.ZodAny},processCreateParams(tr)));class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(er){return OK(er.data)}}ZodUnknown.create=tr=>new ZodUnknown(ur({typeName:ZodFirstPartyTypeKind.ZodUnknown},processCreateParams(tr)));class ZodNever extends ZodType{_parse(er){const rr=this._getOrReturnCtx(er);return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:rr.parsedType}),INVALID}}ZodNever.create=tr=>new ZodNever(ur({typeName:ZodFirstPartyTypeKind.ZodNever},processCreateParams(tr)));class ZodVoid extends ZodType{_parse(er){if(this._getType(er)!==ZodParsedType.undefined){const rr=this._getOrReturnCtx(er);return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:rr.parsedType}),INVALID}return OK(er.data)}}ZodVoid.create=tr=>new ZodVoid(ur({typeName:ZodFirstPartyTypeKind.ZodVoid},processCreateParams(tr)));class ZodArray extends ZodType{_parse(er){const{ctx:rr,status:nr}=this._processInputParams(er),ar=this._def;if(rr.parsedType!==ZodParsedType.array)return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:rr.parsedType}),INVALID;if(ar.exactLength!==null){const ir=rr.data.length>ar.exactLength.value,or=rr.data.length<ar.exactLength.value;(ir||or)&&(addIssueToContext(rr,{code:ir?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:or?ar.exactLength.value:void 0,maximum:ir?ar.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:ar.exactLength.message}),nr.dirty())}if(ar.minLength!==null&&rr.data.length<ar.minLength.value&&(addIssueToContext(rr,{code:ZodIssueCode.too_small,minimum:ar.minLength.value,type:"array",inclusive:!0,exact:!1,message:ar.minLength.message}),nr.dirty()),ar.maxLength!==null&&rr.data.length>ar.maxLength.value&&(addIssueToContext(rr,{code:ZodIssueCode.too_big,maximum:ar.maxLength.value,type:"array",inclusive:!0,exact:!1,message:ar.maxLength.message}),nr.dirty()),rr.common.async)return Promise.all([...rr.data].map((ir,or)=>ar.type._parseAsync(new ParseInputLazyPath(rr,ir,rr.path,or)))).then(ir=>ParseStatus.mergeArray(nr,ir));const sr=[...rr.data].map((ir,or)=>ar.type._parseSync(new ParseInputLazyPath(rr,ir,rr.path,or)));return ParseStatus.mergeArray(nr,sr)}get element(){return this._def.type}min(er,rr){return new ZodArray(br(ur({},this._def),{minLength:{value:er,message:errorUtil.toString(rr)}}))}max(er,rr){return new ZodArray(br(ur({},this._def),{maxLength:{value:er,message:errorUtil.toString(rr)}}))}length(er,rr){return new ZodArray(br(ur({},this._def),{exactLength:{value:er,message:errorUtil.toString(rr)}}))}nonempty(er){return this.min(1,er)}}function deepPartialify(tr){if(tr instanceof ZodObject){const er={};for(const rr in tr.shape){const nr=tr.shape[rr];er[rr]=ZodOptional.create(deepPartialify(nr))}return new ZodObject(br(ur({},tr._def),{shape:()=>er}))}return tr instanceof ZodArray?new ZodArray(br(ur({},tr._def),{type:deepPartialify(tr.element)})):tr instanceof ZodOptional?ZodOptional.create(deepPartialify(tr.unwrap())):tr instanceof ZodNullable?ZodNullable.create(deepPartialify(tr.unwrap())):tr instanceof ZodTuple?ZodTuple.create(tr.items.map(er=>deepPartialify(er))):tr}ZodArray.create=(tr,er)=>new ZodArray(ur({type:tr,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray},processCreateParams(er)));class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const er=this._def.shape(),rr=util.objectKeys(er);return this._cached={shape:er,keys:rr}}_parse(er){if(this._getType(er)!==ZodParsedType.object){const cr=this._getOrReturnCtx(er);return addIssueToContext(cr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:cr.parsedType}),INVALID}const{status:rr,ctx:nr}=this._processInputParams(er),{shape:ar,keys:sr}=this._getCached(),ir=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip"))for(const cr in nr.data)sr.includes(cr)||ir.push(cr);const or=[];for(const cr of sr){const lr=ar[cr],dr=nr.data[cr];or.push({key:{status:"valid",value:cr},value:lr._parse(new ParseInputLazyPath(nr,dr,nr.path,cr)),alwaysSet:cr in nr.data})}if(this._def.catchall instanceof ZodNever){const cr=this._def.unknownKeys;if(cr==="passthrough")for(const lr of ir)or.push({key:{status:"valid",value:lr},value:{status:"valid",value:nr.data[lr]}});else if(cr==="strict")ir.length>0&&(addIssueToContext(nr,{code:ZodIssueCode.unrecognized_keys,keys:ir}),rr.dirty());else if(cr!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const cr=this._def.catchall;for(const lr of ir){const dr=nr.data[lr];or.push({key:{status:"valid",value:lr},value:cr._parse(new ParseInputLazyPath(nr,dr,nr.path,lr)),alwaysSet:lr in nr.data})}}return nr.common.async?Promise.resolve().then(()=>Dr(this,null,function*(){const cr=[];for(const lr of or){const dr=yield lr.key,pr=yield lr.value;cr.push({key:dr,value:pr,alwaysSet:lr.alwaysSet})}return cr})).then(cr=>ParseStatus.mergeObjectSync(rr,cr)):ParseStatus.mergeObjectSync(rr,or)}get shape(){return this._def.shape()}strict(er){return errorUtil.errToObj,new ZodObject(ur(br(ur({},this._def),{unknownKeys:"strict"}),er!==void 0?{errorMap:(rr,nr)=>{var ar,sr,ir,or;const cr=(ir=(sr=(ar=this._def).errorMap)===null||sr===void 0?void 0:sr.call(ar,rr,nr).message)!==null&&ir!==void 0?ir:nr.defaultError;return rr.code==="unrecognized_keys"?{message:(or=errorUtil.errToObj(er).message)!==null&&or!==void 0?or:cr}:{message:cr}}}:{}))}strip(){return new ZodObject(br(ur({},this._def),{unknownKeys:"strip"}))}passthrough(){return new ZodObject(br(ur({},this._def),{unknownKeys:"passthrough"}))}extend(er){return new ZodObject(br(ur({},this._def),{shape:()=>ur(ur({},this._def.shape()),er)}))}merge(er){return new ZodObject({unknownKeys:er._def.unknownKeys,catchall:er._def.catchall,shape:()=>ur(ur({},this._def.shape()),er._def.shape()),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(er,rr){return this.augment({[er]:rr})}catchall(er){return new ZodObject(br(ur({},this._def),{catchall:er}))}pick(er){const rr={};return util.objectKeys(er).forEach(nr=>{er[nr]&&this.shape[nr]&&(rr[nr]=this.shape[nr])}),new ZodObject(br(ur({},this._def),{shape:()=>rr}))}omit(er){const rr={};return util.objectKeys(this.shape).forEach(nr=>{er[nr]||(rr[nr]=this.shape[nr])}),new ZodObject(br(ur({},this._def),{shape:()=>rr}))}deepPartial(){return deepPartialify(this)}partial(er){const rr={};return util.objectKeys(this.shape).forEach(nr=>{const ar=this.shape[nr];er&&!er[nr]?rr[nr]=ar:rr[nr]=ar.optional()}),new ZodObject(br(ur({},this._def),{shape:()=>rr}))}required(er){const rr={};return util.objectKeys(this.shape).forEach(nr=>{if(er&&!er[nr])rr[nr]=this.shape[nr];else{let ar=this.shape[nr];for(;ar instanceof ZodOptional;)ar=ar._def.innerType;rr[nr]=ar}}),new ZodObject(br(ur({},this._def),{shape:()=>rr}))}keyof(){return createZodEnum(util.objectKeys(this.shape))}}ZodObject.create=(tr,er)=>new ZodObject(ur({shape:()=>tr,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject},processCreateParams(er))),ZodObject.strictCreate=(tr,er)=>new ZodObject(ur({shape:()=>tr,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject},processCreateParams(er))),ZodObject.lazycreate=(tr,er)=>new ZodObject(ur({shape:tr,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject},processCreateParams(er)));class ZodUnion extends ZodType{_parse(er){const{ctx:rr}=this._processInputParams(er),nr=this._def.options;if(rr.common.async)return Promise.all(nr.map(ar=>Dr(this,null,function*(){const sr=br(ur({},rr),{common:br(ur({},rr.common),{issues:[]}),parent:null});return{result:yield ar._parseAsync({data:rr.data,path:rr.path,parent:sr}),ctx:sr}}))).then(function(ar){for(const ir of ar)if(ir.result.status==="valid")return ir.result;for(const ir of ar)if(ir.result.status==="dirty")return rr.common.issues.push(...ir.ctx.common.issues),ir.result;const sr=ar.map(ir=>new ZodError(ir.ctx.common.issues));return addIssueToContext(rr,{code:ZodIssueCode.invalid_union,unionErrors:sr}),INVALID});{let ar;const sr=[];for(const or of nr){const cr=br(ur({},rr),{common:br(ur({},rr.common),{issues:[]}),parent:null}),lr=or._parseSync({data:rr.data,path:rr.path,parent:cr});if(lr.status==="valid")return lr;lr.status!=="dirty"||ar||(ar={result:lr,ctx:cr}),cr.common.issues.length&&sr.push(cr.common.issues)}if(ar)return rr.common.issues.push(...ar.ctx.common.issues),ar.result;const ir=sr.map(or=>new ZodError(or));return addIssueToContext(rr,{code:ZodIssueCode.invalid_union,unionErrors:ir}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(tr,er)=>new ZodUnion(ur({options:tr,typeName:ZodFirstPartyTypeKind.ZodUnion},processCreateParams(er)));const getDiscriminator=tr=>tr instanceof ZodLazy?getDiscriminator(tr.schema):tr instanceof ZodEffects?getDiscriminator(tr.innerType()):tr instanceof ZodLiteral?[tr.value]:tr instanceof ZodEnum?tr.options:tr instanceof ZodNativeEnum?util.objectValues(tr.enum):tr instanceof ZodDefault?getDiscriminator(tr._def.innerType):tr instanceof ZodUndefined?[void 0]:tr instanceof ZodNull?[null]:tr instanceof ZodOptional?[void 0,...getDiscriminator(tr.unwrap())]:tr instanceof ZodNullable?[null,...getDiscriminator(tr.unwrap())]:tr instanceof ZodBranded||tr instanceof ZodReadonly?getDiscriminator(tr.unwrap()):tr instanceof ZodCatch?getDiscriminator(tr._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(er){const{ctx:rr}=this._processInputParams(er);if(rr.parsedType!==ZodParsedType.object)return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:rr.parsedType}),INVALID;const nr=this.discriminator,ar=rr.data[nr],sr=this.optionsMap.get(ar);return sr?rr.common.async?sr._parseAsync({data:rr.data,path:rr.path,parent:rr}):sr._parseSync({data:rr.data,path:rr.path,parent:rr}):(addIssueToContext(rr,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[nr]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(er,rr,nr){const ar=new Map;for(const sr of rr){const ir=getDiscriminator(sr.shape[er]);if(!ir.length)throw new Error("A discriminator value for key `".concat(er,"` could not be extracted from all schema options"));for(const or of ir){if(ar.has(or))throw new Error("Discriminator property ".concat(String(er)," has duplicate value ").concat(String(or)));ar.set(or,sr)}}return new ZodDiscriminatedUnion(ur({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:er,options:rr,optionsMap:ar},processCreateParams(nr)))}}function mergeValues(tr,er){const rr=getParsedType(tr),nr=getParsedType(er);if(tr===er)return{valid:!0,data:tr};if(rr===ZodParsedType.object&&nr===ZodParsedType.object){const ar=util.objectKeys(er),sr=util.objectKeys(tr).filter(or=>ar.indexOf(or)!==-1),ir=ur(ur({},tr),er);for(const or of sr){const cr=mergeValues(tr[or],er[or]);if(!cr.valid)return{valid:!1};ir[or]=cr.data}return{valid:!0,data:ir}}if(rr===ZodParsedType.array&&nr===ZodParsedType.array){if(tr.length!==er.length)return{valid:!1};const ar=[];for(let sr=0;sr<tr.length;sr++){const ir=mergeValues(tr[sr],er[sr]);if(!ir.valid)return{valid:!1};ar.push(ir.data)}return{valid:!0,data:ar}}return rr===ZodParsedType.date&&nr===ZodParsedType.date&&+tr==+er?{valid:!0,data:tr}:{valid:!1}}class ZodIntersection extends ZodType{_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er),ar=(sr,ir)=>{if(isAborted(sr)||isAborted(ir))return INVALID;const or=mergeValues(sr.value,ir.value);return or.valid?((isDirty(sr)||isDirty(ir))&&rr.dirty(),{status:rr.value,value:or.data}):(addIssueToContext(nr,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return nr.common.async?Promise.all([this._def.left._parseAsync({data:nr.data,path:nr.path,parent:nr}),this._def.right._parseAsync({data:nr.data,path:nr.path,parent:nr})]).then(sr=>{let[ir,or]=sr;return ar(ir,or)}):ar(this._def.left._parseSync({data:nr.data,path:nr.path,parent:nr}),this._def.right._parseSync({data:nr.data,path:nr.path,parent:nr}))}}ZodIntersection.create=(tr,er,rr)=>new ZodIntersection(ur({left:tr,right:er,typeName:ZodFirstPartyTypeKind.ZodIntersection},processCreateParams(rr)));class ZodTuple extends ZodType{_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.parsedType!==ZodParsedType.array)return addIssueToContext(nr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:nr.parsedType}),INVALID;if(nr.data.length<this._def.items.length)return addIssueToContext(nr,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&nr.data.length>this._def.items.length&&(addIssueToContext(nr,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),rr.dirty());const ar=[...nr.data].map((sr,ir)=>{const or=this._def.items[ir]||this._def.rest;return or?or._parse(new ParseInputLazyPath(nr,sr,nr.path,ir)):null}).filter(sr=>!!sr);return nr.common.async?Promise.all(ar).then(sr=>ParseStatus.mergeArray(rr,sr)):ParseStatus.mergeArray(rr,ar)}get items(){return this._def.items}rest(er){return new ZodTuple(br(ur({},this._def),{rest:er}))}}ZodTuple.create=(tr,er)=>{if(!Array.isArray(tr))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple(ur({items:tr,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null},processCreateParams(er)))};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.parsedType!==ZodParsedType.object)return addIssueToContext(nr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:nr.parsedType}),INVALID;const ar=[],sr=this._def.keyType,ir=this._def.valueType;for(const or in nr.data)ar.push({key:sr._parse(new ParseInputLazyPath(nr,or,nr.path,or)),value:ir._parse(new ParseInputLazyPath(nr,nr.data[or],nr.path,or)),alwaysSet:or in nr.data});return nr.common.async?ParseStatus.mergeObjectAsync(rr,ar):ParseStatus.mergeObjectSync(rr,ar)}get element(){return this._def.valueType}static create(er,rr,nr){return new ZodRecord(rr instanceof ZodType?ur({keyType:er,valueType:rr,typeName:ZodFirstPartyTypeKind.ZodRecord},processCreateParams(nr)):ur({keyType:ZodString.create(),valueType:er,typeName:ZodFirstPartyTypeKind.ZodRecord},processCreateParams(rr)))}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.parsedType!==ZodParsedType.map)return addIssueToContext(nr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:nr.parsedType}),INVALID;const ar=this._def.keyType,sr=this._def.valueType,ir=[...nr.data.entries()].map((or,cr)=>{let[lr,dr]=or;return{key:ar._parse(new ParseInputLazyPath(nr,lr,nr.path,[cr,"key"])),value:sr._parse(new ParseInputLazyPath(nr,dr,nr.path,[cr,"value"]))}});if(nr.common.async){const or=new Map;return Promise.resolve().then(()=>Dr(this,null,function*(){for(const cr of ir){const lr=yield cr.key,dr=yield cr.value;if(lr.status==="aborted"||dr.status==="aborted")return INVALID;lr.status!=="dirty"&&dr.status!=="dirty"||rr.dirty(),or.set(lr.value,dr.value)}return{status:rr.value,value:or}}))}{const or=new Map;for(const cr of ir){const lr=cr.key,dr=cr.value;if(lr.status==="aborted"||dr.status==="aborted")return INVALID;lr.status!=="dirty"&&dr.status!=="dirty"||rr.dirty(),or.set(lr.value,dr.value)}return{status:rr.value,value:or}}}}ZodMap.create=(tr,er,rr)=>new ZodMap(ur({valueType:er,keyType:tr,typeName:ZodFirstPartyTypeKind.ZodMap},processCreateParams(rr)));class ZodSet extends ZodType{_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.parsedType!==ZodParsedType.set)return addIssueToContext(nr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:nr.parsedType}),INVALID;const ar=this._def;ar.minSize!==null&&nr.data.size<ar.minSize.value&&(addIssueToContext(nr,{code:ZodIssueCode.too_small,minimum:ar.minSize.value,type:"set",inclusive:!0,exact:!1,message:ar.minSize.message}),rr.dirty()),ar.maxSize!==null&&nr.data.size>ar.maxSize.value&&(addIssueToContext(nr,{code:ZodIssueCode.too_big,maximum:ar.maxSize.value,type:"set",inclusive:!0,exact:!1,message:ar.maxSize.message}),rr.dirty());const sr=this._def.valueType;function ir(cr){const lr=new Set;for(const dr of cr){if(dr.status==="aborted")return INVALID;dr.status==="dirty"&&rr.dirty(),lr.add(dr.value)}return{status:rr.value,value:lr}}const or=[...nr.data.values()].map((cr,lr)=>sr._parse(new ParseInputLazyPath(nr,cr,nr.path,lr)));return nr.common.async?Promise.all(or).then(cr=>ir(cr)):ir(or)}min(er,rr){return new ZodSet(br(ur({},this._def),{minSize:{value:er,message:errorUtil.toString(rr)}}))}max(er,rr){return new ZodSet(br(ur({},this._def),{maxSize:{value:er,message:errorUtil.toString(rr)}}))}size(er,rr){return this.min(er,rr).max(er,rr)}nonempty(er){return this.min(1,er)}}ZodSet.create=(tr,er)=>new ZodSet(ur({valueType:tr,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet},processCreateParams(er)));class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(er){const{ctx:rr}=this._processInputParams(er);if(rr.parsedType!==ZodParsedType.function)return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:rr.parsedType}),INVALID;function nr(or,cr){return makeIssue({data:or,path:rr.path,errorMaps:[rr.common.contextualErrorMap,rr.schemaErrorMap,getErrorMap(),errorMap].filter(lr=>!!lr),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:cr}})}function ar(or,cr){return makeIssue({data:or,path:rr.path,errorMaps:[rr.common.contextualErrorMap,rr.schemaErrorMap,getErrorMap(),errorMap].filter(lr=>!!lr),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:cr}})}const sr={errorMap:rr.common.contextualErrorMap},ir=rr.data;if(this._def.returns instanceof ZodPromise){const or=this;return OK(function(){return Dr(this,arguments,function*(){for(var cr=arguments.length,lr=new Array(cr),dr=0;dr<cr;dr++)lr[dr]=arguments[dr];const pr=new ZodError([]),hr=yield or._def.args.parseAsync(lr,sr).catch(gr=>{throw pr.addIssue(nr(lr,gr)),pr}),fr=yield Reflect.apply(ir,this,hr);return yield or._def.returns._def.type.parseAsync(fr,sr).catch(gr=>{throw pr.addIssue(ar(fr,gr)),pr})})})}{const or=this;return OK(function(){for(var cr=arguments.length,lr=new Array(cr),dr=0;dr<cr;dr++)lr[dr]=arguments[dr];const pr=or._def.args.safeParse(lr,sr);if(!pr.success)throw new ZodError([nr(lr,pr.error)]);const hr=Reflect.apply(ir,this,pr.data),fr=or._def.returns.safeParse(hr,sr);if(!fr.success)throw new ZodError([ar(hr,fr.error)]);return fr.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(){for(var er=arguments.length,rr=new Array(er),nr=0;nr<er;nr++)rr[nr]=arguments[nr];return new ZodFunction(br(ur({},this._def),{args:ZodTuple.create(rr).rest(ZodUnknown.create())}))}returns(er){return new ZodFunction(br(ur({},this._def),{returns:er}))}implement(er){return this.parse(er)}strictImplement(er){return this.parse(er)}static create(er,rr,nr){return new ZodFunction(ur({args:er||ZodTuple.create([]).rest(ZodUnknown.create()),returns:rr||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction},processCreateParams(nr)))}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(er){const{ctx:rr}=this._processInputParams(er);return this._def.getter()._parse({data:rr.data,path:rr.path,parent:rr})}}ZodLazy.create=(tr,er)=>new ZodLazy(ur({getter:tr,typeName:ZodFirstPartyTypeKind.ZodLazy},processCreateParams(er)));class ZodLiteral extends ZodType{_parse(er){if(er.data!==this._def.value){const rr=this._getOrReturnCtx(er);return addIssueToContext(rr,{received:rr.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:er.data}}get value(){return this._def.value}}function createZodEnum(tr,er){return new ZodEnum(ur({values:tr,typeName:ZodFirstPartyTypeKind.ZodEnum},processCreateParams(er)))}ZodLiteral.create=(tr,er)=>new ZodLiteral(ur({value:tr,typeName:ZodFirstPartyTypeKind.ZodLiteral},processCreateParams(er)));class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(er){if(typeof er.data!="string"){const rr=this._getOrReturnCtx(er),nr=this._def.values;return addIssueToContext(rr,{expected:util.joinValues(nr),received:rr.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache)||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values)),!__classPrivateFieldGet(this,_ZodEnum_cache).has(er.data)){const rr=this._getOrReturnCtx(er),nr=this._def.values;return addIssueToContext(rr,{received:rr.data,code:ZodIssueCode.invalid_enum_value,options:nr}),INVALID}return OK(er.data)}get options(){return this._def.values}get enum(){const er={};for(const rr of this._def.values)er[rr]=rr;return er}get Values(){const er={};for(const rr of this._def.values)er[rr]=rr;return er}get Enum(){const er={};for(const rr of this._def.values)er[rr]=rr;return er}extract(er){let rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._def;return ZodEnum.create(er,ur(ur({},this._def),rr))}exclude(er){let rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._def;return ZodEnum.create(this.options.filter(nr=>!er.includes(nr)),ur(ur({},this._def),rr))}}_ZodEnum_cache=new WeakMap,ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(er){const rr=util.getValidEnumValues(this._def.values),nr=this._getOrReturnCtx(er);if(nr.parsedType!==ZodParsedType.string&&nr.parsedType!==ZodParsedType.number){const ar=util.objectValues(rr);return addIssueToContext(nr,{expected:util.joinValues(ar),received:nr.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache)||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util.getValidEnumValues(this._def.values))),!__classPrivateFieldGet(this,_ZodNativeEnum_cache).has(er.data)){const ar=util.objectValues(rr);return addIssueToContext(nr,{received:nr.data,code:ZodIssueCode.invalid_enum_value,options:ar}),INVALID}return OK(er.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap,ZodNativeEnum.create=(tr,er)=>new ZodNativeEnum(ur({values:tr,typeName:ZodFirstPartyTypeKind.ZodNativeEnum},processCreateParams(er)));class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(er){const{ctx:rr}=this._processInputParams(er);if(rr.parsedType!==ZodParsedType.promise&&rr.common.async===!1)return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:rr.parsedType}),INVALID;const nr=rr.parsedType===ZodParsedType.promise?rr.data:Promise.resolve(rr.data);return OK(nr.then(ar=>this._def.type.parseAsync(ar,{path:rr.path,errorMap:rr.common.contextualErrorMap})))}}ZodPromise.create=(tr,er)=>new ZodPromise(ur({type:tr,typeName:ZodFirstPartyTypeKind.ZodPromise},processCreateParams(er)));class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er),ar=this._def.effect||null,sr={addIssue:ir=>{addIssueToContext(nr,ir),ir.fatal?rr.abort():rr.dirty()},get path(){return nr.path}};if(sr.addIssue=sr.addIssue.bind(sr),ar.type==="preprocess"){const ir=ar.transform(nr.data,sr);if(nr.common.async)return Promise.resolve(ir).then(or=>Dr(this,null,function*(){if(rr.value==="aborted")return INVALID;const cr=yield this._def.schema._parseAsync({data:or,path:nr.path,parent:nr});return cr.status==="aborted"?INVALID:cr.status==="dirty"||rr.value==="dirty"?DIRTY(cr.value):cr}));{if(rr.value==="aborted")return INVALID;const or=this._def.schema._parseSync({data:ir,path:nr.path,parent:nr});return or.status==="aborted"?INVALID:or.status==="dirty"||rr.value==="dirty"?DIRTY(or.value):or}}if(ar.type==="refinement"){const ir=or=>{const cr=ar.refinement(or,sr);if(nr.common.async)return Promise.resolve(cr);if(cr instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return or};if(nr.common.async===!1){const or=this._def.schema._parseSync({data:nr.data,path:nr.path,parent:nr});return or.status==="aborted"?INVALID:(or.status==="dirty"&&rr.dirty(),ir(or.value),{status:rr.value,value:or.value})}return this._def.schema._parseAsync({data:nr.data,path:nr.path,parent:nr}).then(or=>or.status==="aborted"?INVALID:(or.status==="dirty"&&rr.dirty(),ir(or.value).then(()=>({status:rr.value,value:or.value}))))}if(ar.type==="transform"){if(nr.common.async===!1){const ir=this._def.schema._parseSync({data:nr.data,path:nr.path,parent:nr});if(!isValid(ir))return ir;const or=ar.transform(ir.value,sr);if(or instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:rr.value,value:or}}return this._def.schema._parseAsync({data:nr.data,path:nr.path,parent:nr}).then(ir=>isValid(ir)?Promise.resolve(ar.transform(ir.value,sr)).then(or=>({status:rr.value,value:or})):ir)}util.assertNever(ar)}}ZodEffects.create=(tr,er,rr)=>new ZodEffects(ur({schema:tr,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:er},processCreateParams(rr))),ZodEffects.createWithPreprocess=(tr,er,rr)=>new ZodEffects(ur({schema:er,effect:{type:"preprocess",transform:tr},typeName:ZodFirstPartyTypeKind.ZodEffects},processCreateParams(rr)));class ZodOptional extends ZodType{_parse(er){return this._getType(er)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(er)}unwrap(){return this._def.innerType}}ZodOptional.create=(tr,er)=>new ZodOptional(ur({innerType:tr,typeName:ZodFirstPartyTypeKind.ZodOptional},processCreateParams(er)));class ZodNullable extends ZodType{_parse(er){return this._getType(er)===ZodParsedType.null?OK(null):this._def.innerType._parse(er)}unwrap(){return this._def.innerType}}ZodNullable.create=(tr,er)=>new ZodNullable(ur({innerType:tr,typeName:ZodFirstPartyTypeKind.ZodNullable},processCreateParams(er)));class ZodDefault extends ZodType{_parse(er){const{ctx:rr}=this._processInputParams(er);let nr=rr.data;return rr.parsedType===ZodParsedType.undefined&&(nr=this._def.defaultValue()),this._def.innerType._parse({data:nr,path:rr.path,parent:rr})}removeDefault(){return this._def.innerType}}ZodDefault.create=(tr,er)=>new ZodDefault(ur({innerType:tr,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof er.default=="function"?er.default:()=>er.default},processCreateParams(er)));class ZodCatch extends ZodType{_parse(er){const{ctx:rr}=this._processInputParams(er),nr=br(ur({},rr),{common:br(ur({},rr.common),{issues:[]})}),ar=this._def.innerType._parse({data:nr.data,path:nr.path,parent:ur({},nr)});return isAsync(ar)?ar.then(sr=>({status:"valid",value:sr.status==="valid"?sr.value:this._def.catchValue({get error(){return new ZodError(nr.common.issues)},input:nr.data})})):{status:"valid",value:ar.status==="valid"?ar.value:this._def.catchValue({get error(){return new ZodError(nr.common.issues)},input:nr.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(tr,er)=>new ZodCatch(ur({innerType:tr,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof er.catch=="function"?er.catch:()=>er.catch},processCreateParams(er)));class ZodNaN extends ZodType{_parse(er){if(this._getType(er)!==ZodParsedType.nan){const rr=this._getOrReturnCtx(er);return addIssueToContext(rr,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:rr.parsedType}),INVALID}return{status:"valid",value:er.data}}}ZodNaN.create=tr=>new ZodNaN(ur({typeName:ZodFirstPartyTypeKind.ZodNaN},processCreateParams(tr)));const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(er){const{ctx:rr}=this._processInputParams(er),nr=rr.data;return this._def.type._parse({data:nr,path:rr.path,parent:rr})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.common.async)return Dr(this,null,function*(){const ar=yield this._def.in._parseAsync({data:nr.data,path:nr.path,parent:nr});return ar.status==="aborted"?INVALID:ar.status==="dirty"?(rr.dirty(),DIRTY(ar.value)):this._def.out._parseAsync({data:ar.value,path:nr.path,parent:nr})});{const ar=this._def.in._parseSync({data:nr.data,path:nr.path,parent:nr});return ar.status==="aborted"?INVALID:ar.status==="dirty"?(rr.dirty(),{status:"dirty",value:ar.value}):this._def.out._parseSync({data:ar.value,path:nr.path,parent:nr})}}static create(er,rr){return new ZodPipeline({in:er,out:rr,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(er){const rr=this._def.innerType._parse(er),nr=ar=>(isValid(ar)&&(ar.value=Object.freeze(ar.value)),ar);return isAsync(rr)?rr.then(ar=>nr(ar)):nr(rr)}unwrap(){return this._def.innerType}}function cleanParams(tr,er){const rr=typeof tr=="function"?tr(er):typeof tr=="string"?{message:tr}:tr;return typeof rr=="string"?{message:rr}:rr}function custom(tr){let er=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},rr=arguments.length>2?arguments[2]:void 0;return tr?ZodAny.create().superRefine((nr,ar)=>{var sr,ir;const or=tr(nr);if(or instanceof Promise)return or.then(cr=>{var lr,dr;if(!cr){const pr=cleanParams(er,nr),hr=(dr=(lr=pr.fatal)!==null&&lr!==void 0?lr:rr)===null||dr===void 0||dr;ar.addIssue(br(ur({code:"custom"},pr),{fatal:hr}))}});if(!or){const cr=cleanParams(er,nr),lr=(ir=(sr=cr.fatal)!==null&&sr!==void 0?sr:rr)===null||ir===void 0||ir;ar.addIssue(br(ur({code:"custom"},cr),{fatal:lr}))}}):ZodAny.create()}ZodReadonly.create=(tr,er)=>new ZodReadonly(ur({innerType:tr,typeName:ZodFirstPartyTypeKind.ZodReadonly},processCreateParams(er)));const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(tr){tr.ZodString="ZodString",tr.ZodNumber="ZodNumber",tr.ZodNaN="ZodNaN",tr.ZodBigInt="ZodBigInt",tr.ZodBoolean="ZodBoolean",tr.ZodDate="ZodDate",tr.ZodSymbol="ZodSymbol",tr.ZodUndefined="ZodUndefined",tr.ZodNull="ZodNull",tr.ZodAny="ZodAny",tr.ZodUnknown="ZodUnknown",tr.ZodNever="ZodNever",tr.ZodVoid="ZodVoid",tr.ZodArray="ZodArray",tr.ZodObject="ZodObject",tr.ZodUnion="ZodUnion",tr.ZodDiscriminatedUnion="ZodDiscriminatedUnion",tr.ZodIntersection="ZodIntersection",tr.ZodTuple="ZodTuple",tr.ZodRecord="ZodRecord",tr.ZodMap="ZodMap",tr.ZodSet="ZodSet",tr.ZodFunction="ZodFunction",tr.ZodLazy="ZodLazy",tr.ZodLiteral="ZodLiteral",tr.ZodEnum="ZodEnum",tr.ZodEffects="ZodEffects",tr.ZodNativeEnum="ZodNativeEnum",tr.ZodOptional="ZodOptional",tr.ZodNullable="ZodNullable",tr.ZodDefault="ZodDefault",tr.ZodCatch="ZodCatch",tr.ZodPromise="ZodPromise",tr.ZodBranded="ZodBranded",tr.ZodPipeline="ZodPipeline",tr.ZodReadonly="ZodReadonly"})(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=function(tr){return custom(er=>er instanceof tr,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{message:"Input not instance of ".concat(tr.name)})},stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:tr=>ZodString.create(br(ur({},tr),{coerce:!0})),number:tr=>ZodNumber.create(br(ur({},tr),{coerce:!0})),boolean:tr=>ZodBoolean.create(br(ur({},tr),{coerce:!0})),bigint:tr=>ZodBigInt.create(br(ur({},tr),{coerce:!0})),date:tr=>ZodDate.create(br(ur({},tr),{coerce:!0}))},NEVER=INVALID;var z$1=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid,isAsync,get util(){return util},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,datetimeRegex,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError});const processorFn=()=>z$1.function().args(z$1.custom()).returns(z$1.boolean().optional()),baseSchema=z$1.object({api:z$1.string().refine(tr=>!tr.startsWith("http"),{message:"Just need host part in url"}),project:z$1.string().min(1,"Missing value"),title:z$1.string().min(1,"Missing value"),enableSSL:z$1.boolean(),messageCapacity:z$1.number(),useSecret:z$1.boolean(),secret:z$1.string().refine(tr=>!tr,{message:"Secret is not allowed to be set manually"}),offline:z$1.boolean(),serializeData:z$1.boolean(),disabledPlugins:z$1.array(z$1.string()),dataProcessor:z$1.object({console:processorFn(),network:processorFn(),storage:processorFn(),database:processorFn(),page:processorFn(),system:processorFn()}).partial().strict()}).partial().strict(),extendConfigSchema=tr=>baseSchema.merge(tr(z$1));class InvalidConfigError extends Error{constructor(er,rr){const nr=er.issues.map(sr=>sr.code==="unrecognized_keys"?"- ".concat(sr.message,";"):"- ".concat(sr.path.join("."),": ").concat(sr.message,";")).join(`
|
|
5
|
+
`);let ar=`config values validation failed.
|
|
6
|
+
|
|
7
|
+
`.concat(nr);try{ar="".concat(ar,`
|
|
8
|
+
|
|
9
|
+
Current config: `).concat(JSON.stringify(rr,null,2))}catch(sr){}super(ar),this.name="InvalidConfigError"}}class ConfigBase{constructor(){_defineProperty(this,"value",ur({},this.base)),_defineProperty(this,"mergeConfig",er=>{const rr=ur(ur(ur({},this.base),this.platform),er);try{this.schema.parse(rr)}catch(nr){throw new InvalidConfigError(nr,rr)}return this.value=rr,this.value})}get base(){return{api:"",project:"--",title:"--",enableSSL:!0,messageCapacity:1e3,useSecret:!1,secret:"",offline:!1,serializeData:!1,disabledPlugins:[],dataProcessor:{}}}get(){return this.value}set(er,rr){this.value[er]=rr}}const ROOM_SESSION_KEY="page-spy-room";var SocketState;(function(tr){tr[tr.CONNECTING=0]="CONNECTING",tr[tr.OPEN=1]="OPEN",tr[tr.CLOSING=2]="CLOSING",tr[tr.CLOSED=3]="CLOSED"})(SocketState||(SocketState={}));const HEARTBEAT_INTERVAL=5e3,INIT_RETRY_INTERVAL=2e3,RETRY_TIME_INCR=1.5,MAX_RETRY_INTERVAL=Math.pow(RETRY_TIME_INCR,4)*INIT_RETRY_INTERVAL;class SocketWrapper{constructor(){_defineProperty(this,"events",{open:[],close:[],error:[],message:[]})}emit(er,rr){this.events[er].forEach(nr=>{nr(rr)}),er!=="close"&&er!=="error"||this.clearListeners()}onOpen(er){this.events.open.push(er)}onClose(er){this.events.close.push(er)}onError(er){this.events.error.push(er)}onMessage(er){this.events.message.push(er)}clearListeners(){Object.entries(this.events).forEach(er=>{let[,rr]=er;rr.splice(0)})}}class SocketStoreBase{getSocket(){return this.socketWrapper}updateRoomInfo(){if(this.getPageSpyConfig){var er;const{project:rr,title:nr}=this.getPageSpyConfig(),ar=(er=this.getClient)===null||er===void 0?void 0:er.call(this).getName();this.send({type:UPDATE_ROOM_INFO,content:{info:{name:ar,group:rr,tags:{title:nr,name:ar,group:rr}}}},!0)}}constructor(){_defineProperty(this,"socketUrl",""),_defineProperty(this,"socketConnection",null),_defineProperty(this,"debuggerConnection",null),_defineProperty(this,"pingTimer",null),_defineProperty(this,"pongTimer",null),_defineProperty(this,"retryTimer",null),_defineProperty(this,"isOffline",!1),_defineProperty(this,"messageCapacity",0),_defineProperty(this,"messages",[]),_defineProperty(this,"events",{debug:[],refresh:[],"atom-detail":[],"atom-getter":[],"debugger-online":[],"database-pagination":[],"public-data":[],"harbor-clear":[]}),_defineProperty(this,"retryInterval",INIT_RETRY_INTERVAL),_defineProperty(this,"connectable",!0),_defineProperty(this,"getPageSpyConfig",null),_defineProperty(this,"getClient",null),this.addListener("atom-detail",SocketStoreBase.handleResolveAtom),this.addListener("atom-getter",SocketStoreBase.handleAtomPropertyGetter),this.addListener("debugger-online",this.handleFlushBuffer)}init(er){return Dr(this,null,function*(){try{var rr,nr,ar,sr,ir;if(!er)throw Error("WebSocket url cannot be empty");this.socketWrapper.clearListeners(),this.socketWrapper.getState()===SocketState.OPEN&&(yield new Promise(or=>{this.socketWrapper.onClose(()=>{this.socketWrapper.clearListeners(),or()}),this.socketWrapper.close()})),(rr=this.socketWrapper)===null||rr===void 0||rr.onOpen(()=>{this.connectOnline()}),(nr=this.socketWrapper)===null||nr===void 0||nr.onMessage(or=>{this.handleMessage(or)}),(ar=this.socketWrapper)===null||ar===void 0||ar.onClose(()=>{this.connectOffline()}),(sr=this.socketWrapper)===null||sr===void 0||sr.onError(()=>{this.connectOffline()}),this.socketUrl=er,(ir=this.socketWrapper)===null||ir===void 0||ir.init(er)}catch(or){psLog.error(or.message)}})}addListener(er,rr){this.events[er]||(this.events[er]=[]),this.events[er].push(rr)}removeListener(er,rr){const nr=this.events[er]||[],ar=nr.indexOf(rr);ar>-1&&nr.splice(ar,1)}broadcastMessage(er){let rr=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const nr=makeBroadcastMessage(er);this.send(nr,rr)}close(){var er;this.connectable=!1,this.clearPing(),(er=this.socketWrapper)===null||er===void 0||er.close(),this.messages=[],Object.entries(this.events).forEach(rr=>{let[nr,ar]=rr;["atom-detail","atom-getter","debugger-online"].includes(nr)||ar.splice(0)})}connectOnline(){this.retryInterval=INIT_RETRY_INTERVAL,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<MAX_RETRY_INTERVAL&&(this.retryInterval*=RETRY_TIME_INCR),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},HEARTBEAT_INTERVAL)},HEARTBEAT_INTERVAL)}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(er){var rr;SocketStoreBase.messageFilters.length&&SocketStoreBase.messageFilters.forEach(mr=>{er=mr(er)});const{CONNECT:nr,MESSAGE:ar,ERROR:sr,JOIN:ir,PING:or,PONG:cr,LEAVE:lr,CLOSE:dr,BROADCAST:pr}=SERVER_MESSAGE_TYPE,hr=JSON.parse(er.data),{type:fr}=hr;switch(fr){case nr:const{selfConnection:mr,roomConnections:gr}=hr.content;this.socketConnection=mr,this.debuggerConnection=gr.find(Rr=>Rr.userId==="Debugger")||null;break;case ir:case lr:const{connection:vr}=hr.content;vr.userId==="Debugger"&&(fr===ir?(this.debuggerConnection=vr,this.sendClientInfo()):this.debuggerConnection=null);break;case ar:const{data:yr,from:Ir,to:Pr}=hr.content;Pr.address===((rr=this.socketConnection)===null||rr===void 0?void 0:rr.address)&&this.dispatchEvent(yr.type,{source:yr,from:Ir,to:Pr});break;case dr:case sr:this.connectOffline()}this.handlePong()}dispatchEvent(er,rr){var nr;["public-data"].includes(er)?this.events["public-data"].forEach(ar=>{ar(rr)}):(nr=this.events[er])===null||nr===void 0||nr.forEach(ar=>{ar.call(this,rr,sr=>{this.unicastMessage(sr,rr.from)})})}unicastMessage(er,rr){const nr=makeUnicastMessage(er,this.socketConnection,rr);this.send(nr)}handleFlushBuffer(er){const{latestId:rr}=er.source.data,nr=this.messages.findIndex(ar=>ar.content.data.data.id===rr);this.messages.slice(nr+1).forEach(ar=>{const sr={type:MESSAGE,content:{data:ar.content.data,from:this.socketConnection,to:er.from}};this.send(sr,!0)})}static handleResolveAtom(er,rr){let{source:nr}=er;const{type:ar,data:sr}=nr;if(ar==="atom-detail"){const ir=atom.get(sr)||{};rr(makeMessage("atom-detail-".concat(sr),ir,!1))}}static handleAtomPropertyGetter(er,rr){let{source:nr}=er;const{type:ar,data:sr}=nr;if(ar==="atom-getter"){const{id:or,parentId:cr,key:lr,instanceId:dr}=sr,pr=atom.getOrigin(dr),hr=atom.getOrigin(cr);let fr={};var ir;pr&&hr?fr=(ir=Object.getOwnPropertyDescriptor(hr,lr))===null||ir===void 0||(ir=ir.get)===null||ir===void 0?void 0:ir.call(pr):fr=new Error("Getter computed failed"),rr(makeMessage("atom-getter-".concat(or),atom.transformToAtom(fr)))}}send(er){let rr=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(this.checkIfSend(er))try{var nr;const ar=er;ar.createdAt=Date.now(),ar.requestId=getRandomId();const sr=stringifyData(ar);(nr=this.socketWrapper)===null||nr===void 0||nr.send(sr)}catch(ar){psLog.error("Incompatible: ".concat(ar.message)),this.connectOffline()}this.checkIfCache(er,rr)&&(this.messageCapacity!==0&&this.messages.length>=this.messageCapacity&&this.messages.shift(),this.messages.push(er))}checkIfSend(er){return this.socketWrapper.getState()===SocketState.OPEN&&(!![UPDATE_ROOM_INFO,PING].includes(er.type)||!!this.debuggerConnection)}checkIfCache(er){let rr=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return!this.isOffline&&!rr&&![MESSAGE,PING].includes(er.type)}sendClientInfo(){var er;const rr=(er=this.getClient)===null||er===void 0?void 0:er.call(this).makeClientInfoMsg();this.broadcastMessage({role:"client",type:"client-info",data:rr},!0)}}_defineProperty(SocketStoreBase,"messageFilters",[]);const systemLang=isCN()?"zh":"en";class Translation{constructor(er){_defineProperty(this,"locales",void 0),_defineProperty(this,"currentLang",void 0);const{locales:rr,defaultLang:nr=systemLang}=er;if(!rr||Object.keys(rr).length===0)throw new Error("[PageSpy] Locales cannot be empty");if(!rr[nr])throw new Error('[PageSpy] Language "'.concat(nr,'" not found'));this.locales=rr,this.currentLang=nr}t(er,rr){const nr=rr||this.currentLang,ar=this.locales[nr];return ar?ar[er]||er:(psLog.warn("Language '".concat(nr,"' not found, falling back to default")),er)}setLang(er){this.locales[er]?this.currentLang=er:psLog.error("Language '".concat(er,"' is not supported"))}getCurrentLang(){return this.currentLang}getSupportedLangs(){return Object.keys(this.locales)}}var n$2=["U","R","D","L"],t$2={capture:!0,passive:!0};function r$2(tr,er){window.addEventListener(tr,er,t$2)}function e$2(tr,er){window.removeEventListener(tr,er,t$2)}var o$2=function(tr){return Math.sqrt(tr[0]*tr[0]+tr[1]*tr[1])},u$2=function(tr,er){return[tr[0]-er[0],tr[1]-er[1]]},i$2=function(tr){var er=Math.atan2(tr[0],-tr[1]);return er=er/Math.PI*2,er=(Math.round(er)+4)%4,n$2[er]};function a$2(tr,er){var rr=tr.length;if(rr===0)throw new TypeError("The `command` must not be an empty array");var nr=[],ar=0,sr=function(ir){if(ir===null)return ar=0,void(nr.length=0);if(nr[ar]=ir,ar=(ar+1)%rr,nr.length==rr){for(var or=0;or<rr;or++)if(tr[or]!==nr[(ar+or)%rr])return;er()}};(function(ir){r$2("touchstart",function(or){var cr=[],lr=function(pr){var hr=pr.targetTouches;if(hr.length===1){var fr=hr[0],mr=fr.clientX,gr=fr.clientY;cr.push([mr,gr])}};lr(or),r$2("touchmove",lr);var dr=function(){if(e$2("touchmove",lr),e$2("touchend",dr),cr.length<2)return ir(null);var pr=u$2(cr[cr.length-1],cr[0]);if(o$2(pr)<10)return ir(null);for(var hr=i$2(pr),fr=1;fr<cr.length;fr++){var mr=u$2(cr[fr],cr[fr-1]);if(!(o$2(mr)<10)&&i$2(mr)!=hr)return ir(null)}ir(hr)};r$2("touchend",dr)})})(sr),function(ir){r$2("keydown",function(or){var cr=["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"].indexOf(or.key);ir(cr>=0?n$2[cr]:null)})}(sr)}class WebSocketWrapper extends SocketWrapper{constructor(){super(...arguments),_defineProperty(this,"socketInstance",null)}init(er){this.socketInstance=new WebSocket(er),["open","close","error","message"].forEach(rr=>{this.socketInstance.addEventListener(rr,nr=>{this.events[rr].forEach(ar=>{ar(nr)})})})}send(er){var rr;(rr=this.socketInstance)===null||rr===void 0||rr.send(stringifyData(er))}close(){var er;(er=this.socketInstance)===null||er===void 0||er.close()}getState(){var er;return(er=this.socketInstance)===null||er===void 0?void 0:er.readyState}}class WebSocketStore extends SocketStoreBase{constructor(){super(...arguments),_defineProperty(this,"socketWrapper",new WebSocketWrapper)}onOffline(){window.dispatchEvent(new CustomEvent("sdk-inactive")),sessionStorage.removeItem(ROOM_SESSION_KEY)}}var socketStore=new WebSocketStore;class ConsolePlugin{constructor(){_defineProperty(this,"name","ConsolePlugin"),_defineProperty(this,"proxyTypes",["log","info","error","warn","debug"]),_defineProperty(this,"console",{}),_defineProperty(this,"$pageSpyConfig",null)}onInit(er){return Dr(this,null,function*(){let{config:rr}=er;ConsolePlugin.hasInitd||(ConsolePlugin.hasInitd=!0,socketStore.addListener("debug",ConsolePlugin.handleDebugger),this.$pageSpyConfig=rr,this.init())})}init(){var er=this;this.proxyTypes.forEach(rr=>{this.console[rr]=window.console[rr]||window.console.log||(()=>{}),window.console[rr]=function(){for(var nr=arguments.length,ar=new Array(nr),sr=0;sr<nr;sr++)ar[sr]=arguments[sr];er.printLog({logType:rr,logs:ar,url:window.location.href})}})}reset(){this.proxyTypes.forEach(er=>{window.console[er]=this.console[er]})}onReset(){this.reset(),ConsolePlugin.hasInitd=!1}static handleDebugger(er,rr){let{source:nr}=er;const{type:ar,data:sr}=nr;if(ar==="debug"){rr(makeMessage("console",{logType:"debug-origin",logs:[{id:getRandomId(),type:"debug-origin",value:sr}]}));try{const ir=new Function("return ".concat(sr))();rr(makeMessage("console",{logType:"debug-eval",logs:[atom.transformToAtom(ir)]}))}catch(ir){rr(makeMessage("console",{logType:"error",logs:[{type:"error",value:ir.stack}]}))}}}printLog(er){if(er.logs&&er.logs.length){var rr,nr;const ar=(rr=this.$pageSpyConfig)===null||rr===void 0||(rr=rr.dataProcessor)===null||rr===void 0?void 0:rr.console;if(ar){this.reset();const ir=ar(er);if(this.init(),ir===!1)return}this.console[er.logType](...er.logs);const sr=makeMessage("console",br(ur({},er),{time:Date.now(),logs:er.logs.map(ir=>atom.transformToAtom(ir,!1))}));if(socketStore.broadcastMessage(sr),(nr=this.$pageSpyConfig)!==null&&nr!==void 0&&nr.serializeData){const ir=br(ur({},sr),{data:br(ur({},sr.data),{logs:er.logs.map(or=>atom.transformToAtom(or,!0))})});socketStore.dispatchEvent("public-data",ir)}else socketStore.dispatchEvent("public-data",sr)}}}_defineProperty(ConsolePlugin,"hasInitd",!1);class ErrorPlugin{constructor(){_defineProperty(this,"name","ErrorPlugin"),_defineProperty(this,"$pageSpyConfig",null),_defineProperty(this,"uncaughtErrorListener",er=>{if(er.error){const{message:rr,stack:nr}=er.error,ar=formatErrorObj(er.error);this.sendMessage(nr||rr,ar)}else{const rr=er.message||"[PageSpy] An unknown error occurred and no stack trace available";this.sendMessage(rr,null)}}),_defineProperty(this,"resourceLoadErrorListener",er=>{if(!(er instanceof ErrorEvent)){const{target:rr}=er;this.sendMessage("[PageSpy] Resource Load Error: Cannot load resource of (".concat(rr.src||rr.href,")"),null)}}),_defineProperty(this,"rejectionListener",er=>{const rr=formatErrorObj(er.reason);this.sendMessage(er.reason,rr)})}onInit(er){let{config:rr}=er;ErrorPlugin.hasInitd||(ErrorPlugin.hasInitd=!0,this.$pageSpyConfig=rr,this.onUncaughtError(),this.onResourceLoadError(),this.onUnhandledRejectionError())}onReset(){window.removeEventListener("error",this.uncaughtErrorListener),window.removeEventListener("error",this.resourceLoadErrorListener),window.removeEventListener("unhandledrejection",this.rejectionListener),ErrorPlugin.hasInitd=!1}onUncaughtError(){window.addEventListener("error",this.uncaughtErrorListener)}onResourceLoadError(){window.addEventListener("error",this.resourceLoadErrorListener,!0)}onUnhandledRejectionError(){window.addEventListener("unhandledrejection",this.rejectionListener)}sendMessage(er,rr){var nr,ar;const sr={logType:"error",logs:[er],time:Date.now(),url:window.location.href,errorDetail:rr};if(((nr=this.$pageSpyConfig)===null||nr===void 0||(nr=nr.dataProcessor)===null||nr===void 0||(ar=nr.console)===null||ar===void 0?void 0:ar.call(nr,sr))===!1)return;sr.logs=sr.logs.map(or=>atom.transformToAtom(or));const ir=makeMessage("console",sr);socketStore.dispatchEvent("public-data",ir),socketStore.broadcastMessage(ir)}}_defineProperty(ErrorPlugin,"hasInitd",!1);class WebNetworkProxyBase extends NetworkProxyBase{constructor(){super(socketStore)}}class XhrProxy extends WebNetworkProxyBase{constructor(){super(),_defineProperty(this,"xhrOpen",null),_defineProperty(this,"xhrSend",null),_defineProperty(this,"xhrSetRequestHeader",null),this.initProxyHandler()}initProxyHandler(){const er=this;if(!window.XMLHttpRequest)return;const{open:rr,send:nr,setRequestHeader:ar}=window.XMLHttpRequest.prototype;this.xhrOpen=rr,this.xhrSend=nr,this.xhrSetRequestHeader=ar,window.XMLHttpRequest.prototype.open=function(){const sr=this;for(var ir=arguments.length,or=new Array(ir),cr=0;cr<ir;cr++)or[cr]=arguments[cr];const lr=or[0],dr=or[1],pr=getRandomId();er.createRequest(pr);const hr=er.getRequest(pr);return hr&&(hr.url=new URL(dr,window.location.href).toString(),hr.method=lr.toUpperCase(),hr.requestType="xhr"),this.pageSpyRequestId=pr,this.pageSpyRequestMethod=lr,this.pageSpyRequestUrl=dr,sr.addEventListener("readystatechange",()=>Dr(this,null,function*(){if(hr){switch(hr.readyState=sr.readyState,sr.readyState){case sr.UNSENT:case sr.OPENED:hr.status=sr.status,hr.statusText="Pending",hr.startTime||(hr.startTime=Date.now());break;case sr.HEADERS_RECEIVED:hr.status=sr.status,hr.statusText="Loading";const fr=(sr.getAllResponseHeaders()||"").trim().split(/[\r\n]+/);hr.responseHeader=fr.reduce((gr,vr)=>{const[yr,...Ir]=vr.split(": ");return gr.push([yr,Ir.join(": ")]),gr},[]);break;case sr.LOADING:hr.status=sr.status,hr.statusText="Loading";break;case sr.DONE:hr.status=sr.status,hr.statusText="Done",hr.endTime=Date.now(),hr.costTime=hr.endTime-(hr.startTime||hr.endTime);const mr=yield er.formatResponse(sr);getObjectKeys(mr).forEach(gr=>{hr[gr]=mr[gr]});break;default:hr.status=sr.status,hr.statusText="Unknown"}er.sendRequestItem(sr.pageSpyRequestId,hr)}else psLog.warn("The request object is not found on XMLHttpRequest's readystatechange event")})),rr.apply(sr,or)},window.XMLHttpRequest.prototype.setRequestHeader=function(sr,ir){const or=er.getRequest(this.pageSpyRequestId);return or?(or.requestHeader||(or.requestHeader=[]),or.requestHeader.push([String(sr),String(ir)])):psLog.warn("The request object is not found on XMLHttpRequest's setRequestHeader event"),ar.apply(this,[sr,ir])},window.XMLHttpRequest.prototype.send=function(sr){const ir=this,{pageSpyRequestId:or}=ir,cr=er.getRequest(or);return cr?(cr.responseType=ir.responseType,cr.withCredentials=ir.withCredentials,cr.method!=="GET"&&(cr.requestHeader=addContentTypeHeader(cr.requestHeader,sr),getFormattedBody(sr).then(lr=>{cr.requestPayload=lr,er.sendRequestItem(ir.pageSpyRequestId,cr)}))):psLog.warn("The request object is not found on XMLHttpRequest's send event"),nr.apply(ir,[sr])}}reset(){this.xhrOpen&&(window.XMLHttpRequest.prototype.open=this.xhrOpen),this.xhrSend&&(window.XMLHttpRequest.prototype.send=this.xhrSend),this.xhrSetRequestHeader&&(window.XMLHttpRequest.prototype.setRequestHeader=this.xhrSetRequestHeader)}formatResponse(er){return Dr(this,null,function*(){const rr={response:"",responseReason:null};switch(er.responseType){case"":case"text":if(isString(er.response))try{rr.response=JSON.parse(er.response)}catch(nr){rr.response=er.response}else er.response!==void 0&&(rr.response=toStringTag(er.response));break;case"json":er.response!==void 0&&(rr.response=er.response);break;case"blob":case"arraybuffer":if(er.response){let nr=er.response;if(isArrayBuffer(nr)){const ar=er.getResponseHeader("content-type");ar&&(nr=new Blob([nr],{type:ar}))}if(isBlob(nr))if(nr.size<=MAX_SIZE)try{rr.response=yield blob2base64Async(nr)}catch(ar){rr.response=yield nr.text(),psLog.error(ar.message)}else rr.response="[object Blob]",rr.responseReason=Reason.EXCEED_SIZE}break;default:er.response!==void 0&&(rr.response=Object.prototype.toString.call(er.response))}return rr})}}var global$2=global$q,promiseNativeConstructor=global$2.Promise,newPromiseCapability$1={},aCallable=aCallable$7,$TypeError=TypeError,PromiseCapability=function(tr){var er,rr;this.promise=new tr(function(nr,ar){if(er!==void 0||rr!==void 0)throw $TypeError("Bad Promise constructor");er=nr,rr=ar}),this.resolve=aCallable(er),this.reject=aCallable(rr)};newPromiseCapability$1.f=function(tr){return new PromiseCapability(tr)};var anObject=anObject$g,isObject=isObject$a,newPromiseCapability=newPromiseCapability$1,promiseResolve$1=function(tr,er){if(anObject(tr),isObject(er)&&er.constructor===tr)return er;var rr=newPromiseCapability.f(tr);return(0,rr.resolve)(er),rr.promise},$$1$1=_export,NativePromiseConstructor=promiseNativeConstructor,fails=fails$s,getBuiltIn=getBuiltIn$a,isCallable=isCallable$o,speciesConstructor=speciesConstructor$2,promiseResolve=promiseResolve$1,defineBuiltIn=defineBuiltIn$8,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,NON_GENERIC=!!NativePromiseConstructor&&fails(function(){NativePromisePrototype.finally.call({then:function(){}},function(){})});if($$1$1({target:"Promise",proto:!0,real:!0,forced:NON_GENERIC},{finally:function(tr){var er=speciesConstructor(this,getBuiltIn("Promise")),rr=isCallable(tr);return this.then(rr?function(nr){return promiseResolve(er,tr()).then(function(){return nr})}:tr,rr?function(nr){return promiseResolve(er,tr()).then(function(){throw nr})}:tr)}}),isCallable(NativePromiseConstructor)){var method=getBuiltIn("Promise").prototype.finally;NativePromisePrototype.finally!==method&&defineBuiltIn(NativePromisePrototype,"finally",method,{unsafe:!0})}class FetchProxy extends WebNetworkProxyBase{constructor(){super(),_defineProperty(this,"fetch",null),this.initProxyHandler()}reset(){this.fetch&&(window.fetch=this.fetch)}initProxyHandler(){const er=this,rr=window.fetch;rr&&(this.fetch=rr,window.fetch=function(nr){let ar=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const sr=rr(nr,ar),ir=getRandomId();er.createRequest(ir);const or=er.getRequest(ir);if(or){let cr,lr="GET",dr=null;isString(nr)||isURL(nr)?(lr=ar.method||"GET",cr=nr,dr=ar.headers||null):(lr=nr.method,cr=nr.url,dr=nr.headers),or.url=new URL(cr,window.location.href).toString(),or.method=lr.toUpperCase(),or.requestType="fetch",or.status=0,or.statusText="Pending",or.startTime=Date.now(),or.readyState=XMLHttpRequest.UNSENT,ar.credentials&&ar.credentials!=="omit"&&(or.withCredentials=!0),dr&&(isHeaders(dr)?or.requestHeader=[...dr.entries()]:isObjectLike(dr)?or.requestHeader=Object.entries(dr).map(pr=>{let[hr,fr]=pr;return[String(hr),String(fr)]}):or.requestHeader=dr.map(pr=>{let[hr,fr]=pr;return[String(hr),String(fr)]})),or.method!=="GET"&&(or.requestHeader=addContentTypeHeader(or.requestHeader,ar.body),getFormattedBody(ar.body).then(pr=>{or.requestPayload=pr,er.sendRequestItem(ir,or)})),er.sendRequestItem(ir,or),sr.then(pr=>{or.endTime=Date.now(),or.costTime=or.endTime-(or.startTime||or.endTime),or.status=pr.status||200,or.statusText=pr.statusText||"Done",or.responseHeader=[...pr.headers.entries()],or.readyState=XMLHttpRequest.HEADERS_RECEIVED,er.sendRequestItem(ir,or);const hr=pr.headers.get("content-type");if(hr){if(hr.includes("application/json"))return or.responseType="json",pr.clone().text();if(hr.includes("text/html")||hr.includes("text/plain"))return or.responseType="text",pr.clone().text()}return or.responseType="blob",pr.clone().blob()}).then(pr=>Dr(null,null,function*(){switch(or.responseType){case"text":case"json":try{or.response=JSON.parse(pr)}catch(fr){or.response=pr,or.responseType="text"}break;case"blob":const hr=pr;if(hr.size<=MAX_SIZE)try{or.response=yield blob2base64Async(hr)}catch(fr){or.response=yield hr.text(),psLog.error(fr.message)}else or.response="[object Blob]",or.responseReason=Reason.EXCEED_SIZE}})).finally(()=>{or.readyState=XMLHttpRequest.DONE,er.sendRequestItem(ir,or)})}else psLog.warn("The request object is not found on window.fetch event");return sr})}}class BeaconProxy extends WebNetworkProxyBase{constructor(){super(),_defineProperty(this,"sendBeacon",null),this.initProxyHandler()}reset(){this.sendBeacon&&(window.navigator.sendBeacon=this.sendBeacon)}initProxyHandler(){const er=window.navigator.sendBeacon;if(!er)return;const rr=this;this.sendBeacon=er,window.navigator.sendBeacon=function(nr,ar){const sr=er.call(window.navigator,nr,ar),ir=getRandomId();rr.createRequest(ir);const or=rr.getRequest(ir);return or?(or.url=new URL(nr,window.location.href).toString(),or.method="POST",or.status=0,or.statusText="Pending",or.requestType="ping",or.requestHeader=addContentTypeHeader(or.requestHeader,ar),or.startTime=Date.now(),getFormattedBody(ar).then(cr=>{or.requestPayload=cr,rr.sendRequestItem(ir,or)}),or.response="",sr?(or.status=200,or.statusText="Sent",or.endTime=Date.now(),or.costTime=or.endTime-(or.startTime||or.endTime)):(or.status=500,or.statusText="Unknown"),or.readyState=XMLHttpRequest.DONE,rr.sendRequestItem(ir,or)):psLog.warn("The request object is not on navigator.sendBeacon event"),sr}}}class ResourceCollector extends WebNetworkProxyBase{constructor(){super(),_defineProperty(this,"observer",null),_defineProperty(this,"excluded",/(beacon|fetch|xmlhttprequest)/i),this.initResourceHandler()}initResourceHandler(){const er=performance.timeOrigin||Date.now()-performance.now();this.observer=new PerformanceObserver(rr=>{rr.getEntries().forEach(nr=>{const{name:ar,initiatorType:sr,fetchStart:ir,responseEnd:or,duration:cr,responseStatus:lr=0}=nr;if(this.excluded.test(sr))return;const dr=getRandomId();this.createRequest(dr);const pr=this.getRequest(dr);pr.method="GET",pr.url=ar,pr.requestType=sr,pr.readyState=XMLHttpRequest.DONE,pr.startTime=er+ir,pr.endTime=er+or,pr.costTime=cr,pr.response="",pr.responseType="resource",pr.status=lr,this.sendRequestItem(dr,pr)})});try{this.observer.observe({type:"resource",buffered:!0})}catch(rr){psLog.warn("Resource collector error",rr),this.observer.observe({entryTypes:["resource"]})}}reset(){var er;(er=this.observer)===null||er===void 0||er.disconnect(),this.observer=null}}class NetworkPlugin{constructor(){_defineProperty(this,"name","NetworkPlugin"),_defineProperty(this,"xhrProxy",null),_defineProperty(this,"fetchProxy",null),_defineProperty(this,"beaconProxy",null),_defineProperty(this,"resourceCollector",null)}onInit(er){let{config:rr}=er;NetworkPlugin.hasInitd||(NetworkPlugin.hasInitd=!0,NetworkProxyBase.dataProcessor=rr.dataProcessor.network,this.xhrProxy=new XhrProxy,this.fetchProxy=new FetchProxy,this.beaconProxy=new BeaconProxy,this.resourceCollector=new ResourceCollector)}onReset(){var er,rr,nr,ar;(er=this.xhrProxy)===null||er===void 0||er.reset(),(rr=this.fetchProxy)===null||rr===void 0||rr.reset(),(nr=this.beaconProxy)===null||nr===void 0||nr.reset(),(ar=this.resourceCollector)===null||ar===void 0||ar.reset(),NetworkPlugin.hasInitd=!1}}_defineProperty(NetworkPlugin,"hasInitd",!1);var $$q=_export,global$1=global$q,setToStringTag=setToStringTag$6;$$q({global:!0},{Reflect:{}}),setToStringTag(global$1.Reflect,"Reflect",!0),function(scriptGlobalObject,window,document,undefined$1){function is(tr,er){return typeof tr===er}function testRunner(){var tr,er,rr,nr,ar,sr;for(var ir in tests)if(tests.hasOwnProperty(ir)){if(tr=[],(er=tests[ir]).name&&(tr.push(er.name.toLowerCase()),er.options&&er.options.aliases&&er.options.aliases.length))for(rr=0;rr<er.options.aliases.length;rr++)tr.push(er.options.aliases[rr].toLowerCase());for(nr=is(er.fn,"function")?er.fn():er.fn,ar=0;ar<tr.length;ar++)(sr=tr[ar].split(".")).length===1?Modernizr[sr[0]]=nr:(Modernizr[sr[0]]&&(!Modernizr[sr[0]]||Modernizr[sr[0]]instanceof Boolean)||(Modernizr[sr[0]]=new Boolean(Modernizr[sr[0]])),Modernizr[sr[0]][sr[1]]=nr),classes.push((nr?"":"no-")+sr.join("-"))}}function setClasses(tr){var er=docElement.className,rr=Modernizr._config.classPrefix||"";if(isSVG&&(er=er.baseVal),Modernizr._config.enableJSClass){var nr=new RegExp("(^|\\s)"+rr+"no-js(\\s|$)");er=er.replace(nr,"$1"+rr+"js$2")}Modernizr._config.enableClasses&&(tr.length>0&&(er+=" "+rr+tr.join(" "+rr)),isSVG?docElement.className.baseVal=er:docElement.className=er)}function addTest(tr,er){if(typeof tr=="object")for(var rr in tr)hasOwnProp(tr,rr)&&addTest(rr,tr[rr]);else{var nr=(tr=tr.toLowerCase()).split("."),ar=Modernizr[nr[0]];if(nr.length===2&&(ar=ar[nr[1]]),ar!==void 0)return Modernizr;er=typeof er=="function"?er():er,nr.length===1?Modernizr[nr[0]]=er:(!Modernizr[nr[0]]||Modernizr[nr[0]]instanceof Boolean||(Modernizr[nr[0]]=new Boolean(Modernizr[nr[0]])),Modernizr[nr[0]][nr[1]]=er),setClasses([(er&&er!==!1?"":"no-")+nr.join("-")]),Modernizr._trigger(tr,er)}return Modernizr}function contains(tr,er){return!!~(""+tr).indexOf(er)}function createElement(){return typeof document.createElement!="function"?document.createElement(arguments[0]):isSVG?document.createElementNS.call(document,"http://www.w3.org/2000/svg",arguments[0]):document.createElement.apply(document,arguments)}function getBody(){var tr=document.body;return tr||((tr=createElement(isSVG?"svg":"body")).fake=!0),tr}function injectElementWithStyles(tr,er,rr,nr){var ar,sr,ir,or,cr="modernizr",lr=createElement("div"),dr=getBody();if(parseInt(rr,10))for(;rr--;)(ir=createElement("div")).id=cr+(rr+1),lr.appendChild(ir);return(ar=createElement("style")).type="text/css",ar.id="s"+cr,(dr.fake?dr:lr).appendChild(ar),dr.appendChild(lr),ar.styleSheet?ar.styleSheet.cssText=tr:ar.appendChild(document.createTextNode(tr)),lr.id=cr,dr.fake&&(dr.style.background="",dr.style.overflow="hidden",or=docElement.style.overflow,docElement.style.overflow="hidden",docElement.appendChild(dr)),sr=er(lr,tr),dr.fake&&dr.parentNode?(dr.parentNode.removeChild(dr),docElement.style.overflow=or,docElement.offsetHeight):lr.parentNode.removeChild(lr),!!sr}function domToCSS(tr){return tr.replace(/([A-Z])/g,function(er,rr){return"-"+rr.toLowerCase()}).replace(/^ms-/,"-ms-")}function computedStyle(tr,er,rr){var nr;if("getComputedStyle"in window){nr=getComputedStyle.call(window,tr,er);var ar=window.console;nr!==null?nr=nr.getPropertyValue(rr):ar&&ar[ar.error?"error":"log"].call(ar,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}else nr=tr.currentStyle&&tr.currentStyle[rr];return nr}function nativeTestProps(tr,er){var rr=tr.length;if("CSS"in window&&"supports"in window.CSS){for(;rr--;)if(window.CSS.supports(domToCSS(tr[rr]),er))return!0;return!1}if("CSSSupportsRule"in window){for(var nr=[];rr--;)nr.push("("+domToCSS(tr[rr])+":"+er+")");return injectElementWithStyles("@supports ("+(nr=nr.join(" or "))+") { #modernizr { position: absolute; } }",function(ar){return computedStyle(ar,null,"position")==="absolute"})}return undefined$1}function cssToDOM(tr){return tr.replace(/([a-z])-([a-z])/g,function(er,rr,nr){return rr+nr.toUpperCase()}).replace(/^-/,"")}function testProps(tr,er,rr,nr){function ar(){ir&&(delete mStyle.style,delete mStyle.modElem)}if(nr=!is(nr,"undefined")&&nr,!is(rr,"undefined")){var sr=nativeTestProps(tr,rr);if(!is(sr,"undefined"))return sr}for(var ir,or,cr,lr,dr,pr=["modernizr","tspan","samp"];!mStyle.style&&pr.length;)ir=!0,mStyle.modElem=createElement(pr.shift()),mStyle.style=mStyle.modElem.style;for(cr=tr.length,or=0;or<cr;or++)if(lr=tr[or],dr=mStyle.style[lr],contains(lr,"-")&&(lr=cssToDOM(lr)),mStyle.style[lr]!==undefined$1){if(nr||is(rr,"undefined"))return ar(),er!=="pfx"||lr;try{mStyle.style[lr]=rr}catch(hr){}if(mStyle.style[lr]!==dr)return ar(),er!=="pfx"||lr}return ar(),!1}function fnBind(tr,er){return function(){return tr.apply(er,arguments)}}function testDOMProps(tr,er,rr){var nr;for(var ar in tr)if(tr[ar]in er)return rr===!1?tr[ar]:is(nr=er[tr[ar]],"function")?fnBind(nr,rr||er):nr;return!1}function testPropsAll(tr,er,rr,nr,ar){var sr=tr.charAt(0).toUpperCase()+tr.slice(1),ir=(tr+" "+cssomPrefixes.join(sr+" ")+sr).split(" ");return is(er,"string")||is(er,"undefined")?testProps(ir,er,nr,ar):testDOMProps(ir=(tr+" "+domPrefixes.join(sr+" ")+sr).split(" "),er,rr)}function detectDeleteDatabase(tr,er){var rr=tr.deleteDatabase(er);rr.onsuccess=function(){addTest("indexeddb.deletedatabase",!0)},rr.onerror=function(){addTest("indexeddb.deletedatabase",!1)}}function testAllProps(tr,er,rr){return testPropsAll(tr,undefined$1,undefined$1,er,rr)}var tests=[],ModernizrProto={_version:"3.13.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(tr,er){var rr=this;setTimeout(function(){er(rr[tr])},0)},addTest:function(tr,er,rr){tests.push({name:tr,fn:er,options:rr})},addAsyncTest:function(tr){tests.push({name:null,fn:tr})}},Modernizr=function(){};Modernizr.prototype=ModernizrProto,Modernizr=new Modernizr;var classes=[],hasOwnProp;(function(){var tr={}.hasOwnProperty;hasOwnProp=is(tr,"undefined")||is(tr.call,"undefined")?function(er,rr){return rr in er&&is(er.constructor.prototype[rr],"undefined")}:function(er,rr){return tr.call(er,rr)}})();var docElement=document.documentElement,isSVG=docElement.nodeName.toLowerCase()==="svg";ModernizrProto._l={},ModernizrProto.on=function(tr,er){this._l[tr]||(this._l[tr]=[]),this._l[tr].push(er),Modernizr.hasOwnProperty(tr)&&setTimeout(function(){Modernizr._trigger(tr,Modernizr[tr])},0)},ModernizrProto._trigger=function(tr,er){if(this._l[tr]){var rr=this._l[tr];setTimeout(function(){var nr;for(nr=0;nr<rr.length;nr++)(0,rr[nr])(er)},0),delete this._l[tr]}},Modernizr._q.push(function(){ModernizrProto.addTest=addTest}),Modernizr.addTest("blobconstructor",function(){try{return!!new Blob}catch(tr){return!1}},{aliases:["blob-constructor"]}),Modernizr.addAsyncTest(function(){var tr,er=["read","readText","write","writeText"];if(navigator.clipboard){addTest("clipboard",!0);for(var rr=0;rr<er.length;rr++)tr=!!navigator.clipboard[er[rr]],addTest("clipboard."+er[rr].toLowerCase(),tr)}else addTest("clipboard",!1)}),Modernizr.addTest("cookies",function(){try{document.cookie="cookietest=1";var tr=document.cookie.indexOf("cookietest=")!==-1;return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",tr}catch(er){return!1}}),Modernizr.addTest("cors","XMLHttpRequest"in window&&"withCredentials"in new XMLHttpRequest);var omPrefixes="Moz O ms Webkit",cssomPrefixes=ModernizrProto._config.usePrefixes?omPrefixes.split(" "):[];ModernizrProto._cssomPrefixes=cssomPrefixes;var modElem={elem:createElement("modernizr")};Modernizr._q.push(function(){delete modElem.elem});var mStyle={style:modElem.elem.style};Modernizr._q.unshift(function(){delete mStyle.style});var domPrefixes=ModernizrProto._config.usePrefixes?omPrefixes.toLowerCase().split(" "):[];ModernizrProto._domPrefixes=domPrefixes,ModernizrProto.testAllProps=testPropsAll;var atRule=function(tr){var er,rr=prefixes.length,nr=window.CSSRule;if(nr===void 0)return undefined$1;if(!tr)return!1;if((er=(tr=tr.replace(/^@/,"")).replace(/-/g,"_").toUpperCase()+"_RULE")in nr)return"@"+tr;for(var ar=0;ar<rr;ar++){var sr=prefixes[ar];if(sr.toUpperCase()+"_"+er in nr)return"@-"+sr.toLowerCase()+"-"+tr}return!1};ModernizrProto.atRule=atRule;var prefixed=ModernizrProto.prefixed=function(tr,er,rr){return tr.indexOf("@")===0?atRule(tr):(tr.indexOf("-")!==-1&&(tr=cssToDOM(tr)),er?testPropsAll(tr,er,rr):testPropsAll(tr,"pfx"))},crypto=prefixed("crypto",window);Modernizr.addTest("crypto",!!prefixed("subtle",crypto)),Modernizr.addTest("customelements","customElements"in window),Modernizr.addTest("customevent","CustomEvent"in window&&typeof window.CustomEvent=="function"),Modernizr.addTest("dataview",typeof DataView!="undefined"&&"getFloat64"in DataView.prototype),Modernizr.addAsyncTest(function(){var tr=new Image;tr.onerror=function(){addTest("exiforientation",!1)},tr.onload=function(){addTest("exiforientation",tr.width!==2)},tr.src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q=="}),Modernizr.addAsyncTest(function(){var tr;try{tr=prefixed("indexedDB",window)}catch(nr){}if(tr){var er,rr="modernizr-"+Math.random();try{er=tr.open(rr)}catch(nr){return void addTest("indexeddb",!1)}er.onerror=function(nr){!er.error||er.error.name!=="InvalidStateError"&&er.error.name!=="UnknownError"?(addTest("indexeddb",!0),detectDeleteDatabase(tr,rr)):(addTest("indexeddb",!1),nr.preventDefault())},er.onsuccess=function(){addTest("indexeddb",!0),detectDeleteDatabase(tr,rr)}}else addTest("indexeddb",!1)}),Modernizr.addTest("proxy","Proxy"in window),Modernizr.addTest("serviceworker","serviceWorker"in navigator),Modernizr.addTest("textencoder",!(!window.TextEncoder||!window.TextEncoder.prototype.encode)),Modernizr.addTest("textdecoder",!(!window.TextDecoder||!window.TextDecoder.prototype.decode)),Modernizr.addTest("typedarrays","ArrayBuffer"in window),Modernizr.addTest("webanimations","animate"in createElement("div")),Modernizr.addTest("webgl",function(){return"WebGLRenderingContext"in window}),ModernizrProto.testAllProps=testAllProps,Modernizr.addTest("backgroundcliptext",function(){return testAllProps("backgroundClip","text")}),Modernizr.addTest("borderimage",testAllProps("borderImage","url() 1",!0)),Modernizr.addTest("cssgridlegacy",testAllProps("grid-columns","10px",!0)),Modernizr.addTest("cssgrid",testAllProps("grid-template-rows","none",!0));var supportsFn=window.CSS&&window.CSS.supports.bind(window.CSS)||window.supportsCSS;Modernizr.addTest("customproperties",!!supportsFn&&(supportsFn("--f:0")||supportsFn("--f",0))),Modernizr.addTest("flexgap",function(){var tr=createElement("div");tr.style.display="flex",tr.style.flexDirection="column",tr.style.rowGap="1px",tr.appendChild(createElement("div")),tr.appendChild(createElement("div")),docElement.appendChild(tr);var er=tr.scrollHeight===1;return tr.parentNode.removeChild(tr),er}),Modernizr.addTest("focuswithin",function(){try{document.querySelector(":focus-within")}catch(tr){return!1}return!0}),Modernizr.addTest("hsla",function(){var tr=createElement("a").style;return tr.cssText="background-color:hsla(120,40%,100%,.5)",contains(tr.backgroundColor,"rgba")||contains(tr.backgroundColor,"hsla")}),Modernizr.addTest("cssmask",testAllProps("maskRepeat","repeat-x",!0));var prefixes=ModernizrProto._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];ModernizrProto._prefixes=prefixes,Modernizr.addTest("csspositionsticky",function(){var tr="position:",er=createElement("a").style;return er.cssText=tr+prefixes.join("sticky;"+tr).slice(0,-9),er.position.indexOf("sticky")!==-1}),Modernizr.addTest("rgba",function(){var tr=createElement("a").style;return tr.cssText="background-color:rgba(150,255,150,.5)",(""+tr.backgroundColor).indexOf("rgba")>-1}),Modernizr.addTest("intersectionobserver","IntersectionObserver"in window),Modernizr.addTest("mutationobserver",!!window.MutationObserver||!!window.WebKitMutationObserver),Modernizr.addTest("passiveeventlisteners",function(){var tr=!1;try{var er=Object.defineProperty({},"passive",{get:function(){tr=!0}}),rr=function(){};window.addEventListener("testPassiveEventSupport",rr,er),window.removeEventListener("testPassiveEventSupport",rr,er)}catch(nr){}return tr}),Modernizr.addTest("shadowroot","attachShadow"in createElement("div")),Modernizr.addTest("es6array",!!(Array.prototype&&Array.prototype.copyWithin&&Array.prototype.fill&&Array.prototype.find&&Array.prototype.findIndex&&Array.prototype.keys&&Array.prototype.entries&&Array.prototype.values&&Array.from&&Array.of)),Modernizr.addTest("arrow",function(){try{eval("()=>{}")}catch(tr){return!1}return!0}),Modernizr.addTest("class",function(){try{eval("class A{}")}catch(tr){return!1}return!0}),Modernizr.addTest("es6collections",!!(window.Map&&window.Set&&window.WeakMap&&window.WeakSet)),Modernizr.addTest("generators",function(){try{new Function("function* test() {}")()}catch(tr){return!1}return!0}),Modernizr.addTest("es6math",!!(Math&&Math.clz32&&Math.cbrt&&Math.imul&&Math.sign&&Math.log10&&Math.log2&&Math.log1p&&Math.expm1&&Math.cosh&&Math.sinh&&Math.tanh&&Math.acosh&&Math.asinh&&Math.atanh&&Math.hypot&&Math.trunc&&Math.fround)),Modernizr.addTest("es6number",!!(Number.isFinite&&Number.isInteger&&Number.isSafeInteger&&Number.isNaN&&Number.parseInt&&Number.parseFloat&&Number.isInteger(Number.MAX_SAFE_INTEGER)&&Number.isInteger(Number.MIN_SAFE_INTEGER)&&Number.isFinite(Number.EPSILON))),Modernizr.addTest("es6object",!!(Object.assign&&Object.is&&Object.setPrototypeOf)),Modernizr.addTest("promises",function(){return"Promise"in window&&"resolve"in window.Promise&&"reject"in window.Promise&&"all"in window.Promise&&"race"in window.Promise&&function(){var tr;return new window.Promise(function(er){tr=er}),typeof tr=="function"}()}),Modernizr.addTest("restparameters",function(){try{eval("function f(...rest) {}")}catch(tr){return!1}return!0}),Modernizr.addTest("spreadarray",function(){try{eval("(function f(){})(...[1])")}catch(tr){return!1}return!0}),Modernizr.addTest("stringtemplate",function(){try{return eval("(function(){var a=1; return `-${a}-`;})()")==="-1-"}catch(tr){return!1}}),Modernizr.addTest("es6string",!!(String.fromCodePoint&&String.raw&&String.prototype.codePointAt&&String.prototype.repeat&&String.prototype.startsWith&&String.prototype.endsWith&&String.prototype.includes)),Modernizr.addTest("es6symbol",!!(typeof Symbol=="function"&&Symbol.for&&Symbol.hasInstance&&Symbol.isConcatSpreadable&&Symbol.iterator&&Symbol.keyFor&&Symbol.match&&Symbol.prototype&&Symbol.replace&&Symbol.search&&Symbol.species&&Symbol.split&&Symbol.toPrimitive&&Symbol.toStringTag&&Symbol.unscopables)),Modernizr.addTest("es7array",!(!Array.prototype||!Array.prototype.includes)),Modernizr.addTest("restdestructuringarray",function(){try{eval("var [...rest]=[1]")}catch(tr){return!1}return!0}),Modernizr.addTest("restdestructuringobject",function(){try{eval("var {...rest}={a:1}")}catch(tr){return!1}return!0}),Modernizr.addTest("spreadobject",function(){try{eval("var a={...{b:1}}")}catch(tr){return!1}return!0}),Modernizr.addTest("es8object",!(!Object.entries||!Object.values)),Modernizr.addTest("sandbox","sandbox"in createElement("iframe")),Modernizr.addTest("srcdoc","srcdoc"in createElement("iframe")),Modernizr.addTest("canvas",function(){var tr=createElement("canvas");return!(!tr.getContext||!tr.getContext("2d"))}),Modernizr.addAsyncTest(function(){if(!Modernizr.canvas)return!1;var tr=new Image,er=createElement("canvas"),rr=er.getContext("2d");tr.onload=function(){addTest("apng",function(){return er.getContext!==void 0&&(rr.drawImage(tr,0,0),rr.getImageData(0,0,1,1).data[3]===0)})},tr.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="}),Modernizr.addTest("imgcrossorigin","crossOrigin"in createElement("img")),Modernizr.addTest("lazyloading","loading"in HTMLImageElement.prototype),Modernizr.addAsyncTest(function(){var tr,er,rr=createElement("img"),nr="sizes"in rr;!nr&&"srcset"in rr?(tr="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",er=function(){addTest("sizes",rr.width===2)},rr.onload=er,rr.onerror=er,rr.setAttribute("sizes","9px"),rr.srcset=tr+" 1w,data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw== 8w",rr.src=tr):addTest("sizes",nr)}),Modernizr.addTest("srcset","srcset"in createElement("img")),Modernizr.addAsyncTest(function(){function tr(nr,ar,sr){function ir(cr){var lr=!(!cr||cr.type!=="load")&&or.width===1;addTest(nr,nr==="webp"&&lr?new Boolean(lr):lr),sr&&sr(cr)}var or=new Image;or.onerror=ir,or.onload=ir,or.src=ar}var er=[{uri:"data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=",name:"webp"},{uri:"data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==",name:"webp.alpha"},{uri:"data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA",name:"webp.animation"},{uri:"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",name:"webp.lossless"}],rr=er.shift();tr(rr.name,rr.uri,function(nr){if(nr&&nr.type==="load")for(var ar=0;ar<er.length;ar++)tr(er[ar].name,er[ar].uri)})}),Modernizr.addTest("beacon","sendBeacon"in navigator),Modernizr.addTest("eventsource","EventSource"in window),Modernizr.addTest("fetch","fetch"in window),Modernizr.addTest("xhr2","XMLHttpRequest"in window&&"withCredentials"in new XMLHttpRequest),Modernizr.addTest("scriptasync","async"in createElement("script")),Modernizr.addTest("scriptdefer","defer"in createElement("script")),Modernizr.addTest("localstorage",function(){var tr="modernizr";try{return localStorage.setItem(tr,tr),localStorage.removeItem(tr),!0}catch(er){return!1}}),Modernizr.addTest("sessionstorage",function(){var tr="modernizr";try{return sessionStorage.setItem(tr,tr),sessionStorage.removeItem(tr),!0}catch(er){return!1}}),Modernizr.addTest("urlsearchparams","URLSearchParams"in window);var domPrefixesAll=[""].concat(domPrefixes);ModernizrProto._domPrefixesAll=domPrefixesAll,Modernizr.addTest("peerconnection",!!prefixed("RTCPeerConnection",window)),Modernizr.addTest("datachannel",function(){if(!Modernizr.peerconnection)return!1;for(var tr=0,er=domPrefixesAll.length;tr<er;tr++){var rr=window[domPrefixesAll[tr]+"RTCPeerConnection"];if(rr){var nr=new rr(null);return nr.close(),"createDataChannel"in nr}}return!1}),Modernizr.addTest("getUserMedia","mediaDevices"in navigator&&"getUserMedia"in navigator.mediaDevices),Modernizr.addTest("resizeobserver","ResizeObserver"in window),Modernizr.addTest("sharedworkers","SharedWorker"in window),Modernizr.addTest("webworkers","Worker"in window),testRunner(),delete ModernizrProto.addTest,delete ModernizrProto.addAsyncTest;for(var i=0;i<Modernizr._q.length;i++)Modernizr._q[i]();scriptGlobalObject.Modernizr=Modernizr}(window,window,document);const FEATURE_MAP={Feature:{blob:{title:"Blob",keyPath:"blob"},clipboard:{title:"Clipboard",keyPath:"clipboard"},crypto:{title:"Crypto",keyPath:"crypto"},customelements:{title:"Custom Elements",keyPath:"custom-elements"},customevent:{title:"Custom Event",keyPath:"event/customevent"},dataview:{title:"DataView",keyPath:"dataview-api"},intersectionobserver:{title:"Intersection Observer",keyPath:"dom/intersection-observer"},mutationobserver:{title:"Mutation Observer",keyPath:"dom/mutationobserver"},passiveeventlisteners:{title:"Passive Event Listeners",keyPath:"dom/passiveeventlisteners"},serviceworker:{title:"Service Worker",keyPath:"serviceworker"},shadowroot:{title:"Shadow DOM",keyPath:"dom/shadowroot"},textencoder:{title:"TextEncoder & TextDecoder",keyPath:"textencoding"},typedarrays:{title:"Typed Arrays",keyPath:"typed-arrays"},webanimations:{title:"Web Animation",keyPath:"webanimations"},webgl:{title:"WebGL",keyPath:"webgl/webgl"},urlsearchparams:{title:"URLSearchParams",keyPath:"url/urlsearchparams"},datachannel:{title:"WebRTC/datachannel",keyPath:"webrtc/datachannel"},getusermedia:{title:"WebRTC/getusermedia",keyPath:"webrtc/getusermedia"},peerconnection:{title:"WebRTC/peerconnection",keyPath:"webrtc/peerconnection"},resizeobserver:{title:"Resizeobserver",keyPath:"window/resizeobserver"},sharedworkers:{title:"Shared Worker",keyPath:"workers/sharedworkers"},webworkers:{title:"Web Worker",keyPath:"workers/webworkers"}},Network:{cors:{title:"CORS",keyPath:"cors"},beacon:{title:"Beacon",keyPath:"network/beacon"},fetch:{title:"Fetch",keyPath:"network/fetch"},xhr2:{title:"XHR2",keyPath:"network/xhr2"}},Javascript:{es6array:{title:"ES6 Array",keyPath:"es6/array"},arrow:{title:"ES6 Arrow Function",keyPath:"es6/arrow"},es6class:{title:"ES6 Class",keyPath:"es6/class"},es6collections:{title:"ES6 Collections",keyPath:"es6/collections"},generators:{title:"ES6 Generators",keyPath:"es6/generators"},es6math:{title:"ES6 Math",keyPath:"es6/math"},es6number:{title:"ES6 Number",keyPath:"es6/number"},es6object:{title:"ES6 Object",keyPath:"es6/object"},promises:{title:"ES6 Promise",keyPath:"es6/promises"},restparameters:{title:"ES6 Rest Parameters",keyPath:"es6/rest-parameters"},spreadarray:{title:"ES6 Array Spread",keyPath:"es6/spread-array"},stringtemplate:{title:"ES6 String Template",keyPath:"es6/string-template"},es6string:{title:"ES6 String",keyPath:"es6/string"},es6symbol:{title:"ES6 Symbol",keyPath:"es6/symbol"},proxy:{title:"ES6 Proxy",keyPath:"proxy"},reflect:{title:"ES6 Reflect",customTest:`"Reflect" in window &&
|
|
10
|
+
typeof window.Reflect === 'object' &&
|
|
11
|
+
typeof Reflect.has === 'function' &&
|
|
12
|
+
[
|
|
13
|
+
'apply',
|
|
14
|
+
'construct',
|
|
15
|
+
'defineProperty',
|
|
16
|
+
'deleteProperty',
|
|
17
|
+
'getOwnPropertyDescriptor',
|
|
18
|
+
'getPrototypeOf',
|
|
19
|
+
'has',
|
|
20
|
+
'isExtensible',
|
|
21
|
+
'ownKeys',
|
|
22
|
+
'preventExtensions',
|
|
23
|
+
'setPrototypeOf',
|
|
24
|
+
].every((i) => Reflect.has(Reflect, i))`},es7array:{title:"ES7 Array",keyPath:"es7/array"},restdestructuringarray:{title:"ES7 Rest Destructuring",keyPath:"es7/rest-destructuring"},spreadobject:{title:"ES7 Object Spread",keyPath:"es7/spread-object"},es8object:{title:"ES8 Object",keyPath:"es8/object"},finally:{title:"ES9 Promise Finally",customTest:"<ES6 Promise> && !!Promise.prototype.finally"}},CSS:{backgroundcliptext:{title:"Background Clip Text",keyPath:"css/backgroundcliptext"},borderimage:{title:"Border Image",keyPath:"css/borderimage"},cssgrid:{title:"CSS Grid",keyPath:"css/cssgrid"},customproperties:{title:"Custom Properties",keyPath:"css/customproperties"},flexgap:{title:"Flex Gap",keyPath:"css/flexgap"},focuswithin:{title:"Focus Within",keyPath:"css/focuswithin"},hsla:{title:"HSLA",keyPath:"css/hsla"},cssmask:{title:"Mask",keyPath:"css/mask"},csspositionsticky:{title:"Position Sticky",keyPath:"css/positionsticky"},rgba:{title:"RGBA",keyPath:"css/rgba"}},Element:{sandbox:{title:"iframe/sandbox",keyPath:"iframe/sandbox"},srcdoc:{title:"iframe/srcdoc",keyPath:"iframe/srcdoc"},apng:{title:"img/apng",keyPath:"img/apng"},imgcrossorigin:{title:"img/crossorigin",keyPath:"img/crossorigin"},exiforientation:{title:"img/exif-orientation",keyPath:"img/exif-orientation"},lazyloading:{title:"img/lazyloading",keyPath:"img/lazyloading"},sizes:{title:"img/sizes",keyPath:"img/sizes"},srcset:{title:"img/srcset",keyPath:"img/srcset"},webp:{title:"img/webp",keyPath:"img/webp"},prefetch:{title:"link/prefetch",keyPath:"link/prefetch"},scriptasync:{title:"script/async",keyPath:"script/async"},scriptdefer:{title:"script/defer",keyPath:"script/defer"}},Storage:{cookies:{title:"Cookies",keyPath:"storage/cookies"},indexeddb:{title:"IndexedDB",keyPath:"storage/indexeddb"},localstorage:{title:"LocalStorage",keyPath:"storage/localstorage"},sessionstorage:{title:"SessionStorage",keyPath:"storage/sessionstorage"}}},GITHUB_BASE_URL="https://github.com/Modernizr/Modernizr/tree/master/feature-detects",asyncFeatureKey=["indexeddb","apng","avif","exiforientation","webp"];function computeAsyncFeature(tr){return new Promise(er=>{Modernizr.on(tr,rr=>{er(rr)})})}function computeResult(){return Dr(this,null,function*(){const tr={Feature:[],Network:[],Javascript:[],CSS:[],Element:[],Storage:[]};getObjectKeys(FEATURE_MAP).forEach(er=>{const rr=FEATURE_MAP[er],nr=getObjectKeys(rr).map(ar=>Dr(null,null,function*(){const sr=rr[ar];return sr.keyPath&&(sr.keyPath="".concat(GITHUB_BASE_URL,"/").concat(sr.keyPath,".js")),asyncFeatureKey.indexOf(ar)>-1?sr.supported=yield computeAsyncFeature(ar):sr.supported=Modernizr[ar],sr}));tr[er]=nr});for(const er in tr)hasOwnProperty(tr,er)&&(tr[er]=yield Promise.all(tr[er]));return tr})}window.Modernizr.addTest("finally",Modernizr.promises&&!!Promise.prototype.finally),window.Modernizr.addTest("reflect","Reflect"in window&&typeof window.Reflect=="object"&&typeof Reflect.has=="function"&&["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","setPrototypeOf"].every(tr=>Reflect.has(Reflect,tr)));class SystemPlugin{constructor(){_defineProperty(this,"name","SystemPlugin"),_defineProperty(this,"$pageSpyConfig",null),_defineProperty(this,"_cache",null)}onInit(er){let{config:rr}=er;SystemPlugin.hasInitd||(SystemPlugin.hasInitd=!0,this.$pageSpyConfig=rr,this.onceInitPublicData(),socketStore.addListener("refresh",(nr,ar)=>Dr(this,null,function*(){let{source:sr}=nr;const{data:ir}=sr;if(ir==="system"){const or=yield this.getSystemInfo();if(or===null)return;ar(or)}})),socketStore.addListener("harbor-clear",()=>{this.onceInitPublicData()}))}onceInitPublicData(){return Dr(this,null,function*(){const er=yield this.getSystemInfo();er!==null&&socketStore.dispatchEvent("public-data",er)})}onReset(){SystemPlugin.hasInitd=!1}getSystemInfo(){return Dr(this,null,function*(){var er,rr;if(!this._cache){const nr=yield computeResult();this._cache={system:{ua:navigator.userAgent},features:nr}}return((er=this.$pageSpyConfig)===null||er===void 0||(er=er.dataProcessor)===null||er===void 0||(rr=er.system)===null||rr===void 0?void 0:rr.call(er,this._cache))===!1?null:makeMessage("system",this._cache)})}}_defineProperty(SystemPlugin,"hasInitd",!1);class PagePlugin{constructor(){_defineProperty(this,"name","PagePlugin"),_defineProperty(this,"$pageSpyConfig",null)}onInit(er){let{config:rr}=er;PagePlugin.hasInitd||(PagePlugin.hasInitd=!0,this.$pageSpyConfig=rr,socketStore.addListener("refresh",(nr,ar)=>{let{source:sr}=nr;const{data:ir}=sr;if(ir==="page"){var or,cr;const lr=PagePlugin.collectHtml();if(((or=this.$pageSpyConfig)===null||or===void 0||(or=or.dataProcessor)===null||or===void 0||(cr=or.page)===null||cr===void 0?void 0:cr.call(or,lr))===!1)return;const dr=makeMessage("page",lr);socketStore.dispatchEvent("public-data",dr),ar(dr)}}))}onReset(){PagePlugin.hasInitd=!1}static collectHtml(){return{html:document.documentElement.outerHTML,location:window.location}}}_defineProperty(PagePlugin,"hasInitd",!1);class StoragePlugin{constructor(){_defineProperty(this,"name","StoragePlugin"),_defineProperty(this,"originSetItem",null),_defineProperty(this,"originRemoveItem",null),_defineProperty(this,"originClear",null),_defineProperty(this,"cookieStoreChangeListener",null),_defineProperty(this,"$pageSpyConfig",null)}onInit(er){let{config:rr}=er;StoragePlugin.hasInitd||(StoragePlugin.hasInitd=!0,this.$pageSpyConfig=rr,this.listenRefreshEvent(),this.onceInitPublicData(),this.initStorageProxy(),socketStore.addListener("harbor-clear",()=>{this.onceInitPublicData()}))}onReset(){this.originClear&&(Storage.prototype.clear=this.originClear),this.originRemoveItem&&(Storage.prototype.removeItem=this.originRemoveItem),this.originSetItem&&(Storage.prototype.setItem=this.originSetItem),this.cookieStoreChangeListener&&window.cookieStore&&window.cookieStore.removeEventListener("change",this.cookieStoreChangeListener),StoragePlugin.hasInitd=!1}sendRefresh(er){return Dr(this,null,function*(){let rr=null;switch(er){case"localStorage":case"sessionStorage":rr=this.takeStorage(er);break;case"cookie":rr=yield this.takeCookie()}rr&&this.sendStorageItem(rr)})}listenRefreshEvent(){socketStore.addListener("refresh",er=>Dr(this,null,function*(){let{source:rr}=er;const{data:nr}=rr;this.sendRefresh(nr)}))}takeStorage(er){const rr={type:er,action:"get",data:[]},nr=window[er],ar=nr.length;if(!ar)return rr;for(let sr=0;sr<=ar-1;sr++){const ir=nr.key(sr);if(ir){const or=nr.getItem(ir)||"";rr.data.push({name:ir,value:or})}}return rr}takeCookie(){return Dr(this,null,function*(){const er={type:"cookie",action:"get",data:[]};return window.cookieStore?er.data=yield window.cookieStore.getAll():document.cookie&&(er.data=document.cookie.split("; ").map(rr=>{const[nr,ar]=rr.split("=");return{name:nr,value:ar}})),er})}initStorageProxy(){const{clear:er,removeItem:rr,setItem:nr}=Storage.prototype;this.originClear=er,this.originRemoveItem=rr,this.originSetItem=nr;const ar=this;Storage.prototype.clear=function(){er.call(this);const sr={type:ar.getStorageType(this),action:"clear"};ar.sendStorageItem(sr)},Storage.prototype.removeItem=function(sr){rr.call(this,sr);const ir={type:ar.getStorageType(this),action:"remove",name:String(sr)};ar.sendStorageItem(ir)},Storage.prototype.setItem=function(sr,ir){nr.call(this,sr,ir);const or={type:ar.getStorageType(this),action:"set",name:String(sr),value:String(ir)};ar.sendStorageItem(or)},window.cookieStore&&(this.cookieStoreChangeListener=sr=>{const{changed:ir,deleted:or}=sr;ir.length>0&&ir.forEach(cr=>{const lr=ur({type:"cookie",action:"set"},cr);this.sendStorageItem(lr)}),or.length>0&&or.forEach(cr=>{const lr={type:"cookie",action:"remove",name:cr.name};this.sendStorageItem(lr)})},window.cookieStore.addEventListener("change",this.cookieStoreChangeListener))}onceInitPublicData(){return Dr(this,null,function*(){(yield Promise.all([this.takeStorage("localStorage"),this.takeStorage("sessionStorage"),this.takeCookie()])).forEach(er=>{var rr,nr;if(((rr=this.$pageSpyConfig)===null||rr===void 0||(rr=rr.dataProcessor)===null||rr===void 0||(nr=rr.storage)===null||nr===void 0?void 0:nr.call(rr,er))===!1)return;const ar=makeMessage("storage",er);socketStore.dispatchEvent("public-data",ar)})})}getStorageType(er){return er===localStorage?"localStorage":er===sessionStorage?"sessionStorage":er.constructor.name}sendStorageItem(er){var rr,nr;if(((rr=this.$pageSpyConfig)===null||rr===void 0||(rr=rr.dataProcessor)===null||rr===void 0||(nr=rr.storage)===null||nr===void 0?void 0:nr.call(rr,er))===!1)return;const ar=makeMessage("storage",er);socketStore.dispatchEvent("public-data",ar),socketStore.broadcastMessage(ar,!0)}}function promisify(tr){return new Promise((er,rr)=>{tr.addEventListener("success",()=>{er(tr.result)}),tr.addEventListener("error",()=>{rr()})})}_defineProperty(StoragePlugin,"hasInitd",!1);class DatabasePlugin{constructor(){_defineProperty(this,"name","DatabasePlugin"),_defineProperty(this,"originAdd",null),_defineProperty(this,"originPut",null),_defineProperty(this,"originDelete",null),_defineProperty(this,"originClear",null),_defineProperty(this,"originDrop",null),_defineProperty(this,"$pageSpyConfig",null)}static get isSupport(){return!!(IDBFactory&&IDBObjectStore&&window.indexedDB&&window.indexedDB.databases)}onInit(er){let{config:rr}=er;DatabasePlugin.isSupport&&(DatabasePlugin.hasInitd||(DatabasePlugin.hasInitd=!0,this.$pageSpyConfig=rr,this.listenEvents(),this.initIndexedDBProxy()))}onReset(){this.originAdd&&(IDBObjectStore.prototype.add=this.originAdd),this.originPut&&(IDBObjectStore.prototype.put=this.originPut),this.originClear&&(IDBObjectStore.prototype.clear=this.originClear),this.originDelete&&(IDBObjectStore.prototype.delete=this.originDelete),this.originDrop&&(IDBFactory.prototype.deleteDatabase=this.originDrop),DatabasePlugin.hasInitd=!1}listenEvents(){socketStore.addListener("refresh",er=>Dr(this,null,function*(){let{source:rr}=er;if(rr.data==="indexedDB"){const nr={action:"basic",result:yield this.takeBasicInfo()};this.sendData(nr)}})),socketStore.addListener("database-pagination",er=>Dr(this,null,function*(){let{source:rr}=er;const{db:nr,store:ar,page:sr}=rr.data,ir=yield this.getStoreDataWithPagination({db:nr,store:ar,page:sr});this.sendData(ir)}))}initIndexedDBProxy(){const{put:er,add:rr,delete:nr,clear:ar}=IDBObjectStore.prototype;this.originAdd=rr,this.originPut=er,this.originDelete=nr,this.originClear=ar;const sr=this;[{origin:er,method:"put"},{origin:rr,method:"add"},{origin:nr,method:"delete"},{origin:ar,method:"clear"}].forEach(or=>{let{origin:cr,method:lr}=or;IDBObjectStore.prototype[lr]=function(){for(var dr=arguments.length,pr=new Array(dr),hr=0;hr<dr;hr++)pr[hr]=arguments[hr];const fr=cr.apply(this,pr),mr={action:lr==="clear"?"clear":"update",database:this.transaction.db.name,store:this.name};return fr.addEventListener("success",()=>{sr.sendData(mr)}),fr}});const ir=IDBFactory.prototype.deleteDatabase;this.originDrop=ir,IDBFactory.prototype.deleteDatabase=function(or){const cr=ir.call(this,or),lr={action:"drop",database:or};return cr.addEventListener("success",()=>{sr.sendData(lr)}),cr}}takeBasicInfo(){return Dr(this,null,function*(){const er=yield window.indexedDB.databases();if(!er.length)return null;const rr=er.filter(ar=>ar.name&&ar.version);return rr.length?(yield Promise.all(rr.map(ar=>this.getDBData(ar)))).filter(Boolean):null})}getDBData(er){return Dr(this,null,function*(){try{const rr={name:er.name,version:er.version,stores:[]},nr=yield promisify(window.indexedDB.open(er.name,er.version));if(nr.objectStoreNames.length){const ar=[...nr.objectStoreNames].map(sr=>nr.transaction(sr,"readonly").objectStore(sr));rr.stores=ar.map(sr=>{const{name:ir,keyPath:or,autoIncrement:cr,indexNames:lr}=sr;return{name:ir,keyPath:or,autoIncrement:cr,indexes:[...lr]}})}return rr}catch(rr){return psLog.error("Failed to get indexedDB data, more info: ".concat(rr.message)),null}})}getStoreDataWithPagination(er){return Dr(this,null,function*(){let{db:rr,store:nr,page:ar}=er;const sr={action:"get",database:null,store:null,page:{current:ar,prev:null,next:null},total:0,data:[]};if(ar<1)return sr;const ir=yield promisify(window.indexedDB.open(rr)),or=ir.transaction(nr,"readonly").objectStore(nr);sr.database={name:ir.name,version:ir.version},sr.store={name:or.name,keyPath:or.keyPath,autoIncrement:or.autoIncrement,indexes:[...or.indexNames]},sr.total=yield promisify(or.count());const cr=50*(ar-1),lr=50*ar;sr.page.prev=ar>1?ar-1:null,sr.page.next=cr+50<sr.total?ar+1:null;let dr=0;const pr=or.openCursor();return new Promise((hr,fr)=>{pr.addEventListener("success",()=>{const mr=pr.result;mr?(dr>=cr&&dr<lr&&sr.data.push({key:mr.key,value:mr.value}),dr++,mr.continue()):hr(sr)}),pr.addEventListener("error",fr)})})}sendData(er){var rr,nr;if(((rr=this.$pageSpyConfig)===null||rr===void 0||(rr=rr.dataProcessor)===null||rr===void 0||(nr=rr.database)===null||nr===void 0?void 0:nr.call(rr,er))===!1)return;const ar=makeMessage("database",er);socketStore.broadcastMessage(ar,!0),["update","clear","drop"].includes(er.action)&&socketStore.dispatchEvent("public-data",ar)}}_defineProperty(DatabasePlugin,"hasInitd",!1);const joinQuery=tr=>{const er=new URLSearchParams;return Object.entries(tr).forEach(rr=>{let[nr,ar]=rr;er.append(nr,String(ar))}),er.toString()};class Request{constructor(er){if(this.config=er,!er.api)throw Error("The api base url cannot be empty")}get base(){return this.config.api}getScheme(){return this.config.enableSSL?["https://","wss://"]:["http://","ws://"]}createRoom(){const{project:er,title:rr,useSecret:nr,secret:ar}=this.config,sr=this.getScheme(),ir=joinQuery({name:navigator.userAgent,group:er,title:rr});return fetch("".concat(sr[0]).concat(this.base,"/api/v1/room/create?").concat(ir),{method:"POST",body:JSON.stringify({useSecret:nr,secret:ar})}).then(or=>or.json()).then(or=>{const{name:cr,address:lr}=or.data||{};return{roomUrl:this.getRoomUrl(lr),address:lr,name:cr}}).catch(or=>{throw Error("Request create room failed: ".concat(or.message))})}getRoomUrl(er){const rr=this.getScheme(),{useSecret:nr,secret:ar}=this.config;return"".concat(rr[1]).concat(this.base,"/api/v1/ws/room/join?").concat(joinQuery({address:er,name:"client:".concat(getRandomId()),userId:"Client",forceCreate:!0,useSecret:nr,secret:ar}))}}const STICKY_RADIUS="50%",FULLY_RADIUS="100%",POSITION_CACHE_ID="page-spy-position";function getPosition(tr){return window.TouchEvent&&tr instanceof TouchEvent?tr.touches[0]:tr}function moveable(tr){const er=localStorage.getItem(POSITION_CACHE_ID);if(er){const[dr,pr]=er.split(",");+dr<window.innerWidth&&+pr<window.innerHeight&&(tr.style.left="".concat(dr,"px"),tr.style.top="".concat(pr,"px"))}let rr,nr;const ar={xAxis:0,yAxis:0},sr={x:0,y:0};function ir(){if(!ar.xAxis&&!ar.yAxis)return;const{left:dr,top:pr}=tr.getBoundingClientRect();dr>0&&dr<ar.xAxis&&pr>0&&pr<ar.yAxis?tr.isHidden=!1:(rr&&clearTimeout(rr),rr=setTimeout(()=>{rr=null,tr.disableHidden||(dr<=0?tr.classList.add("hidden-in-left"):dr>=ar.xAxis&&tr.classList.add("hidden-in-right"),pr<=0?tr.classList.add("hidden-in-top"):pr>=ar.yAxis&&tr.classList.add("hidden-in-bottom"),tr.isHidden=!0)},1e3))}function or(dr){dr.preventDefault();const{clientX:pr,clientY:hr}=getPosition(dr),fr=pr-sr.x,mr=hr-sr.y;if([fr,mr].some(yr=>Math.abs(yr)>5)&&!tr.isMoveEvent&&(tr.isMoveEvent=!0,dr.type==="mousemove")){const yr=Ir=>{Ir.stopImmediatePropagation(),tr.removeEventListener("click",yr,!0)};tr.addEventListener("click",yr,!0)}let gr=nr.x+fr;gr<=0?(gr=0,tr.style.setProperty("--left-radius",STICKY_RADIUS)):gr>=ar.xAxis?(gr=ar.xAxis,tr.style.setProperty("--right-radius",STICKY_RADIUS)):(tr.style.setProperty("--left-radius",FULLY_RADIUS),tr.style.setProperty("--right-radius",FULLY_RADIUS));let vr=nr.y+mr;vr<=0?(vr=0,tr.style.setProperty("--top-radius",STICKY_RADIUS)):vr>ar.yAxis?(vr=ar.yAxis,tr.style.setProperty("--bottom-radius",STICKY_RADIUS)):(tr.style.setProperty("--top-radius",FULLY_RADIUS),tr.style.setProperty("--bottom-radius",FULLY_RADIUS)),tr.style.left="".concat(gr,"px"),tr.style.top="".concat(vr,"px")}function cr(){sr.x=0,sr.y=0;const{left:dr,top:pr}=tr.getBoundingClientRect();localStorage.setItem(POSITION_CACHE_ID,"".concat(dr,",").concat(pr)),tr.isMoveEvent=!1,ir(),document.body.classList.remove("dragging"),document.removeEventListener("mousemove",or),document.removeEventListener("mouseup",cr),document.removeEventListener("touchmove",or),document.removeEventListener("touchend",cr)}function lr(dr){dr.stopPropagation(),rr&&clearTimeout(rr),tr.isHidden&&tr.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left"),tr.isMoveEvent=!1,nr=tr.getBoundingClientRect(),ar.xAxis=window.innerWidth-nr.width,ar.yAxis=window.innerHeight-nr.height;const{clientX:pr,clientY:hr}=getPosition(dr);sr.x=pr,sr.y=hr,document.body.classList.add("dragging"),document.addEventListener("mousemove",or,!1),document.addEventListener("mouseup",cr,!1),document.addEventListener("touchmove",or,{capture:!1,passive:!1}),document.addEventListener("touchend",cr,!1)}tr.addEventListener("mousedown",lr,!1),tr.addEventListener("touchstart",lr,!1),tr.addEventListener("mouseover",()=>{tr.disableHidden=!0,tr.isHidden&&tr.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left")},!1),tr.addEventListener("mouseleave",()=>{tr.disableHidden=!1,tr.isMoveEvent||ir()},!1)}var img$3="data:image/svg+xml,%3csvg width='255' height='255' viewBox='0 0 255 255' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M183 24L81 126V141.5L90 150.5H105L145 110.5H160.5L169.5 119.5V133.5L72 231' stroke='url(%23paint0_linear_106_8)' stroke-width='25' stroke-linecap='round' /%3e %3cdefs%3e %3clinearGradient id='paint0_linear_106_8' x1='127.5' y1='24' x2='127.5' y2='231' gradientUnits='userSpaceOnUse'%3e %3cstop stop-color='%233D0C7C' /%3e %3cstop offset='0.519204' stop-color='%234E00B1' /%3e %3cstop offset='1' stop-color='%23EFDFFF' /%3e %3c/linearGradient%3e %3c/defs%3e%3c/svg%3e",img$2="data:image/svg+xml,%3csvg width='250' height='250' viewBox='0 0 250 250' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M62.7935 118.088L173.383 7.49889L174.046 6.83527C179.024 1.85756 187.095 1.85756 192.072 6.83527C197.028 11.7914 197.053 19.8192 192.127 24.8057L89.0585 129.147V133.294L91.8232 136.059H95.9703L138.164 93.8963L163.706 94.588L181.677 112.559V137.441L75.926 243.192C70.9635 248.155 62.9177 248.155 57.9552 243.192C52.9927 238.23 52.9928 230.184 57.9552 225.222L155.412 127.765V123.618L152.647 120.853H148.5L107.029 162.324H79.3819L62.7935 145.735V118.088Z' fill='white' /%3e%3c/svg%3e",_document$currentScri;const nodeId="__pageSpy",schema$1=extendConfigSchema(tr=>tr.object({clientOrigin:tr.string().refine(er=>er===""||/^https?:\/\//i.test(er),{message:"Invalid url"}),autoRender:tr.boolean(),logo:tr.string(),primaryColor:tr.string(),modal:tr.object({logo:tr.string(),title:tr.string()}).partial().strict(),gesture:tr.nullable(tr.array(tr.union([tr.literal("U"),tr.literal("D"),tr.literal("L"),tr.literal("R")])).min(4)),lang:tr.enum(["zh","en"])}).partial().strict());class Config extends ConfigBase{constructor(){super(...arguments),_defineProperty(this,"schema",schema$1.superRefine((er,rr)=>{er.offline===!1&&(er.api&&er.clientOrigin||rr.addIssue({code:"custom",message:'Must provide value when "offline" is false',path:[er.api?"clientOrigin":"api"]}))}))}get platform(){const er={clientOrigin:"",autoRender:!0,logo:img$3,primaryColor:"hsl(270, 100%, 55%)",modal:{logo:img$2,title:"PageSpy"},gesture:null,lang:"zh"};if(!Config.scriptLink)return er;try{const{host:rr,origin:nr,protocol:ar}=new URL(Config.scriptLink);return br(ur({},er),{api:rr,clientOrigin:nr,enableSSL:ar!=="http:"})}catch(rr){return er}}}_defineProperty(Config,"scriptLink",(_document$currentScri=document.currentScript)===null||_document$currentScri===void 0?void 0:_document$currentScri.src);var css_248z$2=`.toast-d8zWd {
|
|
25
|
+
position: fixed;
|
|
26
|
+
left: 50%;
|
|
27
|
+
top: 10%;
|
|
28
|
+
transform: translate(-50%, 0);
|
|
29
|
+
display: flex;
|
|
30
|
+
gap: var(--gap);
|
|
31
|
+
align-items: center;
|
|
32
|
+
max-width: 50vw;
|
|
33
|
+
min-height: 2.29em;
|
|
34
|
+
padding: var(--input-padding);
|
|
35
|
+
font-size: var(--text-base);
|
|
36
|
+
line-height: 1;
|
|
37
|
+
color: white;
|
|
38
|
+
font-family: var(--font-family);
|
|
39
|
+
background-color: var(--primary-color);
|
|
40
|
+
border-radius: 0.29em;
|
|
41
|
+
box-shadow: var(--dark-shadow);
|
|
42
|
+
z-index: 99999;
|
|
43
|
+
opacity: 0;
|
|
44
|
+
}
|
|
45
|
+
.toast-d8zWd.show-IlurC {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
.toast-d8zWd.show-IlurC {
|
|
49
|
+
animation: slideIn-4mB0Y 0.3s ease-in-out forwards;
|
|
50
|
+
}
|
|
51
|
+
@keyframes slideIn-4mB0Y {
|
|
52
|
+
0% {
|
|
53
|
+
transform: translate3d(-50%, 1.79em, 0);
|
|
54
|
+
opacity: 0;
|
|
55
|
+
}
|
|
56
|
+
80% {
|
|
57
|
+
transform: translate3d(-50%, -0.71em, 0);
|
|
58
|
+
}
|
|
59
|
+
100% {
|
|
60
|
+
transform: translate3d(-50%, 0, 0);
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
`,classes$2={toast:"toast-d8zWd",show:"show-IlurC"};(function(){const tr=document.createElement("style");tr.setAttribute("data-page-spy-style","true"),tr.textContent=css_248z$2,window.pageSpyStyles&&Array.isArray(window.pageSpyStyles)||(window.pageSpyStyles=[]),window.pageSpyStyles.push(tr)})();const successSvg=`
|
|
65
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
66
|
+
<path fill="currentColor" fill-rule="evenodd"
|
|
67
|
+
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" />
|
|
68
|
+
</svg>`,errorSvg=`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
69
|
+
<path fill="currentColor"
|
|
70
|
+
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z" />
|
|
71
|
+
</svg>`,toastIconMap={success:successSvg,error:errorSvg};class Toast{static get root(){return document.querySelector("#".concat(nodeId))}static message(er){if(!Toast.root)return;let rr=er;typeof rr=="string"&&(rr=document.createElement("div"),rr.textContent=String(er)),rr.classList.add("page-spy-toast",classes$2.toast),Toast.root.appendChild(rr),setTimeout(()=>{rr.classList.add(classes$2.show)},0);const nr=setTimeout(()=>{var ar;(ar=rr)===null||ar===void 0||ar.remove(),Toast.timer===nr&&(Toast.timer=null)},3e3);Toast.timer=nr}static show(er,rr){const nr=toastIconMap[er],ar=new DOMParser().parseFromString(`
|
|
72
|
+
<div class="`.concat(classes$2.withIcon,`">
|
|
73
|
+
`).concat(nr,`
|
|
74
|
+
<div>`).concat(rr,`</div>
|
|
75
|
+
</div>`),"text/html").querySelector(".".concat(classes$2.withIcon));Toast.message(ar)}static destroy(){const er=document.querySelectorAll(".page-spy-toast");er.length&&([...er].forEach(rr=>{rr.remove()}),Toast.timer&&clearTimeout(Toast.timer)),Toast.timer=null}}_defineProperty(Toast,"timer",null);var img$1="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3e %3cg fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3e %3cpath 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' /%3e %3cpath 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' /%3e %3c/g%3e%3c/svg%3e",css_248z$1=`.modal-rlFLa {
|
|
76
|
+
display: none;
|
|
77
|
+
position: fixed;
|
|
78
|
+
top: 0;
|
|
79
|
+
right: 0;
|
|
80
|
+
bottom: 0;
|
|
81
|
+
left: 0;
|
|
82
|
+
z-index: 13000;
|
|
83
|
+
font-size: var(--text-base);
|
|
84
|
+
line-height: 1;
|
|
85
|
+
}
|
|
86
|
+
.modal-rlFLa.show {
|
|
87
|
+
display: block;
|
|
88
|
+
}
|
|
89
|
+
.modal-rlFLa.show {
|
|
90
|
+
animation: fadeIn-mXj-N 0.3s ease-in-out forwards;
|
|
91
|
+
}
|
|
92
|
+
@keyframes fadeIn-mXj-N {
|
|
93
|
+
0% {
|
|
94
|
+
background-color: hsla(0, 0%, 0%, 0);
|
|
95
|
+
}
|
|
96
|
+
100% {
|
|
97
|
+
background-color: hsla(0, 0%, 0%, 0.3);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
.modal-rlFLa.show .content-KlWkz {
|
|
101
|
+
animation: scaleIn-JuIZH 0.3s ease-in forwards;
|
|
102
|
+
}
|
|
103
|
+
@keyframes scaleIn-JuIZH {
|
|
104
|
+
0% {
|
|
105
|
+
opacity: 0;
|
|
106
|
+
transform: translate3d(-50%, -50%, 0) scale(0.8);
|
|
107
|
+
}
|
|
108
|
+
70% {
|
|
109
|
+
opacity: 1;
|
|
110
|
+
transform: translate3d(-50%, -50%, 0) scale(1.1);
|
|
111
|
+
}
|
|
112
|
+
100% {
|
|
113
|
+
transform: translate3d(-50%, -50%, 0) scale(1);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.modal-rlFLa.leaving {
|
|
117
|
+
display: block;
|
|
118
|
+
}
|
|
119
|
+
.modal-rlFLa.leaving {
|
|
120
|
+
animation: fadeOut-daRKq 0.3s ease-in-out forwards;
|
|
121
|
+
}
|
|
122
|
+
@keyframes fadeOut-daRKq {
|
|
123
|
+
0% {
|
|
124
|
+
background-color: hsla(0, 0%, 0%, 0.3);
|
|
125
|
+
}
|
|
126
|
+
100% {
|
|
127
|
+
background-color: hsla(0, 0%, 0%, 0);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
.modal-rlFLa.leaving .content-KlWkz {
|
|
131
|
+
animation: scaleOut-8Pf5H 0.3s ease-out forwards;
|
|
132
|
+
}
|
|
133
|
+
@keyframes scaleOut-8Pf5H {
|
|
134
|
+
0% {
|
|
135
|
+
opacity: 1;
|
|
136
|
+
transform: translate3d(-50%, -50%, 0) scale(1);
|
|
137
|
+
}
|
|
138
|
+
30% {
|
|
139
|
+
transform: translate3d(-50%, -50%, 0) scale(1.1);
|
|
140
|
+
}
|
|
141
|
+
60% {
|
|
142
|
+
opacity: 0;
|
|
143
|
+
transform: translate3d(-50%, -50%, 0) scale(0.9);
|
|
144
|
+
}
|
|
145
|
+
100% {
|
|
146
|
+
opacity: 0;
|
|
147
|
+
transform: translate3d(-50%, -50%, 0) scale(0.9);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
.modal-rlFLa .content-KlWkz {
|
|
151
|
+
position: absolute;
|
|
152
|
+
left: 50%;
|
|
153
|
+
top: 45%;
|
|
154
|
+
transform: translate3d(-50%, -50%, 0);
|
|
155
|
+
width: 90%;
|
|
156
|
+
border-radius: 0.43em;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
}
|
|
159
|
+
.modal-rlFLa .content-KlWkz ::selection {
|
|
160
|
+
background-color: var(--primary-color);
|
|
161
|
+
color: white;
|
|
162
|
+
}
|
|
163
|
+
@media screen and (min-width: 440px) {
|
|
164
|
+
.modal-rlFLa .content-KlWkz {
|
|
165
|
+
max-width: 70%;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
@media screen and (min-width: 768px) {
|
|
169
|
+
.modal-rlFLa .content-KlWkz {
|
|
170
|
+
max-width: 55%;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
@media screen and (min-width: 1024px) {
|
|
174
|
+
.modal-rlFLa .content-KlWkz {
|
|
175
|
+
max-width: 40%;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
@media screen and (min-width: 1440px) {
|
|
179
|
+
.modal-rlFLa .content-KlWkz {
|
|
180
|
+
max-width: 30%;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
@media screen and (min-width: 1920px) {
|
|
184
|
+
.modal-rlFLa .content-KlWkz {
|
|
185
|
+
max-width: 25%;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
.modal-rlFLa .header-M30Wi {
|
|
189
|
+
display: flex;
|
|
190
|
+
justify-content: space-between;
|
|
191
|
+
align-items: center;
|
|
192
|
+
padding: var(--block-padding);
|
|
193
|
+
color: white;
|
|
194
|
+
background-color: var(--primary-color);
|
|
195
|
+
}
|
|
196
|
+
.modal-rlFLa .header-M30Wi ::selection {
|
|
197
|
+
background-color: #fff;
|
|
198
|
+
color: var(--primary-color);
|
|
199
|
+
}
|
|
200
|
+
.modal-rlFLa .header-M30Wi .headerLeft-RfzaN {
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
gap: var(--gap-lg);
|
|
204
|
+
}
|
|
205
|
+
.modal-rlFLa .header-M30Wi .headerLeft-RfzaN .logo-OM-Sp {
|
|
206
|
+
height: 2em;
|
|
207
|
+
}
|
|
208
|
+
.modal-rlFLa .header-M30Wi .headerLeft-RfzaN .title-J-P8k {
|
|
209
|
+
font-size: var(--text-xl);
|
|
210
|
+
}
|
|
211
|
+
.modal-rlFLa .header-M30Wi .headerRight-Y8nGg {
|
|
212
|
+
padding: 6px;
|
|
213
|
+
cursor: pointer;
|
|
214
|
+
}
|
|
215
|
+
.modal-rlFLa .header-M30Wi .headerRight-Y8nGg .close-bRwD3 {
|
|
216
|
+
width: 1.71em;
|
|
217
|
+
height: 1.71em;
|
|
218
|
+
}
|
|
219
|
+
.modal-rlFLa .main-SA0Hu {
|
|
220
|
+
padding: var(--block-padding);
|
|
221
|
+
background-color: white;
|
|
222
|
+
}
|
|
223
|
+
.modal-rlFLa .footer-op1wT {
|
|
224
|
+
display: flex;
|
|
225
|
+
justify-content: flex-end;
|
|
226
|
+
align-items: center;
|
|
227
|
+
gap: var(--gap-lg);
|
|
228
|
+
padding: var(--block-padding);
|
|
229
|
+
border-top: 1px solid var(--divider-color);
|
|
230
|
+
background-color: white;
|
|
231
|
+
}
|
|
232
|
+
.modal-rlFLa .footer-op1wT button {
|
|
233
|
+
display: flex;
|
|
234
|
+
justify-content: center;
|
|
235
|
+
align-items: center;
|
|
236
|
+
min-width: 4.29em;
|
|
237
|
+
padding: var(--input-padding);
|
|
238
|
+
gap: var(--gap);
|
|
239
|
+
letter-spacing: 0.4px;
|
|
240
|
+
border: var(--border);
|
|
241
|
+
border-radius: 0.29em;
|
|
242
|
+
background-color: white;
|
|
243
|
+
color: var(--text-primary);
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
white-space: nowrap;
|
|
246
|
+
transition: all ease-in-out 100ms;
|
|
247
|
+
font-size: var(--text-base);
|
|
248
|
+
}
|
|
249
|
+
.modal-rlFLa .footer-op1wT button[data-primary] {
|
|
250
|
+
border-color: var(--primary-color);
|
|
251
|
+
background-color: var(--primary-color);
|
|
252
|
+
color: white;
|
|
253
|
+
}
|
|
254
|
+
.modal-rlFLa .footer-op1wT button[data-dashed] {
|
|
255
|
+
border-style: dashed;
|
|
256
|
+
}
|
|
257
|
+
.modal-rlFLa .footer-op1wT button:disabled {
|
|
258
|
+
border-color: var(--disabled-color);
|
|
259
|
+
background-color: var(--disabled-color);
|
|
260
|
+
color: white;
|
|
261
|
+
cursor: not-allowed;
|
|
262
|
+
}
|
|
263
|
+
.modal-rlFLa .footer-op1wT button:active {
|
|
264
|
+
opacity: 0.7;
|
|
265
|
+
}
|
|
266
|
+
.modal-rlFLa .footer-op1wT button img,
|
|
267
|
+
.modal-rlFLa .footer-op1wT button svg {
|
|
268
|
+
width: 1.43em;
|
|
269
|
+
height: 1.43em;
|
|
270
|
+
}
|
|
271
|
+
@media screen and (max-width: 440px) {
|
|
272
|
+
.modal-rlFLa .footer-op1wT button img,
|
|
273
|
+
.modal-rlFLa .footer-op1wT button svg {
|
|
274
|
+
display: none;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
`,classes$1={modal:"modal-rlFLa",content:"content-KlWkz",header:"header-M30Wi",headerLeft:"headerLeft-RfzaN",logo:"logo-OM-Sp",title:"title-J-P8k",headerRight:"headerRight-Y8nGg",close:"close-bRwD3",main:"main-SA0Hu",footer:"footer-op1wT"};(function(){const tr=document.createElement("style");tr.setAttribute("data-page-spy-style","true"),tr.textContent=css_248z$1,window.pageSpyStyles&&Array.isArray(window.pageSpyStyles)||(window.pageSpyStyles=[]),window.pageSpyStyles.push(tr)})();var img="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3e %3cpath fill='white' d='m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z' /%3e%3c/svg%3e";const eventBus=new EventTarget,defaultConfig={logo:"",title:"",content:document.createElement("div"),footer:[],mounted:document.body};class modal{constructor(){if(new.target===modal)throw new Error("Cannot call `new modal()`")}static get rendered(){return modal.config.mounted.contains(modal.root)}static query(er){var rr;return(rr=modal.root)===null||rr===void 0?void 0:rr.querySelector(".".concat(er))}static build(er){modal.config=ur(ur({},modal.config),er),modal.root||(modal.root=new DOMParser().parseFromString(modal.template,"text/html").querySelector(".".concat(classes$1.modal)),modal.root.addEventListener("click",rr=>{rr.stopPropagation(),modal.close()}),modal.query(classes$1.content).addEventListener("click",rr=>{rr.stopPropagation(),rr.preventDefault()}),modal.query(classes$1.headerRight).addEventListener("click",()=>{modal.close()}),modal.query(classes$1.logo).setAttribute("src",modal.config.logo),modal.query(classes$1.title).textContent=modal.config.title)}static show(er){var rr,nr;if(!modal.root)return void psLog.info("modal has not been ready.");const{content:ar,footer:sr,mounted:ir}=modal.config,or=(rr=er==null?void 0:er.content)!==null&&rr!==void 0?rr:ar,cr=(nr=er==null?void 0:er.footer)!==null&&nr!==void 0?nr:sr,lr=modal.query(classes$1.main),dr=modal.query(classes$1.footer);lr.innerHTML="",isString(or)?lr.insertAdjacentHTML("afterbegin",or):lr.appendChild(or),dr.innerHTML="",cr.forEach(pr=>{isString(pr)?dr.insertAdjacentHTML("beforeend",pr):dr.insertAdjacentElement("beforeend",pr)}),modal.rendered||ir.appendChild(modal.root),modal.root.classList.add("show"),eventBus.dispatchEvent(new Event("modal:show"))}static close(){modal.root&&modal.rendered&&(modal.root.classList.remove("show"),modal.root.classList.add("leaving"),setTimeout(()=>{var er;(er=modal.root)===null||er===void 0||er.classList.remove("leaving"),eventBus.dispatchEvent(new Event("modal:close"))},300))}static reset(){modal.config=defaultConfig,modal.root=null}}_defineProperty(modal,"config",defaultConfig),_defineProperty(modal,"template",`
|
|
278
|
+
<div class="`.concat(classes$1.modal,` page-spy-modal">
|
|
279
|
+
<div class="`).concat(classes$1.content,` page-spy-modal-content">
|
|
280
|
+
<!-- Header -->
|
|
281
|
+
<div class="`).concat(classes$1.header,` page-spy-modal-header">
|
|
282
|
+
<div class="`).concat(classes$1.headerLeft,`">
|
|
283
|
+
<img class="`).concat(classes$1.logo,`" />
|
|
284
|
+
<b class="`).concat(classes$1.title,`"></b>
|
|
285
|
+
</div>
|
|
286
|
+
<div class="`).concat(classes$1.headerRight,`">
|
|
287
|
+
<img class="`).concat(classes$1.close,'" src="').concat(img,`" />
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
<!-- Main content -->
|
|
292
|
+
<div class="`).concat(classes$1.main,` page-spy-modal-main"></div>
|
|
293
|
+
|
|
294
|
+
<!-- Footer -->
|
|
295
|
+
<div class="`).concat(classes$1.footer,` page-spy-modal-footer"></div>
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
`));var css_248z=`body.dragging {
|
|
299
|
+
-webkit-user-select: none;
|
|
300
|
+
user-select: none;
|
|
301
|
+
}
|
|
302
|
+
body.dragging iframe {
|
|
303
|
+
pointer-events: none;
|
|
304
|
+
}
|
|
305
|
+
#__pageSpy {
|
|
306
|
+
--hue: 270;
|
|
307
|
+
--primary-color: hsl(var(--hue), 100%, 55%);
|
|
308
|
+
--text-primary: hsl(0, 0%, 10%);
|
|
309
|
+
--text-secondary: hsl(0, 0%, 30%);
|
|
310
|
+
--text-placeholder: hsl(0, 0%, 60%);
|
|
311
|
+
--divider-color: hsl(0, 0%, 90%);
|
|
312
|
+
--border-color: hsl(0, 0%, 70%);
|
|
313
|
+
--disabled-color: hsl(0, 0%, 75%);
|
|
314
|
+
--text-base: 14px;
|
|
315
|
+
--text-sm: 0.86em;
|
|
316
|
+
--text-lg: 1.14em;
|
|
317
|
+
--text-xl: 1.43em;
|
|
318
|
+
--text-2xl: 1.71em;
|
|
319
|
+
--text-3xl: 2.29em;
|
|
320
|
+
--input-padding: 0.43em 0.57em;
|
|
321
|
+
--input-padding-lg: 0.57em 0.86em;
|
|
322
|
+
--block-padding: 1em;
|
|
323
|
+
--gap: 0.29em;
|
|
324
|
+
--gap-lg: 0.57em;
|
|
325
|
+
--border: 1px solid var(--border-color);
|
|
326
|
+
--border-active: 1px solid var(--primary-color);
|
|
327
|
+
--light-shadow: 0 4px 10px 4px hsla(0, 0%, 100%, 0.1);
|
|
328
|
+
--dark-shadow: 0 4px 10px 4px hsla(0, 0%, 0%, 0.1);
|
|
329
|
+
--font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC',
|
|
330
|
+
'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;
|
|
331
|
+
font-size: var(--text-base);
|
|
332
|
+
font-family: var(--font-family);
|
|
333
|
+
line-height: 1;
|
|
334
|
+
}
|
|
335
|
+
#__pageSpy * {
|
|
336
|
+
box-sizing: border-box;
|
|
337
|
+
-webkit-tap-highlight-color: transparent;
|
|
338
|
+
}
|
|
339
|
+
#__pageSpy .page-spy-logo {
|
|
340
|
+
--top-radius: 100%;
|
|
341
|
+
--right-radius: 100%;
|
|
342
|
+
--bottom-radius: 100%;
|
|
343
|
+
--left-radius: 100%;
|
|
344
|
+
position: fixed;
|
|
345
|
+
right: 2.85714286em;
|
|
346
|
+
bottom: 5.71428571em;
|
|
347
|
+
display: flex;
|
|
348
|
+
justify-content: center;
|
|
349
|
+
align-items: center;
|
|
350
|
+
width: 5.71em;
|
|
351
|
+
height: 5.71em;
|
|
352
|
+
font-size: var(--text-base);
|
|
353
|
+
border-radius: 5.71em;
|
|
354
|
+
background-color: white;
|
|
355
|
+
box-shadow: var(--dark-shadow);
|
|
356
|
+
cursor: pointer;
|
|
357
|
+
z-index: 13000;
|
|
358
|
+
transition: opacity ease-in-out 0.3s, transform ease-in-out 0.3s, background-color ease-in-out 0.3s, filter ease-in-out 0.3s;
|
|
359
|
+
}
|
|
360
|
+
#__pageSpy .page-spy-logo.inactive {
|
|
361
|
+
background-color: hsl(0, 0%, 70%);
|
|
362
|
+
filter: grayscale(1);
|
|
363
|
+
}
|
|
364
|
+
#__pageSpy .page-spy-logo::after {
|
|
365
|
+
content: '';
|
|
366
|
+
display: block;
|
|
367
|
+
position: absolute;
|
|
368
|
+
left: 0;
|
|
369
|
+
top: 0;
|
|
370
|
+
width: 100%;
|
|
371
|
+
height: 100%;
|
|
372
|
+
transform: rotateZ(45deg);
|
|
373
|
+
background-color: white;
|
|
374
|
+
border-top-left-radius: var(--top-radius);
|
|
375
|
+
border-top-right-radius: var(--right-radius);
|
|
376
|
+
border-bottom-right-radius: var(--bottom-radius);
|
|
377
|
+
border-bottom-left-radius: var(--left-radius);
|
|
378
|
+
transition: border-radius linear 0.15s;
|
|
379
|
+
}
|
|
380
|
+
#__pageSpy .page-spy-logo .hidden-mixin {
|
|
381
|
+
opacity: 0.35;
|
|
382
|
+
}
|
|
383
|
+
#__pageSpy .page-spy-logo.hidden-in-top {
|
|
384
|
+
opacity: 0.35;
|
|
385
|
+
transform: translateY(-65%);
|
|
386
|
+
}
|
|
387
|
+
#__pageSpy .page-spy-logo.hidden-in-top img {
|
|
388
|
+
transform: translateY(30%);
|
|
389
|
+
}
|
|
390
|
+
#__pageSpy .page-spy-logo.hidden-in-right {
|
|
391
|
+
opacity: 0.35;
|
|
392
|
+
transform: translateX(65%);
|
|
393
|
+
}
|
|
394
|
+
#__pageSpy .page-spy-logo.hidden-in-right img {
|
|
395
|
+
transform: translateX(-30%);
|
|
396
|
+
}
|
|
397
|
+
#__pageSpy .page-spy-logo.hidden-in-bottom {
|
|
398
|
+
opacity: 0.35;
|
|
399
|
+
transform: translateY(65%);
|
|
400
|
+
}
|
|
401
|
+
#__pageSpy .page-spy-logo.hidden-in-bottom img {
|
|
402
|
+
transform: translateY(-30%);
|
|
403
|
+
}
|
|
404
|
+
#__pageSpy .page-spy-logo.hidden-in-left {
|
|
405
|
+
opacity: 0.35;
|
|
406
|
+
transform: translateX(-65%);
|
|
407
|
+
}
|
|
408
|
+
#__pageSpy .page-spy-logo.hidden-in-left img {
|
|
409
|
+
transform: translateX(30%);
|
|
410
|
+
}
|
|
411
|
+
#__pageSpy .page-spy-logo img {
|
|
412
|
+
position: relative;
|
|
413
|
+
display: block;
|
|
414
|
+
z-index: 100;
|
|
415
|
+
transition: transform ease-in-out 0.1s 0.4s;
|
|
416
|
+
width: 3.57em;
|
|
417
|
+
pointer-events: none;
|
|
418
|
+
-webkit-user-select: none;
|
|
419
|
+
user-select: none;
|
|
420
|
+
}
|
|
421
|
+
.connectInfo-9svvO {
|
|
422
|
+
display: flex;
|
|
423
|
+
justify-content: space-between;
|
|
424
|
+
align-items: flex-start;
|
|
425
|
+
gap: var(--gap);
|
|
426
|
+
}
|
|
427
|
+
.connectInfo-9svvO > p {
|
|
428
|
+
flex: 1 0 0;
|
|
429
|
+
text-align: center;
|
|
430
|
+
word-break: break-word;
|
|
431
|
+
}
|
|
432
|
+
.connectInfo-9svvO > p span {
|
|
433
|
+
font-size: var(--text-sm);
|
|
434
|
+
color: var(--text-placeholder);
|
|
435
|
+
}
|
|
436
|
+
.connectInfo-9svvO > p b {
|
|
437
|
+
display: block;
|
|
438
|
+
margin-top: 0.86em;
|
|
439
|
+
font-size: var(--text-lg);
|
|
440
|
+
color: var(--text-primary);
|
|
441
|
+
}
|
|
442
|
+
`,classes={connectInfo:"connectInfo-9svvO"};(function(){const tr=document.createElement("style");tr.setAttribute("data-page-spy-style","true"),tr.textContent=css_248z,window.pageSpyStyles&&Array.isArray(window.pageSpyStyles)||(window.pageSpyStyles=[]),window.pageSpyStyles.push(tr)})();var version="2.2.5";const locales={zh:{copyLink:"复制在线调试链接",copied:"复制成功",copyFailed:"复制失败"},en:{copyLink:"Copy online debug link",copied:"Copied",copyFailed:"Copy failed"}},i18n=new Translation({locales}),OriginEventSource=window.EventSource;class EventSourcePlugin extends WebNetworkProxyBase{constructor(){super(...arguments),_defineProperty(this,"name","EventSourcePlugin")}onInit(er){let{config:rr}=er;EventSourcePlugin.hasInitd||(EventSourcePlugin.hasInitd=!0,NetworkProxyBase.dataProcessor=rr.dataProcessor.network,this.initProxyHandler())}initProxyHandler(){if(!window.EventSource)return;const er=this;window.EventSource=class{constructor(rr,nr){const ar=getRandomId(),sr=new RequestItem(ar);sr.url=new URL(rr,window.location.href).toString(),sr.method="GET",sr.requestType="eventsource",sr.requestHeader=[["Accept","text/event-stream"],["Cache-Control","no-cache"]],sr.readyState=ReqReadyState.UNSENT,sr.withCredentials=!!(nr!=null&&nr.withCredentials),sr.responseHeader=[["Content-Type","text/event-stream"]],sr.responseType="text",sr.startTime=Date.now();const ir=new OriginEventSource(rr,nr);return ir.addEventListener("open",()=>{sr.readyState=ReqReadyState.OPENED,sr.endTime=Date.now(),sr.costTime=sr.endTime-sr.startTime,er.sendRequestItem(ar,sr)}),ir.addEventListener("message",or=>{let{data:cr,lastEventId:lr}=or;sr.status=200,sr.statusText="Done",sr.readyState=ReqReadyState.DONE,sr.response=cr,sr.lastEventId=lr,sr.endTime=Date.now(),sr.costTime=sr.endTime-sr.startTime,er.sendRequestItem(ar,sr)}),ir.addEventListener("error",()=>{sr.status=400,sr.readyState=ReqReadyState.DONE,sr.endTime=Date.now(),sr.costTime=sr.endTime-sr.startTime,er.sendRequestItem(ar,sr)}),ir}}}onReset(){window.EventSource=OriginEventSource}}_defineProperty(EventSourcePlugin,"hasInitd",!1);const OriginWebSocket=window.WebSocket;class WebSocketPlugin extends WebNetworkProxyBase{constructor(){super(...arguments),_defineProperty(this,"name","WebSocketPlugin")}onInit(er){let{config:rr}=er;WebSocketPlugin.hasInitd||(WebSocketPlugin.hasInitd=!0,NetworkProxyBase.dataProcessor=rr.dataProcessor.network,this.initProxyHandler())}initProxyHandler(){if(!window.WebSocket)return;const er=this;window.WebSocket=class{constructor(rr,nr){_defineProperty(this,"ws",null),_defineProperty(this,"requestId",null),_defineProperty(this,"req",null),_defineProperty(this,"id",0);const{pathname:ar}=new URL(rr,window.location.href);if(ar.startsWith(PAGE_SPY_WS_ENDPOINT))return new OriginWebSocket(rr,nr);if(this.requestId=getRandomId(),er.createRequest(this.requestId),this.req=er.getRequest(this.requestId),this.req.url=new URL(rr,window.location.href).toString(),this.req.method="GET",this.req.requestType="websocket",this.req.requestHeader=[["Upgrade","websocket"],["Connection","Upgrade"],["Sec-WebSocket-Version","13"]],nr){const sr=Array.isArray(nr)?nr.join(", "):nr;this.req.requestHeader.push(["Sec-WebSocket-Protocol",sr])}return this.req.readyState=ReqReadyState.UNSENT,this.req.startTime=Date.now(),this.req.response=null,this.ws=new OriginWebSocket(rr,nr),this.setupEventListeners(),new Proxy(this,{get(sr,ir){if(ir in sr)return sr[ir];const or=sr.ws[ir];return typeof or=="function"?or.bind(sr.ws):or},set:(sr,ir,or)=>(ir in sr?sr[ir]=or:sr.ws[ir]=or,!0)})}setupEventListeners(){this.ws&&(this.ws.addEventListener("open",()=>{this.req&&this.requestId&&(this.req.readyState=ReqReadyState.OPENED,this.req.status=101,this.req.statusText="Switching Protocols",this.req.endTime=Date.now(),this.req.costTime=this.req.endTime-this.req.startTime,this.req.responseHeader=[["Upgrade","websocket"],["Connection","Upgrade"]],er.sendRequestItem(this.requestId,this.req))}),this.ws.addEventListener("message",rr=>{if(!this.req||!this.requestId)return;const nr={type:"receive",data:rr.data,timestamp:Date.now()};this.req.readyState=ReqReadyState.DONE,this.req.status=200,this.req.statusText="OK",this.req.response=nr,this.req.endTime=Date.now(),this.req.costTime=this.req.endTime-this.req.startTime,this.req.lastEventId=String(this.id++),er.sendRequestItem(this.requestId,this.req)}),this.ws.addEventListener("error",()=>{this.req&&this.requestId&&(this.req.readyState=ReqReadyState.DONE,this.req.status=400,this.req.statusText="WebSocket Error",this.req.endTime=Date.now(),this.req.costTime=this.req.endTime-this.req.startTime,er.sendRequestItem(this.requestId,this.req))}),this.ws.addEventListener("close",rr=>{this.req&&this.requestId&&(this.req.readyState=ReqReadyState.DONE,this.req.status=rr.code,this.req.statusText=rr.reason||"Connection Closed",this.req.endTime=Date.now(),this.req.costTime=this.req.endTime-this.req.startTime,er.sendRequestItem(this.requestId,this.req))}))}send(rr){var nr;if(this.req&&this.requestId){const ar={type:"send",data:this.formatSendData(rr),timestamp:Date.now()};this.req.readyState=ReqReadyState.DONE,this.req.status=200,this.req.statusText="OK",this.req.response=ar,this.req.lastEventId=String(this.id++),this.req.endTime=Date.now(),this.req.costTime=this.req.endTime-this.req.startTime,er.sendRequestItem(this.requestId,this.req)}return(nr=this.ws)===null||nr===void 0?void 0:nr.send(rr)}close(rr,nr){var ar;return(ar=this.ws)===null||ar===void 0?void 0:ar.close(rr,nr)}formatSendData(rr){return typeof rr=="string"?rr:rr instanceof Blob?"[Blob data]":rr instanceof ArrayBuffer||ArrayBuffer.isView(rr)?"[Binary data]":String(rr)}}}onReset(){window.WebSocket=OriginWebSocket}}_defineProperty(WebSocketPlugin,"hasInitd",!1);class PageSpy{static get pluginsWithOrder(){return[...PageSpy.plugins.pre,...PageSpy.plugins.normal,...PageSpy.plugins.post]}static registerPlugin(er){if(!er)return;if(isClass(er))return void psLog.error("PageSpy.registerPlugin() expect to pass an instance, not a class");if(!er.name)return void psLog.error("The ".concat(er.constructor.name,' plugin should provide a "name" property'));if(PageSpy.pluginsWithOrder.some(nr=>nr.name===er.name))return void psLog.info("The ".concat(er.name,` has registered. Consider the following reasons:
|
|
443
|
+
- Duplicate register one same plugin;
|
|
444
|
+
- Plugin's "name" conflict with others, you can print all registered plugins by "PageSpy.plugins";`));PageSpy.plugins[er.enforce||"normal"].push(er)}constructor(){let er=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_defineProperty(this,"root",null),_defineProperty(this,"version",version),_defineProperty(this,"request",null),_defineProperty(this,"address",""),_defineProperty(this,"socketStore",socketStore),_defineProperty(this,"config",new Config),_defineProperty(this,"cacheTimer",null),_defineProperty(this,"eventBus",eventBus),PageSpy.instance)return psLog.warn("Cannot initialize PageSpy multiple times"),PageSpy.instance;const rr=this.config.mergeConfig(er);rr.gesture?a$2(rr.gesture,()=>{PageSpy.instance||this.init()}):this.init()}init(){return Dr(this,null,function*(){PageSpy.instance=this;const er=this.config.get();er.lang&&i18n.setLang(er.lang),this.updateConfiguration(),this.triggerPlugins("onInit",{config:er,socketStore}),er.offline===!1&&(this.request=new Request(er),this.cacheIsInvalid()?yield this.createNewConnection():this.useOldConnection(),document.addEventListener("visibilitychange",()=>{!document.hidden&&socketStore.getSocket().getState()!==SocketState.OPEN&&socketStore.connectable&&this.useOldConnection()})),psLog.log("Plugins inited"),this.eventBus.dispatchEvent(new Event("core:inited")),er.autoRender&&this.render()})}updateConfiguration(){const{messageCapacity:er,offline:rr,useSecret:nr}=this.config.get();if(nr===!0){const ar=JSON.parse(sessionStorage.getItem(ROOM_SESSION_KEY));this.config.set("secret",(ar==null?void 0:ar.secret)||getAuthSecret())}socketStore.connectable=!0,socketStore.getPageSpyConfig=()=>this.config.get(),socketStore.getClient=()=>PageSpy.client,socketStore.isOffline=rr,socketStore.messageCapacity=er}cacheIsInvalid(){try{const er=sessionStorage.getItem(ROOM_SESSION_KEY);if(!er)return!0;const rr=JSON.parse(er);if(!rr.address)return!0;const nr=this.config.get();return["project","title","useSecret"].some(ar=>rr[ar]!==nr[ar])}catch(er){return!0}}createNewConnection(){return Dr(this,null,function*(){if(!this.request)return void psLog.error("Cannot get the Request");const er=yield this.request.createRoom();this.address=er.address,socketStore.init(er.roomUrl),sessionStorage.removeItem(ROOM_SESSION_KEY),this.refreshRoomInfo()})}useOldConnection(){var er;const rr=sessionStorage.getItem(ROOM_SESSION_KEY);if(!rr)throw new Error("The cache info is invalid when useOldConnection");const{address:nr}=JSON.parse(rr);this.address=nr,this.refreshRoomInfo();const ar=(er=this.request)===null||er===void 0?void 0:er.getRoomUrl(this.address);ar&&socketStore.init(ar)}refreshRoomInfo(){this.saveSession(),this.cacheTimer=setInterval(()=>{socketStore.getSocket().getState()===SocketState.OPEN&&this.saveSession()},15e3)}saveSession(){const{project:er,title:rr,useSecret:nr,secret:ar}=this.config.get(),sr=JSON.stringify({address:this.address,project:er,title:rr,useSecret:nr,secret:ar});sessionStorage.setItem(ROOM_SESSION_KEY,sr)}triggerPlugins(er){for(var rr=arguments.length,nr=new Array(rr>1?rr-1:0),ar=1;ar<rr;ar++)nr[ar-1]=arguments[ar];const{disabledPlugins:sr}=this.config.get();PageSpy.pluginsWithOrder.forEach(ir=>{var or;isArray$1(sr)&&sr.length&&sr.includes(ir.name)||(or=ir[er])===null||or===void 0||or.apply(ir,[br(ur({},nr[0]),{modal,toast:Toast}),nr.slice(1)])})}render(){if(document.querySelector("#".concat(nodeId)))psLog.warn("Cannot render the widget because it has been in the DOM");else if(document!==void 0)document.readyState==="loading"?window.addEventListener("DOMContentLoaded",this.render.bind(this)):this.startRender();else{let er;const rr=()=>{document&&document.readyState==="complete"?(er&&clearTimeout(er),this.startRender()):er=setTimeout(rr,1)};er=setTimeout(rr,1)}}startRender(){var er;const rr=this.config.get(),{project:nr,clientOrigin:ar,title:sr,logo:ir,useSecret:or,secret:cr,primaryColor:lr,modal:dr,offline:pr}=rr,hr=new DOMParser().parseFromString(`
|
|
445
|
+
<!-- PageSpy Root Container -->
|
|
446
|
+
<div id="`.concat(nodeId,`" style="--primary-color: hsl(270, 100%, 55%)">
|
|
447
|
+
<div class="page-spy-logo">
|
|
448
|
+
<img src="`).concat(ir,`" alt="Logo" />
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
<!-- Default content for modal -->
|
|
453
|
+
<div class="`).concat(classes.connectInfo,` page-spy-connect-info">
|
|
454
|
+
<p>
|
|
455
|
+
<span>Device ID</span>
|
|
456
|
+
<b style="font-family: 'Monaco'" class="page-spy-device-id">
|
|
457
|
+
`).concat(this.address.slice(0,4)||"--",`
|
|
458
|
+
</b>
|
|
459
|
+
</p>
|
|
460
|
+
`).concat(or&&cr?`
|
|
461
|
+
<p>
|
|
462
|
+
<span>Secret</span>
|
|
463
|
+
<b class="page-spy-secret">`.concat(cr,`</b>
|
|
464
|
+
</p>`):"",`
|
|
465
|
+
<p>
|
|
466
|
+
<span>Project</span>
|
|
467
|
+
<b class="page-spy-project">`).concat(nr,`</b>
|
|
468
|
+
</p>
|
|
469
|
+
<p>
|
|
470
|
+
<span>Title</span>
|
|
471
|
+
<b class="page-spy-title">`).concat(sr,`</b>
|
|
472
|
+
</p>
|
|
473
|
+
</div>
|
|
474
|
+
|
|
475
|
+
<!-- Default button for modal -->
|
|
476
|
+
<button class="page-spy-btn" data-primary id="page-spy-copy-link">
|
|
477
|
+
<img src="`).concat(img$1,`" alt="Copy" />
|
|
478
|
+
<span>`).concat(i18n.t("copyLink"),`</span>
|
|
479
|
+
</button>
|
|
480
|
+
`),"text/html"),fr=Pr=>hr.querySelector.call(hr,Pr),mr=fr("#".concat(nodeId));mr.style.setProperty("--primary-color",lr),(er=window.pageSpyStyles)===null||er===void 0||er.forEach(Pr=>{mr.appendChild(Pr.cloneNode(!0))}),this.root=mr;const gr=fr(".page-spy-logo");moveable(gr),gr.addEventListener("click",()=>{gr.isMoveEvent||modal.show()},!1),window.addEventListener("sdk-inactive",()=>{gr.classList.add("inactive")});const vr=(yr=classes.connectInfo,fr(".".concat(yr)));var yr;const Ir=fr("#page-spy-copy-link");Ir.addEventListener("click",()=>{let Pr="".concat(ar,"/#/devtools?address=").concat(encodeURIComponent(this.address));or&&(Pr+="&secret=".concat(cr));const Rr=copy$1(Pr)?i18n.t("copied"):i18n.t("copyFailed");modal.close(),Toast.message(Rr)}),pr&&(Ir.disabled=!0,Ir.title="In Offline Mode"),modal.build({logo:dr.logo||img$2,title:dr.title||"PageSpy",content:vr,footer:[Ir],mounted:mr}),document.documentElement.insertAdjacentElement("beforeend",mr),this.triggerPlugins("onMounted",{config:rr,root:mr,socketStore}),this.handleDeviceDPR(),psLog.log("Render success"),this.eventBus.dispatchEvent(new Event("core:rendered"))}handleDeviceDPR(){const er=window.devicePixelRatio||1,rr=document.querySelector('[name="viewport"]');if(rr){const nr=(rr.getAttribute("content")||"").match(/initial-scale=\d+(\.\d+)?/);(nr?parseFloat(nr[0].split("=")[1]):1)<1&&(this.root.style.fontSize="".concat(14*er,"px"))}}updateRoomInfo(er){if(!er)return;const{project:rr,title:nr}=er;if(rr){this.config.set("project",String(rr));const ar=document.querySelector(".page-spy-project");ar&&(ar.textContent=String(rr))}if(nr){this.config.set("title",String(nr));const ar=document.querySelector(".page-spy-title");ar&&(ar.textContent=String(nr))}socketStore.updateRoomInfo()}abort(){this.triggerPlugins("onReset"),PageSpy.instance=null,socketStore.close(),modal.reset();const er=document.querySelector("#".concat(nodeId));er&&document.documentElement.removeChild(er),this.eventBus.dispatchEvent(new Event("core:aborted"))}}_defineProperty(PageSpy,"instance",null),_defineProperty(PageSpy,"plugins",{pre:[],normal:[],post:[]}),_defineProperty(PageSpy,"client",new Client({ua:navigator.userAgent,sdk:"browser",sdkVersion:version}));const INTERNAL_PLUGINS=[new ConsolePlugin,new ErrorPlugin,new NetworkPlugin,new StoragePlugin,new DatabasePlugin,new PagePlugin,new SystemPlugin,new EventSourcePlugin,new WebSocketPlugin];INTERNAL_PLUGINS.forEach(tr=>{PageSpy.registerPlugin(tr)});function e$1(tr){var er=function(rr,nr){if(typeof rr!="object"||!rr)return rr;var ar=rr[Symbol.toPrimitive];if(ar!==void 0){var sr=ar.call(rr,nr);if(typeof sr!="object")return sr;throw new TypeError("@@toPrimitive must return a primitive value.")}return(nr==="string"?String:Number)(rr)}(tr,"string");return typeof er=="symbol"?er:er+""}function t$1(tr,er,rr){return(er=e$1(er))in tr?Object.defineProperty(tr,er,{value:rr,enumerable:!0,configurable:!0,writable:!0}):tr[er]=rr,tr}function n$1(){return typeof window=="object"&&typeof document=="object"&&Object.prototype.toString.call(document)==="[object HTMLDocument]"}function a$1(){return Math.random().toString(36).slice(2)}function r$1(tr){return Object.prototype.toString.call(tr)}function s$1(tr,er){return Object.prototype.hasOwnProperty.call(tr,er)}function i$1(tr){return typeof tr=="number"}function o$1(tr){return r$1(tr)==="[object BigInt]"}function c$1(tr){return tr instanceof Array}function d$1(tr){return typeof tr=="object"&&tr!==null}const l$1=["zh-CN","zh-HK","zh-TW","zh","zh-Hans-CN"],u$1=tr=>"".concat(tr),h$1=tr=>({ok:!0,value:tr});function p$1(tr){return tr===void 0?h$1(u$1(tr)):tr===null?h$1(tr):i$1(tr)&&(tr===-1/0||tr===1/0||Number.isNaN(tr))?h$1(u$1(tr)):o$1(tr)?h$1("".concat(tr,"n")):typeof tr=="symbol"||typeof tr=="function"?h$1(u$1(tr.toString())):tr instanceof Error?h$1(u$1(tr.stack)):tr===Object.prototype?{value:null,ok:!1}:tr instanceof Object||typeof tr=="object"?{value:tr,ok:!1}:h$1(tr)}function m$1(tr){return tr===void 0?"undefined":tr===null?"null":o$1(tr)?"bigint":tr instanceof Object?tr instanceof Error?"error":typeof tr=="function"?"function":"object":typeof tr}const f$1=ur({},console),g$1=["log","info","error","warn","debug"].reduce((tr,er)=>(tr[er]=function(){for(var rr=arguments.length,nr=new Array(rr),ar=0;ar<rr;ar++)nr[ar]=arguments[ar];console[er]("[PageSpy] [".concat(er.toLocaleUpperCase(),"] "),...nr)},tr.unproxy[er]=function(){for(var rr=arguments.length,nr=new Array(rr),ar=0;ar<rr;ar++)nr[ar]=arguments[ar];f$1[er]("[PageSpy] [".concat(er.toLocaleUpperCase(),"] "),...nr)},tr),{unproxy:{}}),v$1=tr=>tr.replace(/\/$/,"");var y$1=Uint8Array,b$1=Uint16Array,_$1=Int32Array,w$1=new y$1([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]),k$1=new y$1([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]),x$1=new y$1([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),T$1=function(tr,er){for(var rr=new b$1(31),nr=0;nr<31;++nr)rr[nr]=er+=1<<tr[nr-1];var ar=new _$1(rr[30]);for(nr=1;nr<30;++nr)for(var sr=rr[nr];sr<rr[nr+1];++sr)ar[sr]=sr-rr[nr]<<5|nr;return{b:rr,r:ar}},I$1=T$1(w$1,2),C$1=I$1.b,O$1=I$1.r;C$1[28]=258,O$1[258]=28;for(var S$1=T$1(k$1,0).r,E$1=new b$1(32768),P$1=0;P$1<32768;++P$1){var A$1=(43690&P$1)>>1|(21845&P$1)<<1;A$1=(61680&(A$1=(52428&A$1)>>2|(13107&A$1)<<2))>>4|(3855&A$1)<<4,E$1[P$1]=((65280&A$1)>>8|(255&A$1)<<8)>>1}var Z$1=function(tr,er,rr){for(var nr=tr.length,ar=0,sr=new b$1(er);ar<nr;++ar)tr[ar]&&++sr[tr[ar]-1];var ir,or=new b$1(er);for(ar=1;ar<er;++ar)or[ar]=or[ar-1]+sr[ar-1]<<1;for(ir=new b$1(nr),ar=0;ar<nr;++ar)tr[ar]&&(ir[ar]=E$1[or[tr[ar]-1]++]>>15-tr[ar]);return ir},N$1=new y$1(288);for(P$1=0;P$1<144;++P$1)N$1[P$1]=8;for(P$1=144;P$1<256;++P$1)N$1[P$1]=9;for(P$1=256;P$1<280;++P$1)N$1[P$1]=7;for(P$1=280;P$1<288;++P$1)N$1[P$1]=8;var j$1=new y$1(32);for(P$1=0;P$1<32;++P$1)j$1[P$1]=5;var D$1=Z$1(N$1,9),L$1=Z$1(j$1,5),R$1=function(tr){return(tr+7)/8|0},M$1=function(tr,er,rr){return(rr==null||rr>tr.length)&&(rr=tr.length),new y$1(tr.subarray(er,rr))},H$1=function(tr,er,rr){rr<<=7&er;var nr=er/8|0;tr[nr]|=rr,tr[nr+1]|=rr>>8},F$1=function(tr,er,rr){rr<<=7&er;var nr=er/8|0;tr[nr]|=rr,tr[nr+1]|=rr>>8,tr[nr+2]|=rr>>16},B$1=function(tr,er){for(var rr=[],nr=0;nr<tr.length;++nr)tr[nr]&&rr.push({s:nr,f:tr[nr]});var ar=rr.length,sr=rr.slice();if(!ar)return{t:J$1,l:0};if(ar==1){var ir=new y$1(rr[0].s+1);return ir[rr[0].s]=1,{t:ir,l:1}}rr.sort(function($r,_r){return $r.f-_r.f}),rr.push({s:-1,f:25001});var or=rr[0],cr=rr[1],lr=0,dr=1,pr=2;for(rr[0]={s:-1,f:or.f+cr.f,l:or,r:cr};dr!=ar-1;)or=rr[rr[lr].f<rr[pr].f?lr++:pr++],cr=rr[lr!=dr&&rr[lr].f<rr[pr].f?lr++:pr++],rr[dr++]={s:-1,f:or.f+cr.f,l:or,r:cr};var hr=sr[0].s;for(nr=1;nr<ar;++nr)sr[nr].s>hr&&(hr=sr[nr].s);var fr=new b$1(hr+1),mr=U$1(rr[dr-1],fr,0);if(mr>er){nr=0;var gr=0,vr=mr-er,yr=1<<vr;for(sr.sort(function($r,_r){return fr[_r.s]-fr[$r.s]||$r.f-_r.f});nr<ar;++nr){var Ir=sr[nr].s;if(!(fr[Ir]>er))break;gr+=yr-(1<<mr-fr[Ir]),fr[Ir]=er}for(gr>>=vr;gr>0;){var Pr=sr[nr].s;fr[Pr]<er?gr-=1<<er-fr[Pr]++-1:++nr}for(;nr>=0&&gr;--nr){var Rr=sr[nr].s;fr[Rr]==er&&(--fr[Rr],++gr)}mr=er}return{t:new y$1(fr),l:mr}},U$1=function(tr,er,rr){return tr.s==-1?Math.max(U$1(tr.l,er,rr+1),U$1(tr.r,er,rr+1)):er[tr.s]=rr},V$1=function(tr){for(var er=tr.length;er&&!tr[--er];);for(var rr=new b$1(++er),nr=0,ar=tr[0],sr=1,ir=function(cr){rr[nr++]=cr},or=1;or<=er;++or)if(tr[or]==ar&&or!=er)++sr;else{if(!ar&&sr>2){for(;sr>138;sr-=138)ir(32754);sr>2&&(ir(sr>10?sr-11<<5|28690:sr-3<<5|12305),sr=0)}else if(sr>3){for(ir(ar),--sr;sr>6;sr-=6)ir(8304);sr>2&&(ir(sr-3<<5|8208),sr=0)}for(;sr--;)ir(ar);sr=1,ar=tr[or]}return{c:rr.subarray(0,nr),n:er}},W$1=function(tr,er){for(var rr=0,nr=0;nr<er.length;++nr)rr+=tr[nr]*er[nr];return rr},$$1=function(tr,er,rr){var nr=rr.length,ar=R$1(er+2);tr[ar]=255&nr,tr[ar+1]=nr>>8,tr[ar+2]=255^tr[ar],tr[ar+3]=255^tr[ar+1];for(var sr=0;sr<nr;++sr)tr[ar+sr+4]=rr[sr];return 8*(ar+4+nr)},K$1=function(tr,er,rr,nr,ar,sr,ir,or,cr,lr,dr){H$1(er,dr++,rr),++ar[256];for(var pr=B$1(ar,15),hr=pr.t,fr=pr.l,mr=B$1(sr,15),gr=mr.t,vr=mr.l,yr=V$1(hr),Ir=yr.c,Pr=yr.n,Rr=V$1(gr),$r=Rr.c,_r=Rr.n,kr=new b$1(19),wr=0;wr<Ir.length;++wr)++kr[31&Ir[wr]];for(wr=0;wr<$r.length;++wr)++kr[31&$r[wr]];for(var Lr=B$1(kr,7),xr=Lr.t,Sr=Lr.l,Tr=19;Tr>4&&!xr[x$1[Tr-1]];--Tr);var Cr,Ar,Zr,Mr,jr=lr+5<<3,Fr=W$1(ar,N$1)+W$1(sr,j$1)+ir,Kr=W$1(ar,hr)+W$1(sr,gr)+ir+14+3*Tr+W$1(kr,xr)+2*kr[16]+3*kr[17]+7*kr[18];if(cr>=0&&jr<=Fr&&jr<=Kr)return $$1(er,dr,tr.subarray(cr,cr+lr));if(H$1(er,dr,1+(Kr<Fr)),dr+=2,Kr<Fr){Cr=Z$1(hr,fr),Ar=hr,Zr=Z$1(gr,vr),Mr=gr;var Xr=Z$1(xr,Sr);for(H$1(er,dr,Pr-257),H$1(er,dr+5,_r-1),H$1(er,dr+10,Tr-4),dr+=14,wr=0;wr<Tr;++wr)H$1(er,dr+3*wr,xr[x$1[wr]]);dr+=3*Tr;for(var Jr=[Ir,$r],Br=0;Br<2;++Br){var Hr=Jr[Br];for(wr=0;wr<Hr.length;++wr){var Nr=31&Hr[wr];H$1(er,dr,Xr[Nr]),dr+=xr[Nr],Nr>15&&(H$1(er,dr,Hr[wr]>>5&127),dr+=Hr[wr]>>12)}}}else Cr=D$1,Ar=N$1,Zr=L$1,Mr=j$1;for(wr=0;wr<or;++wr){var Or=nr[wr];if(Or>255){F$1(er,dr,Cr[(Nr=Or>>18&31)+257]),dr+=Ar[Nr+257],Nr>7&&(H$1(er,dr,Or>>23&31),dr+=w$1[Nr]);var zr=31⩔F$1(er,dr,Zr[zr]),dr+=Mr[zr],zr>3&&(F$1(er,dr,Or>>5&8191),dr+=k$1[zr])}else F$1(er,dr,Cr[Or]),dr+=Ar[Or]}return F$1(er,dr,Cr[256]),dr+Ar[256]},G$1=new _$1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),J$1=new y$1(0),X$1=function(){var tr=1,er=0;return{p:function(rr){for(var nr=tr,ar=er,sr=0|rr.length,ir=0;ir!=sr;){for(var or=Math.min(ir+2655,sr);ir<or;++ir)ar+=nr+=rr[ir];nr=(65535&nr)+15*(nr>>16),ar=(65535&ar)+15*(ar>>16)}tr=nr,er=ar},d:function(){return(255&(tr%=65521))<<24|(65280&tr)<<8|(255&(er%=65521))<<8|er>>8}}},Y$1=function(tr,er,rr,nr,ar){if(!ar&&(ar={l:1},er.dictionary)){var sr=er.dictionary.subarray(-32768),ir=new y$1(sr.length+tr.length);ir.set(sr),ir.set(tr,sr.length),tr=ir,ar.w=sr.length}return function(or,cr,lr,dr,pr,hr){var fr=hr.z||or.length,mr=new y$1(dr+fr+5*(1+Math.ceil(fr/7e3))+pr),gr=mr.subarray(dr,mr.length-pr),vr=hr.l,yr=7&(hr.r||0);if(cr){yr&&(gr[0]=hr.r>>3);for(var Ir=G$1[cr-1],Pr=Ir>>13,Rr=8191&Ir,$r=(1<<lr)-1,_r=hr.p||new b$1(32768),kr=hr.h||new b$1($r+1),wr=Math.ceil(lr/3),Lr=2*wr,xr=function($a){return(or[$a]^or[$a+1]<<wr^or[$a+2]<<Lr)&$r},Sr=new _$1(25e3),Tr=new b$1(288),Cr=new b$1(32),Ar=0,Zr=0,Mr=hr.i||0,jr=0,Fr=hr.w||0,Kr=0;Mr+2<fr;++Mr){var Xr=xr(Mr),Jr=32767&Mr,Br=kr[Xr];if(_r[Jr]=Br,kr[Xr]=Jr,Fr<=Mr){var Hr=fr-Mr;if((Ar>7e3||jr>24576)&&(Hr>423||!vr)){yr=K$1(or,gr,0,Sr,Tr,Cr,Zr,jr,Kr,Mr-Kr,yr),jr=Ar=Zr=0,Kr=Mr;for(var Nr=0;Nr<286;++Nr)Tr[Nr]=0;for(Nr=0;Nr<30;++Nr)Cr[Nr]=0}var Or=2,zr=0,Aa=Rr,Vr=Jr-Br&32767;if(Hr>2&&Xr==xr(Mr-Vr))for(var Qr=Math.min(Pr,Hr)-1,Ur=Math.min(32767,Mr),Er=Math.min(258,Hr);Vr<=Ur&&--Aa&&Jr!=Br;){if(or[Mr+Or]==or[Mr+Or-Vr]){for(var qr=0;qr<Er&&or[Mr+qr]==or[Mr+qr-Vr];++qr);if(qr>Or){if(Or=qr,zr=Vr,qr>Qr)break;var Gr=Math.min(Vr,qr-2),Yr=0;for(Nr=0;Nr<Gr;++Nr){var Wr=Mr-Vr+Nr&32767,Pa=Wr-_r[Wr]&32767;Pa>Yr&&(Yr=Pa,Br=Wr)}}}Vr+=(Jr=Br)-(Br=_r[Jr])&32767}if(zr){Sr[jr++]=268435456|O$1[Or]<<18|S$1[zr];var Na=31&O$1[Or],Ma=31&S$1[zr];Zr+=w$1[Na]+k$1[Ma],++Tr[257+Na],++Cr[Ma],Fr=Mr+Or,++Ar}else Sr[jr++]=or[Mr],++Tr[or[Mr]]}}for(Mr=Math.max(Mr,Fr);Mr<fr;++Mr)Sr[jr++]=or[Mr],++Tr[or[Mr]];yr=K$1(or,gr,vr,Sr,Tr,Cr,Zr,jr,Kr,Mr-Kr,yr),vr||(hr.r=7&yr|gr[yr/8|0]<<3,yr-=7,hr.h=kr,hr.p=_r,hr.i=Mr,hr.w=Fr)}else{for(Mr=hr.w||0;Mr<fr+vr;Mr+=65535){var Za=Mr+65535;Za>=fr&&(gr[yr/8|0]=vr,Za=fr),yr=$$1(gr,yr+1,or.subarray(Mr,Za))}hr.i=fr}return M$1(mr,0,dr+R$1(yr)+pr)}(tr,er.level==null?6:er.level,er.mem==null?ar.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(tr.length)))):20:12+er.mem,rr,nr,ar)},Q$1=function(tr,er,rr){for(;rr;++er)tr[er]=rr,rr>>>=8};function ee$1(tr,er){er||(er={});var rr=X$1();rr.p(tr);var nr=Y$1(tr,er,er.dictionary?6:2,4);return function(ar,sr){var ir=sr.level,or=ir==0?0:ir<6?1:ir==9?3:2;if(ar[0]=120,ar[1]=or<<6|(sr.dictionary&&32),ar[1]|=31-(ar[0]<<8|ar[1])%31,sr.dictionary){var cr=X$1();cr.p(sr.dictionary),Q$1(ar,2,cr.d())}}(nr,er),Q$1(nr,nr.length-4,rr.d()),nr}var te$1=typeof TextEncoder!="undefined"&&new TextEncoder,ne$1=typeof TextDecoder!="undefined"&&new TextDecoder;try{ne$1.decode(J$1,{stream:!0})}catch(tr){}function ae$1(tr,er){{for(var rr="",nr=0;nr<tr.length;nr+=16384)rr+=String.fromCharCode.apply(null,tr.subarray(nr,nr+16384));return rr}}const re$1=()=>{if(n$1()){var tr,er;const nr=sessionStorage.getItem("page-spy-room");var rr;return nr?((rr=JSON.parse(nr))===null||rr===void 0?void 0:rr.address)||"--":((tr=window.$pageSpy)===null||tr===void 0?void 0:tr.address)||((er=window.PageSpy)===null||er===void 0||(er=er.instance)===null||er===void 0?void 0:er.address)||"--"}return"--"},se$1=tr=>tr.toString().replace(/[^\w]/g,"_"),ie$1=tr=>ae$1(ee$1(function(er,rr){var nr;if(te$1)return te$1.encode(er);var ar=er.length,sr=new y$1(er.length+(er.length>>1)),ir=0,or=function(dr){sr[ir++]=dr};for(nr=0;nr<ar;++nr){if(ir+5>sr.length){var cr=new y$1(ir+8+(ar-nr<<1));cr.set(sr),sr=cr}var lr=er.charCodeAt(nr);lr<128||rr?or(lr):lr<2048?(or(192|lr>>6),or(128|63&lr)):lr>55295&&lr<57344?(or(240|(lr=65536+(1047552&lr)|1023&er.charCodeAt(++nr))>>18),or(128|lr>>12&63),or(128|lr>>6&63),or(128|63&lr)):(or(224|lr>>12),or(128|lr>>6&63),or(128|63&lr))}return M$1(sr,0,ir)}(JSON.stringify(tr)),{level:9}));function oe$1(tr){return tr>=10?tr.toString():"0".concat(tr)}function ce$1(tr){const er=Math.floor(tr/3600),rr=Math.floor((tr-3600*er)/60),nr=Math.floor(tr-3600*er-60*rr),ar=oe$1(er),sr=oe$1(rr),ir=oe$1(nr);return er===0?"".concat(sr,":").concat(ir):"".concat(ar,":").concat(sr,":").concat(ir)}const de$1="message",le$1="broadcast",ue$1="ping",he$1="updateRoomInfo";var pe$1,me$1=Object.freeze({__proto__:null,BROADCAST:le$1,CLOSE:"close",CONNECT:"connect",ERROR:"error",JOIN:"join",LEAVE:"leave",MESSAGE:de$1,PING:ue$1,PONG:"pong",UPDATE_ROOM_INFO:he$1});function fe$1(tr,er){return{role:"client",type:tr,data:ur(ur({},(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])&&{id:a$1()}),er)}}let ge$1=class{constructor(er){t$1(this,"id",""),t$1(this,"method",""),t$1(this,"url",""),t$1(this,"requestType","xhr"),t$1(this,"requestHeader",null),t$1(this,"status",0),t$1(this,"statusText",""),t$1(this,"readyState",0),t$1(this,"response",void 0),t$1(this,"responseReason",null),t$1(this,"responseType",""),t$1(this,"responseHeader",null),t$1(this,"startTime",0),t$1(this,"endTime",0),t$1(this,"costTime",0),t$1(this,"postData",null),t$1(this,"requestPayload",null),t$1(this,"withCredentials",!1),t$1(this,"lastEventId",""),this.id=er}};(function(tr){tr[tr.UNSENT=0]="UNSENT",tr[tr.OPENED=1]="OPENED",tr[tr.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",tr[tr.LOADING=3]="LOADING",tr[tr.DONE=4]="DONE"})(pe$1||(pe$1={}));let ve$1=class qa{constructor(er){t$1(this,"socketStore",void 0),t$1(this,"reqMap",Object.create(null)),this.socketStore=er}getRequestMap(){return this.reqMap}getRequest(er){return this.reqMap[er]}removeRequest(er){delete this.reqMap[er]}createRequest(er){return er?this.reqMap[er]?(g$1.warn("The request object has been in store, disallow duplicate create"),!1):(this.reqMap[er]=new ge$1(er),!0):(g$1.warn('The "id" is required when init request object'),!1)}setRequest(er,rr){return!(!er||!rr)&&(this.reqMap[er]=rr,!0)}sendRequestItem(er,rr){var nr;if(((nr=qa.dataProcessor)===null||nr===void 0?void 0:nr.call(qa,rr))!==!1)try{this.reqMap[er]||(this.reqMap[er]=rr);const ar=fe$1("network",ur({},rr),!1);this.socketStore.dispatchEvent("public-data",ar),this.socketStore.broadcastMessage(ar,rr.readyState!==pe$1.DONE),this.deferDeleteRequest(er)}catch(ar){g$1.error(ar.message)}}deferDeleteRequest(er){const rr=this.getRequest(er);rr&&rr.readyState===pe$1.DONE&&setTimeout(()=>{delete this.reqMap[er]},3e3)}};t$1(ve$1,"dataProcessor",void 0);let ye$1=class Ha{constructor(){t$1(this,"store",{}),t$1(this,"instanceStore",{})}getStore(){return this.store}resetStore(){this.store={}}getInstanceStore(){return this.instanceStore}resetInstanceStore(){this.instanceStore={}}transformToAtom(er){let rr=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const{value:nr,ok:ar}=p$1(er),sr=a$1();if(ar)return{id:sr,type:m$1(er),value:nr};if(rr)try{return{id:sr,type:"json",value:JSON.stringify(er)}}catch(ir){return{id:sr,type:"json",value:null}}return this.add(er)}get(er){const rr=this.store[er],nr=this.instanceStore[er];if(!rr)return null;const ar={},sr=Object.getOwnPropertyDescriptors(rr);Object.keys(sr).forEach(or=>{const cr=sr[or];s$1(cr,"value")&&(cr.value=this.transformToAtom(cr.value)),ar[or]=Ha.getAtomOverview({atomId:a$1(),instanceId:nr,value:cr})});const ir=this.addExtraProperty(er);return ur(ur({},ar),ir)}getOrigin(er){return this.store[er]||null}add(er){let rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const nr=a$1();let ar=nr;var sr;d$1(sr=er)&&s$1(sr,"constructor")&&typeof sr.constructor=="function"&&(ar=rr),this.store[nr]=er,this.instanceStore[nr]=ar;const ir=Ha.getSemanticValue(er);return Ha.getAtomOverview({atomId:nr,value:ir,instanceId:ar})}static getAtomOverview(er){let{instanceId:rr="",atomId:nr,value:ar}=er;return{id:a$1(),type:"atom",__atomId:nr,instanceId:rr,value:ar}}static getSemanticValue(er){if(d$1(rr=er)&&r$1(rr)==="[object Object]")return"Object {...}";var rr;return c$1(er)?"Array (".concat(er.length,")"):er.constructor.name}addExtraProperty(er){const rr=this.store[er],nr=this.instanceStore[er],ar={};if((rr instanceof String||rr instanceof Number||rr instanceof Boolean)&&(ar["[[PrimitiveValue]]"]=this.transformToAtom(rr.valueOf())),rr instanceof Set){const ir={};let or=0;for(const cr of rr)ir[or++]=cr;ir.size=rr.size,ar["[[Entries]]"]=this.transformToAtom(ir)}if(rr instanceof Map){const ir={};let or=0;for(const[cr,lr]of rr.entries())ir[or++]={key:cr,value:lr};ir.size=rr.size,ar["[[Entries]]"]=this.transformToAtom(ir)}var sr;return(c$1(rr)||(sr=rr,typeof NodeList=="function"&&NodeList.name==="NodeList"&&sr instanceof NodeList||typeof HTMLCollection=="function"&&HTMLCollection.name==="HTMLCollection"&&sr instanceof HTMLCollection))&&(ar.length=this.transformToAtom(rr.length)),Object.getPrototypeOf(rr)!==null?ar["[[Prototype]]"]=this.add(Object.getPrototypeOf(rr),nr):ar.___proto___=this.transformToAtom(null),ar}};const be$1=new ye$1;var _e$1,we$1;(function(tr){tr.assertEqual=er=>er,tr.assertIs=function(er){},tr.assertNever=function(er){throw new Error},tr.arrayToEnum=er=>{const rr={};for(const nr of er)rr[nr]=nr;return rr},tr.getValidEnumValues=er=>{const rr=tr.objectKeys(er).filter(ar=>typeof er[er[ar]]!="number"),nr={};for(const ar of rr)nr[ar]=er[ar];return tr.objectValues(nr)},tr.objectValues=er=>tr.objectKeys(er).map(function(rr){return er[rr]}),tr.objectKeys=typeof Object.keys=="function"?er=>Object.keys(er):er=>{const rr=[];for(const nr in er)Object.prototype.hasOwnProperty.call(er,nr)&&rr.push(nr);return rr},tr.find=(er,rr)=>{for(const nr of er)if(rr(nr))return nr},tr.isInteger=typeof Number.isInteger=="function"?er=>Number.isInteger(er):er=>typeof er=="number"&&isFinite(er)&&Math.floor(er)===er,tr.joinValues=function(er){let rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" | ";return er.map(nr=>typeof nr=="string"?"'".concat(nr,"'"):nr).join(rr)},tr.jsonStringifyReplacer=(er,rr)=>typeof rr=="bigint"?rr.toString():rr})(_e$1||(_e$1={})),function(tr){tr.mergeShapes=(er,rr)=>ur(ur({},er),rr)}(we$1||(we$1={}));const ke$1=_e$1.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xe$1=tr=>{switch(typeof tr){case"undefined":return ke$1.undefined;case"string":return ke$1.string;case"number":return isNaN(tr)?ke$1.nan:ke$1.number;case"boolean":return ke$1.boolean;case"function":return ke$1.function;case"bigint":return ke$1.bigint;case"symbol":return ke$1.symbol;case"object":return Array.isArray(tr)?ke$1.array:tr===null?ke$1.null:tr.then&&typeof tr.then=="function"&&tr.catch&&typeof tr.catch=="function"?ke$1.promise:typeof Map!="undefined"&&tr instanceof Map?ke$1.map:typeof Set!="undefined"&&tr instanceof Set?ke$1.set:typeof Date!="undefined"&&tr instanceof Date?ke$1.date:ke$1.object;default:return ke$1.unknown}},Te$1=_e$1.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"]);let Ie$1=class ro extends Error{get errors(){return this.issues}constructor(er){var rr;super(),rr=this,this.issues=[],this.addIssue=ar=>{this.issues=[...this.issues,ar]},this.addIssues=function(){let ar=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];rr.issues=[...rr.issues,...ar]};const nr=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,nr):this.__proto__=nr,this.name="ZodError",this.issues=er}format(er){const rr=er||function(sr){return sr.message},nr={_errors:[]},ar=sr=>{for(const ir of sr.issues)if(ir.code==="invalid_union")ir.unionErrors.map(ar);else if(ir.code==="invalid_return_type")ar(ir.returnTypeError);else if(ir.code==="invalid_arguments")ar(ir.argumentsError);else if(ir.path.length===0)nr._errors.push(rr(ir));else{let or=nr,cr=0;for(;cr<ir.path.length;){const lr=ir.path[cr];cr===ir.path.length-1?(or[lr]=or[lr]||{_errors:[]},or[lr]._errors.push(rr(ir))):or[lr]=or[lr]||{_errors:[]},or=or[lr],cr++}}};return ar(this),nr}static assert(er){if(!(er instanceof ro))throw new Error("Not a ZodError: ".concat(er))}toString(){return this.message}get message(){return JSON.stringify(this.issues,_e$1.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(){let er=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ar=>ar.message;const rr={},nr=[];for(const ar of this.issues)ar.path.length>0?(rr[ar.path[0]]=rr[ar.path[0]]||[],rr[ar.path[0]].push(er(ar))):nr.push(er(ar));return{formErrors:nr,fieldErrors:rr}}get formErrors(){return this.flatten()}};Ie$1.create=tr=>new Ie$1(tr);const Ce$1=(tr,er)=>{let rr;switch(tr.code){case Te$1.invalid_type:rr=tr.received===ke$1.undefined?"Required":"Expected ".concat(tr.expected,", received ").concat(tr.received);break;case Te$1.invalid_literal:rr="Invalid literal value, expected ".concat(JSON.stringify(tr.expected,_e$1.jsonStringifyReplacer));break;case Te$1.unrecognized_keys:rr="Unrecognized key(s) in object: ".concat(_e$1.joinValues(tr.keys,", "));break;case Te$1.invalid_union:rr="Invalid input";break;case Te$1.invalid_union_discriminator:rr="Invalid discriminator value. Expected ".concat(_e$1.joinValues(tr.options));break;case Te$1.invalid_enum_value:rr="Invalid enum value. Expected ".concat(_e$1.joinValues(tr.options),", received '").concat(tr.received,"'");break;case Te$1.invalid_arguments:rr="Invalid function arguments";break;case Te$1.invalid_return_type:rr="Invalid function return type";break;case Te$1.invalid_date:rr="Invalid date";break;case Te$1.invalid_string:typeof tr.validation=="object"?"includes"in tr.validation?(rr='Invalid input: must include "'.concat(tr.validation.includes,'"'),typeof tr.validation.position=="number"&&(rr="".concat(rr," at one or more positions greater than or equal to ").concat(tr.validation.position))):"startsWith"in tr.validation?rr='Invalid input: must start with "'.concat(tr.validation.startsWith,'"'):"endsWith"in tr.validation?rr='Invalid input: must end with "'.concat(tr.validation.endsWith,'"'):_e$1.assertNever(tr.validation):rr=tr.validation!=="regex"?"Invalid ".concat(tr.validation):"Invalid";break;case Te$1.too_small:rr=tr.type==="array"?"Array must contain ".concat(tr.exact?"exactly":tr.inclusive?"at least":"more than"," ").concat(tr.minimum," element(s)"):tr.type==="string"?"String must contain ".concat(tr.exact?"exactly":tr.inclusive?"at least":"over"," ").concat(tr.minimum," character(s)"):tr.type==="number"?"Number must be ".concat(tr.exact?"exactly equal to ":tr.inclusive?"greater than or equal to ":"greater than ").concat(tr.minimum):tr.type==="date"?"Date must be ".concat(tr.exact?"exactly equal to ":tr.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(tr.minimum))):"Invalid input";break;case Te$1.too_big:rr=tr.type==="array"?"Array must contain ".concat(tr.exact?"exactly":tr.inclusive?"at most":"less than"," ").concat(tr.maximum," element(s)"):tr.type==="string"?"String must contain ".concat(tr.exact?"exactly":tr.inclusive?"at most":"under"," ").concat(tr.maximum," character(s)"):tr.type==="number"?"Number must be ".concat(tr.exact?"exactly":tr.inclusive?"less than or equal to":"less than"," ").concat(tr.maximum):tr.type==="bigint"?"BigInt must be ".concat(tr.exact?"exactly":tr.inclusive?"less than or equal to":"less than"," ").concat(tr.maximum):tr.type==="date"?"Date must be ".concat(tr.exact?"exactly":tr.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(tr.maximum))):"Invalid input";break;case Te$1.custom:rr="Invalid input";break;case Te$1.invalid_intersection_types:rr="Intersection results could not be merged";break;case Te$1.not_multiple_of:rr="Number must be a multiple of ".concat(tr.multipleOf);break;case Te$1.not_finite:rr="Number must be finite";break;default:rr=er.defaultError,_e$1.assertNever(tr)}return{message:rr}};let Oe$1=Ce$1;function Se$1(){return Oe$1}const Ee$1=tr=>{const{data:er,path:rr,errorMaps:nr,issueData:ar}=tr,sr=[...rr,...ar.path||[]],ir=br(ur({},ar),{path:sr});if(ar.message!==void 0)return br(ur({},ar),{path:sr,message:ar.message});let or="";const cr=nr.filter(lr=>!!lr).slice().reverse();for(const lr of cr)or=lr(ir,{data:er,defaultError:or}).message;return br(ur({},ar),{path:sr,message:or})};function Pe$1(tr,er){const rr=Se$1(),nr=Ee$1({issueData:er,data:tr.data,path:tr.path,errorMaps:[tr.common.contextualErrorMap,tr.schemaErrorMap,rr,rr===Ce$1?void 0:Ce$1].filter(ar=>!!ar)});tr.common.issues.push(nr)}let Ae$1=class no{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(er,rr){const nr=[];for(const ar of rr){if(ar.status==="aborted")return Ze$1;ar.status==="dirty"&&er.dirty(),nr.push(ar.value)}return{status:er.value,value:nr}}static mergeObjectAsync(er,rr){return Dr(this,null,function*(){const nr=[];for(const ar of rr){const sr=yield ar.key,ir=yield ar.value;nr.push({key:sr,value:ir})}return no.mergeObjectSync(er,nr)})}static mergeObjectSync(er,rr){const nr={};for(const ar of rr){const{key:sr,value:ir}=ar;if(sr.status==="aborted"||ir.status==="aborted")return Ze$1;sr.status==="dirty"&&er.dirty(),ir.status==="dirty"&&er.dirty(),sr.value==="__proto__"||ir.value===void 0&&!ar.alwaysSet||(nr[sr.value]=ir.value)}return{status:er.value,value:nr}}};const Ze$1=Object.freeze({status:"aborted"}),Ne$1=tr=>({status:"dirty",value:tr}),je$1=tr=>({status:"valid",value:tr}),De$1=tr=>tr.status==="aborted",Le$1=tr=>tr.status==="dirty",Re$1=tr=>tr.status==="valid",Me$1=tr=>typeof Promise!="undefined"&&tr instanceof Promise;function ze$1(tr,er,rr,nr){if(typeof er=="function"?tr!==er||!0:!er.has(tr))throw new TypeError("Cannot read private member from an object whose class did not declare it");return er.get(tr)}function qe$1(tr,er,rr,nr,ar){if(typeof er=="function"?tr!==er||!0:!er.has(tr))throw new TypeError("Cannot write private member to an object whose class did not declare it");return er.set(tr,rr),rr}var He$1,Fe$1,Be$1;typeof SuppressedError=="function"&&SuppressedError,function(tr){tr.errToObj=er=>typeof er=="string"?{message:er}:er||{},tr.toString=er=>typeof er=="string"?er:er==null?void 0:er.message}(He$1||(He$1={}));let Ue$1=class{constructor(er,rr,nr,ar){this._cachedPath=[],this.parent=er,this.data=rr,this._path=nr,this._key=ar}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 Ve$1=(tr,er)=>{if(Re$1(er))return{success:!0,data:er.value};if(!tr.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const rr=new Ie$1(tr.common.issues);return this._error=rr,this._error}}};function We$1(tr){if(!tr)return{};const{errorMap:er,invalid_type_error:rr,required_error:nr,description:ar}=tr;if(er&&(rr||nr))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return er?{errorMap:er,description:ar}:{errorMap:(sr,ir)=>{var or,cr;const{message:lr}=tr;return sr.code==="invalid_enum_value"?{message:lr!=null?lr:ir.defaultError}:ir.data===void 0?{message:(or=lr!=null?lr:nr)!==null&&or!==void 0?or:ir.defaultError}:sr.code!=="invalid_type"?{message:ir.defaultError}:{message:(cr=lr!=null?lr:rr)!==null&&cr!==void 0?cr:ir.defaultError}},description:ar}}let $e$1=class{get description(){return this._def.description}_getType(er){return xe$1(er.data)}_getOrReturnCtx(er,rr){return rr||{common:er.parent.common,data:er.data,parsedType:xe$1(er.data),schemaErrorMap:this._def.errorMap,path:er.path,parent:er.parent}}_processInputParams(er){return{status:new Ae$1,ctx:{common:er.parent.common,data:er.data,parsedType:xe$1(er.data),schemaErrorMap:this._def.errorMap,path:er.path,parent:er.parent}}}_parseSync(er){const rr=this._parse(er);if(Me$1(rr))throw new Error("Synchronous parse encountered promise.");return rr}_parseAsync(er){const rr=this._parse(er);return Promise.resolve(rr)}parse(er,rr){const nr=this.safeParse(er,rr);if(nr.success)return nr.data;throw nr.error}safeParse(er,rr){var nr;const ar={common:{issues:[],async:(nr=rr==null?void 0:rr.async)!==null&&nr!==void 0&&nr,contextualErrorMap:rr==null?void 0:rr.errorMap},path:(rr==null?void 0:rr.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:er,parsedType:xe$1(er)},sr=this._parseSync({data:er,path:ar.path,parent:ar});return Ve$1(ar,sr)}"~validate"(er){var rr,nr;const ar={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:er,parsedType:xe$1(er)};if(!this["~standard"].async)try{const sr=this._parseSync({data:er,path:[],parent:ar});return Re$1(sr)?{value:sr.value}:{issues:ar.common.issues}}catch(sr){!((nr=(rr=sr==null?void 0:sr.message)===null||rr===void 0?void 0:rr.toLowerCase())===null||nr===void 0)&&nr.includes("encountered")&&(this["~standard"].async=!0),ar.common={issues:[],async:!0}}return this._parseAsync({data:er,path:[],parent:ar}).then(sr=>Re$1(sr)?{value:sr.value}:{issues:ar.common.issues})}parseAsync(er,rr){return Dr(this,null,function*(){const nr=yield this.safeParseAsync(er,rr);if(nr.success)return nr.data;throw nr.error})}safeParseAsync(er,rr){return Dr(this,null,function*(){const nr={common:{issues:[],contextualErrorMap:rr==null?void 0:rr.errorMap,async:!0},path:(rr==null?void 0:rr.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:er,parsedType:xe$1(er)},ar=this._parse({data:er,path:nr.path,parent:nr}),sr=yield Me$1(ar)?ar:Promise.resolve(ar);return Ve$1(nr,sr)})}refine(er,rr){const nr=ar=>typeof rr=="string"||rr===void 0?{message:rr}:typeof rr=="function"?rr(ar):rr;return this._refinement((ar,sr)=>{const ir=er(ar),or=()=>sr.addIssue(ur({code:Te$1.custom},nr(ar)));return typeof Promise!="undefined"&&ir instanceof Promise?ir.then(cr=>!!cr||(or(),!1)):!!ir||(or(),!1)})}refinement(er,rr){return this._refinement((nr,ar)=>!!er(nr)||(ar.addIssue(typeof rr=="function"?rr(nr,ar):rr),!1))}_refinement(er){return new $t({schema:this,typeName:on.ZodEffects,effect:{type:"refinement",refinement:er}})}superRefine(er){return this._refinement(er)}constructor(er){this.spa=this.safeParseAsync,this._def=er,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:rr=>this["~validate"](rr)}}optional(){return Kt.create(this,this._def)}nullable(){return Gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return St.create(this)}promise(){return Wt.create(this,this._def)}or(er){return At.create([this,er],this._def)}and(er){return Dt.create(this,er,this._def)}transform(er){return new $t(br(ur({},We$1(this._def)),{schema:this,typeName:on.ZodEffects,effect:{type:"transform",transform:er}}))}default(er){const rr=typeof er=="function"?er:()=>er;return new Jt(br(ur({},We$1(this._def)),{innerType:this,defaultValue:rr,typeName:on.ZodDefault}))}brand(){return new en(ur({typeName:on.ZodBranded,type:this},We$1(this._def)))}catch(er){const rr=typeof er=="function"?er:()=>er;return new Xt(br(ur({},We$1(this._def)),{innerType:this,catchValue:rr,typeName:on.ZodCatch}))}describe(er){return new this.constructor(br(ur({},this._def),{description:er}))}pipe(er){return tn.create(this,er)}readonly(){return nn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const Ke$1=/^c[^\s-]{8,}$/i,Ge$1=/^[0-9a-z]+$/,Je$1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xe$1=/^[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,Ye$1=/^[a-z0-9_-]{21}$/i,Qe$1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,et$1=/^[-+]?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)?)??$/,tt$1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let nt$1;const at=/^(?:(?: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])$/,rt=/^(?:(?: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])$/,st=/^(([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]))$/,it=/^(([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])$/,ot=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ct=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dt="((\\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])))",lt=new RegExp("^".concat(dt,"$"));function ut(tr){let er="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return tr.precision?er="".concat(er,"\\.\\d{").concat(tr.precision,"}"):tr.precision==null&&(er="".concat(er,"(\\.\\d+)?")),er}function ht(tr){let er="".concat(dt,"T").concat(ut(tr));const rr=[];return rr.push(tr.local?"Z?":"Z"),tr.offset&&rr.push("([+-]\\d{2}:?\\d{2})"),er="".concat(er,"(").concat(rr.join("|"),")"),new RegExp("^".concat(er,"$"))}function pt(tr,er){if(!Qe$1.test(tr))return!1;try{const[rr]=tr.split("."),nr=rr.replace(/-/g,"+").replace(/_/g,"/").padEnd(rr.length+(4-rr.length%4)%4,"="),ar=JSON.parse(atob(nr));return typeof ar=="object"&&ar!==null&&!(!ar.typ||!ar.alg)&&(!er||ar.alg===er)}catch(rr){return!1}}function mt(tr,er){return!(er!=="v4"&&er||!rt.test(tr))||!(er!=="v6"&&er||!it.test(tr))}class ft extends $e$1{_parse(er){if(this._def.coerce&&(er.data=String(er.data)),this._getType(er)!==ke$1.string){const ir=this._getOrReturnCtx(er);return Pe$1(ir,{code:Te$1.invalid_type,expected:ke$1.string,received:ir.parsedType}),Ze$1}const rr=new Ae$1;let nr;for(const ir of this._def.checks)if(ir.kind==="min")er.data.length<ir.value&&(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.too_small,minimum:ir.value,type:"string",inclusive:!0,exact:!1,message:ir.message}),rr.dirty());else if(ir.kind==="max")er.data.length>ir.value&&(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.too_big,maximum:ir.value,type:"string",inclusive:!0,exact:!1,message:ir.message}),rr.dirty());else if(ir.kind==="length"){const or=er.data.length>ir.value,cr=er.data.length<ir.value;(or||cr)&&(nr=this._getOrReturnCtx(er,nr),or?Pe$1(nr,{code:Te$1.too_big,maximum:ir.value,type:"string",inclusive:!0,exact:!0,message:ir.message}):cr&&Pe$1(nr,{code:Te$1.too_small,minimum:ir.value,type:"string",inclusive:!0,exact:!0,message:ir.message}),rr.dirty())}else if(ir.kind==="email")tt$1.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"email",code:Te$1.invalid_string,message:ir.message}),rr.dirty());else if(ir.kind==="emoji")nt$1||(nt$1=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),nt$1.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"emoji",code:Te$1.invalid_string,message:ir.message}),rr.dirty());else if(ir.kind==="uuid")Xe$1.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"uuid",code:Te$1.invalid_string,message:ir.message}),rr.dirty());else if(ir.kind==="nanoid")Ye$1.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"nanoid",code:Te$1.invalid_string,message:ir.message}),rr.dirty());else if(ir.kind==="cuid")Ke$1.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"cuid",code:Te$1.invalid_string,message:ir.message}),rr.dirty());else if(ir.kind==="cuid2")Ge$1.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"cuid2",code:Te$1.invalid_string,message:ir.message}),rr.dirty());else if(ir.kind==="ulid")Je$1.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"ulid",code:Te$1.invalid_string,message:ir.message}),rr.dirty());else if(ir.kind==="url")try{new URL(er.data)}catch(or){nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"url",code:Te$1.invalid_string,message:ir.message}),rr.dirty()}else ir.kind==="regex"?(ir.regex.lastIndex=0,ir.regex.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"regex",code:Te$1.invalid_string,message:ir.message}),rr.dirty())):ir.kind==="trim"?er.data=er.data.trim():ir.kind==="includes"?er.data.includes(ir.value,ir.position)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.invalid_string,validation:{includes:ir.value,position:ir.position},message:ir.message}),rr.dirty()):ir.kind==="toLowerCase"?er.data=er.data.toLowerCase():ir.kind==="toUpperCase"?er.data=er.data.toUpperCase():ir.kind==="startsWith"?er.data.startsWith(ir.value)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.invalid_string,validation:{startsWith:ir.value},message:ir.message}),rr.dirty()):ir.kind==="endsWith"?er.data.endsWith(ir.value)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.invalid_string,validation:{endsWith:ir.value},message:ir.message}),rr.dirty()):ir.kind==="datetime"?ht(ir).test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.invalid_string,validation:"datetime",message:ir.message}),rr.dirty()):ir.kind==="date"?lt.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.invalid_string,validation:"date",message:ir.message}),rr.dirty()):ir.kind==="time"?new RegExp("^".concat(ut(ir),"$")).test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.invalid_string,validation:"time",message:ir.message}),rr.dirty()):ir.kind==="duration"?et$1.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"duration",code:Te$1.invalid_string,message:ir.message}),rr.dirty()):ir.kind==="ip"?(ar=er.data,((sr=ir.version)!=="v4"&&sr||!at.test(ar))&&(sr!=="v6"&&sr||!st.test(ar))&&(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"ip",code:Te$1.invalid_string,message:ir.message}),rr.dirty())):ir.kind==="jwt"?pt(er.data,ir.alg)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"jwt",code:Te$1.invalid_string,message:ir.message}),rr.dirty()):ir.kind==="cidr"?mt(er.data,ir.version)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"cidr",code:Te$1.invalid_string,message:ir.message}),rr.dirty()):ir.kind==="base64"?ot.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"base64",code:Te$1.invalid_string,message:ir.message}),rr.dirty()):ir.kind==="base64url"?ct.test(er.data)||(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{validation:"base64url",code:Te$1.invalid_string,message:ir.message}),rr.dirty()):_e$1.assertNever(ir);var ar,sr;return{status:rr.value,value:er.data}}_regex(er,rr,nr){return this.refinement(ar=>er.test(ar),ur({validation:rr,code:Te$1.invalid_string},He$1.errToObj(nr)))}_addCheck(er){return new ft(br(ur({},this._def),{checks:[...this._def.checks,er]}))}email(er){return this._addCheck(ur({kind:"email"},He$1.errToObj(er)))}url(er){return this._addCheck(ur({kind:"url"},He$1.errToObj(er)))}emoji(er){return this._addCheck(ur({kind:"emoji"},He$1.errToObj(er)))}uuid(er){return this._addCheck(ur({kind:"uuid"},He$1.errToObj(er)))}nanoid(er){return this._addCheck(ur({kind:"nanoid"},He$1.errToObj(er)))}cuid(er){return this._addCheck(ur({kind:"cuid"},He$1.errToObj(er)))}cuid2(er){return this._addCheck(ur({kind:"cuid2"},He$1.errToObj(er)))}ulid(er){return this._addCheck(ur({kind:"ulid"},He$1.errToObj(er)))}base64(er){return this._addCheck(ur({kind:"base64"},He$1.errToObj(er)))}base64url(er){return this._addCheck(ur({kind:"base64url"},He$1.errToObj(er)))}jwt(er){return this._addCheck(ur({kind:"jwt"},He$1.errToObj(er)))}ip(er){return this._addCheck(ur({kind:"ip"},He$1.errToObj(er)))}cidr(er){return this._addCheck(ur({kind:"cidr"},He$1.errToObj(er)))}datetime(er){var rr,nr;return typeof er=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:er}):this._addCheck(ur({kind:"datetime",precision:(er==null?void 0:er.precision)===void 0?null:er==null?void 0:er.precision,offset:(rr=er==null?void 0:er.offset)!==null&&rr!==void 0&&rr,local:(nr=er==null?void 0:er.local)!==null&&nr!==void 0&&nr},He$1.errToObj(er==null?void 0:er.message)))}date(er){return this._addCheck({kind:"date",message:er})}time(er){return typeof er=="string"?this._addCheck({kind:"time",precision:null,message:er}):this._addCheck(ur({kind:"time",precision:(er==null?void 0:er.precision)===void 0?null:er==null?void 0:er.precision},He$1.errToObj(er==null?void 0:er.message)))}duration(er){return this._addCheck(ur({kind:"duration"},He$1.errToObj(er)))}regex(er,rr){return this._addCheck(ur({kind:"regex",regex:er},He$1.errToObj(rr)))}includes(er,rr){return this._addCheck(ur({kind:"includes",value:er,position:rr==null?void 0:rr.position},He$1.errToObj(rr==null?void 0:rr.message)))}startsWith(er,rr){return this._addCheck(ur({kind:"startsWith",value:er},He$1.errToObj(rr)))}endsWith(er,rr){return this._addCheck(ur({kind:"endsWith",value:er},He$1.errToObj(rr)))}min(er,rr){return this._addCheck(ur({kind:"min",value:er},He$1.errToObj(rr)))}max(er,rr){return this._addCheck(ur({kind:"max",value:er},He$1.errToObj(rr)))}length(er,rr){return this._addCheck(ur({kind:"length",value:er},He$1.errToObj(rr)))}nonempty(er){return this.min(1,He$1.errToObj(er))}trim(){return new ft(br(ur({},this._def),{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new ft(br(ur({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new ft(br(ur({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}get isDatetime(){return!!this._def.checks.find(er=>er.kind==="datetime")}get isDate(){return!!this._def.checks.find(er=>er.kind==="date")}get isTime(){return!!this._def.checks.find(er=>er.kind==="time")}get isDuration(){return!!this._def.checks.find(er=>er.kind==="duration")}get isEmail(){return!!this._def.checks.find(er=>er.kind==="email")}get isURL(){return!!this._def.checks.find(er=>er.kind==="url")}get isEmoji(){return!!this._def.checks.find(er=>er.kind==="emoji")}get isUUID(){return!!this._def.checks.find(er=>er.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(er=>er.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(er=>er.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(er=>er.kind==="cuid2")}get isULID(){return!!this._def.checks.find(er=>er.kind==="ulid")}get isIP(){return!!this._def.checks.find(er=>er.kind==="ip")}get isCIDR(){return!!this._def.checks.find(er=>er.kind==="cidr")}get isBase64(){return!!this._def.checks.find(er=>er.kind==="base64")}get isBase64url(){return!!this._def.checks.find(er=>er.kind==="base64url")}get minLength(){let er=null;for(const rr of this._def.checks)rr.kind==="min"&&(er===null||rr.value>er)&&(er=rr.value);return er}get maxLength(){let er=null;for(const rr of this._def.checks)rr.kind==="max"&&(er===null||rr.value<er)&&(er=rr.value);return er}}function gt(tr,er){const rr=(tr.toString().split(".")[1]||"").length,nr=(er.toString().split(".")[1]||"").length,ar=rr>nr?rr:nr;return parseInt(tr.toFixed(ar).replace(".",""))%parseInt(er.toFixed(ar).replace(".",""))/Math.pow(10,ar)}ft.create=tr=>{var er;return new ft(ur({checks:[],typeName:on.ZodString,coerce:(er=tr==null?void 0:tr.coerce)!==null&&er!==void 0&&er},We$1(tr)))};class vt extends $e$1{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(er){if(this._def.coerce&&(er.data=Number(er.data)),this._getType(er)!==ke$1.number){const ar=this._getOrReturnCtx(er);return Pe$1(ar,{code:Te$1.invalid_type,expected:ke$1.number,received:ar.parsedType}),Ze$1}let rr;const nr=new Ae$1;for(const ar of this._def.checks)ar.kind==="int"?_e$1.isInteger(er.data)||(rr=this._getOrReturnCtx(er,rr),Pe$1(rr,{code:Te$1.invalid_type,expected:"integer",received:"float",message:ar.message}),nr.dirty()):ar.kind==="min"?(ar.inclusive?er.data<ar.value:er.data<=ar.value)&&(rr=this._getOrReturnCtx(er,rr),Pe$1(rr,{code:Te$1.too_small,minimum:ar.value,type:"number",inclusive:ar.inclusive,exact:!1,message:ar.message}),nr.dirty()):ar.kind==="max"?(ar.inclusive?er.data>ar.value:er.data>=ar.value)&&(rr=this._getOrReturnCtx(er,rr),Pe$1(rr,{code:Te$1.too_big,maximum:ar.value,type:"number",inclusive:ar.inclusive,exact:!1,message:ar.message}),nr.dirty()):ar.kind==="multipleOf"?gt(er.data,ar.value)!==0&&(rr=this._getOrReturnCtx(er,rr),Pe$1(rr,{code:Te$1.not_multiple_of,multipleOf:ar.value,message:ar.message}),nr.dirty()):ar.kind==="finite"?Number.isFinite(er.data)||(rr=this._getOrReturnCtx(er,rr),Pe$1(rr,{code:Te$1.not_finite,message:ar.message}),nr.dirty()):_e$1.assertNever(ar);return{status:nr.value,value:er.data}}gte(er,rr){return this.setLimit("min",er,!0,He$1.toString(rr))}gt(er,rr){return this.setLimit("min",er,!1,He$1.toString(rr))}lte(er,rr){return this.setLimit("max",er,!0,He$1.toString(rr))}lt(er,rr){return this.setLimit("max",er,!1,He$1.toString(rr))}setLimit(er,rr,nr,ar){return new vt(br(ur({},this._def),{checks:[...this._def.checks,{kind:er,value:rr,inclusive:nr,message:He$1.toString(ar)}]}))}_addCheck(er){return new vt(br(ur({},this._def),{checks:[...this._def.checks,er]}))}int(er){return this._addCheck({kind:"int",message:He$1.toString(er)})}positive(er){return this._addCheck({kind:"min",value:0,inclusive:!1,message:He$1.toString(er)})}negative(er){return this._addCheck({kind:"max",value:0,inclusive:!1,message:He$1.toString(er)})}nonpositive(er){return this._addCheck({kind:"max",value:0,inclusive:!0,message:He$1.toString(er)})}nonnegative(er){return this._addCheck({kind:"min",value:0,inclusive:!0,message:He$1.toString(er)})}multipleOf(er,rr){return this._addCheck({kind:"multipleOf",value:er,message:He$1.toString(rr)})}finite(er){return this._addCheck({kind:"finite",message:He$1.toString(er)})}safe(er){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:He$1.toString(er)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:He$1.toString(er)})}get minValue(){let er=null;for(const rr of this._def.checks)rr.kind==="min"&&(er===null||rr.value>er)&&(er=rr.value);return er}get maxValue(){let er=null;for(const rr of this._def.checks)rr.kind==="max"&&(er===null||rr.value<er)&&(er=rr.value);return er}get isInt(){return!!this._def.checks.find(er=>er.kind==="int"||er.kind==="multipleOf"&&_e$1.isInteger(er.value))}get isFinite(){let er=null,rr=null;for(const nr of this._def.checks){if(nr.kind==="finite"||nr.kind==="int"||nr.kind==="multipleOf")return!0;nr.kind==="min"?(rr===null||nr.value>rr)&&(rr=nr.value):nr.kind==="max"&&(er===null||nr.value<er)&&(er=nr.value)}return Number.isFinite(rr)&&Number.isFinite(er)}}vt.create=tr=>new vt(ur({checks:[],typeName:on.ZodNumber,coerce:(tr==null?void 0:tr.coerce)||!1},We$1(tr)));class yt extends $e$1{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(er){if(this._def.coerce)try{er.data=BigInt(er.data)}catch(ar){return this._getInvalidInput(er)}if(this._getType(er)!==ke$1.bigint)return this._getInvalidInput(er);let rr;const nr=new Ae$1;for(const ar of this._def.checks)ar.kind==="min"?(ar.inclusive?er.data<ar.value:er.data<=ar.value)&&(rr=this._getOrReturnCtx(er,rr),Pe$1(rr,{code:Te$1.too_small,type:"bigint",minimum:ar.value,inclusive:ar.inclusive,message:ar.message}),nr.dirty()):ar.kind==="max"?(ar.inclusive?er.data>ar.value:er.data>=ar.value)&&(rr=this._getOrReturnCtx(er,rr),Pe$1(rr,{code:Te$1.too_big,type:"bigint",maximum:ar.value,inclusive:ar.inclusive,message:ar.message}),nr.dirty()):ar.kind==="multipleOf"?er.data%ar.value!==BigInt(0)&&(rr=this._getOrReturnCtx(er,rr),Pe$1(rr,{code:Te$1.not_multiple_of,multipleOf:ar.value,message:ar.message}),nr.dirty()):_e$1.assertNever(ar);return{status:nr.value,value:er.data}}_getInvalidInput(er){const rr=this._getOrReturnCtx(er);return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.bigint,received:rr.parsedType}),Ze$1}gte(er,rr){return this.setLimit("min",er,!0,He$1.toString(rr))}gt(er,rr){return this.setLimit("min",er,!1,He$1.toString(rr))}lte(er,rr){return this.setLimit("max",er,!0,He$1.toString(rr))}lt(er,rr){return this.setLimit("max",er,!1,He$1.toString(rr))}setLimit(er,rr,nr,ar){return new yt(br(ur({},this._def),{checks:[...this._def.checks,{kind:er,value:rr,inclusive:nr,message:He$1.toString(ar)}]}))}_addCheck(er){return new yt(br(ur({},this._def),{checks:[...this._def.checks,er]}))}positive(er){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:He$1.toString(er)})}negative(er){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:He$1.toString(er)})}nonpositive(er){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:He$1.toString(er)})}nonnegative(er){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:He$1.toString(er)})}multipleOf(er,rr){return this._addCheck({kind:"multipleOf",value:er,message:He$1.toString(rr)})}get minValue(){let er=null;for(const rr of this._def.checks)rr.kind==="min"&&(er===null||rr.value>er)&&(er=rr.value);return er}get maxValue(){let er=null;for(const rr of this._def.checks)rr.kind==="max"&&(er===null||rr.value<er)&&(er=rr.value);return er}}yt.create=tr=>{var er;return new yt(ur({checks:[],typeName:on.ZodBigInt,coerce:(er=tr==null?void 0:tr.coerce)!==null&&er!==void 0&&er},We$1(tr)))};class bt extends $e$1{_parse(er){if(this._def.coerce&&(er.data=!!er.data),this._getType(er)!==ke$1.boolean){const rr=this._getOrReturnCtx(er);return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.boolean,received:rr.parsedType}),Ze$1}return je$1(er.data)}}bt.create=tr=>new bt(ur({typeName:on.ZodBoolean,coerce:(tr==null?void 0:tr.coerce)||!1},We$1(tr)));class _t extends $e$1{_parse(er){if(this._def.coerce&&(er.data=new Date(er.data)),this._getType(er)!==ke$1.date){const ar=this._getOrReturnCtx(er);return Pe$1(ar,{code:Te$1.invalid_type,expected:ke$1.date,received:ar.parsedType}),Ze$1}if(isNaN(er.data.getTime()))return Pe$1(this._getOrReturnCtx(er),{code:Te$1.invalid_date}),Ze$1;const rr=new Ae$1;let nr;for(const ar of this._def.checks)ar.kind==="min"?er.data.getTime()<ar.value&&(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.too_small,message:ar.message,inclusive:!0,exact:!1,minimum:ar.value,type:"date"}),rr.dirty()):ar.kind==="max"?er.data.getTime()>ar.value&&(nr=this._getOrReturnCtx(er,nr),Pe$1(nr,{code:Te$1.too_big,message:ar.message,inclusive:!0,exact:!1,maximum:ar.value,type:"date"}),rr.dirty()):_e$1.assertNever(ar);return{status:rr.value,value:new Date(er.data.getTime())}}_addCheck(er){return new _t(br(ur({},this._def),{checks:[...this._def.checks,er]}))}min(er,rr){return this._addCheck({kind:"min",value:er.getTime(),message:He$1.toString(rr)})}max(er,rr){return this._addCheck({kind:"max",value:er.getTime(),message:He$1.toString(rr)})}get minDate(){let er=null;for(const rr of this._def.checks)rr.kind==="min"&&(er===null||rr.value>er)&&(er=rr.value);return er!=null?new Date(er):null}get maxDate(){let er=null;for(const rr of this._def.checks)rr.kind==="max"&&(er===null||rr.value<er)&&(er=rr.value);return er!=null?new Date(er):null}}_t.create=tr=>new _t(ur({checks:[],coerce:(tr==null?void 0:tr.coerce)||!1,typeName:on.ZodDate},We$1(tr)));class wt extends $e$1{_parse(er){if(this._getType(er)!==ke$1.symbol){const rr=this._getOrReturnCtx(er);return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.symbol,received:rr.parsedType}),Ze$1}return je$1(er.data)}}wt.create=tr=>new wt(ur({typeName:on.ZodSymbol},We$1(tr)));class kt extends $e$1{_parse(er){if(this._getType(er)!==ke$1.undefined){const rr=this._getOrReturnCtx(er);return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.undefined,received:rr.parsedType}),Ze$1}return je$1(er.data)}}kt.create=tr=>new kt(ur({typeName:on.ZodUndefined},We$1(tr)));class xt extends $e$1{_parse(er){if(this._getType(er)!==ke$1.null){const rr=this._getOrReturnCtx(er);return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.null,received:rr.parsedType}),Ze$1}return je$1(er.data)}}xt.create=tr=>new xt(ur({typeName:on.ZodNull},We$1(tr)));class Tt extends $e$1{constructor(){super(...arguments),this._any=!0}_parse(er){return je$1(er.data)}}Tt.create=tr=>new Tt(ur({typeName:on.ZodAny},We$1(tr)));class It extends $e$1{constructor(){super(...arguments),this._unknown=!0}_parse(er){return je$1(er.data)}}It.create=tr=>new It(ur({typeName:on.ZodUnknown},We$1(tr)));class Ct extends $e$1{_parse(er){const rr=this._getOrReturnCtx(er);return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.never,received:rr.parsedType}),Ze$1}}Ct.create=tr=>new Ct(ur({typeName:on.ZodNever},We$1(tr)));class Ot extends $e$1{_parse(er){if(this._getType(er)!==ke$1.undefined){const rr=this._getOrReturnCtx(er);return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.void,received:rr.parsedType}),Ze$1}return je$1(er.data)}}Ot.create=tr=>new Ot(ur({typeName:on.ZodVoid},We$1(tr)));class St extends $e$1{_parse(er){const{ctx:rr,status:nr}=this._processInputParams(er),ar=this._def;if(rr.parsedType!==ke$1.array)return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.array,received:rr.parsedType}),Ze$1;if(ar.exactLength!==null){const ir=rr.data.length>ar.exactLength.value,or=rr.data.length<ar.exactLength.value;(ir||or)&&(Pe$1(rr,{code:ir?Te$1.too_big:Te$1.too_small,minimum:or?ar.exactLength.value:void 0,maximum:ir?ar.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:ar.exactLength.message}),nr.dirty())}if(ar.minLength!==null&&rr.data.length<ar.minLength.value&&(Pe$1(rr,{code:Te$1.too_small,minimum:ar.minLength.value,type:"array",inclusive:!0,exact:!1,message:ar.minLength.message}),nr.dirty()),ar.maxLength!==null&&rr.data.length>ar.maxLength.value&&(Pe$1(rr,{code:Te$1.too_big,maximum:ar.maxLength.value,type:"array",inclusive:!0,exact:!1,message:ar.maxLength.message}),nr.dirty()),rr.common.async)return Promise.all([...rr.data].map((ir,or)=>ar.type._parseAsync(new Ue$1(rr,ir,rr.path,or)))).then(ir=>Ae$1.mergeArray(nr,ir));const sr=[...rr.data].map((ir,or)=>ar.type._parseSync(new Ue$1(rr,ir,rr.path,or)));return Ae$1.mergeArray(nr,sr)}get element(){return this._def.type}min(er,rr){return new St(br(ur({},this._def),{minLength:{value:er,message:He$1.toString(rr)}}))}max(er,rr){return new St(br(ur({},this._def),{maxLength:{value:er,message:He$1.toString(rr)}}))}length(er,rr){return new St(br(ur({},this._def),{exactLength:{value:er,message:He$1.toString(rr)}}))}nonempty(er){return this.min(1,er)}}function Et(tr){if(tr instanceof Pt){const er={};for(const rr in tr.shape){const nr=tr.shape[rr];er[rr]=Kt.create(Et(nr))}return new Pt(br(ur({},tr._def),{shape:()=>er}))}return tr instanceof St?new St(br(ur({},tr._def),{type:Et(tr.element)})):tr instanceof Kt?Kt.create(Et(tr.unwrap())):tr instanceof Gt?Gt.create(Et(tr.unwrap())):tr instanceof Lt?Lt.create(tr.items.map(er=>Et(er))):tr}St.create=(tr,er)=>new St(ur({type:tr,minLength:null,maxLength:null,exactLength:null,typeName:on.ZodArray},We$1(er)));class Pt extends $e$1{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const er=this._def.shape(),rr=_e$1.objectKeys(er);return this._cached={shape:er,keys:rr}}_parse(er){if(this._getType(er)!==ke$1.object){const cr=this._getOrReturnCtx(er);return Pe$1(cr,{code:Te$1.invalid_type,expected:ke$1.object,received:cr.parsedType}),Ze$1}const{status:rr,ctx:nr}=this._processInputParams(er),{shape:ar,keys:sr}=this._getCached(),ir=[];if(!(this._def.catchall instanceof Ct&&this._def.unknownKeys==="strip"))for(const cr in nr.data)sr.includes(cr)||ir.push(cr);const or=[];for(const cr of sr){const lr=ar[cr],dr=nr.data[cr];or.push({key:{status:"valid",value:cr},value:lr._parse(new Ue$1(nr,dr,nr.path,cr)),alwaysSet:cr in nr.data})}if(this._def.catchall instanceof Ct){const cr=this._def.unknownKeys;if(cr==="passthrough")for(const lr of ir)or.push({key:{status:"valid",value:lr},value:{status:"valid",value:nr.data[lr]}});else if(cr==="strict")ir.length>0&&(Pe$1(nr,{code:Te$1.unrecognized_keys,keys:ir}),rr.dirty());else if(cr!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const cr=this._def.catchall;for(const lr of ir){const dr=nr.data[lr];or.push({key:{status:"valid",value:lr},value:cr._parse(new Ue$1(nr,dr,nr.path,lr)),alwaysSet:lr in nr.data})}}return nr.common.async?Promise.resolve().then(()=>Dr(this,null,function*(){const cr=[];for(const lr of or){const dr=yield lr.key,pr=yield lr.value;cr.push({key:dr,value:pr,alwaysSet:lr.alwaysSet})}return cr})).then(cr=>Ae$1.mergeObjectSync(rr,cr)):Ae$1.mergeObjectSync(rr,or)}get shape(){return this._def.shape()}strict(er){return He$1.errToObj,new Pt(ur(br(ur({},this._def),{unknownKeys:"strict"}),er!==void 0?{errorMap:(rr,nr)=>{var ar,sr,ir,or;const cr=(ir=(sr=(ar=this._def).errorMap)===null||sr===void 0?void 0:sr.call(ar,rr,nr).message)!==null&&ir!==void 0?ir:nr.defaultError;return rr.code==="unrecognized_keys"?{message:(or=He$1.errToObj(er).message)!==null&&or!==void 0?or:cr}:{message:cr}}}:{}))}strip(){return new Pt(br(ur({},this._def),{unknownKeys:"strip"}))}passthrough(){return new Pt(br(ur({},this._def),{unknownKeys:"passthrough"}))}extend(er){return new Pt(br(ur({},this._def),{shape:()=>ur(ur({},this._def.shape()),er)}))}merge(er){return new Pt({unknownKeys:er._def.unknownKeys,catchall:er._def.catchall,shape:()=>ur(ur({},this._def.shape()),er._def.shape()),typeName:on.ZodObject})}setKey(er,rr){return this.augment({[er]:rr})}catchall(er){return new Pt(br(ur({},this._def),{catchall:er}))}pick(er){const rr={};return _e$1.objectKeys(er).forEach(nr=>{er[nr]&&this.shape[nr]&&(rr[nr]=this.shape[nr])}),new Pt(br(ur({},this._def),{shape:()=>rr}))}omit(er){const rr={};return _e$1.objectKeys(this.shape).forEach(nr=>{er[nr]||(rr[nr]=this.shape[nr])}),new Pt(br(ur({},this._def),{shape:()=>rr}))}deepPartial(){return Et(this)}partial(er){const rr={};return _e$1.objectKeys(this.shape).forEach(nr=>{const ar=this.shape[nr];er&&!er[nr]?rr[nr]=ar:rr[nr]=ar.optional()}),new Pt(br(ur({},this._def),{shape:()=>rr}))}required(er){const rr={};return _e$1.objectKeys(this.shape).forEach(nr=>{if(er&&!er[nr])rr[nr]=this.shape[nr];else{let ar=this.shape[nr];for(;ar instanceof Kt;)ar=ar._def.innerType;rr[nr]=ar}}),new Pt(br(ur({},this._def),{shape:()=>rr}))}keyof(){return Bt(_e$1.objectKeys(this.shape))}}Pt.create=(tr,er)=>new Pt(ur({shape:()=>tr,unknownKeys:"strip",catchall:Ct.create(),typeName:on.ZodObject},We$1(er))),Pt.strictCreate=(tr,er)=>new Pt(ur({shape:()=>tr,unknownKeys:"strict",catchall:Ct.create(),typeName:on.ZodObject},We$1(er))),Pt.lazycreate=(tr,er)=>new Pt(ur({shape:tr,unknownKeys:"strip",catchall:Ct.create(),typeName:on.ZodObject},We$1(er)));class At extends $e$1{_parse(er){const{ctx:rr}=this._processInputParams(er),nr=this._def.options;if(rr.common.async)return Promise.all(nr.map(ar=>Dr(this,null,function*(){const sr=br(ur({},rr),{common:br(ur({},rr.common),{issues:[]}),parent:null});return{result:yield ar._parseAsync({data:rr.data,path:rr.path,parent:sr}),ctx:sr}}))).then(function(ar){for(const ir of ar)if(ir.result.status==="valid")return ir.result;for(const ir of ar)if(ir.result.status==="dirty")return rr.common.issues.push(...ir.ctx.common.issues),ir.result;const sr=ar.map(ir=>new Ie$1(ir.ctx.common.issues));return Pe$1(rr,{code:Te$1.invalid_union,unionErrors:sr}),Ze$1});{let ar;const sr=[];for(const or of nr){const cr=br(ur({},rr),{common:br(ur({},rr.common),{issues:[]}),parent:null}),lr=or._parseSync({data:rr.data,path:rr.path,parent:cr});if(lr.status==="valid")return lr;lr.status!=="dirty"||ar||(ar={result:lr,ctx:cr}),cr.common.issues.length&&sr.push(cr.common.issues)}if(ar)return rr.common.issues.push(...ar.ctx.common.issues),ar.result;const ir=sr.map(or=>new Ie$1(or));return Pe$1(rr,{code:Te$1.invalid_union,unionErrors:ir}),Ze$1}}get options(){return this._def.options}}At.create=(tr,er)=>new At(ur({options:tr,typeName:on.ZodUnion},We$1(er)));const Zt=tr=>tr instanceof Ht?Zt(tr.schema):tr instanceof $t?Zt(tr.innerType()):tr instanceof Ft?[tr.value]:tr instanceof Ut?tr.options:tr instanceof Vt?_e$1.objectValues(tr.enum):tr instanceof Jt?Zt(tr._def.innerType):tr instanceof kt?[void 0]:tr instanceof xt?[null]:tr instanceof Kt?[void 0,...Zt(tr.unwrap())]:tr instanceof Gt?[null,...Zt(tr.unwrap())]:tr instanceof en||tr instanceof nn?Zt(tr.unwrap()):tr instanceof Xt?Zt(tr._def.innerType):[];class Nt extends $e$1{_parse(er){const{ctx:rr}=this._processInputParams(er);if(rr.parsedType!==ke$1.object)return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.object,received:rr.parsedType}),Ze$1;const nr=this.discriminator,ar=rr.data[nr],sr=this.optionsMap.get(ar);return sr?rr.common.async?sr._parseAsync({data:rr.data,path:rr.path,parent:rr}):sr._parseSync({data:rr.data,path:rr.path,parent:rr}):(Pe$1(rr,{code:Te$1.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[nr]}),Ze$1)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(er,rr,nr){const ar=new Map;for(const sr of rr){const ir=Zt(sr.shape[er]);if(!ir.length)throw new Error("A discriminator value for key `".concat(er,"` could not be extracted from all schema options"));for(const or of ir){if(ar.has(or))throw new Error("Discriminator property ".concat(String(er)," has duplicate value ").concat(String(or)));ar.set(or,sr)}}return new Nt(ur({typeName:on.ZodDiscriminatedUnion,discriminator:er,options:rr,optionsMap:ar},We$1(nr)))}}function jt(tr,er){const rr=xe$1(tr),nr=xe$1(er);if(tr===er)return{valid:!0,data:tr};if(rr===ke$1.object&&nr===ke$1.object){const ar=_e$1.objectKeys(er),sr=_e$1.objectKeys(tr).filter(or=>ar.indexOf(or)!==-1),ir=ur(ur({},tr),er);for(const or of sr){const cr=jt(tr[or],er[or]);if(!cr.valid)return{valid:!1};ir[or]=cr.data}return{valid:!0,data:ir}}if(rr===ke$1.array&&nr===ke$1.array){if(tr.length!==er.length)return{valid:!1};const ar=[];for(let sr=0;sr<tr.length;sr++){const ir=jt(tr[sr],er[sr]);if(!ir.valid)return{valid:!1};ar.push(ir.data)}return{valid:!0,data:ar}}return rr===ke$1.date&&nr===ke$1.date&&+tr==+er?{valid:!0,data:tr}:{valid:!1}}class Dt extends $e$1{_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er),ar=(sr,ir)=>{if(De$1(sr)||De$1(ir))return Ze$1;const or=jt(sr.value,ir.value);return or.valid?((Le$1(sr)||Le$1(ir))&&rr.dirty(),{status:rr.value,value:or.data}):(Pe$1(nr,{code:Te$1.invalid_intersection_types}),Ze$1)};return nr.common.async?Promise.all([this._def.left._parseAsync({data:nr.data,path:nr.path,parent:nr}),this._def.right._parseAsync({data:nr.data,path:nr.path,parent:nr})]).then(sr=>{let[ir,or]=sr;return ar(ir,or)}):ar(this._def.left._parseSync({data:nr.data,path:nr.path,parent:nr}),this._def.right._parseSync({data:nr.data,path:nr.path,parent:nr}))}}Dt.create=(tr,er,rr)=>new Dt(ur({left:tr,right:er,typeName:on.ZodIntersection},We$1(rr)));class Lt extends $e$1{_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.parsedType!==ke$1.array)return Pe$1(nr,{code:Te$1.invalid_type,expected:ke$1.array,received:nr.parsedType}),Ze$1;if(nr.data.length<this._def.items.length)return Pe$1(nr,{code:Te$1.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ze$1;!this._def.rest&&nr.data.length>this._def.items.length&&(Pe$1(nr,{code:Te$1.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),rr.dirty());const ar=[...nr.data].map((sr,ir)=>{const or=this._def.items[ir]||this._def.rest;return or?or._parse(new Ue$1(nr,sr,nr.path,ir)):null}).filter(sr=>!!sr);return nr.common.async?Promise.all(ar).then(sr=>Ae$1.mergeArray(rr,sr)):Ae$1.mergeArray(rr,ar)}get items(){return this._def.items}rest(er){return new Lt(br(ur({},this._def),{rest:er}))}}Lt.create=(tr,er)=>{if(!Array.isArray(tr))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Lt(ur({items:tr,typeName:on.ZodTuple,rest:null},We$1(er)))};class Rt extends $e$1{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.parsedType!==ke$1.object)return Pe$1(nr,{code:Te$1.invalid_type,expected:ke$1.object,received:nr.parsedType}),Ze$1;const ar=[],sr=this._def.keyType,ir=this._def.valueType;for(const or in nr.data)ar.push({key:sr._parse(new Ue$1(nr,or,nr.path,or)),value:ir._parse(new Ue$1(nr,nr.data[or],nr.path,or)),alwaysSet:or in nr.data});return nr.common.async?Ae$1.mergeObjectAsync(rr,ar):Ae$1.mergeObjectSync(rr,ar)}get element(){return this._def.valueType}static create(er,rr,nr){return new Rt(rr instanceof $e$1?ur({keyType:er,valueType:rr,typeName:on.ZodRecord},We$1(nr)):ur({keyType:ft.create(),valueType:er,typeName:on.ZodRecord},We$1(rr)))}}class Mt extends $e$1{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.parsedType!==ke$1.map)return Pe$1(nr,{code:Te$1.invalid_type,expected:ke$1.map,received:nr.parsedType}),Ze$1;const ar=this._def.keyType,sr=this._def.valueType,ir=[...nr.data.entries()].map((or,cr)=>{let[lr,dr]=or;return{key:ar._parse(new Ue$1(nr,lr,nr.path,[cr,"key"])),value:sr._parse(new Ue$1(nr,dr,nr.path,[cr,"value"]))}});if(nr.common.async){const or=new Map;return Promise.resolve().then(()=>Dr(this,null,function*(){for(const cr of ir){const lr=yield cr.key,dr=yield cr.value;if(lr.status==="aborted"||dr.status==="aborted")return Ze$1;lr.status!=="dirty"&&dr.status!=="dirty"||rr.dirty(),or.set(lr.value,dr.value)}return{status:rr.value,value:or}}))}{const or=new Map;for(const cr of ir){const lr=cr.key,dr=cr.value;if(lr.status==="aborted"||dr.status==="aborted")return Ze$1;lr.status!=="dirty"&&dr.status!=="dirty"||rr.dirty(),or.set(lr.value,dr.value)}return{status:rr.value,value:or}}}}Mt.create=(tr,er,rr)=>new Mt(ur({valueType:er,keyType:tr,typeName:on.ZodMap},We$1(rr)));class zt extends $e$1{_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.parsedType!==ke$1.set)return Pe$1(nr,{code:Te$1.invalid_type,expected:ke$1.set,received:nr.parsedType}),Ze$1;const ar=this._def;ar.minSize!==null&&nr.data.size<ar.minSize.value&&(Pe$1(nr,{code:Te$1.too_small,minimum:ar.minSize.value,type:"set",inclusive:!0,exact:!1,message:ar.minSize.message}),rr.dirty()),ar.maxSize!==null&&nr.data.size>ar.maxSize.value&&(Pe$1(nr,{code:Te$1.too_big,maximum:ar.maxSize.value,type:"set",inclusive:!0,exact:!1,message:ar.maxSize.message}),rr.dirty());const sr=this._def.valueType;function ir(cr){const lr=new Set;for(const dr of cr){if(dr.status==="aborted")return Ze$1;dr.status==="dirty"&&rr.dirty(),lr.add(dr.value)}return{status:rr.value,value:lr}}const or=[...nr.data.values()].map((cr,lr)=>sr._parse(new Ue$1(nr,cr,nr.path,lr)));return nr.common.async?Promise.all(or).then(cr=>ir(cr)):ir(or)}min(er,rr){return new zt(br(ur({},this._def),{minSize:{value:er,message:He$1.toString(rr)}}))}max(er,rr){return new zt(br(ur({},this._def),{maxSize:{value:er,message:He$1.toString(rr)}}))}size(er,rr){return this.min(er,rr).max(er,rr)}nonempty(er){return this.min(1,er)}}zt.create=(tr,er)=>new zt(ur({valueType:tr,minSize:null,maxSize:null,typeName:on.ZodSet},We$1(er)));class qt extends $e$1{constructor(){super(...arguments),this.validate=this.implement}_parse(er){const{ctx:rr}=this._processInputParams(er);if(rr.parsedType!==ke$1.function)return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.function,received:rr.parsedType}),Ze$1;function nr(or,cr){return Ee$1({data:or,path:rr.path,errorMaps:[rr.common.contextualErrorMap,rr.schemaErrorMap,Se$1(),Ce$1].filter(lr=>!!lr),issueData:{code:Te$1.invalid_arguments,argumentsError:cr}})}function ar(or,cr){return Ee$1({data:or,path:rr.path,errorMaps:[rr.common.contextualErrorMap,rr.schemaErrorMap,Se$1(),Ce$1].filter(lr=>!!lr),issueData:{code:Te$1.invalid_return_type,returnTypeError:cr}})}const sr={errorMap:rr.common.contextualErrorMap},ir=rr.data;if(this._def.returns instanceof Wt){const or=this;return je$1(function(){return Dr(this,arguments,function*(){for(var cr=arguments.length,lr=new Array(cr),dr=0;dr<cr;dr++)lr[dr]=arguments[dr];const pr=new Ie$1([]),hr=yield or._def.args.parseAsync(lr,sr).catch(mr=>{throw pr.addIssue(nr(lr,mr)),pr}),fr=yield Reflect.apply(ir,this,hr);return yield or._def.returns._def.type.parseAsync(fr,sr).catch(mr=>{throw pr.addIssue(ar(fr,mr)),pr})})})}{const or=this;return je$1(function(){for(var cr=arguments.length,lr=new Array(cr),dr=0;dr<cr;dr++)lr[dr]=arguments[dr];const pr=or._def.args.safeParse(lr,sr);if(!pr.success)throw new Ie$1([nr(lr,pr.error)]);const hr=Reflect.apply(ir,this,pr.data),fr=or._def.returns.safeParse(hr,sr);if(!fr.success)throw new Ie$1([ar(hr,fr.error)]);return fr.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(){for(var er=arguments.length,rr=new Array(er),nr=0;nr<er;nr++)rr[nr]=arguments[nr];return new qt(br(ur({},this._def),{args:Lt.create(rr).rest(It.create())}))}returns(er){return new qt(br(ur({},this._def),{returns:er}))}implement(er){return this.parse(er)}strictImplement(er){return this.parse(er)}static create(er,rr,nr){return new qt(ur({args:er||Lt.create([]).rest(It.create()),returns:rr||It.create(),typeName:on.ZodFunction},We$1(nr)))}}class Ht extends $e$1{get schema(){return this._def.getter()}_parse(er){const{ctx:rr}=this._processInputParams(er);return this._def.getter()._parse({data:rr.data,path:rr.path,parent:rr})}}Ht.create=(tr,er)=>new Ht(ur({getter:tr,typeName:on.ZodLazy},We$1(er)));class Ft extends $e$1{_parse(er){if(er.data!==this._def.value){const rr=this._getOrReturnCtx(er);return Pe$1(rr,{received:rr.data,code:Te$1.invalid_literal,expected:this._def.value}),Ze$1}return{status:"valid",value:er.data}}get value(){return this._def.value}}function Bt(tr,er){return new Ut(ur({values:tr,typeName:on.ZodEnum},We$1(er)))}Ft.create=(tr,er)=>new Ft(ur({value:tr,typeName:on.ZodLiteral},We$1(er)));class Ut extends $e$1{constructor(){super(...arguments),Fe$1.set(this,void 0)}_parse(er){if(typeof er.data!="string"){const rr=this._getOrReturnCtx(er),nr=this._def.values;return Pe$1(rr,{expected:_e$1.joinValues(nr),received:rr.parsedType,code:Te$1.invalid_type}),Ze$1}if(ze$1(this,Fe$1)||qe$1(this,Fe$1,new Set(this._def.values)),!ze$1(this,Fe$1).has(er.data)){const rr=this._getOrReturnCtx(er),nr=this._def.values;return Pe$1(rr,{received:rr.data,code:Te$1.invalid_enum_value,options:nr}),Ze$1}return je$1(er.data)}get options(){return this._def.values}get enum(){const er={};for(const rr of this._def.values)er[rr]=rr;return er}get Values(){const er={};for(const rr of this._def.values)er[rr]=rr;return er}get Enum(){const er={};for(const rr of this._def.values)er[rr]=rr;return er}extract(er){let rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._def;return Ut.create(er,ur(ur({},this._def),rr))}exclude(er){let rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._def;return Ut.create(this.options.filter(nr=>!er.includes(nr)),ur(ur({},this._def),rr))}}Fe$1=new WeakMap,Ut.create=Bt;class Vt extends $e$1{constructor(){super(...arguments),Be$1.set(this,void 0)}_parse(er){const rr=_e$1.getValidEnumValues(this._def.values),nr=this._getOrReturnCtx(er);if(nr.parsedType!==ke$1.string&&nr.parsedType!==ke$1.number){const ar=_e$1.objectValues(rr);return Pe$1(nr,{expected:_e$1.joinValues(ar),received:nr.parsedType,code:Te$1.invalid_type}),Ze$1}if(ze$1(this,Be$1)||qe$1(this,Be$1,new Set(_e$1.getValidEnumValues(this._def.values))),!ze$1(this,Be$1).has(er.data)){const ar=_e$1.objectValues(rr);return Pe$1(nr,{received:nr.data,code:Te$1.invalid_enum_value,options:ar}),Ze$1}return je$1(er.data)}get enum(){return this._def.values}}Be$1=new WeakMap,Vt.create=(tr,er)=>new Vt(ur({values:tr,typeName:on.ZodNativeEnum},We$1(er)));class Wt extends $e$1{unwrap(){return this._def.type}_parse(er){const{ctx:rr}=this._processInputParams(er);if(rr.parsedType!==ke$1.promise&&rr.common.async===!1)return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.promise,received:rr.parsedType}),Ze$1;const nr=rr.parsedType===ke$1.promise?rr.data:Promise.resolve(rr.data);return je$1(nr.then(ar=>this._def.type.parseAsync(ar,{path:rr.path,errorMap:rr.common.contextualErrorMap})))}}Wt.create=(tr,er)=>new Wt(ur({type:tr,typeName:on.ZodPromise},We$1(er)));class $t extends $e$1{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===on.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er),ar=this._def.effect||null,sr={addIssue:ir=>{Pe$1(nr,ir),ir.fatal?rr.abort():rr.dirty()},get path(){return nr.path}};if(sr.addIssue=sr.addIssue.bind(sr),ar.type==="preprocess"){const ir=ar.transform(nr.data,sr);if(nr.common.async)return Promise.resolve(ir).then(or=>Dr(this,null,function*(){if(rr.value==="aborted")return Ze$1;const cr=yield this._def.schema._parseAsync({data:or,path:nr.path,parent:nr});return cr.status==="aborted"?Ze$1:cr.status==="dirty"||rr.value==="dirty"?Ne$1(cr.value):cr}));{if(rr.value==="aborted")return Ze$1;const or=this._def.schema._parseSync({data:ir,path:nr.path,parent:nr});return or.status==="aborted"?Ze$1:or.status==="dirty"||rr.value==="dirty"?Ne$1(or.value):or}}if(ar.type==="refinement"){const ir=or=>{const cr=ar.refinement(or,sr);if(nr.common.async)return Promise.resolve(cr);if(cr instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return or};if(nr.common.async===!1){const or=this._def.schema._parseSync({data:nr.data,path:nr.path,parent:nr});return or.status==="aborted"?Ze$1:(or.status==="dirty"&&rr.dirty(),ir(or.value),{status:rr.value,value:or.value})}return this._def.schema._parseAsync({data:nr.data,path:nr.path,parent:nr}).then(or=>or.status==="aborted"?Ze$1:(or.status==="dirty"&&rr.dirty(),ir(or.value).then(()=>({status:rr.value,value:or.value}))))}if(ar.type==="transform"){if(nr.common.async===!1){const ir=this._def.schema._parseSync({data:nr.data,path:nr.path,parent:nr});if(!Re$1(ir))return ir;const or=ar.transform(ir.value,sr);if(or instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:rr.value,value:or}}return this._def.schema._parseAsync({data:nr.data,path:nr.path,parent:nr}).then(ir=>Re$1(ir)?Promise.resolve(ar.transform(ir.value,sr)).then(or=>({status:rr.value,value:or})):ir)}_e$1.assertNever(ar)}}$t.create=(tr,er,rr)=>new $t(ur({schema:tr,typeName:on.ZodEffects,effect:er},We$1(rr))),$t.createWithPreprocess=(tr,er,rr)=>new $t(ur({schema:er,effect:{type:"preprocess",transform:tr},typeName:on.ZodEffects},We$1(rr)));class Kt extends $e$1{_parse(er){return this._getType(er)===ke$1.undefined?je$1(void 0):this._def.innerType._parse(er)}unwrap(){return this._def.innerType}}Kt.create=(tr,er)=>new Kt(ur({innerType:tr,typeName:on.ZodOptional},We$1(er)));class Gt extends $e$1{_parse(er){return this._getType(er)===ke$1.null?je$1(null):this._def.innerType._parse(er)}unwrap(){return this._def.innerType}}Gt.create=(tr,er)=>new Gt(ur({innerType:tr,typeName:on.ZodNullable},We$1(er)));class Jt extends $e$1{_parse(er){const{ctx:rr}=this._processInputParams(er);let nr=rr.data;return rr.parsedType===ke$1.undefined&&(nr=this._def.defaultValue()),this._def.innerType._parse({data:nr,path:rr.path,parent:rr})}removeDefault(){return this._def.innerType}}Jt.create=(tr,er)=>new Jt(ur({innerType:tr,typeName:on.ZodDefault,defaultValue:typeof er.default=="function"?er.default:()=>er.default},We$1(er)));class Xt extends $e$1{_parse(er){const{ctx:rr}=this._processInputParams(er),nr=br(ur({},rr),{common:br(ur({},rr.common),{issues:[]})}),ar=this._def.innerType._parse({data:nr.data,path:nr.path,parent:ur({},nr)});return Me$1(ar)?ar.then(sr=>({status:"valid",value:sr.status==="valid"?sr.value:this._def.catchValue({get error(){return new Ie$1(nr.common.issues)},input:nr.data})})):{status:"valid",value:ar.status==="valid"?ar.value:this._def.catchValue({get error(){return new Ie$1(nr.common.issues)},input:nr.data})}}removeCatch(){return this._def.innerType}}Xt.create=(tr,er)=>new Xt(ur({innerType:tr,typeName:on.ZodCatch,catchValue:typeof er.catch=="function"?er.catch:()=>er.catch},We$1(er)));class Yt extends $e$1{_parse(er){if(this._getType(er)!==ke$1.nan){const rr=this._getOrReturnCtx(er);return Pe$1(rr,{code:Te$1.invalid_type,expected:ke$1.nan,received:rr.parsedType}),Ze$1}return{status:"valid",value:er.data}}}Yt.create=tr=>new Yt(ur({typeName:on.ZodNaN},We$1(tr)));const Qt=Symbol("zod_brand");class en extends $e$1{_parse(er){const{ctx:rr}=this._processInputParams(er),nr=rr.data;return this._def.type._parse({data:nr,path:rr.path,parent:rr})}unwrap(){return this._def.type}}class tn extends $e$1{_parse(er){const{status:rr,ctx:nr}=this._processInputParams(er);if(nr.common.async)return Dr(this,null,function*(){const ar=yield this._def.in._parseAsync({data:nr.data,path:nr.path,parent:nr});return ar.status==="aborted"?Ze$1:ar.status==="dirty"?(rr.dirty(),Ne$1(ar.value)):this._def.out._parseAsync({data:ar.value,path:nr.path,parent:nr})});{const ar=this._def.in._parseSync({data:nr.data,path:nr.path,parent:nr});return ar.status==="aborted"?Ze$1:ar.status==="dirty"?(rr.dirty(),{status:"dirty",value:ar.value}):this._def.out._parseSync({data:ar.value,path:nr.path,parent:nr})}}static create(er,rr){return new tn({in:er,out:rr,typeName:on.ZodPipeline})}}class nn extends $e$1{_parse(er){const rr=this._def.innerType._parse(er),nr=ar=>(Re$1(ar)&&(ar.value=Object.freeze(ar.value)),ar);return Me$1(rr)?rr.then(ar=>nr(ar)):nr(rr)}unwrap(){return this._def.innerType}}function an(tr,er){const rr=typeof tr=="function"?tr(er):typeof tr=="string"?{message:tr}:tr;return typeof rr=="string"?{message:rr}:rr}function rn(tr){let er=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},rr=arguments.length>2?arguments[2]:void 0;return tr?Tt.create().superRefine((nr,ar)=>{var sr,ir;const or=tr(nr);if(or instanceof Promise)return or.then(cr=>{var lr,dr;if(!cr){const pr=an(er,nr),hr=(dr=(lr=pr.fatal)!==null&&lr!==void 0?lr:rr)===null||dr===void 0||dr;ar.addIssue(br(ur({code:"custom"},pr),{fatal:hr}))}});if(!or){const cr=an(er,nr),lr=(ir=(sr=cr.fatal)!==null&&sr!==void 0?sr:rr)===null||ir===void 0||ir;ar.addIssue(br(ur({code:"custom"},cr),{fatal:lr}))}}):Tt.create()}nn.create=(tr,er)=>new nn(ur({innerType:tr,typeName:on.ZodReadonly},We$1(er)));const sn={object:Pt.lazycreate};var on;(function(tr){tr.ZodString="ZodString",tr.ZodNumber="ZodNumber",tr.ZodNaN="ZodNaN",tr.ZodBigInt="ZodBigInt",tr.ZodBoolean="ZodBoolean",tr.ZodDate="ZodDate",tr.ZodSymbol="ZodSymbol",tr.ZodUndefined="ZodUndefined",tr.ZodNull="ZodNull",tr.ZodAny="ZodAny",tr.ZodUnknown="ZodUnknown",tr.ZodNever="ZodNever",tr.ZodVoid="ZodVoid",tr.ZodArray="ZodArray",tr.ZodObject="ZodObject",tr.ZodUnion="ZodUnion",tr.ZodDiscriminatedUnion="ZodDiscriminatedUnion",tr.ZodIntersection="ZodIntersection",tr.ZodTuple="ZodTuple",tr.ZodRecord="ZodRecord",tr.ZodMap="ZodMap",tr.ZodSet="ZodSet",tr.ZodFunction="ZodFunction",tr.ZodLazy="ZodLazy",tr.ZodLiteral="ZodLiteral",tr.ZodEnum="ZodEnum",tr.ZodEffects="ZodEffects",tr.ZodNativeEnum="ZodNativeEnum",tr.ZodOptional="ZodOptional",tr.ZodNullable="ZodNullable",tr.ZodDefault="ZodDefault",tr.ZodCatch="ZodCatch",tr.ZodPromise="ZodPromise",tr.ZodBranded="ZodBranded",tr.ZodPipeline="ZodPipeline",tr.ZodReadonly="ZodReadonly"})(on||(on={}));const cn=ft.create,dn=vt.create,ln=Yt.create,un=yt.create,hn=bt.create,pn=_t.create,mn=wt.create,fn=kt.create,gn=xt.create,vn=Tt.create,yn=It.create,bn=Ct.create,_n=Ot.create,wn=St.create,kn=Pt.create,xn=Pt.strictCreate,Tn=At.create,In=Nt.create,Cn=Dt.create,On=Lt.create,Sn=Rt.create,En=Mt.create,Pn=zt.create,An=qt.create,Zn=Ht.create,Nn=Ft.create,jn=Ut.create,Dn=Vt.create,Ln=Wt.create,Rn=$t.create,Mn=Kt.create,zn=Gt.create,qn=$t.createWithPreprocess,Hn=tn.create,Fn={string:tr=>ft.create(br(ur({},tr),{coerce:!0})),number:tr=>vt.create(br(ur({},tr),{coerce:!0})),boolean:tr=>bt.create(br(ur({},tr),{coerce:!0})),bigint:tr=>yt.create(br(ur({},tr),{coerce:!0})),date:tr=>_t.create(br(ur({},tr),{coerce:!0}))},Bn=Ze$1;var Un=Object.freeze({__proto__:null,defaultErrorMap:Ce$1,setErrorMap:function(tr){Oe$1=tr},getErrorMap:Se$1,makeIssue:Ee$1,EMPTY_PATH:[],addIssueToContext:Pe$1,ParseStatus:Ae$1,INVALID:Ze$1,DIRTY:Ne$1,OK:je$1,isAborted:De$1,isDirty:Le$1,isValid:Re$1,isAsync:Me$1,get util(){return _e$1},get objectUtil(){return we$1},ZodParsedType:ke$1,getParsedType:xe$1,ZodType:$e$1,datetimeRegex:ht,ZodString:ft,ZodNumber:vt,ZodBigInt:yt,ZodBoolean:bt,ZodDate:_t,ZodSymbol:wt,ZodUndefined:kt,ZodNull:xt,ZodAny:Tt,ZodUnknown:It,ZodNever:Ct,ZodVoid:Ot,ZodArray:St,ZodObject:Pt,ZodUnion:At,ZodDiscriminatedUnion:Nt,ZodIntersection:Dt,ZodTuple:Lt,ZodRecord:Rt,ZodMap:Mt,ZodSet:zt,ZodFunction:qt,ZodLazy:Ht,ZodLiteral:Ft,ZodEnum:Ut,ZodNativeEnum:Vt,ZodPromise:Wt,ZodEffects:$t,ZodTransformer:$t,ZodOptional:Kt,ZodNullable:Gt,ZodDefault:Jt,ZodCatch:Xt,ZodNaN:Yt,BRAND:Qt,ZodBranded:en,ZodPipeline:tn,ZodReadonly:nn,custom:rn,Schema:$e$1,ZodSchema:$e$1,late:sn,get ZodFirstPartyTypeKind(){return on},coerce:Fn,any:vn,array:wn,bigint:un,boolean:hn,date:pn,discriminatedUnion:In,effect:Rn,enum:jn,function:An,instanceof:function(tr){return rn(er=>er instanceof tr,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{message:"Input not instance of ".concat(tr.name)})},intersection:Cn,lazy:Zn,literal:Nn,map:En,nan:ln,nativeEnum:Dn,never:bn,null:gn,nullable:zn,number:dn,object:kn,oboolean:()=>hn().optional(),onumber:()=>dn().optional(),optional:Mn,ostring:()=>cn().optional(),pipeline:Hn,preprocess:qn,promise:Ln,record:Sn,set:Pn,strictObject:xn,string:cn,symbol:mn,transformer:Rn,tuple:On,undefined:fn,union:Tn,unknown:yn,void:_n,NEVER:Bn,ZodIssueCode:Te$1,quotelessJson:tr=>JSON.stringify(tr,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:Ie$1});const Vn=()=>Un.function().args(Un.custom()).returns(Un.boolean().optional());var Wn;Un.object({api:Un.string().refine(tr=>!tr.startsWith("http"),{message:"Just need host part in url"}),project:Un.string().min(1,"Missing value"),title:Un.string().min(1,"Missing value"),enableSSL:Un.boolean(),messageCapacity:Un.number(),useSecret:Un.boolean(),secret:Un.string().refine(tr=>!tr,{message:"Secret is not allowed to be set manually"}),offline:Un.boolean(),serializeData:Un.boolean(),disabledPlugins:Un.array(Un.string()),dataProcessor:Un.object({console:Vn(),network:Vn(),storage:Vn(),database:Vn(),page:Vn(),system:Vn()}).partial().strict()}).partial().strict(),function(tr){tr[tr.CONNECTING=0]="CONNECTING",tr[tr.OPEN=1]="OPEN",tr[tr.CLOSING=2]="CLOSING",tr[tr.CLOSED=3]="CLOSED"}(Wn||(Wn={}));const $n=2e3,Kn=Math.pow(1.5,4)*$n;class Gn{getSocket(){return this.socketWrapper}updateRoomInfo(){if(this.getPageSpyConfig){var er;const{project:rr,title:nr}=this.getPageSpyConfig(),ar=(er=this.getClient)===null||er===void 0?void 0:er.call(this).getName();this.send({type:he$1,content:{info:{name:ar,group:rr,tags:{title:nr,name:ar,group:rr}}}},!0)}}constructor(){t$1(this,"socketUrl",""),t$1(this,"socketConnection",null),t$1(this,"debuggerConnection",null),t$1(this,"pingTimer",null),t$1(this,"pongTimer",null),t$1(this,"retryTimer",null),t$1(this,"isOffline",!1),t$1(this,"messageCapacity",0),t$1(this,"messages",[]),t$1(this,"events",{debug:[],refresh:[],"atom-detail":[],"atom-getter":[],"debugger-online":[],"database-pagination":[],"public-data":[],"harbor-clear":[]}),t$1(this,"retryInterval",$n),t$1(this,"connectable",!0),t$1(this,"getPageSpyConfig",null),t$1(this,"getClient",null),this.addListener("atom-detail",Gn.handleResolveAtom),this.addListener("atom-getter",Gn.handleAtomPropertyGetter),this.addListener("debugger-online",this.handleFlushBuffer)}init(er){return Dr(this,null,function*(){try{var rr,nr,ar,sr,ir;if(!er)throw Error("WebSocket url cannot be empty");this.socketWrapper.clearListeners(),this.socketWrapper.getState()===Wn.OPEN&&(yield new Promise(or=>{this.socketWrapper.onClose(()=>{this.socketWrapper.clearListeners(),or()}),this.socketWrapper.close()})),(rr=this.socketWrapper)===null||rr===void 0||rr.onOpen(()=>{this.connectOnline()}),(nr=this.socketWrapper)===null||nr===void 0||nr.onMessage(or=>{this.handleMessage(or)}),(ar=this.socketWrapper)===null||ar===void 0||ar.onClose(()=>{this.connectOffline()}),(sr=this.socketWrapper)===null||sr===void 0||sr.onError(()=>{this.connectOffline()}),this.socketUrl=er,(ir=this.socketWrapper)===null||ir===void 0||ir.init(er)}catch(or){g$1.error(or.message)}})}addListener(er,rr){this.events[er]||(this.events[er]=[]),this.events[er].push(rr)}removeListener(er,rr){const nr=this.events[er]||[],ar=nr.indexOf(rr);ar>-1&&nr.splice(ar,1)}broadcastMessage(er){let rr=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const nr=function(ar){return{type:le$1,content:{data:ar}}}(er);this.send(nr,rr)}close(){var er;this.connectable=!1,this.clearPing(),(er=this.socketWrapper)===null||er===void 0||er.close(),this.messages=[],Object.entries(this.events).forEach(rr=>{let[nr,ar]=rr;["atom-detail","atom-getter","debugger-online"].includes(nr)||ar.splice(0)})}connectOnline(){this.retryInterval=$n,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<Kn&&(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(er){var rr;Gn.messageFilters.length&&Gn.messageFilters.forEach(mr=>{er=mr(er)});const{CONNECT:nr,MESSAGE:ar,ERROR:sr,JOIN:ir,PING:or,PONG:cr,LEAVE:lr,CLOSE:dr,BROADCAST:pr}=me$1,hr=JSON.parse(er.data),{type:fr}=hr;switch(fr){case nr:const{selfConnection:mr,roomConnections:gr}=hr.content;this.socketConnection=mr,this.debuggerConnection=gr.find(Rr=>Rr.userId==="Debugger")||null;break;case ir:case lr:const{connection:vr}=hr.content;vr.userId==="Debugger"&&(fr===ir?(this.debuggerConnection=vr,this.sendClientInfo()):this.debuggerConnection=null);break;case ar:const{data:yr,from:Ir,to:Pr}=hr.content;Pr.address===((rr=this.socketConnection)===null||rr===void 0?void 0:rr.address)&&this.dispatchEvent(yr.type,{source:yr,from:Ir,to:Pr});break;case dr:case sr:this.connectOffline()}this.handlePong()}dispatchEvent(er,rr){var nr;["public-data"].includes(er)?this.events["public-data"].forEach(ar=>{ar(rr)}):(nr=this.events[er])===null||nr===void 0||nr.forEach(ar=>{ar.call(this,rr,sr=>{this.unicastMessage(sr,rr.from)})})}unicastMessage(er,rr){const nr=function(ar,sr,ir){return{type:de$1,content:{data:ar,from:sr,to:ir}}}(er,this.socketConnection,rr);this.send(nr)}handleFlushBuffer(er){const{latestId:rr}=er.source.data,nr=this.messages.findIndex(ar=>ar.content.data.data.id===rr);this.messages.slice(nr+1).forEach(ar=>{const sr={type:de$1,content:{data:ar.content.data,from:this.socketConnection,to:er.from}};this.send(sr,!0)})}static handleResolveAtom(er,rr){let{source:nr}=er;const{type:ar,data:sr}=nr;if(ar==="atom-detail"){const ir=be$1.get(sr)||{};rr(fe$1("atom-detail-".concat(sr),ir,!1))}}static handleAtomPropertyGetter(er,rr){let{source:nr}=er;const{type:ar,data:sr}=nr;if(ar==="atom-getter"){const{id:or,parentId:cr,key:lr,instanceId:dr}=sr,pr=be$1.getOrigin(dr),hr=be$1.getOrigin(cr);let fr={};var ir;pr&&hr?fr=(ir=Object.getOwnPropertyDescriptor(hr,lr))===null||ir===void 0||(ir=ir.get)===null||ir===void 0?void 0:ir.call(pr):fr=new Error("Getter computed failed"),rr(fe$1("atom-getter-".concat(or),be$1.transformToAtom(fr)))}}send(er){let rr=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(this.checkIfSend(er))try{var nr;const ar=er;ar.createdAt=Date.now(),ar.requestId=a$1();const sr=function(ir){const{ok:or,value:cr}=p$1(ir);return or?cr:JSON.stringify(ir,(lr,dr)=>p$1(dr).value,2)}(ar);(nr=this.socketWrapper)===null||nr===void 0||nr.send(sr)}catch(ar){g$1.error("Incompatible: ".concat(ar.message)),this.connectOffline()}this.checkIfCache(er,rr)&&(this.messageCapacity!==0&&this.messages.length>=this.messageCapacity&&this.messages.shift(),this.messages.push(er))}checkIfSend(er){return this.socketWrapper.getState()===Wn.OPEN&&(!![he$1,ue$1].includes(er.type)||!!this.debuggerConnection)}checkIfCache(er){let rr=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return!this.isOffline&&!rr&&![de$1,ue$1].includes(er.type)}sendClientInfo(){var er;const rr=(er=this.getClient)===null||er===void 0?void 0:er.call(this).makeClientInfoMsg();this.broadcastMessage({role:"client",type:"client-info",data:rr},!0)}}t$1(Gn,"messageFilters",[]);const Jn=function(){if(n$1()){const{lang:tr}=document.documentElement;return tr?l$1.some(er=>er===tr):l$1.some(er=>er===navigator.language)}return!1}()?"zh":"en",Xn=new class{constructor(tr){t$1(this,"locales",void 0),t$1(this,"currentLang",void 0);const{locales:er,defaultLang:rr=Jn}=tr;if(!er||Object.keys(er).length===0)throw new Error("[PageSpy] Locales cannot be empty");if(!er[rr])throw new Error('[PageSpy] Language "'.concat(rr,'" not found'));this.locales=er,this.currentLang=rr}t(tr,er){const rr=er||this.currentLang,nr=this.locales[rr];return nr?nr[tr]||tr:(g$1.warn("Language '".concat(rr,"' not found, falling back to default")),tr)}setLang(tr){this.locales[tr]?this.currentLang=tr:g$1.error("Language '".concat(tr,"' 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 Yn=0;const Qn="PERIOD_DIVIDE_IDENTIFIER",ea=10485760;class ta{constructor(er){var rr;t$1(this,"stock",[]),t$1(this,"container",[]),t$1(this,"maximum",ea),t$1(this,"periodList",{stable:[],active:[]}),i$1(rr=er==null?void 0:er.maximum)&&rr>=0&&(this.maximum=er.maximum),n$1()&&window.addEventListener("beforeunload",()=>{this.stock.forEach(nr=>{URL.revokeObjectURL(nr)})})}add(er){const rr=this.periodList.active.length===0&&this.stock.length===0&&this.container.length===0,nr=er===Qn;try{if((rr||nr)&&(this.periodList.active.push({time:new Date,stockIndex:null,dataIndex:this.container.length}),nr))return!0;if(this.maximum===0)return this.container.push(er),!0;const{size:ar}=new Blob([JSON.stringify(er)],{type:"application/json"}),sr=Yn+ar;if(sr>=this.maximum){const ir=URL.createObjectURL(new Blob([JSON.stringify(this.container)],{type:"application/json"}));this.stock.push(ir),this.flushActivePeriod(),this.container=[er],Yn=0}else this.container.push(er),Yn=sr;return!0}catch(ar){return!1}}flushActivePeriod(){const er=this.periodList.active.map(rr=>br(ur({},rr),{stockIndex:this.stock.length-1}));this.periodList.stable.push(...er),this.periodList.active=[]}getPeriodList(){const er={time:new Date,stockIndex:null,dataIndex:this.container.length};return[...this.periodList.stable,...this.periodList.active,er]}getPeriodData(er){return Dr(this,null,function*(){const{head:rr,tail:nr}=this.getHeadAndTailPeriods(er),{endTime:ar}=er,{stockIndex:sr=null,dataIndex:ir}=rr||{},{stockIndex:or=null,dataIndex:cr}=nr||{};let lr=[];if(sr===null&&or===null)lr=this.container.slice(ir,cr);else{if(sr===null)throw new Error(Xn.t("invalidPeriods"));lr=(yield Promise.all(this.stock.map((dr,pr)=>Dr(this,null,function*(){try{if(pr<sr||i$1(or)&&pr>or)return null;const hr=yield fetch(dr);if(!hr.ok)return null;const fr=yield hr.json();return pr===sr?pr===or?fr.slice(ir,cr):fr.slice(ir):pr===or?fr.slice(0,cr):fr}catch(hr){return null}})))).reduce((dr,pr)=>pr?dr.concat(pr):dr,[]),i$1(or)||(lr=lr.concat(this.container.slice(0,cr)))}return lr.filter(dr=>dr.timestamp<=ar)})}getHeadAndTailPeriods(er){let{startTime:rr,endTime:nr}=er;const ar=this.getPeriodList(),sr=ar.findLast(or=>or.time.getTime()<=rr),ir=ar.find(or=>or.time.getTime()>=nr);return{head:sr,tail:ir}}getAll(){return Dr(this,null,function*(){return(yield Promise.all(this.stock.map(rr=>Dr(this,null,function*(){try{const nr=yield fetch(rr);return nr.ok?yield nr.json():null}catch(nr){return null}})))).filter(Boolean).reduce((rr,nr)=>rr.concat(nr),[]).concat(this.container)})}clear(){this.stock.forEach(er=>URL.revokeObjectURL(er)),this.stock=[],this.container=[],this.periodList={stable:[],active:[]}}}function na(tr){return tr&&tr.__esModule&&Object.prototype.hasOwnProperty.call(tr,"default")?tr.default:tr}var aa=function(){var tr=document.getSelection();if(!tr.rangeCount)return function(){};for(var er=document.activeElement,rr=[],nr=0;nr<tr.rangeCount;nr++)rr.push(tr.getRangeAt(nr));switch(er.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":er.blur();break;default:er=null}return tr.removeAllRanges(),function(){tr.type==="Caret"&&tr.removeAllRanges(),tr.rangeCount||rr.forEach(function(ar){tr.addRange(ar)}),er&&er.focus()}},ra={"text/plain":"Text","text/html":"Url",default:"Text"},sa=function(tr,er){var rr,nr,ar,sr,ir,or,cr=!1;er||(er={}),rr=er.debug||!1;try{if(ar=aa(),sr=document.createRange(),ir=document.getSelection(),(or=document.createElement("span")).textContent=tr,or.ariaHidden="true",or.style.all="unset",or.style.position="fixed",or.style.top=0,or.style.clip="rect(0, 0, 0, 0)",or.style.whiteSpace="pre",or.style.webkitUserSelect="text",or.style.MozUserSelect="text",or.style.msUserSelect="text",or.style.userSelect="text",or.addEventListener("copy",function(lr){if(lr.stopPropagation(),er.format)if(lr.preventDefault(),lr.clipboardData===void 0){rr&&console.warn("unable to use e.clipboardData"),rr&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var dr=ra[er.format]||ra.default;window.clipboardData.setData(dr,tr)}else lr.clipboardData.clearData(),lr.clipboardData.setData(er.format,tr);er.onCopy&&(lr.preventDefault(),er.onCopy(lr.clipboardData))}),document.body.appendChild(or),sr.selectNodeContents(or),ir.addRange(sr),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");cr=!0}catch(lr){rr&&console.error("unable to copy using execCommand: ",lr),rr&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(er.format||"text",tr),er.onCopy&&er.onCopy(window.clipboardData),cr=!0}catch(dr){rr&&console.error("unable to copy using clipboardData: ",dr),rr&&console.error("falling back to prompt"),nr=function(pr){var hr=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return pr.replace(/#{\s*key\s*}/g,hr)}("message"in er?er.message:"Copy to clipboard: #{key}, Enter"),window.prompt(nr,tr)}}finally{ir&&(typeof ir.removeRange=="function"?ir.removeRange(sr):ir.removeAllRanges()),or&&document.body.removeChild(or),ar()}return cr},ia=na(sa),oa="content-LZZnQ",ca="timeInfo-Icd9h",da="recorder-BbZe0",la="paused-ByjEq",ua="duration-xNczp",ha="colon-layOC",pa="pauseIcon-3NXkY",ma="infoIcon-EKSZE",fa="pausedInfo-4u2DI",ga="pausedInfoText-FHdmg",va="periodInfo-HnHms",ya="label-attmz",ba="periodTips-F91zM",_a="refreshIcon-9zYat",wa="selectPeriod-h8D6d",ka="track-g8egA",xa="range-cWHDf",Ta="remarkInfo-0rspp",Ia="result-CAAkx";(function(){const tr=document.createElement("style");tr.setAttribute("data-harbor-style","true"),tr.textContent=`.content-LZZnQ {
|
|
481
|
+
padding-top: var(--block-padding);
|
|
482
|
+
}
|
|
483
|
+
.timeInfo-Icd9h {
|
|
484
|
+
display: flex;
|
|
485
|
+
justify-content: center;
|
|
486
|
+
align-items: center;
|
|
487
|
+
}
|
|
488
|
+
.timeInfo-Icd9h .recorder-BbZe0 {
|
|
489
|
+
padding: var(--input-padding-lg);
|
|
490
|
+
font-size: var(--text-base);
|
|
491
|
+
border-radius: 999px;
|
|
492
|
+
transition: background-color 0.15s ease, transform 0.15s ease;
|
|
493
|
+
cursor: pointer;
|
|
494
|
+
-webkit-user-select: none;
|
|
495
|
+
user-select: none;
|
|
496
|
+
background-color: hsl(0, 0%, 94%);
|
|
497
|
+
}
|
|
498
|
+
.timeInfo-Icd9h .recorder-BbZe0:hover {
|
|
499
|
+
background-color: hsl(0, 0%, 90%);
|
|
500
|
+
}
|
|
501
|
+
.timeInfo-Icd9h .recorder-BbZe0:active {
|
|
502
|
+
transform: scale(0.95);
|
|
503
|
+
}
|
|
504
|
+
.timeInfo-Icd9h .recorder-BbZe0.paused-ByjEq > div:nth-child(1) {
|
|
505
|
+
display: none;
|
|
506
|
+
}
|
|
507
|
+
.timeInfo-Icd9h .recorder-BbZe0.paused-ByjEq > div:nth-child(2) {
|
|
508
|
+
display: flex;
|
|
509
|
+
}
|
|
510
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div {
|
|
511
|
+
gap: var(--input-padding-lg);
|
|
512
|
+
}
|
|
513
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1) {
|
|
514
|
+
display: flex;
|
|
515
|
+
align-items: center;
|
|
516
|
+
position: relative;
|
|
517
|
+
}
|
|
518
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1)::before {
|
|
519
|
+
content: '';
|
|
520
|
+
width: 1.07142857em;
|
|
521
|
+
height: 1.07142857em;
|
|
522
|
+
border-radius: 1.07142857em;
|
|
523
|
+
background-color: #ff0f0f;
|
|
524
|
+
animation: fade-uxQdC 0.8s ease-in-out infinite alternate;
|
|
525
|
+
}
|
|
526
|
+
@keyframes fade-uxQdC {
|
|
527
|
+
from {
|
|
528
|
+
opacity: 1;
|
|
529
|
+
}
|
|
530
|
+
to {
|
|
531
|
+
opacity: 0.05;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1) .duration-xNczp {
|
|
535
|
+
display: flex;
|
|
536
|
+
align-items: center;
|
|
537
|
+
font-size: var(--text-3xl);
|
|
538
|
+
font-weight: 700;
|
|
539
|
+
}
|
|
540
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1) .duration-xNczp span {
|
|
541
|
+
display: inline-flex;
|
|
542
|
+
justify-content: center;
|
|
543
|
+
align-items: center;
|
|
544
|
+
width: 0.64em;
|
|
545
|
+
}
|
|
546
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(1) .duration-xNczp span.colon-layOC {
|
|
547
|
+
width: 0.36em;
|
|
548
|
+
}
|
|
549
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) {
|
|
550
|
+
display: none;
|
|
551
|
+
align-items: center;
|
|
552
|
+
color: var(--text-primary);
|
|
553
|
+
}
|
|
554
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) b {
|
|
555
|
+
color: var(--text-primary);
|
|
556
|
+
font-size: var(--text-3xl);
|
|
557
|
+
font-weight: 700;
|
|
558
|
+
}
|
|
559
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) svg {
|
|
560
|
+
width: 1em;
|
|
561
|
+
height: 1em;
|
|
562
|
+
}
|
|
563
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pauseIcon-3NXkY {
|
|
564
|
+
font-size: var(--text-3xl);
|
|
565
|
+
}
|
|
566
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .infoIcon-EKSZE {
|
|
567
|
+
font-size: var(--text-lg);
|
|
568
|
+
}
|
|
569
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI {
|
|
570
|
+
position: relative;
|
|
571
|
+
}
|
|
572
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI:hover .pausedInfoText-FHdmg,
|
|
573
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI:active .pausedInfoText-FHdmg {
|
|
574
|
+
display: block;
|
|
575
|
+
}
|
|
576
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI .pausedInfoText-FHdmg {
|
|
577
|
+
display: none;
|
|
578
|
+
position: absolute;
|
|
579
|
+
left: 0;
|
|
580
|
+
top: 0;
|
|
581
|
+
transform: translate(-65%, -170%);
|
|
582
|
+
white-space: nowrap;
|
|
583
|
+
font-size: var(--text-base);
|
|
584
|
+
color: var(--text-primary);
|
|
585
|
+
background-color: #fff;
|
|
586
|
+
padding: var(--input-padding-lg);
|
|
587
|
+
border-radius: 0.29em;
|
|
588
|
+
box-shadow: var(--dark-shadow);
|
|
589
|
+
z-index: 1;
|
|
590
|
+
}
|
|
591
|
+
.timeInfo-Icd9h .recorder-BbZe0 > div:nth-child(2) .pausedInfo-4u2DI .pausedInfoText-FHdmg::before {
|
|
592
|
+
content: '';
|
|
593
|
+
position: absolute;
|
|
594
|
+
left: 65%;
|
|
595
|
+
bottom: 0;
|
|
596
|
+
transform: translate(0, 30%) rotate(45deg);
|
|
597
|
+
width: 0.86em;
|
|
598
|
+
height: 0.86em;
|
|
599
|
+
background-color: #fff;
|
|
600
|
+
border-radius: 2px;
|
|
601
|
+
z-index: -1;
|
|
602
|
+
}
|
|
603
|
+
.periodInfo-HnHms {
|
|
604
|
+
margin-top: 1.43em;
|
|
605
|
+
}
|
|
606
|
+
.periodInfo-HnHms .label-attmz {
|
|
607
|
+
display: flex;
|
|
608
|
+
justify-content: space-between;
|
|
609
|
+
align-items: center;
|
|
610
|
+
margin-bottom: 2.29em;
|
|
611
|
+
}
|
|
612
|
+
.periodInfo-HnHms .label-attmz .periodTips-F91zM {
|
|
613
|
+
display: flex;
|
|
614
|
+
align-items: center;
|
|
615
|
+
gap: var(--gap);
|
|
616
|
+
}
|
|
617
|
+
.periodInfo-HnHms .label-attmz .periodTips-F91zM b {
|
|
618
|
+
font-size: 1em;
|
|
619
|
+
color: var(--text-primary);
|
|
620
|
+
}
|
|
621
|
+
.periodInfo-HnHms .label-attmz .periodTips-F91zM span {
|
|
622
|
+
color: var(--text-secondary);
|
|
623
|
+
font-size: var(--text-sm);
|
|
624
|
+
}
|
|
625
|
+
.periodInfo-HnHms .label-attmz .refreshIcon-9zYat {
|
|
626
|
+
cursor: pointer;
|
|
627
|
+
}
|
|
628
|
+
.periodInfo-HnHms .label-attmz .refreshIcon-9zYat svg {
|
|
629
|
+
width: 1.71em;
|
|
630
|
+
height: 1.71em;
|
|
631
|
+
color: var(--primary-color);
|
|
632
|
+
}
|
|
633
|
+
.periodInfo-HnHms .selectPeriod-h8D6d {
|
|
634
|
+
position: relative;
|
|
635
|
+
width: 92%;
|
|
636
|
+
margin: 0 auto;
|
|
637
|
+
--thumb-size: 1.71em;
|
|
638
|
+
--thumb-shadow: 0 0 0 5px var(--primary-color) inset, 0 0 0 99px white inset;
|
|
639
|
+
--thumb-shadow-hover: 0 0 0 7px var(--primary-color) inset,
|
|
640
|
+
0 0 0 99px white inset;
|
|
641
|
+
--thumb-shadow-disabled: 0 0 0 5px var(--disabled-color) inset,
|
|
642
|
+
0 0 0 99px white inset;
|
|
643
|
+
--track-size: calc(var(--thumb-size) / 2);
|
|
644
|
+
}
|
|
645
|
+
.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG {
|
|
646
|
+
cursor: not-allowed;
|
|
647
|
+
}
|
|
648
|
+
.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG .track-g8egA .range-cWHDf {
|
|
649
|
+
background-color: var(--disabled-color);
|
|
650
|
+
}
|
|
651
|
+
.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG input:disabled {
|
|
652
|
+
--thumb-shadow: var(--thumb-shadow-disabled);
|
|
653
|
+
}
|
|
654
|
+
.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG input:disabled::-webkit-slider-thumb {
|
|
655
|
+
cursor: not-allowed;
|
|
656
|
+
}
|
|
657
|
+
.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG input:disabled::-moz-range-thumb {
|
|
658
|
+
cursor: not-allowed;
|
|
659
|
+
}
|
|
660
|
+
.periodInfo-HnHms .selectPeriod-h8D6d.disabled-wsWXG input:disabled::-ms-thumb {
|
|
661
|
+
cursor: not-allowed;
|
|
662
|
+
}
|
|
663
|
+
.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA {
|
|
664
|
+
width: 100%;
|
|
665
|
+
height: var(--track-size);
|
|
666
|
+
background-color: var(--divider-color);
|
|
667
|
+
border-radius: var(--track-size);
|
|
668
|
+
}
|
|
669
|
+
.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf {
|
|
670
|
+
--left: 0;
|
|
671
|
+
--right: 0;
|
|
672
|
+
--min-text: 'From';
|
|
673
|
+
--max-text: 'To';
|
|
674
|
+
position: absolute;
|
|
675
|
+
left: var(--left);
|
|
676
|
+
right: var(--right);
|
|
677
|
+
height: 100%;
|
|
678
|
+
background-color: var(--primary-color);
|
|
679
|
+
border-radius: var(--track-size);
|
|
680
|
+
}
|
|
681
|
+
.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf[data-min-text-position='bottom']::before {
|
|
682
|
+
top: calc(var(--thumb-size));
|
|
683
|
+
}
|
|
684
|
+
.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf[data-max-text-position='bottom']::after {
|
|
685
|
+
top: calc(var(--thumb-size));
|
|
686
|
+
}
|
|
687
|
+
.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf::before,
|
|
688
|
+
.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf::after {
|
|
689
|
+
position: absolute;
|
|
690
|
+
top: calc(var(--thumb-size) * -1);
|
|
691
|
+
transition: top 0.15s ease-in-out;
|
|
692
|
+
font-size: var(--text-base);
|
|
693
|
+
font-weight: 500;
|
|
694
|
+
color: var(--text-placeholder);
|
|
695
|
+
}
|
|
696
|
+
.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf::before {
|
|
697
|
+
content: var(--min-text);
|
|
698
|
+
left: 0;
|
|
699
|
+
transform: translateX(-50%) scale(0.8);
|
|
700
|
+
}
|
|
701
|
+
.periodInfo-HnHms .selectPeriod-h8D6d .track-g8egA .range-cWHDf::after {
|
|
702
|
+
content: var(--max-text);
|
|
703
|
+
right: 0;
|
|
704
|
+
transform: translateX(50%) scale(0.8);
|
|
705
|
+
}
|
|
706
|
+
.periodInfo-HnHms .selectPeriod-h8D6d input {
|
|
707
|
+
-webkit-appearance: none;
|
|
708
|
+
appearance: none;
|
|
709
|
+
pointer-events: none;
|
|
710
|
+
position: absolute;
|
|
711
|
+
left: calc(var(--track-size) * -1);
|
|
712
|
+
top: 0;
|
|
713
|
+
width: calc(100% + var(--thumb-size));
|
|
714
|
+
height: var(--track-size);
|
|
715
|
+
background-color: transparent;
|
|
716
|
+
z-index: 2;
|
|
717
|
+
}
|
|
718
|
+
.periodInfo-HnHms .selectPeriod-h8D6d input:hover {
|
|
719
|
+
--thumb-shadow: var(--thumb-shadow-hover);
|
|
720
|
+
}
|
|
721
|
+
.periodInfo-HnHms .selectPeriod-h8D6d input::-webkit-slider-thumb {
|
|
722
|
+
-webkit-appearance: none;
|
|
723
|
+
appearance: none;
|
|
724
|
+
pointer-events: auto;
|
|
725
|
+
width: var(--thumb-size);
|
|
726
|
+
height: var(--thumb-size);
|
|
727
|
+
border-radius: var(--thumb-size);
|
|
728
|
+
background-color: white;
|
|
729
|
+
box-shadow: var(--thumb-shadow);
|
|
730
|
+
cursor: grab;
|
|
731
|
+
-webkit-transition: 0.15s;
|
|
732
|
+
transition: 0.15s;
|
|
733
|
+
border: 0.14em solid white;
|
|
734
|
+
}
|
|
735
|
+
.periodInfo-HnHms .selectPeriod-h8D6d input::-moz-range-thumb {
|
|
736
|
+
appearance: none;
|
|
737
|
+
pointer-events: auto;
|
|
738
|
+
width: var(--thumb-size);
|
|
739
|
+
height: var(--thumb-size);
|
|
740
|
+
border-radius: var(--thumb-size);
|
|
741
|
+
background-color: white;
|
|
742
|
+
box-shadow: var(--thumb-shadow);
|
|
743
|
+
cursor: grab;
|
|
744
|
+
-moz-transition: 0.15s;
|
|
745
|
+
transition: 0.15s;
|
|
746
|
+
border: 0.14em solid white;
|
|
747
|
+
}
|
|
748
|
+
.periodInfo-HnHms .selectPeriod-h8D6d input::-ms-thumb {
|
|
749
|
+
appearance: none;
|
|
750
|
+
pointer-events: auto;
|
|
751
|
+
width: var(--thumb-size);
|
|
752
|
+
height: var(--thumb-size);
|
|
753
|
+
border-radius: var(--thumb-size);
|
|
754
|
+
background-color: white;
|
|
755
|
+
box-shadow: var(--thumb-shadow);
|
|
756
|
+
cursor: grab;
|
|
757
|
+
-ms-transition: 0.15s;
|
|
758
|
+
transition: 0.15s;
|
|
759
|
+
border: 0.14em solid white;
|
|
760
|
+
}
|
|
761
|
+
.remarkInfo-0rspp {
|
|
762
|
+
margin-top: 1.43em;
|
|
763
|
+
}
|
|
764
|
+
.remarkInfo-0rspp .label-attmz {
|
|
765
|
+
margin-bottom: 0.86em;
|
|
766
|
+
font-size: 1em;
|
|
767
|
+
font-weight: 700;
|
|
768
|
+
color: var(--text-primary);
|
|
769
|
+
}
|
|
770
|
+
.remarkInfo-0rspp textarea {
|
|
771
|
+
width: 100%;
|
|
772
|
+
padding: var(--input-padding);
|
|
773
|
+
background-color: hsl(0, 0%, 95%);
|
|
774
|
+
border-radius: 0.29em;
|
|
775
|
+
box-sizing: border-box;
|
|
776
|
+
border: var(--border);
|
|
777
|
+
outline: none;
|
|
778
|
+
color: var(--text-primary);
|
|
779
|
+
font-size: var(--text-base);
|
|
780
|
+
line-height: 1.5;
|
|
781
|
+
font-family: var(--font-family);
|
|
782
|
+
}
|
|
783
|
+
.remarkInfo-0rspp textarea:focus,
|
|
784
|
+
.remarkInfo-0rspp textarea:active {
|
|
785
|
+
border-color: var(--primary-color);
|
|
786
|
+
}
|
|
787
|
+
.result-CAAkx {
|
|
788
|
+
display: flex;
|
|
789
|
+
justify-content: center;
|
|
790
|
+
align-items: center;
|
|
791
|
+
gap: var(--gap-lg);
|
|
792
|
+
padding-top: var(--gap-lg);
|
|
793
|
+
padding-bottom: var(--gap-lg);
|
|
794
|
+
}
|
|
795
|
+
.result-CAAkx svg {
|
|
796
|
+
width: 2.86em;
|
|
797
|
+
height: 2.86em;
|
|
798
|
+
color: var(--primary-color);
|
|
799
|
+
}
|
|
800
|
+
.result-CAAkx b {
|
|
801
|
+
font-size: var(--text-lg);
|
|
802
|
+
}
|
|
803
|
+
`,window.dataHarborStyles&&Array.isArray(window.dataHarborStyles)||(window.dataHarborStyles=[]),window.dataHarborStyles.push(tr)})();function Ca(tr){return tr<10?.2:tr<30?.16:.135}const Oa=tr=>{let{plugin:er,modal:rr,toast:nr}=tr;const ar=new DOMParser().parseFromString(`
|
|
804
|
+
<!-- Add button for default modal -->
|
|
805
|
+
<button class="page-spy-btn" data-dashed id="open-log-action">
|
|
806
|
+
`.concat(`
|
|
807
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
808
|
+
<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"/>
|
|
809
|
+
</svg>`,`
|
|
810
|
+
<span>`).concat(Xn.t("title"),`</span>
|
|
811
|
+
</button>
|
|
812
|
+
|
|
813
|
+
<!-- Show modal content on button#open-log-action clicked -->
|
|
814
|
+
<div class="`).concat(oa,`">
|
|
815
|
+
<div class="`).concat(ca,`">
|
|
816
|
+
<div class="`).concat(da,`">
|
|
817
|
+
<div>
|
|
818
|
+
<span class="`).concat(ua,`">--</span>
|
|
819
|
+
</div>
|
|
820
|
+
<div>
|
|
821
|
+
<span class="`).concat(pa,'">').concat(`
|
|
822
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
823
|
+
<path fill="currentColor"
|
|
824
|
+
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" />
|
|
825
|
+
</svg>
|
|
826
|
+
`,`</span>
|
|
827
|
+
<b>`).concat(Xn.t("paused"),`</b>
|
|
828
|
+
<div class="`).concat(fa,`">
|
|
829
|
+
<span class="`).concat(ma,'">').concat(`
|
|
830
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
831
|
+
<path fill="currentColor"
|
|
832
|
+
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" />
|
|
833
|
+
</svg>
|
|
834
|
+
`,`</span>
|
|
835
|
+
<div class="`).concat(ga,`">
|
|
836
|
+
<span>`).concat(Xn.t("pausedInfoText"),`</span>
|
|
837
|
+
</div>
|
|
838
|
+
</div>
|
|
839
|
+
</div>
|
|
840
|
+
</div>
|
|
841
|
+
</div>
|
|
842
|
+
<div class="`).concat(va,`">
|
|
843
|
+
<div class="`).concat(ya,`">
|
|
844
|
+
<div class="`).concat(ba,`">
|
|
845
|
+
<b>`).concat(Xn.t("selectPeriod"),`</b>
|
|
846
|
+
</div>
|
|
847
|
+
<div class="`).concat(_a,'">').concat(`
|
|
848
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
849
|
+
<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"/>
|
|
850
|
+
</svg>
|
|
851
|
+
`,`</div>
|
|
852
|
+
</div>
|
|
853
|
+
<div class="`).concat(wa,`">
|
|
854
|
+
<div class="`).concat(ka,`">
|
|
855
|
+
<div class="`).concat(xa,`"></div>
|
|
856
|
+
</div>
|
|
857
|
+
<input type="range" id="period-min" min="0" step="1" />
|
|
858
|
+
<input type="range" id="period-max" min="0" step="1" />
|
|
859
|
+
</div>
|
|
860
|
+
</div>
|
|
861
|
+
<div class="`).concat(Ta,`">
|
|
862
|
+
<div class="`).concat(ya,'">').concat(Xn.t("remark"),`</div>
|
|
863
|
+
<textarea rows="4" id="harbor-remark" placeholder="`).concat(Xn.t("remarkPlaceholder"),`"></textarea>
|
|
864
|
+
</div>
|
|
865
|
+
</div>
|
|
866
|
+
|
|
867
|
+
<!-- Upload / Download log button -->
|
|
868
|
+
<button class="page-spy-btn" data-primary id="upload-periods">
|
|
869
|
+
`).concat(`
|
|
870
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
871
|
+
<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"/>
|
|
872
|
+
</svg>
|
|
873
|
+
`,`
|
|
874
|
+
<span>`).concat(Xn.t("uploadPeriods"),`</span>
|
|
875
|
+
</button>
|
|
876
|
+
<button class="page-spy-btn" id="download-periods">
|
|
877
|
+
`).concat(`
|
|
878
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
879
|
+
<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"/>
|
|
880
|
+
</svg>
|
|
881
|
+
`,`
|
|
882
|
+
<span>`).concat(Xn.t("downloadPeriods"),`</span>
|
|
883
|
+
</button>
|
|
884
|
+
|
|
885
|
+
<!-- Result -->
|
|
886
|
+
<div class="`).concat(Ia,`">
|
|
887
|
+
`).concat(`
|
|
888
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
889
|
+
<path fill="currentColor" fill-rule="evenodd"
|
|
890
|
+
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" />
|
|
891
|
+
</svg>
|
|
892
|
+
`,`
|
|
893
|
+
<b>`).concat(Xn.t("success"),`</b>
|
|
894
|
+
</div>
|
|
895
|
+
|
|
896
|
+
<button class="page-spy-btn" data-primary id="copy-replay-url" data-url>
|
|
897
|
+
`).concat(`
|
|
898
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
899
|
+
<g fill="none" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
|
900
|
+
<path
|
|
901
|
+
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" />
|
|
902
|
+
<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" />
|
|
903
|
+
</g>
|
|
904
|
+
</svg>
|
|
905
|
+
`,`
|
|
906
|
+
<span>`).concat(Xn.t("copyUrl"),`</span>
|
|
907
|
+
</button>
|
|
908
|
+
`),"text/html"),sr=Sr=>ar.querySelector.call(ar,Sr),ir=Sr=>sr(".".concat(Sr)),or=sr("#open-log-action"),cr=ir(oa),lr=ir(_a),dr=ir(xa),pr=sr("#period-min"),hr=sr("#period-max"),fr=sr("#harbor-remark"),mr=sr("#upload-periods"),gr=sr("#download-periods"),vr=ir(Ia),yr=sr("#copy-replay-url"),Ir=ir(da),Pr=ir(ua),Rr=ir(fa),$r={max:0,periods:[],firstTime:0,lastTime:0},_r=()=>{const{max:Sr}=$r,Tr=+pr.value,Cr=+hr.value,Ar=Tr/Sr,Zr=1-Cr/Sr;dr.style.setProperty("--left","".concat((100*Ar).toFixed(3),"%")),dr.style.setProperty("--right","".concat((100*Zr).toFixed(3),"%")),dr.style.setProperty("--min-text",'"'.concat(ce$1(Tr),'"')),dr.style.setProperty("--max-text",'"'.concat(ce$1(Cr),'"'))},kr=()=>{const Sr=er.harbor.getPeriodList(),Tr=Sr[0].time.getTime(),Cr=Sr[Sr.length-1].time.getTime(),Ar=Math.floor((Cr-Tr)/1e3),Zr=Ar.toString();pr.max=Zr,pr.value="0",hr.max=Zr,hr.value=Zr,$r.max=Ar,$r.periods=Sr,$r.firstTime=Tr,$r.lastTime=Cr,_r()},wr=()=>{const{firstTime:Sr}=$r;return{startTime:Sr+1e3*+pr.value,endTime:Sr+1e3*+hr.value,remark:fr.value}};lr.addEventListener("click",()=>{kr(),nr.message(Xn.t("refreshed"))}),pr.addEventListener("input",function(){const Sr=+hr.value,Tr=+this.value;if(Tr>Sr-1)return void(pr.value=String(Sr-1));(Sr-Tr)/$r.max<=Ca($r.max)?dr.dataset.maxTextPosition="bottom":dr.dataset.maxTextPosition="top",dr.dataset.minTextPosition="top",_r()}),hr.addEventListener("input",function(){const Sr=+pr.value,Tr=+this.value;if(Tr<Sr+1)return void(hr.value=String(Sr+1));(Tr-Sr)/$r.max<=Ca($r.max)?dr.dataset.minTextPosition="bottom":dr.dataset.minTextPosition="top",dr.dataset.maxTextPosition="top",_r()}),yr.addEventListener("click",()=>{const{url:Sr}=yr.dataset,Tr=ia(Sr);nr.message(Tr?Xn.t("copied"):Xn.t("copyFailed")),rr.close()}),mr.addEventListener("click",()=>Dr(null,null,function*(){try{mr.disabled=!0;const Sr=yield er.onOfflineLog("upload-periods",wr());yr.dataset.url=Sr,rr.show({content:vr,footer:[yr]})}catch(Sr){g$1.error(Sr),nr.message(Sr.message)}finally{mr.disabled=!1}})),gr.addEventListener("click",()=>Dr(null,null,function*(){try{gr.disabled=!0,yield er.onOfflineLog("download-periods",wr()),nr.message(Xn.t("success"))}catch(Sr){g$1.error(Sr),nr.message(Sr.message)}finally{gr.disabled=!1}}));let Lr=null;const xr=()=>{const{isPaused:Sr,startTimestamp:Tr}=er;if(Sr)Ir.classList.add(la);else if(Ir.classList.remove(la),Tr&&Pr){const Cr=parseInt(String((Date.now()-Tr)/1e3),10);Pr.innerHTML=ce$1(Cr).split("").map(Ar=>'<span class="'.concat(Ar===":"?ha:"duration-item",'">').concat(Ar,"</span>")).join("")}};Ir.addEventListener("click",()=>{er.isPaused?er.resume():er.pause(),xr()}),Rr.addEventListener("click",Sr=>{Sr.stopPropagation(),Sr.preventDefault()}),or==null||or.addEventListener("click",()=>{var Sr;(Sr=er.$pageSpyConfig)!==null&&Sr!==void 0&&Sr.api?mr.disabled=!1:mr.disabled=!0,Lr&&clearInterval(Lr),xr(),Lr=setInterval(xr,1e3),kr(),rr.show({content:cr,footer:[mr,gr]})}),rr.build({footer:[...rr.config.footer,or]})},Sa={maximum:ea,caredData:{console:!0,network:!0,storage:!0,system:!0,"rrweb-event":!0},filename:()=>new Date().toLocaleString(),onDownload:null,onAfterUpload:null};class Ea{constructor(er){t$1(this,"enforce","pre"),t$1(this,"name","DataHarborPlugin"),t$1(this,"apiBase",""),t$1(this,"isPaused",!1),t$1(this,"startTimestamp",0),t$1(this,"periodTimer",null),t$1(this,"$socketStore",null),t$1(this,"$pageSpyConfig",null),this.$harborConfig=ur(ur({},Sa),er),this.harbor=new ta({maximum:this.$harborConfig.maximum})}onInit(er){return Dr(this,null,function*(){let{socketStore:rr,config:nr}=er;if(Ea.hasInited)return;Ea.hasInited=!0,this.$pageSpyConfig=nr,this.$socketStore=rr;const{api:ar,enableSSL:sr,offline:ir,lang:or}=nr;if(or&&Xn.setLang(or),ir||ar){const cr=sr?"https://":"http://";this.apiBase=v$1("".concat(cr).concat(ar))}else g$1.warn("Cannot upload log to PageSpy for miss 'api' configuration. See: ",nr);this.initPeriodTimer(),this.$socketStore.addListener("public-data",cr=>{if(this.isPaused||!this.isCaredPublicData(cr))return;const lr=((dr,pr)=>(sessionStorage.getItem("harbor-debug")&&g$1.unproxy.debug("harbor-debug",pr),{type:dr,timestamp:Date.now(),data:ie$1(pr)}))(cr.type,cr.data);this.startTimestamp||(this.startTimestamp=lr.timestamp),this.harbor.add(lr)||g$1.warn("[".concat(this.name,"] Fail to save data in harbor "),lr)})})}initPeriodTimer(){this.periodTimer&&clearInterval(this.periodTimer),this.periodTimer=setInterval(()=>{var er;this.harbor.add(Qn),(er=this.$socketStore)===null||er===void 0||er.dispatchEvent("harbor-clear",null)},3e5)}onMounted(er){var rr;let{modal:nr,toast:ar,root:sr}=er;Ea.hasMounted||(Ea.hasMounted=!0,(rr=window.dataHarborStyles)===null||rr===void 0||rr.forEach(ir=>{sr.appendChild(ir.cloneNode(!0))}),nr&&ar&&Oa({plugin:this,modal:nr,toast:ar}))}getParams(er,rr){return Dr(this,null,function*(){var nr;let ar;if(["download-periods","upload-periods"].includes(er)){if(!(gr=>!!gr&&["startTime","endTime"].every(vr=>Object.prototype.hasOwnProperty.call(gr,vr)))(rr)||rr.startTime>rr.endTime)throw new Error(Xn.t("invalidParams"));if(ar=yield this.harbor.getPeriodData(rr),!ar.length)throw new Error(Xn.t("noData"));const pr=rr.startTime,hr=ar[0].timestamp,fr=pr<hr?hr:pr;if(ar.filter(gr=>gr.timestamp>=fr&&gr.timestamp<=rr.endTime).length<5)throw new Error(Xn.t("eventCountNotEnough"));ar.push({type:"meta",timestamp:rr.endTime,data:ie$1(br(ur({ua:navigator.userAgent,title:document.title,url:window.location.href},rr),{startTime:fr}))})}else{var sr;if(ar=yield this.harbor.getAll(),!ar.length)throw new Error(Xn.t("noData"));const pr=ar[0].timestamp,hr=ar[ar.length-1].timestamp;ar.push({type:"meta",timestamp:hr,data:ie$1({ua:navigator.userAgent,title:document.title,url:window.location.href,startTime:pr,endTime:hr,remark:(sr=rr==null?void 0:rr.remark)!==null&&sr!==void 0?sr:""})})}const{onDownload:ir,filename:or}=this.$harborConfig;if(er==="download"||er==="download-periods")return{data:ar,filename:or,customDownload:ir};const{project:cr="",title:lr=""}=this.$pageSpyConfig||{},dr={project:cr,title:lr,deviceId:re$1(),userAgent:navigator.userAgent,remark:(nr=rr==null?void 0:rr.remark)!==null&&nr!==void 0?nr:""};if(er==="upload"||er==="upload-periods"){const pr=((fr,mr)=>{const gr=new Blob([JSON.stringify(fr)],{type:"application/json"});return new File([gr],"".concat(se$1(mr),".json"),{type:"application/json"})})(ar,or()),hr=new FormData;return hr.append("log",pr),{url:"".concat(this.apiBase,"/api/v1/log/upload?").concat(new URLSearchParams(dr).toString()),body:hr}}})}onOfflineLog(rr){return Dr(this,arguments,function*(er){let nr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{clearCache:!0,remark:""};const ar=yield this.getParams(er,nr),sr=["upload","upload-periods"].includes(er)?yield(cr=>Dr(this,null,function*(){let{url:lr,body:dr}=cr;try{const pr=yield fetch(lr,{method:"POST",body:dr});if(!pr.ok)return g$1.warn("Upload failed"),null;const hr=yield pr.json();return hr.success?hr:(g$1.warn(hr.message),null)}catch(pr){return g$1.error(pr.message),null}}))(ar):yield(cr=>Dr(this,null,function*(){let{data:lr,filename:dr,customDownload:pr}=cr;if(pr)return void(yield pr(lr));const hr=new Blob([JSON.stringify(lr)],{type:"application/json"}),fr=document.getElementsByTagName("body")[0]||document.documentElement;if(!fr)throw new Error("Download file failed because cannot find the document.body & document.documentElement");const mr=URL.createObjectURL(hr),gr=document.createElement("a");gr.download="".concat(se$1(dr()),".json"),gr.href=mr,gr.style.display="none",fr.insertAdjacentElement("beforeend",gr),gr.click(),fr.removeChild(gr),URL.revokeObjectURL(mr),g$1.info("".concat(Xn.t("success")))}))(ar);if(nr.clearCache===!0&&this.clearAndNotify(),sr){var ir,or;const cr=this.getDebugUrl(sr);return(ir=(or=this.$harborConfig).onAfterUpload)===null||ir===void 0||ir.call(or,cr,ar.remark),cr}})}upload(er){return Dr(this,null,function*(){return yield this.onOfflineLog("upload",er)})}uploadPeriods(er){return Dr(this,null,function*(){return yield this.onOfflineLog("upload-periods",er)})}download(er){return Dr(this,null,function*(){yield this.onOfflineLog("download",er)})}downloadPeriods(er){return Dr(this,null,function*(){yield this.onOfflineLog("download-periods",er)})}onReset(){this.periodTimer&&(clearInterval(this.periodTimer),this.periodTimer=null),this.clearAndNotify(!1),Ea.hasInited=!1,Ea.hasMounted=!1}pause(){this.isPaused=!0}resume(){this.isPaused=!1}reharbor(){this.initPeriodTimer(),this.clearAndNotify(),this.isPaused&&(this.isPaused=!1)}clearAndNotify(){let er=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];var rr;this.harbor.clear(),this.startTimestamp=0,er&&((rr=this.$socketStore)===null||rr===void 0||rr.dispatchEvent("harbor-clear",null))}isCaredPublicData(er){if(!er)return!1;const{type:rr}=er,{caredData:nr}=this.$harborConfig;switch(rr){case"console":case"storage":case"system":case"rrweb-event":return nr[rr];case"network":const{url:ar}=er.data,sr=this.harbor.stock.includes(ar);return!(!nr.network||sr);default:return!1}}getDebugUrl(er){var rr;if(!er||!er.success)return"";const nr="".concat(v$1((rr=this.$pageSpyConfig)===null||rr===void 0?void 0:rr.clientOrigin),"/#/replay"),ar="".concat(this.apiBase,"/api/v1/log/download?fileId=").concat(er.data.fileId);return"".concat(nr,"?url=").concat(ar)}}t$1(Ea,"hasInited",!1),t$1(Ea,"hasMounted",!1);function e(tr){var er=function(rr,nr){if(typeof rr!="object"||!rr)return rr;var ar=rr[Symbol.toPrimitive];if(ar!==void 0){var sr=ar.call(rr,nr);if(typeof sr!="object")return sr;throw new TypeError("@@toPrimitive must return a primitive value.")}return(nr==="string"?String:Number)(rr)}(tr,"string");return typeof er=="symbol"?er:er+""}function t(tr,er,rr){return(er=e(er))in tr?Object.defineProperty(tr,er,{value:rr,enumerable:!0,configurable:!0,writable:!0}):tr[er]=rr,tr}var n;function o(tr){var er=tr==null?void 0:tr.host;return(er==null?void 0:er.shadowRoot)===tr}function r(tr){return Object.prototype.toString.call(tr)==="[object ShadowRoot]"}function i(tr){try{var er=tr.rules||tr.cssRules;return er?((rr=Array.from(er).map(a).join("")).includes(" background-clip: text;")&&!rr.includes(" -webkit-background-clip: text;")&&(rr=rr.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),rr):null}catch(nr){return null}var rr}function a(tr){var er=tr.cssText;if(function(rr){return"styleSheet"in rr}(tr))try{er=i(tr.styleSheet)||er}catch(rr){}return er}(function(tr){tr[tr.Document=0]="Document",tr[tr.DocumentType=1]="DocumentType",tr[tr.Element=2]="Element",tr[tr.Text=3]="Text",tr[tr.CDATA=4]="CDATA",tr[tr.Comment=5]="Comment"})(n||(n={}));var s=function(){function tr(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return tr.prototype.getId=function(er){var rr;if(!er)return-1;var nr=(rr=this.getMeta(er))===null||rr===void 0?void 0:rr.id;return nr!=null?nr:-1},tr.prototype.getNode=function(er){return this.idNodeMap.get(er)||null},tr.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},tr.prototype.getMeta=function(er){return this.nodeMetaMap.get(er)||null},tr.prototype.removeNodeFromMap=function(er){var rr=this,nr=this.getId(er);this.idNodeMap.delete(nr),er.childNodes&&er.childNodes.forEach(function(ar){return rr.removeNodeFromMap(ar)})},tr.prototype.has=function(er){return this.idNodeMap.has(er)},tr.prototype.hasNode=function(er){return this.nodeMetaMap.has(er)},tr.prototype.add=function(er,rr){var nr=rr.id;this.idNodeMap.set(nr,er),this.nodeMetaMap.set(er,rr)},tr.prototype.replace=function(er,rr){var nr=this.getNode(er);if(nr){var ar=this.nodeMetaMap.get(nr);ar&&this.nodeMetaMap.set(rr,ar)}this.idNodeMap.set(er,rr)},tr.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},tr}();function l(tr){var er=tr.maskInputOptions,rr=tr.tagName,nr=tr.type,ar=tr.value,sr=tr.maskInputFn,ir=ar||"";return(er[rr.toLowerCase()]||er[nr])&&(ir=sr?sr(ir):"*".repeat(ir.length)),ir}var c="__rrweb_original__",d,u,h=1,p=new RegExp("[^a-z0-9-_:]"),g=-2;function m(){return h++}var I=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,C=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,f=/^(data:)([^,]*),(.*)/i;function y(tr,er){return(tr||"").replace(I,function(rr,nr,ar,sr,ir,or){var cr,lr=ar||ir||or,dr=nr||sr||"";if(!lr)return rr;if(!C.test(lr)||f.test(lr))return"url(".concat(dr).concat(lr).concat(dr,")");if(lr[0]==="/")return"url(".concat(dr).concat((cr=er,(cr.indexOf("//")>-1?cr.split("/").slice(0,3).join("/"):cr.split("/")[0]).split("?")[0]+lr)).concat(dr,")");var pr=er.split("/"),hr=lr.split("/");pr.pop();for(var fr=0,mr=hr;fr<mr.length;fr++){var gr=mr[fr];gr!=="."&&(gr===".."?pr.pop():pr.push(gr))}return"url(".concat(dr).concat(pr.join("/")).concat(dr,")")})}var v=/^[^ \t\n\r\u000c]+/,S=/^[, \t\n\r\u000c]+/;function b(tr,er){if(!er||er.trim()==="")return er;var rr=tr.createElement("a");return rr.href=er,rr.href}function A(tr){return!!(tr.tagName==="svg"||tr.ownerSVGElement)}function k(){var tr=document.createElement("a");return tr.href="",tr.href}function w(tr,er,rr,nr){return rr==="src"||rr==="href"&&nr&&(er!=="use"||nr[0]!=="#")||rr==="xlink:href"&&nr&&nr[0]!=="#"?b(tr,nr):rr!=="background"||!nr||er!=="table"&&er!=="td"&&er!=="th"?rr==="srcset"&&nr?function(ar,sr){if(sr.trim()==="")return sr;var ir=0;function or(fr){var mr,gr=fr.exec(sr.substring(ir));return gr?(mr=gr[0],ir+=mr.length,mr):""}for(var cr=[];or(S),!(ir>=sr.length);){var lr=or(v);if(lr.slice(-1)===",")lr=b(ar,lr.substring(0,lr.length-1)),cr.push(lr);else{var dr="";lr=b(ar,lr);for(var pr=!1;;){var hr=sr.charAt(ir);if(hr===""){cr.push((lr+dr).trim());break}if(pr)hr===")"&&(pr=!1);else{if(hr===","){ir+=1,cr.push((lr+dr).trim());break}hr==="("&&(pr=!0)}dr+=hr,ir+=1}}}return cr.join(", ")}(tr,nr):rr==="style"&&nr?y(nr,k()):er==="object"&&rr==="data"&&nr?b(tr,nr):nr:b(tr,nr)}function M(tr,er,rr){if(!tr)return!1;if(tr.nodeType!==tr.ELEMENT_NODE)return!!rr&&M(tr.parentNode,er,rr);for(var nr=tr.classList.length;nr--;){var ar=tr.classList[nr];if(er.test(ar))return!0}return!!rr&&M(tr.parentNode,er,rr)}function T(tr,er,rr){var nr=tr.nodeType===tr.ELEMENT_NODE?tr:tr.parentElement;if(nr===null)return!1;if(typeof er=="string"){if(nr.classList.contains(er)||nr.closest(".".concat(er)))return!0}else if(M(nr,er,!0))return!0;return!!(rr&&(nr.matches(rr)||nr.closest(rr)))}function N(tr,er){var rr=er.doc,nr=er.mirror,ar=er.blockClass,sr=er.blockSelector,ir=er.maskTextClass,or=er.maskTextSelector,cr=er.inlineStylesheet,lr=er.maskInputOptions,dr=lr===void 0?{}:lr,pr=er.maskTextFn,hr=er.maskInputFn,fr=er.dataURLOptions,mr=fr===void 0?{}:fr,gr=er.inlineImages,vr=er.recordCanvas,yr=er.keepIframeSrcFn,Ir=er.newlyAddedElement,Pr=Ir!==void 0&&Ir,Rr=function($r,_r){if(_r.hasNode($r)){var kr=_r.getId($r);return kr===1?void 0:kr}}(rr,nr);switch(tr.nodeType){case tr.DOCUMENT_NODE:return tr.compatMode!=="CSS1Compat"?{type:n.Document,childNodes:[],compatMode:tr.compatMode}:{type:n.Document,childNodes:[]};case tr.DOCUMENT_TYPE_NODE:return{type:n.DocumentType,name:tr.name,publicId:tr.publicId,systemId:tr.systemId,rootId:Rr};case tr.ELEMENT_NODE:return function($r,_r){for(var kr=_r.doc,wr=_r.blockClass,Lr=_r.blockSelector,xr=_r.inlineStylesheet,Sr=_r.maskInputOptions,Tr=Sr===void 0?{}:Sr,Cr=_r.maskInputFn,Ar=_r.dataURLOptions,Zr=Ar===void 0?{}:Ar,Mr=_r.inlineImages,jr=_r.recordCanvas,Fr=_r.keepIframeSrcFn,Kr=_r.newlyAddedElement,Xr=Kr!==void 0&&Kr,Jr=_r.rootId,Br=function($a,Ra,La){if(typeof Ra=="string"){if($a.classList.contains(Ra))return!0}else for(var Da=$a.classList.length;Da--;){var ja=$a.classList[Da];if(Ra.test(ja))return!0}return!!La&&$a.matches(La)}($r,wr,Lr),Hr=function($a){if($a instanceof HTMLFormElement)return"form";var Ra=$a.tagName.toLowerCase().trim();return p.test(Ra)?"div":Ra}($r),Nr={},Or=$r.attributes.length,zr=0;zr<Or;zr++){var Aa=$r.attributes[zr];Nr[Aa.name]=w(kr,Hr,Aa.name,Aa.value)}if(Hr==="link"&&xr){var Vr=Array.from(kr.styleSheets).find(function($a){return $a.href===$r.href}),Qr=null;Vr&&(Qr=i(Vr)),Qr&&(delete Nr.rel,delete Nr.href,Nr._cssText=y(Qr,Vr.href))}if(Hr==="style"&&$r.sheet&&!($r.innerText||$r.textContent||"").trim().length&&(Qr=i($r.sheet))&&(Nr._cssText=y(Qr,k())),Hr==="input"||Hr==="textarea"||Hr==="select"){var Ur=$r.value,Er=$r.checked;Nr.type!=="radio"&&Nr.type!=="checkbox"&&Nr.type!=="submit"&&Nr.type!=="button"&&Ur?Nr.value=l({type:Nr.type,tagName:Hr,value:Ur,maskInputOptions:Tr,maskInputFn:Cr}):Er&&(Nr.checked=Er)}if(Hr==="option"&&($r.selected&&!Tr.select?Nr.selected=!0:delete Nr.selected),Hr==="canvas"&&jr){if($r.__context==="2d")(function($a){var Ra=$a.getContext("2d");if(!Ra)return!0;for(var La=0;La<$a.width;La+=50)for(var Da=0;Da<$a.height;Da+=50){var ja=Ra.getImageData,za=c in ja?ja[c]:ja;if(new Uint32Array(za.call(Ra,La,Da,Math.min(50,$a.width-La),Math.min(50,$a.height-Da)).data.buffer).some(function(Ua){return Ua!==0}))return!1}return!0})($r)||(Nr.rr_dataURL=$r.toDataURL(Zr.type,Zr.quality));else if(!("__context"in $r)){var qr=$r.toDataURL(Zr.type,Zr.quality),Gr=document.createElement("canvas");Gr.width=$r.width,Gr.height=$r.height,qr!==Gr.toDataURL(Zr.type,Zr.quality)&&(Nr.rr_dataURL=qr)}}if(Hr==="img"&&Mr){d||(d=kr.createElement("canvas"),u=d.getContext("2d"));var Yr=$r,Wr=Yr.crossOrigin;Yr.crossOrigin="anonymous";var Pa=function(){try{d.width=Yr.naturalWidth,d.height=Yr.naturalHeight,u.drawImage(Yr,0,0),Nr.rr_dataURL=d.toDataURL(Zr.type,Zr.quality)}catch($a){console.warn("Cannot inline img src=".concat(Yr.currentSrc,"! Error: ").concat($a))}Wr?Nr.crossOrigin=Wr:Yr.removeAttribute("crossorigin")};Yr.complete&&Yr.naturalWidth!==0?Pa():Yr.onload=Pa}if(Hr!=="audio"&&Hr!=="video"||(Nr.rr_mediaState=$r.paused?"paused":"played",Nr.rr_mediaCurrentTime=$r.currentTime),Xr||($r.scrollLeft&&(Nr.rr_scrollLeft=$r.scrollLeft),$r.scrollTop&&(Nr.rr_scrollTop=$r.scrollTop)),Br){var Na=$r.getBoundingClientRect(),Ma=Na.width,Za=Na.height;Nr={class:Nr.class,rr_width:"".concat(Ma,"px"),rr_height:"".concat(Za,"px")}}return Hr!=="iframe"||Fr(Nr.src)||($r.contentDocument||(Nr.rr_src=Nr.src),delete Nr.src),{type:n.Element,tagName:Hr,attributes:Nr,childNodes:[],isSVG:A($r)||void 0,needBlock:Br,rootId:Jr}}(tr,{doc:rr,blockClass:ar,blockSelector:sr,inlineStylesheet:cr,maskInputOptions:dr,maskInputFn:hr,dataURLOptions:mr,inlineImages:gr,recordCanvas:vr,keepIframeSrcFn:yr,newlyAddedElement:Pr,rootId:Rr});case tr.TEXT_NODE:return function($r,_r){var kr,wr=_r.maskTextClass,Lr=_r.maskTextSelector,xr=_r.maskTextFn,Sr=_r.rootId,Tr=$r.parentNode&&$r.parentNode.tagName,Cr=$r.textContent,Ar=Tr==="STYLE"||void 0,Zr=Tr==="SCRIPT"||void 0;if(Ar&&Cr){try{$r.nextSibling||$r.previousSibling||!((kr=$r.parentNode.sheet)===null||kr===void 0)&&kr.cssRules&&(Cr=(Mr=$r.parentNode.sheet).cssRules?Array.from(Mr.cssRules).map(function(jr){return jr.cssText||""}).join(""):"")}catch(jr){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(jr),$r)}Cr=y(Cr,k())}var Mr;return Zr&&(Cr="SCRIPT_PLACEHOLDER"),!Ar&&!Zr&&Cr&&T($r,wr,Lr)&&(Cr=xr?xr(Cr):Cr.replace(/[\S]/g,"*")),{type:n.Text,textContent:Cr||"",isStyle:Ar,rootId:Sr}}(tr,{maskTextClass:ir,maskTextSelector:or,maskTextFn:pr,rootId:Rr});case tr.CDATA_SECTION_NODE:return{type:n.CDATA,textContent:"",rootId:Rr};case tr.COMMENT_NODE:return{type:n.Comment,textContent:tr.textContent||"",rootId:Rr};default:return!1}}function R(tr){return tr===void 0?"":tr.toLowerCase()}function O(tr,er){var rr,nr=er.doc,ar=er.mirror,sr=er.blockClass,ir=er.blockSelector,or=er.maskTextClass,cr=er.maskTextSelector,lr=er.skipChild,dr=lr!==void 0&&lr,pr=er.inlineStylesheet,hr=pr===void 0||pr,fr=er.maskInputOptions,mr=fr===void 0?{}:fr,gr=er.maskTextFn,vr=er.maskInputFn,yr=er.slimDOMOptions,Ir=er.dataURLOptions,Pr=Ir===void 0?{}:Ir,Rr=er.inlineImages,$r=Rr!==void 0&&Rr,_r=er.recordCanvas,kr=_r!==void 0&&_r,wr=er.onSerialize,Lr=er.onIframeLoad,xr=er.iframeLoadTimeout,Sr=xr===void 0?5e3:xr,Tr=er.onStylesheetLoad,Cr=er.stylesheetLoadTimeout,Ar=Cr===void 0?5e3:Cr,Zr=er.keepIframeSrcFn,Mr=Zr===void 0?function(){return!1}:Zr,jr=er.newlyAddedElement,Fr=jr!==void 0&&jr,Kr=er.preserveWhiteSpace,Xr=Kr===void 0||Kr,Jr=N(tr,{doc:nr,mirror:ar,blockClass:sr,blockSelector:ir,maskTextClass:or,maskTextSelector:cr,inlineStylesheet:hr,maskInputOptions:mr,maskTextFn:gr,maskInputFn:vr,dataURLOptions:Pr,inlineImages:$r,recordCanvas:kr,keepIframeSrcFn:Mr,newlyAddedElement:Fr});if(!Jr)return console.warn(tr,"not serialized"),null;rr=ar.hasNode(tr)?ar.getId(tr):!function(Er,qr){return!!(qr.comment&&Er.type===n.Comment||Er.type===n.Element&&(qr.script&&(Er.tagName==="script"||Er.tagName==="link"&&Er.attributes.rel==="preload"&&Er.attributes.as==="script"||Er.tagName==="link"&&Er.attributes.rel==="prefetch"&&typeof Er.attributes.href=="string"&&Er.attributes.href.endsWith(".js"))||qr.headFavicon&&(Er.tagName==="link"&&Er.attributes.rel==="shortcut icon"||Er.tagName==="meta"&&(R(Er.attributes.name).match(/^msapplication-tile(image|color)$/)||R(Er.attributes.name)==="application-name"||R(Er.attributes.rel)==="icon"||R(Er.attributes.rel)==="apple-touch-icon"||R(Er.attributes.rel)==="shortcut icon"))||Er.tagName==="meta"&&(qr.headMetaDescKeywords&&R(Er.attributes.name).match(/^description|keywords$/)||qr.headMetaSocial&&(R(Er.attributes.property).match(/^(og|twitter|fb):/)||R(Er.attributes.name).match(/^(og|twitter):/)||R(Er.attributes.name)==="pinterest")||qr.headMetaRobots&&(R(Er.attributes.name)==="robots"||R(Er.attributes.name)==="googlebot"||R(Er.attributes.name)==="bingbot")||qr.headMetaHttpEquiv&&Er.attributes["http-equiv"]!==void 0||qr.headMetaAuthorship&&(R(Er.attributes.name)==="author"||R(Er.attributes.name)==="generator"||R(Er.attributes.name)==="framework"||R(Er.attributes.name)==="publisher"||R(Er.attributes.name)==="progid"||R(Er.attributes.property).match(/^article:/)||R(Er.attributes.property).match(/^product:/))||qr.headMetaVerification&&(R(Er.attributes.name)==="google-site-verification"||R(Er.attributes.name)==="yandex-verification"||R(Er.attributes.name)==="csrf-token"||R(Er.attributes.name)==="p:domain_verify"||R(Er.attributes.name)==="verify-v1"||R(Er.attributes.name)==="verification"||R(Er.attributes.name)==="shopify-checkout-api-token"))))}(Jr,yr)&&(Xr||Jr.type!==n.Text||Jr.isStyle||Jr.textContent.replace(/^\s+|\s+$/gm,"").length)?m():g;var Br=Object.assign(Jr,{id:rr});if(ar.add(tr,Br),rr===g)return null;wr&&wr(tr);var Hr=!dr;if(Br.type===n.Element){Hr=Hr&&!Br.needBlock,delete Br.needBlock;var Nr=tr.shadowRoot;Nr&&r(Nr)&&(Br.isShadowHost=!0)}if((Br.type===n.Document||Br.type===n.Element)&&Hr){yr.headWhitespace&&Br.type===n.Element&&Br.tagName==="head"&&(Xr=!1);for(var Or={doc:nr,mirror:ar,blockClass:sr,blockSelector:ir,maskTextClass:or,maskTextSelector:cr,skipChild:dr,inlineStylesheet:hr,maskInputOptions:mr,maskTextFn:gr,maskInputFn:vr,slimDOMOptions:yr,dataURLOptions:Pr,inlineImages:$r,recordCanvas:kr,preserveWhiteSpace:Xr,onSerialize:wr,onIframeLoad:Lr,iframeLoadTimeout:Sr,onStylesheetLoad:Tr,stylesheetLoadTimeout:Ar,keepIframeSrcFn:Mr},zr=0,Aa=Array.from(tr.childNodes);zr<Aa.length;zr++)(Ur=O(Aa[zr],Or))&&Br.childNodes.push(Ur);if(function(Er){return Er.nodeType===Er.ELEMENT_NODE}(tr)&&tr.shadowRoot)for(var Vr=0,Qr=Array.from(tr.shadowRoot.childNodes);Vr<Qr.length;Vr++){var Ur;(Ur=O(Qr[Vr],Or))&&(r(tr.shadowRoot)&&(Ur.isShadow=!0),Br.childNodes.push(Ur))}}return tr.parentNode&&o(tr.parentNode)&&r(tr.parentNode)&&(Br.isShadow=!0),Br.type===n.Element&&Br.tagName==="iframe"&&function(Er,qr,Gr){var Yr=Er.contentWindow;if(Yr){var Wr,Pa=!1;try{Wr=Yr.document.readyState}catch(Za){return}if(Wr==="complete"){var Na="about:blank";if(Yr.location.href!==Na||Er.src===Na||Er.src==="")return setTimeout(qr,0),Er.addEventListener("load",qr);Er.addEventListener("load",qr)}else{var Ma=setTimeout(function(){Pa||(qr(),Pa=!0)},Gr);Er.addEventListener("load",function(){clearTimeout(Ma),Pa=!0,qr()})}}}(tr,function(){var Er=tr.contentDocument;if(Er&&Lr){var qr=O(Er,{doc:Er,mirror:ar,blockClass:sr,blockSelector:ir,maskTextClass:or,maskTextSelector:cr,skipChild:!1,inlineStylesheet:hr,maskInputOptions:mr,maskTextFn:gr,maskInputFn:vr,slimDOMOptions:yr,dataURLOptions:Pr,inlineImages:$r,recordCanvas:kr,preserveWhiteSpace:Xr,onSerialize:wr,onIframeLoad:Lr,iframeLoadTimeout:Sr,onStylesheetLoad:Tr,stylesheetLoadTimeout:Ar,keepIframeSrcFn:Mr});qr&&Lr(tr,qr)}},Sr),Br.type===n.Element&&Br.tagName==="link"&&Br.attributes.rel==="stylesheet"&&function(Er,qr,Gr){var Yr,Wr=!1;try{Yr=Er.sheet}catch(Na){return}if(!Yr){var Pa=setTimeout(function(){Wr||(qr(),Wr=!0)},Gr);Er.addEventListener("load",function(){clearTimeout(Pa),Wr=!0,qr()})}}(tr,function(){if(Tr){var Er=O(tr,{doc:nr,mirror:ar,blockClass:sr,blockSelector:ir,maskTextClass:or,maskTextSelector:cr,skipChild:!1,inlineStylesheet:hr,maskInputOptions:mr,maskTextFn:gr,maskInputFn:vr,slimDOMOptions:yr,dataURLOptions:Pr,inlineImages:$r,recordCanvas:kr,preserveWhiteSpace:Xr,onSerialize:wr,onIframeLoad:Lr,iframeLoadTimeout:Sr,onStylesheetLoad:Tr,stylesheetLoadTimeout:Ar,keepIframeSrcFn:Mr});Er&&Tr(tr,Er)}},Ar),Br}function E(tr,er){let rr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;const nr={capture:!0,passive:!0};return rr.addEventListener(tr,er,nr),()=>rr.removeEventListener(tr,er,nr)}const F=`Please stop import mirror directly. Instead of that,\r
|
|
909
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
910
|
+
or you can use record.mirror to access the mirror instance during recording.`;let x={map:{},getId:()=>(console.error(F),-1),getNode:()=>(console.error(F),null),removeNodeFromMap(){console.error(F)},has:()=>(console.error(F),!1),reset(){console.error(F)}};function L(tr,er){let rr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},nr=null,ar=0;return function(){for(var sr=arguments.length,ir=new Array(sr),or=0;or<sr;or++)ir[or]=arguments[or];const cr=Date.now();ar||rr.leading!==!1||(ar=cr);const lr=er-(cr-ar),dr=this;lr<=0||lr>er?(nr&&(clearTimeout(nr),nr=null),ar=cr,tr.apply(dr,ir)):nr||rr.trailing===!1||(nr=setTimeout(()=>{ar=rr.leading===!1?0:Date.now(),nr=null,tr.apply(dr,ir)},lr))}}function D(tr,er,rr,nr){let ar=arguments.length>4&&arguments[4]!==void 0?arguments[4]:window;const sr=ar.Object.getOwnPropertyDescriptor(tr,er);return ar.Object.defineProperty(tr,er,nr?rr:{set(ir){setTimeout(()=>{rr.set.call(this,ir)},0),sr&&sr.set&&sr.set.call(this,ir)}}),()=>D(tr,er,sr||{},!0)}function W(tr,er,rr){try{if(!(er in tr))return()=>{};const nr=tr[er],ar=rr(nr);return typeof ar=="function"&&(ar.prototype=ar.prototype||{},Object.defineProperties(ar,{__rrweb_original__:{enumerable:!1,value:nr}})),tr[er]=ar,()=>{tr[er]=nr}}catch(nr){return()=>{}}}function Z(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function B(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function G(tr,er,rr,nr){if(!tr)return!1;const ar=tr.nodeType===tr.ELEMENT_NODE?tr:tr.parentElement;if(!ar)return!1;if(typeof er=="string"){if(ar.classList.contains(er)||nr&&ar.closest("."+er)!==null)return!0}else if(M(ar,er,nr))return!0;return!!(rr&&(tr.matches(rr)||nr&&ar.closest(rr)!==null))}function V(tr,er){return er.getId(tr)===g}function U(tr,er){if(o(tr))return!1;const rr=er.getId(tr);return!er.has(rr)||(!tr.parentNode||tr.parentNode.nodeType!==tr.DOCUMENT_NODE)&&(!tr.parentNode||U(tr.parentNode,er))}function K(tr){return!!tr.changedTouches}function Y(tr,er){return!!(tr.nodeName==="IFRAME"&&er.getMeta(tr))}function _(tr,er){return!!(tr.nodeName==="LINK"&&tr.nodeType===tr.ELEMENT_NODE&&tr.getAttribute&&tr.getAttribute("rel")==="stylesheet"&&er.getMeta(tr))}function J(tr){return!!(tr!=null&&tr.shadowRoot)}typeof window!="undefined"&&window.Proxy&&window.Reflect&&(x=new Proxy(x,{get:(tr,er,rr)=>(er==="map"&&console.error(F),Reflect.get(tr,er,rr))}));class z{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(er){var rr;return(rr=this.styleIDMap.get(er))!==null&&rr!==void 0?rr:-1}has(er){return this.styleIDMap.has(er)}add(er,rr){if(this.has(er))return this.getId(er);let nr;return nr=rr===void 0?this.id++:rr,this.styleIDMap.set(er,nr),this.idStyleMap.set(nr,er),nr}getStyle(er){return this.idStyleMap.get(er)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var Q=(tr=>(tr[tr.DomContentLoaded=0]="DomContentLoaded",tr[tr.Load=1]="Load",tr[tr.FullSnapshot=2]="FullSnapshot",tr[tr.IncrementalSnapshot=3]="IncrementalSnapshot",tr[tr.Meta=4]="Meta",tr[tr.Custom=5]="Custom",tr[tr.Plugin=6]="Plugin",tr))(Q||{}),H=(tr=>(tr[tr.Mutation=0]="Mutation",tr[tr.MouseMove=1]="MouseMove",tr[tr.MouseInteraction=2]="MouseInteraction",tr[tr.Scroll=3]="Scroll",tr[tr.ViewportResize=4]="ViewportResize",tr[tr.Input=5]="Input",tr[tr.TouchMove=6]="TouchMove",tr[tr.MediaInteraction=7]="MediaInteraction",tr[tr.StyleSheetRule=8]="StyleSheetRule",tr[tr.CanvasMutation=9]="CanvasMutation",tr[tr.Font=10]="Font",tr[tr.Log=11]="Log",tr[tr.Drag=12]="Drag",tr[tr.StyleDeclaration=13]="StyleDeclaration",tr[tr.Selection=14]="Selection",tr[tr.AdoptedStyleSheet=15]="AdoptedStyleSheet",tr))(H||{}),P=(tr=>(tr[tr.MouseUp=0]="MouseUp",tr[tr.MouseDown=1]="MouseDown",tr[tr.Click=2]="Click",tr[tr.ContextMenu=3]="ContextMenu",tr[tr.DblClick=4]="DblClick",tr[tr.Focus=5]="Focus",tr[tr.Blur=6]="Blur",tr[tr.TouchStart=7]="TouchStart",tr[tr.TouchMove_Departed=8]="TouchMove_Departed",tr[tr.TouchEnd=9]="TouchEnd",tr[tr.TouchCancel=10]="TouchCancel",tr))(P||{}),j=(tr=>(tr[tr["2D"]=0]="2D",tr[tr.WebGL=1]="WebGL",tr[tr.WebGL2=2]="WebGL2",tr))(j||{});function X(tr){return"__ln"in tr}class q{constructor(){this.length=0,this.head=null}get(er){if(er>=this.length)throw new Error("Position outside of list range");let rr=this.head;for(let nr=0;nr<er;nr++)rr=(rr==null?void 0:rr.next)||null;return rr}addNode(er){const rr={value:er,previous:null,next:null};if(er.__ln=rr,er.previousSibling&&X(er.previousSibling)){const nr=er.previousSibling.__ln.next;rr.next=nr,rr.previous=er.previousSibling.__ln,er.previousSibling.__ln.next=rr,nr&&(nr.previous=rr)}else if(er.nextSibling&&X(er.nextSibling)&&er.nextSibling.__ln.previous){const nr=er.nextSibling.__ln.previous;rr.previous=nr,rr.next=er.nextSibling.__ln,er.nextSibling.__ln.previous=rr,nr&&(nr.next=rr)}else this.head&&(this.head.previous=rr),rr.next=this.head,this.head=rr;this.length++}removeNode(er){const rr=er.__ln;this.head&&(rr.previous?(rr.previous.next=rr.next,rr.next&&(rr.next.previous=rr.previous)):(this.head=rr.next,this.head&&(this.head.previous=null)),er.__ln&&delete er.__ln,this.length--)}}const $=(tr,er)=>"".concat(tr,"@").concat(er);class ee{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=er=>{er.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const er=[],rr=new q,nr=or=>{let cr=or,lr=g;for(;lr===g;)cr=cr&&cr.nextSibling,lr=cr&&this.mirror.getId(cr);return lr},ar=or=>{var cr,lr,dr,pr;let hr=null;((lr=(cr=or.getRootNode)===null||cr===void 0?void 0:cr.call(or))===null||lr===void 0?void 0:lr.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&or.getRootNode().host&&(hr=or.getRootNode().host);let fr=hr;for(;((pr=(dr=fr==null?void 0:fr.getRootNode)===null||dr===void 0?void 0:dr.call(fr))===null||pr===void 0?void 0:pr.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&fr.getRootNode().host;)fr=fr.getRootNode().host;const mr=!(this.doc.contains(or)||fr&&this.doc.contains(fr));if(!or.parentNode||mr)return;const gr=o(or.parentNode)?this.mirror.getId(hr):this.mirror.getId(or.parentNode),vr=nr(or);if(gr===-1||vr===-1)return rr.addNode(or);const yr=O(or,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:Ir=>{Y(Ir,this.mirror)&&this.iframeManager.addIframe(Ir),_(Ir,this.mirror)&&this.stylesheetManager.trackLinkElement(Ir),J(or)&&this.shadowDomManager.addShadowRoot(or.shadowRoot,this.doc)},onIframeLoad:(Ir,Pr)=>{this.iframeManager.attachIframe(Ir,Pr),this.shadowDomManager.observeAttachShadow(Ir)},onStylesheetLoad:(Ir,Pr)=>{this.stylesheetManager.attachLinkElement(Ir,Pr)}});yr&&er.push({parentId:gr,nextId:vr,node:yr})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const or of Array.from(this.movedSet.values()))ne(this.removes,or,this.mirror)&&!this.movedSet.has(or.parentNode)||ar(or);for(const or of Array.from(this.addedSet.values()))re(this.droppedSet,or)||ne(this.removes,or,this.mirror)?re(this.movedSet,or)?ar(or):this.droppedSet.add(or):ar(or);let sr=null;for(;rr.length;){let or=null;if(sr){const cr=this.mirror.getId(sr.value.parentNode),lr=nr(sr.value);cr!==-1&&lr!==-1&&(or=sr)}if(!or)for(let cr=rr.length-1;cr>=0;cr--){const lr=rr.get(cr);if(lr){const dr=this.mirror.getId(lr.value.parentNode);if(nr(lr.value)===-1)continue;if(dr!==-1){or=lr;break}{const pr=lr.value;if(pr.parentNode&&pr.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const hr=pr.parentNode.host;if(this.mirror.getId(hr)!==-1){or=lr;break}}}}}if(!or){for(;rr.head;)rr.removeNode(rr.head.value);break}sr=or.previous,rr.removeNode(or.value),ar(or.value)}const ir={texts:this.texts.map(or=>({id:this.mirror.getId(or.node),value:or.value})).filter(or=>this.mirror.has(or.id)),attributes:this.attributes.map(or=>({id:this.mirror.getId(or.node),attributes:or.attributes})).filter(or=>this.mirror.has(or.id)),removes:this.removes,adds:er};(ir.texts.length||ir.attributes.length||ir.removes.length||ir.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(ir))},this.processMutation=er=>{if(!V(er.target,this.mirror))switch(er.type){case"characterData":{const rr=er.target.textContent;G(er.target,this.blockClass,this.blockSelector,!1)||rr===er.oldValue||this.texts.push({value:T(er.target,this.maskTextClass,this.maskTextSelector)&&rr?this.maskTextFn?this.maskTextFn(rr):rr.replace(/[\S]/g,"*"):rr,node:er.target});break}case"attributes":{const rr=er.target;let nr=er.target.getAttribute(er.attributeName);if(er.attributeName==="value"&&(nr=l({maskInputOptions:this.maskInputOptions,tagName:er.target.tagName,type:er.target.getAttribute("type"),value:nr,maskInputFn:this.maskInputFn})),G(er.target,this.blockClass,this.blockSelector,!1)||nr===er.oldValue)return;let ar=this.attributes.find(sr=>sr.node===er.target);if(rr.tagName==="IFRAME"&&er.attributeName==="src"&&!this.keepIframeSrcFn(nr)){if(rr.contentDocument)return;er.attributeName="rr_src"}if(ar||(ar={node:er.target,attributes:{}},this.attributes.push(ar)),er.attributeName==="style"){const sr=this.doc.createElement("span");er.oldValue&&sr.setAttribute("style",er.oldValue),ar.attributes.style!==void 0&&ar.attributes.style!==null||(ar.attributes.style={});const ir=ar.attributes.style;for(const or of Array.from(rr.style)){const cr=rr.style.getPropertyValue(or),lr=rr.style.getPropertyPriority(or);cr===sr.style.getPropertyValue(or)&&lr===sr.style.getPropertyPriority(or)||(ir[or]=lr===""?cr:[cr,lr])}for(const or of Array.from(sr.style))rr.style.getPropertyValue(or)===""&&(ir[or]=!1)}else ar.attributes[er.attributeName]=w(this.doc,rr.tagName,er.attributeName,nr);break}case"childList":if(G(er.target,this.blockClass,this.blockSelector,!0))return;er.addedNodes.forEach(rr=>this.genAdds(rr,er.target)),er.removedNodes.forEach(rr=>{const nr=this.mirror.getId(rr),ar=o(er.target)?this.mirror.getId(er.target.host):this.mirror.getId(er.target);G(er.target,this.blockClass,this.blockSelector,!1)||V(rr,this.mirror)||!function(sr,ir){return ir.getId(sr)!==-1}(rr,this.mirror)||(this.addedSet.has(rr)?(te(this.addedSet,rr),this.droppedSet.add(rr)):this.addedSet.has(er.target)&&nr===-1||U(er.target,this.mirror)||(this.movedSet.has(rr)&&this.movedMap[$(nr,ar)]?te(this.movedSet,rr):this.removes.push({parentId:ar,id:nr,isShadow:!(!o(er.target)||!r(er.target))||void 0})),this.mapRemoves.push(rr))})}},this.genAdds=(er,rr)=>{if(this.mirror.hasNode(er)){if(V(er,this.mirror))return;this.movedSet.add(er);let nr=null;rr&&this.mirror.hasNode(rr)&&(nr=this.mirror.getId(rr)),nr&&nr!==-1&&(this.movedMap[$(this.mirror.getId(er),nr)]=!0)}else this.addedSet.add(er),this.droppedSet.delete(er);G(er,this.blockClass,this.blockSelector,!1)||er.childNodes.forEach(nr=>this.genAdds(nr))}}init(er){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(rr=>{this[rr]=er[rr]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function te(tr,er){tr.delete(er),er.childNodes.forEach(rr=>te(tr,rr))}function ne(tr,er,rr){return tr.length!==0&&oe(tr,er,rr)}function oe(tr,er,rr){const{parentNode:nr}=er;if(!nr)return!1;const ar=rr.getId(nr);return!!tr.some(sr=>sr.id===ar)||oe(tr,nr,rr)}function re(tr,er){return tr.size!==0&&ie(tr,er)}function ie(tr,er){const{parentNode:rr}=er;return!!rr&&(!!tr.has(rr)||ie(tr,rr))}const ae=[],se=typeof CSSGroupingRule!="undefined",le=typeof CSSMediaRule!="undefined",ce=typeof CSSSupportsRule!="undefined",de=typeof CSSConditionRule!="undefined";function ue(tr){try{if("composedPath"in tr){const er=tr.composedPath();if(er.length)return er[0]}else if("path"in tr&&tr.path.length)return tr.path[0];return tr.target}catch(er){return tr.target}}function he(tr,er){var rr,nr;const ar=new ee;ae.push(ar),ar.init(tr);let sr=window.MutationObserver||window.__rrMutationObserver;const ir=(nr=(rr=window==null?void 0:window.Zone)===null||rr===void 0?void 0:rr.__symbol__)===null||nr===void 0?void 0:nr.call(rr,"MutationObserver");ir&&window[ir]&&(sr=window[ir]);const or=new sr(ar.processMutations.bind(ar));return or.observe(er,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),or}function pe(tr){let{mouseInteractionCb:er,doc:rr,mirror:nr,blockClass:ar,blockSelector:sr,sampling:ir}=tr;if(ir.mouseInteraction===!1)return()=>{};const or=ir.mouseInteraction===!0||ir.mouseInteraction===void 0?{}:ir.mouseInteraction,cr=[];return Object.keys(P).filter(lr=>Number.isNaN(Number(lr))&&!lr.endsWith("_Departed")&&or[lr]!==!1).forEach(lr=>{const dr=lr.toLowerCase(),pr=(hr=>fr=>{const mr=ue(fr);if(G(mr,ar,sr,!0))return;const gr=K(fr)?fr.changedTouches[0]:fr;if(!gr)return;const vr=nr.getId(mr),{clientX:yr,clientY:Ir}=gr;er({type:P[hr],id:vr,x:yr,y:Ir})})(lr);cr.push(E(dr,pr,rr))}),()=>{cr.forEach(lr=>lr())}}function ge(tr){let{scrollCb:er,doc:rr,mirror:nr,blockClass:ar,blockSelector:sr,sampling:ir}=tr;return E("scroll",L(or=>{const cr=ue(or);if(!cr||G(cr,ar,sr,!0))return;const lr=nr.getId(cr);if(cr===rr){const dr=rr.scrollingElement||rr.documentElement;er({id:lr,x:dr.scrollLeft,y:dr.scrollTop})}else er({id:lr,x:cr.scrollLeft,y:cr.scrollTop})},ir.scroll||100),rr)}function me(tr,er){const rr=Object.assign({},tr);return er||delete rr.userTriggered,rr}const Ie=["INPUT","TEXTAREA","SELECT"],Ce=new WeakMap;function fe(tr){return function(er,rr){if(se&&er.parentRule instanceof CSSGroupingRule||le&&er.parentRule instanceof CSSMediaRule||ce&&er.parentRule instanceof CSSSupportsRule||de&&er.parentRule instanceof CSSConditionRule){const nr=Array.from(er.parentRule.cssRules).indexOf(er);rr.unshift(nr)}else if(er.parentStyleSheet){const nr=Array.from(er.parentStyleSheet.cssRules).indexOf(er);rr.unshift(nr)}return rr}(tr,[])}function ye(tr,er,rr){let nr,ar;return tr?(tr.ownerNode?nr=er.getId(tr.ownerNode):ar=rr.getId(tr),{styleId:ar,id:nr}):{}}function ve(tr,er){let{mirror:rr,stylesheetManager:nr}=tr;var ar,sr,ir;let or=null;or=er.nodeName==="#document"?rr.getId(er):rr.getId(er.host);const cr=er.nodeName==="#document"?(ar=er.defaultView)===null||ar===void 0?void 0:ar.Document:(ir=(sr=er.ownerDocument)===null||sr===void 0?void 0:sr.defaultView)===null||ir===void 0?void 0:ir.ShadowRoot,lr=Object.getOwnPropertyDescriptor(cr==null?void 0:cr.prototype,"adoptedStyleSheets");return or!==null&&or!==-1&&cr&&lr?(Object.defineProperty(er,"adoptedStyleSheets",{configurable:lr.configurable,enumerable:lr.enumerable,get(){var dr;return(dr=lr.get)===null||dr===void 0?void 0:dr.call(this)},set(dr){var pr;const hr=(pr=lr.set)===null||pr===void 0?void 0:pr.call(this,dr);if(or!==null&&or!==-1)try{nr.adoptStyleSheets(dr,or)}catch(fr){}return hr}}),()=>{Object.defineProperty(er,"adoptedStyleSheets",{configurable:lr.configurable,enumerable:lr.enumerable,get:lr.get,set:lr.set})}):()=>{}}function Se(tr){let er=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const rr=tr.doc.defaultView;if(!rr)return()=>{};(function(vr,yr){const{mutationCb:Ir,mousemoveCb:Pr,mouseInteractionCb:Rr,scrollCb:$r,viewportResizeCb:_r,inputCb:kr,mediaInteractionCb:wr,styleSheetRuleCb:Lr,styleDeclarationCb:xr,canvasMutationCb:Sr,fontCb:Tr,selectionCb:Cr}=vr;vr.mutationCb=function(){yr.mutation&&yr.mutation(...arguments),Ir(...arguments)},vr.mousemoveCb=function(){yr.mousemove&&yr.mousemove(...arguments),Pr(...arguments)},vr.mouseInteractionCb=function(){yr.mouseInteraction&&yr.mouseInteraction(...arguments),Rr(...arguments)},vr.scrollCb=function(){yr.scroll&&yr.scroll(...arguments),$r(...arguments)},vr.viewportResizeCb=function(){yr.viewportResize&&yr.viewportResize(...arguments),_r(...arguments)},vr.inputCb=function(){yr.input&&yr.input(...arguments),kr(...arguments)},vr.mediaInteractionCb=function(){yr.mediaInteaction&&yr.mediaInteaction(...arguments),wr(...arguments)},vr.styleSheetRuleCb=function(){yr.styleSheetRule&&yr.styleSheetRule(...arguments),Lr(...arguments)},vr.styleDeclarationCb=function(){yr.styleDeclaration&&yr.styleDeclaration(...arguments),xr(...arguments)},vr.canvasMutationCb=function(){yr.canvasMutation&&yr.canvasMutation(...arguments),Sr(...arguments)},vr.fontCb=function(){yr.font&&yr.font(...arguments),Tr(...arguments)},vr.selectionCb=function(){yr.selection&&yr.selection(...arguments),Cr(...arguments)}})(tr,er);const nr=he(tr,tr.doc),ar=function(vr){let{mousemoveCb:yr,sampling:Ir,doc:Pr,mirror:Rr}=vr;if(Ir.mousemove===!1)return()=>{};const $r=typeof Ir.mousemove=="number"?Ir.mousemove:50,_r=typeof Ir.mousemoveCallback=="number"?Ir.mousemoveCallback:500;let kr,wr=[];const Lr=L(Tr=>{const Cr=Date.now()-kr;yr(wr.map(Ar=>(Ar.timeOffset-=Cr,Ar)),Tr),wr=[],kr=null},_r),xr=L(Tr=>{const Cr=ue(Tr),{clientX:Ar,clientY:Zr}=K(Tr)?Tr.changedTouches[0]:Tr;kr||(kr=Date.now()),wr.push({x:Ar,y:Zr,id:Rr.getId(Cr),timeOffset:Date.now()-kr}),Lr(typeof DragEvent!="undefined"&&Tr instanceof DragEvent?H.Drag:Tr instanceof MouseEvent?H.MouseMove:H.TouchMove)},$r,{trailing:!1}),Sr=[E("mousemove",xr,Pr),E("touchmove",xr,Pr),E("drag",xr,Pr)];return()=>{Sr.forEach(Tr=>Tr())}}(tr),sr=pe(tr),ir=ge(tr),or=function(vr){let{viewportResizeCb:yr}=vr,Ir=-1,Pr=-1;return E("resize",L(()=>{const Rr=Z(),$r=B();Ir===Rr&&Pr===$r||(yr({width:Number($r),height:Number(Rr)}),Ir=Rr,Pr=$r)},200),window)}(tr),cr=function(vr){let{inputCb:yr,doc:Ir,mirror:Pr,blockClass:Rr,blockSelector:$r,ignoreClass:_r,maskInputOptions:kr,maskInputFn:wr,sampling:Lr,userTriggeredOnInput:xr}=vr;function Sr(jr){let Fr=ue(jr);const Kr=jr.isTrusted;if(Fr&&Fr.tagName==="OPTION"&&(Fr=Fr.parentElement),!Fr||!Fr.tagName||Ie.indexOf(Fr.tagName)<0||G(Fr,Rr,$r,!0))return;const Xr=Fr.type;if(Fr.classList.contains(_r))return;let Jr=Fr.value,Br=!1;Xr==="radio"||Xr==="checkbox"?Br=Fr.checked:(kr[Fr.tagName.toLowerCase()]||kr[Xr])&&(Jr=l({maskInputOptions:kr,tagName:Fr.tagName,type:Xr,value:Jr,maskInputFn:wr})),Tr(Fr,me({text:Jr,isChecked:Br,userTriggered:Kr},xr));const Hr=Fr.name;Xr==="radio"&&Hr&&Br&&Ir.querySelectorAll('input[type="radio"][name="'.concat(Hr,'"]')).forEach(Nr=>{Nr!==Fr&&Tr(Nr,me({text:Nr.value,isChecked:!Br,userTriggered:!1},xr))})}function Tr(jr,Fr){const Kr=Ce.get(jr);if(!Kr||Kr.text!==Fr.text||Kr.isChecked!==Fr.isChecked){Ce.set(jr,Fr);const Xr=Pr.getId(jr);yr(Object.assign(Object.assign({},Fr),{id:Xr}))}}const Cr=(Lr.input==="last"?["change"]:["input","change"]).map(jr=>E(jr,Sr,Ir)),Ar=Ir.defaultView;if(!Ar)return()=>{Cr.forEach(jr=>jr())};const Zr=Ar.Object.getOwnPropertyDescriptor(Ar.HTMLInputElement.prototype,"value"),Mr=[[Ar.HTMLInputElement.prototype,"value"],[Ar.HTMLInputElement.prototype,"checked"],[Ar.HTMLSelectElement.prototype,"value"],[Ar.HTMLTextAreaElement.prototype,"value"],[Ar.HTMLSelectElement.prototype,"selectedIndex"],[Ar.HTMLOptionElement.prototype,"selected"]];return Zr&&Zr.set&&Cr.push(...Mr.map(jr=>D(jr[0],jr[1],{set(){Sr({target:this})}},!1,Ar))),()=>{Cr.forEach(jr=>jr())}}(tr),lr=function(vr){let{mediaInteractionCb:yr,blockClass:Ir,blockSelector:Pr,mirror:Rr,sampling:$r}=vr;const _r=wr=>L(Lr=>{const xr=ue(Lr);if(!xr||G(xr,Ir,Pr,!0))return;const{currentTime:Sr,volume:Tr,muted:Cr,playbackRate:Ar}=xr;yr({type:wr,id:Rr.getId(xr),currentTime:Sr,volume:Tr,muted:Cr,playbackRate:Ar})},$r.media||500),kr=[E("play",_r(0)),E("pause",_r(1)),E("seeked",_r(2)),E("volumechange",_r(3)),E("ratechange",_r(4))];return()=>{kr.forEach(wr=>wr())}}(tr),dr=function(vr,yr){let{styleSheetRuleCb:Ir,mirror:Pr,stylesheetManager:Rr}=vr,{win:$r}=yr;const _r=$r.CSSStyleSheet.prototype.insertRule;$r.CSSStyleSheet.prototype.insertRule=function(Tr,Cr){const{id:Ar,styleId:Zr}=ye(this,Pr,Rr.styleMirror);return(Ar&&Ar!==-1||Zr&&Zr!==-1)&&Ir({id:Ar,styleId:Zr,adds:[{rule:Tr,index:Cr}]}),_r.apply(this,[Tr,Cr])};const kr=$r.CSSStyleSheet.prototype.deleteRule;let wr,Lr;$r.CSSStyleSheet.prototype.deleteRule=function(Tr){const{id:Cr,styleId:Ar}=ye(this,Pr,Rr.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,removes:[{index:Tr}]}),kr.apply(this,[Tr])},$r.CSSStyleSheet.prototype.replace&&(wr=$r.CSSStyleSheet.prototype.replace,$r.CSSStyleSheet.prototype.replace=function(Tr){const{id:Cr,styleId:Ar}=ye(this,Pr,Rr.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,replace:Tr}),wr.apply(this,[Tr])}),$r.CSSStyleSheet.prototype.replaceSync&&(Lr=$r.CSSStyleSheet.prototype.replaceSync,$r.CSSStyleSheet.prototype.replaceSync=function(Tr){const{id:Cr,styleId:Ar}=ye(this,Pr,Rr.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,replaceSync:Tr}),Lr.apply(this,[Tr])});const xr={};se?xr.CSSGroupingRule=$r.CSSGroupingRule:(le&&(xr.CSSMediaRule=$r.CSSMediaRule),de&&(xr.CSSConditionRule=$r.CSSConditionRule),ce&&(xr.CSSSupportsRule=$r.CSSSupportsRule));const Sr={};return Object.entries(xr).forEach(Tr=>{let[Cr,Ar]=Tr;Sr[Cr]={insertRule:Ar.prototype.insertRule,deleteRule:Ar.prototype.deleteRule},Ar.prototype.insertRule=function(Zr,Mr){const{id:jr,styleId:Fr}=ye(this.parentStyleSheet,Pr,Rr.styleMirror);return(jr&&jr!==-1||Fr&&Fr!==-1)&&Ir({id:jr,styleId:Fr,adds:[{rule:Zr,index:[...fe(this),Mr||0]}]}),Sr[Cr].insertRule.apply(this,[Zr,Mr])},Ar.prototype.deleteRule=function(Zr){const{id:Mr,styleId:jr}=ye(this.parentStyleSheet,Pr,Rr.styleMirror);return(Mr&&Mr!==-1||jr&&jr!==-1)&&Ir({id:Mr,styleId:jr,removes:[{index:[...fe(this),Zr]}]}),Sr[Cr].deleteRule.apply(this,[Zr])}}),()=>{$r.CSSStyleSheet.prototype.insertRule=_r,$r.CSSStyleSheet.prototype.deleteRule=kr,wr&&($r.CSSStyleSheet.prototype.replace=wr),Lr&&($r.CSSStyleSheet.prototype.replaceSync=Lr),Object.entries(xr).forEach(Tr=>{let[Cr,Ar]=Tr;Ar.prototype.insertRule=Sr[Cr].insertRule,Ar.prototype.deleteRule=Sr[Cr].deleteRule})}}(tr,{win:rr}),pr=ve(tr,tr.doc),hr=function(vr,yr){let{styleDeclarationCb:Ir,mirror:Pr,ignoreCSSAttributes:Rr,stylesheetManager:$r}=vr,{win:_r}=yr;const kr=_r.CSSStyleDeclaration.prototype.setProperty;_r.CSSStyleDeclaration.prototype.setProperty=function(Lr,xr,Sr){var Tr;if(Rr.has(Lr))return kr.apply(this,[Lr,xr,Sr]);const{id:Cr,styleId:Ar}=ye((Tr=this.parentRule)===null||Tr===void 0?void 0:Tr.parentStyleSheet,Pr,$r.styleMirror);return(Cr&&Cr!==-1||Ar&&Ar!==-1)&&Ir({id:Cr,styleId:Ar,set:{property:Lr,value:xr,priority:Sr},index:fe(this.parentRule)}),kr.apply(this,[Lr,xr,Sr])};const wr=_r.CSSStyleDeclaration.prototype.removeProperty;return _r.CSSStyleDeclaration.prototype.removeProperty=function(Lr){var xr;if(Rr.has(Lr))return wr.apply(this,[Lr]);const{id:Sr,styleId:Tr}=ye((xr=this.parentRule)===null||xr===void 0?void 0:xr.parentStyleSheet,Pr,$r.styleMirror);return(Sr&&Sr!==-1||Tr&&Tr!==-1)&&Ir({id:Sr,styleId:Tr,remove:{property:Lr},index:fe(this.parentRule)}),wr.apply(this,[Lr])},()=>{_r.CSSStyleDeclaration.prototype.setProperty=kr,_r.CSSStyleDeclaration.prototype.removeProperty=wr}}(tr,{win:rr}),fr=tr.collectFonts?function(vr){let{fontCb:yr,doc:Ir}=vr;const Pr=Ir.defaultView;if(!Pr)return()=>{};const Rr=[],$r=new WeakMap,_r=Pr.FontFace;Pr.FontFace=function(wr,Lr,xr){const Sr=new _r(wr,Lr,xr);return $r.set(Sr,{family:wr,buffer:typeof Lr!="string",descriptors:xr,fontSource:typeof Lr=="string"?Lr:JSON.stringify(Array.from(new Uint8Array(Lr)))}),Sr};const kr=W(Ir.fonts,"add",function(wr){return function(Lr){return setTimeout(()=>{const xr=$r.get(Lr);xr&&(yr(xr),$r.delete(Lr))},0),wr.apply(this,[Lr])}});return Rr.push(()=>{Pr.FontFace=_r}),Rr.push(kr),()=>{Rr.forEach(wr=>wr())}}(tr):()=>{},mr=function(vr){const{doc:yr,mirror:Ir,blockClass:Pr,blockSelector:Rr,selectionCb:$r}=vr;let _r=!0;const kr=()=>{const wr=yr.getSelection();if(!wr||_r&&(wr!=null&&wr.isCollapsed))return;_r=wr.isCollapsed||!1;const Lr=[],xr=wr.rangeCount||0;for(let Sr=0;Sr<xr;Sr++){const Tr=wr.getRangeAt(Sr),{startContainer:Cr,startOffset:Ar,endContainer:Zr,endOffset:Mr}=Tr;G(Cr,Pr,Rr,!0)||G(Zr,Pr,Rr,!0)||Lr.push({start:Ir.getId(Cr),startOffset:Ar,end:Ir.getId(Zr),endOffset:Mr})}$r({ranges:Lr})};return kr(),E("selectionchange",kr)}(tr),gr=[];for(const vr of tr.plugins)gr.push(vr.observer(vr.callback,rr,vr.options));return()=>{ae.forEach(vr=>vr.reset()),nr.disconnect(),ar(),sr(),ir(),or(),cr(),lr(),dr(),pr(),hr(),fr(),mr(),gr.forEach(vr=>vr())}}class be{constructor(er){this.generateIdFn=er,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(er,rr,nr,ar){const sr=nr||this.getIdToRemoteIdMap(er),ir=ar||this.getRemoteIdToIdMap(er);let or=sr.get(rr);return or||(or=this.generateIdFn(),sr.set(rr,or),ir.set(or,rr)),or}getIds(er,rr){const nr=this.getIdToRemoteIdMap(er),ar=this.getRemoteIdToIdMap(er);return rr.map(sr=>this.getId(er,sr,nr,ar))}getRemoteId(er,rr,nr){const ar=nr||this.getRemoteIdToIdMap(er);return typeof rr!="number"?rr:ar.get(rr)||-1}getRemoteIds(er,rr){const nr=this.getRemoteIdToIdMap(er);return rr.map(ar=>this.getRemoteId(er,ar,nr))}reset(er){if(!er)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(er),this.iframeRemoteIdToIdMap.delete(er)}getIdToRemoteIdMap(er){let rr=this.iframeIdToRemoteIdMap.get(er);return rr||(rr=new Map,this.iframeIdToRemoteIdMap.set(er,rr)),rr}getRemoteIdToIdMap(er){let rr=this.iframeRemoteIdToIdMap.get(er);return rr||(rr=new Map,this.iframeRemoteIdToIdMap.set(er,rr)),rr}}class Ae{constructor(er){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new be(m),this.mutationCb=er.mutationCb,this.wrappedEmit=er.wrappedEmit,this.stylesheetManager=er.stylesheetManager,this.recordCrossOriginIframes=er.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new be(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=er.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(er){this.iframes.set(er,!0),er.contentWindow&&this.crossOriginIframeMap.set(er.contentWindow,er)}addLoadListener(er){this.loadListener=er}attachIframe(er,rr){var nr;this.mutationCb({adds:[{parentId:this.mirror.getId(er),nextId:null,node:rr}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(nr=this.loadListener)===null||nr===void 0||nr.call(this,er),er.contentDocument&&er.contentDocument.adoptedStyleSheets&&er.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(er.contentDocument.adoptedStyleSheets,this.mirror.getId(er.contentDocument))}handleMessage(er){if(er.data.type==="rrweb"){if(!er.source)return;const rr=this.crossOriginIframeMap.get(er.source);if(!rr)return;const nr=this.transformCrossOriginEvent(rr,er.data.event);nr&&this.wrappedEmit(nr,er.data.isCheckout)}}transformCrossOriginEvent(er,rr){var nr;switch(rr.type){case Q.FullSnapshot:return this.crossOriginIframeMirror.reset(er),this.crossOriginIframeStyleMirror.reset(er),this.replaceIdOnNode(rr.data.node,er),{timestamp:rr.timestamp,type:Q.IncrementalSnapshot,data:{source:H.Mutation,adds:[{parentId:this.mirror.getId(er),nextId:null,node:rr.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return rr;case Q.Custom:return this.replaceIds(rr.data.payload,er,["id","parentId","previousId","nextId"]),rr;case Q.IncrementalSnapshot:switch(rr.data.source){case H.Mutation:return rr.data.adds.forEach(ar=>{this.replaceIds(ar,er,["parentId","nextId","previousId"]),this.replaceIdOnNode(ar.node,er)}),rr.data.removes.forEach(ar=>{this.replaceIds(ar,er,["parentId","id"])}),rr.data.attributes.forEach(ar=>{this.replaceIds(ar,er,["id"])}),rr.data.texts.forEach(ar=>{this.replaceIds(ar,er,["id"])}),rr;case H.Drag:case H.TouchMove:case H.MouseMove:return rr.data.positions.forEach(ar=>{this.replaceIds(ar,er,["id"])}),rr;case H.ViewportResize:return!1;case H.MediaInteraction:case H.MouseInteraction:case H.Scroll:case H.CanvasMutation:case H.Input:return this.replaceIds(rr.data,er,["id"]),rr;case H.StyleSheetRule:case H.StyleDeclaration:return this.replaceIds(rr.data,er,["id"]),this.replaceStyleIds(rr.data,er,["styleId"]),rr;case H.Font:return rr;case H.Selection:return rr.data.ranges.forEach(ar=>{this.replaceIds(ar,er,["start","end"])}),rr;case H.AdoptedStyleSheet:return this.replaceIds(rr.data,er,["id"]),this.replaceStyleIds(rr.data,er,["styleIds"]),(nr=rr.data.styles)===null||nr===void 0||nr.forEach(ar=>{this.replaceStyleIds(ar,er,["styleId"])}),rr}}}replace(er,rr,nr,ar){for(const sr of ar)(Array.isArray(rr[sr])||typeof rr[sr]=="number")&&(Array.isArray(rr[sr])?rr[sr]=er.getIds(nr,rr[sr]):rr[sr]=er.getId(nr,rr[sr]));return rr}replaceIds(er,rr,nr){return this.replace(this.crossOriginIframeMirror,er,rr,nr)}replaceStyleIds(er,rr,nr){return this.replace(this.crossOriginIframeStyleMirror,er,rr,nr)}replaceIdOnNode(er,rr){this.replaceIds(er,rr,["id"]),"childNodes"in er&&er.childNodes.forEach(nr=>{this.replaceIdOnNode(nr,rr)})}}class ke{constructor(er){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=er.mutationCb,this.scrollCb=er.scrollCb,this.bypassOptions=er.bypassOptions,this.mirror=er.mirror;const rr=this;this.restorePatches.push(W(Element.prototype,"attachShadow",function(nr){return function(ar){const sr=nr.call(this,ar);return this.shadowRoot&&rr.addShadowRoot(this.shadowRoot,this.ownerDocument),sr}}))}addShadowRoot(er,rr){r(er)&&(this.shadowDoms.has(er)||(this.shadowDoms.add(er),he(Object.assign(Object.assign({},this.bypassOptions),{doc:rr,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),er),ge(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:er,mirror:this.mirror})),setTimeout(()=>{er.adoptedStyleSheets&&er.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(er.adoptedStyleSheets,this.mirror.getId(er.host)),ve({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},er)},0)))}observeAttachShadow(er){if(er.contentWindow){const rr=this;this.restorePatches.push(W(er.contentWindow.HTMLElement.prototype,"attachShadow",function(nr){return function(ar){const sr=nr.call(this,ar);return this.shadowRoot&&rr.addShadowRoot(this.shadowRoot,er.contentDocument),sr}}))}}reset(){this.restorePatches.forEach(er=>er()),this.shadowDoms=new WeakSet}}/*! *****************************************************************************
|
|
911
|
+
Copyright (c) Microsoft Corporation.
|
|
912
|
+
|
|
913
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
914
|
+
purpose with or without fee is hereby granted.
|
|
915
|
+
|
|
916
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
917
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
918
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
919
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
920
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
921
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
922
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
923
|
+
***************************************************************************** */function we(tr,er,rr,nr){return new(rr||(rr=Promise))(function(ar,sr){function ir(lr){try{cr(nr.next(lr))}catch(dr){sr(dr)}}function or(lr){try{cr(nr.throw(lr))}catch(dr){sr(dr)}}function cr(lr){var dr;lr.done?ar(lr.value):(dr=lr.value,dr instanceof rr?dr:new rr(function(pr){pr(dr)})).then(ir,or)}cr((nr=nr.apply(tr,[])).next())})}for(var Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ne=0;Ne<64;Ne++)Te[Me.charCodeAt(Ne)]=Ne;const Re=new Map,Oe=(tr,er,rr)=>{if(!tr||!xe(tr,er)&&typeof tr!="object")return;const nr=function(sr,ir){let or=Re.get(sr);return or||(or=new Map,Re.set(sr,or)),or.has(ir)||or.set(ir,[]),or.get(ir)}(rr,tr.constructor.name);let ar=nr.indexOf(tr);return ar===-1&&(ar=nr.length,nr.push(tr)),ar};function Ee(tr,er,rr){if(tr instanceof Array)return tr.map(nr=>Ee(nr,er,rr));if(tr===null)return tr;if(tr instanceof Float32Array||tr instanceof Float64Array||tr instanceof Int32Array||tr instanceof Uint32Array||tr instanceof Uint8Array||tr instanceof Uint16Array||tr instanceof Int16Array||tr instanceof Int8Array||tr instanceof Uint8ClampedArray)return{rr_type:tr.constructor.name,args:[Object.values(tr)]};if(tr instanceof ArrayBuffer){const nr=tr.constructor.name,ar=function(sr){var ir,or=new Uint8Array(sr),cr=or.length,lr="";for(ir=0;ir<cr;ir+=3)lr+=Me[or[ir]>>2],lr+=Me[(3&or[ir])<<4|or[ir+1]>>4],lr+=Me[(15&or[ir+1])<<2|or[ir+2]>>6],lr+=Me[63&or[ir+2]];return cr%3==2?lr=lr.substring(0,lr.length-1)+"=":cr%3==1&&(lr=lr.substring(0,lr.length-2)+"=="),lr}(tr);return{rr_type:nr,base64:ar}}if(tr instanceof DataView)return{rr_type:tr.constructor.name,args:[Ee(tr.buffer,er,rr),tr.byteOffset,tr.byteLength]};if(tr instanceof HTMLImageElement){const nr=tr.constructor.name,{src:ar}=tr;return{rr_type:nr,src:ar}}return tr instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:tr.toDataURL()}:tr instanceof ImageData?{rr_type:tr.constructor.name,args:[Ee(tr.data,er,rr),tr.width,tr.height]}:xe(tr,er)||typeof tr=="object"?{rr_type:tr.constructor.name,index:Oe(tr,er,rr)}:tr}const Fe=(tr,er,rr)=>[...tr].map(nr=>Ee(nr,er,rr)),xe=(tr,er)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(nr=>typeof er[nr]=="function").find(nr=>tr instanceof er[nr]);function Le(tr,er,rr){const nr=[];try{const ar=W(tr.HTMLCanvasElement.prototype,"getContext",function(sr){return function(ir){G(this,er,rr,!0)||"__context"in this||(this.__context=ir);for(var or=arguments.length,cr=new Array(or>1?or-1:0),lr=1;lr<or;lr++)cr[lr-1]=arguments[lr];return sr.apply(this,[ir,...cr])}});nr.push(ar)}catch(ar){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{nr.forEach(ar=>ar())}}function De(tr,er,rr,nr,ar,sr,ir){const or=[],cr=Object.getOwnPropertyNames(tr);for(const lr of cr)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(lr))try{if(typeof tr[lr]!="function")continue;const dr=W(tr,lr,function(pr){return function(){for(var hr=arguments.length,fr=new Array(hr),mr=0;mr<hr;mr++)fr[mr]=arguments[mr];const gr=pr.apply(this,fr);if(Oe(gr,ir,this),!G(this.canvas,nr,ar,!0)){const vr=Fe([...fr],ir,this),yr={type:er,property:lr,args:vr};rr(this.canvas,yr)}return gr}});or.push(dr)}catch(dr){const pr=D(tr,lr,{set(hr){rr(this.canvas,{type:er,property:lr,args:[hr],setter:!0})}});or.push(pr)}return or}var We=null;try{var Ze=typeof module!="undefined"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof require=="function"&&require("worker_threads");We=Ze.Worker}catch(tr){}function Be(tr,er,rr){var nr=er===void 0?null:er,ar=function(or,cr){return Buffer.from(or,"base64").toString(cr?"utf16":"utf8")}(tr,rr!==void 0&&rr),sr=ar.indexOf(`
|
|
924
|
+
`,10)+1,ir=ar.substring(sr)+(nr?"//# sourceMappingURL="+nr:"");return function(or){return new We(ir,Object.assign({},or,{eval:!0}))}}function Ge(tr,er,rr){var nr=er===void 0?null:er,ar=function(cr,lr){var dr=atob(cr);if(lr){for(var pr=new Uint8Array(dr.length),hr=0,fr=dr.length;hr<fr;++hr)pr[hr]=dr.charCodeAt(hr);return String.fromCharCode.apply(null,new Uint16Array(pr.buffer))}return dr}(tr,rr!==void 0&&rr),sr=ar.indexOf(`
|
|
925
|
+
`,10)+1,ir=ar.substring(sr)+(nr?"//# sourceMappingURL="+nr:""),or=new Blob([ir],{type:"application/javascript"});return URL.createObjectURL(or)}var Ve=Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]",Ue,Ke,Ye,_e=(Ue="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",Ke=null,Ye=!1,Ve?Be(Ue,Ke,Ye):function(tr,er,rr){var nr;return function(ar){return nr=nr||Ge(tr,er,rr),new Worker(nr,ar)}}(Ue,Ke,Ye));class Je{constructor(er){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(cr,lr)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(cr)||this.pendingCanvasMutations.set(cr,[]),this.pendingCanvasMutations.get(cr).push(lr)};const{sampling:rr="all",win:nr,blockClass:ar,blockSelector:sr,recordCanvas:ir,dataURLOptions:or}=er;this.mutationCb=er.mutationCb,this.mirror=er.mirror,ir&&rr==="all"&&this.initCanvasMutationObserver(nr,ar,sr),ir&&typeof rr=="number"&&this.initCanvasFPSObserver(rr,nr,ar,sr,{dataURLOptions:or})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(er,rr,nr,ar,sr){const ir=Le(rr,nr,ar),or=new Map,cr=new _e;cr.onmessage=fr=>{const{id:mr}=fr.data;if(or.set(mr,!1),!("base64"in fr.data))return;const{base64:gr,type:vr,width:yr,height:Ir}=fr.data;this.mutationCb({id:mr,type:j["2D"],commands:[{property:"clearRect",args:[0,0,yr,Ir]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:gr}],type:vr}]},0,0]}]})};const lr=1e3/er;let dr,pr=0;const hr=fr=>{pr&&fr-pr<lr||(pr=fr,(()=>{const mr=[];return rr.document.querySelectorAll("canvas").forEach(gr=>{G(gr,nr,ar,!0)||mr.push(gr)}),mr})().forEach(mr=>we(this,void 0,void 0,function*(){var gr;const vr=this.mirror.getId(mr);if(or.get(vr))return;if(or.set(vr,!0),["webgl","webgl2"].includes(mr.__context)){const Ir=mr.getContext(mr.__context);((gr=Ir==null?void 0:Ir.getContextAttributes())===null||gr===void 0?void 0:gr.preserveDrawingBuffer)===!1&&(Ir==null||Ir.clear(Ir.COLOR_BUFFER_BIT))}const yr=yield createImageBitmap(mr);cr.postMessage({id:vr,bitmap:yr,width:mr.width,height:mr.height,dataURLOptions:sr.dataURLOptions},[yr])}))),dr=requestAnimationFrame(hr)};dr=requestAnimationFrame(hr),this.resetObservers=()=>{ir(),cancelAnimationFrame(dr)}}initCanvasMutationObserver(er,rr,nr){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const ar=Le(er,rr,nr),sr=function(or,cr,lr,dr){const pr=[],hr=Object.getOwnPropertyNames(cr.CanvasRenderingContext2D.prototype);for(const fr of hr)try{if(typeof cr.CanvasRenderingContext2D.prototype[fr]!="function")continue;const mr=W(cr.CanvasRenderingContext2D.prototype,fr,function(gr){return function(){for(var vr=arguments.length,yr=new Array(vr),Ir=0;Ir<vr;Ir++)yr[Ir]=arguments[Ir];return G(this.canvas,lr,dr,!0)||setTimeout(()=>{const Pr=Fe([...yr],cr,this);or(this.canvas,{type:j["2D"],property:fr,args:Pr})},0),gr.apply(this,yr)}});pr.push(mr)}catch(mr){const gr=D(cr.CanvasRenderingContext2D.prototype,fr,{set(vr){or(this.canvas,{type:j["2D"],property:fr,args:[vr],setter:!0})}});pr.push(gr)}return()=>{pr.forEach(fr=>fr())}}(this.processMutation.bind(this),er,rr,nr),ir=function(or,cr,lr,dr,pr){const hr=[];return hr.push(...De(cr.WebGLRenderingContext.prototype,j.WebGL,or,lr,dr,0,cr)),cr.WebGL2RenderingContext!==void 0&&hr.push(...De(cr.WebGL2RenderingContext.prototype,j.WebGL2,or,lr,dr,0,cr)),()=>{hr.forEach(fr=>fr())}}(this.processMutation.bind(this),er,rr,nr,this.mirror);this.resetObservers=()=>{ar(),sr(),ir()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const er=rr=>{this.rafStamps.latestId=rr,requestAnimationFrame(er)};requestAnimationFrame(er)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((er,rr)=>{const nr=this.mirror.getId(rr);this.flushPendingCanvasMutationFor(rr,nr)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(er,rr){if(this.frozen||this.locked)return;const nr=this.pendingCanvasMutations.get(er);if(!nr||rr===-1)return;const ar=nr.map(ir=>function(cr,lr){var dr={};for(var pr in cr)Object.prototype.hasOwnProperty.call(cr,pr)&&lr.indexOf(pr)<0&&(dr[pr]=cr[pr]);if(cr!=null&&typeof Object.getOwnPropertySymbols=="function"){var hr=0;for(pr=Object.getOwnPropertySymbols(cr);hr<pr.length;hr++)lr.indexOf(pr[hr])<0&&Object.prototype.propertyIsEnumerable.call(cr,pr[hr])&&(dr[pr[hr]]=cr[pr[hr]])}return dr}(ir,["type"])),{type:sr}=nr[0];this.mutationCb({id:rr,type:sr,commands:ar}),this.pendingCanvasMutations.delete(er)}}class ze{constructor(er){this.trackedLinkElements=new WeakSet,this.styleMirror=new z,this.mutationCb=er.mutationCb,this.adoptedStyleSheetCb=er.adoptedStyleSheetCb}attachLinkElement(er,rr){"_cssText"in rr.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:rr.id,attributes:rr.attributes}]}),this.trackLinkElement(er)}trackLinkElement(er){this.trackedLinkElements.has(er)||(this.trackedLinkElements.add(er),this.trackStylesheetInLinkElement(er))}adoptStyleSheets(er,rr){if(er.length===0)return;const nr={id:rr,styleIds:[]},ar=[];for(const sr of er){let ir;if(this.styleMirror.has(sr))ir=this.styleMirror.getId(sr);else{ir=this.styleMirror.add(sr);const or=Array.from(sr.rules||CSSRule);ar.push({styleId:ir,rules:or.map((cr,lr)=>({rule:a(cr),index:lr}))})}nr.styleIds.push(ir)}ar.length>0&&(nr.styles=ar),this.adoptedStyleSheetCb(nr)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(er){}}function Qe(tr){return Object.assign(Object.assign({},tr),{timestamp:Date.now()})}let He,Pe,je,Xe=!1;const qe=new s;function $e(){let tr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{emit:er,checkoutEveryNms:rr,checkoutEveryNth:nr,blockClass:ar="rr-block",blockSelector:sr=null,ignoreClass:ir="rr-ignore",maskTextClass:or="rr-mask",maskTextSelector:cr=null,inlineStylesheet:lr=!0,maskAllInputs:dr,maskInputOptions:pr,slimDOMOptions:hr,maskInputFn:fr,maskTextFn:mr,hooks:gr,packFn:vr,sampling:yr={},dataURLOptions:Ir={},mousemoveWait:Pr,recordCanvas:Rr=!1,recordCrossOriginIframes:$r=!1,userTriggeredOnInput:_r=!1,collectFonts:kr=!1,inlineImages:wr=!1,plugins:Lr,keepIframeSrcFn:xr=()=>!1,ignoreCSSAttributes:Sr=new Set([])}=tr,Tr=!$r||window.parent===window;let Cr=!1;if(!Tr)try{window.parent.document,Cr=!1}catch(Or){Cr=!0}if(Tr&&!er)throw new Error("emit function is required");Pr!==void 0&&yr.mousemove===void 0&&(yr.mousemove=Pr),qe.reset();const Ar=dr===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:pr!==void 0?pr:{password:!0},Zr=hr===!0||hr==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:hr==="all",headMetaDescKeywords:hr==="all"}:hr||{};let Mr;(function(){var Or=this;let zr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window;"NodeList"in zr&&!zr.NodeList.prototype.forEach&&(zr.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in zr&&!zr.DOMTokenList.prototype.forEach&&(zr.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var Aa=arguments.length,Vr=new Array(Aa),Qr=0;Qr<Aa;Qr++)Vr[Qr]=arguments[Qr];let Ur=Vr[0];if(!(0 in Vr))throw new TypeError("1 argument is required");do if(Or===Ur)return!0;while(Ur=Ur&&Ur.parentNode);return!1})})();let jr=0;const Fr=Or=>{for(const zr of Lr||[])zr.eventProcessor&&(Or=zr.eventProcessor(Or));return vr&&(Or=vr(Or)),Or};He=(Or,zr)=>{var Aa;if(!(!((Aa=ae[0])===null||Aa===void 0)&&Aa.isFrozen())||Or.type===Q.FullSnapshot||Or.type===Q.IncrementalSnapshot&&Or.data.source===H.Mutation||ae.forEach(Vr=>Vr.unfreeze()),Tr)er==null||er(Fr(Or),zr);else if(Cr){const Vr={type:"rrweb",event:Fr(Or),isCheckout:zr};window.parent.postMessage(Vr,"*")}if(Or.type===Q.FullSnapshot)Mr=Or,jr=0;else if(Or.type===Q.IncrementalSnapshot){if(Or.data.source===H.Mutation&&Or.data.isAttachIframe)return;jr++;const Vr=nr&&jr>=nr,Qr=rr&&Or.timestamp-Mr.timestamp>rr;(Vr||Qr)&&Pe(!0)}};const Kr=Or=>{He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Mutation},Or)}))},Xr=Or=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Scroll},Or)})),Jr=Or=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.CanvasMutation},Or)})),Br=new ze({mutationCb:Kr,adoptedStyleSheetCb:Or=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.AdoptedStyleSheet},Or)}))}),Hr=new Ae({mirror:qe,mutationCb:Kr,stylesheetManager:Br,recordCrossOriginIframes:$r,wrappedEmit:He});for(const Or of Lr||[])Or.getMirror&&Or.getMirror({nodeMirror:qe,crossOriginIframeMirror:Hr.crossOriginIframeMirror,crossOriginIframeStyleMirror:Hr.crossOriginIframeStyleMirror});je=new Je({recordCanvas:Rr,mutationCb:Jr,win:window,blockClass:ar,blockSelector:sr,mirror:qe,sampling:yr.canvas,dataURLOptions:Ir});const Nr=new ke({mutationCb:Kr,scrollCb:Xr,bypassOptions:{blockClass:ar,blockSelector:sr,maskTextClass:or,maskTextSelector:cr,inlineStylesheet:lr,maskInputOptions:Ar,dataURLOptions:Ir,maskTextFn:mr,maskInputFn:fr,recordCanvas:Rr,inlineImages:wr,sampling:yr,slimDOMOptions:Zr,iframeManager:Hr,stylesheetManager:Br,canvasManager:je,keepIframeSrcFn:xr},mirror:qe});Pe=function(){let Or=arguments.length>0&&arguments[0]!==void 0&&arguments[0];var zr,Aa,Vr,Qr,Ur,Er;He(Qe({type:Q.Meta,data:{href:window.location.href,width:B(),height:Z()}}),Or),Br.reset(),ae.forEach(Gr=>Gr.lock());const qr=function(Gr,Yr){var Wr=Yr||{},Pa=Wr.mirror,Na=Pa===void 0?new s:Pa,Ma=Wr.blockClass,Za=Ma===void 0?"rr-block":Ma,$a=Wr.blockSelector,Ra=$a===void 0?null:$a,La=Wr.maskTextClass,Da=La===void 0?"rr-mask":La,ja=Wr.maskTextSelector,za=ja===void 0?null:ja,Ua=Wr.inlineStylesheet,ao=Ua===void 0||Ua,Wa=Wr.inlineImages,oo=Wa!==void 0&&Wa,Ga=Wr.recordCanvas,so=Ga!==void 0&&Ga,Ka=Wr.maskAllInputs,Va=Ka!==void 0&&Ka,io=Wr.maskTextFn,co=Wr.maskInputFn,Ya=Wr.slimDOM,Ba=Ya!==void 0&&Ya,lo=Wr.dataURLOptions,uo=Wr.preserveWhiteSpace,po=Wr.onSerialize,ho=Wr.onIframeLoad,fo=Wr.iframeLoadTimeout,mo=Wr.onStylesheetLoad,go=Wr.stylesheetLoadTimeout,Qa=Wr.keepIframeSrcFn;return O(Gr,{doc:Gr,mirror:Na,blockClass:Za,blockSelector:Ra,maskTextClass:Da,maskTextSelector:za,skipChild:!1,inlineStylesheet:ao,maskInputOptions:Va===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:Va===!1?{password:!0}:Va,maskTextFn:io,maskInputFn:co,slimDOMOptions:Ba===!0||Ba==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:Ba==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:Ba===!1?{}:Ba,dataURLOptions:lo,inlineImages:oo,recordCanvas:so,preserveWhiteSpace:uo,onSerialize:po,onIframeLoad:ho,iframeLoadTimeout:fo,onStylesheetLoad:mo,stylesheetLoadTimeout:go,keepIframeSrcFn:Qa===void 0?function(){return!1}:Qa,newlyAddedElement:!1})}(document,{mirror:qe,blockClass:ar,blockSelector:sr,maskTextClass:or,maskTextSelector:cr,inlineStylesheet:lr,maskAllInputs:Ar,maskTextFn:mr,slimDOM:Zr,dataURLOptions:Ir,recordCanvas:Rr,inlineImages:wr,onSerialize:Gr=>{Y(Gr,qe)&&Hr.addIframe(Gr),_(Gr,qe)&&Br.trackLinkElement(Gr),J(Gr)&&Nr.addShadowRoot(Gr.shadowRoot,document)},onIframeLoad:(Gr,Yr)=>{Hr.attachIframe(Gr,Yr),Nr.observeAttachShadow(Gr)},onStylesheetLoad:(Gr,Yr)=>{Br.attachLinkElement(Gr,Yr)},keepIframeSrcFn:xr});if(!qr)return console.warn("Failed to snapshot the document");He(Qe({type:Q.FullSnapshot,data:{node:qr,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:(document==null?void 0:document.documentElement.scrollLeft)||((Aa=(zr=document==null?void 0:document.body)===null||zr===void 0?void 0:zr.parentElement)===null||Aa===void 0?void 0:Aa.scrollLeft)||((Vr=document==null?void 0:document.body)===null||Vr===void 0?void 0:Vr.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:(document==null?void 0:document.documentElement.scrollTop)||((Ur=(Qr=document==null?void 0:document.body)===null||Qr===void 0?void 0:Qr.parentElement)===null||Ur===void 0?void 0:Ur.scrollTop)||((Er=document==null?void 0:document.body)===null||Er===void 0?void 0:Er.scrollTop)||0}}})),ae.forEach(Gr=>Gr.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Br.adoptStyleSheets(document.adoptedStyleSheets,qe.getId(document))};try{const Or=[];Or.push(E("DOMContentLoaded",()=>{He(Qe({type:Q.DomContentLoaded,data:{}}))}));const zr=Vr=>{var Qr;return Se({mutationCb:Kr,mousemoveCb:(Ur,Er)=>He(Qe({type:Q.IncrementalSnapshot,data:{source:Er,positions:Ur}})),mouseInteractionCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.MouseInteraction},Ur)})),scrollCb:Xr,viewportResizeCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.ViewportResize},Ur)})),inputCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Input},Ur)})),mediaInteractionCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.MediaInteraction},Ur)})),styleSheetRuleCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.StyleSheetRule},Ur)})),styleDeclarationCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.StyleDeclaration},Ur)})),canvasMutationCb:Jr,fontCb:Ur=>He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Font},Ur)})),selectionCb:Ur=>{He(Qe({type:Q.IncrementalSnapshot,data:Object.assign({source:H.Selection},Ur)}))},blockClass:ar,ignoreClass:ir,maskTextClass:or,maskTextSelector:cr,maskInputOptions:Ar,inlineStylesheet:lr,sampling:yr,recordCanvas:Rr,inlineImages:wr,userTriggeredOnInput:_r,collectFonts:kr,doc:Vr,maskInputFn:fr,maskTextFn:mr,keepIframeSrcFn:xr,blockSelector:sr,slimDOMOptions:Zr,dataURLOptions:Ir,mirror:qe,iframeManager:Hr,stylesheetManager:Br,shadowDomManager:Nr,canvasManager:je,ignoreCSSAttributes:Sr,plugins:((Qr=Lr==null?void 0:Lr.filter(Ur=>Ur.observer))===null||Qr===void 0?void 0:Qr.map(Ur=>({observer:Ur.observer,options:Ur.options,callback:Er=>He(Qe({type:Q.Plugin,data:{plugin:Ur.name,payload:Er}}))})))||[]},gr)};Hr.addLoadListener(Vr=>{Or.push(zr(Vr.contentDocument))});const Aa=()=>{Pe(),Or.push(zr(document)),Xe=!0};return document.readyState==="interactive"||document.readyState==="complete"?Aa():Or.push(E("load",()=>{He(Qe({type:Q.Load,data:{}})),Aa()},window)),()=>{Or.forEach(Vr=>Vr()),Xe=!1}}catch(Or){console.warn(Or)}}$e.addCustomEvent=(tr,er)=>{if(!Xe)throw new Error("please add custom event after start recording");He(Qe({type:Q.Custom,data:{tag:tr,payload:er}}))},$e.freezePage=()=>{ae.forEach(tr=>tr.freeze())},$e.takeFullSnapshot=tr=>{if(!Xe)throw new Error("please take full snapshot after start recording");Pe(tr)},$e.mirror=qe;const et=ur({},console),tt=["log","info","error","warn","debug"].reduce((tr,er)=>(tr[er]=function(){for(var rr=arguments.length,nr=new Array(rr),ar=0;ar<rr;ar++)nr[ar]=arguments[ar];console[er]("[PageSpy] [".concat(er.toLocaleUpperCase(),"] "),...nr)},tr.unproxy[er]=function(){for(var rr=arguments.length,nr=new Array(rr),ar=0;ar<rr;ar++)nr[ar]=arguments[ar];et[er]("[PageSpy] [".concat(er.toLocaleUpperCase(),"] "),...nr)},tr),{unproxy:{}});class nt{constructor(){let er=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t(this,"name","RRWebPlugin"),t(this,"stopListener",null),this.options=er}onInit(er){let{socketStore:rr}=er;if(typeof window!="object"||typeof document!="object"||Object.prototype.toString.call(document)!=="[object HTMLDocument]")return void tt.warn("".concat(this.name," can only used in browser environment"));if(!MutationObserver)return void tt.warn("".concat(this.name," built on the MutationObserver API and it's not detected in the current browser"));if(nt.hasInited)return;nt.hasInited=!0;const ir=this.options,{allowOnline:nr=!1}=ir,ar=to(ir,["allowOnline"]),sr=$e(br(ur({},ar),{emit(or){const cr=function(lr,dr){return{role:"client",type:lr,data:ur(ur({},(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])&&{id:Math.random().toString(36).slice(2)}),dr)}}("rrweb-event",or);rr.dispatchEvent("public-data",cr)}}));rr.addListener("harbor-clear",()=>{$e.takeFullSnapshot()}),sr&&(this.stopListener=sr)}onReset(){var er;(er=this.stopListener)===null||er===void 0||er.call(this),nt.hasInited=!1}}t(nt,"hasInited",!1);const useStyles=client.createStyles(({css:tr})=>({container:tr`
|
|
926
|
+
position: relative;
|
|
927
|
+
.page-spy-logo {
|
|
928
|
+
top: auto !important;
|
|
929
|
+
bottom: 48px !important;
|
|
930
|
+
left: auto !important;
|
|
931
|
+
right: 70px !important;
|
|
932
|
+
width: 2.5rem !important;
|
|
933
|
+
height: 2.5rem !important;
|
|
934
|
+
|
|
935
|
+
img {
|
|
936
|
+
width: 1.5rem !important;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
`})),PageSpyContext=react.createContext({}),usePageSpy=()=>react.useContext(PageSpyContext);function cleanupPageSpy(tr){var rr;const er=window.$pageSpy;er&&(er.root&&(tr!=null&&tr.contains(er.root))&&tr.removeChild(er.root),(rr=er.abort)==null||rr.call(er)),window.$pageSpy=null}function createPageSpy(tr,er){window.$harbor=new Ea,window.$rrweb=new nt,[window.$harbor,window.$rrweb].forEach(ar=>{PageSpy.registerPlugin(ar)});const rr=new PageSpy({api:er.api||"localhost:6752",clientOrigin:`http://${er.api}`||"http://localhost:6752",project:er.project||"Tachybase-debug",title:er.title||"Tachybase"}),nr=()=>{rr.root instanceof Node?tr.appendChild(rr.root):setTimeout(nr,50)};nr(),window.$pageSpy=rr}const PageSpyProvider=({children:tr})=>{const er=client.useAPIClient(),rr=react.useRef(null),[nr,ar]=react.useState(!1),{styles:sr}=useStyles(),{data:ir,refresh:or}=client.useRequest(()=>er.resource("pagespy").get().then(cr=>{var lr;return(lr=cr.data)==null?void 0:lr.data}));return react.useEffect(()=>(nr&&rr.current&&ir?(cleanupPageSpy(rr.current),createPageSpy(rr.current,ir)):nr||cleanupPageSpy(rr.current),()=>cleanupPageSpy(rr.current)),[nr,ir]),jsxRuntime.jsxs(PageSpyContext.Provider,{value:{visible:nr,setVisible:ar,refresh:or},children:[tr,nr?reactDom.createPortal(jsxRuntime.jsx("div",{ref:rr,className:sr.container}),document.body):null]})},PageSpyButtonProvider=tr=>jsxRuntime.jsx(client.PinnedPluginListProvider,{items:{ps:{order:440,component:"PageSpyButton",pin:!0,isPublic:!0,belongTo:"hoverbutton"}},children:jsxRuntime.jsx(client.SchemaComponentOptions,{components:{PageSpyButton},children:tr.children})}),PageSpyButton=()=>{const{visible:tr,setVisible:er}=usePageSpy();return jsxRuntime.jsx(antd.FloatButton,{type:tr?"primary":"default",icon:jsxRuntime.jsx(icons.BugOutlined,{}),onClick:()=>{er(rr=>!rr)}})},usePageSpyValues=()=>{const tr=client.useAPIClient(),{data:er}=client.useRequest(()=>tr.resource("pagespy").get().then(nr=>{var ar;return(ar=nr.data)==null?void 0:ar.data}));return{form:schema$2.createForm({values:er})}},useSavePageSpyValues=()=>{const tr=schema$2.useForm(),{message:er}=antd.App.useApp(),rr=client.useAPIClient(),{t:nr}=useTranslation(),{refresh:ar}=usePageSpy();return{onClick(){return Dr(this,null,function*(){yield tr.submit();const ir=lodash.cloneDeep(tr.values);try{yield rr.resource("pagespy").update({filterByTk:{id:1},values:ir}),ar(),er.success(nr("Saved successfully"))}catch(or){throw er.error(nr("Failed to save settings")),or}})}}},schema={type:"object",properties:{pagespy:{"x-component":"FormV2","x-use-component-props":"usePageSpyValues",type:"void",title:'{{t("PageSpy configs")}}',properties:{api:{type:"string",title:"{{t('API')}}","x-decorator":"FormItem","x-component":"Input"},project:{type:"string",title:lang("Project name"),"x-decorator":"FormItem","x-component":"Input"},title:{type:"string",title:"{{t('Title')}}","x-decorator":"FormItem","x-component":"Input"},footer:{type:"void","x-component":"ActionBar",properties:{submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary"},"x-use-component-props":"useSavePageSpyValues"}}}}}}},PageSpyPane=()=>jsxRuntime.jsx(antd.Card,{bordered:!1,children:jsxRuntime.jsx(client.SchemaComponent,{schema,scope:{usePageSpyValues,useSavePageSpyValues}})});class PluginPluginPagespy extends client.Plugin{load(){return Dr(this,null,function*(){this.app.use(PageSpyProvider),this.app.use(PageSpyButtonProvider),this.app.systemSettingsManager.add("system-services.pagespy",{icon:"BugOutlined",title:lang("PageSpy config"),Component:PageSpyPane,aclSnippet:"pm.system-services.pagespy"})})}}exports.default=PluginPluginPagespy,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|